/* ---- /assets/core/fonts.css ---- */
/* Self-hosted, latin-subset variable fonts. 2 files total, swap, no layout shift. */
@layer tokens {
  @font-face {
    font-family: "Inter";
    src: url("./fonts/inter-var.woff2") format("woff2-variations"),
         url("./fonts/inter-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
      U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
      U+2212, U+2215, U+FEFF, U+FFFD;
  }

  @font-face {
    font-family: "Manrope";
    src: url("./fonts/manrope-var.woff2") format("woff2-variations"),
         url("./fonts/manrope-var.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
      U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
      U+2212, U+2215, U+FEFF, U+FFFD;
  }
}

/* ---- /assets/core/tokens.css ---- */
/* ==========================================================================
   MovieState — design tokens · "Obsidian & Signal"
   Single source of truth. Nothing outside this file may hard-code a colour,
   radius, shadow, spacing step or duration. PRD §5.
   ========================================================================== */

/* --- One @layer order for the whole site ---------------------------------- */
@layer tokens, reset, base, layout, components, pages, utilities;

@layer tokens {
  :root {
    /* Type ---------------------------------------------------------------- */
    --font-display: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Desktop/global type scale (mobile overrides live in base.css) -------- */
    --fs-3xl: 32px;
    --fs-2xl: 26px;
    --fs-xl: 20px;
    --fs-lg: 17px;
    --fs-md: 15px;
    --fs-sm: 13.5px;
    --fs-xs: 12.5px;

    --lh-tight: 1.15;
    --lh-snug: 1.35;
    --lh-copy: 1.8;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;

    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.08em;

    /* Spacing -------------------------------------------------------------- */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 64px;

    /* Radii ---------------------------------------------------------------- */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;

    /* Motion --------------------------------------------------------------- */
    /* A31: tokens that components already referenced but nobody had defined — their absence silently
       dropped whole declarations (no border, no shadow), which is how the action buttons lost their
       surface. Defined once here so a missing token can never erase a style again. */
    --r-xs: 6px;
    --maxw: var(--container);
    --card-radius: var(--r-md);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.35);
    --font-body: var(--font-ui);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --dur-hover: 180ms;
    --dur-panel: 320ms;
    --dur-fade: 180ms;
    --dur-tap: 96ms;

    /* Layout --------------------------------------------------------------- */
    --container: 1754px;
    --gutter: 32px;
    --header-h: 56px;
    /* the sticky pill bar parks directly under the header, safe-area included */
    --hdr: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    --rail-w: 72px;
    --tabbar-h: 56px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    --safe-t: env(safe-area-inset-top, 0px);

    /* Layers --------------------------------------------------------------- */
    --z-rail: 20;
    --z-header: 40;
    --z-tabbar: 45;
    --z-sheet: 60;
    --z-modal: 70;
    --z-toast: 80;
    --z-boot: 90;

    /* Focus ---------------------------------------------------------------- */
    --ring-w: 2px;
    --ring-offset: 2px;

    /* Motion keyframes shared by the shimmer language --------------------- */
    --shimmer-dur: 1.4s;
  }

  /* ====================== DARK — the default canvas ====================== */
  :root,
  :root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #06070a;
    --bg-2: #0c0e13;
    --surface: #111419;
    --surface-2: #171b22;
    --surface-3: #1e242c;
    --card: #12161c;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    --txt: #f2f5f8;
    --txt-2: #a7b0bc;
    --txt-3: #7a8391;   /* 13.7 — was #6b7483: 4.27:1 on #06070a, under WCAG AA. Now 5.26:1 */

    --accent: #ff3b4e;
    --accent-ink: #1a0407;
    --accent-soft: rgba(255, 59, 78, 0.14);
    --accent-ring: rgba(255, 59, 78, 0.45);

    --mint: #2dfc9c;
    --mint-ink: #04231a;
    --mint-soft: rgba(45, 252, 156, 0.14);

    --violet: #7c5cff;
    --violet-soft: rgba(124, 92, 255, 0.16);

    --gold: #f5c151;
    --gold-soft: rgba(245, 193, 81, 0.14);

    --danger: #ff5a5a;
    --ok: var(--mint);
    --warn: var(--gold);

    --scrim: linear-gradient(180deg, rgba(6, 7, 10, 0) 0%, rgba(6, 7, 10, 0.55) 45%, rgba(6, 7, 10, 0.94) 100%);
    --spotlight: radial-gradient(60% 50% at 50% 0%, rgba(255, 59, 78, 0.16) 0%, rgba(124, 92, 255, 0.08) 42%, rgba(6, 7, 10, 0) 72%);
    --glass: rgba(12, 14, 19, 0.72);
    --inner-stroke: inset 0 1px 0 rgba(255, 255, 255, 0.06);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45), 0 24px 64px rgba(0, 0, 0, 0.5);

    --grain-opacity: 0.02;
    --img-plate: linear-gradient(135deg, #1a1f27 0%, #12161c 100%);
  }

  /* ====================== LIGHT — warm paper ============================= */
  :root[data-theme="light"] {
    color-scheme: light;

    --bg: #f6f6f9;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f1f2f7;
    --surface-3: #e7e9f0;
    --card: #ffffff;
    --line: rgba(12, 12, 28, 0.1);
    --line-strong: rgba(12, 12, 28, 0.18);

    --txt: #101019;
    --txt-2: #4a4e5e;
    --txt-3: #686d7b;   /* 13.7 — was #787c8c: 3.85:1 on #f6f6f9, under WCAG AA. Now 4.79:1 */

    --accent: #d4061b;
    --accent-ink: #ffffff;
    --accent-text: #d41200;           /* accent-as-text on paper: 5.4:1 (the fill red is only 4.4:1) */
    --accent-soft: rgba(212, 6, 27, 0.1);
    --accent-ring: rgba(212, 6, 27, 0.4);

    --mint: #0b8f5e;
    --mint-ink: #ffffff;
    --mint-soft: rgba(11, 143, 94, 0.12);

    --violet: #5b32e8;
    --violet-soft: rgba(91, 50, 232, 0.1);

    --gold: #a66a00;
    --gold-soft: rgba(166, 106, 0, 0.12);

    --danger: #c1121f;
    --ok: var(--mint);
    --warn: var(--gold);

    --scrim: linear-gradient(180deg, rgba(246, 246, 249, 0) 0%, rgba(246, 246, 249, 0.6) 45%, rgba(246, 246, 249, 0.96) 100%);
    --spotlight: radial-gradient(60% 50% at 50% 0%, rgba(212, 6, 27, 0.1) 0%, rgba(91, 50, 232, 0.06) 42%, rgba(246, 246, 249, 0) 72%);
    --glass: rgba(255, 255, 255, 0.78);
    --inner-stroke: inset 0 1px 0 rgba(255, 255, 255, 0.9);

    --shadow-sm: 0 1px 2px rgba(16, 16, 25, 0.06), 0 2px 8px rgba(16, 16, 25, 0.06);
    --shadow-lg: 0 8px 24px rgba(16, 16, 25, 0.1), 0 24px 64px rgba(16, 16, 25, 0.12);

    --grain-opacity: 0;
    --img-plate: linear-gradient(135deg, #e7e9f0 0%, #f1f2f7 100%);
  }

  /* --- Gutter rhythm (PRD §5: 16 / 24 / 32) ------------------------------ */
  @media (max-width: 767px) {
    :root { --gutter: 16px; }
  }
  @media (min-width: 768px) and (max-width: 1023px) {
    :root { --gutter: 24px; }
  }
}

/* ==========================================================================
   Identity layer — amendment A9 (owner, 16 Nov 2026)
   Black + red is the common language; the *special* is a cool acid lime that no
   streaming brand owns, used only where it means something (active marker, rating,
   "new" badge). Never as body text on light — on paper it is a fill with ink text.
   ========================================================================== */
@layer tokens {
  :root,
  :root[data-theme="dark"] {
    --accent-2: #c8f751;          /* acid lime — the signature */
    --accent-2-ink: #10160a;      /* text that sits on the lime */
    --accent-2-soft: rgba(200, 247, 81, 0.14);
    --accent-2-line: rgba(200, 247, 81, 0.42);
    --header-glass: rgba(8, 9, 12, 0.72);
    --tabbar-glass: rgba(10, 11, 15, 0.86);
    --drawer-bg: #0b0d12;
    --backdrop: rgba(3, 4, 6, 0.62);
  }
  :root[data-theme="light"] {
    --accent-2: #6f8a00;          /* same hue, pushed to readable contrast on paper */
    --accent-2-ink: #ffffff;
    --accent-2-soft: rgba(111, 138, 0, 0.12);
    --accent-2-line: rgba(111, 138, 0, 0.34);
    --header-glass: rgba(250, 250, 253, 0.82);
    --tabbar-glass: rgba(255, 255, 255, 0.92);
    --drawer-bg: #ffffff;
    --backdrop: rgba(10, 12, 24, 0.38);
  }
}

/* ==========================================================================
   Identity v2 — amendment A10 (owner, 22:24, 16 Nov 2026)
   "Black + red is far too common." So each theme gets its own pairing:
     dark  canvas #06070A  ×  accent #A2FF00 (acid green)
     light canvas #FFFFFF  ×  accent #FF1900 (signal red)
   Both keep a two-colour signal system: --accent leads (buttons, active marker,
   brand), --accent-2 is the counter-signal (LIVE dot, NEW tag) so the palette never
   reads as one flat hue. Ink on accent is always chosen for a real contrast ratio.
   ========================================================================== */
@layer tokens {
  :root,
  :root[data-theme="dark"] {
    /* solid chrome: the top bar, the tab bar and the pill bar are OPAQUE. A translucent
       bar over posters read as "broken/transparent" on a real phone (Devid, 17 Nov). */
    --chrome-bg: #06070a;
    --chrome-line: rgba(255, 255, 255, 0.09);
    --chrome-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
    --line-2: rgba(255, 255, 255, 0.12);
    --accent-glow: rgba(162, 255, 0, 0.3);

    --accent: #a2ff00;                /* the brand hue — indicators, rules, dots */
    --accent-solid: #a2ff00;          /* the fill used behind ink (15.1:1 with #08130A) */
    --accent-ink: #08130a;            /* near-black text on the acid green */
    --accent-text: #a2ff00;           /* accent colour used AS text: 16.1:1 on the canvas */
    --accent-soft: rgba(162, 255, 0, 0.12);
    --accent-ring: rgba(162, 255, 0, 0.5);
    --accent-2: #ff2d46;              /* counter-signal: LIVE, NEW, alerts */
    --accent-2-ink: #ffffff;
    --accent-2-soft: rgba(255, 45, 70, 0.16);
    --accent-2-line: rgba(255, 45, 70, 0.45);
    --spotlight: radial-gradient(60% 50% at 50% 0%, rgba(162, 255, 0, 0.13) 0%, rgba(162, 255, 0, 0.04) 45%, rgba(6, 7, 10, 0) 72%);
  }
  :root[data-theme="light"] {
    --chrome-bg: #ffffff;
    --chrome-line: rgba(12, 12, 28, 0.1);
    --chrome-shadow: 0 10px 30px -18px rgba(16, 16, 25, 0.28);
    --line-2: rgba(12, 12, 28, 0.16);
    --accent-glow: rgba(230, 18, 0, 0.28);

    --accent: #ff1900;                /* the owner's exact signal red — non-text roles */
    --accent-solid: #e61200;          /* same hue, one step deeper: white ink now clears AA (4.65:1) */
    --accent-ink: #ffffff;
    --accent-text: #d41200;           /* accent-as-text on paper: 5.4:1 (the fill red is only 4.4:1) */
    --accent-soft: rgba(255, 25, 0, 0.09);
    --accent-ring: rgba(255, 25, 0, 0.38);
    --accent-2: #5f7a00;              /* readable olive-lime for tags on paper */
    --accent-2-ink: #ffffff;
    --accent-2-soft: rgba(95, 122, 0, 0.12);
    --accent-2-line: rgba(95, 122, 0, 0.34);
    --spotlight: radial-gradient(60% 50% at 50% 0%, rgba(255, 25, 0, 0.07) 0%, rgba(255, 25, 0, 0.02) 45%, rgba(255, 255, 255, 0) 72%);
  }
}

/* ---- /assets/core/base.css ---- */
/* ==========================================================================
   MovieState — reset + base typography + global primitives
   Mobile is the primary canvas (PRD §5.1): every size below is tuned on 390px
   first, then widened. No component styling lives here.
   ========================================================================== */

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

  * { margin: 0; }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
    -webkit-tap-highlight-color: transparent;
  }

  body {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    background: var(--bg);
    color: var(--txt);
    font-family: var(--font-ui);
    font-size: var(--fs-md);
    line-height: var(--lh-snug);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overscroll-behavior-y: none;
  }

  img, picture, video, canvas, svg { display: block; max-width: 100%; }
  img, video { height: auto; background: var(--img-plate); }
  svg { fill: currentColor; }

  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }

  a { color: inherit; text-decoration: none; }

  ul, ol { list-style: none; padding: 0; }

  table { border-collapse: collapse; width: 100%; }

  :where(h1, h2, h3, h4, h5, h6) {
    font-family: var(--font-display);
    font-weight: var(--fw-black);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
    text-wrap: balance;
  }

  p { text-wrap: pretty; }

  /* Keyboard focus is always visible, never on mouse click (PRD §5). */
  :focus { outline: none; }
  :focus-visible {
    outline: var(--ring-w) solid var(--accent);
    outline-offset: var(--ring-offset);
    border-radius: var(--r-sm);
  }

  ::selection {
    /* A10 rule: a fill that carries text uses --accent-solid, so white stays at 4.72:1 in light */
    background: var(--accent-solid);
    color: var(--accent-ink);
  }

  /* Scrollbars: dark-aware, unobtrusive, never a layout jump. */
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
  }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-track { background: transparent; }
  *::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: var(--r-pill);
    border: 3px solid var(--bg);
  }
  *::-webkit-scrollbar-thumb:hover { background: var(--txt-3); }
}

@layer base {
  /* ---- Type scale: mobile 28/22/18/16/14/12.5 → desktop 32/26/20/17/15/13.5 */
  h1, .t-3xl {
    font-size: clamp(28px, 1.2vw + 24px, var(--fs-3xl));
  }
  h2, .t-2xl {
    font-size: clamp(22px, 0.9vw + 19px, var(--fs-2xl));
  }
  h3, .t-xl {
    font-size: clamp(18px, 0.5vw + 16px, var(--fs-xl));
  }
  h4, .t-lg {
    font-size: clamp(16px, 0.35vw + 15px, var(--fs-lg));
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-normal);
  }
  body, .t-md { font-size: clamp(15px, 0.2vw + 14.5px, var(--fs-md)); }
  .t-sm { font-size: clamp(14px, 0.2vw + 13.5px, var(--fs-sm)); }
  .t-xs { font-size: var(--fs-xs); }

  .t-copy { line-height: var(--lh-copy); }
  .t-muted { color: var(--txt-2); }
  .t-faint { color: var(--txt-3); }
  .t-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .t-eyebrow {
    font-family: var(--font-ui);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--txt-3);
  }
  .t-num { font-variant-numeric: tabular-nums; }

  /* ---- Layout primitives ------------------------------------------------ */
  .container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .container-wide { max-width: none; }

  .stack { display: flex; flex-direction: column; }
  .row { display: flex; align-items: center; }
  .row-between { display: flex; align-items: center; justify-content: space-between; }
  .row-gap-2 { gap: var(--sp-2); }
  .row-gap-3 { gap: var(--sp-3); }
  .row-gap-4 { gap: var(--sp-4); }

  /* ---- Surface primitives (no component may re-invent these) ------------ */
  .surface {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm), var(--inner-stroke);
  }
  .hairline { border-top: 1px solid var(--line); }

  .scrim-bottom { background: var(--scrim); }

  /* Signature: radial spotlight wash behind the hero only (PRD §5).
     `overflow: clip` keeps the bleed from creating horizontal scroll. Rule: a .spotlight
     container never wraps a sticky/fixed bar, so clipping stays invisible. */
  .spotlight { position: relative; isolation: isolate; overflow: clip; }
  .spotlight::before {
    content: "";
    position: absolute;
    inset: -10% -20% auto -20%;
    height: min(680px, 70vw);
    background: var(--spotlight);
    z-index: -1;
    pointer-events: none;
  }

  /* Signature: film grain, dark mode only, 2% (token-driven). */
  .grain { position: relative; }
  .grain::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    z-index: 1;
  }

  /* ---- Shimmer skeleton language (one site-wide, PRD §5) ---------------- */
  .skeleton {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: var(--r-md);
    color: transparent;
  }
  .skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    animation: ms-shimmer var(--shimmer-dur) var(--ease) infinite;
  }
  @keyframes ms-shimmer { to { transform: translateX(100%); } }

  /* ---- Touch contract: 44px floor (PRD §5.1.2) -------------------------- */
  .tap {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* ---- Utilities -------------------------------------------------------- */
  .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .skip-link {
    position: absolute;
    top: -100px;
    left: 8px;
    z-index: var(--z-toast);
    /* A10 rule: a fill that carries text uses --accent-solid, so white stays at 4.72:1 in light */
    background: var(--accent-solid);
    color: var(--accent-ink);
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: var(--r-md);
    font-weight: var(--fw-semibold);
    transition: top var(--dur-hover) var(--ease);
  }
  .skip-link:focus-visible { top: calc(var(--safe-t) + 8px); }

  .no-scroll { overflow: hidden; }

  .fade-in { animation: ms-fade calc(var(--dur-fade) * 2) var(--ease) both; }
  @keyframes ms-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* ---- Reduced motion: keep opacity, drop transforms (PRD §5) ---------- */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    .skeleton::after { animation: none; opacity: 0.35; }
  }

  /* ---- Print: nothing but the words ----------------------------------- */
  @media print {
    body { background: #fff; color: #000; }
    .skeleton::after, .grain::after, .spotlight::before { display: none; }
  }
}

/* ==========================================================================
   P11 — mobile safety net. Every surface already lays itself out with grid and
   clamp(), so this block only covers the three things that break a page on a
   360px phone regardless of layout: media wider than its container, a long
   unbroken word (a title like "Don't Look Now…" or a URL), and a table.
   ========================================================================== */
img, svg, video, iframe, canvas, picture { max-width: 100%; }
iframe { border: 0; }
h1, h2, h3, h4, .card__title, .dt-title { overflow-wrap: anywhere; }
table { max-width: 100%; }

/* a scroll container is the correct answer for a wide table, never a squeezed one */
.ms-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

/* ── Ad containers ────────────────────────────────────────────────────────────────────────────────
   Devid's rule, and the last word on it: an ad renders exactly as the network's own code says. No scaling, no
   clipping, no forced height, and no scroll box either. The slot is a plain block that gives the banner its
   space and otherwise stays out of the way. */
ms-slot {
  display: block;
  max-width: 100%;
  margin-block: 18px;
  margin-inline: auto;
}
ms-slot:empty { display: none; }
ms-slot iframe { border: 0; }
ms-slot img { display: block; }

/* ---- /assets/core/nav-feedback.css ---- */
/* ==========================================================================
   P11 — Navigation feedback.

   The site is a multi-page app on a static host: a click means a real document
   request, and on a phone that is 300-900 ms of nothing. Before this sheet the
   page changed colour under the cursor and then sat still, so a visitor pressed
   again, or thought the button was broken. Now every navigation answers within
   one frame: a brand-coloured progress bar, the page dims, and the control that
   was pressed shows a busy state. All of it is removed by the new document.
   ========================================================================== */

html[data-nav="1"]::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 2147483000;
  background: linear-gradient(90deg, var(--accent-solid), var(--mint), var(--accent-solid));
  background-size: 220% 100%;
  animation: msNavBar 1.15s linear infinite;
  pointer-events: none;
}

html[data-nav="1"]::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2147482999;
  background: var(--accent-soft);
  pointer-events: none;
}

@keyframes msNavBar {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

/* the page that is being left recedes instead of vanishing: no flash of white, no sudden jump */
html[data-nav="1"] body {
  opacity: .62;
  transition: opacity .16s var(--ease, ease);
  cursor: progress;
}

/* the control the visitor actually pressed */
.is-busy {
  position: relative;
  cursor: progress !important;
  opacity: .72;
}

a.is-busy::after,
button.is-busy::after {
  content: "";
  position: absolute;
  inset: auto 6px 6px auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent-solid);
  border-right-color: transparent;
  animation: msBusySpin .7s linear infinite;
}

@keyframes msBusySpin { to { transform: rotate(360deg); } }

/* Posters fade in once decoded, so a grid never pops into place row by row.
   They are visible by default on purpose: a poster must never depend on JavaScript having run. If the
   script is blocked, slow or broken, the artwork still shows; the class only adds the entrance. */
.card__img { opacity: 1; }

.card__img.is-loaded { animation: msImgIn .3s var(--ease, ease) both; }

@keyframes msImgIn {
  from { opacity: .35; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-nav="1"]::before { animation: none; background: var(--accent-solid); }
  html[data-nav="1"] body { opacity: 1; }
  .card__img { opacity: 1; }
  a.is-busy::after, button.is-busy::after { animation: none; }
}

/* ---------- the feed answers a chip in the same frame ---------- */
@keyframes msCardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* a skeleton card occupies the same box as a real card, so the grid never jumps height */
.card--sk { pointer-events: none; }
.card--sk .card__title,
.card--sk .card__meta { display: block; }

/* while a genre is loading, the chips stop accepting taps: one press, one result */
.chip-row[aria-busy="true"] .chip { opacity: .55; pointer-events: none; }
.chip-row[aria-busy="true"] { cursor: progress; }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none !important; }
}

/* a freshly swapped grid enters as one movement */
.card--enter { animation: msCardIn .3s ease both; }
@media (prefers-reduced-motion: reduce) { .card--enter { animation: none; } }

/* ---- /assets/core/components.css ---- */
/* ==========================================================================
   MovieState — component layer (PRD 1.1 / §5.1: every component ships with
   default · hover · active · focus-visible · disabled · loading · empty)
   Tokens only. Mobile-first: the 390 canvas is the design, 768/1440 adapt.
   States are declared twice on purpose — once for real user input (:hover,
   :active, :focus-visible, :disabled) and once for the design sheet, which has
   to render all seven states side by side via [data-state].
   ========================================================================== */
@layer components {
  /* ---------------------------------------------------------------- Btn --- */
  .btn {
    --btn-bg: var(--surface-2);
    --btn-fg: var(--txt);
    --btn-bd: var(--line);
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-4);
    border: 1px solid var(--btn-bd); border-radius: var(--r-sm);
    background: var(--btn-bg); color: var(--btn-fg);
    font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold);
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform var(--dur-tap) var(--ease), background var(--dur-hover) var(--ease),
      border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
  }
  .btn svg { width: 18px; height: 18px; flex: none; }
  .btn:hover { background: var(--surface-3); border-color: var(--line-strong); }
  .btn:active { transform: scale(0.975); }
  .btn:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
  .btn--primary { --btn-bg: var(--accent-solid); --btn-fg: var(--accent-ink); --btn-bd: transparent; }
  .btn--primary:hover { background: var(--accent-solid); filter: brightness(1.08); }
  .btn--ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--txt-2); }
  .btn--ghost:hover { background: var(--surface-2); color: var(--txt); }
  .btn--danger { --btn-bg: transparent; --btn-bd: var(--danger); --btn-fg: var(--danger); }
  .btn--danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
  .btn--sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
  .btn--icon { width: 44px; padding: 0; flex: none; }
  .btn--block { width: 100%; }
  .btn--loading { color: transparent !important; pointer-events: none; }
  .btn--loading::after {
    content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-top-color: transparent;
    color: var(--btn-fg); animation: ms-spin 700ms linear infinite;
  }
  @keyframes ms-spin { to { transform: rotate(360deg); } }

  /* --------------------------------------------------------- Pill / Chip --- */
  .pill {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 36px; padding: 0 14px; border-radius: var(--r-pill);
    border: 1px solid var(--line); background: var(--surface);
    color: var(--txt-2); font-size: var(--fs-xs); font-weight: var(--fw-medium);
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease);
  }
  .pill:hover { color: var(--txt); border-color: var(--line-strong); background: var(--surface-2); }
  .pill:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .pill[aria-selected="true"], .pill[aria-pressed="true"], .pill--active {
    background: var(--accent-solid); color: var(--accent-ink); border-color: var(--accent-solid);
  }
  .pill[disabled], .pill[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
  .pill__count { font-variant-numeric: tabular-nums; opacity: 0.6; font-size: 11px; }

  /* ------------------------------------------------------------ Pill bar --- */
  /* Home chips and catalogue genres are the same component: one row of premium pills that
     scrolls sideways under the header. The catalogue used to render a block of wrapping
     ovals (display:block, no scroll) — that is the "scattered pills" defect Devid saw. */
  .pills {
    position: sticky; top: var(--hdr); z-index: 30;
    display: flex; align-items: center; gap: 8px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 10px var(--gutter);
    background: var(--chrome-bg);
    border-bottom: 1px solid var(--chrome-line);
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity;
    /* without this the first pill snaps to the container edge and eats the gutter */
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }
  .pills::-webkit-scrollbar { display: none; height: 0; }
  /* markup compatibility: the home feed wraps its chips in .chip-row, the catalogue does not */
  .pills .chip-row { display: contents; }
  .pills .pill, .pills .chip {
    flex: none; scroll-snap-align: start;
    min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
    background: var(--surface); border: 1px solid var(--line); color: var(--txt-2);
    font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
    transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease),
                border-color var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease);
  }
  .pills .pill:hover, .pills .chip:hover {
    background: var(--surface-2); color: var(--txt); border-color: var(--line-strong); transform: translateY(-1px);
  }
  .pills .pill:active, .pills .chip:active { transform: scale(0.97); }
  .pills .pill[aria-current="page"], .pills .pill[aria-selected="true"], .pills .chip[aria-selected="true"] {
    background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-ink);
    box-shadow: 0 8px 20px -12px var(--accent-glow);
  }
  .pills .pill[aria-current="page"]:hover, .pills .chip[aria-selected="true"]:hover { color: var(--accent-ink); }
  @media (max-width: 1023px) {
    .pills .pill, .pills .chip { min-height: 44px; }
  }
  /* PRD §5.1.2 touch contract: 44x44 minimum. Under 1024 the pointer is a thumb. */
  @media (max-width: 1023px) {
    .pill, .chip { min-height: 44px; min-width: 44px; }
    .chip { padding: 0 14px; }
    .btn--sm { min-height: 44px; }
    .btn--icon { width: 44px; min-width: 44px; }
  }

  .chip {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 32px; padding: 0 10px; border-radius: var(--r-sm);
    background: var(--surface-2); color: var(--txt-2);
    font-size: var(--fs-xs); font-weight: var(--fw-medium); text-decoration: none;
    border: 1px solid transparent; cursor: pointer;
    transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
  }
  .chip:hover { color: var(--txt); background: var(--surface-3); }
  .chip:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .chip--accent { background: var(--accent-soft); color: var(--accent); }
  .chip[disabled] { opacity: 0.4; pointer-events: none; }

  /* --------------------------------------------------------------- Badge --- */
  .badge {
    display: inline-flex; align-items: center; gap: 5px;
    min-height: 20px; padding: 0 7px; border-radius: 5px;
    font-size: 11px; font-weight: var(--fw-bold); letter-spacing: 0.06em; text-transform: uppercase;
    background: rgba(0, 0, 0, 0.62); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
  .badge--live { background: var(--accent-2); color: var(--accent-2-ink); border-color: transparent; }
  .badge--new { background: var(--accent-solid); color: var(--accent-ink); border-color: transparent; }
  .badge--hdr { background: rgba(0, 0, 0, 0.62); color: var(--accent); border-color: var(--accent-2-line); }
  .badge__dot {
    width: 6px; height: 6px; border-radius: 50%; background: currentColor;
    animation: ms-live 1.8s var(--ease) infinite;
  }
  @keyframes ms-live { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.82); } }

  /* -------------------------------------------------------------- Rating --- */
  .rating { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--txt-2); }
  .rating__stars { position: relative; display: inline-block; line-height: 0; }
  .rating__stars svg { width: 13px; height: 13px; }
  .rating__base { color: var(--line-strong); }
  .rating__fill {
    position: absolute; inset: 0; overflow: hidden; color: var(--accent); white-space: nowrap;
    width: calc(var(--rating, 0) * 100%);
  }
  .rating__value { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); color: var(--txt); }

  /* ---------------------------------------------------------------- Card --- */
  .card {
    position: relative; display: block; text-decoration: none; color: inherit;
    border-radius: var(--r-md); outline: none;
    -webkit-tap-highlight-color: transparent;
  }
  .card__media {
    display: block; position: relative; overflow: hidden; border-radius: var(--r-md);
    background: var(--img-plate); aspect-ratio: 2 / 3;
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
  }
  .card--16x9 .card__media { aspect-ratio: 16 / 9; }
  .card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .card__img--fallback { display: grid; place-items: center; color: var(--txt-3); font-size: var(--fs-xs); }
  .card__scrim {
    position: absolute; inset: 0; opacity: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.55) 100%);
    transition: opacity var(--dur-hover) var(--ease);
  }
  .card__tl, .card__br { position: absolute; display: flex; gap: 5px; }
  .card__tl { top: 8px; left: 8px; }
  .card__br { bottom: 8px; right: 8px; }
  .card__duration {
    padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: var(--fw-semibold);
    background: rgba(0, 0, 0, 0.72); color: #fff; font-variant-numeric: tabular-nums;
  }
  .card__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.22); }
  .card__progress span { display: block; height: 100%; background: var(--accent); }
  .card__body { padding: var(--sp-2) 2px 0; display: grid; gap: 3px; }
  .card__title {
    font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1.28; color: var(--txt);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .card__meta {
    display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--txt-3); }
  .card__meta i { font-style: normal; opacity: 0.5; }
  .card:hover .card__media { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .card:hover .card__scrim { opacity: 1; }
  .card:hover .card__title { color: var(--accent); }
  .card:active .card__media { transform: scale(0.985); }
  .card:focus-visible { box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .card:focus-visible .card__media { box-shadow: var(--shadow-lg); }
  /* the card is one link: there is deliberately no CTA slot above or below it (A10) */

  /* ---------------------------------------------------------------- Rail --- */
  .rail { display: grid; gap: var(--sp-3); }
  .rail__head { display: flex; align-items: center; gap: var(--sp-3); }
  .rail__title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-bold); letter-spacing: var(--tracking-tight); }
  .rail__more {
    margin-left: auto; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--txt-2);
    text-decoration: none; min-height: 44px; min-width: 44px; padding: 0 4px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .rail__more:hover { color: var(--accent); }
  .rail__track {
    display: grid; grid-auto-flow: column; grid-auto-columns: 42vw; gap: var(--sp-3);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; padding-bottom: 4px;
    scrollbar-width: none;
  }
  .rail__track::-webkit-scrollbar { display: none; }
  .rail__track > * { scroll-snap-align: start; }
  @media (min-width: 640px) { .rail__track { grid-auto-columns: 176px; gap: var(--sp-4); } }
  @media (min-width: 1024px) { .rail__track { grid-auto-columns: 196px; } }

  /* ------------------------------------------------------------ Skeleton --- */
  .sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); }
  .sk::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--txt) 7%, transparent) 45%, transparent 90%);
    background-size: 200% 100%; animation: ms-shimmer 1.4s linear infinite;
  }
  @keyframes ms-shimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
  .sk--poster { aspect-ratio: 2 / 3; border-radius: var(--r-md); }
  .sk--16x9 { aspect-ratio: 16 / 9; border-radius: var(--r-md); }
  .sk--line { height: 12px; }
  .sk--line-sm { height: 10px; width: 55%; }
  .sk--chip { height: 30px; width: 84px; border-radius: var(--r-pill); }
  .sk--btn { height: 44px; width: 132px; }
  @media (prefers-reduced-motion: reduce) { .sk::after, .badge__dot { animation: none; } }

  /* --------------------------------------------------- Empty / Error state --- */
  .state {
    display: grid; justify-items: center; gap: var(--sp-2); text-align: center;
    padding: var(--sp-6) var(--sp-4); border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 60%, transparent);
  }
  .state__icon {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    background: var(--surface-2); color: var(--txt-3);
  }
  .state__icon svg { width: 22px; height: 22px; }
  .state__title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
  .state__body { font-size: var(--fs-xs); color: var(--txt-3); max-width: 34ch; line-height: 1.6; }
  .state--error { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
  .state--error .state__icon { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

  /* --------------------------------------------------------------- Toast --- */
  .toast {
    display: inline-flex; align-items: center; gap: var(--sp-3);
    min-height: 44px; padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-3);
    border-radius: var(--r-md); background: var(--surface-3); color: var(--txt);
    border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
    font-size: var(--fs-sm); max-width: min(92vw, 420px);
  }
  .toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: none; }
  .toast--ok .toast__dot { background: var(--ok); }
  .toast--warn .toast__dot { background: var(--warn); }
  .toast--error .toast__dot { background: var(--danger); }
  .toast__close { margin-left: auto; }

  /* ---------------------------------------------------------------- Hero --- */
  /* The one place with a primary CTA is the hero — cards stay single links (A10). */
  .hero {
    position: relative; display: grid; align-items: end; width: 100%;
    min-height: 62svh; border-radius: var(--r-lg); overflow: hidden;
    background: var(--img-plate); isolation: isolate;
  }
  .hero__media { position: absolute; inset: 0; z-index: -2; }
  .hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
  .hero__scrim {
    position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(180deg, rgba(6,7,10,0.15) 0%, rgba(6,7,10,0.35) 42%, rgba(6,7,10,0.92) 100%),
      linear-gradient(90deg, rgba(6,7,10,0.85) 0%, rgba(6,7,10,0.15) 62%, transparent 100%);
  }
  .hero__inner {
    position: relative; display: grid; gap: var(--sp-2); padding: var(--sp-5) var(--sp-4) var(--sp-5);
    color: #fff; max-width: 640px;
  }
  .hero__eyebrow { display: flex; align-items: center; gap: var(--sp-2); }
  .hero__title {
    font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.03;
    font-size: clamp(1.9rem, 7.2vw, 3.4rem); color: #fff; text-wrap: balance;
  }
  .hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: var(--fs-xs); color: rgba(255,255,255,0.82); }
  .hero__meta i { font-style: normal; opacity: 0.45; }
  .hero__synopsis {
    font-size: var(--fs-sm); line-height: 1.62; color: rgba(255,255,255,0.78); max-width: 52ch;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .hero__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
  /* 10.2e — a lone hero CTA must look like a button, not a bar: its own width on desktop, full width on phones */
  .hero__actions .btn { flex: 0 0 auto; min-width: 184px; }
  @media (max-width: 560px) { .hero__actions .btn { flex: 1 1 100%; min-width: 0; } }
  .hero .badge, .hero .hero__meta .rating__value { color: #fff; }
  .hero__poster { display: none; }
  .hero--poster-only .hero__media img { object-fit: cover; filter: blur(2px) brightness(0.55); }
  .hero:hover .hero__media img { transform: scale(1.02); }
  .hero__media img { transition: transform 900ms var(--ease); }
  .hero--loading { min-height: 62svh; background: var(--surface-2); }
  @media (max-width: 767px) {
    /* the skeleton must occupy the same box as the real hero or the LCP jumps */
    .hero--loading { aspect-ratio: 4 / 5; min-height: 0; max-height: 84svh; }
  }
  @media (min-width: 768px) {
    .hero { min-height: 46svh; }
    .hero__inner { padding: var(--sp-6) var(--sp-5); }
  }
  /* mobile: 16:9 art is wrong for a phone — 4:5 crop framed on the face box */
  @media (max-width: 767px) {
    .hero { min-height: 0; aspect-ratio: 4 / 5; max-height: 84svh; align-items: end; }
    .hero__media img { object-position: center 18%; }
  }

  /* ---------------------------------------------------------- Bottom sheet --- */
  .bsheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet);
    display: flex; flex-direction: column;
    max-height: 85svh; /* PRD §5.1.2 */
    background: var(--surface); color: var(--txt);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -20px 60px rgba(0,0,0,0.45);
    padding-bottom: var(--safe-b);
    transform: translateY(0); transition: transform var(--dur-hover) var(--ease);
  }
  .bsheet[data-open="false"] { transform: translateY(102%); }
  .bsheet__grab { display: grid; place-items: center; height: 22px; flex: none; }
  .bsheet__grab span { width: 38px; height: 4px; border-radius: 2px; background: var(--line-strong); }
  .bsheet__head { flex: none; display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-2); }
  .bsheet__title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: var(--fw-bold); }
  .bsheet__body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 var(--sp-4) var(--sp-4);
  }
  .bsheet__foot {
    flex: none; display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  }
  .bsheet__foot .btn { flex: 1; }
  .scrim {
    position: fixed; inset: 0; z-index: calc(var(--z-sheet) - 1);
    background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    opacity: 1; transition: opacity var(--dur-hover) var(--ease);
  }
  .scrim[data-open="false"] { opacity: 0; pointer-events: none; }

  /* ---------------------------------------------------------------- Modal --- */
  .modal {
    position: fixed; inset: 0; z-index: var(--z-sheet); display: grid; place-items: center;
    padding: var(--sp-4);
  }
  .modal__panel {
    position: relative; display: flex; flex-direction: column;
    width: min(100%, 560px); max-height: 82svh;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden;
  }
  .modal__head { flex: none; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
  .modal__title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: var(--fw-bold); }
  .modal__close { margin-left: auto; }
  .modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-4); font-size: var(--fs-sm); color: var(--txt-2); line-height: 1.65; }
  .modal__foot { flex: none; display: flex; gap: var(--sp-2); justify-content: flex-end; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }
  /* PRD: never a centred modal on mobile — it becomes a bottom sheet */
  @media (max-width: 767px) {
    .modal { align-items: end; padding: 0; }
    .modal__panel {
      width: 100%; max-height: 85svh; border-radius: var(--r-lg) var(--r-lg) 0 0;
      border-left: 0; border-right: 0; border-bottom: 0; padding-bottom: var(--safe-b);
    }
    .modal__foot { position: sticky; bottom: 0; background: var(--surface); }
  }

  /* ----------------------------------------------------------------- Tabs --- */
  .tabs {
    display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none;
    min-width: 0; max-width: 100%;
    border-bottom: 1px solid var(--line); position: relative; scroll-behavior: smooth;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 var(--sp-3); border: 0; background: none; cursor: pointer;
    color: var(--txt-2); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold);
    white-space: nowrap; transition: color var(--dur-hover) var(--ease);
  }
  .tab:hover { color: var(--txt); }
  .tab[aria-selected="true"] { color: var(--txt); }
  .tab[aria-selected="true"]::after {
    content: ''; position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: -1px; height: 3px;
    border-radius: 2px 2px 0 0; background: var(--accent);
  }
  .tab:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); border-radius: var(--r-sm); }
  .tab[disabled] { opacity: 0.4; pointer-events: none; }
  .tab__count { margin-left: 6px; font-size: 11px; opacity: 0.65; font-variant-numeric: tabular-nums; }

  /* ----------------------------------------------------------- Breadcrumbs --- */
  .crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: var(--fs-xs); color: var(--txt-3); }
  .crumbs ol { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; min-width: 0; overflow: hidden; flex-wrap: nowrap; }
  .crumbs li { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto; }
  /* narrowest phones: keep the root and the leaf, drop the intermediate trail rather than clip it */
  @media (max-width: 359px) {
    .crumbs li:not(:first-child):not(:last-child) { display: none; }
  }
  .crumbs a {
    color: var(--txt-2); text-decoration: none; padding: 0 4px; min-height: 32px;
    display: inline-flex; align-items: center; border-radius: var(--r-xs);
    max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .crumbs a:hover { color: var(--accent); }
  .crumbs a:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .crumbs__sep { opacity: 0.4; font-size: 11px; }
  @media (max-width: 1023px) {
    .crumbs a, .crumbs [aria-current="page"] { min-height: 44px; min-width: 44px; justify-content: center; }
  }
  .crumbs [aria-current="page"] {
    color: var(--txt); font-weight: var(--fw-medium); padding: 0 4px;
    max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* ------------------------------------------------------------- LoadMore --- */
  .loadmore { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-4) 0; }
  .loadmore__note { font-size: var(--fs-xs); color: var(--txt-2); font-variant-numeric: tabular-nums; }
  /* A23 + A24 — the paging control. At rest it is a quiet, premium outline: no deep slab,
     just a hairline in the theme accent and an accent label that already reads as pressable.
     On hover / keyboard focus it fills with the theme accent and flips its ink, so the whole
     affordance becomes the brand colour — lime in dark, signal red in light — with a soft
     glow and a 1px lift. Everything eases over 220ms so the fill sweeps in rather than snaps. */
  .loadmore .btn, .feed-foot .btn {
    min-width: 216px; min-height: 48px;
    --btn-bg: transparent; --btn-bd: color-mix(in oklab, var(--accent-solid) 42%, transparent); --btn-fg: var(--accent-text);
    background: transparent;
    border: 1px solid color-mix(in oklab, var(--accent-solid) 42%, transparent);
    color: var(--accent-text);             /* dark: lime 16.1:1 · light: #D41200 5.4:1 on paper */
    font-weight: var(--fw-semibold);
    letter-spacing: 0.01em;
    box-shadow: 0 0 0 0 transparent;
    transition:
      background-color 220ms var(--ease),
      border-color 220ms var(--ease),
      color 220ms var(--ease),
      box-shadow 260ms var(--ease),
      transform 220ms var(--ease);
  }
  .loadmore .btn:hover, .feed-foot .btn:hover,
  .loadmore .btn:focus-visible, .feed-foot .btn:focus-visible {
    background: var(--accent-solid);
    border-color: var(--accent-solid);
    color: var(--accent-ink);              /* dark: #08130A on lime 15.1:1 · light: white 4.65:1 */
    transform: translateY(-1px);
    box-shadow: 0 8px 22px -10px var(--accent-glow), 0 0 0 1px color-mix(in oklab, var(--accent-solid) 40%, transparent);
  }
  .loadmore .btn:active, .feed-foot .btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 10px -6px var(--accent-glow);
    transition-duration: 90ms;
  }
  .loadmore .btn:disabled, .loadmore .btn[aria-busy="true"], .feed-foot .btn:disabled { opacity: 0.55; }
  .loadmore[data-exhausted="true"] .btn { display: none; }

  /* --------------------------------------------------------------- Table --- */
  .table-wrap { min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
  .table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
  .table caption { text-align: left; padding: var(--sp-3) var(--sp-3) 0; font-size: var(--fs-xs); color: var(--txt-3); }
  .table th {
    position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap;
    font-weight: var(--fw-semibold); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--txt-3); background: var(--surface-2); padding: var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--line);
  }
  .table td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); color: var(--txt-2); }
  .table tbody tr:last-child td { border-bottom: 0; }
  .table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--txt); }
  .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
  .table td strong { color: var(--txt); font-weight: var(--fw-semibold); }
  .table__empty td { text-align: center; color: var(--txt-3); padding: var(--sp-5) var(--sp-3); }
  @media (max-width: 1023px) { .table td, .table th { padding: var(--sp-3); height: 44px; } }

  /* ------------------------------------------------------------- StatRow --- */
  .stats { display: grid; gap: var(--sp-2); }
  .stats--grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-3); }
  .stat {
    display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
    padding: var(--sp-2) 0; border-bottom: 1px dashed var(--line);
  }
  .stats--grid .stat { flex-direction: column; align-items: flex-start; gap: 4px; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); border-bottom: 1px solid var(--line); }
  .stat__label { font-size: var(--fs-xs); color: var(--txt-3); }
  .stat__value { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--txt); font-variant-numeric: tabular-nums; }
  .stat__value--empty { color: var(--txt-3); font-weight: var(--fw-regular); }
  .stat__delta { font-size: 11px; font-weight: var(--fw-semibold); }
  .stat__delta--up { color: var(--ok); }
  .stat__delta--down { color: var(--danger); }
  .stat--loading .stat__value { width: 56px; height: 13px; border-radius: 4px; }

  /* ---------------------------------------------------------- ServerList --- */
  .servers { display: grid; gap: var(--sp-2); }
  .server {
    display: flex; align-items: center; gap: var(--sp-2); width: 100%;
    min-height: 48px; padding: var(--sp-2) var(--sp-3); text-align: left;
    background: var(--surface); color: var(--txt); border: 1px solid var(--line);
    border-radius: var(--r-md); font: inherit; font-size: var(--fs-sm); cursor: pointer;
    transition: border-color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
  }
  .server:hover { border-color: var(--line-strong); background: var(--surface-2); }
  .server:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .server[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
  .server[disabled] { opacity: 0.45; pointer-events: none; }
  .server__name { font-weight: var(--fw-semibold); }
  .server__meta { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); font-size: 11px; color: var(--txt-3); font-variant-numeric: tabular-nums; }
  .server__signal { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
  .server__signal i { width: 3px; border-radius: 1px; background: var(--line-strong); }
  .server__signal i:nth-child(1) { height: 4px; } .server__signal i:nth-child(2) { height: 7px; } .server__signal i:nth-child(3) { height: 10px; }
  .server[data-health="good"] .server__signal i { background: var(--ok); }
  .server[data-health="ok"] .server__signal i:nth-child(3) { background: transparent; }
  .server[data-health="ok"] .server__signal i:nth-child(-n+2) { background: var(--warn); }
  .server[data-health="poor"] .server__signal i:nth-child(n+2) { background: transparent; }
  .server[data-health="poor"] .server__signal i:nth-child(1) { background: var(--danger); }

  /* --------------------------------------------------------- ChannelTile --- */
  .channel {
    position: relative; display: grid; gap: var(--sp-2); padding: var(--sp-3);
    border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
    text-decoration: none; color: inherit; min-height: 96px;
    transition: transform var(--dur-tap) var(--ease), border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
  }
  .channel:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
  .channel:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .channel__head { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
  .channel__logo {
    width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: var(--r-xs);
    background: var(--surface-3); color: var(--txt-2); font-size: 11px; font-weight: var(--fw-bold); overflow: hidden;
  }
  .channel__logo img { width: 100%; height: 100%; object-fit: contain; }
  .channel__name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .channel__foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--txt-3); }
  .channel[data-state="offline"] { opacity: 0.6; }
  .channel[data-state="loading"] { min-height: 96px; }

  /* ----------------------------------------------------------- EventCard --- */
  .event {
    display: grid; gap: var(--sp-2); padding: var(--sp-3);
    border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
    text-decoration: none; color: inherit;
    transition: border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
  }
  .event:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
  .event:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .event__top { display: flex; align-items: center; gap: var(--sp-2); }
  .event__league { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--txt-3); }
  .event__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-2); }
  .event__team { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); min-width: 0; }
  .event__team--away { justify-content: flex-end; text-align: right; }
  .event__team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .event__crest { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--surface-3); }
  .event__vs { font-size: 11px; color: var(--txt-3); font-weight: var(--fw-semibold); }
  .event__foot { display: flex; align-items: center; gap: var(--sp-2); font-size: 11px; color: var(--txt-3); font-variant-numeric: tabular-nums; }
  .event__foot time { color: var(--txt-2); font-weight: var(--fw-semibold); }

  /* -------------------------------------------------------------- AdSlot --- */
  /* Zero chrome of our own. Empty slots are not rendered at all (PRD §7.2), so this
     rule is the belt to the JS braces: if a slot ever reaches the DOM empty, it dies. */
  .adslot { display: contents; }
  .adslot[data-empty="true"], .adslot:empty { display: none !important; }
  .adslot--debug {
    display: grid; place-items: center; min-height: 90px; border: 1px dashed var(--line-strong);
    border-radius: var(--r-sm); color: var(--txt-3); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  }

  /* --------------------------------------------------------- Player shell --- */
  .player {
    position: relative; display: grid; width: 100%; border-radius: var(--r-md); overflow: hidden;
    background: #000; aspect-ratio: 16 / 9; color: #fff; isolation: isolate;
  }
  .player__poster { position: absolute; inset: 0; z-index: -2; }
  .player__poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
  .player__center { position: absolute; inset: 0; display: grid; place-items: center; }
  .player__play {
    width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; background: var(--accent-solid); color: var(--accent-ink);
    box-shadow: 0 8px 30px rgba(0,0,0,0.45); transition: transform var(--dur-tap) var(--ease);
  }
  .player__play svg { width: 26px; height: 26px; }
  .player__play:hover { transform: scale(1.06); }
  .player__play:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring), 0 8px 30px rgba(0,0,0,0.45); }
  .player__bar {
    position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 6px;
    padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + var(--safe-b));
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.82));
  }
  .player__seek { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); overflow: hidden; }
  .player__seek span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 2px; }
  .player__controls { display: flex; align-items: center; gap: var(--sp-2); font-size: 11px; font-variant-numeric: tabular-nums; }
  .player__controls .btn { --btn-bg: transparent; --btn-bd: transparent; color: #fff; }
  .player__controls .btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
  .player__time { color: rgba(255,255,255,0.8); }
  .player__spacer { margin-left: auto; }
  .player--loading .player__center { gap: var(--sp-3); }
  .player__spinner {
    width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.25);
    border-top-color: var(--accent); animation: ms-spin 800ms linear infinite;
  }
  @media (prefers-reduced-motion: reduce) { .player__spinner { animation: none; } }

  /* --------------------------------------------------------------- Footer --- */
  .footer {
    margin-top: var(--sp-7); padding: var(--sp-6) 0 calc(var(--sp-6) + var(--safe-b));
    border-top: 1px solid var(--line); background: var(--bg-2);
  }
  .footer__inner { display: grid; gap: var(--sp-5); max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-4); }
  .footer__mesh { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
  .footer__col h3 {
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--txt-3);
    font-weight: var(--fw-semibold); margin-bottom: var(--sp-2);
  }
  .footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .footer__col a {
    display: inline-flex; align-items: center; min-height: 32px; min-width: 32px; padding: 0 4px;
    color: var(--txt-2); text-decoration: none; font-size: var(--fs-xs);
  }
  .footer__col a:hover { color: var(--accent); }
  .footer__col a:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); border-radius: var(--r-xs); }
  .footer__base {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
    padding-top: var(--sp-4); border-top: 1px solid var(--line);
    font-size: 11px; color: var(--txt-3);
  }
  .footer__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--fw-bold); color: var(--txt); }
  .footer__brand .minimark { width: 18px; height: 18px; }
  .footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-left: auto; }
  .footer__legal a {
    color: var(--txt-3); text-decoration: none; min-height: 32px; min-width: 32px; padding: 0 4px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .footer__legal a:hover { color: var(--txt); }
  @media (min-width: 768px) {
    .footer__mesh { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .footer__inner { padding: 0 var(--sp-5); }
  }
  @media (max-width: 1023px) {
    .footer__col a, .footer__legal a { min-height: 44px; min-width: 44px; }
  }

  /* Touch floor (PRD §5.1.2) — declared last on purpose: any component that sets its own
     height earlier still has to honour 44px on a touch canvas. */
  @media (max-width: 1023px) {
    .chip, .pill { min-height: 44px; min-width: 44px; }
    /* micro-type must still clear the 12px mobile floor — a rating you cannot read is not a rating */
    .badge, .card__meta { font-size: 12px; }
    .btn--sm { min-height: 44px; }
  }

  /* A14: any fill that IS the accent must carry ink text — white on lime is invisible (owner). */
  .badge--new, .badge--live, .badge--hdr.is-accent { color: var(--accent-ink); }
  :root[data-theme="light"] .badge--new, :root[data-theme="light"] .badge--live { color: #fff; }
  :root[data-theme="light"] .btn--primary, :root[data-theme="light"] .chip[aria-selected="true"] { color: #fff; }
  .btn--primary, .chip[aria-selected="true"] { color: var(--accent-ink); }

  /* A14: the hero rides on the accent fill, so its badge text must be ink, not white.
     Placed after `.hero .badge { color:#fff }`, with the same specificity, so it wins. */
  .hero .badge--new, .hero .badge--live, .hero .badge--hdr { color: #08130a; }
  :root[data-theme="light"] .hero .badge--new,
  :root[data-theme="light"] .hero .badge--live { color: #fff; }
}
/* Step 4.3 — the one toast the CTA engine needs (popup-blocked fallback) */
.ms-toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-sheet);
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--txt); font-size: var(--fs-sm); font-weight: 650;
  box-shadow: var(--shadow-md); transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.ms-toast[data-open="true"] { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 599px) { .ms-toast { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); } }


/* Phase 11 (9.6) — page-wise banner slot. Full-width, one image, one link, labelled honestly. */
.ad-slot { margin: var(--sp-4) auto; max-width: 1200px; padding: 0 var(--gutter, 16px); }
.ad-slot__link { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.ad-slot__link:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.ad-slot__img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 200; object-fit: cover; }
.ad-slot__tag { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-2); background: color-mix(in oklab, var(--bg) 78%, transparent); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }

/* ---- /assets/pages/shell.css ---- */
/* ==========================================================================
   Site chrome — top bar, mobile tab bar, menu drawer (amendment A9)
   Public chrome carries NO account affordances. Admin lives at /admin/ only.
   Mobile-first: the tab bar and drawer are the primary navigation under 1024px.
   ========================================================================== */
@layer layout {
  .site-header {
    position: sticky; top: 0; z-index: var(--z-header);
    /* A42: the page's own edge wears the brand hue, so the strip directly under the browser
       bar reads as one continuous surface with it (the browser strip itself is browser-owned). */

    /* Solid, not glass. On Android Chrome the translucent header let posters run under the
       brand and made the icons look washed out; the theme's canvas is the right answer. */
    background: var(--chrome-bg);
    border-bottom: 1px solid var(--chrome-line);
    box-shadow: var(--chrome-shadow);
    padding-top: var(--safe-t);
  }
  .site-header::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--accent); pointer-events: none;
  }
  .site-header__inner {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: var(--header-h); max-width: var(--container);
    margin: 0 auto; padding: 0 var(--gutter);
  }
  .site-brand {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 44px; min-width: 44px; text-decoration: none; color: var(--txt);
    font-family: var(--font-display); font-weight: var(--fw-black);
    font-size: 16px; letter-spacing: var(--tracking-tight);
    transition: color 260ms var(--ease), opacity 200ms var(--ease);
  }
  /* The mark is a glass tile, not a bare icon: a hairline accent ring, an inner light line and a soft
     accent glow under it. Every one of those is painted from tokens, so switching dark → bright animates
     the hue instead of snapping it. */
  .site-brand__tile {
    position: relative; display: grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: 11px; overflow: hidden;
    background-color: color-mix(in oklab, var(--accent) 10%, var(--surface-2));
    box-shadow:
      inset 0 0 0 1px color-mix(in oklab, var(--accent) 32%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.10),
      0 6px 18px color-mix(in oklab, var(--accent) 16%, transparent);
    transition: background-color 280ms var(--ease), box-shadow 280ms var(--ease), transform 200ms var(--ease);
  }
  .site-brand__mark { width: 26px; height: 26px; color: var(--txt); transition: color 280ms var(--ease); }
  .site-brand__shine {
    position: absolute; inset: -45%; pointer-events: none; opacity: 0;
    background: linear-gradient(115deg, transparent 38%, color-mix(in oklab, var(--accent) 60%, white) 50%, transparent 62%);
    transform: translateX(-70%) rotate(10deg);
    transition: opacity 200ms var(--ease), transform 640ms var(--ease);
  }
  .site-brand:hover .site-brand__tile {
    transform: translateY(-1px);
    box-shadow:
      inset 0 0 0 1px color-mix(in oklab, var(--accent) 58%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 10px 26px color-mix(in oklab, var(--accent) 30%, transparent);
  }
  .site-brand:hover .site-brand__shine { opacity: 0.85; transform: translateX(70%) rotate(10deg); }
  .site-brand__dot {
    width: 5px; height: 5px; border-radius: 50%; flex: none;
    background-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
    transition: background-color 280ms var(--ease), box-shadow 280ms var(--ease);
  }
  .site-brand__word { display: none; }
  .site-brand__word b { color: var(--accent); transition: color 280ms var(--ease); }
  .site-brand:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); border-radius: var(--r-sm); }
  @media (min-width: 400px) { .site-brand__word { display: inline; } }
  @media (prefers-reduced-motion: reduce) {
    .site-brand__shine { display: none; }
    .site-brand__tile, .site-brand__mark, .site-brand__dot, .site-brand__word b { transition: none; }
  }

  /* desktop tabs */
  .site-tabs { display: none; align-items: center; gap: 2px; margin-left: var(--sp-4); }
  .site-tab {
    position: relative; display: inline-flex; align-items: center; gap: 7px;
    min-height: 44px; padding: 0 13px; border-radius: var(--r-sm);
    color: var(--txt-2); font-size: var(--fs-sm); font-weight: var(--fw-medium);
    text-decoration: none; transition: color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
  }
  .site-tab:hover { color: var(--txt); background: var(--surface-2); }
  .site-tab[aria-current="page"] { color: var(--txt); background: var(--accent-soft); }
  .site-tab[aria-current="page"]::after {
    content: ''; position: absolute; left: 13px; right: 13px; bottom: 6px; height: 2px;
    border-radius: 2px; background: var(--accent);
  }
  .site-tab__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
  @media (min-width: 1024px) { .site-tabs { display: flex; } }

  .site-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
  .icon-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid transparent; border-radius: var(--r-sm);
    background: transparent; color: var(--txt); cursor: pointer;
    transition: background var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
  }
  .icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
  .icon-btn:active { transform: scale(0.96); }
  .icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .icon-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent-2-line); color: var(--txt); }
  .site-search {
    display: none; align-items: center; gap: var(--sp-2);
    height: 44px; padding: 0 14px; min-width: 0; width: min(320px, 34vw);
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); color: var(--txt-2); font-size: var(--fs-sm);
  }
  .site-search:hover { border-color: var(--line-strong); color: var(--txt); }
  @media (min-width: 900px) { .site-search { display: inline-flex; } }

  /* mobile tab bar */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-tabbar);
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding-bottom: var(--safe-b);
    background: var(--chrome-bg);
    border-top: 1px solid var(--chrome-line);
    box-shadow: 0 -10px 30px -20px rgba(0, 0, 0, 0.9);
  }
  .tabbar__item {
    position: relative; display: grid; justify-items: center; align-content: center; gap: 3px;
    min-height: calc(var(--tabbar-h) + var(--safe-b)); padding: 6px 2px 8px;
    color: var(--txt-2); text-decoration: none; background: none; border: 0;
    font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
    cursor: pointer; transition: color var(--dur-hover) var(--ease);
  }
  .tabbar__item svg { width: 22px; height: 22px; }
  .tabbar__item:hover { color: var(--txt-2); }
  .tabbar__item[aria-current="page"], .tabbar__item[aria-expanded="true"] { color: var(--txt); font-weight: 700; }
  .tabbar__item[aria-current="page"]::before,
  .tabbar__item[aria-expanded="true"]::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 2px; border-radius: 2px; background: var(--accent);
  }
  .tabbar__item[aria-current="page"] svg { color: var(--accent); }
  .tabbar__item:focus-visible { outline: none; box-shadow: inset 0 0 0 var(--ring-w) var(--accent-ring); }
  /* Step 6.5 — the Live TV slot: same 44px target and identical rhythm as its neighbours, but the
     glyph carries the accent and a 5px live dot pulses once every 3s (stopped for reduced motion). */
  .tabbar__ico { position: relative; display: inline-grid; place-items: center; }
  .tabbar__item--live svg { color: var(--accent); }
  .tabbar__item--live[aria-current="page"] svg { filter: drop-shadow(0 0 6px var(--accent-glow, rgba(162,255,0,.35))); }
  .tabbar__live-dot {
    position: absolute; top: -1px; right: -3px; width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 2px var(--tabbar-bg, #06070A);
    animation: tabLivePulse 3s ease-in-out infinite;
  }
  .tabbar__item--live span:last-child { white-space: nowrap; }
  @keyframes tabLivePulse { 0%, 100% { opacity: .45; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
  @media (prefers-reduced-motion: reduce) { .tabbar__live-dot { animation: none; opacity: 1; } }
  .tabbar__badge {
    position: absolute; top: 5px; right: calc(50% - 20px);
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2);
  }
  @media (min-width: 1024px) { .tabbar { display: none; } }

  /* drawer */
  .drawer-backdrop {
    position: fixed; inset: 0; z-index: var(--z-sheet);
    background: var(--backdrop); opacity: 0; pointer-events: none;
    transition: opacity var(--dur-panel) var(--ease);
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  }
  .drawer-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }
  .drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: calc(var(--z-sheet) + 1);
    width: min(88vw, 342px); display: flex; flex-direction: column;
    /* A real panel clips its own content. Without this the sitemap painted straight over the
       page behind the drawer once it outgrew the viewport (defect found in step 1.1 review). */
    overflow: hidden;
    background: var(--drawer-bg); border-right: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(-101%);
    transition: transform var(--dur-panel) var(--ease);
    visibility: hidden;
    padding-top: var(--safe-t); padding-bottom: var(--safe-b);
  }
  .drawer[data-open="true"] { transform: none; visibility: visible; }
  .drawer__head {
    flex: none;
    display: flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line);
  }
  .drawer__title { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-md); }
  .drawer__close { margin-left: auto; }
  /* flex:1 + min-height:0 is what turns this into a real scroll region; without min-height:0 a
     flex child refuses to shrink below its content and the column overflows instead. */
  .drawer__body {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: var(--sp-3) 0 var(--sp-4);
    scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  }
  .drawer__body::-webkit-scrollbar { width: 6px; }
  .drawer__body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
  .drawer__group + .drawer__group { margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--line); }
  .drawer__label {
    padding: var(--sp-2) var(--sp-4); font-size: 11px; font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--txt-3);
  }
  .drawer__link {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 46px; padding: 0 var(--sp-4);
    color: var(--txt-2); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
    border-left: 2px solid transparent;
    transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
  }
  .drawer__link:hover, .drawer__link:focus-visible { background: var(--surface-2); color: var(--txt); outline: none; }
  .drawer__link[aria-current="page"] { color: var(--txt); background: var(--accent-soft); border-left-color: var(--accent); }
  .drawer__link svg { width: 19px; height: 19px; flex: none; color: var(--txt-3); }
  .drawer__link[aria-current="page"] svg { color: var(--accent); }
  .drawer__link .tag {
    margin-left: auto; padding: 2px 7px; border-radius: var(--r-pill);
    background: var(--accent-2-soft); color: var(--accent-2);
    font-size: 10px; font-weight: var(--fw-bold); letter-spacing: 0.04em;
  }
  :root[data-theme="light"] .drawer__link .tag { color: var(--accent-2); }
  .drawer__theme {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    margin: 0; padding: 0 var(--sp-1) 0 0; min-height: 44px;
  }
  .drawer__theme span { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--txt-2); }
  .drawer__foot { flex: none; display: grid; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4) calc(var(--sp-3) + var(--safe-b)); border-top: 1px solid var(--line); }
  .drawer__foot p { font-size: 11px; line-height: 1.5; color: var(--txt-3); }

  /* keep content clear of the tab bar */
  @media (max-width: 1023px) {
    /* --tabbar-h is the inner height; the hairline border and a breathing gap sit on top of it,
       otherwise the last content row clips under the bar by exactly 1px. */
    body { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 1px + var(--sp-3)); }
  }
  @media (min-width: 1024px) {
    body { padding-bottom: 0; }
  }
  body[data-drawer="open"] { overflow: hidden; }

  /* shared contract for any future panel that scrolls internally (bottom sheet, filters) */
  .scroll-region { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

  @media (prefers-reduced-motion: reduce) {
    .drawer, .drawer-backdrop { transition: none; }
  }
}

/* ==========================================================================
   Theme transition — amendment A10 (premium, smooth, respects reduced motion)
   Modern browsers get a circular reveal from the toggle itself (View Transitions);
   everyone else gets a colour crossfade + a soft bloom, so the swap never snaps.
   ========================================================================== */
@layer utilities {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
  ::view-transition-new(root) {
    animation: ms-theme-reveal 560ms var(--ease) both;
  }
  @keyframes ms-theme-reveal {
    from { clip-path: circle(0% at var(--vt-x, 50%) var(--vt-y, 0%)); }
    to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0%)); }
  }

  /* fallback path (Safari < 18, Firefox, reduced-motion off but no VT support) */
  html.theme-anim,
  html.theme-anim *,
  html.theme-anim *::before,
  html.theme-anim *::after {
    transition:
      background-color 420ms var(--ease),
      color 420ms var(--ease),
      border-color 420ms var(--ease),
      fill 420ms var(--ease),
      stroke 420ms var(--ease),
      box-shadow 420ms var(--ease) !important;
  }

  .theme-bloom {
    position: fixed; z-index: var(--z-toast); pointer-events: none;
    width: 46vmax; height: 46vmax; margin: -23vmax 0 0 -23vmax;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
    animation: ms-bloom 620ms var(--ease) forwards;
  }
  @keyframes ms-bloom {
    0% { transform: scale(0.2); opacity: 0.85; }
    100% { transform: scale(1.9); opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    ::view-transition-new(root) { animation: none; }
    .theme-bloom { display: none; }
  }

  /* ============================================================ A13: shell ===
     YouTube's shape, our skin: full-width slim header, pills under it, a persistent
     desktop rail, and the tab bar as the only mobile menu (no double menu anymore). */

  :root { --hdr: 56px; }

  /* header: hamburger only where a rail exists */

  /* mobile brand lockup: mark + name, tight and confident */
  .site-brand { gap: 9px; }
  .site-brand__tile { width: 32px; height: 32px; border-radius: 10px; }
  .site-brand__mark { width: 24px; height: 24px; }
  .site-brand__word {
    font-family: var(--font-display); font-weight: 700; font-size: 17px;
    letter-spacing: -0.022em; font-feature-settings: 'ss01' on;
  }
  .site-brand__word b { font-weight: 800; color: var(--accent); }
  @media (max-width: 399px) { .site-brand__dot { display: none; } }

  /* ============================================ A20: the rail is a real column again
     Devid's call: the hidden-rail experiment failed on two counts — with one small pill on the edge you
     could not tell a sidebar existed, and an overlay never adjusts the page, so the content stayed
     underneath it. So the rail is back IN the grid: 76px of section icons at rest (every group's glyph
     visible, the active one marked), and it grows to 316px on hover / focus / pin. The page shifts with
     it because it is the same grid — nothing is ever covered, nothing shows through, nothing jumps. */
  .shell { display: grid; grid-template-columns: minmax(0, 1fr); }
  .shell__content { min-width: 0; }

  .railzone { display: none; }
  .siderail { display: none; }
  .railpin { display: none; }

  @media (min-width: 1024px) {
    .shell {
      grid-template-columns: 72px minmax(0, 1fr);
      transition: grid-template-columns 260ms cubic-bezier(0.22, 0.9, 0.25, 1);
    }
    body[data-rail="open"] .shell { grid-template-columns: 264px minmax(0, 1fr); }

    .railzone {
      display: block; position: sticky; top: var(--hdr); align-self: start;
      height: calc(100dvh - var(--hdr)); z-index: 60;
    }

    .siderail {
      display: flex; flex-direction: column; gap: 2px;
      height: 100%; width: 100%;
      overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
      padding: 10px 8px 14px;
      /* opaque in both themes — the page must never read through the rail */
      background: var(--surface);
      border-right: 1px solid var(--line-2);
      scrollbar-width: thin;
    }

    /* ---- resting state: an icon rail, not a mystery pill ---- */
    .railzone[data-open="false"] .siderail__label,
    .railzone[data-open="false"] .navgrp__btn > span:not(.navrow__ico),
    .railzone[data-open="false"] .navgrp__chev,
    .railzone[data-open="false"] .nav-brand__word,
    .railzone[data-open="false"] .nav-brand__tag,
    .railzone[data-open="false"] .railpin__word,
    .railzone[data-open="false"] .siderail__pages { display: none; }
    .railzone[data-open="false"] .navgrp { margin: 0; }
    .railzone[data-open="false"] .navgrp__panel { display: none; }
    /* the icon rail has to look like a deliberate column of controls, not five grey smudges:
       48px tiles, 22px glyphs, a real hover surface and the active section tinted */
    .railzone[data-open="false"] .navgrp { margin: 0; }
    .railzone[data-open="false"] .navgrp__btn {
      width: 48px; height: 48px; margin: 3px auto; padding: 0;
      justify-content: center; border-radius: 13px;
      color: color-mix(in oklab, var(--txt) 74%, transparent);
      transition: color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
    }
    .railzone[data-open="false"] .navgrp__btn:hover { color: var(--txt); background: var(--surface-2); }
    .railzone[data-open="false"] .navgrp__btn[aria-expanded="true"] { color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
    .railzone[data-open="false"] .navgrp__btn svg { width: 22px; height: 22px; }
    .railzone[data-open="false"] .navgrp__btn[aria-expanded="true"] { background: var(--surface-2); }
    .railzone[data-open="false"] .nav-brand { padding: 2px 0 8px; }
    /* the brand is a real control in the icon rail too: 44×44, not a 33×30 sliver */
    .railzone[data-open="false"] .nav-brand__link {
      width: 44px; height: 44px; min-height: 44px; margin: 0 auto;
      justify-content: center; gap: 0; padding: 0;
    }
    .railzone[data-open="false"] .nav-brand__mark { width: 26px; height: 26px; }
    .railzone[data-open="false"] .railpin { width: 44px; margin: 4px auto 0; padding: 0; justify-content: center; }

    /* the width has travelled before the words arrive, so nothing squashes mid-move */
    .siderail__label,
    .navgrp__btn > span,
    .nav-brand__word,
    .nav-brand__tag,
    .railpin__word { transition: opacity 160ms var(--ease) 90ms; }
    .railzone[data-open="true"] .siderail { padding-right: var(--sp-2); }

    .siderail__group + .siderail__group { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
    .siderail__label {
      font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
      color: var(--txt-3); padding: 0 var(--sp-3) var(--sp-2);
    }
    .siderail__link {
      display: flex; align-items: center; gap: var(--sp-3);
      min-height: 44px; padding: 0 var(--sp-3); border-radius: 10px;
      color: var(--txt-2); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
      position: relative; transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
    }
    .siderail__link svg { flex: none; opacity: 0.85; }
    .siderail__link:hover { background: var(--surface-2); color: var(--txt); }
    .siderail__link:hover svg { opacity: 1; }
    .siderail__link.is-active { background: var(--surface-2); color: var(--txt); font-weight: 600; }
    .siderail__link.is-active::before {
      content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
      width: 3px; height: 20px; border-radius: 2px; background: var(--accent);
    }
    .siderail__link.is-active svg { color: var(--accent); opacity: 1; }
    .siderail__link .tag { margin-left: auto; }

    /* the pin lives at the foot of the rail, in the thumb-free zone on a desktop but always visible */
    .railpin {
      display: flex; align-items: center; gap: 10px;
      margin-top: auto; min-height: 44px; padding: 0 12px;
      border: 1px solid var(--line-2); border-radius: 10px; background: transparent;
      color: var(--txt-2); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
      transition: color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
    }
    .railpin:hover { color: var(--txt); border-color: color-mix(in oklab, var(--accent) 50%, var(--line-2)); background: var(--surface-2); }
    .railpin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .railpin__glyph { display: grid; place-items: center; flex: none; }
    .railpin__glyph--close { display: none; }
    body[data-rail="open"] .railzone[data-pinned="true"] .railpin__glyph--open { display: none; }
    body[data-rail="open"] .railzone[data-pinned="true"] .railpin__glyph--close { display: grid; }
    /* a pinned rail says so, quietly */
    .railzone[data-pinned="true"] .railpin { color: var(--txt); border-color: color-mix(in oklab, var(--accent) 45%, var(--line-2)); }
  }

  /* ==================================================== A13: drawer, premium ===
     Same groups as the rail, but a full-height sheet with real hierarchy: brand head,
     rounded rows with an accent active bar, an appearance card that sits in the thumb zone. */
  .drawer { width: min(332px, 86vw); }
  .drawer__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
    border-bottom: 1px solid var(--line);
  }
  .drawer__title {
    font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  }
  .drawer__body { padding: var(--sp-3) var(--sp-2); }
  .drawer__group + .drawer__group { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
  .drawer__label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--txt-3); padding: 0 var(--sp-3) var(--sp-2);
  }
  .drawer__link {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 46px; padding: 0 var(--sp-3); border-radius: 10px;
    color: var(--txt-2); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
    position: relative;
    transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
  }
  .drawer__link svg { flex: none; opacity: 0.85; }
  .drawer__link:active, .drawer__link:hover { background: var(--surface-2); color: var(--txt); }
  .drawer__link[aria-current="page"] { background: var(--surface-2); color: var(--txt); font-weight: 600; }
  .drawer__link[aria-current="page"]::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 2px; background: var(--accent);
  }
  .drawer__link[aria-current="page"] svg { color: var(--accent); opacity: 1; }
  .drawer__link .tag { margin-left: auto; }

  .drawer__theme {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    min-height: 52px; padding: 0 var(--sp-3);
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  }
  .drawer__theme span { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--txt-2); }
  .drawer__foot { display: grid; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3) calc(var(--sp-3) + var(--safe-b)); border-top: 1px solid var(--line); }
  .drawer__foot p { font-size: 11px; line-height: 1.5; color: var(--txt-3); padding: 0 var(--sp-1); }

  /* ================================================= A14: header controls + search ===
     Every control in the header must look like it belongs to this design: hairline border,
     surface hover, 40px, and an obvious purpose. The old ones were naked icons. */
  .site-actions { gap: var(--sp-2); }
  .icon-btn {
    height: 44px; min-width: 44px; border-radius: 10px;
    border: 1px solid transparent; color: var(--txt-2);
    transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease);
  }
  .icon-btn:hover { background: var(--surface-2); color: var(--txt); border-color: var(--line); }
  .icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  /* A14: the sidebar toggle is the last control on the right, matching the rest of the header icons.
     The glyph nudges toward the rail it controls, and the tinted state says which way it will go. */
  .site-search__kbd {
    margin-left: auto; font: 600 11px/1 var(--font-ui); color: var(--txt-3);
    border: 1px solid var(--line); border-radius: 6px; padding: 2px 5px;
  }
  /* the mobile-only search button; the desktop pill takes over from 900px */
  .site-search-btn { display: inline-flex; }
  @media (min-width: 900px) { .site-search-btn { display: none; } }

  /* mobile brand lockup must actually show the name */
  @media (max-width: 899px) {
    .site-brand__word { display: inline-block; font-size: 16.5px; }
  }

  /* ---- search overlay ---- */
  .search-panel {
    position: fixed; inset: 0; z-index: var(--z-sheet);
    display: none; grid-template-rows: auto 1fr;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }
  .search-panel[data-open="true"] { display: grid; animation: fadeInDown 220ms var(--ease) both; }
  .search-panel__bar { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
  .search-panel__field {
    display: flex; align-items: center; gap: var(--sp-3);
    height: 52px; padding: 0 var(--sp-2) 0 var(--sp-4);
    border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface);
    box-shadow: var(--shadow-sm);
  }
  .search-panel__field svg { flex: none; color: var(--txt-3); }
  .search-panel__field input {
    flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: none; color: var(--txt);
    font: 500 16px/1 var(--font-ui); outline: none;
  }
  .search-panel__field input::placeholder { color: var(--txt-3); }
  .search-panel__body { padding: var(--sp-4); display: grid; gap: var(--sp-3); align-content: start; }
  .search-panel__label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-3); }
  .search-panel__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .search-panel__hint { font-size: var(--fs-sm); color: var(--txt-3); max-width: 52ch; }
  body[data-overlay="search"] { overflow: hidden; }

  /* ---- footer mesh ---- */
  /* ================================================ A39: the footer, both canvases ================
     Desktop: a brand band on the left, three sitemap columns on the right behind one hairline.
     Phone: the same brand band, then three 52px folding rows so the foot of the page stays a block.
     Nothing hides behind the fixed tab bar — the foot carries its own clearance. */
  .site-footer {
    position: relative; margin-top: var(--sp-7);
    border-top: 1px solid var(--line-2);
    background:
      radial-gradient(120% 90% at 8% -30%, color-mix(in oklab, var(--accent) 9%, transparent) 0%, transparent 62%),
      linear-gradient(180deg, color-mix(in oklab, var(--surface) 94%, var(--accent) 6%) 0%, var(--surface) 58%);
    padding: var(--sp-7) 0 calc(var(--sp-6) + 66px + env(safe-area-inset-bottom, 0px));
  }
  @media (min-width: 1024px) { .site-footer { padding-bottom: var(--sp-6); } }

  .site-footer__band { display: grid; gap: var(--sp-5); }
  @media (min-width: 900px) {
    .site-footer__band { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.5fr); gap: var(--sp-7); align-items: start; }
    .site-footer__cols { border-left: 1px solid var(--line); padding-left: var(--sp-6); }
  }

  .site-footer__brand { display: grid; gap: 14px; align-content: start; }
  .site-footer .site-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; width: fit-content; }
  .site-footer .site-brand__tile {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
    background: color-mix(in oklab, var(--accent) 12%, var(--surface-2));
    border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--line));
    box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 6%, transparent);
  }
  .site-footer .site-brand__mark { width: 26px; height: 26px; color: var(--txt); }
  .site-footer .site-brand__word { font-family: var(--font-display); font-size: 1.32rem; font-weight: 800; letter-spacing: -0.02em; color: var(--txt); }
  .site-footer .site-brand__word b { color: var(--accent-text); }
  .site-footer__note { font-size: var(--fs-sm); line-height: 1.65; color: var(--txt-2); max-width: 46ch; }
  .site-footer__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .site-footer__chips li {
    font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em; color: var(--txt-2);
    padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  }

  .site-footer__cols { display: grid; }
  @media (min-width: 900px) { .site-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); } }
  .site-footer__col { border-bottom: 1px solid var(--line); }
  .site-footer__col:first-of-type { border-top: 1px solid var(--line); }
  @media (min-width: 900px) { .site-footer__col, .site-footer__col:first-of-type { border: 0; } }

  .site-footer__label {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 0; min-height: 52px; cursor: pointer; list-style: none;
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--txt-2);
  }
  .site-footer__label::-webkit-details-marker { display: none; }
  .site-footer__chev { display: grid; place-items: center; width: 22px; height: 22px; color: var(--txt-3); transition: transform 240ms var(--ease), color 200ms var(--ease); }
  .site-footer__col[open] .site-footer__chev { transform: rotate(180deg); color: var(--accent-text); }
  @media (min-width: 900px) {
    .site-footer__label { min-height: 34px; cursor: default; padding-bottom: 4px; }
    .site-footer__chev { display: none; }
  }

  .site-footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding-bottom: 8px; }
  @media (min-width: 900px) { .site-footer__links { grid-template-columns: 1fr; padding-bottom: 0; } }
  .site-footer__col a {
    display: flex; align-items: center; min-height: 44px;
    font-size: 13.5px; font-weight: 600; color: var(--txt-2); text-decoration: none;
    transition: color 180ms var(--ease), transform 180ms var(--ease);
  }
  .site-footer__col a:hover, .site-footer__col a:focus-visible { color: var(--accent-text); transform: translateX(2px); }
  @media (min-width: 900px) { .site-footer__col a { min-height: 34px; } }

  .site-footer__base {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px var(--sp-4); margin-top: var(--sp-6); padding-top: var(--sp-4);
    border-top: 1px solid var(--line);
  }
  .site-footer__base p { font-size: 12px; line-height: 1.6; color: var(--txt-3); max-width: 52ch; }
  @media (max-width: 899px) {
    /* the sitemap pill needs its 44px, so the base row itself gets tighter */
    .site-footer__base { margin-top: var(--sp-4); padding-top: 10px; gap: 6px; }
    .site-footer__base a { min-height: 44px; padding: 0 16px; }
  }
  .site-footer__base a {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px;
    border-radius: 999px; border: 1px solid var(--line-2); color: var(--txt-2);
    font-weight: 650; text-decoration: none; transition: color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease), background var(--dur-hover) var(--ease);
  }
  .site-footer__base a:hover { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
  .site-footer__base a:hover { color: var(--accent-text); border-color: currentColor; }
  .site-footer__top {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; margin-left: auto;
    border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--txt-2);
    font: inherit; font-size: 12.5px; font-weight: 750; cursor: pointer;
    transition: background 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease), transform 180ms var(--ease);
  }
  .site-footer__top:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; transform: translateY(-1px); }
  .site-footer__top:focus-visible { outline: var(--ring-w, 2px) solid var(--accent-ring, var(--accent)); outline-offset: 2px; }
  @media (max-width: 599px) { .site-footer__top { margin-left: 0; width: 100%; justify-content: center; } }
}
/* ============================================================================
   A15 — premium accordion navigation (rail + drawer share every rule below)
   One group open at a time; height/opacity motion on a 220ms ease-out curve.
   ========================================================================== */
.navgrp { border-radius: var(--r-md); }
.navgrp__btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 44px; padding: 0 10px; margin: 0;
  background: none; border: 0; border-radius: var(--r-md);
  color: var(--txt-2); font: inherit; font-size: var(--fs-sm); font-weight: 650;
  letter-spacing: 0.01em; text-align: left; cursor: pointer;
  transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.navgrp__btn > svg:first-child { flex: none; opacity: 0.9; }
.navgrp__btn > span { flex: 1 1 auto; }
.navgrp__chev { flex: none; opacity: 0.6; transition: transform 220ms cubic-bezier(0.2, 0.9, 0.24, 1); }
.navgrp__btn:hover { background: var(--surface-2); color: var(--txt); }
.navgrp__btn:focus-visible { outline: none; box-shadow: inset 0 0 0 var(--ring-w) var(--accent-ring); }
.navgrp[data-open="true"] > .navgrp__btn { background: var(--surface-2); color: var(--txt); }
.navgrp[data-open="true"] > .navgrp__btn .navgrp__chev { transform: rotate(180deg); opacity: 1; }
.navgrp[data-open="true"] > .navgrp__btn > svg:first-child { color: var(--accent); opacity: 1; }

.navgrp__panel {
  height: 0; overflow: hidden;
  transition: height 220ms cubic-bezier(0.2, 0.9, 0.24, 1);
}
.navgrp__inner { display: grid; gap: 2px; padding: 4px 0 8px 8px; }
.navgrp__inner .siderail__link { min-height: 44px; font-size: var(--fs-sm); }
.drawer .navgrp__inner .siderail__link, .drawer .siderail__page { min-height: 46px; }

/* the branding block sits mid-rail: below the groups, above the site pages */
.nav-brand {
  margin: var(--sp-4) 0 var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 12% 0%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 62%),
    var(--surface-2);
  transition: border-color var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease);
}
.nav-brand:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.nav-brand__link { display: grid; gap: 6px; text-decoration: none; color: var(--txt); }
.nav-brand__mark { width: 30px; height: 30px; color: var(--txt); }
.nav-brand__word { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.nav-brand__tag { font-size: var(--fs-xs); color: var(--txt-3); line-height: 1.45; }

.siderail__pages { display: grid; gap: 1px; margin-top: var(--sp-2); }
.siderail__page {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px;
  border-radius: var(--r-sm); color: var(--txt-3); text-decoration: none; font-size: var(--fs-sm);
  transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.siderail__page svg { flex: none; opacity: 0.7; }
.siderail__page:hover { background: var(--surface-2); color: var(--txt); }
.siderail__page:hover svg { opacity: 1; }
.siderail__page[aria-current="page"] { color: var(--txt); font-weight: 650; }

/* drawer canvas: same accordion, roomier rows */
.drawer .navgrp--drawer > .navgrp__btn { min-height: 46px; font-size: var(--fs-md); font-weight: 700; }
.drawer .navgrp--drawer .navgrp__inner { padding-left: 6px; }
.drawer .navgrp--drawer + .navgrp--drawer { border-top: 1px solid var(--line); border-radius: 0; }
.drawer .nav-brand { margin: var(--sp-4) 0; }

/* ---------------------------------------------------------- A22: resting rail --- */
/* The closed desktop rail is ONE clean column of six tiles and nothing else:
   the five section glyphs in sidebar order, then the MovieState tile. Site pages,
   the pin and every open panel exist only in the expanded rail, so no clipped
   half-words ("Ab", "Co", "Ed po") can leak out of a 72px strip. */
@media (min-width: 1024px) {
  #railZone[data-open="false"] #siteRail { padding: 10px 12px; gap: 6px; overflow: hidden; }

  #railZone[data-open="false"] #siteRail .siderail__pages,
  #railZone[data-open="false"] #siteRail .railpin,
  #railZone[data-open="false"] #siteRail .navgrp__panel,
  #railZone[data-open="false"] #siteRail .siderail__label,
  #railZone[data-open="false"] #siteRail .navgrp__btn > span:not(.navrow__ico),
  #railZone[data-open="false"] #siteRail .navgrp__chev,
  #railZone[data-open="false"] #siteRail .nav-brand__word,
  #railZone[data-open="false"] #siteRail .nav-brand__tag { display: none !important; }

  #railZone[data-open="false"] #siteRail > .navgrp { width: 48px; margin: 0 auto; flex: 0 0 auto; }
  #railZone[data-open="false"] #siteRail .navgrp__btn {
    width: 48px; height: 48px; margin: 0; padding: 0; border: 0;
    display: grid; place-items: center; border-radius: 13px; background: transparent;
    color: color-mix(in oklab, var(--txt) 72%, transparent);
    transition: color 180ms var(--ease), background 180ms var(--ease);
  }
  #railZone[data-open="false"] #siteRail .navgrp__btn svg { width: 22px; height: 22px; }
  #railZone[data-open="false"] #siteRail .navgrp__btn:hover { color: var(--txt); background: var(--surface-2); }
  #railZone[data-open="false"] #siteRail .navgrp__btn[aria-expanded="true"] {
    color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, transparent);
  }

  #railZone[data-open="false"] #siteRail .nav-brand {
    width: 48px; height: 48px; margin: 6px auto 0; padding: 0; border: 0;
    display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px;
    background: color-mix(in oklab, var(--accent) 12%, transparent);
  }
  #railZone[data-open="false"] #siteRail .nav-brand__link {
    width: 48px; height: 48px; margin: 0; padding: 0; display: grid; place-items: center;
  }
  #railZone[data-open="false"] #siteRail .nav-brand__mark { width: 24px; height: 24px; }

  /* the expanded rail lifts off the page instead of butting against it */
  #railZone[data-open="true"] #siteRail { box-shadow: 14px 0 44px rgba(0, 0, 0, 0.28); }
}


  /* ============================================ A38: the rail opens without a single flicker ===
     Measured defect: on hover the glyph jumped from x=25 to x=18 in one frame before the column
     had travelled, so the rail visibly twitched. The cure is geometric, not cosmetic: every rail
     row carries one fixed 40px icon slot centred on the same optical line in BOTH states, so the
     glyph's x never changes; only the column width and the labels move. */
  @media (min-width: 1024px) {
    .railzone { contain: layout paint; }
    .railzone .navrow__ico {
      display: grid; place-items: center; flex: none;
      width: 40px; height: 40px;
    }
    .railzone .navrow__ico svg { width: 22px; height: 22px; display: block; }
    .railzone .navrow__ico--sm { width: 40px; height: 32px; }
    .railzone .navrow__ico--sm svg { width: 20px; height: 20px; }

    /* open state: same 8px rail inset + same slot => glyph centre stays at x=36 */
    .railzone[data-open="true"] .siderail__link,
    .railzone[data-open="true"] .siderail__page,
    .railzone[data-open="true"] .navgrp__btn { padding-left: 8px; gap: 10px; }
    .railzone[data-open="true"] .nav-brand__link { padding-left: 6px; gap: 10px; }
    .railzone[data-open="true"] .railpin { padding-left: 6px; gap: 10px; }
    .railzone[data-open="true"] .navgrp__chev { margin-left: auto; }

    /* closed tile: the 48px tile now wraps the same 40px slot, so the glyph does not shift */
    .railzone[data-open="false"] .navgrp__btn { padding: 0; }
    .railzone[data-open="false"] .navgrp__btn .navrow__ico { width: 40px; height: 40px; }
    .railzone[data-open="false"] .nav-brand__link { padding: 0; }
    .railzone[data-open="false"] .railpin { padding: 0; }

    /* the surfaces morph instead of snapping: tile -> row is a background fade, not a flash */
    .railzone .navgrp__btn,
    .railzone .siderail__link,
    .railzone .railpin,
    .railzone .nav-brand__link {
      transition: background-color 220ms var(--ease), color 200ms var(--ease),
                  border-color 200ms var(--ease), border-radius 240ms var(--ease);
    }

    /* words arrive after the column has travelled, and they leave first on close */
    .railzone .siderail__label,
    .railzone .navgrp__btn > span:not(.navrow__ico),
    .railzone .nav-brand__word,
    .railzone .nav-brand__tag,
    .railzone .railpin__word,
    .railzone .siderail__page,
    .railzone .siderail__link,
    .railzone .navgrp__chev {
      transition: opacity 170ms var(--ease) 130ms;
    }
    .railzone[data-open="false"] .siderail__label,
    .railzone[data-open="false"] .navgrp__btn > span:not(.navrow__ico),
    .railzone[data-open="false"] .nav-brand__word,
    .railzone[data-open="false"] .nav-brand__tag,
    .railzone[data-open="false"] .railpin__word,
    .railzone[data-open="false"] .siderail__page { transition: opacity 90ms var(--ease) 0ms; }
  }


/* ==========================================================================
   Step 6.4b — navigation feel
   A tap must always be acknowledged in the next frame, and the arriving document
   must never snap into place. No prefetch: a tap costs nothing until it happens.
   ========================================================================== */
.navbar-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  z-index: 4000;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  transition: transform 320ms cubic-bezier(.22,.61,.36,1), opacity 160ms linear;
  box-shadow: 0 0 10px var(--accent);
}
.navbar-progress.is-on { opacity: 1; }
body { animation: ms-doc-in 180ms ease-out both; }
@keyframes ms-doc-in { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .navbar-progress { transition: none; }
  body { animation: none; }
}

/* 10.2a — the owner's tagline sits under the footer wordmark, quiet but readable in both themes */
.site-footer__tag { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--txt-2); max-width: 34ch; }

/* 10.2b — the owner's channels in the footer brand band, only when a link is set */
/* 10.2b — the chips and the owner's channels share one row, so the phone footer stays compact */
.site-footer__meta { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.site-footer__social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.site-footer__socialLink {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--txt-2);
  transition: color .16s ease, border-color .16s ease, transform .16s ease;
}
.site-footer__socialLink:hover, .site-footer__socialLink:focus-visible {
  color: var(--accent-text); border-color: color-mix(in oklab, var(--accent) 55%, var(--line-2)); transform: translateY(-1px);
}
@media (max-width: 560px) { .site-footer__socialLink { width: 44px; height: 44px; } }

@media (max-width: 560px) {
  .site-footer__band { padding-bottom: 10px; }
  .site-footer__meta { gap: 6px 10px; }
  .site-footer__note { line-height: 1.45; }
  .site-footer__base > p:first-child { font-size: 12px; line-height: 1.4; }
  .site-footer__col > summary { min-height: 48px; }
  /* the base row becomes two lines instead of three: copyright + back-to-top, then the note */
  .site-footer__base { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; }
  .site-footer__base > p:first-child { grid-column: 1; grid-row: 1; margin: 0; }
  .site-footer__base > .site-footer__top { grid-column: 2; grid-row: 1; margin: 0; }
  .site-footer__baseTail { grid-column: 1 / -1; grid-row: 2; margin: 0; }
}

/* Step 13.5 — live suggestions in the search sheet: the answer appears while typing (390 and 1440) */
.sb { border-bottom: 1px solid var(--line); background: var(--surface); max-height: min(58vh, 520px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sb__head { padding: 10px 16px 6px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-3); font-weight: 700; }
.sb__row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; text-decoration: none; color: var(--txt); border-left: 3px solid transparent; transition: background .16s, border-color .16s, transform .16s; }
.sb__row:hover, .sb__row:focus-visible, .sb__row.is-on { background: var(--surface-2); border-left-color: var(--accent); transform: translateX(2px); }
.sb__row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sb__img { width: 40px; height: 60px; border-radius: 7px; object-fit: cover; flex: none; background: var(--surface-2); box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.sb__img--plate { display: grid; place-items: center; font-size: 17px; font-weight: 800; color: var(--accent-text); background: radial-gradient(120% 90% at 30% 10%, var(--accent-soft), transparent 70%), var(--surface-2); }
.sb__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sb__title { font-size: 14px; font-weight: 650; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb__meta { font-size: 11.5px; color: var(--txt-3); font-variant-numeric: tabular-nums; }
.sb__go { margin-left: auto; color: var(--txt-3); font-size: 18px; }
.sb__all { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px 14px; font-size: 13px; font-weight: 700; color: var(--accent-text); text-decoration: none; border-top: 1px solid var(--line); }
.sb__all:hover, .sb__all:focus-visible { background: var(--surface-2); }
@media (max-width: 559px) { .sb__row { padding: 8px 14px; gap: 10px; } .sb__img { width: 36px; height: 54px; } .sb__title { font-size: 13.5px; } }

/* ---- server network: the sibling movie-server sites, shown only where a page asks for them ---- */
.ms-net[hidden]{display:none!important}
.ms-net{margin:18px 0}
.ms-net__title{font-size:1.05rem;font-weight:700;margin:0 0 6px}
.ms-net__lead{margin:0 0 10px;color:var(--muted,#9aa0a6);font-size:.92rem}
.ms-net__list{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:0;padding:0}
.ms-net__card{margin:0}
.ms-net__link{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--line,rgba(255,255,255,.14));border-radius:12px;text-decoration:none;color:inherit;transition:border-color .2s ease,transform .2s ease}
.ms-net__link:hover,.ms-net__link:focus-visible{border-color:var(--accent,#8bd450);transform:translateY(-1px)}
.ms-net__name{font-weight:700;font-size:.95rem}
.ms-net__note{font-size:.82rem;color:var(--muted,#9aa0a6)}
.ms-net__theme{align-self:flex-start;margin-top:6px;font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;padding:2px 8px;border-radius:999px;border:1px solid var(--line,rgba(255,255,255,.18))}
.ms-net__line{margin:0;font-size:.82rem;color:var(--muted,#9aa0a6)}
.ms-net__kicker{margin-right:6px;font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;opacity:.75}
.ms-net--maintenance{margin-top:22px}
@media (max-width:520px){.ms-net__list{grid-template-columns:1fr 1fr}}

/* ---- /assets/pages/detail.css ---- */
/* ==========================================================================
   Step 3.1 — title detail. Rate hero (full-bleed backdrop on a phone, split on desktop),
   one meta line, synopsis, facts. Every empty state is designed, never blank.
   ========================================================================== */
@layer pages {
  /* ---- more like this (3.5): the shared poster card in a snapped rail ---- */
  .dt-sim__rail {
    list-style: none; margin: var(--sp-3) 0 0; padding: 0 0 6px;
    display: grid; grid-auto-flow: column; grid-auto-columns: clamp(124px, 33vw, 158px); gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: thin; scroll-padding-inline: 2px;
  }
  .dt-sim__item { scroll-snap-align: start; min-inline-size: 0; }
  .dt-sim__wrap { position: relative; min-width: 0; overflow: hidden; }
  .dt-sim__nav {
    position: absolute; top: 50%; right: 0; z-index: 3;
    display: none; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
    transform: translateY(-50%);
    border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    color: var(--accent-text);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
    transition: transform 220ms var(--ease), left 220ms var(--ease), right 220ms var(--ease), box-shadow 220ms var(--ease);
  }
  .dt-sim__nav svg { width: 22px; height: 22px; transition: transform 220ms var(--ease); }
  .dt-sim__nav[data-side='left'] { right: auto; left: 0; }
  .dt-sim__nav[data-side='left'] svg { transform: rotate(180deg); }
  .dt-sim__nav:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.44); }
  .dt-sim__nav:active { transform: translateY(-50%) scale(0.94); }
  .dt-sim__nav:focus-visible { outline: var(--ring-w) solid var(--accent-ring); outline-offset: 3px; }
  @media (min-width: 900px) {
    .dt-sim__rail { scroll-snap-type: x proximity; }
    .dt-sim__nav { display: grid; }
  }
  .dt-sim__rail .card { inline-size: 100%; }

  .dt { padding-bottom: var(--sp-7); }

  /* ------------------------------------------------------------------ hero --- */
  .dt-hero {
    position: relative; isolation: isolate;
    /* full-bleed without negative margins: main.dt is already edge to edge, and a negative
       gutter here pushed the hero 16px past the viewport on every phone */
    width: 100%;
    min-height: clamp(240px, 46vh, 420px);
    display: flex; align-items: flex-end;
    overflow: hidden;
  }
  .dt-hero__img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 28%; z-index: -2;
    transform: scale(1.02);
  }
  .dt-hero__plate {
    position: absolute; inset: 0; z-index: -2; display: grid; place-items: center;
    background:
      radial-gradient(120% 90% at 20% 0%, var(--surface-3), transparent 70%),
      linear-gradient(160deg, var(--surface-2), var(--bg) 78%);
  }
  .dt-hero__plate span {
    font-family: var(--font-display); font-size: clamp(3rem, 16vw, 7rem); font-weight: 800;
    letter-spacing: -0.04em; color: var(--txt-3); opacity: 0.42;
  }
  /* the scrim is what keeps white type legible over any poster */
  .dt-hero__scrim {
    position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(180deg, rgba(3, 4, 6, 0.62) 0%, rgba(3, 4, 6, 0.18) 34%, var(--bg) 96%),
      linear-gradient(90deg, rgba(3, 4, 6, 0.72), transparent 68%);
  }
  :root[data-theme="light"] .dt-hero__scrim {
    background:
      linear-gradient(180deg, rgba(246, 246, 249, 0.5) 0%, rgba(246, 246, 249, 0.24) 34%, var(--bg) 96%),
      linear-gradient(90deg, rgba(246, 246, 249, 0.86), transparent 70%);
  }
  .dt-hero__inner { position: relative; width: 100%; display: grid; gap: 6px; padding-block: var(--sp-5) var(--sp-4); }
  .dt-kicker {
    margin: 0; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--accent);
  }
  .dt-title {
    margin: 0; font-family: var(--font-display);
    font-size: clamp(1.9rem, 7.4vw, 3.4rem); font-weight: 780; letter-spacing: -0.03em; line-height: 1.04;
    color: var(--txt); text-wrap: balance;
  }
  .dt-original { margin: 0; font-size: var(--fs-sm); color: var(--txt-2); }
  :root[data-theme="light"] .dt-title { color: #0b0b14; }
  :root[data-theme="light"] .dt-hero .dt-kicker { color: var(--accent-solid); }

  /* -------------------------------------------------------------- meta line --- */
  .dt-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 0;
    font-size: var(--fs-sm); font-weight: 600; color: var(--txt-2);
  }
  .dt-meta__dot { color: var(--txt-3); }
  .dt-meta__cert {
    border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--txt-2);
  }
  .dt-meta__score { display: inline-flex; align-items: center; gap: 6px; color: var(--txt); }
  .dt-meta__star { color: var(--accent); font-size: 15px; line-height: 1; }
  .dt-meta__votes { color: var(--txt-3); font-weight: 500; font-size: var(--fs-xs); }

  /* ------------------------------------------------------------------ body --- */
  /* a grid track may never grow past the page because a child has wide intrinsic content:
     every row is clipped by its own scroller instead (A30) */
  .dt-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); padding-top: var(--sp-4); }
  .dt-genres { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
  .dt-tagline {
    margin: 0; font-size: var(--fs-md); line-height: 1.5; color: var(--txt-2);
    font-style: italic; max-width: 62ch;
  }
  .dt-section { display: grid; gap: 10px; }
  .dt-h2 {
    margin: 0; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700;
    letter-spacing: -0.02em; color: var(--txt);
  }
  .dt-overview { margin: 0; max-width: 72ch; font-size: var(--fs-md); line-height: 1.72; color: var(--txt); }
  .dt-empty {
    margin: 0; padding: 14px 16px; max-width: 72ch; border-radius: var(--r-md);
    background: var(--surface); border: 1px dashed var(--line-2);
    color: var(--txt-2); font-size: var(--fs-sm); line-height: 1.6;
  }
  .dt-starring { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-sm); }
  .dt-starring__label { color: var(--txt-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
  .dt-cast__name { color: var(--txt); font-weight: 600; text-decoration: none; }
  .dt-cast__name:hover { color: var(--accent); }
  .dt-starring__sep { color: var(--txt-3); }

  /* facts table: hairline rows, label column that never collapses */
  /* ---- 3.3: where to watch, unique lead prose, production & themes ---- */
  .dt-overview--lead { font-size: var(--fs-md); line-height: 1.75; color: var(--txt); max-width: 74ch; }

  /* ---- 3.4: the single Watch CTA (Recommended · Best) ---- */
  .dt-cta {
    position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: var(--sp-3);
    padding: var(--sp-4); margin-bottom: var(--sp-3);
    border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
    background:
      radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
      var(--surface-2);
    animation: dtCtaIn 420ms var(--ease) both;
  }
  .dt-cta__glow {
    position: absolute; inset: -40% -10% auto auto; width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
    filter: blur(6px); pointer-events: none; animation: dtCtaGlow 7s ease-in-out infinite;
  }
  .dt-cta__head { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
  .dt-cta__mark {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; display: grid; place-content: center;
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    color: var(--accent-text);
  }
  .dt-cta__mark svg { width: 22px; height: 22px; }
  .dt-cta__badges { display: flex; gap: 6px; margin: 0 0 6px; }
  .dt-cta__badge {
    padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
    letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.5;
  }
  .dt-cta__badge--best { background: var(--accent-solid); color: var(--accent-ink); }
  .dt-cta__badge--rec { background: transparent; border: 1px solid var(--accent); color: var(--accent-text); }
  .dt-cta__title {
    margin: 0; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 800;
    letter-spacing: -0.01em; color: var(--txt);
  }
  .dt-cta__sub { margin: 4px 0 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--txt-2); max-width: 52ch; }
  .dt-cta__btn {
    --btn-hit: 48px;
    display: inline-flex; align-items: center; gap: 8px; min-height: var(--btn-hit); padding: 0 20px;
    border-radius: 999px; text-decoration: none; font-size: var(--fs-sm); font-weight: 750;
    color: var(--accent-text); background: transparent; border: 1px solid var(--accent);
    transition: background 220ms var(--ease), color 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
  }
  .dt-cta__btn:hover, .dt-cta__btn:focus-visible {
    background: var(--accent-solid); color: var(--accent-ink); transform: translateY(-1px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 28%, transparent);
  }
  .dt-cta__chev { font-size: 18px; line-height: 1; transform: translateY(-1px); }
  @keyframes dtCtaIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes dtCtaGlow { 0%, 100% { opacity: 0.5; transform: translate3d(0, 0, 0); } 50% { opacity: 0.9; transform: translate3d(-14px, 10px, 0); } }
  @media (prefers-reduced-motion: reduce) {
    .dt-cta, .dt-cta__glow { animation: none; }
  }
  @media (max-width: 560px) {
    .dt-cta__btn { width: 100%; justify-content: center; }
  }

  .dt-watch { display: grid; gap: var(--sp-3); }
  .dt-watch__group {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--sp-3) var(--sp-4);
  }
  .dt-watch__label {
    margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--accent-text);
  }
  .dt-watch__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
  .dt-watch__item {
    display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px 8px 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  }
  .dt-watch__logo, .dt-watch__mark {
    width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto;
    background: var(--surface-3); display: grid; place-content: center;
    font-size: var(--fs-xs); font-weight: 800; color: var(--txt-2);
  }
  .dt-watch__name { font-size: var(--fs-sm); font-weight: 650; color: var(--txt); }
  .dt-note { margin: 10px 0 0; font-size: var(--fs-xs); color: var(--txt-3); }
  /* A35: on phones the provider cards tighten up — same design, less height, no wasted gutter. */
  @media (max-width: 599px) {
    .dt-watch { gap: 10px; }
    .dt-watch__group { padding: 12px; border-radius: var(--r-md); }
    .dt-watch__label { margin-bottom: 8px; font-size: 11.5px; letter-spacing: 0.06em; }
    .dt-watch__list { gap: 6px; }
    .dt-watch__item {
      width: 100%; min-height: 44px; gap: 9px; padding: 5px 10px 5px 6px; border-radius: 10px;
    }
    .dt-watch__logo, .dt-watch__mark { width: 30px; height: 30px; border-radius: 8px; }
    .dt-watch__name { font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
    .dt-cred__side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dt-stat { padding: 10px 12px; }
  }

  .dt-cred { display: grid; gap: var(--sp-3); }
  .dt-cred__main { display: grid; gap: var(--sp-3); min-inline-size: 0; }
  .dt-cred__grid {
    margin: 0; display: grid; gap: 2px; min-inline-size: 0;
    border-top: 1px solid var(--line);
  }
  .dt-cred__row {
    display: grid; grid-template-columns: 1fr; gap: 2px; min-inline-size: 0;
    padding: 10px 0; border-bottom: 1px solid var(--line);
  }
  .dt-cred__row dt {
    margin: 0; color: var(--txt-3); font-size: var(--fs-xs); font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
  }
  .dt-cred__row dd { margin: 0; color: var(--txt); font-size: var(--fs-sm); line-height: 1.55; overflow-wrap: anywhere; }
  .dt-cred__link { color: var(--accent-text); text-decoration: none; font-weight: 600; }
  .dt-cred__link:hover { text-decoration: underline; }
  .dt-cred__block { min-inline-size: 0; }
  .dt-cred__k {
    margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--txt-3);
  }
  .dt-cred__cos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  .dt-cred__co {
    display: inline-flex; align-items: center; gap: 8px; max-inline-size: 100%;
    padding: 7px 12px 7px 8px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line);
    font-size: var(--fs-xs); font-weight: 600; color: var(--txt-2); line-height: 1.3;
  }
  .dt-cred__logo { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; flex: 0 0 auto; }
  .dt-cred__side { display: grid; grid-auto-flow: row; gap: 10px; }
  .dt-stat {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 12px 14px; display: grid; gap: 2px;
  }
  .dt-stat__k { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--txt-3); }
  .dt-stat__v { font-family: var(--font-display, inherit); font-size: clamp(1.15rem, 4.4vw, 1.5rem); font-weight: 800; color: var(--txt); letter-spacing: -0.01em; }
  @media (min-width: 900px) {
    .dt-cred { grid-template-columns: minmax(0, 1.9fr) minmax(200px, 1fr); align-items: start; gap: var(--sp-4); }
    .dt-cred__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-4); }
    .dt-cred__side { gap: var(--sp-2); }
    .dt-facts--wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  }
  .dt-sub {
    margin: var(--sp-4) 0 10px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--txt-3);
  }
  .dt-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  .dt-chip {
    padding: 7px 12px; border-radius: 999px; background: var(--surface-2);
    border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; color: var(--txt-2);
  }

  .dt-facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
  .dt-fact {
    display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: baseline;
    padding: 10px 0; border-bottom: 1px solid var(--line);
  }
  .dt-fact dt { margin: 0; color: var(--txt-3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
  .dt-fact dd { margin: 0; color: var(--txt); font-size: var(--fs-sm); line-height: 1.55; }


  /* ---------------------------------------------------- 3.6 gallery & lightbox --- */
  .dt-gal__wrap { position: relative; min-width: 0; overflow: hidden; }
  .dt-gal__rail {
    list-style: none; margin: var(--sp-3) 0 0; padding: 0 0 6px;
    display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 300px); gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px; scrollbar-width: thin;
  }
  .dt-gal__item { scroll-snap-align: start; min-inline-size: 0; }
  .dt-gal__btn {
    display: block; width: 100%; padding: 0; cursor: pointer; border: 1px solid var(--line);
    border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); line-height: 0;
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
  }
  .dt-gal__btn img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
  .dt-gal__btn:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 12px 26px rgba(0,0,0,0.32); }
  .dt-gal__btn:focus-visible { outline: var(--ring-w) solid var(--accent-ring); outline-offset: 3px; }
  .dt-gal__nav {
    position: absolute; top: 50%; right: 0; z-index: 3; display: none; place-items: center;
    width: 44px; height: 44px; padding: 0; cursor: pointer; transform: translateY(-50%);
    border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
    background: color-mix(in srgb, var(--surface) 86%, transparent); color: var(--accent-text);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 26px rgba(0,0,0,0.36), inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
    transition: transform 220ms var(--ease), left 220ms var(--ease), right 220ms var(--ease);
  }
  .dt-gal__nav svg { width: 22px; height: 22px; transition: transform 220ms var(--ease); }
  .dt-gal__nav[data-side='left'] { right: auto; left: 0; }
  .dt-gal__nav[data-side='left'] svg { transform: rotate(180deg); }
  @media (min-width: 900px) { .dt-gal__nav { display: grid; } }

  .dt-lite {
    position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
    background: color-mix(in srgb, #04060a 88%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    animation: dtFade 180ms var(--ease) both;
  }
  .dt-lite[hidden] { display: none !important; }
  .dt-lite__box { position: relative; max-width: min(1180px, 96vw); width: 100%; }
  .dt-lite__img {
    width: 100%; height: auto; max-height: 78vh; object-fit: contain; display: block;
    border-radius: var(--r-md); background: #000; border: 1px solid var(--line-2);
  }
  .dt-lite__x, .dt-lite__prev, .dt-lite__next {
    position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    cursor: pointer; border-radius: 50%; color: #fff; border: 1px solid rgba(255,255,255,0.24);
    background: rgba(10,12,16,0.62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .dt-lite__x { top: -52px; right: 0; }
  .dt-lite__prev { left: 8px; top: 50%; transform: translateY(-50%); }
  .dt-lite__next { right: 8px; top: 50%; transform: translateY(-50%); }
  .dt-lite__x svg, .dt-lite__prev svg, .dt-lite__next svg { width: 22px; height: 22px; }
  .dt-lite__cap {
    margin: 10px 0 0; text-align: center; color: rgba(255,255,255,0.82);
    font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.02em;
  }
  @keyframes dtFade { from { opacity: 0; } to { opacity: 1; } }

  /* ---------------------------------------------------------------- 3.6 reviews --- */
  .dt-rev__list { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: 12px; }
  .dt-rev__item {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--sp-3) var(--sp-4);
  }
  .dt-rev__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
  .dt-rev__who { font-size: var(--fs-sm); font-weight: 750; color: var(--txt); }
  .dt-rev__score {
    font-size: var(--fs-xs); font-weight: 800; color: var(--accent-ink);
    /* 13.7 — in the light theme --accent is the owner's #FF1900, where white ink only reaches 3.89:1. A filled chip
       carrying text must use --accent-solid (#E61200 = 4.72:1), which is exactly what A10 reserved it for. */
    background: var(--accent-solid); border-radius: 999px; padding: 3px 9px;
  }
  .dt-rev__date { font-size: var(--fs-xs); color: var(--txt-3); font-weight: 600; margin-left: auto; }
  .dt-rev__txt { margin: 0; font-size: var(--fs-sm); line-height: 1.7; color: var(--txt-2); }
  .dt-rev__txt--full { margin-top: 8px; }
  .dt-rev__more {
    margin-top: 10px; min-height: 40px; padding: 0 14px; cursor: pointer;
    border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line));
    background: transparent; color: var(--accent-text); font-size: var(--fs-xs); font-weight: 750;
    transition: background 200ms var(--ease), color 200ms var(--ease);
  }
  .dt-rev__more:hover, .dt-rev__more:focus-visible { background: var(--accent); color: var(--accent-ink); }

  /* --------------------------------------------------------------- 3.6 episodes --- */
  /* A72 — season rail: every chip sizes to its own label. Before this, flex let each chip shrink to its 44px
     minimum while the text kept its full width, so 24 seasons piled on top of each other on phones and desktop. */
  .dt-seasons {
    display: flex; flex-wrap: nowrap; align-items: stretch; gap: 8px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    padding: 4px 0 12px; margin: 0 0 4px;
    scrollbar-width: thin; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .dt-seasons > * { scroll-snap-align: start; }
  .dt-seasons__btn {
    flex: 0 0 auto; min-width: 0; max-width: 220px;
    display: inline-grid; align-content: center; gap: 2px;
    padding: 10px 14px; border-radius: 12px;
    border: 1px solid var(--line-2); background: var(--surface-2); color: var(--txt-2);
    font: inherit; text-align: left; cursor: pointer; white-space: nowrap;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
  }
  .dt-seasons__btn:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--line-2)); color: var(--txt); }
  .dt-seasons__btn[aria-pressed='true'] {
    background: var(--accent); border-color: transparent; color: var(--accent-ink);
  }
  .dt-seasons__btn[aria-pressed='true'] .dt-seasons__c { color: color-mix(in oklab, var(--accent-ink) 72%, transparent); }
  .dt-seasons__n { font-size: var(--fs-sm); font-weight: 750; white-space: nowrap; }
  .dt-seasons__c { font-size: var(--fs-xs); color: var(--txt-3); font-weight: 600; white-space: nowrap; }
  .dt-eps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .dt-ep {
    display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start;
    padding: 11px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  }
  .dt-ep__no {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    background: var(--surface-3); color: var(--txt-2); font-size: var(--fs-xs); font-weight: 800;
  }
  .dt-ep__body { display: grid; gap: 3px; min-inline-size: 0; }
  .dt-ep__top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .dt-ep__name { font-size: var(--fs-sm); font-weight: 700; color: var(--txt); }
  .dt-ep__meta { font-size: var(--fs-xs); color: var(--txt-3); font-weight: 600; }
  .dt-ep__txt { font-size: var(--fs-xs); line-height: 1.6; color: var(--txt-2); }
  .dt-ep--empty { grid-template-columns: 1fr; color: var(--txt-3); font-size: var(--fs-sm); }
  .dt-eps__note { margin: 10px 0 0; font-size: var(--fs-xs); color: var(--txt-3); min-height: 1em; }

  /* ------------------------------------------------------------- 3.6 cast more --- */
  .dt-cast__foot { display: flex; justify-content: center; margin-top: 12px; }
  .dt-more {
    min-height: 44px; padding: 0 18px; cursor: pointer; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line));
    background: transparent; color: var(--accent-text); font-size: var(--fs-xs); font-weight: 750;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease);
  }
  .dt-more:hover, .dt-more:focus-visible { background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
  .dt-more__chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-1px); transition: transform 220ms var(--ease); }
  .dt-more[aria-expanded='true'] .dt-more__chev { transform: rotate(-135deg) translateY(-1px); }

  /* --------------------------------------------------------------- 3.6 report --- */
  .dt-report {
    position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px;
    background: color-mix(in srgb, #04060a 82%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    animation: dtFade 180ms var(--ease) both;
  }
  .dt-report[hidden] { display: none !important; }
  .dt-report__box {
    width: min(520px, 96vw); max-height: 88vh; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
    padding: var(--sp-4); box-shadow: 0 30px 70px rgba(0,0,0,0.5);
  }
  .dt-report__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .dt-report__h { margin: 0; font-size: clamp(1.1rem, 4.6vw, 1.35rem); font-weight: 800; letter-spacing: -0.01em; }
  .dt-report__x {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
    border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--txt-2);
  }
  .dt-report__x svg { width: 20px; height: 20px; }
  .dt-report__lead { margin: 10px 0 14px; font-size: var(--fs-sm); line-height: 1.6; color: var(--txt-2); }
  .dt-report__form { display: grid; gap: 12px; }
  .dt-report__reasons { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
  .dt-report__legend { padding: 0; margin-bottom: 4px; font-size: var(--fs-xs); font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--txt-3); }
  .dt-report__opt { cursor: pointer; }
  .dt-report__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .dt-report__optbox {
    display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px;
    border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2);
    font-size: var(--fs-sm); font-weight: 600; color: var(--txt-2);
    transition: border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
  }
  .dt-report__radio {
    width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
    border: 2px solid color-mix(in srgb, var(--txt-3) 70%, var(--line)); background: transparent;
    transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
  }
  .dt-report__opt input:checked + .dt-report__optbox {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
    background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); color: var(--txt);
  }
  .dt-report__opt input:checked + .dt-report__optbox .dt-report__radio { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }
  .dt-report__opt input:focus-visible + .dt-report__optbox { outline: var(--ring-w) solid var(--accent-ring); outline-offset: 2px; }
  .dt-report__label { font-size: var(--fs-xs); font-weight: 700; color: var(--txt-3); letter-spacing: 0.04em; }
  .dt-report__label span { font-weight: 600; text-transform: none; letter-spacing: 0; }
  .dt-report__note {
    width: 100%; min-height: 84px; padding: 12px 14px; resize: vertical; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--line); color: var(--txt);
    font: inherit; font-size: var(--fs-sm); line-height: 1.6;
  }
  .dt-report__note:focus-visible { outline: var(--ring-w) solid var(--accent-ring); outline-offset: 2px; }
  .dt-report__msg { margin: 0; min-height: 1.2em; font-size: var(--fs-xs); font-weight: 650; color: var(--txt-3); }
  .dt-report__msg[data-state='ok'] { color: var(--accent-text); }
  .dt-report__msg[data-state='err'] { color: #ff6b6b; }
  .dt-report__actions { display: flex; gap: 10px; }
  .dt-report__send {
    flex: 1 1 auto; min-height: 48px; cursor: pointer; border-radius: var(--r-pill); border: 1px solid transparent;
    background: var(--accent); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 800;
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
  }
  .dt-report__send:hover { transform: translateY(-1px); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 34%, transparent); }
  .dt-report__send[disabled] { opacity: 0.6; cursor: progress; }
  .dt-report__cancel {
    min-height: 48px; padding: 0 18px; cursor: pointer; border-radius: var(--r-pill);
    background: transparent; border: 1px solid var(--line-2); color: var(--txt-2); font-size: var(--fs-sm); font-weight: 700;
  }
  @media (max-width: 599px) {
    .dt-gal__rail { grid-auto-columns: min(84vw, 320px); }
    .dt-lite__x { top: -50px; }
    .dt-report__box { padding: var(--sp-3); }
    .dt-cred__grid { border-top: 0; }
  }


  /* --------------------------------------------------- A37 share panel (premium) --- */
  .dt-share {
    position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 16px;
    background: color-mix(in srgb, #04060a 84%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    animation: dtFade 180ms var(--ease) both;
  }
  .dt-share[hidden] { display: none !important; }
  .dt-share__box {
    width: min(486px, 96vw); max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
    padding: var(--sp-4); box-shadow: 0 34px 80px rgba(0,0,0,0.55), inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent);
  }
  .dt-share__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .dt-share__h { margin: 0; font-size: clamp(1.05rem, 4.4vw, 1.3rem); font-weight: 800; letter-spacing: -0.01em; color: var(--txt); }
  .dt-share__sub { margin: 3px 0 0; font-size: var(--fs-sm); color: var(--txt-2); font-weight: 600; }
  .dt-share__x {
    flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
    border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--txt-2);
    transition: color 180ms var(--ease), border-color 180ms var(--ease);
  }
  .dt-share__x:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
  .dt-share__x svg { width: 20px; height: 20px; }
  .dt-share__eyebrow {
    margin: 16px 0 7px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--txt-3);
  }
  /* the unfurl card people will actually see in a feed */
  .dt-share__card {
    display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--surface-2);
  }
  .dt-share__media { display: block; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
  .dt-share__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .dt-share__mediafall {
    display: grid; place-items: center; width: 100%; height: 100%;
    font-size: 34px; font-weight: 800; letter-spacing: 0.04em;
    color: color-mix(in srgb, var(--accent) 72%, var(--txt)); background: var(--surface-3);
  }
  .dt-share__metablock {
    display: grid; gap: 2px; padding: 10px 12px 12px;
    border-top: 1px solid var(--line);
  }
  .dt-share__domain { font-size: var(--fs-xs); color: var(--txt-3); font-weight: 700; letter-spacing: 0.02em; }
  .dt-share__cardtitle {
    font-size: var(--fs-sm); font-weight: 750; color: var(--txt); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .dt-share__cardfacts { font-size: var(--fs-xs); color: var(--txt-2); font-weight: 600; }
  /* copy row */
  .dt-share__copyrow { display: flex; gap: 8px; }
  .dt-share__url {
    flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 0 12px; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--line); color: var(--txt-2);
    font: inherit; font-size: var(--fs-xs); font-weight: 600; text-overflow: ellipsis;
  }
  .dt-share__url:focus-visible { outline: var(--ring-w) solid var(--accent-ring); outline-offset: 2px; }
  .dt-share__copy {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 0 16px;
    cursor: pointer; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink);
    border: 1px solid transparent; font-size: var(--fs-sm); font-weight: 800;
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
  }
  .dt-share__copy:hover { transform: translateY(-1px); box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 32%, transparent); }
  .dt-share__copy[data-copied='1'] { background: color-mix(in srgb, var(--accent) 26%, var(--surface-2)); color: var(--accent-text); }
  .dt-share__copyico { display: grid; place-items: center; }
  .dt-share__copyico svg { width: 17px; height: 17px; }
  /* network tiles */
  .dt-share__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .dt-share__tile {
    display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 76px; padding: 8px 4px;
    border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2);
    text-decoration: none; color: var(--txt-2);
    transition: transform 190ms var(--ease), border-color 190ms var(--ease), background 190ms var(--ease), color 190ms var(--ease), box-shadow 190ms var(--ease);
  }
  .dt-share__ico { display: grid; place-items: center; width: 24px; height: 24px; color: var(--brand, var(--txt-2)); transition: color 190ms var(--ease); }
  .dt-share__ico svg { width: 22px; height: 22px; }
  .dt-share__net { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.01em; text-align: center; line-height: 1.2; }
  .dt-share__tile:hover, .dt-share__tile:focus-visible {
    transform: translateY(-2px); color: #fff; border-color: transparent; background: var(--brand, var(--accent));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--brand, var(--accent)) 34%, transparent);
  }
  .dt-share__tile:hover .dt-share__ico, .dt-share__tile:focus-visible .dt-share__ico { color: #fff; }
  .dt-share__tile:focus-visible { outline: var(--ring-w) solid var(--accent-ring); outline-offset: 2px; }
  .dt-share__native {
    width: 100%; margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 46px; cursor: pointer; border-radius: var(--r-pill); background: transparent;
    border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line)); color: var(--accent-text);
    font-size: var(--fs-sm); font-weight: 750;
    transition: background 200ms var(--ease), color 200ms var(--ease);
  }
  .dt-share__native:hover { background: var(--accent); color: var(--accent-ink); }
  .dt-share__native .dt-share__ico { color: currentColor; }
  .dt-share__msg { margin: 10px 0 0; min-height: 1.1em; text-align: center; font-size: var(--fs-xs); font-weight: 650; color: var(--txt-3); }
  .dt-share__msg[data-state='ok'] { color: var(--accent-text); }
  @media (max-width: 599px) {
    .dt-share { align-items: end; padding: 0; }
    .dt-share__box {
      width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; border-bottom: 0;
      padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
      animation: dtSheetUp 240ms var(--ease) both;
    }
    .dt-share__grid { gap: 7px; }
    .dt-share__tile { min-height: 72px; }
    .dt-share__net { font-size: 12px; }
  }
  @keyframes dtSheetUp { from { transform: translateY(22px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

  /* ---------------------------------------------------------------- errors --- */
  .dt--error { padding-top: var(--sp-6); display: grid; gap: var(--sp-3); max-width: 64ch; }
  .dt-title--error { font-size: clamp(1.5rem, 6vw, 2.2rem); }
  .dt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .dt-input {
    flex: 1 1 220px; min-height: 48px; padding: 0 16px; border-radius: var(--r-pill);
    background: var(--surface); border: 1px solid var(--line-2); color: var(--txt);
    font: inherit; font-size: var(--fs-sm);
  }
  .dt-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 var(--ring-w) var(--accent-ring); }
  .dt-links { display: flex; flex-wrap: wrap; gap: 8px; }

  /* --------------------------------------------------------------- desktop --- */
  @media (min-width: 768px) {
    .dt-hero { min-height: clamp(320px, 52vh, 520px); }
    .dt-hero__inner { padding-block: var(--sp-6) var(--sp-5); }
  }
  @media (min-width: 1024px) {
    .dt-hero { border-radius: 0 0 var(--r-lg) var(--r-lg); }
    .dt-fact { grid-template-columns: 132px 1fr; }
    .dt-body { padding-top: var(--sp-5); }
  }
  @media (prefers-reduced-motion: no-preference) {
    .dt-hero__img { animation: dt-in 520ms var(--ease) both; }
    @keyframes dt-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1.02); } }
  }
}


  /* ============================== Step 3.2 — trailer stage, actions, cast ============================== */

  /* ------------------------------------------------------------------- stage --- */
  /* The stage sits above the poster but below the title block. Until the viewer presses play it is
     an empty, transparent layer: no third-party request, no cost, nothing to crawl. */
  .dt-stage {
    position: absolute; inset: 0; z-index: 0;
    background: #000;
    opacity: 0; pointer-events: none;
    transition: opacity 260ms var(--ease);
  }
  .dt-hero.is-live .dt-stage { opacity: 1; pointer-events: auto; }
  /* a class-level display:grid outranks the UA [hidden] rule, so every overlay that can be hidden
     must say it explicitly — without this the loading veil covered the picture and the end card
     ghosted over a playing trailer */
  .dt-stage [hidden] { display: none !important; }

  .dt-stage__frame, .dt-stage__iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
  .dt-stage__frame { overflow: hidden; }
  .dt-stage__iframe {
    border: 0; display: block;
    /* the single most important guard: no click anywhere in the frame can ever reach YouTube */
    pointer-events: none;
  }
  .dt-stage__ui { position: absolute; inset: 0; }

  /* masks: YouTube paints its logo + "Watch on YouTube" chip in the top-left when it is paused or
     hovered, and a watermark bottom-right. These cover both without touching the picture. */
  .dt-stage__mask { position: absolute; pointer-events: none; transition: opacity 240ms var(--ease); }
  /* YouTube paints its title chip over the first seconds and its logo whenever it pauses. While the
     trailer is warming up the band is solid; once it is playing steadily it relaxes to a slim
     cinematic vignette, so the picture is not permanently cropped. */
  .dt-stage__mask--top {
    inset: 0 0 auto 0; height: 104px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 62%, rgba(0, 0, 0, 0) 100%);
    transition: height 420ms var(--ease), opacity 240ms var(--ease);
  }
  .dt-stage[data-warm="1"] .dt-stage__mask--top { height: 44px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0)); }
  .dt-stage[data-state="paused"] .dt-stage__mask--top,
  .dt-stage[data-state="failed"] .dt-stage__mask--top,
  .dt-stage[data-state="ended"] .dt-stage__mask--top { height: 104px; background: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 62%, rgba(0, 0, 0, 0) 100%); }
  /* covers YouTube's bottom-right watermark plus the "More videos / Watch on YouTube" suggestion
     block it paints at the start and near the end — a soft vignette, not a visible slab */
  .dt-stage__mask--corner {
    right: 0; bottom: 0; width: 500px; height: 210px;
    background:
      radial-gradient(120% 130% at 100% 100%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 38%, rgba(0, 0, 0, 0.5) 62%, rgba(0, 0, 0, 0) 86%);
  }

  /* A32: no black blur may sit above or below a playing picture. The bands exist only to cover
     YouTube's own chrome while it is loading, paused, failed or finished — the moment we are
     playing they are gone and the frame is pure film. */
  .dt-stage[data-state="playing"] .dt-stage__mask { opacity: 0; }
  /* A32: YouTube's player renders a little darker than the poster around it; lift it so a phone
     screen reads as bright as the rest of the page */
  .dt-hero.is-live .dt-stage__iframe { filter: brightness(1.08) saturate(1.04); }
  /* if the widget never reports, do not fake a timeline — hide the readout and keep the actions */
  .dt-stage[data-silent="1"] .dt-ctl__time,
  .dt-stage[data-silent="1"] .dt-ctl__range { visibility: hidden; }

  /* the click surface: the iframe is inert, so this is what a tap on the picture hits */
  .dt-stage__hit {
    position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer;
    padding: 0; margin: 0;
  }
  .dt-stage__load {
    position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 12px;
    background: radial-gradient(70% 70% at 50% 45%, rgba(4, 5, 8, 0.55), rgba(4, 5, 8, 0.86) 100%);
    color: #fff; pointer-events: none;
  }
  .dt-stage__spin {
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22); border-top-color: var(--accent-solid);
    animation: dt-spin 900ms linear infinite;
  }
  .dt-stage__loadtext { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.86); }
  @keyframes dt-spin { to { transform: rotate(360deg); } }
  .dt-stage__bar, .dt-stage__unmute, .dt-stage__pause, .dt-stage__end, .dt-stage__fail { z-index: 3; }

  /* the sound chip: browsers autoplay muted only, so this is the one tap that unlocks audio */
  .dt-stage__unmute {
    position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 16px; border-radius: 999px;
    border: 1px solid color-mix(in oklab, var(--accent-solid) 46%, transparent);
    background: rgba(6, 7, 10, 0.82); backdrop-filter: blur(10px);
    color: #fff; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
    animation: dt-rise 320ms var(--ease) both;
    transition: background 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease);
  }
  .dt-stage__unmute:hover { background: var(--accent-solid); color: var(--accent-ink); border-color: var(--accent-solid); }
  .dt-stage__unmuteicon { display: grid; place-items: center; width: 18px; height: 18px; }
  .dt-stage__unmuteicon svg { width: 17px; height: 17px; }
  @keyframes dt-rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

  /* our own pause + end cards: they cover YouTube's pause screen and end screen edge to edge */
  .dt-stage__pause {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(4, 5, 8, 0.34);
    border: 0; cursor: pointer; color: #fff;
  }
  .dt-stage__pauseicon {
    width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%;
    background: var(--accent-solid); color: var(--accent-ink);
    box-shadow: 0 12px 34px -12px var(--accent-glow);
    animation: dt-pulse 2.6s var(--ease) infinite;
  }
  .dt-stage__pauseicon svg { width: 32px; height: 32px; }
  @keyframes dt-pulse {
    0%, 100% { box-shadow: 0 12px 34px -12px var(--accent-glow), 0 0 0 0 var(--accent-ring); }
    60% { box-shadow: 0 12px 34px -12px var(--accent-glow), 0 0 0 16px transparent; }
  }
  .dt-stage__fail {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
    padding: var(--sp-5); text-align: center;
    background: radial-gradient(64% 64% at 50% 45%, rgba(6, 7, 10, 0.86), rgba(6, 7, 10, 0.97) 100%);
  }
  .dt-stage__failtitle {
    margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); color: #fff; letter-spacing: -0.01em;
  }
  .dt-stage__failnote { margin: 0; max-width: 44ch; font-size: var(--fs-sm); line-height: 1.6; color: rgba(255, 255, 255, 0.76); }
  .dt-stage__fail .dt-stage__endbtns { margin-top: var(--sp-2); }
  .dt-stage__end {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--sp-3);
    background: radial-gradient(60% 60% at 50% 45%, rgba(4, 5, 8, 0.72), rgba(4, 5, 8, 0.94) 100%);
    backdrop-filter: blur(2px);
  }
  .dt-stage__endlabel {
    margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
    font-size: var(--fs-lg); color: #fff;
  }
  /* the stage is a big touch surface: its buttons keep the 44px law like everything else */
  .dt-stage__endbtns { display: flex; gap: var(--sp-2); }
  .dt-stage__endbtns .btn { min-height: 44px; padding-inline: 20px; }
  .dt-stage__endbtns .btn--ghost { color: #fff; --btn-fg: #fff; border-color: rgba(255, 255, 255, 0.28); }
  .dt-stage__endbtns .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

  /* the control bar is ours, so it can be quiet and premium: one accent play, one track, one exit */
  .dt-stage__bar {
    position: absolute; inset: auto 0 0 0;
    display: flex; align-items: center; gap: 4px;
    padding: 16px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    /* dense enough that YouTube's own bottom-right logo and "More videos" chip, which sit in this
       exact band, can never read through our controls */
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.94) 58%, rgba(0, 0, 0, 0) 100%);
  }
  .dt-ctl {
    flex: none; width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 50%; border: 0; background: transparent; color: #fff; cursor: pointer;
    transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
  }
  .dt-ctl svg { width: 22px; height: 22px; }
  .dt-ctl:hover { background: rgba(255, 255, 255, 0.14); }
  .dt-ctl:active { transform: scale(0.94); }
  .dt-ctl:focus-visible { outline: 2px solid var(--accent-solid); outline-offset: 2px; }
  .dt-ctl--play { background: var(--accent-solid); color: var(--accent-ink); }
  .dt-ctl--play:hover { background: var(--accent-solid); filter: brightness(1.06); }
  .dt-ctl[data-icon="pause"] svg { transform: scale(0.92); }
  .dt-ctl__range {
    flex: 1 1 auto; min-width: 60px; height: 44px; margin: 0 4px;
    appearance: none; background: transparent; cursor: pointer;
  }
  .dt-ctl__range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.28); }
  .dt-ctl__range::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.28); }
  .dt-ctl__range::-webkit-slider-thumb {
    appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%;
    background: var(--accent-solid); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent-solid) 26%, transparent);
  }
  .dt-ctl__range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent-solid); }
  .dt-ctl__time {
    flex: none; font-variant-numeric: tabular-nums; font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.82); padding-inline: 2px 4px; white-space: nowrap;
  }
  .dt-stage:fullscreen { display: block; }
  .dt-stage:fullscreen .dt-stage__iframe { height: 100%; }

  /* a wide banner would letterbox a 16:9 trailer into a small strip in the middle. While the
     trailer runs the hero becomes the frame itself, so the picture is edge to edge. */
  .dt-hero.is-live {
    /* exactly the picture's ratio, never wider, so the frame has no side bars either */
    aspect-ratio: 16 / 9; min-height: 0; max-height: none;
    width: min(100%, calc(78vh * 16 / 9));
    margin-inline: auto;
    align-items: stretch;
  }
  .dt-hero.is-live .dt-stage { position: absolute; inset: 0; }
  .dt-hero.is-live .dt-stage__iframe { height: 100%; width: 100%; }
  .dt-hero.is-live .dt-hero__inner { opacity: 0; pointer-events: none; }
  .dt-hero__inner { transition: opacity 220ms var(--ease); }
  .dt-hero.is-live .dt-hero__scrim { opacity: 0; }
  .dt-hero__scrim { transition: opacity 260ms var(--ease); }

  /* ------------------------------------------------------------------ play CTA --- */
  .dt-hero__ctl { margin-top: var(--sp-3); display: flex; }
  .dt-play {
    display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 20px 8px 8px;
    border-radius: 999px; border: 1px solid color-mix(in oklab, var(--accent-solid) 42%, transparent);
    background: color-mix(in oklab, var(--bg) 62%, transparent);
    backdrop-filter: blur(10px); color: var(--txt);
    cursor: pointer; text-align: left;
    transition: background 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 240ms var(--ease);
  }
  .dt-play:hover {
    border-color: var(--accent-solid); background: color-mix(in oklab, var(--accent-solid) 12%, transparent);
    transform: translateY(-1px); box-shadow: 0 12px 30px -14px var(--accent-glow);
  }
  .dt-play:active { transform: translateY(0) scale(0.99); }
  .dt-play:focus-visible { outline: 2px solid var(--accent-solid); outline-offset: 3px; }
  .dt-play__badge {
    flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent-solid); color: var(--accent-ink);
  }
  .dt-play__badge svg { width: 20px; height: 20px; margin-left: 2px; }
  .dt-play__text { display: grid; gap: 1px; line-height: 1.2; }
  .dt-play__text strong { font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.01em; }
  .dt-play__text span { font-size: var(--fs-xs); color: var(--txt-2); max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dt-hero__none {
    margin: var(--sp-3) 0 0; display: inline-flex; align-items: center; gap: 8px;
    font-size: var(--fs-sm); color: var(--txt-2);
  }
  .dt-hero__noneicon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--txt-3); }
  .dt-hero__noneicon svg { width: 20px; height: 20px; }

  /* --------------------------------------------------------------- action row --- */
  /* ---- A29 + A30: four actions, one line, premium at rest, solid on press ---- */
  .dt-act { display: flex; flex-wrap: wrap; gap: 10px; padding: var(--sp-2) 0 var(--sp-4); }
  .dt-act__btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 16px 0 10px; border-radius: 15px; cursor: pointer;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 62%, transparent), transparent 78%),
      var(--surface);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); color: var(--txt); overflow: hidden;
    font-size: var(--fs-sm); font-weight: 700; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 14%, transparent), 0 1px 2px rgba(0, 0, 0, 0.26),
                inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent);
    transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease),
                transform 200ms var(--ease), box-shadow 200ms var(--ease);
  }
  /* the icon sits in its own quiet tile so the row reads as crafted, not as default buttons */
  .dt-act__icon {
    flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
    background: color-mix(in srgb, var(--surface-3) 78%, transparent);
    border: 1px solid color-mix(in srgb, var(--line-2) 70%, transparent);
    color: var(--txt-2); transition: color 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
  }
  .dt-act__icon svg { width: 17px; height: 17px; }
  .dt-act__label { position: relative; top: -0.5px; }
  /* A31: the row glows with the theme accent at medium opacity — the buttons must be visible as
     surfaces on a phone, not floating glyphs on black */
  .dt-act__btn::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: 0;
    background: radial-gradient(120% 120% at 50% 115%, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 68%);
    opacity: 0.55; transition: opacity 220ms var(--ease);
  }
  .dt-act__btn > * { position: relative; z-index: 1; }
  .dt-act__btn:hover::before { opacity: 1; }
  .dt-act__btn--focus::before { opacity: 0.9; background: radial-gradient(120% 120% at 50% 112%, color-mix(in srgb, var(--accent) 46%, transparent) 0%, transparent 70%); }
  .dt-act__btn:hover {
    border-color: color-mix(in srgb, var(--accent) 62%, transparent); color: var(--accent-text);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 18%, transparent), 0 1px 2px rgba(0, 0, 0, 0.3);
  }
  .dt-act__btn:hover .dt-act__icon {
    color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  }
  .dt-act__btn:focus-visible { outline: 2px solid var(--accent-solid); outline-offset: 2px; }
  /* press: the whole pill fills with the theme accent, ink flips, the tile goes translucent */
  .dt-act__btn:active, .dt-act__btn.is-pressed {
    background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-ink);
    transform: translateY(0) scale(0.985);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 32%, transparent);
  }
  .dt-act__btn:active .dt-act__icon, .dt-act__btn.is-pressed .dt-act__icon {
    color: var(--accent-ink); background: color-mix(in srgb, var(--accent-ink) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent-ink) 22%, transparent);
  }
  /* the focused action: How to watch owns the accent from the first glance */
  .dt-act__btn--focus {
    color: var(--accent-text);
    border-color: color-mix(in srgb, var(--accent) 58%, transparent);
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 82%),
      color-mix(in srgb, var(--accent) 7%, var(--surface));
    box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 12%, transparent), inset 0 1px 0 color-mix(in srgb, var(--accent) 22%, transparent);
  }
  .dt-act__btn--focus .dt-act__icon {
    color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 88%, transparent);
    border-color: color-mix(in srgb, var(--accent) 88%, transparent);
  }
  .dt-act__btn[data-on="1"] { border-color: var(--accent-solid); background: color-mix(in srgb, var(--accent-solid) 14%, var(--surface)); color: var(--accent-text); }
  .dt-act__btn[data-on="1"] .dt-act__icon { color: var(--accent-text); }
  .dt-act__btn[data-on="1"] .dt-act__icon svg path { fill: color-mix(in srgb, var(--accent-solid) 34%, transparent); }

  /* mobile: exactly four columns, icon tile over label, compact but still premium */
  /* A31: while a trailer runs on a phone the hero becomes the picture — no tall black letterbox
     above and below it, and the cinematic bands scale to a 240px-tall frame */
  @media (max-width: 900px) {
    .dt-hero.is-live { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
    .dt-hero.is-live .dt-stage { inset: 0; }
    .dt-stage__mask--top { height: 62px; }
    .dt-stage[data-warm="1"] .dt-stage__mask--top { height: 30px; }
    .dt-stage[data-state="paused"] .dt-stage__mask--top,
    .dt-stage[data-state="failed"] .dt-stage__mask--top,
    .dt-stage[data-state="ended"] .dt-stage__mask--top { height: 62px; }
    .dt-stage__mask--corner { width: 190px; height: 105px; }
    .dt-stage__bar { padding: 8px 10px 10px; gap: 7px; }
    .dt-ctl { width: 40px; height: 40px; }
    .dt-ctl--play { width: 44px; height: 44px; }
  }

  @media (max-width: 640px) {
    .dt-act { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding-bottom: var(--sp-4); }
    .dt-act__btn {
      flex-direction: column; gap: 5px; min-height: 58px; padding: 7px 2px 6px;
      border-radius: 14px; font-size: 12px; font-weight: 700; line-height: 1.1;
      letter-spacing: -0.015em; white-space: normal; text-align: center;
    }
    .dt-act__icon { width: 26px; height: 26px; border-radius: 8px; }
    .dt-act__icon svg { width: 16px; height: 16px; }
    .dt-act__label { display: block; top: 0; }
  }
  /* the scroll landing must clear the sticky topbar */
  #watch { scroll-margin-top: calc(var(--hdr) + 14px); }

  /* --------------------------------------------------------------------- cast --- */
  .dt-cast__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
  .dt-cast__count { font-size: var(--fs-xs); color: var(--txt-3); font-variant-numeric: tabular-nums; }
  .dt-cast__wrap { position: relative; min-width: 0; overflow: hidden; }
  /* one premium slide button: it lives on the side that still has faces (A30) */
  .dt-cast__nav {
    position: absolute; top: 50%; right: 0; z-index: 3;
    display: none; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
    transform: translateY(-50%);
    border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    color: var(--accent-text);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
    transition: left 380ms cubic-bezier(0.22, 0.9, 0.24, 1), right 380ms cubic-bezier(0.22, 0.9, 0.24, 1),
                background 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease), opacity 200ms var(--ease);
  }
  .dt-cast__nav svg { width: 20px; height: 20px; transition: transform 380ms cubic-bezier(0.22, 0.9, 0.24, 1); }
  .dt-cast__nav:hover, .dt-cast__nav:focus-visible {
    background: var(--accent-solid); color: var(--accent-ink); border-color: var(--accent-solid);
    outline: none; transform: translateY(-50%) scale(1.04);
  }
  .dt-cast__nav[data-side="left"] { right: auto; left: 0; }
  .dt-cast__nav[data-side="left"] svg { transform: rotate(180deg); }
  .dt-cast__nav[hidden] { display: none !important; }
  @media (min-width: 900px) {
    .dt-cast__wrap { --cast-nav: 44px; }
    .dt-cast__nav { display: grid; }
  }
  .dt-cast__rail {
    list-style: none; margin: var(--sp-3) 0 0; padding: 0 0 6px;
    display: grid; grid-auto-flow: column; grid-auto-columns: 108px; gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: thin;
    scroll-padding-inline: 2px;
  }
  .dt-cast__item { scroll-snap-align: start; }
  .dt-cast__card {
    display: grid; gap: 6px; text-decoration: none; color: var(--txt);
    padding: 6px; border-radius: var(--r-md); border: 1px solid transparent;
    transition: background 200ms var(--ease), border-color 200ms var(--ease), transform 220ms var(--ease);
  }
  .dt-cast__card:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-2px); }
  .dt-cast__card:focus-visible { outline: 2px solid var(--accent-solid); outline-offset: 2px; }
  .dt-cast__ph {
    position: relative; display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
    background: linear-gradient(160deg, var(--surface-3), var(--surface-2));
    display: grid; place-items: center;
  }
  .dt-cast__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
  .dt-cast__initials { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--txt-3); }
  .dt-cast__name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.25; }
  .dt-cast__role { font-size: var(--fs-xs); color: var(--txt-3); line-height: 1.25; }
  .dt-cast__name, .dt-cast__role { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* -------------------------------------------------------------------- toast --- */
  .dt-toast {
    position: fixed; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 12px); z-index: var(--z-toast, 60);
    margin: 0; padding: 10px 18px; border-radius: 999px;
    background: var(--surface-3); color: var(--txt); border: 1px solid var(--line-2);
    font-size: var(--fs-sm); font-weight: 600; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.7);
    opacity: 0; pointer-events: none;
    transition: opacity 200ms var(--ease), transform 220ms var(--ease);
  }
  .dt-toast[data-show="1"] { opacity: 1; transform: translate(-50%, 0); }

  @media (min-width: 900px) {
    .dt-act { padding-bottom: var(--sp-5); }
    .dt-cast__rail { grid-auto-columns: 120px; gap: 14px; }
    .dt-stage__bar { padding: 10px 16px; gap: 8px; }
    .dt-ctl__time { font-size: var(--fs-sm); }
    .dt-toast { bottom: 28px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .dt-stage__pauseicon { animation: none; }
    .dt-stage, .dt-hero__inner, .dt-hero__scrim, .dt-play, .dt-act__btn, .dt-cast__card, .dt-toast { transition-duration: 1ms; }
  }


  /* ------------------------------------- A38: the share dialog fits, it never needs a scrollbar --- */
  .dt-share { padding: 12px; }
  .dt-share__box {
    width: min(472px, 96vw);
    max-height: calc(100dvh - 24px);
    padding: 18px 18px 16px;
    overflow: hidden;                       /* the content is sized to fit; a scrollbar means a bug */
  }
  .dt-share__head { align-items: center; }
  .dt-share__h { font-size: 1.06rem; }
  .dt-share__sub { margin-top: 2px; font-size: var(--fs-xs); }
  .dt-share__x { width: 40px; height: 40px; }
  .dt-share__x svg { width: 18px; height: 18px; }
  .dt-share__eyebrow { margin: 11px 0 6px; }
  /* the unfurl card is the hero of the panel: wide and short so the whole dialog clears a 768px screen */
  .dt-share__media { aspect-ratio: auto; height: 108px; }
  .dt-share__metablock { padding: 8px 11px 10px; gap: 1px; }
  .dt-share__cardtitle { font-size: var(--fs-xs); -webkit-line-clamp: 1; }
  .dt-share__cardfacts { font-size: 12px; }
  .dt-share__copyrow { gap: 7px; }
  .dt-share__url, .dt-share__copy { min-height: 42px; }
  .dt-share__copy { padding: 0 14px; }
  .dt-share__grid { gap: 7px; }
  .dt-share__tile { min-height: 62px; padding: 6px 3px; gap: 4px; }
  .dt-share__ico { width: 20px; height: 20px; }
  .dt-share__ico svg { width: 19px; height: 19px; }
  .dt-share__net { font-size: 12px; }
  .dt-share__native { min-height: 42px; margin-top: 8px; }
  .dt-share__msg { margin-top: 7px; min-height: 0.9em; }
  @media (max-width: 599px) {
    .dt-share { padding: 0; align-items: end; }
    .dt-share__box { width: 100%; padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px)); max-height: 92dvh; }
    .dt-share__media { height: 96px; }
    .dt-share__tile { min-height: 58px; }
    .dt-share__h { font-size: 1rem; }
  }
  /* a genuinely short viewport (landscape phone, small laptop) tightens instead of scrolling */
  @media (max-height: 700px) {
    .dt-share__media { height: 84px; }
    .dt-share__tile { min-height: 54px; }
    .dt-share__eyebrow { margin: 8px 0 5px; }
    .dt-share__box { padding: 14px; }
  }

/* ============================== 5.3 — person page (§6.5) */
.prs { max-width: 1180px; }
.prs-head { display: grid; grid-template-columns: 168px minmax(0,1fr); gap: var(--sp-4); align-items: start; margin: var(--sp-3) 0 var(--sp-4); }
.prs-portrait { width: 168px; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-lg); }
.prs-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prs-portrait--none { display: grid; place-items: center; width: 100%; height: 100%; font-size: 54px; font-weight: 800; color: var(--txt-3); }
.prs-name { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.prs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.prs-chips .chip { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--txt-2); border: 1px solid var(--line); }
.prs-chips .chip--pop { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.prs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 22px; margin: 0 0 12px; }
.prs-fact dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--txt-3); margin-bottom: 2px; }
.prs-fact dd { margin: 0; font-size: 14px; color: var(--txt); }
.prs-links { display: flex; flex-wrap: wrap; gap: 8px; }
.prs-out { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--txt-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.prs-out:hover { border-color: var(--accent); color: var(--txt); }
.prs-bio { margin: 0 0 var(--sp-4); padding: 16px 18px; max-width: 100%; overflow-wrap: anywhere; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.prs-bio__lead { margin: 0; font-size: 15px; line-height: 1.75; color: var(--txt-2); }
.prs-bio__more { margin-top: 8px; }
.prs-bio__more summary { cursor: pointer; color: var(--accent-ink); font-size: 13px; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.prs-bio__more p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.75; color: var(--txt-2); }
.prs-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prs-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--txt-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prs-table td { padding: 11px 14px; border-bottom: 1px solid var(--line, rgba(255,255,255,0.06)); vertical-align: middle; }
.prs-table tr:last-child td { border-bottom: 0; }
.prs-year { color: var(--txt-3); font-variant-numeric: tabular-nums; white-space: nowrap; width: 74px; }
.prs-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--txt); font-weight: 600; text-decoration: none; }
.prs-link:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.prs-kind { margin-left: 8px; font-size: 11px; color: var(--txt-3); }
.prs-role { color: var(--txt-2); max-width: 320px; }
.prs-rate { text-align: right; width: 84px; }
.prs-score { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); }
.prs-score--none { color: var(--txt-3); font-weight: 500; }
.prs-more { width: 100%; min-height: 44px; margin-top: 12px; border-radius: 12px; border: 1px solid var(--accent, var(--line)); background: transparent; color: var(--accent-ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.prs-more:hover { background: var(--accent-soft); }
.prs-empty { color: var(--txt-3); font-size: 14px; }
.prs-next__lead { color: var(--txt-2); font-size: 14px; margin: 0 0 10px; }
.prs-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.prs-cta__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--surface-2); color: var(--txt); font-weight: 600; font-size: 14px; text-decoration: none; }
.prs-cta__link span { color: var(--txt-3); font-weight: 500; }
.prs-cta__link:hover { background: var(--accent-soft); color: var(--accent-ink); }
.sec-h__count { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--txt-3); }
@media (max-width: 767px) {
  .prs-head { grid-template-columns: 112px minmax(0,1fr); gap: 14px; }
  .prs-portrait { width: 112px; border-radius: 12px; }
  .prs-name { font-size: 24px; }
  .prs-facts { grid-template-columns: 1fr; gap: 8px; }
  .prs-table { font-size: 13px; }
  .prs-table th, .prs-table td { padding: 10px 10px; }
  .prs-role { max-width: 140px; }
  .prs-rate { width: 62px; }
}

/* A72 — phones: chips keep their own width, the rail keeps a clear edge affordance. */
@media (max-width: 559px) {
  .dt-seasons { gap: 6px; padding-bottom: 14px; }
  .dt-seasons__btn { padding: 9px 12px; max-width: 60vw; }
  .dt-seasons__n { font-size: 13px; }
  .dt-seasons__c { font-size: 11px; }
}

/* ---------- A71: the person page, in the title-page language ---------- */
.prs-main { display: block; }
.prs-hero {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(158deg, var(--surface-2), var(--surface) 62%);
  padding: 22px 22px 18px; margin: var(--sp-3) 0 var(--sp-4);
  box-shadow: var(--shadow-lg);
}
.prs-hero__wash {
  position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: 50% 18%;
  filter: blur(34px) saturate(1.15); opacity: 0.26; transform: scale(1.12); pointer-events: none;
}
.prs-hero__bloom {
  position: absolute; left: -6%; top: -42%; width: 78%; height: 340px; z-index: -1; pointer-events: none;
  background: radial-gradient(58% 58% at 34% 44%, color-mix(in oklab, var(--accent) 24%, transparent), transparent 72%);
}
.prs-hero__in { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: start; }
.prs-portrait {
  width: 128px; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: var(--surface-3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 0 0 2px color-mix(in oklab, var(--accent) 50%, transparent);
}
.prs-kicker { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent-text); }
.prs-sub { margin: 6px 0 12px; font-size: 13.5px; color: var(--txt-2); }
.prs-name { margin: 0; font-size: clamp(28px, 4.6vw, 44px); line-height: 1.06; letter-spacing: -0.025em; font-weight: 800; }
.prs-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  margin: 18px -22px -18px; border-top: 1px solid var(--line);
  background: var(--line);
}
.prs-stat { display: grid; gap: 2px; padding: 12px 18px; background: var(--surface); }
.prs-stat strong { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.prs-stat span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-2); }

.prs-grid { display: grid; gap: 20px; }
.prs-col { min-width: 0; display: grid; gap: 20px; }
.prs-side { display: grid; gap: 14px; align-content: start; }
.prs-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: grid; gap: 10px;
}
.prs-card__h { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-2); }
.prs-card__p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--txt-2); }
.prs-card__foot { margin: 0; font-size: 11.5px; color: var(--txt-2); }
.prs-card--cta { background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 10%, var(--surface)), var(--surface)); border-color: color-mix(in oklab, var(--accent) 26%, var(--line)); }
.prs-facts { display: grid; gap: 10px; margin: 0; }
.prs-fact { display: grid; gap: 2px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.prs-fact:last-child { border-bottom: 0; padding-bottom: 0; }
.prs-minis { display: grid; gap: 10px; }
.prs-mini { display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-decoration: none; }
.prs-mini img { grid-row: span 2; width: 46px; height: 69px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.prs-mini__t { font-size: 13.5px; font-weight: 700; color: var(--txt); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prs-mini__m { font-size: 11.5px; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.prs-mini:hover .prs-mini__t { color: var(--accent-text); }
.prs-rail { position: relative; min-width: 0; }
.prs-rail__btn {
  position: absolute; top: 50%; right: -16px; transform: translateY(-50%); display: none;
  width: 40px; height: 40px; place-items: center; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--txt);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3); transition: background 0.18s ease, color 0.18s ease;
}
.prs-rail__btn[hidden] { display: none !important; }
.prs-rail__btn:hover { background: var(--accent-solid); color: var(--accent-ink); border-color: transparent; }
.prs-rail__btn.is-left { right: auto; left: -16px; }
.prs-rail__btn.is-left svg { transform: rotate(180deg); }
.prs-film .sec-h { display: flex; align-items: center; gap: 10px; }
.prs-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.prs-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: 11px; letter-spacing: 0.09em; }
.prs-table tbody tr { transition: background 0.16s ease; }
.prs-table tbody tr:hover { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.prs-table td { font-size: 13.5px; }
.prs-rate .prs-score {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 24px; padding: 0 8px;
  border-radius: 999px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--txt); border: 1px solid var(--line-2);
}
.prs-rate .prs-score--none { color: var(--txt-2); }
@media (min-width: 900px) {
  .prs-hero__in { grid-template-columns: 196px minmax(0, 1fr); gap: 22px; }
  .prs-portrait { width: 196px; }
  .prs-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .prs-stat { padding: 14px 20px; }
  .prs-stat strong { font-size: 22px; }
  .prs-grid { grid-template-columns: minmax(0, 1fr) 336px; gap: 24px; }
  .prs-rail__btn { display: grid; }
}

/* 12.2 (AEO) - the direct answer under the H1. One factual paragraph, readable at a glance and marked
   as speakable in the schema, so an answer engine can quote it verbatim. */
.dt-answer {
  max-width: 66ch;
  margin: 14px 0 4px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  color: var(--txt);
  font-size: 15.5px;
  line-height: 1.62;
  letter-spacing: -0.005em;
}
.dt-hero--has-plate .dt-answer { background: color-mix(in srgb, #000 34%, transparent); border-left-color: var(--accent); color: #fff; }
@media (min-width: 900px) { .dt-answer { font-size: 16.5px; max-width: 62ch; } }

/* A37 — grid items default to min-width:auto, so one wide descendant (the filmography table) pushed the
   whole biography column to 342px inside a 320px phone. Every column child may shrink; its own scroller handles the rest. */
.prs-grid > *, .prs-col > * { min-width: 0; }
.prs-bio, .prs-bio * { min-width: 0; }

/* A92 — the poster must always be visible. On an unreleased title there is no backdrop and no trailer, so the hero
   collapsed to plain type and the page read as one long description with no artwork. The poster now sits in the
   hero itself: a 2:3 card beside the title block on phones, slightly larger on desktop, with a hairline and a soft
   shadow so it reads as premium artwork against the scrim. A title without artwork keeps the same slot with initials,
   so the geometry never jumps between titles. */
.dt-hero__poster {
  width: 104px; height: auto; aspect-ratio: 2 / 3; border-radius: 12px; object-fit: cover; display: block;
  border: 1px solid color-mix(in oklab, #fff 18%, transparent);
  box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.25);
  background: var(--surface-2);
}
.dt-hero__poster--init {
  display: grid; place-items: center; font-size: 26px; font-weight: 800; letter-spacing: .04em; color: var(--txt-2);
}
.dt-hero__inner { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.dt-hero__inner > * { grid-column: 2; min-width: 0; }
.dt-hero__inner > .dt-hero__poster { grid-column: 1; grid-row: 1 / span 9; align-self: start; }
.dt-hero__inner > .dt-hero__ctl,
.dt-hero__inner > .dt-hero__none { grid-column: 1 / -1; margin-top: 12px; }
@media (min-width: 761px) {
  .dt-hero__inner { grid-template-columns: 132px minmax(0, 1fr); column-gap: 20px; }
  .dt-hero__poster { width: 132px; border-radius: 14px; }
  .dt-hero__inner > .dt-hero__ctl { grid-column: 2; }
}
@media (prefers-reduced-motion: no-preference) {
  .dt-hero__poster { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
  .dt-hero__poster:hover { transform: translateY(-3px) scale(1.012); box-shadow: 0 20px 44px rgba(0,0,0,.55); }
}

/* ── Suggestions: the title page's "More like this" and the watch page's "Up next" ────────────────
   One component, three views of the same neighbours (relevant / popular / newest). Cards sit in a
   responsive grid instead of a horizontal rail, so a phone shows two clean columns and a desktop shows
   a full row without a scroll button to hunt for. */
.ms-next__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.ms-next__tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ms-next__tabs::-webkit-scrollbar { display: none; }
.ms-next__tab {
  appearance: none; border: 0; background: transparent; color: var(--txt-2);
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, transform 120ms ease;
}
.ms-next__tab:hover { color: var(--txt); background: color-mix(in oklab, var(--txt) 8%, transparent); }
.ms-next__tab:active { transform: scale(0.97); }
.ms-next__tab.is-on {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 18px color-mix(in oklab, var(--accent) 30%, transparent);
}
.ms-next__tab:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.ms-next__panel[hidden] { display: none !important; }
.ms-next__list {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px;
}
.ms-next__item { min-inline-size: 0; }
@media (min-width: 640px) {
  .ms-next__list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
@media (max-width: 400px) {
  .ms-next__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ms-next__tab { padding: 8px 11px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-next__tab { transition: none; }
}

/* ---- /assets/pages/home.css ---- */
/* Home (A12): hero → chips → one endless mixed feed. Layout only; components own their looks. */
@layer pages {
  .home { padding-bottom: var(--sp-7); }

  /* ---- hero ---- */
  .home-hero { padding: var(--sp-3) var(--sp-3) 0; }
  .home-hero__panel { border-radius: var(--r-lg); overflow: hidden; min-height: 62svh; }
  .home-hero__kicker { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt-2); font-weight: var(--fw-semibold); }
  .home-hero .hero__title { font-size: clamp(1.9rem, 7.4vw, 3.4rem); }
  .home-hero .hero__synopsis { max-width: 46ch; }

  /* ---- head + chips ---- */
  .home__body { padding-top: var(--sp-4); }
  .home__head { display: grid; gap: 4px; margin-bottom: var(--sp-3); }
  .home__title { font-size: clamp(1.15rem, 3.4vw, 1.5rem); font-weight: var(--fw-bold); letter-spacing: -0.01em; }
  .home__sub { font-size: var(--fs-sm); color: var(--txt-3); max-width: 62ch; }

  .chip-row {
    display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none;
    padding: var(--sp-1) 0 var(--sp-3); scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row .chip { scroll-snap-align: start; flex: none; }

  /* ---- feed grid ---- */
  .feed-grid {
    display: grid; gap: var(--sp-3) var(--sp-2);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  @media (min-width: 480px) { .feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (min-width: 768px) {
    .feed-grid { gap: var(--sp-4) var(--sp-3); grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-hero { padding: var(--sp-4) var(--sp-4) 0; }
  }
  @media (min-width: 1024px) { .feed-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
  @media (min-width: 1440px) { .feed-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

  .feed-grid .card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card--sk { pointer-events: none; }
  .card--sk .card__media { aspect-ratio: 2 / 3; border-radius: var(--r-md); }
  .sk--line { display: block; height: 12px; border-radius: 6px; margin-top: 6px; }
  .sk--short { width: 55%; }

  .feed-sentinel { height: 1px; }
  .feed-status { min-height: 24px; padding-top: var(--sp-3); font-size: var(--fs-sm); color: var(--txt-3); text-align: center; }

  /* the endless walk must not fight the tab bar */
  @media (max-width: 1199px) { .home { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--sp-6)); } }

  /* ============================================ A13: premium grid ===
     The pill bar itself now lives in components.css (one component for the whole site). */
  /* grid: larger lazy posters, hairline depth */
  .feed-grid { gap: var(--sp-4) var(--sp-3); }
  @media (min-width: 768px) { .feed-grid { gap: var(--sp-5) var(--sp-4); } }
  .feed-grid .card__media { box-shadow: var(--shadow-sm); }
  .feed-grid .card__title { margin-top: 10px; font-weight: 600; letter-spacing: -0.006em; }
  .feed-grid .card__meta { margin-top: 3px; }

  @media (hover: hover) and (pointer: fine) {
    .feed-grid .card__img { transition: transform 620ms var(--ease); }
    .feed-grid .card:hover .card__media {
      transform: translateY(-6px) scale(1.012);
      box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--accent-ring);
    }
    .feed-grid .card:hover .card__img { transform: scale(1.045); }
    .feed-grid .card:hover .card__scrim { opacity: 1; }
  }
}
  /* ===================================== 2.3: shelves (continue / live / sport) + mesh ===
     A shelf is not a popularity rail: it is a different content type in one compact line,
     with a horizontal snap, a peek of the next card and the title in the site's own voice. */
  .bands { display: grid; gap: var(--sp-5); margin: var(--sp-6) 0 var(--sp-2); }
  .shelf { display: grid; gap: var(--sp-3); }
  .shelf[hidden] { display: none; }
  .shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
  .shelf__title {
    font-size: clamp(1rem, 3vw, 1.22rem); font-weight: 700; letter-spacing: -0.01em;
    display: inline-flex; align-items: center; gap: var(--sp-2);
  }
  .shelf__demo {
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--txt-3); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px;
  }
  .shelf__hint { font-size: var(--fs-xs); color: var(--txt-3); }
  .shelf__clear {
    min-height: 32px; padding: 0 var(--sp-2); border: 0; background: none;
    color: var(--txt-3); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; border-radius: 8px;
  }
  .shelf__clear:hover { color: var(--txt); background: var(--surface-2); }
  @media (max-width: 1199px) { .shelf__clear { min-height: 44px; } }

  .shelf__track {
    display: grid; grid-auto-flow: column; grid-auto-columns: max-content;
    gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 4px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  .shelf__track::-webkit-scrollbar { display: none; }
  .shelf__card { scroll-snap-align: start; text-decoration: none; color: inherit; display: grid; gap: 6px; width: 132px; }
  .shelf__poster { display: block; position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--img-plate); box-shadow: var(--shadow-sm); }
  .shelf__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .shelf__name { display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .shelf__sub { display: block; font-size: var(--fs-xs); color: var(--txt-3); margin-top: 2px; }
  @media (hover: hover) {
    .shelf__card:hover .shelf__poster { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
    .shelf__poster { transition: transform var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease); }
  }

  /* live channel card */
  .shelf__card--channel {
    width: 236px; grid-auto-flow: column; align-items: center; gap: var(--sp-3);
    padding: var(--sp-3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
    grid-template-columns: 40px 1fr auto;
  }
  .shelf__card--channel:hover { border-color: var(--line-2); background: var(--surface-2); }
  .shelf__logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--txt-2); overflow: hidden; }
  .shelf__logo img { width: 100%; height: 100%; object-fit: contain; }
  .shelf__card--channel .shelf__meta { min-width: 0; }

  /* sports card */
  .shelf__card--event {
    width: 244px; padding: var(--sp-3); border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); display: grid; gap: 4px;
  }
  .shelf__card--event:hover { border-color: var(--line-2); background: var(--surface-2); }
  .shelf__teams { font-size: var(--fs-sm); font-weight: 600; }
  .shelf__teams b { color: var(--txt-3); font-weight: 500; padding: 0 4px; }



/* ---------- 10.2d: the owner's curated rows, a premium shelf above the feed ---------- */
.colrail { margin: 6px 0 22px; }
.colrail__head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.colrail__title { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; color: var(--txt); }
.colrail__count {
  font-size: 11.5px; font-weight: 700; color: var(--txt-2);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 9px;
}
.colrail__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(148px, 1fr);
  gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding: 2px 2px 10px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.colrail__row > * { scroll-snap-align: start; }
.colrail__row::-webkit-scrollbar { height: 6px; }
.colrail__row::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.colrail__row::-webkit-scrollbar-track { background: transparent; }
/* A68 — --accent-line was never defined, so this ring painted nothing for keyboard users. --accent
   is a real token in both themes (lime on black, red on paper) and reads at full strength. */
.colrail__row:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
@media (min-width: 900px) { .colrail__row { grid-auto-columns: minmax(176px, 1fr); gap: 16px; } }
@media (max-width: 560px) {
  .colrail { margin-bottom: 18px; }
  .colrail__row { grid-auto-columns: minmax(140px, 44%); gap: 12px; }
  .colrail__title { font-size: 1.02rem; }
}
