/* ==========================================================================
   Stream — dark streaming UI
   Mobile first. Breakpoints at 640 / 900 / 1200px.
   ========================================================================== */

:root {
  --bg: #07080c;
  --bg-2: #0b0d13;
  --surface: #11141c;
  --panel: #151925;
  --line: #222739;
  --line-soft: rgba(255, 255, 255, .07);

  --text: #f2f5fa;
  /* Prose: softer than a heading, firmer than metadata. It had been written
     as a literal #cdd4e3 in a handful of rules, which is the right colour on
     this theme and 1.39:1 -- invisible -- on the light one. */
  --text-soft: #cdd4e3;
  --muted: #98a2b8;
  --dim: #6b7589;

  --brand: #ff0a3c;
  --brand-2: #ff4d6d;
  --accent: #7c5cff;
  --gold: #ffc14d;
  --ok: #2fd27b;
  --danger: #ff5a68;

  /* Laid over backdrop artwork so text stays readable on top of it. Dark on
     the dark theme; on the light one it has to lighten, not darken. */
  --scrim: rgba(7, 8, 12, .3);

  --grad-brand: linear-gradient(135deg, #ff0a3c 0%, #ff4d6d 45%, #7c5cff 100%);
  --grad-sheen: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,0) 60%);

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow: 0 18px 40px rgba(0, 0, 0, .5);
  --shadow-glow: 0 10px 40px rgba(255, 10, 60, .35);

  --nav-h: 68px;
  --maxw: 1520px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------- themes */
:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --panel: #f0f2f7;
  --line: #dfe3ec;
  --line-soft: rgba(15, 20, 35, .08);

  --scrim: rgba(246, 247, 251, .45);

  --text: #10131c;
  --text-soft: #39425a;
  --muted: #5a6478;
  --dim: #838d a2;
  --dim: #838da2;

  --shadow-sm: 0 1px 3px rgba(15, 20, 35, .1);
  --shadow: 0 12px 32px rgba(15, 20, 35, .14);
  --shadow-glow: 0 8px 26px rgba(255, 10, 60, .28);
}

* { box-sizing: border-box; }

/* The `hidden` attribute must always win. Several components below set
   `display` through a class selector, and an author rule beats the browser's
   `[hidden] { display: none }` -- without this, anything marked hidden (the
   error overlay, the spinner, the speed menu, the paused/playing icons) stays
   on screen and can swallow clicks. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(124, 92, 255, .16), transparent 62%),
    radial-gradient(900px 520px at 6% -6%, rgba(255, 10, 60, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  transition: background-color .25s var(--ease), color .25s var(--ease);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.025em; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 700; }
p { margin: 0 0 1rem; }
::selection { background: rgba(255, 10, 60, .35); }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.5rem) 1rem 4rem;
  flex: 1 0 auto;          /* pushes the footer to the bottom on short pages */
}
body.theatre .page { padding: calc(var(--nav-h) + .5rem) .5rem 2rem; max-width: 1700px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.text-ok { color: var(--ok); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #2a3145 transparent; }
*::-webkit-scrollbar { height: 8px; width: 10px; }
*::-webkit-scrollbar-thumb { background: #2a3145; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #39415a; }

:root[data-theme="light"] body {
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(124, 92, 255, .1), transparent 62%),
    radial-gradient(900px 520px at 6% -6%, rgba(255, 10, 60, .08), transparent 60%),
    var(--bg);
}
:root[data-theme="light"] .nav { background: rgba(255, 255, 255, .82); }
:root[data-theme="light"] .footer { background: rgba(255, 255, 255, .7); }
:root[data-theme="light"] .menu__dropdown,
:root[data-theme="light"] .ctl__pop { background: rgba(255, 255, 255, .98); }
:root[data-theme="light"] .field__input,
:root[data-theme="light"] .field input { background: #fff; }
:root[data-theme="light"] .auth__card {
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
:root[data-theme="light"] .card__placeholder {
  background: linear-gradient(140deg, #e7eaf3, #f2e9f5);
  color: #98a2b8;
}
:root[data-theme="light"] a:hover { color: #000; }
:root[data-theme="light"] .stage { border-color: var(--line); }

/* ------------------------------------------------------------------- nav */
.nav {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  z-index: 60;
  background: rgba(7, 8, 12, .72);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line-soft);
  transition: background .25s var(--ease);
}
.nav__inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.nav__brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.04em;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
}
.nav__logo {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--grad-brand);
  color: #fff;
  font-size: .8rem;
  box-shadow: var(--shadow-glow);
}
.nav__links { display: none; gap: .15rem; margin-left: .9rem; }
.nav__link {
  position: relative;
  color: var(--muted);
  padding: .5rem .8rem;
  border-radius: var(--radius-pill);
  font-size: .93rem;
  font-weight: 500;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--line-soft); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: translateX(-50%);
  transition: width .22s var(--ease);
}
.nav__link:hover::after { width: 46%; }

.nav__search { margin-left: auto; display: flex; align-items: center; }
.nav__search-input {
  width: 0; min-width: 0; opacity: 0; padding: 0; border: 0;
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-pill);
  font: inherit; font-size: .9rem;
  transition: width .28s var(--ease), opacity .2s var(--ease), padding .28s var(--ease);
}
.nav__search:focus-within .nav__search-input,
.nav__search-input:not(:placeholder-shown) {
  width: min(46vw, 280px);
  opacity: 1;
  padding: .5rem .95rem;
  border: 1px solid var(--line);
}
.nav__search-btn {
  background: none; border: 0; color: var(--muted);
  font-size: 1rem; cursor: pointer; padding: .4rem .5rem;
  transition: color .18s var(--ease);
}
.nav__search-btn:hover { color: var(--text); }
.nav__auth { display: flex; gap: .4rem; align-items: center; }

.nav__burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; padding: 0 9px;
  border: 0; border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
}
.nav__burger span { height: 2px; background: var(--text); border-radius: 2px; }

/* user menu */
.menu { position: relative; }
.menu__trigger { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-brand);
  color: #fff; font-weight: 700; font-size: .82rem;
  border: 2px solid rgba(255, 255, 255, .12);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.menu__trigger:hover .avatar { transform: scale(1.06); box-shadow: var(--shadow-glow); }
.avatar--lg { width: 88px; height: 88px; font-size: 1.7rem; }
.menu__dropdown {
  position: absolute; right: 0; top: calc(100% + .6rem);
  min-width: 244px;
  background: rgba(21, 25, 37, .96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .4rem;
  display: none;
  z-index: 70;
  animation: pop .16s var(--ease);
}
.menu.is-open .menu__dropdown { display: block; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu__dropdown a, .menu__logout {
  display: block; width: 100%; text-align: left;
  padding: .55rem .7rem; border-radius: 9px;
  color: var(--muted); font-size: .92rem;
  background: none; border: 0; cursor: pointer; font: inherit;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.menu__dropdown a:hover, .menu__logout:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.menu__header {
  padding: .65rem .7rem .75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .3rem;
  display: grid; gap: .18rem;
}
.menu__header span { color: var(--muted); font-size: .82rem; }

.nav__icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.nav__icon:hover { background: rgba(255, 255, 255, .14); color: var(--text); transform: rotate(-12deg); }
.nav__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav__icon .i-moon { fill: currentColor; stroke: none; }
:root[data-theme="light"] .nav__icon { background: rgba(15, 20, 35, .06); }
:root[data-theme="light"] .nav__icon:hover { background: rgba(15, 20, 35, .12); }

.gicon { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .93rem;
  cursor: pointer; white-space: nowrap;
  transition: transform .16s var(--ease), background .2s var(--ease),
              box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--grad-brand);
  background-size: 180% 180%;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover { color: #fff; background-position: 90% 40%; }
.btn--ghost {
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.btn--google { background: #fff; color: #16181f; }
.btn--google:hover { background: #e9edf4; color: #16181f; }
.btn--disabled { background: rgba(255, 255, 255, .05); color: var(--dim); cursor: not-allowed; }
.btn--disabled:hover { transform: none; }
.btn--lg { padding: .85rem 1.7rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--icon { padding: .55rem; width: 42px; height: 42px; }
.btn--icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.badge {
  display: inline-block;
  padding: .16rem .55rem;
  border-radius: var(--radius-pill);
  font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  /* An opaque surface rather than a white wash: the white was invisible on
     the light theme, which left the pill as floating text. */
  background: var(--panel);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  vertical-align: middle;
}

/* Solid gold with near-black text, not a translucent gold wash with gold text.
   The wash read beautifully on the dark page (12:1) and vanished everywhere
   else: 1.5:1 on the light theme, and 1.05:1 -- literally no contrast at all --
   on a card badge sitting over a pale, sun-lit poster. This is ~10:1 against
   its own background wherever it lands, because it no longer depends on what
   is behind it. */
.badge--premium {
  background: linear-gradient(135deg, #ffd27a, var(--gold));
  border-color: rgba(0, 0, 0, .2);
  color: #2a1c00;
}

/* -------------------------------------------------------------- messages */
.messages { display: grid; gap: .5rem; margin-bottom: 1.4rem; }
.message {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(21, 25, 37, .8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  animation: slide-in .3s var(--ease);
}
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } }
.message--success { border-left-color: var(--ok); }
.message--error { border-left-color: var(--danger); }
.message--warning { border-left-color: var(--gold); }
.message__close { background: none; border: 0; color: var(--muted); font-size: 1.25rem; cursor: pointer; }

.notice {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 193, 77, .1);
  border: 1px solid rgba(255, 193, 77, .26);
  color: var(--gold);
}
.notice--ok {
  background: rgba(47, 210, 123, .1);
  border-color: rgba(47, 210, 123, .26);
  color: var(--ok);
  margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.2rem;
  min-height: 340px;
  display: flex; align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}
.hero__art { position: absolute; inset: 0; }
.hero__art img {
  width: 100%; height: 100%; object-fit: cover; opacity: .58;
  transform: scale(1.04);
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns { to { transform: scale(1.14) translate3d(-1.5%, -1.5%, 0); } }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,8,12,.97) 4%, rgba(7,8,12,.6) 52%, rgba(7,8,12,.12) 100%),
    linear-gradient(0deg, rgba(7,8,12,.97), transparent 62%);
}
.hero__body { position: relative; z-index: 2; padding: 1.6rem; max-width: 660px; }
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: .16em;
  font-size: .7rem; font-weight: 800;
  margin-bottom: .5rem;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__title { text-shadow: 0 4px 26px rgba(0, 0, 0, .6); }
.hero__meta, .detail__meta { color: var(--muted); font-size: .9rem; }
.hero__desc { color: #cdd4e3; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .65rem; }

/* ------------------------------------------------------------------ rows */
.row { margin: 2.6rem 0; }
.row__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: .95rem;
}
.row__head h2 { position: relative; padding-left: .85rem; }
.row__head h2::before {
  content: "";
  position: absolute; left: 0; top: .18em; bottom: .18em;
  width: 4px; border-radius: 3px;
  background: var(--grad-brand);
}
.row__head a { color: var(--muted); font-size: .88rem; transition: color .18s var(--ease); }
.row__head a:hover { color: var(--text); }

.row__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 45%;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: .25rem .25rem 1rem;
  margin: -.25rem -.25rem -1rem;
}
.row__track > * { scroll-snap-align: start; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1.4rem 1rem;
}

/* ----------------------------------------------------------------- cards */
.card { min-width: 0; }
.card__art {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  /* A real edge rather than the near-invisible --line-soft: a poster whose own
     border is pale (and most are) otherwise bleeds straight into the page,
     which is worst on the light theme where there is nothing to bleed against. */
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card__link:hover .card__art {
  transform: translateY(-6px) scale(1.025);
  box-shadow: var(--shadow);
  /* Brand rather than white: a white hover border vanishes on the light theme,
     which is the one place the card most needed an edge. */
  border-color: var(--brand);
}
.card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card__link:hover .card__art img { transform: scale(1.07); }
.card__art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(7,8,12,.85), transparent 46%);
  opacity: 0; transition: opacity .28s var(--ease);
}
.card__link:hover .card__art::after { opacity: 1; }
.card__placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #171c2b, #2a1b33 70%);
  color: var(--dim);
  font-size: 2.1rem; font-weight: 800;
  text-align: center; padding: .5rem;
}
/* Over artwork, so it needs an edge of its own -- a pale poster and a gold
   pill are the same brightness, and without this the pill's outline dissolves
   into the picture even though its text is perfectly readable. */
.card__badge {
  position: absolute; top: .55rem; left: .55rem; z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .28);
}
.card__play {
  position: absolute; right: .6rem; bottom: .6rem; z-index: 2;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff; font-size: .8rem;
  opacity: 0; transform: translateY(6px) scale(.85);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
  box-shadow: var(--shadow-glow);
}
.card__link:hover .card__play { opacity: 1; transform: translateY(0) scale(1); }
.card__title {
  font-size: .95rem; font-weight: 600;
  margin: .65rem 0 .15rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__meta { color: var(--muted); font-size: .79rem; margin: 0; }
.card--progress .card__art { aspect-ratio: 16 / 10; }

.progress {
  height: 4px; border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden; margin-top: .45rem;
}
.progress span { display: block; height: 100%; background: var(--grad-brand); }
.progress--lg { height: 6px; max-width: 440px; margin: 0 0 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips--inline { margin-bottom: 1rem; }
.chip {
  padding: .38rem .95rem;
  border-radius: var(--radius-pill);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line); background: var(--line-soft); }

/* ---------------------------------------------------------------- detail */
.page__head { margin-bottom: 1.8rem; display: grid; gap: .8rem; }
.page__head--center { text-align: center; justify-items: center; }
.page__lede { color: var(--muted); margin: 0; }
.page__note { color: var(--dim); font-size: .84rem; text-align: center; margin-top: 2.4rem; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters select, .filters input {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .55rem 1rem;
  font: inherit; font-size: .9rem;
  transition: border-color .18s var(--ease);
}
.filters select:hover, .filters input:hover { border-color: rgba(255, 255, 255, .25); }

.detail { position: relative; margin-bottom: 2.4rem; }
.detail__art { position: absolute; inset: -1.5rem -1rem auto; height: 380px; overflow: hidden; }
.detail__art img { width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.detail__art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 5%, var(--scrim) 100%);
}
.detail__body { position: relative; z-index: 2; display: grid; gap: 1.6rem; padding-top: 1.4rem; }
.detail__poster { width: 190px; }
.detail__poster img, .detail__poster .card__placeholder {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.detail__desc { color: var(--text-soft); max-width: 70ch; }
.detail__actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-bottom: 1rem; }
.detail__actions form { margin: 0; }
.detail--compact .detail__info { padding-top: 1rem; }

/* --------------------------------------------------------------- seasons */
.seasons { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .35rem; }
.seasons__tab {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: .9rem; font-weight: 600;
  white-space: nowrap;
  transition: all .18s var(--ease);
}
.seasons__tab:hover { color: var(--text); border-color: var(--line); }
.seasons__tab.is-active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.seasons__count {
  font-size: .72rem; font-weight: 700;
  padding: .1rem .45rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, .25);
}
.seasons__tab.is-active .seasons__count { background: rgba(255, 255, 255, .25); }

/* -------------------------------------------------------------- episodes */
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.episode {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1rem;
  padding: .9rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  align-items: center;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.episode:hover { border-color: rgba(255, 255, 255, .18); background: var(--panel); transform: translateX(3px); }
.episode__thumb { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--panel); }
.episode__thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode__body h3 { font-size: 1rem; margin-bottom: .2rem; }
.episode__meta { color: var(--muted); font-size: .82rem; margin: 0 0 .3rem; }
.episode__desc { color: var(--text-soft); font-size: .88rem; margin: 0; }
.episode__action { grid-column: 1 / -1; }

/* ==========================================================================
   Player
   ========================================================================== */
/* The widest a 16:9 box can be and still fit the height we allow it.
   Without this the stage stretched to the full page width, kept its 16:9
   aspect-ratio only until max-height clipped it, and then went wider than
   16:9 -- so the video sat letterboxed inside a too-wide black box with the
   controls running off past its edges. Capping the *width* by the height
   instead means the box is always exactly the shape of the picture. */
.player {
  --stage-w: calc(var(--stage-h) * 16 / 9);
  --stage-h: 82vh;
  display: grid;
  gap: 1rem;
  justify-items: center;
}
.player > * { width: 100%; max-width: var(--stage-w); }

.player__head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.player__titles h1 { font-size: 1.3rem; margin: 0; line-height: 1.25; }
.player__titles p { color: var(--muted); margin: .15rem 0 0; font-size: .88rem; }
.player__note { color: var(--dim); font-size: .8rem; text-align: center; }

/* Year / runtime / rating / quality, pushed to the far end of the header so
   they read as facts about the title rather than competing with it. */
.player__meta {
  display: flex; flex-wrap: wrap; gap: .4rem;
  list-style: none; margin: 0 0 0 auto; padding: 0;
}
.player__meta li {
  font-size: .78rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  padding: .22rem .7rem;
  white-space: nowrap;
}

.player__foot {
  display: grid; gap: 1rem;
  padding: 1.15rem 1.35rem;
}
.player__synopsis {
  margin: 0; color: var(--muted);
  font-size: .92rem; line-height: 1.6; max-width: 78ch;
}
.player__actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.stage {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  /* A soft bloom of the brand behind the picture, so the player reads as part
     of the product rather than a black rectangle dropped on the page. */
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .62),
    0 0 0 1px var(--line-soft),
    0 18px 90px -30px rgba(255, 10, 60, .32);
  aspect-ratio: 16 / 9;
  max-height: var(--stage-h);
  outline: none;
}
.stage:focus-visible { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.stage:fullscreen {
  border-radius: 0; border: 0; box-shadow: none;
  max-height: none; max-width: none; width: 100vw; aspect-ratio: auto;
}
.stage__video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }

.stage__veil {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0,0,0,.6), transparent 42%);
}

/* Big centre play button */
.stage__bigplay {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border: 0; border-radius: 50%;
  background: var(--grad-brand);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 12px 50px rgba(255, 10, 60, .5);
  transition: transform .22s var(--ease), opacity .22s var(--ease);
  animation: pulse 2.6s ease-in-out infinite;
}
.stage__bigplay svg { width: 38px; height: 38px; fill: currentColor; margin-left: 4px; }
.stage__bigplay:hover { transform: translate(-50%, -50%) scale(1.08); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 50px rgba(255, 10, 60, .5); }
  50% { box-shadow: 0 12px 68px rgba(255, 10, 60, .78); }
}

/* Spinner */
.stage__spinner { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.stage__spinner span {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .16);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stage__error {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 1rem;
  background: rgba(7, 8, 12, .9);
  text-align: center; padding: 2rem;
}

.stage__toast {
  position: absolute; left: 50%; top: 18%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .68);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  padding: .45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: .9rem; font-weight: 600;
  pointer-events: none;
  animation: pop .18s var(--ease);
}

/* Persistent "you muted this" badge */
.stage__muted {
  position: absolute; top: 1rem; left: 1rem;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .38rem .8rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-soft);
  font-size: .78rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--gold);
  z-index: 4;
  pointer-events: none;
  animation: pop .2s var(--ease);
}
.stage__muted svg { width: 16px; height: 16px; fill: currentColor; }

/* Host-provided embed player (MEGA and friends) */
.stage--embed { display: block; }
.stage__embed { width: 100%; height: 100%; border: 0; display: block; }

/* Covers the embedded host's title bar (file name, logo, share button).
   Purely an overlay -- we cannot reach inside a cross-origin iframe. */
.stage__mask {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46px;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.stage__mask-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Skip intro / outro */
.stage__skip {
  position: absolute; right: 1.2rem; bottom: 6.2rem;
  z-index: 5;
  padding: .65rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff; font: inherit; font-weight: 700; font-size: .9rem;
  cursor: pointer;
  animation: slide-in .25s var(--ease);
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.stage__skip:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }

/* Up-next card */
.stage__upnext {
  position: absolute; right: 1.2rem; bottom: 6rem;
  z-index: 6;
  width: min(330px, calc(100% - 2.4rem));
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: rgba(10, 12, 18, .93);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: slide-in .3s var(--ease);
}
.stage__upnext h3 { font-size: 1.05rem; margin: 0 0 .2rem; color: #fff; }
.stage__upnext-label {
  margin: 0 0 .35rem; font-size: .68rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand-2);
}
.stage__upnext-sub { margin: 0 0 .9rem; color: var(--muted); font-size: .82rem; }
.stage__upnext-actions { display: flex; gap: .5rem; }
.stage__upnext-actions .btn { flex: 1; padding: .55rem .9rem; font-size: .86rem; }

/* Toggled-on control buttons (repeat, captions) */
.ctl__btn.is-on { color: var(--brand-2); }
.ctl__btn.is-on::after {
  content: "";
  position: absolute; bottom: 4px; left: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-2);
  transform: translateX(-50%);
}

/* Native caption rendering */
.stage__video::cue {
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: .92em;
}

/* Control bar */
.ctl {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 .85rem .7rem;
  background: linear-gradient(0deg, rgba(0,0,0,.86), rgba(0,0,0,.42) 55%, transparent);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  z-index: 3;
}
.player.is-idle .ctl { opacity: 0; transform: translateY(12px); pointer-events: none; }
.player.is-idle .stage { cursor: none; }

.ctl__scrub { position: relative; padding: .7rem 0 .45rem; cursor: pointer; touch-action: none; }
.ctl__rail {
  position: relative;
  height: 5px; border-radius: 4px;
  background: rgba(255, 255, 255, .22);
  overflow: visible;
  transition: height .18s var(--ease);
}
.ctl__scrub:hover .ctl__rail { height: 8px; }
.ctl__buffer {
  position: absolute; inset: 0 auto 0 0;
  width: 0; border-radius: 4px;
  background: rgba(255, 255, 255, .3);
}
.ctl__played {
  position: absolute; inset: 0 auto 0 0;
  width: 0; border-radius: 4px;
  background: var(--grad-brand);
}
.ctl__knob {
  position: absolute; right: -7px; top: 50%;
  width: 14px; height: 14px;
  transform: translateY(-50%) scale(0);
  background: #fff; border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 10, 60, .8);
  transition: transform .18s var(--ease);
}
.ctl__scrub:hover .ctl__knob { transform: translateY(-50%) scale(1); }
.ctl__tip {
  position: absolute; bottom: 100%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .85);
  border: 1px solid var(--line-soft);
  padding: .18rem .5rem;
  border-radius: 6px;
  font-size: .75rem;
  pointer-events: none;
}

.ctl__bar { display: flex; align-items: center; gap: .3rem; }
.ctl__spacer { flex: 1; }
.ctl__btn {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 10px;
  background: none; color: #fff; cursor: pointer;
  transition: background .16s var(--ease), transform .16s var(--ease);
}
.ctl__btn:hover { background: rgba(255, 255, 255, .14); transform: scale(1.06); }
.ctl__btn svg { width: 22px; height: 22px; fill: currentColor; }
.ctl__btn em {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  font-size: .52rem; font-style: normal; font-weight: 700;
}
.ctl__btn--text { width: auto; padding: 0 .7rem; font: inherit; font-weight: 600; font-size: .85rem; }

.ctl__volume { display: flex; align-items: center; gap: .2rem; }
.ctl__vol {
  width: 0; opacity: 0; padding: 0;
  transition: width .24s var(--ease), opacity .2s var(--ease);
  accent-color: var(--brand);
  cursor: pointer;
}
.ctl__volume:hover .ctl__vol, .ctl__vol:focus-visible { width: 84px; opacity: 1; }

.ctl__time { font-size: .82rem; color: #e6eaf3; margin-left: .5rem; font-variant-numeric: tabular-nums; }
.ctl__time b { font-weight: 600; }

.ctl__menu { position: relative; }
.ctl__pop {
  position: absolute; right: 0; bottom: calc(100% + .5rem);
  background: rgba(17, 20, 28, .97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .3rem;
  display: grid; gap: 2px;
  min-width: 128px;
  box-shadow: var(--shadow);
  animation: pop .16s var(--ease);
}
.ctl__pop button {
  background: none; border: 0; color: var(--muted);
  font: inherit; font-size: .86rem;
  padding: .45rem .7rem; border-radius: 8px;
  text-align: left; cursor: pointer;
}
.ctl__pop button:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.ctl__pop button.is-active { color: var(--brand-2); font-weight: 700; }

/* ------------------------------------------------------------------ auth */
.auth { display: grid; place-items: center; padding: 1.5rem 0 3.5rem; }
.auth__card {
  width: min(450px, 100%);
  background: linear-gradient(180deg, rgba(21,25,37,.95), rgba(17,20,28,.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.auth__card::before {
  content: "";
  position: absolute; inset: 0 0 auto;
  height: 3px;
  background: var(--grad-brand);
}
.auth__lede { color: var(--muted); }
.auth__divider { display: flex; align-items: center; gap: .8rem; color: var(--dim); margin: 1.2rem 0; font-size: .78rem; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__foot { color: var(--muted); font-size: .88rem; text-align: center; margin: .8rem 0 0; }
.auth__foot a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.field { display: block; margin-bottom: 1.05rem; }
.field__label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: .38rem; }
.field__input, .field input {
  width: 100%;
  padding: .78rem .95rem;
  background: rgba(10, 12, 18, .8);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field__input:focus, .field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 10, 60, .18);
}
.field__help { display: block; color: var(--dim); font-size: .78rem; margin-top: .32rem; }
.field__error { display: block; color: var(--danger); font-size: .82rem; margin-top: .32rem; }

/* ---------------------------------------------------------------- panels */
.panels { display: grid; gap: 1.1rem; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color .2s var(--ease);
}
.panel:hover { border-color: var(--line); }
.panel--flush { padding: 1rem; margin-bottom: 1rem; }
.panel h2 { font-size: 1.05rem; margin-bottom: 1rem; }
.panel__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line-soft);
  margin: 0; font-size: .92rem;
}
.panel__row span { color: var(--muted); }
.panel__row:last-of-type { border-bottom: 0; }

.profile__head {
  display: grid; gap: 1.1rem; align-items: center;
  margin-bottom: 2.2rem; justify-items: start;
}

/* ----------------------------------------------------------------- plans */
.plans { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(264px, 1fr)); }
.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.7rem;
  display: flex; flex-direction: column;
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
  overflow: hidden;
}
.plan::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-sheen);
  opacity: 0; transition: opacity .24s var(--ease);
  pointer-events: none;
}
.plan:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.2); box-shadow: var(--shadow); }
.plan:hover::before { opacity: 1; }
.plan--current { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255, 193, 77, .35); }
.plan__price { display: flex; align-items: baseline; gap: .35rem; margin: .55rem 0 1.1rem; }
.plan__currency { color: var(--muted); font-size: .9rem; }
.plan__amount {
  font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.plan__period { color: var(--muted); font-size: .9rem; }
.plan__desc { color: var(--muted); font-size: .9rem; }
.plan__features { list-style: none; padding: 0; margin: 0 0 1.35rem; display: grid; gap: .5rem; flex: 1; }
.plan__features li { padding-left: 1.5rem; position: relative; color: #cdd4e3; font-size: .92rem; }
.plan__features li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.table th, .table td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table th { color: var(--dim); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }
.table tbody tr { transition: background .16s var(--ease); }
.table tbody tr:hover { background: rgba(255, 255, 255, .03); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-top: 2.4rem; }
.pagination__status { color: var(--muted); font-size: .88rem; }

.empty {
  color: var(--muted);
  text-align: center;
  padding: 3.4rem 1rem;
  background: rgba(21, 25, 37, .45);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line-soft); margin-top: auto; flex-shrink: 0; background: rgba(5, 6, 9, .7); }
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.4rem 1rem;
  display: grid; gap: .9rem;
  color: var(--muted); font-size: .88rem;
}
.footer__brand { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: .5rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer__note { margin: 0; color: var(--dim); }

/* ----------------------------------------------------------- breakpoints */
/* --------------------------------------------------- mobile refinements */
@media (max-width: 639px) {
  :root { --nav-h: 60px; }

  .page { padding-left: .9rem; padding-right: .9rem; }
  h1 { font-size: clamp(1.5rem, 7vw, 2rem); }

  /* Hero: stack and shrink so it never eats the whole screen */
  .hero { min-height: 62vh; border-radius: var(--radius); }
  .hero__body { padding: 1.1rem; }
  .hero__desc { display: none; }
  .hero__actions .btn { flex: 1; justify-content: center; }

  /* Bigger tap targets, tighter rows */
  .row { margin: 1.8rem 0; }
  .row__track { grid-auto-columns: 42%; gap: .7rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 1rem .7rem; }

  .detail__art { height: 260px; }
  .detail__poster { width: 130px; }
  .detail__actions .btn { flex: 1 1 auto; }
  .detail__body { padding-top: .5rem; }

  .episode { grid-template-columns: 108px 1fr; padding: .7rem; gap: .7rem; }
  .episode__desc { display: none; }
  .episode__action .btn { width: 100%; }

  .auth__card { padding: 1.35rem; border-radius: var(--radius); }
  .panel { padding: 1.1rem; }
  .plan { padding: 1.25rem; }
  .filters { width: 100%; }
  .filters select, .filters input { flex: 1 1 auto; min-width: 0; }

  /* Player fits a phone screen and keeps its controls reachable. Edge to
     edge, so the width cap that centres it on a desktop is lifted here. */
  body.theatre .page { padding-left: 0; padding-right: 0; }
  .player { --stage-w: 100%; }
  .stage {
    border-radius: 0; border-left: 0; border-right: 0;
    max-height: none; box-shadow: none;
  }
  .player__head { padding: 0 .9rem; }
  .player__titles h1 { font-size: 1.05rem; }
  /* The chips wrap onto their own line rather than squeezing the title. */
  .player__meta { margin-left: 0; flex-basis: 100%; }
  .player__foot { margin: 0 .9rem; }
  .player__actions .btn { flex: 1 1 auto; justify-content: center; }
  .ctl { padding: 0 .5rem .45rem; }
  .ctl__btn { width: 40px; height: 40px; }
  .ctl__btn svg { width: 20px; height: 20px; }
  .ctl__time { font-size: .72rem; margin-left: .25rem; }
  .ctl__volume .ctl__vol { display: none; }   /* phones use hardware volume */
  .stage__bigplay { width: 68px; height: 68px; }
  .stage__bigplay svg { width: 30px; height: 30px; }
  .stage__skip { right: .8rem; bottom: 5.2rem; padding: .55rem 1rem; font-size: .84rem; }
  .stage__upnext { right: .8rem; left: .8rem; bottom: 5rem; width: auto; }
  .seasons__tab { padding: .45rem .85rem; font-size: .85rem; }
}

/* Coarse pointers: hover effects are useless, tap targets matter */
@media (hover: none) {
  .card__play { opacity: 1; transform: none; }
  .card__link:hover .card__art { transform: none; }
  .ctl__vol { width: 84px; opacity: 1; }
}

@media (max-width: 899px) {
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(17, 20, 28, .97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: .5rem;
    display: none;
  }
  .nav__links.is-open { display: flex; animation: slide-in .22s var(--ease); }
  .ctl__btn { width: 38px; height: 38px; }
  .ctl__time { font-size: .76rem; }
}

@media (min-width: 640px) {
  .page { padding-left: 1.6rem; padding-right: 1.6rem; }
  .row__track { grid-auto-columns: 30%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .hero { min-height: 420px; }
  .hero__body { padding: 2.6rem; }
  .episode { grid-template-columns: 190px 1fr auto; }
  .episode__action { grid-column: auto; }
  .profile__head { grid-template-columns: auto 1fr auto; }
  .panels { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

@media (min-width: 900px) {
  .nav__burger { display: none; }
  .nav__links { display: flex; }
  .page { padding-left: 2.6rem; padding-right: 2.6rem; }
  .row__track { grid-auto-columns: 19%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
  .hero { min-height: 490px; }
  .detail__body { grid-template-columns: 230px 1fr; align-items: start; }
  .detail__poster { width: 230px; }
  .detail--compact .detail__body { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) {
  .row__track { grid-auto-columns: 15.5%; }
  .hero { min-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   Downloads: the device picker on a detail page, and the device list in
   settings. Both reuse the panel styling above; these only add what is new.
   -------------------------------------------------------------------------- */
.download {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .75rem;
  margin-top: 1rem;
}
.download__pick { display: flex; flex-direction: column; gap: .35rem; }
.download__label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.download select {
  padding: .6rem .75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  font: inherit;
  min-width: 12rem;
}
/* Takes the full row so the message never squeezes the controls. */
.download__status { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--muted); }
.download__status--error { color: var(--brand); }

.detail__downloaded { margin: .75rem 0 0; font-size: .9rem; color: var(--muted); }
.detail__downloaded strong { color: inherit; }
.detail__hint { margin: .75rem 0 0; font-size: .85rem; color: var(--muted); max-width: 46ch; }
/* Only staff see this, and only where a control is missing, so it is marked
   out as an aside rather than dressed up as product copy. */
.detail__hint--staff {
  margin-top: .5rem;
  padding: .6rem .8rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: .82rem;
}
/* `a { color: inherit }` is the site default, which left this reading as
   plain text inside a muted paragraph. */
.detail__hint--staff a {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.detail__hint--staff a:hover { color: var(--brand); }
.detail__hint--staff code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: .05em .35em;
}

.panel__note { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.panel__warn {
  font-size: .85rem;
  padding: .7rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}
.panel__device { padding-bottom: .9rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line); }
.panel__device:last-of-type { border-bottom: 0; }
.page__lede { color: var(--muted); max-width: 62ch; margin-top: .4rem; }
