:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0f0f10;
  --surface-2: #17181a;
  --surface-3: #202225;
  --border: #2f3136;
  --text: #f5f5f5;
  --muted: #a9a9ad;
  --accent: #f58529;
  --accent-2: #dd2a7b;
  --accent-3: #515bd4;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(81, 91, 212, 0.18), transparent 28%),
    radial-gradient(circle at right top, rgba(221, 42, 123, 0.16), transparent 22%),
    var(--bg);
  color: var(--text);
  overflow-x: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  min-width: 393px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(23, 24, 26, 0.92), rgba(15, 15, 16, 0.96));
  box-shadow: var(--shadow);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  min-width: 0;
}

.tabs {
  display: inline-flex;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(17, 18, 20, 0.92);
  backdrop-filter: blur(18px);
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

.tab {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.18), rgba(221, 42, 123, 0.24));
  color: var(--text);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 12px;
  line-height: 1;
}

.layout {
  display: block;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.panel-shell {
  display: grid;
  gap: 18px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 24px;
}

.section-note {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.archive-filters {
  display: grid;
  gap: 10px;
}

.filter-group {
  display: grid;
  gap: 6px;
}


@media (min-width: 769px) {
  .filter-group {
    justify-content: end;
  }
}

.filter-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.filter-chip.is-active {
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.18), rgba(221, 42, 123, 0.24));
  color: var(--text);
}

.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.section-toggle:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.section-toggle-input {
  position: absolute;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.section-toggle-control {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.section-toggle-control::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f6f7f8;
  transition: transform 160ms ease;
}

.section-toggle-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease;
}

.section-toggle-input:checked + .section-toggle-control {
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.95), rgba(221, 42, 123, 0.95));
}

.section-toggle-input:checked + .section-toggle-control::after {
  transform: translateX(18px);
}

.section-toggle-input:checked ~ .section-toggle-label {
  color: var(--text);
}

.section-toggle-input:focus-visible + .section-toggle-control {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 3px rgba(221, 42, 123, 0.28);
}

.loading,
.empty {
  margin: 0;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(17, 18, 20, 0.92);
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.card {
  display: grid;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 25, 27, 0.95), rgba(14, 14, 15, 0.95));
  box-shadow: var(--shadow);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta-primary {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.card-public-id {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: auto;
  color: rgba(169, 169, 173, 0.82);
  text-decoration: none;
}

.card-public-id svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.card-public-id:hover {
  color: var(--text);
}

.card-status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-left: auto;
  border-radius: 50%;
}

.card-status-dot--missing-cover {
  background: rgba(245, 133, 41, 0.95);
  box-shadow: 0 0 0 3px rgba(245, 133, 41, 0.16);
}

.card-stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.card-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(220, 80, 80, 0.85);
  line-height: 1;
}

.card-stat--comments {
  color: rgba(100, 140, 220, 0.85);
}

.card-stat-icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

.card-kicker {
  font-weight: 600;
  color: var(--text);
}

.caption {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.caption-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.82);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.caption-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.media-expand-button {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.82);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.media-expand-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.media-list {
  display: grid;
  gap: 10px;
}

.media-list--with-caption {
  position: relative;
}

.caption-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: start;
  padding: 20px;
  border-radius: 0 0 12px 12px;
  background: rgba(10, 10, 12, 0.94);
  overflow: auto;
}

.caption-overlay--hidden {
  display: none;
}

.caption--overlay {
  max-width: 72ch;
  padding-right: 30px;
}

.caption-authors {
  color: rgba(169, 169, 173, 0.92);
}

.caption-divider {
  width: min(72ch, calc(100% - 30px));
  margin: 8px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.caption-comment {
  color: var(--muted);
}

.caption-comment-author {
  font-weight: 600;
  color: var(--text);
}

.media-item {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: auto;
}

.media-item--zoomable {
  cursor: zoom-in;
}

.video-poster-shell {
  position: relative;
}

.video-poster-button {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.video-poster-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.8);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.video-poster-button:hover .video-poster-button-icon {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 12, 0.9);
}

.media-item img,
.media-item video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  background: #000;
}

.media-item img {
  object-fit: cover;
}

.media-item--story img,
.media-item--story video {
  aspect-ratio: 9 / 16;
  width: 100%;
  height: auto;
}

.media-item--story img {
  object-fit: cover;
}

.media-item--post {
  aspect-ratio: 4 / 5;
}

.media-item--post img,
.media-item--post video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.media-item--post video.video-native-fullscreen,
.image-lightbox-media--video.video-native-fullscreen {
  width: auto !important;
  height: auto !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #000 !important;
}

.media-item video:fullscreen,
.media-item video:-webkit-full-screen,
.media-item video:-moz-full-screen,
.media-item video:-ms-fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #000;
}

.media-item--post video:fullscreen,
.media-item--post video:-webkit-full-screen,
.media-item--post video:-moz-full-screen,
.media-item--post video:-ms-fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

video:fullscreen,
video:-webkit-full-screen,
video:-moz-full-screen,
video:-ms-fullscreen {
  width: auto !important;
  height: auto !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #000 !important;
}

video:fullscreen::backdrop,
video:-webkit-full-screen::backdrop,
video:-moz-full-screen::backdrop,
video:-ms-fullscreen::backdrop {
  background: #000;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.94);
}

.image-lightbox--hidden {
  display: none;
}

.image-lightbox--single {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.image-lightbox-figure {
  margin: 0;
  position: relative;
  display: grid;
  padding-bottom: 52px;
  justify-items: center;
}

.image-lightbox-stage {
  display: grid;
  justify-items: center;
  width: auto;
  max-width: 100%;
}

.image-lightbox-media {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}

.image-lightbox-media--video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  background: #000;
}

.image-lightbox-media--video:fullscreen,
.image-lightbox-media--video:-webkit-full-screen,
.image-lightbox-media--video:-moz-full-screen,
.image-lightbox-media--video:-ms-fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #000;
}

.image-lightbox-dots {
  bottom: 8px;
}

.image-lightbox-close,
.image-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 18, 20, 0.92);
  color: var(--text);
  cursor: pointer;
}

.image-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.image-lightbox-nav {
  padding: 12px 16px;
  border-radius: 999px;
}

.media-slider {
  position: relative;
}

.media-slider-frame {
  position: relative;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.media-slider-status {
  color: var(--muted);
  font-size: 13px;
}

.media-slider-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.72);
  color: var(--text);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.media-slider-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(10, 10, 12, 0.88);
}

.media-slider-nav:disabled {
  opacity: 0.22;
  cursor: default;
  transform: none;
}

.media-slider-nav--prev {
  left: 12px;
}

.media-slider-nav--next {
  right: 12px;
}

.media-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.62);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.media-slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.media-slider-dot:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.62);
}

.media-slider-dot.is-active {
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.98), rgba(221, 42, 123, 0.98));
  transform: scale(1.25);
}

.control-button,
.page-button,
.highlight-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.control-button,
.page-button {
  padding: 10px 16px;
  cursor: pointer;
}

.control-button:hover,
.page-button:hover,
.highlight-chip:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.control-button:disabled,
.page-button:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.page-button.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.92), rgba(221, 42, 123, 0.92));
  color: #050505;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.story-card .caption {
  color: var(--muted);
  font-size: 14px;
}

.highlights-shell {
  display: grid;
  gap: 22px;
}

.highlights-sidebar,
.highlights-main {
  min-width: 0;
}

.highlights-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(24, 25, 27, 0.96), rgba(11, 12, 13, 0.98));
  box-shadow: var(--shadow);
}

.highlight-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 16px;
}

.highlight-chip {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px 10px 14px;
  border-radius: 30px;
  cursor: pointer;
  color: var(--text);
}

.highlight-chip.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 133, 41, 0.55);
}

.highlight-ring {
  width: 84px;
  height: 84px;
  padding: 1px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.highlight-ring-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
}

.highlight-ring-inner img,
.highlight-ring-inner span {
  display: block;
  width: 100%;
  height: 100%;
}

.highlight-ring-inner img {
  object-fit: cover;
}

.highlight-ring-inner span {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.highlight-chip-title {
  font-size: 14px;
  text-align: center;
  line-height: 1.35;
}

.highlight-chip-count {
  color: var(--muted);
  font-size: 12px;
}

.highlight-viewer {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(24, 25, 27, 0.96), rgba(11, 12, 13, 0.98));
  box-shadow: var(--shadow);
}

.highlight-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.highlight-viewer-title {
  min-width: 0;
  width: stretch;
}

.highlight-viewer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.highlight-viewer-head h3 {
  margin: 0;
  font-size: 24px;
}

.highlight-viewer-date {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.story-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.story-stage {
  display: grid;
  gap: 14px;
  width: 100%;
}

.story-nav-area {
  position: absolute;
  top: 0;
  bottom: 60px;
  z-index: 2;
  width: 24%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, opacity 160ms ease;
}

.story-nav-area:hover {
  background: rgba(255, 255, 255, 0.04);
}

.story-nav-area:disabled {
  opacity: 0;
  cursor: default;
}

.story-nav-area--prev {
  left: 0;
}

.story-nav-area--next {
  right: 0;
}

.highlight-story-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 72px;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
}

.highlight-story-thumb {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
}

.highlight-story-thumb-media {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.highlight-story-thumb:hover .highlight-story-thumb-media {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.highlight-story-thumb.is-active .highlight-story-thumb-media {
  border-color: rgba(245, 133, 41, 0.95);
  box-shadow: 0 0 0 3px rgba(245, 133, 41, 0.18);
}

.highlight-story-thumb-media img,
.highlight-story-thumb-media > span:first-child {
  display: block;
  width: 100%;
  height: 100%;
}

.highlight-story-thumb-media img {
  object-fit: cover;
}

.highlight-story-thumb-media--video > span:first-child {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 24px;
  background: linear-gradient(180deg, rgba(32, 33, 35, 0.92), rgba(13, 14, 16, 0.98));
}

.highlight-story-thumb-index {
  position: absolute;
  left: 8px;
  bottom: 8px;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.78);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.story-caption-toggle {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

@media (min-width: 769px) {
  .highlights-shell {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }

  .highlights-sidebar {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
  }

  .highlight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-chip {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
    padding: 12px 14px;
  }

  .highlight-ring {
    grid-row: 1 / span 2;
  }

  .highlight-chip-title,
  .highlight-chip-count {
    grid-column: 2;
  }

  .highlight-chip-title,
  .highlight-chip-count {
    text-align: left;
  }
}

@media (min-width: 769px) {
  .tabs {
    justify-self: end;
  }
}

@media (max-width: 768px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 12px;
  }

  .story-viewer {
    grid-template-columns: 1fr;
  }

  .story-aside {
    width: 100%;
  }

  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlights-sidebar {
    padding: 16px;
    border-radius: 22px;
  }

  .highlight-strip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(136px, 148px);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .highlight-chip {
    scroll-snap-align: start;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
.highlight-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: calc(100% - 20px);
    min-width: 405px;
    padding-top: 14px;
  }

  .topbar,
  .highlight-viewer,
  .card {
    padding: 16px;
    border-radius: 22px;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .tab {
    text-align: center;
  }

  .image-lightbox {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
  }

  .image-lightbox-figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .image-lightbox-dots {
    bottom: 4px;
  }

  .image-lightbox-nav--prev {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .image-lightbox-nav--next {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 500px) {
  .tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    border-radius: 18px;
  }

  .tab {
    justify-content: space-between;
    text-align: left;
    border-radius: 12px;
  }
}
