/* ═══════════════════════════════════════════════════════════════════════════
 *  LUMEN — Design System
 *  An editorial / cinematic streaming aesthetic.
 *  Inspired by: Letterboxd, Mubi, Apple TV+, A24 marketing, magazine layouts.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
  /* Theme accent — toggleable via JS. Default = ember red. */
  --accent: #FF3B30;
  --accent-soft: rgba(255, 59, 48, 0.18);
  --accent-glow: rgba(255, 59, 48, 0.55);

  /* Surfaces */
  --bg: #07080A;
  --bg-1: #0B0C10;
  --bg-2: #111218;
  --bg-3: #181A22;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #F4F4F6;
  --text-dim: #B8B8C0;
  --text-mute: #7A7A86;
  --text-faint: #4F4F5A;

  /* Type stacks */
  --serif: "Fraunces", "Instrument Serif", "Times New Roman", serif;
  --sans: "Bricolage Grotesque", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Menlo", monospace;

  /* Mobile-safe insets (override per-breakpoint) */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottomnav-h: 0px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --t-fast: 180ms;
  --t-base: 320ms;
  --t-slow: 600ms;

  /* Layout */
  --nav-h: 72px;
  --page-pad: clamp(20px, 4vw, 60px);
  --radius: 18px;
  --radius-lg: 26px;

  /* Shadow */
  --lift: 0 30px 60px -30px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.04) inset;
  --lift-hard: 0 45px 80px -25px rgba(0,0,0,0.95);
}

/* ── Reset / base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,0.025) 0%, transparent 50%),
    var(--bg);
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); background-clip: padding-box; border: 2px solid transparent; }

/* ── Type ─────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.serif em { font-style: italic; }
.mono  { font-family: var(--mono); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Reusable buttons */
.btn-primary, .btn-ghost, .icon-btn { all: unset; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 14px;
  font-weight: 600; font-size: 14px;
  background: linear-gradient(180deg, #fff 0%, #d8d8de 100%);
  color: #0a0a0a;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,0.7);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(0,0,0,0.8); }
.btn-primary:active { transform: translateY(0); }
.btn-primary i { font-size: 18px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 14px;
  font-weight: 500; font-size: 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--text);
  backdrop-filter: blur(20px);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--line-strong); transform: translateY(-1px); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.icon-btn i { font-size: 18px; }

/* ── Ambient mesh background ──────────────────────────────────────────────── */
.mesh {
  position: fixed; inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.mesh__layer { position: absolute; inset: -20%; filter: blur(80px); opacity: 0.55; }
.mesh__layer--a {
  background: radial-gradient(40% 35% at 22% 30%, var(--accent) 0%, transparent 60%);
  animation: drift 28s var(--ease) infinite alternate;
}
.mesh__layer--b {
  background: radial-gradient(50% 40% at 80% 20%, #6E56FF 0%, transparent 60%);
  opacity: 0.32;
  animation: drift 36s var(--ease) infinite alternate-reverse;
}
.mesh__layer--c {
  background: radial-gradient(45% 40% at 55% 80%, #00D2A8 0%, transparent 60%);
  opacity: 0.20;
  animation: drift 40s var(--ease) infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(-5%, -3%, 0) scale(1.0) rotate(0deg); }
  100% { transform: translate3d( 6%,  5%, 0) scale(1.15) rotate(8deg); }
}
.mesh__grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
  background-size: 220px 220px;
  opacity: 0.07;
  mix-blend-mode: overlay;
}

/* ── Cursor spotlight (desktop only) ──────────────────────────────────────── */
.cursor-spot {
  position: fixed; top: 0; left: 0;
  width: 540px; height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
  transform: translate3d(-100vw, -100vh, 0);
  transition: transform 80ms linear;
  z-index: -1;
  mix-blend-mode: screen;
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-spot { opacity: 1; }
}

/* ── Splash ───────────────────────────────────────────────────────────────── */
.splash {
  position: fixed; inset: 0;
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 800ms var(--ease-out), visibility 800ms;
}
.splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__inner { text-align: center; }
.splash__mark { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; }
.splash__bar {
  width: 4px; height: 32px;
  background: var(--text);
  border-radius: 4px;
  animation: splashBar 1.2s var(--ease) infinite;
}
.splash__bar:nth-child(2) { animation-delay: 0.12s; background: var(--accent); }
.splash__bar:nth-child(3) { animation-delay: 0.24s; }
.splash__bar:nth-child(4) { animation-delay: 0.36s; background: var(--accent); }
@keyframes splashBar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50%      { transform: scaleY(1); opacity: 1; }
}
.splash__word {
  font-family: var(--serif);
  font-size: 64px;
  letter-spacing: -0.04em;
  color: var(--text);
}
.splash__word em { font-style: italic; color: var(--accent); }
.splash__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 8px;
}

/* ── Top nav ──────────────────────────────────────────────────────────────── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  padding: 0 var(--page-pad);
  display: flex; align-items: center; gap: 36px;
  background: linear-gradient(180deg, rgba(7,8,10,0.92) 0%, rgba(7,8,10,0) 100%);
  backdrop-filter: blur(0px);
  transition: background var(--t-base) var(--ease), backdrop-filter var(--t-base) var(--ease);
}
.topnav.scrolled {
  background: rgba(7,8,10,0.78);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.04em;
  color: var(--text);
}
.brand__name em { font-style: italic; color: var(--accent); }
.brand__dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}
.topnav__links {
  display: flex; gap: 4px;
  margin-right: auto;
}
.topnav__links a {
  position: relative;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.topnav__links a:hover { color: var(--text); background: var(--surface); }
.topnav__links a.active {
  color: var(--text);
}
.topnav__links a.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--accent-glow);
}
.topnav__tools { display: flex; gap: 8px; }

@media (max-width: 860px) {
  .topnav__links { display: none; }
  .topnav { padding: 0 16px; gap: 12px; }
  .topnav__tools { margin-left: auto; }
}

/* ── Bottom nav (mobile only) ─────────────────────────────────────────────── */
.bottomnav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  height: 76px;
  background: rgba(11,12,16,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--line);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: stretch;
}
.bottomnav a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  color: var(--text-mute);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color var(--t-fast);
  position: relative;
}
.bottomnav a i { font-size: 22px; }
.bottomnav a.active { color: var(--text); }
.bottomnav a.active::before {
  content: "";
  position: absolute; top: 6px;
  width: 24px; height: 3px;
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 12px var(--accent-glow);
}
@media (max-width: 860px) {
  .bottomnav { display: flex; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  :root { --bottomnav-h: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ── View / page transitions ──────────────────────────────────────────────── */
.view {
  min-height: 100vh;
  padding-top: var(--nav-h);
  animation: viewIn 600ms var(--ease-out);
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── HERO (Home) ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: min(92vh, 920px);
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 40px;
}
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero__slide.active { opacity: 1; }
.hero__backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: heroPan 22s var(--ease) infinite alternate;
}
@keyframes heroPan {
  0%   { transform: scale(1.05) translate3d(0%,0%,0); }
  100% { transform: scale(1.15) translate3d(-3%,2%,0); }
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,8,10,0) 30%, rgba(7,8,10,0.85) 78%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7,8,10,0.85) 0%, rgba(7,8,10,0.35) 50%, rgba(7,8,10,0) 80%);
}
.hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--page-pad);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 80px;
}
.hero__eyebrow { margin-bottom: 24px; }
.hero__title {
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 124px);
  letter-spacing: -0.045em;
  line-height: 0.92;
  max-width: 16ch;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 18px;
  text-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.hero__title em { font-style: italic; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--text-dim);
  font-size: 13.5px;
}
.hero__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); }
.hero__meta .score {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
}
.hero__synopsis {
  max-width: 620px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 32px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Slide dots */
.hero__dots {
  position: absolute;
  bottom: 24px; right: var(--page-pad);
  z-index: 3;
  display: flex; gap: 6px;
}
.hero__dots button {
  all: unset;
  width: 24px; height: 3px;
  background: rgba(255,255,255,0.16);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--t-fast), width var(--t-fast);
}
.hero__dots button.active { background: var(--accent); width: 44px; }

@media (max-width: 720px) {
  .hero { height: 86vh; min-height: 540px; margin-bottom: 24px; }
  .hero__content { padding-bottom: 110px; }
  .hero__synopsis { font-size: 14px; }
  .hero__dots { bottom: 100px; }
}

/* ── Section / rail ───────────────────────────────────────────────────────── */
.section { max-width: 1480px; margin: 0 auto; padding: 32px var(--page-pad); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px;
  gap: 24px;
}
.section__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.025em;
  font-weight: 400;
}
.section__title em { font-style: italic; color: var(--text-dim); }
.section__sub {
  margin-top: 6px;
  color: var(--text-mute);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.section__head-right {
  display: flex; gap: 8px; align-items: center;
}
.section__head-right a {
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 500;
  transition: color var(--t-fast);
}
.section__head-right a:hover { color: var(--text); }

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 6px 0 24px;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ── Title card (poster) ──────────────────────────────────────────────────── */
.title-card {
  flex: 0 0 220px;
  cursor: pointer;
  position: relative;
  transition: transform var(--t-base) var(--ease);
}
.title-card__poster {
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--lift);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.title-card__poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease), filter var(--t-base);
}
.title-card:hover .title-card__poster {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--lift-hard);
  border-color: var(--accent);
}
.title-card:hover .title-card__poster img {
  transform: scale(1.04);
  filter: brightness(1.1);
}
.title-card__rating {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  padding: 4px 8px;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 4px;
}
.title-card__badge {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono);
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  background: rgba(0,0,0,0.78);
  border-radius: 6px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.title-card__meta {
  padding: 14px 4px 0;
}
.title-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  transition: color var(--t-fast);
}
.title-card:hover .title-card__title { color: #fff; }
.title-card__sub {
  font-size: 11.5px;
  color: var(--text-mute);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .title-card { flex: 0 0 140px; }
  .title-card__title { font-size: 12.5px; }
}

/* ── Rank rail (Top 10) ───────────────────────────────────────────────────── */
.rank-rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 20px 0 30px;
}
.rank-rail::-webkit-scrollbar { display: none; }
.rank-card {
  flex: 0 0 320px;
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: end;
  gap: 0;
  cursor: pointer;
  scroll-snap-align: start;
}
.rank-card__num {
  font-family: var(--serif);
  font-size: 220px;
  font-style: italic;
  font-weight: 400;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px var(--text-faint);
  text-stroke: 2px var(--text-faint);
  margin-right: -36px;
  transition: -webkit-text-stroke-color var(--t-base);
}
.rank-card:hover .rank-card__num {
  -webkit-text-stroke-color: var(--accent);
}
.rank-card__poster {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: transform var(--t-base) var(--ease), border-color var(--t-base);
}
.rank-card:hover .rank-card__poster {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent);
}
.rank-card__poster img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 720px) {
  .rank-card { flex: 0 0 240px; grid-template-columns: 90px 1fr; }
  .rank-card__num { font-size: 140px; margin-right: -20px; }
}

/* ── Continue watching card (landscape) ───────────────────────────────────── */
.continue-card {
  flex: 0 0 380px;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: transform var(--t-base) var(--ease), border-color var(--t-base), box-shadow var(--t-base);
  box-shadow: var(--lift);
}
.continue-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--lift-hard);
}
.continue-card__art {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.continue-card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.continue-card:hover .continue-card__art img { transform: scale(1.06); }
.continue-card__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85) 100%);
}
.continue-card__play {
  position: absolute;
  inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 2;
  opacity: 0; transition: opacity var(--t-base) var(--ease);
}
.continue-card:hover .continue-card__play { opacity: 1; }
.continue-card__play i {
  font-size: 56px;
  color: #fff;
  text-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.continue-card__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.16);
  z-index: 3;
}
.continue-card__bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.continue-card__body { padding: 14px 16px 16px; }
.continue-card__title {
  font-size: 15px; font-weight: 600; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.continue-card__meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
  display: flex; gap: 10px; align-items: center;
}
.continue-card__remove {
  position: absolute; top: 10px; right: 10px;
  z-index: 4;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--t-fast), background var(--t-fast);
  border: 0; cursor: pointer;
}
.continue-card:hover .continue-card__remove { opacity: 1; }
.continue-card__remove:hover { background: var(--accent); }

@media (max-width: 720px) { .continue-card { flex: 0 0 280px; } }

/* ── Genre chips (Discover row) ───────────────────────────────────────────── */
.chips {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.chip {
  all: unset;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.chip.active {
  background: var(--text); color: #0a0a0a;
  border-color: var(--text);
}

/* ── Vibe / curated rail (mood cards) ─────────────────────────────────────── */
.vibe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.vibe-card {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base);
}
.vibe-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.vibe-card::before {
  content: ""; position: absolute; inset: 0;
  z-index: 0;
  opacity: 0.7;
  transition: opacity var(--t-base);
}
.vibe-card:hover::before { opacity: 1; }
.vibe-card__title {
  position: absolute; left: 18px; right: 18px; bottom: 16px;
  z-index: 2;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  font-style: italic;
}
.vibe-card__sub {
  position: absolute; left: 18px; top: 16px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.6);
}

/* ── Browse grid (Movies / TV / Genre) ────────────────────────────────────── */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 26px 20px;
}
@media (max-width: 720px) {
  .browse-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px 12px; }
}

/* Page header (browse pages) */
.page-header {
  padding: 100px var(--page-pad) 40px;
  max-width: 1480px; margin: 0 auto;
}
.page-header__eyebrow { margin-bottom: 16px; }
.page-header__title {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.045em;
  line-height: 0.95;
  font-weight: 400;
}
.page-header__title em { font-style: italic; color: var(--text-dim); }
.page-header__sub {
  margin-top: 18px;
  max-width: 600px;
  color: var(--text-dim);
  font-size: 16px;
}

/* Filter bar */
.filter-bar {
  position: sticky; top: var(--nav-h);
  z-index: 50;
  background: rgba(7,8,10,0.7);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
  padding: 16px var(--page-pad);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  max-width: 1480px; margin: 0 auto;
}
.filter-bar__label {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-mute);
  margin-right: 8px;
}

/* Load more */
.load-more {
  display: flex; justify-content: center;
  padding: 40px 0 60px;
}

/* ── People page ──────────────────────────────────────────────────────────── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 24px;
}
@media (max-width: 720px) {
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
}

.person-card {
  cursor: pointer;
  text-align: center;
  transition: transform var(--t-base) var(--ease);
}
.person-card__avatar {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  border: 2px solid var(--line);
  margin-bottom: 14px;
  transition: border-color var(--t-base), transform var(--t-base) var(--ease), box-shadow var(--t-base);
}
.person-card__avatar img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.person-card:hover .person-card__avatar {
  border-color: var(--accent);
  transform: scale(1.04);
  box-shadow: 0 18px 36px -10px var(--accent-soft);
}
.person-card:hover .person-card__avatar img { transform: scale(1.08); }
.person-card__placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  font-size: 48px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
}
.person-card__name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  font-style: italic;
}
.person-card__role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 4px;
}

/* Person detail */
.person-hero {
  position: relative;
  min-height: 60vh;
  padding: calc(var(--nav-h) + 60px) var(--page-pad) 60px;
  overflow: hidden;
  isolation: isolate;
}
.person-hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(30px) saturate(120%);
  transform: scale(1.2);
  opacity: 0.5;
  z-index: -1;
}
.person-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 50%, transparent, var(--bg) 100%),
    linear-gradient(180deg, rgba(7,8,10,0.4) 0%, var(--bg) 100%);
}
.person-hero__inner {
  max-width: 1480px; margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 800px) { .person-hero__inner { grid-template-columns: 1fr; gap: 32px; } }
.person-hero__avatar {
  width: 280px; height: 280px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  border: 4px solid var(--line);
  box-shadow: var(--lift-hard);
  position: relative;
}
.person-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) { .person-hero__avatar { width: 200px; height: 200px; margin: 0 auto; } }
.person-hero__name {
  font-family: var(--serif);
  font-size: clamp(54px, 8vw, 112px);
  font-style: italic;
  letter-spacing: -0.045em;
  line-height: 0.95;
  font-weight: 400;
  margin-bottom: 22px;
}
.person-hero__stats {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 24px;
}
.stat-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-dim);
  backdrop-filter: blur(8px);
}
.stat-pill i { color: var(--accent); font-size: 14px; }

.person-bio-wrap {
  max-width: 1480px; margin: 0 auto;
  padding: 0 var(--page-pad) 40px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
}
@media (max-width: 900px) { .person-bio-wrap { grid-template-columns: 1fr; gap: 32px; } }
.person-bio {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-dim);
  font-family: var(--serif);
}
.person-bio.collapsed {
  max-height: 290px;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.person-bio-toggle {
  all: unset;
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
}
.person-facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  height: fit-content;
  backdrop-filter: blur(20px);
}
.person-facts h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.person-facts dl {
  margin: 0; display: grid; gap: 14px;
}
.person-facts dt {
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.person-facts dd { margin: 4px 0 0; font-size: 14px; color: var(--text); }

/* ── Title detail page ────────────────────────────────────────────────────── */
.detail-hero {
  position: relative;
  min-height: 86vh;
  overflow: hidden;
}
.detail-hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.detail-hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,8,10,0.55) 0%, rgba(7,8,10,0.15) 30%, var(--bg) 95%),
    linear-gradient(90deg, rgba(7,8,10,0.85) 0%, rgba(7,8,10,0.2) 60%, rgba(7,8,10,0) 100%);
}
.detail-hero__content {
  position: relative;
  max-width: 1480px; margin: 0 auto;
  padding: calc(var(--nav-h) + 60px) var(--page-pad) 60px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 60px;
  align-items: end;
  min-height: 80vh;
}
@media (max-width: 900px) {
  .detail-hero__content { grid-template-columns: 1fr; gap: 24px; }
}
.detail-hero__poster {
  width: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--lift-hard);
  background: var(--bg-2);
  aspect-ratio: 2/3;
}
.detail-hero__poster img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .detail-hero__poster { width: 200px; }
}
.detail-hero__title {
  font-family: var(--serif);
  font-size: clamp(46px, 7vw, 108px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 400;
  margin-bottom: 14px;
}
.detail-hero__title em { font-style: italic; color: var(--text-dim); }
.detail-hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--text-dim);
  margin-bottom: 22px;
  max-width: 60ch;
}
.detail-hero__meta {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  color: var(--text-dim); font-size: 13.5px;
  margin-bottom: 22px;
}
.detail-hero__meta .dot { width: 4px; height: 4px; background: var(--text-faint); border-radius: 50%; }
.genre-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.genre-tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
.detail-hero__overview {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.detail-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Section divider for detail pages */
.divider {
  height: 1px;
  background: var(--line);
  margin: 0 var(--page-pad);
}

/* Season picker / episode list */
.season-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.season-pill {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast);
}
.season-pill:hover { background: var(--surface-2); color: var(--text); }
.season-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}
.episode {
  display: flex; gap: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--t-base) var(--ease);
}
.episode:hover { background: var(--surface-2); border-color: var(--accent); transform: translateY(-2px); }
.episode__still {
  flex: 0 0 160px;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.episode__still img { width: 100%; height: 100%; object-fit: cover; }
.episode__num {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  padding: 3px 7px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  border-radius: 5px;
  color: var(--accent);
}
.episode__body { flex: 1; min-width: 0; }
.episode__title {
  font-weight: 600; font-size: 14.5px;
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.episode__overview {
  font-size: 12.5px;
  color: var(--text-mute);
  line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Cast strip on detail ─────────────────────────────────────────────────── */
.cast-rail {
  display: flex; gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 0 20px;
}
.cast-rail::-webkit-scrollbar { display: none; }
.cast-chip {
  flex: 0 0 120px;
  text-align: center;
  cursor: pointer;
}
.cast-chip__photo {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 2px solid var(--line);
  transition: border-color var(--t-base);
  background: var(--bg-2);
}
.cast-chip:hover .cast-chip__photo { border-color: var(--accent); }
.cast-chip__photo img { width: 100%; height: 100%; object-fit: cover; }
.cast-chip__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.cast-chip__role {
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Watch page (player) ──────────────────────────────────────────────────── */
.watch {
  position: fixed; inset: 0;
  z-index: 200;
  background: var(--bg);
  overflow-y: auto;
  animation: viewIn 400ms var(--ease-out);
}
.watch__bar {
  position: sticky; top: 0;
  z-index: 10;
  height: 64px;
  display: flex; align-items: center;
  padding: 0 var(--page-pad);
  gap: 18px;
  background: linear-gradient(180deg, rgba(7,8,10,0.88), rgba(7,8,10,0));
  backdrop-filter: blur(14px);
}
.watch__crumb {
  flex: 1;
  display: flex; gap: 10px; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.watch__crumb b { color: var(--text); font-weight: 600; }
.watch__crumb .sep { color: var(--text-faint); }
.watch__stage {
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px var(--page-pad) 28px;
}
.watch__player {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow:
    0 50px 100px -30px rgba(0,0,0,0.95),
    0 0 0 1px var(--line);
}
.watch__player iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.watch__player::before {
  /* Ambient glow under player */
  content: ""; position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  z-index: -1;
  background: radial-gradient(80% 60% at 50% 100%, var(--accent-soft), transparent 70%);
  filter: blur(40px);
}
.watch__player.starting {
  display: flex; align-items: center; justify-content: center;
}
.watch__player-start {
  position: relative;
  z-index: 5;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,0.96);
  color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  cursor: pointer;
  border: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transition: transform var(--t-base) var(--ease);
}
.watch__player-start:hover { transform: scale(1.08); }
.watch__player-poster {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.watch__player-poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0.2));
}

.watch__source {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 18px;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.watch__source:hover { background: var(--surface-2); border-color: var(--line-strong); }
.watch__source-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.watch__source-body { flex: 1; min-width: 0; }
.watch__source-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 2px;
}
.watch__source-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.watch__source i.next { font-size: 22px; color: var(--text-mute); transition: transform var(--t-fast); }
.watch__source:hover i.next { transform: translateX(4px); color: var(--text); }

.watch__info {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin-top: 30px;
}
@media (max-width: 900px) { .watch__info { grid-template-columns: 1fr; } }
.watch__title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
}
.watch__title em { font-style: italic; color: var(--text-dim); }
.watch__meta { color: var(--text-dim); font-size: 13px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.watch__overview { color: var(--text-dim); font-size: 15px; line-height: 1.7; margin-bottom: 32px; max-width: 70ch; }

.watch__aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  height: fit-content;
}
.watch__aside h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}

/* Server modal */
.server-modal {
  position: fixed; inset: 0;
  z-index: 400;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  padding: 20px;
}
.server-modal.open { display: flex; animation: viewIn 240ms var(--ease-out); }
.server-modal__panel {
  width: 100%; max-width: 460px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-height: 80vh; overflow-y: auto;
}
.server-modal__panel h3 {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.server-modal__panel p {
  color: var(--text-mute);
  font-size: 13px;
  margin: 0 0 22px;
}
.server-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  margin-bottom: 8px;
  transition: all var(--t-fast);
}
.server-row:hover { background: var(--surface-2); border-color: var(--line-strong); }
.server-row.active { background: var(--accent-soft); border-color: var(--accent); }
.server-row__num {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
}
.server-row.active .server-row__num { background: var(--accent); color: #fff; }
.server-row__body { flex: 1; min-width: 0; }
.server-row__name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.server-row__sub { font-size: 11px; color: var(--text-mute); font-family: var(--mono); letter-spacing: 0.04em; }

/* ── Search overlay ───────────────────────────────────────────────────────── */
.search {
  position: fixed; inset: 0;
  z-index: 300;
  background: rgba(7,8,10,0.96);
  backdrop-filter: blur(28px) saturate(160%);
  transform: translateY(-100%);
  transition: transform 500ms var(--ease);
  display: flex; flex-direction: column;
}
.search.open { transform: translateY(0); }
.search__head {
  display: flex; align-items: center; gap: 16px;
  padding: 26px var(--page-pad);
  border-bottom: 1px solid var(--line);
}
.search__head i { color: var(--text-mute); font-size: 22px; }
.search__head input {
  all: unset;
  flex: 1;
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 44px);
  letter-spacing: -0.02em;
  font-style: italic;
  color: var(--text);
}
.search__head input::placeholder { color: var(--text-faint); }
.search__body {
  flex: 1; overflow-y: auto;
  padding: 30px var(--page-pad) 80px;
  max-width: 1480px; margin: 0 auto; width: 100%;
}
.search__sectiontitle {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.search__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.search__chips .chip { background: var(--surface); }
.search__trending {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px;
}
.search__results .group { margin-bottom: 40px; }
.search__results .group h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.search__results .browse-grid { gap: 22px 18px; }

/* Search result row (compact for people) */
.s-person {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--t-fast);
}
.s-person:hover { background: var(--surface-2); border-color: var(--accent); transform: translateX(4px); }
.s-person__photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  flex: 0 0 56px;
}
.s-person__photo img { width: 100%; height: 100%; object-fit: cover; }
.s-person__body { flex: 1; min-width: 0; }
.s-person__name { font-weight: 600; font-size: 14.5px; }
.s-person__dept { font-family: var(--mono); font-size: 11px; color: var(--text-mute); letter-spacing: 0.06em; }

/* ── Toasts ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 500;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 22px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--lift);
  opacity: 0;
  transition: all 380ms var(--ease-out);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast i { color: var(--accent); margin-right: 8px; }

/* ── Theme accent sheet ───────────────────────────────────────────────────── */
.sheet {
  position: fixed; inset: 0;
  z-index: 400;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  padding: 20px;
}
.sheet.open { display: flex; animation: viewIn 240ms var(--ease-out); }
.sheet__panel {
  width: 100%; max-width: 480px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.sheet__panel h3 {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.sheet__panel p { color: var(--text-mute); font-size: 13px; margin: 0 0 22px; }
.palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.palette button {
  all: unset;
  aspect-ratio: 1/1;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: transform var(--t-fast);
  box-shadow: 0 8px 18px -8px currentColor;
}
.palette button:hover { transform: scale(1.08); }
.palette button.active::after {
  content: "✓";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

/* ── Skeleton states ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-rail {
  display: flex; gap: 18px; padding-bottom: 18px;
}
.skeleton-rail .sk {
  flex: 0 0 220px; aspect-ratio: 2/3; border-radius: var(--radius);
}

/* ── Misc layout helpers ─────────────────────────────────────────────────── */
.spacer-sm { height: 32px; }
.spacer-md { height: 60px; }

/* Page-not-found / empty states */
.empty {
  text-align: center;
  padding: 100px 20px;
}
.empty__icon { font-size: 60px; color: var(--text-faint); margin-bottom: 16px; }
.empty h3 { font-family: var(--serif); font-size: 32px; letter-spacing: -0.02em; margin-bottom: 8px; }
.empty p { color: var(--text-mute); font-size: 14px; margin: 0 auto 20px; max-width: 400px; }

/* Footer */
.footer {
  margin-top: 100px;
  padding: 60px var(--page-pad);
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.footer .brand {
  margin-bottom: 12px;
  font-size: 32px;
  display: inline-flex;
}
.footer p { margin: 0 0 8px; }
.footer__legal {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 18px;
}


/* ═══════════════════════════════════════════════════════════════════════════
 *  MULTIFLIX · v2 OVERLAY
 *  Brand refresh · skeleton loaders · persistent player + PiP mini · v2 episodes
 *  Loaded AFTER the v1 design system; intentionally overrides where needed.
 * ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --pip-shadow: 0 18px 50px -10px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06);
  --pip-shadow-strong: 0 30px 80px -10px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.10);
  --skeleton-base: rgba(255,255,255,0.04);
  --skeleton-shine: rgba(255,255,255,0.10);
  --t-snap: 220ms;
  --t-spring: 520ms;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Brand refresh ────────────────────────────────────────────────────────── */
.brand { gap: 12px; align-items: center; }
.brand__logo {
  width: 36px; height: 36px;
  display: block;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 6px 18px -8px rgba(0,0,0,0.6), 0 0 18px -6px var(--accent-glow);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  overflow: hidden;
  flex-shrink: 0;
}
.brand:hover .brand__logo { transform: scale(1.04) rotate(-2deg); }
.brand__dot { display: none !important; }      /* legacy dot replaced by logo */
.brand__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
  white-space: nowrap;
}
.brand__name em {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.footer .brand__logo { width: 30px; height: 30px; }
@media (max-width: 768px) {
  .brand__logo { width: 30px; height: 30px; border-radius: 8px; }
  .brand__name { font-size: 20px; letter-spacing: -0.03em; }
}

/* ── Splash refresh ───────────────────────────────────────────────────────── */
.splash__mark { display: none; }
.splash__logo {
  width: 88px; height: 88px;
  display: block;
  border-radius: 22px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  box-shadow: 0 25px 60px -15px rgba(0,0,0,0.6),
              0 0 0 1px rgba(255,255,255,0.08),
              0 0 40px -10px var(--accent-glow);
  animation: splashLogo 2.4s var(--ease) infinite;
  overflow: hidden;
}
@keyframes splashLogo {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.04); }
}
.splash__loader {
  width: 110px; height: 2px;
  margin: 22px auto 0;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.splash__loader span {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: splashScan 1.2s var(--ease) infinite;
}
@keyframes splashScan {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── View transitions ─────────────────────────────────────────────────────── */
.view {
  transition: opacity 240ms var(--ease-out), transform 360ms var(--ease-out);
  will-change: opacity, transform;
}
.view--leaving  { opacity: 0; transform: translateY(6px); }
.view--entering { opacity: 0; transform: translateY(10px); animation: viewIn 480ms var(--ease-out) forwards; }
@keyframes viewIn { to { opacity: 1; transform: translateY(0); } }

/* ── Title-card shimmer (loading shimmer over poster while img loads) ────── */
.title-card__poster { position: relative; }
.title-card__shimmer {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,0.05) 50%, transparent 62%);
  background-size: 220% 100%;
  animation: shimmer 1.8s linear infinite;
  opacity: 1;
  transition: opacity 360ms var(--ease-out);
  z-index: 1;
}
.title-card__poster img { position: relative; z-index: 2; }
.title-card__poster img.loaded ~ .title-card__shimmer,
.title-card__poster:has(img[src]) .title-card__shimmer { opacity: 0; }
.title-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 48px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
}

/* ═══ Skeletons ═══════════════════════════════════════════════════════════ */
.sk {
  position: relative;
  background: var(--skeleton-base);
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
}
.sk::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 35%, var(--skeleton-shine) 50%, transparent 65%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.sk--poster { aspect-ratio: 2/3; width: 100%; border-radius: 14px; margin-bottom: 12px; }
.sk--still  { aspect-ratio: 16/10; width: 100%; border-radius: 12px; margin-bottom: 10px; }
.sk--line   { height: 12px; margin: 6px 0; }
.sk--line-lg    { height: 14px; width: 80%; }
.sk--line-sm    { height: 10px; width: 50%; }
.sk--line-title { height: 22px; width: 280px; max-width: 60%; margin: 4px 0; }
.sk--line-sub   { height: 12px; width: 220px; max-width: 50%; }
.sk--title-xl   { height: 38px; width: 70%; margin: 10px 0; border-radius: 8px; }
.sk--eyebrow    { height: 10px; width: 160px; }
.sk--meta       { height: 11px; width: 100%; }
.sk--btn        { height: 46px; width: 160px; border-radius: 999px; background: var(--accent-soft); }
.sk--btn-ghost  { height: 46px; width: 130px; border-radius: 999px; }
.sk--avatar     { width: 92px; height: 92px; border-radius: 50%; flex: 0 0 auto; }
.sk--detailPoster { width: 240px; aspect-ratio: 2/3; border-radius: var(--radius); flex: 0 0 auto; }
.sk--continue   { height: 86px; border-radius: 14px; }
.sk--bigNum     { width: 110px; height: 200px; flex: 0 0 auto; opacity: 0.5; border-radius: 8px; }

.sk-card { display: flex; flex-direction: column; min-width: 0; }
.sk-rail .sk-card { width: 200px; flex: 0 0 200px; }
.sk-rank { display: flex; align-items: flex-end; gap: 10px; flex: 0 0 auto; }
.sk-rank .sk--poster { width: 160px; aspect-ratio: 2/3; margin-bottom: 0; }

.sk-episode { background: var(--bg-1); padding: 14px; border-radius: 14px; border: 1px solid var(--line); }
.sk-person { display: flex; flex-direction: column; align-items: center; padding: 14px; }
.sk-person .sk--avatar { margin-bottom: 12px; }

/* Hero skeleton */
.hero--skeleton .hero__skbg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
}
.hero--skeleton .hero__skbg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: shimmer 2.2s linear infinite;
}
.hero--skeleton .hero__content > .sk { margin: 6px 0; }
.hero--skeleton .hero__content > .sk--title-xl { height: 48px; }

/* Detail hero skeleton */
.detail-hero--skeleton .detail-hero__skbg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
}
.detail-hero--skeleton .detail-hero__skbg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: shimmer 2.2s linear infinite;
}
.detail-hero__skmeta { flex: 1; min-width: 0; }

/* Person hero skeleton */
.person-hero--skeleton .person-hero__skbg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
}
.person-hero--skeleton .person-hero__skbg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: shimmer 2.2s linear infinite;
}

/* ═══ Episodes v2 ═════════════════════════════════════════════════════════ */
.section--episodes .section__head { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.section__head-right { display: flex; gap: 10px; }
.season-select {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font: 500 13px/1.2 var(--sans);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffffcc' stroke-width='2.5' stroke-linecap='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 38px;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.season-select:hover { border-color: var(--line-strong); }
.season-select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.season-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  margin: 4px 0 14px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.season-bar::-webkit-scrollbar { height: 6px; }
.season-bar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.season-pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font: 500 12.5px/1 var(--sans);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.season-pill:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.season-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}
.season-pill__n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  font: 700 11px/1 var(--mono);
}
.season-pill.active .season-pill__n { background: rgba(255,255,255,0.20); }
.season-pill__count {
  font: 500 11px/1 var(--mono);
  opacity: 0.65;
  padding-left: 6px;
  border-left: 1px solid currentColor;
  margin-left: 2px;
}
.season-pill__name { letter-spacing: -0.01em; }

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.episode {
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.episode:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.6), 0 0 0 1px var(--accent-soft);
}
.episode__still {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  overflow: hidden;
}
.episode__still img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 500ms var(--ease-out);
}
.episode:hover .episode__still img { transform: scale(1.04); }
.episode__still-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 38px;
}
.episode__num {
  position: absolute; top: 10px; left: 10px;
  font: 700 10.5px/1 var(--mono);
  letter-spacing: 0.08em;
  padding: 6px 10px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 6px;
}
.episode__playhint {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 20px;
  opacity: 0;
  transform: scale(0.85) translateY(4px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.episode:hover .episode__playhint {
  opacity: 1;
  transform: scale(1) translateY(0);
  background: var(--accent);
  box-shadow: 0 10px 24px -6px var(--accent-glow);
}
.episode__body { padding: 14px 16px 16px; }
.episode__title { font: 600 14px/1.35 var(--sans); color: var(--text); margin-bottom: 4px; }
.episode__meta {
  display: inline-flex; flex-wrap: wrap;
  align-items: center; gap: 8px;
  color: var(--text-mute); font: 500 11px/1.2 var(--mono);
  margin-bottom: 8px;
}
.episode__meta .dot { width: 3px; height: 3px; background: var(--text-faint); border-radius: 50%; }
.episode__overview {
  color: var(--text-dim);
  font-size: 12.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══ Vibe card refinement ════════════════════════════════════════════════ */
.vibe-card__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.42;
  transition: opacity var(--t-base) var(--ease), transform 700ms var(--ease-out);
}
.vibe-card:hover .vibe-card__bg { opacity: 0.55; transform: scale(1.05); }
.vibe-card__tint {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--vc) 40%, transparent), transparent 60%);
}
.vibe-card__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 100%);
}

/* ═══ Persistent player host (stage + mini) ═══════════════════════════════ */
.player-host {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: 80;
  background: #000;
  overflow: hidden;
  pointer-events: auto;
  contain: layout paint style;
  transform: translate3d(0, 0, 0);
  /* Only animate transform/size — GPU-cheap. Position never uses left/top. */
  transition:
    transform 380ms cubic-bezier(0.32, 0.72, 0, 1),
    width    380ms cubic-bezier(0.32, 0.72, 0, 1),
    height   380ms cubic-bezier(0.32, 0.72, 0, 1),
    border-radius 260ms var(--ease-out),
    box-shadow    260ms var(--ease-out);
  will-change: transform;
  border-radius: 0;
}
.player-host[data-mode="hidden"] {
  visibility: hidden;
  pointer-events: none;
}
/* STAGE: position:absolute — the player scrolls together with the page
   natively on the compositor (no JS scroll-sync = no wobble / jelly). */
.player-host[data-mode="stage"] {
  position: absolute;
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
}
/* MINI: position:fixed — stays floating in the viewport. */
.player-host[data-mode="mini"] {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 22px 50px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
}
.player-host.is-dragging {
  transition: none !important;
}

.player-host__frame {
  position: absolute; inset: 0;
  background: #000;
}
.player-host__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  background: #000;
}
/* In mini mode the iframe stays fully interactive — single tap behaves
   exactly like on the stage (native player controls appear). Drag/expand
   live in a thin "title bar" strip at the top only. */

/* loader (skeleton over the iframe while it boots / switches source) */
.player-host__loader {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
  z-index: 2;
}
.player-host.is-loading .player-host__loader { opacity: 1; }
.player-host__loader-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(24px) saturate(120%) brightness(0.55);
  transform: scale(1.1);
}
.player-host__loader-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.25), rgba(0,0,0,0.8) 75%),
    linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}
.player-host__loader-spinner {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; gap: 6px;
}
.player-host__loader-spinner span {
  width: 8px; height: 24px;
  background: rgba(255,255,255,0.85);
  border-radius: 4px;
  animation: loaderBar 1.1s var(--ease) infinite;
}
.player-host__loader-spinner span:nth-child(2) { animation-delay: 0.12s; background: var(--accent); }
.player-host__loader-spinner span:nth-child(3) { animation-delay: 0.24s; }
@keyframes loaderBar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
.player-host__loader-status {
  position: absolute; left: 0; right: 0; bottom: 18%;
  text-align: center;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

/* ── Mini chrome (hover-reveal, YouTube-style) ──────────────────────────── */
.player-host__chrome {
  position: absolute; inset: 0;
  pointer-events: none;
  display: none;
  z-index: 5;
}
.player-host[data-mode="mini"] .player-host__chrome { display: block; }

/* Bottom veil for legibility — sits behind the grip/expand button drag
   bar at the BOTTOM-LEFT of the mini player. Keeps the rest of the iframe
   (where the native player controls live) clean and unobscured. */
.player-host__chrome-veil {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: linear-gradient(0deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
  pointer-events: none;
}
.player-host[data-mode="mini"]:hover .player-host__chrome-veil,
.player-host[data-mode="mini"].show-controls .player-host__chrome-veil,
.player-host.is-dragging .player-host__chrome-veil { opacity: 1; }

/* Drag shield — a thin strip at the BOTTOM-LEFT of the mini player that
   owns drag, double-tap-expand and pinch-to-resize gestures. Positioned
   opposite the resize handle (bottom-right) so the two never overlap.
   The rest of the player (iframe area) stays fully interactive so a single
   tap behaves exactly like on the stage: native player controls appear,
   seek bar works, volume works, etc. */
.player-host__shield {
  position: absolute;
  left: 0; bottom: 0;
  right: 44px;            /* leave the bottom-right corner for the resize handle */
  height: 44px;
  z-index: 3;
  pointer-events: auto;
  cursor: grab;
  background: transparent;
  /* Block native scroll so drag-on-shield works smoothly on touch. */
  touch-action: none;
}
.player-host.is-dragging .player-host__shield { cursor: grabbing; }

/* Grip dots at bottom-center-left as a hint that the bottom-left strip is
   the drag handle. */
.player-host__grip {
  position: absolute;
  bottom: 8px; left: 50%;
  width: 38px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.55);
  opacity: 0;
  transform: translateX(-50%) translateY(2px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  pointer-events: none;
  z-index: 3;
}
.player-host[data-mode="mini"]:hover .player-host__grip,
.player-host[data-mode="mini"].show-controls .player-host__grip,
.player-host.is-dragging .player-host__grip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Corner action buttons — anchored at the BOTTOM-LEFT so they share the
   same zone as the drag shield (opposite the resize handle). */
.player-host__btn {
  position: absolute;
  bottom: 8px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 4;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms var(--ease-out),
              transform 200ms var(--ease-out),
              background 150ms var(--ease-out),
              border-color 150ms var(--ease-out);
}
.player-host__btn--expand { left: 8px; }
.player-host__btn--close  { left: 46px; } /* only used by legacy markup */
.player-host[data-mode="mini"]:hover .player-host__btn,
.player-host[data-mode="mini"].show-controls .player-host__btn,
.player-host.is-dragging .player-host__btn {
  opacity: 1;
  transform: translateY(0);
}
.player-host__btn:hover {
  background: rgba(0,0,0,0.88);
  border-color: rgba(255,255,255,0.22);
}
.player-host__btn--close:hover { background: rgba(220,38,38,0.85); border-color: rgba(255,80,80,0.4); }
.player-host__btn:active { transform: translateY(0) scale(0.94); }

/* ═══ Watch page v2 ═══════════════════════════════════════════════════════ */
.watch-page {
  padding-top: calc(var(--nav-h) + 12px);
  padding-bottom: 80px;
}
.watch-page__bar {
  position: sticky; top: var(--nav-h);
  z-index: 12;
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--page-pad);
  background: linear-gradient(180deg, rgba(7,8,10,0.92), rgba(7,8,10,0.7));
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.watch-page__crumb {
  flex: 1; min-width: 0;
  font: 500 13px/1.2 var(--sans);
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.watch-page__crumb b { color: var(--text); font-weight: 600; }
.watch-page__crumb .sep { color: var(--text-faint); }

.watch-page__stage {
  position: relative;
  margin: 18px var(--page-pad) 14px;
}
/* The .player-anchor is the ghost div we measure to position .player-host.
   It always reserves the right aspect ratio so layout doesn't jump. */
.player-anchor {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-1);
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  background-image:
    radial-gradient(ellipse at center, rgba(255,255,255,0.04), transparent 60%);
}
/* When stage is hidden (mini mode), give a hint */
body:has(.player-host[data-mode="mini"]) .player-anchor::after {
  content: 'Playing in mini · tap to expand';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mute);
  font: 500 12.5px/1.4 var(--mono);
  letter-spacing: 0.14em; text-transform: uppercase;
}

.watch-page__source {
  margin: 0 var(--page-pad) 22px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.watch-page__source:hover { background: var(--surface-2); border-color: var(--line-strong); transform: translateY(-1px); }
.watch-page__source-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  font-size: 20px;
}
.watch-page__source-body { flex: 1; min-width: 0; }
.watch-page__source-label {
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 5px;
}
.watch-page__source-name { font: 600 14px/1.2 var(--sans); color: var(--text); }
.watch-page__source > i { color: var(--text-mute); font-size: 22px; transition: transform var(--t-fast); }
.watch-page__source:hover > i { transform: translateX(4px); color: var(--text); }

.watch-page__info {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  padding: 0 var(--page-pad);
}
@media (max-width: 900px) { .watch-page__info { grid-template-columns: 1fr; } }
.watch-page__title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1; letter-spacing: -0.035em;
  margin: 0 0 16px;
}
.watch-page__title em { font-style: italic; color: var(--accent); }
.watch-page__meta {
  color: var(--text-dim); font-size: 13px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  margin-bottom: 22px;
}
.watch-page__meta .dot { width: 4px; height: 4px; background: var(--text-faint); border-radius: 50%; }
.watch-page__overview {
  color: var(--text-dim); font-size: 15px; line-height: 1.7;
  margin: 0 0 32px; max-width: 70ch;
}
.watch-page__aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.watch-page__aside h4 {
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 14px;
}

/* hide legacy .watch overlay since we moved off it */
.watch { display: none !important; }

/* ═══ Source modal (was .server-modal) ════════════════════════════════════ */
.source-modal {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(7,8,10,0.5);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out);
}
.source-modal.open { opacity: 1; pointer-events: auto; }
.source-modal__panel {
  width: 100%; max-width: 460px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 24px;
  box-shadow: var(--lift-hard);
  transform: translateY(20px) scale(0.96);
  transition: transform 360ms var(--spring);
}
.source-modal.open .source-modal__panel { transform: translateY(0) scale(1); }
.source-modal__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.source-modal__panel h3 {
  font-family: var(--serif); font-size: 30px; letter-spacing: -0.03em;
  margin: 0;
}
.source-modal__panel h3 em { color: var(--accent); }
.source-modal__panel p {
  color: var(--text-mute); font-size: 13px; margin: 0 0 16px;
}
.source-rows {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 50vh; overflow-y: auto;
  padding-right: 4px;
}
.source-row {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  font: 500 13.5px/1.2 var(--sans);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.source-row:hover { background: var(--surface-2); border-color: var(--line-strong); transform: translateX(2px); }
.source-row.active { border-color: var(--accent); background: var(--accent-soft); }
.source-row__num {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  border-radius: 10px;
  font: 700 12px/1 var(--mono);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.source-row.active .source-row__num { background: var(--accent); color: #fff; }
.source-row__body { flex: 1; min-width: 0; }
.source-row__name { font-weight: 600; }
.source-row__sub {
  font: 500 11px/1.4 var(--mono);
  color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-top: 2px;
}
.source-row > i { color: var(--text-mute); font-size: 18px; transition: transform var(--t-fast); }
.source-row.active > i { color: var(--accent); }
.source-row:hover > i { transform: translateX(2px); }

.source-modal__hint {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 12px;
  font: 500 11.5px/1.5 var(--sans);
  color: var(--text-mute);
  display: flex; align-items: center; gap: 8px;
}
.source-modal__hint i { color: var(--accent); }

/* Hide legacy server-modal in case it's referenced */
.server-modal { display: none !important; }

/* ═══ Rail/scroll polish — refine layout ════════════════════════════════ */
.rail { overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.rail__strip { display: flex; gap: 14px; padding: 0 var(--page-pad) 4px; }
.rail__strip > * { scroll-snap-align: start; flex: 0 0 200px; }
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { display: none; }

/* ═══ Mobile polish ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .player-host[data-mode="mini"] { border-radius: 12px; }
  .player-host__btn { width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }
  .player-host__grip { width: 30px; height: 3px; top: 6px; }
  /* Touch devices: chrome appears only after a tap (show-controls class) */
  .player-host[data-mode="mini"]:hover .player-host__btn,
  .player-host[data-mode="mini"]:hover .player-host__grip,
  .player-host[data-mode="mini"]:hover .player-host__chrome-veil { opacity: 0; }
  .player-host[data-mode="mini"].show-controls .player-host__btn,
  .player-host[data-mode="mini"].show-controls .player-host__grip,
  .player-host[data-mode="mini"].show-controls .player-host__chrome-veil { opacity: 1; }
  .player-host[data-mode="mini"].show-controls .player-host__btn { transform: translateY(0); }
  .player-host[data-mode="mini"].show-controls .player-host__grip { transform: translateX(-50%) translateY(0); }

  .watch-page__bar { padding: 10px 14px; }
  .watch-page__stage { margin: 12px 14px 10px; }
  .watch-page__source { margin: 0 14px 16px; padding: 12px 14px; }
  .watch-page__info { padding: 0 14px; gap: 24px; }
  .watch-page__title { font-size: clamp(28px, 8vw, 40px); }

  .source-modal__panel { padding: 22px 18px; }
  .source-modal__panel h3 { font-size: 26px; }

  .episodes-grid { grid-template-columns: 1fr; }
  .season-pill__count { display: none; }

  .brand__logo { width: 30px; height: 30px; border-radius: 8px; }

  .splash__logo { width: 64px; height: 64px; border-radius: 16px; }
  .splash__word { font-size: 48px; }
}

@media (max-width: 480px) {
  /* JS sets mini width/height — no !important overrides needed */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════
   MOBILE PERFORMANCE PASS  ·  v2026.05
   The previous build ran the same heavy GPU effects on phones as on
   desktops (large radial blurs, grain overlays, backdrop-filter blurs on
   every nav/card, brand pulse, hero pan). On low-end devices this added
   up to "graphics-heavy game" feel. We dial down or disable the most
   expensive effects on small screens / coarse pointers, while preserving
   the editorial look.
   ═══════════════════════════════════════════════════════════════════════ */

/* Use coarse-pointer (touch) AND/OR small viewport as the mobile signal */
@media (max-width: 860px), (pointer: coarse) {

  /* Ambient mesh: keep the gradient but stop animating + lighter blur.
     `filter: blur(80px)` over a full-screen layer is one of the most
     expensive things you can do on a mobile GPU. */
  .mesh__layer { filter: blur(48px); opacity: 0.40; animation: none !important; }
  .mesh__layer--b { opacity: 0.22; }
  .mesh__layer--c { opacity: 0.14; }

  /* Grain overlay is invisible at typical mobile DPRs but still paints. */
  .mesh__grain { display: none; }

  /* Cursor spotlight is desktop-only via @media (hover) already — belt + braces */
  .cursor-spot { display: none !important; }

  /* Brand pulse animation cost is tiny but we kill the glow pulse on
     touch to stop a re-paint loop in the URL/nav area. */
  .brand__dot, .brand__dot:before, .brand__dot:after { animation: none !important; }

  /* Hero auto-pan keyframe — pause on mobile (saves a full-screen
     transform repaint every frame). */
  .hero__slide .hero__bg,
  .hero__slide.active .hero__bg { animation: none !important; }

  /* Tone down backdrop-filter blurs (gpu shader cost is real on mobile) */
  .topnav.scrolled       { backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%); }
  .bottomnav             { backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); }
  .watch-page__bar       { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .btn-ghost             { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .player-host__btn      { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

  /* content-visibility lets the browser skip layout/paint for offscreen
     sections — huge scrolling win on mobile. */
  .section, .row, .grid, .episodes-grid {
    content-visibility: auto;
    contain-intrinsic-size: 1px 400px;
  }

  /* Smaller will-change footprint: only the player-host needs it */
  .view, .title-card { will-change: auto; }
}

/* Even more aggressive cuts on very small phones */
@media (max-width: 480px) {
  .mesh__layer { filter: blur(36px); opacity: 0.30; }
  .mesh__layer--b, .mesh__layer--c { display: none; }
}

/* Respect Save-Data and reduced-motion users */
@media (prefers-reduced-data: reduce) {
  .mesh, .cursor-spot, .mesh__grain { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MINI / FLOATING PLAYER FIXES
   1) Keep the mini above the bottom-nav (and notch safe-area).
   2) Disable size/transform transitions while DRAGGING or SCROLLING
      so the floating window doesn't feel "rubbery" on mobile.
   3) Force GPU compositing — but only on the player-host, not the
      world — to avoid a fullscreen composited layer.
   ═══════════════════════════════════════════════════════════════════════ */
.player-host {
  /* Promote *only* this element. Limits paint area. */
  will-change: transform, width, height;
  /* On older Safari, transform without translate3d skips GPU. */
  -webkit-transform: translate3d(0,0,0);
}

/* Hide chrome instantly while user is scrolling (prevents flicker) */
html.is-scrolling .player-host[data-mode="mini"] .player-host__chrome-veil,
html.is-scrolling .player-host[data-mode="mini"] .player-host__btn,
html.is-scrolling .player-host[data-mode="mini"] .player-host__grip { opacity: 0 !important; }

/* While dragging, no transition jitter on iOS Safari */
.player-host.is-dragging,
.player-host.is-dragging * { transition: none !important; }

@media (max-width: 860px), (pointer: coarse) {
  /* In mini mode the buttons + grip should always be visible on touch
     devices (no hover state to discover them). */
  .player-host[data-mode="mini"] .player-host__btn,
  .player-host[data-mode="mini"] .player-host__grip,
  .player-host[data-mode="mini"] .player-host__chrome-veil { opacity: 1 !important; transform: none !important; }
  .player-host[data-mode="mini"] .player-host__btn { transform: translateY(0) !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   IMAGE FALLBACK / ERROR STATE
   Network failures shouldn't leave broken-image icons. .img-error class
   is added by app.js onerror. Replaces with a subtle accent gradient.
   ═══════════════════════════════════════════════════════════════════════ */
img.img-error {
  visibility: hidden;
}
.title-card__poster:has(img.img-error)::after,
.continue-card__art:has(img.img-error)::after,
.hero__bg.img-error {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, var(--bg-2), var(--bg-1)),
    radial-gradient(ellipse at center, var(--accent-soft), transparent 70%);
  background-blend-mode: screen;
}

/* ═══════════════════════════════════════════════════════════════════════
   EMPTY STATES — avoid the "lonely user icon on a black page" effect
   ═══════════════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  min-height: 50vh;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-mute);
}
.empty-state__icon {
  font-size: 36px;
  color: var(--text-faint);
  background: var(--surface);
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.empty-state__title {
  font: 500 18px/1.3 var(--sans);
  color: var(--text);
}
.empty-state__hint { font-size: 13.5px; max-width: 380px; line-height: 1.55; }


/* ═══════════════════════════════════════════════════════════════════════
   MINI PLAYER · RESIZE HANDLE (YouTube-style, bottom-right corner)
   Aspect ratio is locked to 16:9, min/max are clamped to the viewport.
   ═══════════════════════════════════════════════════════════════════════ */
.player-host__resize {
  position: absolute;
  right: 6px; bottom: 6px;
  width: 28px; height: 28px;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 9px;
  color: #fff;
  font-size: 14px;
  cursor: nwse-resize;
  pointer-events: auto;
  z-index: 5;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms var(--ease-out),
              transform 200ms var(--ease-out),
              background 150ms var(--ease-out),
              border-color 150ms var(--ease-out);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 0;
}
.player-host__resize i { pointer-events: none; line-height: 1; }
.player-host[data-mode="mini"] .player-host__resize { display: inline-flex; }
.player-host[data-mode="mini"]:hover .player-host__resize,
.player-host[data-mode="mini"].show-controls .player-host__resize,
.player-host.is-resizing .player-host__resize,
.player-host.is-dragging  .player-host__resize { opacity: 1; transform: translateY(0); }
.player-host__resize:hover  { background: rgba(0,0,0,0.88); border-color: rgba(255,255,255,0.22); }
.player-host__resize:active { transform: scale(0.94); }

/* Lock all transitions while resizing — same pattern as drag */
.player-host.is-resizing,
.player-host.is-resizing * { transition: none !important; }
.player-host.is-resizing { cursor: nwse-resize; }

/* While resizing or pinching, hide the iframe interaction layer */
.player-host.is-resizing .player-host__frame iframe,
.player-host.is-pinching  .player-host__frame iframe { pointer-events: none; }

/* On touch the handle is always visible (no hover to discover it). */
@media (max-width: 860px), (pointer: coarse) {
  .player-host[data-mode="mini"] .player-host__resize { opacity: 1 !important; transform: none !important; }
}

/* Auto-hide handle while user is scrolling (matches the other mini chrome). */
html.is-scrolling .player-host[data-mode="mini"] .player-host__resize { opacity: 0 !important; }



/* ═══════════════════════════════════════════════════════════════════════
   Watch-page episode list (full season grid on TV)
   ═══════════════════════════════════════════════════════════════════════ */
.watch-page__episodes {
  margin-top: 12px;
  padding-bottom: 40px;
}
.watch-page__episodes .section { padding: 28px var(--page-pad) 0; }
.watch-page__episodes .section__head { margin-bottom: 18px; }

/* Highlight the currently-playing episode in the list */
.episode--playing {
  position: relative;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 12px;
}
.episode--playing::before {
  content: "NOW PLAYING";
  position: absolute; top: 8px; left: 8px;
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.14em;
  color: #fff;
  background: var(--accent);
  padding: 5px 8px;
  border-radius: 6px;
  z-index: 3;
  box-shadow: 0 4px 12px -2px var(--accent-glow);
}

/* Make hero feel swipe-able (cursor hint on desktop, gesture on touch) */
.hero { touch-action: pan-y; }
@media (pointer: coarse) { .hero { cursor: grab; } }


