/* ==========================================================================
   BEFORE GTA 6 — WE GOT [EVENT] BEFORE VII
   ========================================================================== */

:root,
[data-theme='light'] {
  color-scheme: light;
  --dyn-bg: #f3f2ee;
  --dyn-glow: rgba(56, 130, 214, 0.14);
  --dyn-glow-2: rgba(205, 134, 92, 0.12);
  --dyn-accent: #2563eb;

  --card-bg: #ffffff;
  --card-border: #e4e4e7;
  --card-border-hover: #a1a1aa;
  --media-bg: #f4f4f5;
  --border-subtle: rgba(24, 24, 27, 0.09);
  --surface-control: rgba(255, 255, 255, 0.8);
  --surface-control-hover: #ffffff;

  --ink-primary: #18181b;
  --ink-muted: #52525b;
  --pill-active-bg: #18181b;
  --pill-active-ink: #ffffff;

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --focus-ring: 2px solid var(--dyn-accent);
  --transition-theme: background-color 560ms ease, color 180ms ease, border-color 180ms ease;

  --card-shell-bg: #eae7df;
  --wave-stop-1: #f7f5ef;
  --wave-stop-2: #f7f5ef;
  --wave-stop-3: #f7f5ef;
  --wave-edge-1: rgba(24, 24, 27, 0.16);
  --wave-edge-2: rgba(24, 24, 27, 0.11);
  --wave-edge-3: rgba(24, 24, 27, 0.08);
  --wave-solid-bg: #f7f5ef;
  --wave-link-bg: #f7f5ef;
  --wave-ink-primary: #18181b;
  --wave-ink-body: #3f3f46;
  --wave-ink-muted: #52525b;
  --wave-track-bg: rgba(24, 24, 27, 0.12);
  --cat-pill-bg: #eae5da;
  --cat-pill-ink: #18181b;
  --cat-pill-icon: #b45309;
  --cat-pill-border: color-mix(in srgb, var(--card-accent, #ea580c) 40%, rgba(24, 24, 27, 0.18));
  --top-pill-bg: #faf9f5;
  --top-pill-ink: #18181b;
  --top-pill-border: rgba(24, 24, 27, 0.14);
  --contain-stage-bg: radial-gradient(circle at 64% 34%,
      color-mix(in srgb, var(--card-accent, #3b82f6) 20%, #ffffff) 0%,
      #e8e4da 80%);
  --contain-year-fill: rgba(24, 24, 27, 0.42);
  --contain-line-color: linear-gradient(90deg, rgba(24, 24, 27, 0.35) 0%, rgba(24, 24, 27, 0.06) 100%);
}

[data-theme='dark'] {
  color-scheme: dark;
  --dyn-bg: #0e141e;
  --dyn-glow: rgba(56, 130, 214, 0.22);
  --dyn-glow-2: rgba(205, 134, 92, 0.14);
  --dyn-accent: #2563eb;

  --card-bg: #18181b;
  --card-border: #27272a;
  --card-border-hover: #52525b;
  --media-bg: #27272a;
  --border-subtle: rgba(250, 250, 250, 0.09);
  --surface-control: rgba(24, 24, 27, 0.8);
  --surface-control-hover: #27272a;

  --ink-primary: #fafafa;
  --ink-muted: #a1a1aa;
  --pill-active-bg: #fafafa;
  --pill-active-ink: #111113;

  --card-shell-bg: #0f131c;
  --wave-stop-1: #131823;
  --wave-stop-2: #131823;
  --wave-stop-3: #131823;
  --wave-edge-1: rgba(255, 255, 255, 0.22);
  --wave-edge-2: rgba(255, 255, 255, 0.14);
  --wave-edge-3: rgba(255, 255, 255, 0.08);
  --wave-solid-bg: #131823;
  --wave-link-bg: #131823;
  --wave-ink-primary: #f8fafc;
  --wave-ink-body: #cbd5e1;
  --wave-ink-muted: #cbd5e1;
  --wave-track-bg: rgba(255, 255, 255, 0.14);
  --cat-pill-bg: #201c1a;
  --cat-pill-ink: #f8fafc;
  --cat-pill-icon: #fdba74;
  --cat-pill-border: color-mix(in srgb, var(--card-accent, #ea580c) 45%, rgba(255, 255, 255, 0.16));
  --top-pill-bg: #131823;
  --top-pill-ink: #f8fafc;
  --top-pill-border: rgba(255, 255, 255, 0.18);
  --contain-stage-bg: radial-gradient(circle at 64% 34%,
      color-mix(in srgb, var(--card-accent, #3b82f6) 35%, #1e2638) 0%,
      #0d111a 78%);
  --contain-year-fill: rgba(255, 255, 255, 0.72);
  --contain-line-color: linear-gradient(90deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.08) 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--dyn-bg);
  color: var(--ink-primary);
}

body {
  margin: 0;
  background-color: var(--dyn-bg);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: var(--pill-active-bg);
  color: var(--pill-active-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: top 120ms ease;
}

.skip-link:focus {
  top: 12px;
}

.app-shell {
  background-color: var(--dyn-bg);
  background-image:
    radial-gradient(ellipse 68% 58% at 38% 42%, var(--dyn-glow) 0%, transparent 72%),
    radial-gradient(ellipse 62% 54% at 64% 58%, var(--dyn-glow-2) 0%, transparent 74%);
  transition: var(--transition-theme);
}

/* ==========================================================================
   Minimal Header
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 30;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-dates {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.playback-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 13px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background-color: var(--surface-control);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-primary);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.play-btn:hover {
  background-color: var(--surface-control-hover);
  border-color: var(--card-border-hover);
}

.play-btn[aria-pressed='true'] {
  background-color: var(--pill-active-bg);
  color: var(--pill-active-ink);
  border-color: var(--pill-active-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.play-icon {
  font-size: 10px;
  line-height: 1;
}

.speed-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background-color: var(--surface-control);
  gap: 2px;
}

.speed-btn {
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: background-color 140ms ease, color 140ms ease;
}

.speed-btn:hover {
  color: var(--ink-primary);
}

.speed-btn[aria-pressed='true'] {
  background-color: var(--pill-active-bg);
  color: var(--pill-active-ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background-color: var(--surface-control);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-primary);
  transition: background-color 140ms ease, border-color 140ms ease;
}

.theme-toggle:hover {
  background-color: var(--surface-control-hover);
  border-color: var(--card-border-hover);
}

.theme-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--dyn-accent);
  transition: background-color 500ms ease;
}

.roman-numeral {
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.03em;
}

/* ==========================================================================
   Desktop Centered 3-Column Composition: WE GOT | EVENT CARD | BEFORE VII
   ========================================================================== */

@media (min-width: 768px) {

  html,
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .app-shell {
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .timeline-stage {
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 8px 24px;
    min-height: 0;
    touch-action: pan-y;
  }

  .stage-grid {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: center;
    align-items: center;
    gap: clamp(18px, 2.5vw, 38px);
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
  }

  .stage-phrase {
    font-weight: 800;
    font-size: clamp(1.7rem, 2.86vw, 2.95rem);
    line-height: 1;
    letter-spacing: -0.035em;
    color: var(--ink-primary);
    white-space: nowrap;
    user-select: none;
  }

  .stage-phrase--left {
    justify-self: end;
    text-align: right;
  }

  .stage-phrase--right {
    justify-self: start;
    text-align: left;
  }

  .events-track {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    width: clamp(480px, 44vw, 640px);
    height: clamp(488px, 65dvh, 548px);
  }

  .events-track::before {
    content: '';
    position: absolute;
    inset: -34px -44px;
    border-radius: 36px;
    background:
      radial-gradient(circle at 38% 34%, var(--dyn-glow), transparent 64%),
      radial-gradient(circle at 64% 68%, var(--dyn-glow-2), transparent 66%);
    filter: blur(44px);
    opacity: 0.72;
    pointer-events: none;
    z-index: 0;
    transition: background 560ms ease;
  }

  .event-slide {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    transition:
      opacity 280ms ease,
      transform 280ms ease,
      visibility 280ms;
  }

  .event-slide[data-state='prev'],
  .event-slide[data-state='next'] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
  }

  .event-slide[data-state='active'] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 2;
  }

  .slide-mobile-phrase {
    display: none;
  }
}

/* ==========================================================================
   Full-Bleed Wave Overlay Collectible Artifact Event Card
   ========================================================================== */

.event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  gap: 0;
  border-radius: 26px;
  border: 1px solid var(--card-border);
  background-color: var(--card-shell-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 52px -18px rgba(0, 0, 0, 0.4);
  transition:
    border-color 200ms ease,
    transform 240ms ease,
    box-shadow 240ms ease;
}

.event-card:has(.event-card-link:hover),
.event-card:has(.event-card-link:focus-visible) {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 28px 56px -16px rgba(0, 0, 0, 0.48);
}

.event-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background-color: var(--card-shell-bg);
}

.event-card-media[data-fit='contain'] {
  background: var(--contain-stage-bg);
}

.event-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.event-card-media[data-fit='contain'] img {
  padding: 32px 28px 36% 36%;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.35));
}

.event-card:has(.event-card-link:hover) .event-card-media img {
  transform: scale(1.025);
}

.media-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
      rgba(10, 14, 22, 0.56) 0%,
      rgba(10, 14, 22, 0.14) 28%,
      rgba(10, 14, 22, 0.2) 52%,
      rgba(10, 14, 22, 0.72) 100%);
}

.event-card:has(.event-card-media[data-fit='contain']) .media-vignette {
  opacity: 0.25;
}

.artifact-top-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
  pointer-events: none;
}

.artifact-issue-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.artifact-issue {
  display: inline-flex;
  align-items: center;
  padding: 3.5px 9px;
  border-radius: 999px;
  background-color: var(--top-pill-bg);
  color: var(--top-pill-ink);
  border: 1px solid var(--top-pill-border);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.artifact-issue-line {
  width: clamp(48px, 8vw, 92px);
  height: 1px;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.52) 0%,
      rgba(255, 255, 255, 0.08) 100%);
}

.event-card:has(.event-card-media[data-fit='contain']) .artifact-issue-line {
  background: var(--contain-line-color);
}

.artifact-floating-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  background-color: var(--top-pill-bg);
  color: var(--top-pill-ink);
  border: 1px solid var(--top-pill-border);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.015em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.artifact-date-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 999px;
  background-color: var(--card-accent, #3b82f6);
  box-shadow: 0 0 8px var(--card-accent, #3b82f6);
  flex-shrink: 0;
}

.artifact-backdrop {
  position: absolute;
  top: 46px;
  left: 22px;
  width: clamp(118px, 21%, 148px);
  height: clamp(74px, 15%, 94px);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  overflow: visible;
}

.artifact-backdrop text {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 126px;
  font-weight: 700;
  letter-spacing: -0.04em;
  fill: rgba(255, 255, 255, 0.72);
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.34));
}

.event-card:has(.event-card-media[data-fit='contain']) .artifact-backdrop text {
  fill: var(--contain-year-fill);
  filter: none;
}

.event-card-body {
  z-index: 2;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  margin: auto 10px 10px;
  min-height: clamp(138px, 26%, 158px);
}

.artifact-wave-svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  contain: size;
  z-index: 0;
  pointer-events: none;
  align-self: stretch;
  justify-self: stretch;
}

.artifact-body-grid {
  grid-area: 1 / 1;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 16px 10px;
  align-items: stretch;
  min-height: 0;
}

.artifact-text-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  padding: 0;
  min-width: 0;
  min-height: 0;
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--wave-ink-muted);
}

.artifact-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7.5px;
  border-radius: 999px;
  background-color: var(--cat-pill-bg);
  color: var(--cat-pill-ink);
  border: 1px solid var(--cat-pill-border);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.artifact-cat-icon {
  width: 10.5px;
  height: 10.5px;
  flex-shrink: 0;
  color: var(--cat-pill-icon);
}

.artifact-wait-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wave-ink-muted);
  background-color: var(--wave-solid-bg);
  padding: 2px 6px;
  border-radius: 6px;
}

.artifact-day-num {
  color: var(--wave-ink-primary);
  font-weight: 700;
}

.event-card-title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--wave-ink-primary);
  background-color: var(--wave-solid-bg);
  border-radius: 6px;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card-desc {
  margin: 0;
  font-size: clamp(10.8px, 0.78vw, 11.6px);
  line-height: 1.38;
  color: var(--wave-ink-body);
  background-color: var(--wave-solid-bg);
  border-radius: 6px;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.artifact-progress-track {
  margin-top: 6px;
  padding-top: 0;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background-color: var(--wave-track-bg);
  overflow: hidden;
}

.artifact-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg,
      var(--card-accent, #3b82f6) 0%,
      color-mix(in srgb, var(--card-accent, #3b82f6) 55%, #ffffff) 100%);
  box-shadow: 0 0 8px var(--card-accent, #3b82f6);
}

.artifact-side-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding-top: clamp(22px, 3vh, 30px);
  min-width: 0;
}

.artifact-emblem {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.artifact-emblem svg {
  width: clamp(52px, 5vw, 70px);
  height: clamp(42px, 4vw, 56px);
  max-width: 100%;
  max-height: 100%;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.event-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 6px;
  background-color: var(--wave-link-bg);
  font-size: 9.8px;
  font-weight: 600;
  line-height: 1.25;
  text-align: right;
  color: var(--wave-ink-muted);
  text-decoration: none;
  max-width: 100%;
  transition: color 140ms ease;
}

.event-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 26px;
  z-index: 5;
}

.event-card:has(.event-card-link:hover) .event-card-link,
.event-card:has(.event-card-link:focus-visible) .event-card-link {
  color: var(--wave-ink-primary);
}

.event-card-link:focus-visible {
  outline: none;
}

.event-card-link:focus-visible::after {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* ==========================================================================
   Refined Bottom Timeline Navigation & Attribution
   ========================================================================== */

.timeline-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 28px 16px;
  border-top: 1px solid var(--border-subtle);
  z-index: 30;
}

.desktop-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-rail {
  position: relative;
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.rail-line {
  position: relative;
  width: 100%;
  height: 2px;
  background-color: var(--border-subtle);
  border-radius: 999px;
}

.rail-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background-color: var(--dyn-accent);
  border-radius: 999px;
  transition: width 260ms ease, background-color 500ms ease;
}

.event-dots {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.event-dot {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--ink-muted);
  opacity: 0.32;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, opacity 180ms ease, background-color 260ms ease;
}

.event-dot:hover {
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1.6);
}

.event-dot.is-active {
  width: 13px;
  height: 13px;
  opacity: 1;
  background-color: var(--dyn-accent);
  border: 2.5px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--dyn-accent);
  z-index: 2;
}

.year-markers {
  position: relative;
  width: 100%;
  height: 26px;
}

.year-tick {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  transition: color 140ms ease, background-color 140ms ease;
}

.year-tick:first-child {
  transform: translateX(0);
}

.year-tick:last-child {
  transform: translateX(-100%);
}

.year-tick:hover {
  color: var(--ink-primary);
}

.year-tick[aria-current='true'] {
  background-color: var(--pill-active-bg);
  color: var(--pill-active-ink);
  font-weight: 700;
}

.mobile-progress-bar {
  display: none;
}

.footer-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
}

.step-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background-color: var(--surface-control);
  font-size: 13px;
  color: var(--ink-primary);
  transition: background-color 140ms ease, border-color 140ms ease;
}

.step-btn:hover:not(:disabled) {
  background-color: var(--surface-control-hover);
  border-color: var(--card-border-hover);
}

.step-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.hud-readout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

.hud-days {
  color: var(--ink-primary);
  font-weight: 600;
}

.creator-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background-color: var(--surface-control);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.creator-pill:hover,
.creator-pill:focus-visible {
  color: var(--ink-primary);
  border-color: var(--card-border-hover);
  background-color: var(--surface-control-hover);
}

/* ==========================================================================
   Mobile Vertical Storytelling Layout (< 768px)
   ========================================================================== */

@media (max-width: 767px) {

  html,
  body {
    height: auto;
    overflow-x: clip;
  }

  .app-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .site-header {
    position: sticky;
    top: 0;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
    background-color: var(--dyn-bg);
    transition: background-color 560ms ease;
  }

  .brand-lockup {
    flex: 1 1 auto;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .speed-pill {
    display: inline-flex;
  }

  .stage-phrase--left,
  .stage-phrase--right {
    display: none;
  }

  .timeline-stage {
    padding: 8px 16px 76px;
  }

  .stage-grid {
    display: block;
    width: 100%;
  }

  .events-track {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
  }

  .event-slide {
    min-height: calc(100dvh - 176px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 0;
  }

  .slide-mobile-phrase {
    display: block;
    font-size: clamp(1.75rem, 7.8vw, 2.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
    color: var(--ink-primary);
    text-align: center;
    user-select: none;
  }

  .event-card {
    width: 100%;
    max-width: 540px;
    min-height: 452px;
    height: auto;
    padding: 0;
  }

  .event-card-media[data-fit='contain'] img {
    padding: 26px 20px 44% 24%;
  }

  .artifact-top-bar {
    padding: 14px 14px 0;
  }

  .artifact-issue-line {
    width: 34px;
  }

  .artifact-backdrop {
    top: 40px;
    left: 16px;
    width: 118px;
    height: 76px;
  }

  .artifact-backdrop text {
    font-size: 112px;
  }

  .event-card-body {
    margin: auto 8px 8px;
    min-height: 146px;
  }

  .artifact-body-grid {
    grid-template-columns: minmax(0, 1.68fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 13px 10px;
  }

  .artifact-side-col {
    padding-top: 26px;
  }

  .artifact-emblem svg {
    width: 68px;
    height: 54px;
  }

  .event-card-title {
    font-size: 15.5px;
  }

  .event-card-desc {
    font-size: 11.5px;
  }

  .event-card-title,
  .event-card-desc {
    -webkit-line-clamp: unset;
  }

  .timeline-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 14px 10px;
    gap: 8px;
    background-color: var(--dyn-bg);
    transition: background-color 560ms ease;
  }

  .desktop-timeline,
  .step-controls,
  .hud-date,
  .hud-date+.hud-sep,
  .hud-count-sep,
  .hud-index {
    display: none;
  }

  .mobile-progress-bar {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background-color: var(--border-subtle);
    overflow: hidden;
  }

  .mobile-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background-color: var(--dyn-accent);
    transition: width 260ms ease, background-color 500ms ease;
  }

  .hud-readout {
    font-size: 11px;
    gap: 5px;
  }

  .creator-pill {
    padding: 3px 9px;
    font-size: 11px;
  }
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}