
@font-face {
  font-family: 'DM Sans';
  src: url('/static/dmsans.woff2?v=13ca249b5d55') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* MilkCrate's visual language, built on the Spotify design system's "content-first
   darkness": the UI recedes into near-black so that poster art is the only real colour.
   Adapted rather than copied — the accent is a dairy amber instead of Spotify green,
   because this is a milk crate, not a music app.

   The rules being followed deliberately:
     * near-black surfaces (#121212 / #181818 / #1f1f1f), depth from shade not borders
     * one functional accent, used for play/active/primary only — never decoration
     * pill geometry (9999px small, 500px large) and circular play controls
     * uppercase labels with wide tracking as the "system voice"
     * heavy shadows (0.3-0.5 alpha) because subtle shadows are invisible on black
     * compact type, 10-28px — this is an app, not a magazine */
:root {
  --bg: #0d0d0f;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --surface-3: #252525;
  --fg: #ffffff;
  --fg-dim: #b3b3b3;
  --fg-faint: #7c7c7c;
  --line: #2a2a2a;
  --accent: #f2b33d;        /* butterscotch (Marquee) — functional only */
  --accent-2: #ff8a3d;
  --cream: #f6efe2;
  --accent-ink: #121212;    /* text ON the accent */
  --negative: #f3727f;
  --r-card: 6px;
  --r-panel: 8px;
  --r-pill: 9999px;
  --shadow-card: 0 8px 8px rgba(0,0,0,.3);
  --shadow-float: 0 8px 24px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.4 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
img { display: block; }

/* ── header ─────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 40px;
  background: rgba(13,13,15,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
/* Hero pages: the header floats transparently over the backdrop. */
.top.over {
  position: absolute; left: 0; right: 0;
  background: linear-gradient(rgba(0,0,0,.66), rgba(0,0,0,0));
  border-bottom: none; backdrop-filter: none;
}
.top.over .nav a { text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand .mark { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.brand .wm { display: block; height: 20px; width: auto; }
.nav { display: flex; gap: 22px; flex: 1; align-items: center; }
.nav-item {
  position: relative; padding: 6px 0;
  font-size: 15px; font-weight: 500; color: var(--fg-dim);
}
.nav-item:hover { color: var(--fg); }
.nav-item.active { color: var(--fg); }
.nav-item.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  border-radius: 2px; background: var(--accent);
}
.search { display: flex; gap: 8px; }
.search input {
  background: rgba(255,255,255,.08); color: var(--fg);
  border: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  padding: 10px 18px; border-radius: 500px; min-width: 280px; outline: none;
  font: 400 14px/1.2 'DM Sans', system-ui, sans-serif;
  backdrop-filter: blur(10px);
}
.search input::placeholder { color: var(--fg-dim); }
.search input:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.search button {
  background: rgba(255,255,255,.08); color: var(--fg-dim); border: none;
  padding: 10px 18px; border-radius: 500px; cursor: pointer;
  font: 700 12px/1 'DM Sans', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 1.4px;
}
.search button:hover { background: var(--accent); color: var(--accent-ink); }
.search-link { display: none; }
.search-link svg { width: 20px; height: 20px; }

main { padding: 28px 24px 72px; max-width: 1700px; margin: 0 auto; }

/* ── MyTV guide: the AmpTV theme ─────────────────────────────
   Mirrors the EPG Ryan screenshotted: near-black blue-grey canvas, a lighter sticky
   channel rail, mid-grey programme cards with a 6px radius, and ONE accent (indigo
   #6366f1) used only for the now-line and the live block. Row height is 80px — a 72px
   card plus 4px of air top and bottom — and the ruler is 4px per minute so a half hour
   is 120px, which is what makes a 22-minute episode a comfortable click target. */
.tv-wrap { --tv-bg: #1a1d29; --tv-rail: #2a2d3a; --tv-card: #3a3d4a;
  --tv-card-hi: #44475a; --tv-line: rgba(255,255,255,.08); --tv-dim: #a0a3b1;
  --tv-accent: #6366f1; --tv-rail-w: 104px; --tv-row-h: 80px;
  background: var(--tv-bg); border-radius: 10px; padding: 0 0 8px; }

.tv-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px;
  background: #23262f; border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--tv-line); }
.tv-tab { padding: 7px 18px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--tv-dim); text-decoration: none; }
.tv-tab:hover { background: rgba(255,255,255,.06); color: #fff; }
.tv-tab.active { background: #fff; color: #1a1d29; font-weight: 600; }

.tv-guide { position: relative; overflow-x: auto; overflow-y: hidden;
  --lane-w: calc(var(--total-min) * var(--px-per-min) * 1px); }
.tv-row { display: flex; align-items: stretch; min-height: var(--tv-row-h); }
.tv-row + .tv-row { border-top: 1px solid var(--tv-line); }
.tv-head { min-height: 40px; }

.tv-chan { flex: 0 0 var(--tv-rail-w); position: sticky; left: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 10px 8px; background: var(--tv-rail);
  border-right: 1px solid var(--tv-line); text-align: center; }
.tv-num { font-size: 13px; color: var(--tv-dim); line-height: 1; }
.tv-name { font-size: 11px; font-weight: 700; color: #fff; text-transform: uppercase;
  letter-spacing: .5px; line-height: 1.2; text-decoration: none; }
.tv-name:hover { text-decoration: underline; }
.tv-tagline { display: none; }

.tv-lane { position: relative; width: var(--lane-w); flex: 0 0 var(--lane-w); }
.tv-ticks { height: 40px; }
.tv-tick { position: absolute; left: calc(var(--left) * var(--px-per-min) * 1px); top: 13px;
  font-size: 12px; font-weight: 500; color: var(--tv-dim); padding-left: 10px;
  border-left: 1px solid var(--tv-line); height: 27px; }

.tv-block { position: absolute; top: 4px; bottom: 4px;
  left: calc(var(--left) * var(--px-per-min) * 1px);
  width: calc(var(--width) * var(--px-per-min) * 1px - 4px);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  padding: 8px 10px; border-radius: 6px; text-decoration: none; background: var(--tv-card);
  border: 1px solid var(--tv-line); color: inherit; transition: background .15s, border-color .15s; }
.tv-block:hover { background: var(--tv-card-hi); border-color: rgba(255,255,255,.15); }
/* The one already in progress IS the live channel, so it carries the accent. */
.tv-joined { background: #2f3350; border-color: var(--tv-accent); }
.tv-block-title { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-block-time { font-size: 11px; color: var(--tv-dim); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }

.tv-now { position: absolute; top: 40px; bottom: 0; width: 2px; background: var(--tv-accent);
  box-shadow: 0 0 8px rgba(99,102,241,.6); pointer-events: none; z-index: 9;
  left: calc(var(--tv-rail-w) + var(--left) * var(--px-per-min) * 1px); }

.tv-live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border-radius: 999px; background: #2f3350; border: 1px solid var(--tv-accent);
  color: #c7c9ff; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none; }
.tv-live-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--tv-accent); }

@media (max-width: 700px) {
  .tv-wrap { --tv-rail-w: 84px; }
}


/* ── MyTV preview pane ───────────────────────────────────────
   These rules belong to the preview pane and the channel player. They were LOST once:
   the AmpTV theme was applied by replacing the whole MyTV CSS region wholesale, which
   silently deleted every tvp and tvpv rule living in it and left the preview pane
   rendering as plain stacked text over the video. Restored, and re-tinted to the AmpTV
   palette so the two halves match. Extend this region; never replace it. */
.tvpv { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 20px;
  margin: 0 0 22px; align-items: stretch; }
.tvpv-stage { position: relative; display: block; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--r-panel); overflow: hidden; border: 1px solid rgba(255,255,255,.08); color: inherit;
  text-decoration: none; }
.tvpv-stage:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.tvpv-art, .tvpv-video { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; }
.tvpv-video { background: transparent; }
.tvpv[data-state="playing"] .tvpv-art { visibility: hidden; }
.tvpv[data-state="capped"] .tvpv-video, .tvpv[data-state="unavailable"] .tvpv-video { visibility: hidden; }
.tvpv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: 14px; font-weight: 700; }
.tvpv-cap small { display: block; font-weight: 400; color: #b9bec7; font-size: 12px; margin-top: 2px; }
.tvpv-status { position: absolute; top: 10px; left: 12px; font-size: 12px; color: #d7dae0;
  background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px; }
.tvpv-status:empty { display: none; }
.tvpv-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.tvpv-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #a0a3b1; margin-top: 8px; }
.tvpv-now { font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvpv-meta, .tvpv-next-time { font-size: 13px; color: #a0a3b1; }
.tvpv-next { font-size: 15px; display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.tvpv-next span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvpv-actions { display: flex; gap: 10px; margin-top: 12px; }
.tvpv .tvp-prog { width: 100%; max-width: 420px; }
.tvp { max-width: 1280px; margin: 0 auto; }
.tvp-stage { position: relative; background: #000; border-radius: var(--r-panel); overflow: hidden;
  aspect-ratio: 16 / 9; }
.tvp-stage video { width: 100%; height: 100%; display: block; background: #000; }
.tvp-osd { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 24px 20px;
  background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.55) 70%, transparent);
  display: grid; gap: 6px; transition: opacity .35s ease; }
.tvp-osd.off { opacity: 0; pointer-events: none; }
.tvp-chan { display: flex; align-items: center; gap: 12px; }
.tvp-num { font-size: 28px; font-weight: 700; color: #6366f1; min-width: 2ch; }
.tvp-name { font-size: 18px; font-weight: 700; }
.tvp-line { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.tvp-label { flex: 0 0 44px; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg-faint); }
.tvp-title { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.tvp-nextline .tvp-title { font-weight: 400; color: var(--fg-dim); font-size: 14px; }
.tvp-time { flex: 0 0 auto; font-size: 13px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.tvp-prog { width: 100%; height: 4px; appearance: none; -webkit-appearance: none; border: 0;
  border-radius: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.tvp-prog::-webkit-progress-bar { background: rgba(255,255,255,.18); }
.tvp-prog::-webkit-progress-value { background: #6366f1; }
.tvp-prog::-moz-progress-bar { background: #6366f1; }
.tvp-status { position: absolute; top: 16px; left: 16px; padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(0,0,0,.7); font-size: 13px; color: var(--fg-dim); }
.tvp-unmute { position: absolute; top: 16px; right: 16px; padding: 8px 14px; border-radius: var(--r-pill);
  border: 0; background: #6366f1; color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; }
.tvp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.tvp-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-dim); }
.tvp-pick select { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 7px 10px; font: inherit; }
.tvp-hint { margin-left: auto; font-size: 12px; color: var(--fg-faint); }
@media (max-width: 800px) { .tvpv { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .tvp-osd { padding: 10px 12px 12px; }
  .tvp-num { font-size: 20px; }
  .tvp-hint { display: none; }
}

/* Two classes the markup emitted with nothing behind them, both found by the styling
   completeness test rather than by looking: 'tv-live' marks the channel name as a
   watch-live link, and 'tvp-nowline' is the "Now" row of the channel OSD — r2's CSS
   never had a rule for it either, so it was inheriting generic line styling by luck. */
.tv-logo-link { display: block; line-height: 0; text-decoration: none; border-radius: 6px; }
.tv-logo-link:hover { outline: 2px solid var(--tv-accent); outline-offset: 1px; }
.tv-logo { display: block; width: 88px; height: 52px; }
/* A real logo is someone else's artwork at an arbitrary aspect ratio, so it is contained
   inside the tile rather than cropped, on a neutral plate because many are white-on-
   transparent and would vanish against the rail. */
.tv-logo-real { object-fit: contain; padding: 6px; box-sizing: border-box;
  background: #11131a; border-radius: 6px; }
.tvp-chan .tv-logo { width: 64px; height: 38px; }
.tv-name.tv-live { color: #fff; }
.tv-name.tv-live:hover { color: #c7c9ff; }
.tvp-line.tvp-nowline { font-weight: 600; }

/* ── section heads / toolbars ───────────────────────────── */
.head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
/* Classes, not style="" attributes: the CSP is style-src 'self' with no 'unsafe-inline',
   so an inline style attribute is BLOCKED and silently does nothing. Firefox reports it
   in the console; the layout just quietly comes out wrong. */
.head-watch { margin-top: 22px; }
.head-main { flex: 1; min-width: 260px; }
.head h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.5px; }
.head .count { color: var(--fg-dim); font-size: 14px; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.toolbar.toolbar-filters { margin: 0 0 16px; }
.toolbar.toolbar-seasons { margin: 0 0 18px; }
.chip {
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--fg-dim);
  font-size: 13px; font-weight: 700; border: none; cursor: pointer;
}
.chip:hover { background: var(--surface-3); color: var(--fg); }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.toolbar-filters .chip { border: 1px solid var(--line); background: transparent; padding: 8px 16px; }
.toolbar-filters .chip.on { border-color: var(--accent); background: var(--accent); }
.chip .count { font-weight: 400; opacity: .7; }

/* ── poster grid ────────────────────────────────────────── */
.grid {
  display: grid; gap: 20px 18px;
  grid-template-columns: repeat(auto-fill, minmax(166px, 1fr));
}
.tile { display: block; position: relative; }
.art {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--r-card);
  overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow-card);
  transition: transform .16s ease, box-shadow .16s ease;
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.h0 { background: linear-gradient(145deg, hsl(5 42% 26%), hsl(43 38% 13%)); }
.h1 { background: linear-gradient(145deg, hsl(15 42% 26%), hsl(53 38% 13%)); }
.h2 { background: linear-gradient(145deg, hsl(25 42% 26%), hsl(63 38% 13%)); }
.h3 { background: linear-gradient(145deg, hsl(35 42% 26%), hsl(73 38% 13%)); }
.h4 { background: linear-gradient(145deg, hsl(45 42% 26%), hsl(83 38% 13%)); }
.h5 { background: linear-gradient(145deg, hsl(55 42% 26%), hsl(93 38% 13%)); }
.h6 { background: linear-gradient(145deg, hsl(65 42% 26%), hsl(103 38% 13%)); }
.h7 { background: linear-gradient(145deg, hsl(75 42% 26%), hsl(113 38% 13%)); }
.h8 { background: linear-gradient(145deg, hsl(85 42% 26%), hsl(123 38% 13%)); }
.h9 { background: linear-gradient(145deg, hsl(95 42% 26%), hsl(133 38% 13%)); }
.h10 { background: linear-gradient(145deg, hsl(105 42% 26%), hsl(143 38% 13%)); }
.h11 { background: linear-gradient(145deg, hsl(115 42% 26%), hsl(153 38% 13%)); }
.h12 { background: linear-gradient(145deg, hsl(125 42% 26%), hsl(163 38% 13%)); }
.h13 { background: linear-gradient(145deg, hsl(135 42% 26%), hsl(173 38% 13%)); }
.h14 { background: linear-gradient(145deg, hsl(145 42% 26%), hsl(183 38% 13%)); }
.h15 { background: linear-gradient(145deg, hsl(155 42% 26%), hsl(193 38% 13%)); }
.h16 { background: linear-gradient(145deg, hsl(165 42% 26%), hsl(203 38% 13%)); }
.h17 { background: linear-gradient(145deg, hsl(175 42% 26%), hsl(213 38% 13%)); }
.h18 { background: linear-gradient(145deg, hsl(185 42% 26%), hsl(223 38% 13%)); }
.h19 { background: linear-gradient(145deg, hsl(195 42% 26%), hsl(233 38% 13%)); }
.h20 { background: linear-gradient(145deg, hsl(205 42% 26%), hsl(243 38% 13%)); }
.h21 { background: linear-gradient(145deg, hsl(215 42% 26%), hsl(253 38% 13%)); }
.h22 { background: linear-gradient(145deg, hsl(225 42% 26%), hsl(263 38% 13%)); }
.h23 { background: linear-gradient(145deg, hsl(235 42% 26%), hsl(273 38% 13%)); }
.h24 { background: linear-gradient(145deg, hsl(245 42% 26%), hsl(283 38% 13%)); }
.h25 { background: linear-gradient(145deg, hsl(255 42% 26%), hsl(293 38% 13%)); }
.h26 { background: linear-gradient(145deg, hsl(265 42% 26%), hsl(303 38% 13%)); }
.h27 { background: linear-gradient(145deg, hsl(275 42% 26%), hsl(313 38% 13%)); }
.h28 { background: linear-gradient(145deg, hsl(285 42% 26%), hsl(323 38% 13%)); }
.h29 { background: linear-gradient(145deg, hsl(295 42% 26%), hsl(333 38% 13%)); }
.h30 { background: linear-gradient(145deg, hsl(305 42% 26%), hsl(343 38% 13%)); }
.h31 { background: linear-gradient(145deg, hsl(315 42% 26%), hsl(353 38% 13%)); }
.h32 { background: linear-gradient(145deg, hsl(325 42% 26%), hsl(3 38% 13%)); }
.h33 { background: linear-gradient(145deg, hsl(335 42% 26%), hsl(13 38% 13%)); }
.h34 { background: linear-gradient(145deg, hsl(345 42% 26%), hsl(23 38% 13%)); }
.h35 { background: linear-gradient(145deg, hsl(355 42% 26%), hsl(33 38% 13%)); }
.tile:hover .art { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.mono {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; font-weight: 700; color: rgba(255,255,255,.72); letter-spacing: 1px;
}
/* Circular play affordance, revealed on hover — the Spotify tell. */
.tile .play {
  position: absolute; right: 10px; bottom: 10px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 17px;
  box-shadow: var(--shadow-float);
  opacity: 0; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}
.tile:hover .play, .tile:focus-visible .play { opacity: 1; transform: none; }
.badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 4px;
  backdrop-filter: blur(4px);
}
.badge.rating { left: 8px; right: auto; color: var(--accent); }
.epno {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 4px;
}
.tile .name {
  margin: 10px 2px 0; font-size: 14px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile .sub { margin: 3px 2px 0; font-size: 13px; color: var(--fg-dim); }

/* ── rails ──────────────────────────────────────────────── */
.rail { margin: 0 0 34px; }
.rail h2 {
  font-size: 22px; font-weight: 700; margin: 0 0 14px; letter-spacing: -.3px;
  display: flex; align-items: baseline; gap: 10px;
}
.rail h2 .count { font-size: 13px; font-weight: 400; color: var(--fg-dim); }
.rail .strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 166px;
  gap: 18px; overflow-x: auto; padding: 4px 4px 12px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.rail .strip > * { scroll-snap-align: start; }

/* ── hero (detail + show pages): full-bleed backdrop, poster and facts over it ── */
.hero { position: relative; min-height: 600px; display: flex; align-items: flex-end; margin: 0 0 30px; }
main:not(.bleed) .hero { margin: -28px -24px 26px; }
.hero.flat { min-height: 0; }
.hero-art { position: absolute; inset: 0; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,13,15,.94) 0%, rgba(13,13,15,.72) 34%, rgba(13,13,15,.1) 70%),
              linear-gradient(0deg, var(--bg) 0%, rgba(13,13,15,0) 45%);
}
.hero-body {
  position: relative; z-index: 2; width: 100%; padding: 150px 40px 6px;
  display: flex; gap: 34px; align-items: flex-end;
}
.hero-body .poster { width: 230px; flex: none; }
.hero-body .poster .art { box-shadow: var(--shadow-float); }
.hero-text { flex: 1; min-width: 0; max-width: 780px; padding-bottom: 4px; }
.kicker {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2.4px;
  color: var(--accent); margin: 0 0 10px;
}
.hero-text h1 {
  margin: 0 0 14px; font-size: clamp(34px, 4.6vw, 64px); font-weight: 700;
  line-height: 1; letter-spacing: -1.5px;
}
.meta-line {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  color: var(--fg-dim); font-size: 15px; margin: 0 0 14px;
}
.meta-line .star { color: var(--accent); font-weight: 700; }
.pips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.overview { color: #ddd8d0; font-size: 16px; line-height: 1.55; max-width: 68ch; margin: 0 0 20px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; }
.resume { display: flex; align-items: center; gap: 12px; max-width: 440px; margin: 16px 0 0; font-size: 13px; color: var(--fg-dim); }
.resume progress.bar { flex: 1; border-radius: 2px; }
/* The facts that matter at a glance; the full table folds away below. */
.strip4 {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border-radius: var(--r-panel); overflow: hidden; margin: 0 0 16px;
}
.strip4 > div { background: var(--surface); padding: 16px 18px; min-width: 0; }
.strip4 .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--fg-faint); margin: 0 0 6px; }
.strip4 .v { display: block; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.strip4 .v small { display: block; font-weight: 400; color: var(--fg-dim); font-size: 13px; margin-top: 2px; }
details.more { margin: 0 0 28px; }
details.more summary { cursor: pointer; color: var(--fg-dim); font-size: 13px; font-weight: 700; padding: 6px 0 12px; }
details.more summary:hover { color: var(--fg); }

/* ── lists ──────────────────────────────────────────────── */
.list { border-radius: var(--r-panel); overflow: hidden; background: var(--surface); }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--surface-2); }
.row .n { color: var(--fg-faint); font-variant-numeric: tabular-nums; min-width: 64px; font-size: 13px; font-weight: 700; }
.row .t { flex: 1; font-size: 14px; font-weight: 700; }
.row .meta { color: var(--fg-dim); font-size: 13px; }

/* ── episode rows ───────────────────────────────────────── */
.eps { display: grid; gap: 10px; }
.ep {
  display: grid; grid-template-columns: 184px 1fr; gap: 16px;
  background: var(--surface); border-radius: var(--r-panel); padding: 10px;
  transition: background .14s ease;
}
.ep:hover { background: var(--surface-2); }
.ep-still {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-card);
  overflow: hidden; background: var(--surface-2);
}
.ep-still img { width: 100%; height: 100%; object-fit: cover; }
.ep-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 22px; color: #fff; background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .14s ease;
}
.ep:hover .ep-play { opacity: 1; }
.ep-body { min-width: 0; padding: 2px 6px 2px 0; }
.ep-head {
  margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.3;
  display: flex; gap: 10px; align-items: baseline;
}
.ep-num { color: var(--fg-faint); font-size: 12px; font-weight: 700; letter-spacing: 1px; flex: none; }
.ep-meta { margin: 0 0 6px; font-size: 12px; color: var(--fg-dim); }
.ep-meta .star { color: var(--accent); font-weight: 700; }
.ep-ov {
  margin: 0; font-size: 13px; line-height: 1.5; color: var(--fg-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 560px) {
  .ep { grid-template-columns: 124px 1fr; gap: 12px; }
  .ep-ov { -webkit-line-clamp: 2; font-size: 12px; }
}

/* ── facts ──────────────────────────────────────────────── */
.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px;
  margin: 0 0 20px; background: var(--surface); padding: 18px 20px; border-radius: var(--r-panel);
}
.facts dt { color: var(--fg-faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.facts dd { margin: 0; font-size: 14px; word-break: break-word; }

/* ── player ─────────────────────────────────────────────── */
.player {
  background: #000; border-radius: var(--r-panel); overflow: hidden;
  box-shadow: var(--shadow-float);
}
.player video { display: block; width: 100%; max-height: 78vh; background: #000; }
.notice { padding: 18px 20px; background: var(--surface); font-size: 14px; }
.notice strong { font-size: 15px; }
.notice p { color: var(--fg-dim); margin: 8px 0 0; line-height: 1.5; }
.notice .chip { margin: 10px 6px 0 0; }
/* Player controls row: quality picker and the stats toggle, under the video. */
.player { position: relative; }
.pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; background: var(--surface); font-size: 13px; color: var(--fg-dim); }
.pbar label { display: inline-flex; align-items: center; gap: 8px; }
.pbar .grow { flex: 1; }
.pbar .status { color: var(--fg-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pbar button.chip { cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--fg); }
.pbar button.chip[aria-pressed="true"] { background: var(--accent); color: #000; border-color: var(--accent); }
/* Stats for nerds: over the top-left of the picture, never covering the controls. */
.stats { position: absolute; z-index: 5; top: 12px; left: 12px; max-width: min(560px, calc(100% - 24px)); max-height: 70%; overflow: auto;
  padding: 12px 14px; border-radius: 10px; background: rgba(8, 8, 12, .82); color: #e8e8ee; font-size: 12px; line-height: 1.45;
  box-shadow: 0 8px 30px rgba(0,0,0,.45); pointer-events: none; }
.stats h2 { margin: 0 0 6px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.stats dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
.stats dt { color: #9a9aa8; }
.stats dd { margin: 0; word-break: break-word; }
select {
  background: var(--surface-2); color: var(--fg); border: none;
  box-shadow: inset 0 0 0 1px #3a3a3a;
  padding: 8px 12px; border-radius: var(--r-pill); font-size: 13px;
}

/* ── Marquee components ─────────────────────────────────────
   Shared by home, detail, show and the wall. Full-bleed pages (heroHeader) render
   <main class="bleed"> and pad their own content with .wrap. */
main.bleed { max-width: none; padding: 0 0 72px; }
.wrap { padding: 0 40px; }
.rail .strip.land-strip { grid-auto-columns: 300px; gap: 16px; }
.eyebrow {
  margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--accent);
}
/* Small outlined facts: 1080p, HEVC, EAC3 5.1, CC. */
.pip {
  display: inline-block; border: 1px solid rgba(255,255,255,.24); border-radius: 4px;
  padding: 1px 6px; font-size: 12px; font-weight: 700; color: var(--fg); line-height: 1.5;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 26px;
  border-radius: 24px; font: 700 15px/1 'DM Sans', system-ui, sans-serif; cursor: pointer;
  color: var(--fg); background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
}
.btn:hover { background: rgba(255,255,255,.18); }
.btn.pri {
  background: var(--accent); color: var(--accent-ink); border: none;
  box-shadow: 0 8px 30px rgba(242,179,61,.25);
}
.btn.pri:hover { filter: brightness(1.06); }
.btn.round { width: 48px; padding: 0; justify-content: center; }
.btns { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* 16:9 landscape card — continue watching, recent episodes. */
.land { display: block; min-width: 0; }
.land .th {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow-card);
  transition: transform .16s ease, box-shadow .16s ease;
}
.land .th img { width: 100%; height: 100%; object-fit: cover; }
.land .th::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0) 55%);
}
.land:hover .th { transform: translateY(-3px); box-shadow: var(--shadow-float); outline: 2px solid var(--accent); outline-offset: 2px; }
.land .play {
  position: absolute; z-index: 2; left: 12px; bottom: 14px; width: 40px; height: 40px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 13px;
}
.land .left {
  position: absolute; z-index: 2; right: 10px; bottom: 14px; font-size: 12px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 10px;
}
.land .epno { z-index: 2; top: 8px; bottom: auto; }
.land .t {
  margin: 10px 2px 0; font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.land .s {
  margin: 2px 2px 0; font-size: 13px; color: var(--fg-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Progress: a native <progress>, so the value is set as a property, never a style. */
progress.bar {
  -webkit-appearance: none; appearance: none; display: block; border: none;
  width: 100%; height: 4px; background: rgba(255,255,255,.2); color: var(--accent);
}
.land progress.bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; }
progress.bar::-webkit-progress-bar { background: rgba(255,255,255,.2); }
progress.bar::-webkit-progress-value { background: var(--accent); }
progress.bar::-moz-progress-bar { background: var(--accent); }
.tile:hover .art { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── home hero ─────────────────────────────────────────── */
.mhero { position: relative; height: min(80vh, 760px); min-height: 540px; overflow: hidden; background: #000; }
.mhero .slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.mhero .slide.on { opacity: 1; visibility: visible; }
.mhero .bd { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.mhero .slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,13,15,.95) 0%, rgba(13,13,15,.7) 32%, rgba(13,13,15,0) 62%),
              linear-gradient(0deg, var(--bg) 0%, rgba(13,13,15,0) 40%);
}
.mhero .copy { position: absolute; z-index: 2; left: 40px; bottom: 210px; width: min(580px, calc(100% - 80px)); }
.mhero h1 { margin: 0 0 16px; font-size: clamp(36px, 4.6vw, 64px); line-height: 1; letter-spacing: -1.5px; font-weight: 700; }
.mhero .meta-line { color: var(--fg-dim); font-size: 15px; gap: 10px; }
.mhero .overview {
  color: #ddd8d0; font-size: 16px; margin: 0 0 24px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mhero .dots { position: absolute; z-index: 3; right: 40px; bottom: 214px; display: flex; gap: 8px; }
.mhero .dot { width: 8px; height: 8px; border-radius: 4px; border: none; padding: 0; background: rgba(255,255,255,.38); cursor: pointer; transition: width .3s ease; }
.mhero .dot.on { width: 26px; background: var(--accent); }
.after-hero { position: relative; z-index: 3; margin-top: -170px; }
.pad-top { padding-top: 96px; }
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .mhero { height: 560px; min-height: 0; }
  .mhero .copy { left: 14px; bottom: 96px; width: calc(100% - 28px); }
  .mhero .overview { -webkit-line-clamp: 2; font-size: 14px; }
  .mhero .dots { right: 14px; bottom: 64px; }
  .mhero .bd { object-position: 62% 25%; }
  .after-hero { margin-top: -40px; }
  .rail .strip.land-strip { grid-auto-columns: 250px; }
  .pad-top { padding-top: 20px; }
}

/* ── wall banner: the newest arrival, page 1 only ─────────── */
.banner {
  position: relative; display: block; overflow: hidden; border-radius: 14px; margin: 0 0 26px;
  min-height: 300px; background: var(--surface); box-shadow: var(--shadow-card);
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,13,15,.92) 0%, rgba(13,13,15,.6) 38%, rgba(13,13,15,0) 70%);
}
.banner .copy { position: relative; z-index: 2; padding: 44px 40px; max-width: 560px; }
.banner h2 { margin: 0 0 10px; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.05; letter-spacing: -1px; }
.banner .overview { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  .banner { min-height: 220px; }
  .banner .copy { padding: 26px 18px; }
  .banner .overview { display: none; }
}

/* ── paging / empty / footer ────────────────────────────── */
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 32px 0 0; }
.pager .pos { color: var(--fg-dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 80px 20px; color: var(--fg-dim); }
.empty h2 { color: var(--fg); margin: 0 0 10px; font-size: 24px; font-weight: 700; }
.hint { margin-top: 14px; font-size: 13px; color: var(--fg-faint); }
.foot {
  display: flex; gap: 20px; justify-content: center;
  padding: 24px; border-top: 1px solid var(--line);
  color: var(--fg-faint); font-size: 12px;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── live search panel ──────────────────────────────────── */
.live {
  position: absolute; top: 58px; right: 24px; width: min(440px, calc(100vw - 48px));
  background: var(--surface-2); border-radius: var(--r-panel);
  box-shadow: var(--shadow-float); overflow: hidden; z-index: 40;
}
.live .row { padding: 11px 14px; background: transparent; }
.live .row.sel { background: var(--surface-3); }
.live .none { padding: 16px; color: var(--fg-dim); font-size: 13px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 640px) {
  main { padding: 20px 14px 60px; }
  .hero { display: block; min-height: 0; margin: 0 0 20px; }
  main:not(.bleed) .hero { margin: -20px -14px 20px; }
  .hero-art { position: relative; height: 300px; }
  .hero.flat .hero-art { display: none; }
  .hero-art::after { background: linear-gradient(0deg, var(--bg) 2%, rgba(13,13,15,.35) 60%, rgba(13,13,15,.15)); }
  .hero-body { margin-top: -120px; padding: 0 14px; gap: 16px; flex-wrap: wrap; }
  .hero.flat .hero-body { margin-top: 0; padding-top: 20px; }
  .hero-body .poster { width: 112px; }
  .hero-text { flex-basis: 100%; }
  .hero-text h1 { font-size: 32px; letter-spacing: -.8px; }
  .overview { font-size: 15px; }
  .actions .btn { height: 44px; padding: 0 18px; }
  .strip4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px 12px; }
  .rail .strip { grid-auto-columns: 132px; }
  /* Compact header: one row (mark, wordmark, search icon) and the nav as a
     horizontally scrolling row under it. Nothing wraps, nothing overflows at 390 px. */
  .top { flex-wrap: wrap; padding: 10px 14px 0; gap: 8px 12px; }
  .brand .mark { width: 24px; height: 24px; }
  /* Two header rows over a bright backdrop can't be made legible with a scrim, so on
     phones the header stays solid and in flow; the artwork starts beneath it. */
  .top.over { position: sticky; top: 0; background: rgba(13,13,15,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .rail h2 .count { display: none; }
  .brand .wm { height: 16px; }
  .top .search { display: none; }
  .top.searching .search { display: flex; order: 3; width: 100%; padding-bottom: 8px; }
  .top.searching .search input { min-width: 0; flex: 1; }
  .search-link {
    display: grid; place-items: center; margin-left: auto;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.08); color: var(--fg);
  }
  .nav {
    order: 4; flex: 0 0 100%; min-width: 0; gap: 20px;
    overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding: 2px 0 8px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: none; }
}
@media (max-width: 360px) {
  .brand .wm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }


/* ── site rail ──────────────────────────────────────────── */
/* The pill of section buttons, shared by every signed-in (and anonymous library)
   page. On a wide screen it sits under the header, on the left; on a phone it
   becomes a bottom bar so a thumb can reach every section. */
.has-rail { --mc-header: 72px; --mc-rail-gap: 16px; --mc-rail-col: 64px; }
.has-rail .nav { display: none; } /* the rail is the section nav; the header keeps brand, search, account */
.shell { display: block; min-width: 0; }
.has-rail .shell { display: grid; grid-template-columns: var(--mc-rail-col) minmax(0, 1fr); align-items: start; }
.shell-main { min-width: 0; }
/* Brand lines up with the content column, so the rail has a clear 64 px gutter
   and no longer sits under the crate mark. */
@media (min-width: 641px) {
  .has-rail .top { padding-left: var(--mc-rail-col); }
}
/* The header is sticky; stick the rail just below it, not at 16 px where the
   yellow Home button would slide up under (and into) the mark. */
.site-rail { position: sticky; top: calc(var(--mc-header) + var(--mc-rail-gap)); z-index: 20; align-self: start; display: flex; flex-direction: column; gap: 8px;
  margin: var(--mc-rail-gap) 8px; padding: 10px 6px; border-radius: 26px;
  background: rgba(24,24,24,.6); border: 1px solid rgba(255,255,255,.06); }
/* Hero pages (.top.over) take the header out of flow, so the shell starts at y=0.
   Push the rail down by the header, then let it stick near the top once the
   floating header has scrolled off. */
.has-rail.has-hero .site-rail {
  margin-top: calc(var(--mc-header) + var(--mc-rail-gap));
  top: var(--mc-rail-gap);
}
.site-rail-btn { display: grid; place-items: center; width: 40px; height: 40px; min-width: 40px; min-height: 40px; border-radius: 50%; color: var(--fg-dim); }
.site-rail-btn:hover, .site-rail-btn:focus-visible { background: rgba(255,255,255,.08); color: var(--fg); outline: none; }
.site-rail-btn.active { background: var(--accent); color: var(--accent-ink); }
.site-rail svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) {
  /* With the rail as a bottom bar the compact header no longer needs a second nav row.
     .has-rail .shell is more specific than .shell, so it must be reset here or the
     64px desktop column stays and the tiles are squeezed into a sliver. */
  .has-rail .top { flex-wrap: nowrap; padding: 10px 14px; }
  .has-rail .shell, .shell { display: block; grid-template-columns: none; padding-bottom: 84px; }
  .site-rail, .has-rail.has-hero .site-rail { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; z-index: 40;
    flex-direction: row; justify-content: space-around; gap: 4px;
    margin: 0; padding: 8px 10px;
    background: rgba(24,24,24,.92); backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0,0,0,.4); }
}
/* Nine admin buttons at 40 px no longer shrink below the 40 px tap target. On a
   cover-width phone they wrap onto a second row instead (shell padding grows to match).
   Short landscape covers keep the side rail, so this only applies when the bottom bar is on. */
@media (max-width: 420px) and (min-height: 521px) {
  .site-rail { padding: 8px 6px; gap: 4px; flex-wrap: wrap; justify-content: space-around; }
  .site-rail-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
  .site-rail svg { width: 20px; height: 20px; }
  .has-rail .shell, .shell { padding-bottom: 136px; }
}

/* ── accounts ──────────────────────────────────────────── */
.account { display: flex; align-items: center; gap: 10px; margin-left: 4px; flex: none; }
.account .who {
  font-size: 14px; font-weight: 700; max-width: 10em; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account .who:hover { color: var(--accent); }
.account form { display: inline; margin: 0; }
.account .btn, .acct-link.btn { height: 36px; padding: 0 14px; font-size: 13px; }
.acct-link { font-size: 14px; font-weight: 700; color: var(--fg-dim); }
.acct-link:hover, .acct-link.active { color: var(--fg); }

.auth { max-width: 440px; margin: 48px auto; text-align: left; }
.auth.wide { max-width: 800px; }
.auth h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.4px; }
.auth h2 { margin: 36px 0 16px; font-size: 18px; }
.auth .lede { color: var(--fg-dim); margin: 0 0 24px; }
.auth .err { color: var(--negative); font-weight: 700; margin: 0 0 16px; }
.auth .ok { color: var(--accent); font-weight: 700; margin: 0 0 16px; }
.auth .field { margin: 0 0 16px; }
.auth label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); margin: 0 0 6px; }
.auth label.plain { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--fg); margin: 0; }
.auth .row { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; }
.auth input[type="text"], .auth input[type="password"], .auth select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--fg); padding: 12px 14px; border-radius: 10px; font: inherit;
}
.auth select { appearance: auto; }
.auth .btn { border: none; }
.auth form.inline { display: inline; }
.users { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.users th, .users td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.users th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-faint); }

@media (max-width: 640px) {
  .account { order: 2; margin-left: auto; }
  .account .who { display: none; }
  .search-link { margin-left: 0; }
}

/* Mid-width foldable inners (iPhone Duo inner portrait is 669, Fold8 cover
   landscape is 752): the desktop header's search min-width and account name
   made hero pages about 924 px wide. Shrink the field and hide the name
   (Profile is already on the rail) so nothing is wider than the viewport. */
@media (max-width: 900px) {
  .top { gap: 16px; }
  .top .search { flex: 1 1 140px; min-width: 0; max-width: 420px; }
  .top .search input { min-width: 0; }
  .account .who { display: none; }
}

/* ── foldable phones ───────────────────────────────────────
   Book-style foldables (Galaxy Z Fold8, iPhone Duo) move between a narrow cover,
   a nearly square inner screen, and a short landscape. Layouts are width- and
   height-based, not UA-sniffed. Viewport-segment rules are progressive: unknown
   media features simply do not match, so env(viewport-segment-*) is never applied
   on a browser that does not understand them. */
/* Short landscape covers (iPhone Duo outer landscape is 594×368 in Safari): a
   bottom bar would consume a quarter of the viewport. Keep the side rail. */
@media (max-width: 640px) and (max-height: 520px) {
  .has-rail .top { padding-left: var(--mc-rail-col); }
  .has-rail .shell, .shell {
    display: grid; grid-template-columns: var(--mc-rail-col) minmax(0, 1fr);
    padding-bottom: 20px;
  }
  .site-rail, .has-rail.has-hero .site-rail {
    position: sticky; left: auto; right: auto; bottom: auto; z-index: 20;
    flex-direction: column; justify-content: flex-start; gap: 8px; flex-wrap: nowrap;
    margin: var(--mc-rail-gap) 8px; padding: 10px 6px; width: auto; border-radius: 26px;
    background: rgba(24,24,24,.6); backdrop-filter: none; box-shadow: none;
    top: calc(var(--mc-header) + var(--mc-rail-gap));
  }
  .has-rail.has-hero .site-rail {
    margin-top: calc(var(--mc-header) + var(--mc-rail-gap));
    top: var(--mc-rail-gap);
  }
  .site-rail-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
}
/* Unfolded inner landscape and other short-wide screens (Duo inner 951×585,
   Fold8 inner 933×704): the 540–560 px hero would fill or overflow the viewport. */
@media (max-height: 700px) and (min-width: 641px) {
  .mhero { height: min(58vh, 480px); min-height: 0; }
  .mhero .copy { left: 28px; bottom: 72px; width: min(580px, calc(100% - 56px)); }
  .mhero h1 { font-size: clamp(28px, 4.4vw, 52px); }
  .mhero .overview { -webkit-line-clamp: 2; }
  .mhero .dots { right: 28px; bottom: 40px; }
  .after-hero { margin-top: -36px; }
  .hero { min-height: 0; }
  .player video { max-height: 62vh; }
  .banner { min-height: 200px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-height: 520px) {
  .mhero { height: min(72vh, 260px); min-height: 0; }
  .mhero .copy { left: 16px; bottom: 32px; width: min(580px, calc(100% - 32px)); }
  .mhero h1 { font-size: clamp(22px, 4.5vw, 36px); margin-bottom: 8px; }
  .mhero .overview { -webkit-line-clamp: 1; margin-bottom: 10px; }
  .mhero .dots { right: 16px; bottom: 14px; }
  .after-hero { margin-top: -16px; }
  .hero { min-height: 0; }
  .hero-art { height: min(38vh, 200px); }
  .banner { min-height: 140px; }
  .auth { margin: 16px auto; }
  .player video { max-height: 56vh; }
  .pad-top { padding-top: 16px; }
}
/* Mid widths of an unfolded inner in portrait (about 641–900). Keep at least
   three poster columns and 40 px targets on the side rail. */
@media (min-width: 641px) and (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }
  .site-rail-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
}
html, body { overflow-x: clip; }

/* Hinge-aware: only inside these queries, so unsupported browsers skip them. */
@media (horizontal-viewport-segments: 2) {
  /* Put player controls in the right-hand segment, not across the fold. */
  .pbar, .tvp-osd, .tvp-bar, .player .notice {
    box-sizing: border-box;
    padding-left: max(14px, env(viewport-segment-left 1 0));
    padding-right: 14px;
  }
  .stats { left: auto; right: 12px; }
}
@media (vertical-viewport-segments: 2) {
  /* Laptop posture: keep the picture in the top segment and the controls below the hinge. */
  .player video, .tvp-stage, .tvpv-stage {
    max-height: env(viewport-segment-height 0 0);
  }
  .pbar, .tvp-bar {
    margin-top: calc(env(viewport-segment-top 0 1) - env(viewport-segment-bottom 0 0));
  }
}

