/* ==========================================================================
   GoopGaming (new UI) — design system and layout.
   Near-black page tinted by a blurred copy of the featured backdrop, floating
   glass navigation, 85vh hero, poster rails with centred hover details,
   filterable grids, a full-page title view and liquid-light utility pages.
   Mobile first; the desktop layout starts at 1024px.
   ========================================================================== */

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

:root {
  --page: #04120b;
  --base: #050505;
  --text: #ffffff;
  --w90: rgba(255, 255, 255, 0.9);
  --w80: rgba(255, 255, 255, 0.8);
  --w70: rgba(255, 255, 255, 0.7);
  --w60: rgba(255, 255, 255, 0.6);
  --w55: rgba(255, 255, 255, 0.55);
  --w50: rgba(255, 255, 255, 0.5);
  --w40: rgba(255, 255, 255, 0.4);
  --w10: rgba(255, 255, 255, 0.1);
  --w05: rgba(255, 255, 255, 0.05);
  /* Legacy aliases still used by sports, parties and profile screens. */
  --text-2: rgba(255, 255, 255, 0.7);
  --text-3: rgba(255, 255, 255, 0.45);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.15);
  --glass: rgba(255, 255, 255, 0.1);
  --glass-2: rgba(18, 18, 20, 0.86);
  --glass-3: rgba(255, 255, 255, 0.05);
  --panel: rgba(20, 20, 20, 0.6);
  --blur: blur(20px) saturate(1.5);
  --lift: 0 8px 30px rgba(0, 0, 0, 0.3);
  /* Theme accents; app.js overrides both per the Theme setting. */
  --accent: #95ff50;
  --accent-strong: #3f8a1d;
  --green: var(--accent-strong);
  --green-hi: var(--accent);
  --gold: #facc15;
  --radius: 12px;
  --side: 24px;
  --head-x: 24px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-ui: ui-sans-serif, system-ui, "Segoe UI", "Inter", sans-serif;
  --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --lift-text: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
  color-scheme: dark;
}

@media (min-width: 1024px) {
  :root { --side: 64px; --head-x: 48px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
}

body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, [contenteditable]:not([contenteditable="false"]) { -webkit-user-select: text; user-select: text; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; border-radius: 8px; }

/* --------------------------------------------------------------------------
   Page background: near-black base, blurred backdrop, soft top bleed
   -------------------------------------------------------------------------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--base); transition: background-color 0.5s; }
.ambient-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); }
.ambient-layer.is-on { opacity: 1; }
.ambient-layer img { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(80px) saturate(1); opacity: 0.5; transform: translateZ(0); }
/* Fade the top tint before its clipped edge so scrolling never exposes a seam. */
.ambient-layer .bleed { position: absolute; inset: 0 0 auto; height: 40vh; overflow: hidden; opacity: 0.2; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.ambient-layer .bleed img { left: -10%; top: -10%; width: 120%; height: 120%; filter: blur(50px) saturate(1); opacity: 1; }
body.is-liquid .ambient-layer { opacity: 0 !important; }

/* Animated liquid light behind search, lists and settings. */
.liquid { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #050a05; opacity: 0; transition: opacity 0.6s var(--ease); }
body.is-liquid .liquid { opacity: 1; }
.liquid canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; filter: blur(6px); transform: scale(1.03); }
.liquid.no-gl canvas { display: none; }
.liquid.no-gl {
  background:
    radial-gradient(60% 50% at 18% 30%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%),
    radial-gradient(50% 45% at 82% 18%, color-mix(in srgb, var(--accent-strong) 45%, transparent), transparent 70%),
    radial-gradient(70% 60% at 60% 85%, color-mix(in srgb, var(--accent-strong) 35%, transparent), transparent 70%),
    #050505;
}
.liquid.is-black { background: #000; }
.liquid.is-black canvas, .liquid.is-black::after { display: none; }
:root[data-theme="amoled"] { --page: #000; --base: #000; }
:root[data-theme="amoled"] .ambient-layer { display: none; }
.liquid::after {
  content: ""; position: absolute; inset: 0; opacity: 0.32; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Glass primitives and buttons
   -------------------------------------------------------------------------- */
.glass {
  background: var(--glass); border: 1px solid var(--w10);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.panel {
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px; letter-spacing: 0.025em;
  white-space: nowrap; transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-light { background: #f2f2f2; color: #000; }
.btn-light:hover { background: #fff; transform: scale(1.03); }
.btn-glass { background: var(--w10); border: 1px solid var(--w10); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.18); }
.btn-ghost { color: var(--w70); }
.btn-ghost:hover { color: #fff; background: var(--w05); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; letter-spacing: 0; }
.btn-lg { height: 52px; min-width: 130px; padding: 0 24px; font-size: 18px; gap: 10px; }
.btn-lg .icon { width: 20px; height: 20px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%;
  background: var(--w10); border: 1px solid var(--w10); color: #fff;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.icon-btn.is-on { background: #fff; color: #000; }

/* Glass pill holding two icon actions split by a hairline (hero: add | info). */
.btn-split { display: inline-flex; align-items: stretch; height: 52px; border-radius: 999px; overflow: hidden; background: var(--w10); border: 1px solid var(--w10); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn-split button { position: relative; display: grid; place-items: center; width: 64px; color: #fff; transition: background-color 0.15s var(--ease); }
.btn-split button .icon { width: 24px; height: 24px; transition: transform 0.3s var(--ease); }
.btn-split button + button::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: rgba(255, 255, 255, 0.2); }
.btn-split button:hover { background: var(--w10); }
.btn-split button:hover .icon { transform: scale(1.1); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.chip-green { background: var(--green); border-color: transparent; color: #fff; }
.tag { display: inline-flex; align-items: center; padding: 2px 6px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 4px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--w80); }

/* --------------------------------------------------------------------------
   Top bar: back + wordmark left, glass pill navigation right
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--head-x); pointer-events: none; transition: padding 0.32s var(--ease);
}
.topbar > * { pointer-events: auto; }
.mobile-more { margin-left: auto; width: 44px; height: 44px; }
.mobile-more.is-active { background: rgba(255, 255, 255, 0.22); }
@media (min-width: 1024px) { .mobile-more { display: none; } }

.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; }
.brand-back {
  width: 28px; height: 28px; display: grid; place-items: center; color: #fff;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15)); transition: transform 0.2s var(--ease);
}
.brand-back:hover { transform: translateX(-2px); }
.brand-back .icon { width: 28px; height: 28px; stroke-width: 2; }
.wordmark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 44px; min-height: 44px; color: #fff;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 3px rgba(0, 0, 0, 0.35)) drop-shadow(0 2px 12px rgba(255, 255, 255, 0.16));
}
.brand-mark { display: block; width: auto; height: 36px; user-select: none; transition: height 0.3s var(--ease), transform 0.3s var(--ease); }
.wordmark:hover .brand-mark, .wordmark:focus-visible .brand-mark { transform: scale(1.1); }

.nav-pill {
  position: relative; display: none; align-items: center; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(14, 14, 16, 0.38); border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 30px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  transition: padding 0.32s var(--ease), background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.nav-indicator {
  position: absolute; left: 0; top: 6px; z-index: 0; height: 40px; width: 0; border-radius: 999px; background: #fff; opacity: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 16px 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.4s var(--spring), width 0.4s var(--spring), opacity 0.2s, top 0.32s var(--ease);
}
.nav-indicator.is-ready { opacity: 1; }
.nav-indicator.no-anim { transition: none; }
.nav-link {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 24px; border-radius: 999px;
  color: var(--w60); font-family: var(--font-ui); font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap;
  transition: color 0.3s, background-color 0.3s;
}
.nav-link .icon { width: 16px; height: 16px; display: none; }
.nav-link:hover { color: #fff; }
.nav-link.is-active { color: #000; }
.nav-link.is-active .icon { display: block; }
.nav-pill:not(.has-indicator) .nav-link.is-active { background: #fff; }
.nav-sep { width: 1px; height: 20px; margin: 0 6px; background: var(--w10); }
.nav-icon {
  position: relative; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  color: var(--w60); transition: color 0.3s, background-color 0.3s;
}
.nav-icon:hover { color: #fff; background: var(--w10); }
.nav-icon.is-active { background: #fff; color: #000; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 16px 1px rgba(255, 255, 255, 0.18); }
.nav-avatar { width: 22px; height: 22px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 10px; font-weight: 700; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Compact bar once the page scrolls. */
.topbar.is-scrolled { padding-top: 12px; padding-bottom: 12px; }
.topbar.is-scrolled .nav-pill {
  padding: 3px; background: rgba(12, 12, 14, 0.52); border-color: var(--w10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 36px rgba(0, 0, 0, 0.4);
}
.topbar.is-scrolled .nav-indicator { top: 3px; }

/* Phone: icon-only floating tab bar. */
.tabbar {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%);
  width: min(371px, calc(100vw - 20px)); height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 16px;
  border-radius: 999px; background: rgba(14, 14, 16, 0.38); border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 30px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
}
.tabbar a, .tabbar button {
  flex: 1 1 0; height: 40px; display: grid; place-items: center; border-radius: 999px; color: var(--w60);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.tabbar .icon { width: 24px; height: 24px; }
.tabbar .is-active { color: #fff; }
.tabbar > a, .tabbar > button { position: relative; z-index: 1; }
.tab-indicator { position: absolute; left: 0; top: 11px; height: 40px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); opacity: 0; transition: transform 0.4s var(--spring), width 0.4s var(--spring), opacity 0.2s; pointer-events: none; }
.tab-indicator.is-ready { opacity: 1; }

@media (min-width: 1024px) {
  .topbar { padding: 24px var(--head-x); }
  .brand { min-height: 44px; }
  .brand-mark { height: 44px; }
  .topbar.is-scrolled .brand-mark { height: 40px; }
  .nav-pill { display: flex; }
  .tabbar { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; z-index: 0; height: 85vh; height: 85svh; min-height: 520px; }
.hero-media {
  position: absolute; left: 0; right: 0; top: 0; height: 105vh; height: 105svh; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 40%, transparent 98%); mask-image: linear-gradient(#000 40%, transparent 98%);
}
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s var(--ease); }
.hero-media img.is-on { opacity: 1; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 50%), linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent 50%);
}
.hero-body {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 0 24px 80px; text-align: center;
}
.hero-body > * { width: 100%; max-width: 672px; }
.hero-body.is-swapping .hero-copy { opacity: 0; transform: translateY(10px); }
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 16px; transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.hero-title-slot { display: flex; justify-content: center; width: 100%; }
.hero-logo {
  max-width: 100%; max-height: 112px; object-fit: contain; object-position: center;
  filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15)); cursor: pointer;
}
.hero-title { font-size: clamp(36px, 5vw, 64px); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25)); }
.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; font-size: 14px; line-height: 20px; font-weight: 500; filter: var(--lift-text); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .icon { width: 14px; height: 14px; }
.meta .icon.fill { width: 16px; height: 16px; }
.meta b { font-weight: 600; }
.meta .sep { font-size: 8px; color: var(--w50); user-select: none; }
.hero-overview { max-width: 576px; color: #fff; font-size: 14px; line-height: 20px; font-weight: 500; filter: var(--lift-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.hero-dots { position: absolute; right: var(--side); bottom: 128px; z-index: 3; display: none; align-items: center; gap: 8px; }
.hero-dots button { position: relative; width: 8px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--w40); transition: width 0.3s var(--ease), background-color 0.3s var(--ease); }
.hero-dots button:hover { background: rgba(255, 255, 255, 0.7); }
.hero-dots button.is-active { width: 32px; background: rgba(255, 255, 255, 0.3); }
.hero-dots button.is-active::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: dotFill var(--slide-ms, 8000ms) linear forwards; }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (min-width: 1024px) {
  .hero-body { align-items: flex-start; padding: 0 24px 96px 64px; text-align: left; }
  .hero-copy { align-items: flex-start; gap: 24px; }
  .hero-title-slot { justify-content: flex-start; }
  .hero-logo { max-height: 192px; max-width: min(100%, 500px); object-position: left bottom; }
  .meta { justify-content: flex-start; gap: 12px; font-size: 16px; line-height: 24px; }
  .meta .icon { width: 16px; height: 16px; }
  .meta .icon.fill { width: 18px; height: 18px; }
  .meta .sep { font-size: 10px; }
  .hero-overview { font-size: 18px; line-height: 28px; display: block; -webkit-line-clamp: unset; }
  .hero-actions { justify-content: flex-start; margin-top: 24px; }
  .hero-dots { display: flex; }
}

/* --------------------------------------------------------------------------
   Sections, rails and cards
   -------------------------------------------------------------------------- */
.page { position: relative; z-index: 2; padding-bottom: 0; min-height: 100vh; }
.sections { display: flex; flex-direction: column; gap: 32px; position: relative; z-index: 3; }
.page-hero + .sections { padding-top: 16px; }
.page-top { padding-top: 104px; padding-bottom: 40px; }
[data-account-rows]:empty { display: none; }
.sections.is-browse { gap: 0; }
.is-browse [data-upcoming] { margin-top: 16px; }
.is-browse [data-upcoming] .rail { padding-bottom: 48px; }
.is-browse [data-grid-host] { margin-top: 16px; }
.is-browse .browse-head + [data-grid-host] { margin-top: 32px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--side); margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--w90); filter: var(--lift-text); }
.view-all { display: inline-flex; align-items: center; gap: 4px; padding-left: 8px; color: var(--w50); font-size: 14px; line-height: 20px; font-weight: 500; transition: color 0.3s var(--ease); }
.view-all:hover { color: #fff; }
.view-all .icon { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.view-all:hover .icon { transform: translateX(3px); }

.picker { position: relative; }
.picker-btn { display: inline-flex; align-items: center; gap: 4px; padding-bottom: 1px; border-bottom: 2px solid rgba(255, 255, 255, 0.75); font: inherit; font-weight: 600; color: #fff; }
.picker-btn .icon { width: 16px; height: 16px; opacity: 0.7; }

.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--side);
  padding: 16px var(--side) 40px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 auto; }
[data-scroller] { touch-action: pan-x pan-y pinch-zoom; }
[data-scroller] img, [data-scroller] a { -webkit-user-drag: none; }
[data-scroller].is-sliding { scroll-snap-type: none; scroll-behavior: auto; user-select: none; -webkit-user-select: none; }
[data-scroller].is-dragging, [data-scroller].is-dragging * { cursor: grabbing !important; }
[data-scroller].is-sliding .card, [data-scroller].is-sliding .cw-art { transform: none; }
[data-scroller].is-sliding .card .card-art > img { filter: none; }
[data-scroller].is-sliding .card .card-hover, [data-scroller].is-sliding .card .card-veil, [data-scroller].is-sliding .episode .play { opacity: 0; }
[data-scroller].is-sliding .episode .episode-art img { transform: none; }
@media (hover: hover) and (pointer: fine) {
  [data-scroller], [data-scroller] > a, [data-scroller] > .episode, [data-scroller] .cw-art { cursor: grab; }
}
.rail-arrow {
  position: absolute; top: calc(50% - 12px); z-index: 8; width: 40px; height: 40px; display: none; place-items: center; color: #fff;
  transform: translateY(-50%); opacity: 0; filter: var(--lift-text); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.rail-arrow .icon { width: 40px; height: 40px; stroke-width: 2; }
.rail-arrow.left { left: 20px; }
.rail-arrow.right { right: 20px; }
.rail-arrow:hover { transform: translateY(-50%) scale(1.15); }
.rail-wrap:hover .rail-arrow:not(.is-off) { opacity: 1; }
.rail-arrow:focus-visible:not(.is-off) { opacity: 1; }
.rail-arrow.is-off { pointer-events: none; }

.card { position: relative; display: block; width: 140px; scroll-snap-align: start; transition: transform 0.5s var(--ease-out); }
.card-art { position: relative; isolation: isolate; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: var(--w05); box-shadow: var(--shadow-card); }
.card-art > img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.3s var(--ease), transform 0.5s var(--ease); }
.card-art .fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-weight: 700; color: var(--w70); }
.card-veil { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.1), transparent); opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none; }
.card-hover {
  position: absolute; inset: 0; z-index: 2; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 16px;
  text-align: center; opacity: 0; transition: opacity 0.3s var(--ease); pointer-events: none;
}
.card-play { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 50%; background: #fff; color: #000; box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.2); transition: transform 0.15s var(--ease); }
.card-play .icon { width: 24px; height: 24px; margin-left: 2px; }
.card-hover h3 { width: 100%; font-size: 14px; line-height: 17.5px; font-weight: 700; color: #fff; filter: var(--lift-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-hover p { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--w80); }
.card-hover p span { display: inline-flex; align-items: center; gap: 2px; }
.card-hover p .icon { width: 12px; height: 12px; color: var(--gold); }
.card-caption { display: block; margin-top: 8px; padding-bottom: 4px; }
.card-caption h3 { font-size: 12px; line-height: 15px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-caption p { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 10px; line-height: 15px; color: var(--w60); }
.card-caption p span { display: inline-flex; align-items: center; gap: 2px; }
.card-caption .icon { width: 8px; height: 8px; }
.card-badge { position: absolute; top: 8px; left: 8px; z-index: 3; }
.card-soon { height: 22px; padding: 0 8px; font-size: 10px; letter-spacing: 0.02em; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.card-progress { position: absolute; inset: auto 10px 10px; z-index: 3; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.card-progress i { display: block; height: 100%; background: #fff; border-radius: inherit; }
/* Legacy bottom info strip (sports recordings and wide resume cards). */
.card-info { position: absolute; inset: auto 0 0; z-index: 2; padding: 34px 12px 12px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88) 70%); pointer-events: none; }
.card-info h3 { font-size: 14px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-info p { margin-top: 3px; font-size: 12px; color: var(--w70); }

.card.is-wide { width: 60vw; max-width: 316px; }
.card.is-wide .card-art { aspect-ratio: 16 / 9; }
.card.is-wide .card-caption p .icon { width: 10px; height: 10px; }
.card-tab {
  position: absolute; left: 50%; bottom: 0; z-index: 3; transform: translateX(-50%); padding: 4px 12px; border-radius: 7px 7px 0 0;
  background: var(--green); color: #fff; font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap;
}
.card-center-badge { position: absolute; left: 10px; top: 10px; z-index: 3; }

@media (min-width: 640px) {
  .card { width: 160px; }
}
@media (min-width: 1024px) {
  .card { width: 200px; }
  .card-caption { display: none; }
  .card-hover { display: flex; }
  .rail-arrow { display: grid; }
  .card:hover, .card:focus-visible { transform: scale(1.05); z-index: 5; }
  .card:hover .card-art > img, .card:focus-visible .card-art > img { filter: brightness(0.5); }
  .card:hover .card-veil, .card:focus-visible .card-veil, .card:hover .card-hover, .card:focus-visible .card-hover { opacity: 1; }
  .card-play:hover { transform: scale(1.1); }
}

/* Streaming service tiles */
.providers { display: flex; align-items: flex-start; gap: 20px; overflow-x: auto; padding: 8px var(--side) 16px; scrollbar-width: none; mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); }
.providers::-webkit-scrollbar { display: none; }
.provider { flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.provider-logo { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; background: var(--w05); box-shadow: 0 0 0 1px var(--w10), 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.provider-logo img { width: 100%; height: 100%; object-fit: cover; }
.provider-initial { color: var(--w70); font-size: 28px; font-weight: 600; }
.provider:hover .provider-logo, .provider:focus-visible .provider-logo { transform: scale(1.05); box-shadow: 0 0 0 1px #ffffff4d, 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a; }
.provider-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.25; font-weight: 500; color: var(--w55); transition: color 0.3s var(--ease); }
.provider:hover .provider-name, .provider:focus-visible .provider-name { color: #fff; }
.providers.is-sliding .provider .provider-logo { transform: none; box-shadow: 0 0 0 1px var(--w10), 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a; }
.provider-section .rail-arrow { top: 50%; width: 48px; height: 48px; }
.provider-section .rail-arrow.left { left: 16px; }
.provider-section .rail-arrow.right { right: 16px; }
.provider-section .rail-arrow:hover { transform: translateY(-50%) scale(1.1); }

@media (min-width: 1024px) {
  .sections { gap: 48px; }
  .page-hero + .sections { padding-top: 48px; }
  .providers { gap: 24px; }
  .provider { flex-basis: 92px; }
  .provider-logo { width: 80px; height: 80px; }
  .provider-name { font-size: 12px; }
}

/* A provider opens its own Movies / Series catalog, as in Cinejoy. */
.provider-page { padding: 96px 16px 80px; }
.provider-content { max-width: 1600px; margin: 0 auto; }
.provider-heading { display: flex; align-items: center; gap: 16px; padding: 0 16px; margin-bottom: 32px; animation: providerRise 500ms cubic-bezier(.333333, 1, .666667, 1) both; }
.provider-heading .provider-logo { width: 56px; height: 56px; }
.provider-heading h1 { min-width: 0; overflow-wrap: anywhere; font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.025em; filter: drop-shadow(0 10px 8px #0000000a) drop-shadow(0 4px 3px #0000001a); }
.provider-tabs-wrap { padding: 0 16px; margin-bottom: 32px; }
.provider-tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: #ffffff0f; box-shadow: 0 0 0 1px var(--w10); }
.provider-tabs button { padding: 6px 20px; border-radius: 999px; color: var(--w60); font-size: 14px; line-height: 20px; font-weight: 600; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.provider-tabs button:hover { color: #fff; }
.provider-tabs button.is-active { color: #000; background: #fff; }
.provider-results { padding: 0 16px; }
.provider-page .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; padding: 0; }
.provider-result { min-width: 0; animation: providerRise 400ms cubic-bezier(.333333, 1, .666667, 1) both; }
.provider-page .grid .search-hint { grid-column: 1 / -1; padding: 128px 0; color: var(--w50); font-size: 20px; line-height: 28px; text-align: center; }
.provider-page .load-more { min-height: 96px; align-items: center; margin-top: 48px; padding: 0; }
.provider-page .load-more.is-loading::after { content: ''; width: 32px; height: 32px; border: 2px solid #ffffff33; border-top-color: #fff; border-radius: 50%; animation: providerSpin 1s linear infinite; }
@keyframes providerSpin { to { transform: rotate(360deg); } }
@keyframes providerRise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 768px) {
  .provider-page { padding-inline: 40px; }
  .provider-heading, .provider-tabs-wrap, .provider-results { padding-inline: 32px; }
  .provider-heading h1 { font-size: 48px; line-height: 48px; }
  .provider-page .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .provider-page { padding-inline: 56px; }
  .provider-heading .provider-logo { width: 64px; height: 64px; }
  .provider-page .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1280px) { .provider-page .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .provider-heading, .provider-result { animation: none; } }

/* Footer */
.footer { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 80px 24px 120px; text-align: center; }
.footer-mark { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: #fff; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 30%, transparent)); }
.footer p { max-width: 520px; color: var(--w40); font-size: 12px; line-height: 20px; }
@media (min-width: 1024px) { .footer { padding-bottom: 48px; } }

/* --------------------------------------------------------------------------
   Browse pages: title, filters, upcoming rail, grid, floating dock
   -------------------------------------------------------------------------- */
.browse-head { display: flex; flex-direction: column; gap: 24px; padding: 0 var(--side); }
.page-title { padding: 0 var(--side); font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.025em; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15)); }
.browse-head .page-title { padding: 0; }
.page-title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 0 var(--side); }
.page-title-row .page-title { padding: 0; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.browse-head .filters { justify-content: flex-end; }
.select { position: relative; min-width: 0; }
.select-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 140px; height: 38px; padding: 8px 16px; border-radius: 999px;
  background: var(--w05); border: 1px solid var(--w10); color: var(--w90); font-size: 14px; line-height: 20px; font-weight: 500;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.select-btn:hover { background: var(--w10); }
.select-btn > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-btn .icon { width: 16px; height: 16px; opacity: 0.6; }
[data-menu]:has(> span) > .icon:last-child { flex-shrink: 0; transition: transform 300ms var(--ease), opacity 200ms; }
[data-menu][aria-expanded="true"]:has(> span) > .icon:last-child { transform: rotate(180deg); opacity: 1; }
.select-btn.is-set > span::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.filter-icon {
  width: auto; height: 38px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--w05); border: 1px solid var(--w10); color: var(--w90); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background-color 0.3s var(--ease-out);
}
.filter-icon:hover { background: var(--w10); }
.filter-icon .icon { width: 16px; height: 16px; }

.filters-dock {
  position: fixed; left: 50%; bottom: 24px; z-index: 55; display: none; padding: 10px 12px; border-radius: 999px;
  background: rgba(16, 16, 18, 0.72); border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 30px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  transform: translate(-50%, 160%); visibility: hidden; transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.26s;
}
.filters-dock.is-on { transform: translate(-50%, 0); visibility: visible; }
.filters-dock .filters { flex-wrap: nowrap; }
.filters-dock .select-btn, .filters-dock .filter-icon { background: var(--w10); border-color: rgba(255, 255, 255, 0.15); -webkit-backdrop-filter: none; backdrop-filter: none; }

.menu { position: fixed; z-index: 115; overflow: hidden; padding: 0; border-radius: 12px; background: rgba(26, 26, 26, 0.95); border: 1px solid var(--w10); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.menu-scroll { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; scrollbar-width: thin; scrollbar-color: #fff3 transparent; }
.menu-scroll::-webkit-scrollbar { width: 4px; }
.menu-scroll::-webkit-scrollbar-track { background: transparent; }
.menu-scroll::-webkit-scrollbar-thumb { background: #fff3; border-radius: 4px; }
.menu-scroll::-webkit-scrollbar-thumb:hover { background: #fff6; }
.menu-scroll::-webkit-scrollbar-button { display: none; }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 10px 16px; border-radius: 0; text-align: left; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--w70); transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.menu button:hover, .menu button:focus-visible { background: var(--w10); color: #fff; outline: none; }
.menu button.is-active { color: #fff; background: var(--w05); }
.menu button:disabled { opacity: 0.4; cursor: default; }
.menu img { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 4px; object-fit: cover; }
.menu-option-copy { flex: 1; min-width: 0; }
.menu-option-copy small { display: block; margin-top: 0; color: rgba(255, 255, 255, 0.45); font-size: 12px; line-height: 16px; font-weight: 400; }
.menu .menu-check { flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; stroke-width: 3; color: #fff; }
.menu-option-icon { flex: 0 0 24px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: rgba(255, 255, 255, 0.75); background: rgba(255, 255, 255, 0.08); border: 1px dashed rgba(255, 255, 255, 0.3); }
.menu-option-icon .icon { width: 14px; height: 14px; }
.menu-divider { height: 1px; margin: 4px 12px; background: var(--w10); }
.menu.has-details .menu-scroll { max-height: 318px; padding: 6px; }
.menu.has-details button { padding: 8px; border-radius: 8px; color: var(--w80); }
.menu.has-details button.is-active { background: var(--w10); }
.menu.has-details img { flex: 0 0 36px; width: 36px; height: 54px; border-radius: 6px; object-fit: cover; }
.menu.is-centered { transform: translate(-50%, -50%); }
.menu-heading { padding: 12px 16px; border-bottom: 1px solid var(--w10); color: var(--w90); font-size: 14px; line-height: 20px; font-weight: 600; }
.menu-backdrop { position: fixed; inset: 0; z-index: 114; background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (prefers-reduced-motion: reduce) { [data-menu]:has(> span) > .icon:last-child { transition: none; } }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding: 0 var(--side); }
.grid > .card, .grid > div > .card { width: auto; }
.grid.is-wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.is-wide .card.is-wide { width: auto; max-width: none; }
.load-more { display: flex; justify-content: center; padding: 34px 0 0; }

.empty { display: grid; justify-items: center; gap: 0; margin: 0 var(--side); padding: 64px 24px; border-radius: 20px; text-align: center; }
.empty.glass { background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.empty .empty-icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--w10); color: var(--w70); }
.empty .empty-icon .icon { width: 28px; height: 28px; }
.empty h3 { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--w90); }
.empty p { max-width: 320px; margin-top: 6px; color: rgba(255, 255, 255, 0.45); font-size: 14px; line-height: 22.75px; }
.empty .btn { margin-top: 18px; }

.skeleton { background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .page-title { font-size: 48px; line-height: 48px; }
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 48px 16px; }
  .filters-dock { display: block; }
}
@media (min-width: 1800px) { .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

/* --------------------------------------------------------------------------
   Title page
   -------------------------------------------------------------------------- */
.title-page { position: relative; }
.title-backdrop {
  position: relative; width: 100%; height: 65vh; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 40%, transparent 98%); mask-image: linear-gradient(#000 40%, transparent 98%);
}
.title-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.title-page.is-loading-art .title-sections img[loading="lazy"] { display: none; }
.title-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--base) 0%, rgba(5, 5, 5, 0.4) 50%, transparent 100%), linear-gradient(to right, var(--base) 0%, transparent 50%, transparent 100%);
}
.title-layout { position: relative; z-index: 20; display: flex; flex-direction: column; gap: 32px; margin-top: -176px; padding: 0 var(--side); }
.title-main { width: 100%; max-width: 700px; }
.title-logo { display: block; max-height: 80px; max-width: 75%; margin: 0 auto; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15)); }
.title-page .hero-title { font-size: clamp(34px, 4.6vw, 60px); text-align: center; }
.title-genres { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--w90); }
.title-genres .sep { color: var(--w40); }
.title-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.title-actions .btn-play { height: 44px; min-width: 120px; padding: 12px 24px; font-size: 16px; line-height: 24px; letter-spacing: 0.025em; }
.title-actions .btn-play .icon { width: 20px; height: 20px; }
.title-actions .icon-btn .icon { width: 20px; height: 20px; }
.title-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 20px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--w80); }
.title-meta .star { color: var(--gold); }
.title-meta .rating { display: inline-flex; align-items: center; gap: 4px; }
.title-meta .tag.strong { font-weight: 600; }
.title-meta .tag.is-soon { background: var(--green); border-color: transparent; color: #fff; font-weight: 600; }
.title-credit { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--w80); }
.title-credit span { color: var(--w40); }
.title-overview { margin-top: 16px; max-width: 650px; color: var(--w70); font-size: 14px; line-height: 24px; }
.title-overview.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { margin-top: 6px; color: var(--w50); font-size: 14px; line-height: 20px; font-weight: 500; transition: color 0.15s var(--ease); }
.read-more:hover { color: #fff; }
.title-side { width: 100%; max-width: 420px; }
.facts { overflow: hidden; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12px; line-height: 16px; }
.facts div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; }
.facts div + div { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.facts dt { color: var(--w40); font-weight: 400; }
.facts dd { color: var(--w80); font-weight: 400; text-align: right; }
.facts dd .sep { margin: 0 4px; color: rgba(255, 255, 255, 0.3); }
.facts dd small { color: var(--w50); font-size: 12px; }
.studio { display: flex; justify-content: center; margin-top: 16px; padding: 0 8px; }
.studio img { max-height: 28px; max-width: 140px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.5; }

.title-sections { position: relative; z-index: 20; display: flex; flex-direction: column; gap: 40px; margin-top: 40px; padding: 0; }
.title-sections > section:empty { display: none; }
.title-sections .section-head { padding: 0 var(--side); margin-bottom: 20px; flex-wrap: wrap; row-gap: 12px; }
.title-sections .section-head h2 { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--w90); filter: none; }
.title-sections .rail { padding: 16px var(--side) 40px; margin: 0; }
.title-sections .rail-wrap .rail-arrow.left { left: 4px; }
.title-sections .rail-wrap .rail-arrow.right { right: 4px; }

.season-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--w10); border: 1px solid var(--w10); color: #fff; font-size: 14px; line-height: 20px; font-weight: 500;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color 0.15s var(--ease);
}
.pill-btn:hover { background: rgba(255, 255, 255, 0.18); }
.pill-btn .icon { width: 16px; height: 16px; }
.pill-btn.is-season { font-size: 16px; line-height: 24px; }
.season-bar .seg { height: 40px; align-items: center; }

.episodes { display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--side); padding: 16px var(--side) 40px; scrollbar-width: none; }
.episodes::-webkit-scrollbar { display: none; }
.episode { flex: 0 0 auto; width: 260px; display: flex; flex-direction: column; gap: 12px; text-align: left; scroll-snap-align: start; transition: transform 0.2s var(--ease); }
.episode-art { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 12px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--w05); transition: box-shadow 0.3s var(--ease); }
.episode-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.episode:hover .episode-art img { transform: scale(1.05); }
.episode-art .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.2s var(--ease); }
.episode:hover .play { opacity: 1; }
.episode:focus-visible .episode-art { box-shadow: 0 0 0 2px #fff; }
.episode-art .play span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #000; }
.episode-art .play .icon { width: 22px; height: 22px; margin-left: 2px; }
.ep-chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; font-size: 11px; line-height: 16.5px; font-weight: 500;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ep-chip.num { top: 8px; left: 8px; font-weight: 600; }
.ep-chip.time { right: 8px; bottom: 8px; }
.ep-chip.seen { top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; justify-content: center; }
.ep-chip.seen .icon { width: 16px; height: 16px; }
.episode .card-progress { left: 12px; right: 12px; bottom: 6px; height: 3px; }
.episode-text { display: grid; gap: 4px; padding: 0 4px; }
.episode h4 { font-size: 16px; line-height: 24px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode p { color: var(--w60); font-size: 12px; line-height: 19.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode.is-current .episode-art { box-shadow: 0 0 0 2px #fff; }
.episode.is-watched h4 { color: var(--w70); }

/* Cinejoy's season-by-episode ratings matrix. */
.modal.is-wide.ratings-dialog { width: min(896px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border-radius: 16px; background: #0b0b0b; border: 1px solid var(--w10); }
.ratings-dialog .modal-close { top: 20px; right: 24px; width: 32px; height: 32px; }
.ratings-heading { padding: 20px 24px 16px; border-bottom: 1px solid var(--w05); }
.ratings-dialog .ratings-heading h2 { padding-right: 36px; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.025em; }
.ratings-heading > p { margin-top: 2px; color: var(--w40); font-size: 14px; }
.ratings-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: var(--w40); font-size: 11px; }
.ratings-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ratings-legend i { width: 12px; height: 12px; border-radius: 3px; background: #202020; }
.ratings-body { padding: 12px 20px 20px; }
.ratings-scroll { max-height: calc(100dvh - 230px); overflow: auto; overscroll-behavior: contain; }
.ratings-scroll table { margin: 0 auto; border-collapse: separate; border-spacing: 4px; }
.ratings-scroll th { color: rgba(255, 255, 255, 0.45); font-size: 11px; font-weight: 600; text-align: center; }
.ratings-scroll th[scope="row"] { min-width: 26px; padding-right: 4px; text-align: right; }
.ratings-scroll thead th { padding-bottom: 6px; }
.ratings-scroll td { min-width: 48px; padding: 0; }
.ratings-scroll tfoot td { padding-top: 6px; }
.rating-cell { width: 100%; height: 40px; display: grid; place-items: center; border-radius: 6px; background: #202020; color: var(--w40); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; transition: transform 0.15s; }
button.rating-cell:hover, button.rating-cell:focus-visible { transform: scale(1.07); outline: 2px solid var(--w60); outline-offset: 0; }
.ratings-retry { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; color: var(--w60); font-size: 13px; }
@media (max-width: 639px) {
  .ratings-heading { padding: 18px 16px 14px; }
  .ratings-body { padding: 8px 8px 16px; }
  .ratings-legend { gap: 8px; }
  .ratings-scroll { max-height: calc(100dvh - 250px); }
  .ratings-scroll td { min-width: 36px; }
  .rating-cell { height: 36px; font-size: 13px; }
}

.cast { display: flex; gap: 16px; overflow-x: auto; padding: 16px var(--side); scrollbar-width: none; }
.cast::-webkit-scrollbar { display: none; }
.person { flex: 0 0 112px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.person-photo { width: 88px; height: 88px; overflow: hidden; border-radius: 50%; background: var(--w05); border: 1px solid var(--w10); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.person:hover .person-photo { transform: scale(1.05); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person b { display: block; max-width: 100%; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--w90); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; color: var(--w50); font-size: 12px; line-height: 16px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person > span:last-child { width: 100%; }

.videos { display: flex; gap: 16px; overflow-x: auto; padding: 16px var(--side); scrollbar-width: none; }
.videos::-webkit-scrollbar { display: none; }
.video { position: relative; flex: 0 0 256px; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 12px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--w05); transition: transform 0.2s var(--ease); }
.video:hover { transform: scale(1.03); }
.video img { width: 100%; height: 100%; object-fit: cover; }
.video::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.2); transition: background-color 0.15s var(--ease); }
.video:hover::before { background: transparent; }
.video span { position: absolute; inset: auto 0 0; z-index: 2; padding: 12px; background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent); text-align: left; }
.video b { display: block; font-size: 14px; line-height: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video small { display: block; color: var(--w70); font-size: 12px; line-height: 16px; }

@media (min-width: 1024px) {
  .title-backdrop { height: 75vh; }
  .title-layout { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 40px; margin-top: -352px; }
  .title-main { max-width: 650px; }
  .title-logo { max-height: 144px; margin: 0; object-position: left bottom; }
  .title-page .hero-title { text-align: left; }
  .title-genres { justify-content: flex-start; margin-top: 16px; font-size: 18px; line-height: 28px; }
  .title-actions { justify-content: flex-start; margin-top: 24px; }
  .title-meta { margin-top: 24px; font-size: 16px; line-height: 24px; }
  .title-credit { font-size: 16px; line-height: 24px; }
  .title-overview { margin-top: 20px; font-size: 16px; line-height: 26px; }
  .title-side { flex: 0 0 280px; width: 280px; margin-top: 160px; }
  /* Desktop: scrollers sit inside a 64px gutter with their own inner padding. */
  .title-sections { gap: 56px; padding: 0 var(--side); }
  .title-sections .section-head { padding: 0 8px; }
  .title-sections .section-head h2 { font-size: 24px; line-height: 32px; }
  .episodes { gap: 24px; padding: 16px 32px 48px; scroll-padding-inline: 32px; }
  .episode { width: 320px; }
  .cast, .videos { gap: 20px; padding: 16px 24px; }
  .person { flex-basis: 144px; }
  .person-photo { width: 112px; height: 112px; }
  .video { flex-basis: 320px; }
}

/* --------------------------------------------------------------------------
   Search page
   -------------------------------------------------------------------------- */
.search-page { display: flex; flex-direction: column; align-items: center; gap: 32px; padding: 104px 24px 0; }
.search-top { width: 100%; max-width: 768px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.search-top h1 { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.025em; text-align: center; filter: drop-shadow(0 9px 7px rgba(0, 0, 0, 0.1)); }
.search-box {
  position: relative; width: 100%; max-width: 576px; height: 48px; display: flex; align-items: center; border-radius: 999px;
  background: var(--w05); border: 1px solid var(--w10); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.search-box:focus-within { background: var(--w10); border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04); }
.search-box > .icon { margin-left: 20px; color: var(--w40); }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0 16px; border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 500; }
.search-box input::placeholder { color: var(--w40); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 32px; height: 32px; margin-right: 8px; display: grid; place-items: center; border-radius: 50%; color: var(--w60); }
.search-clear:hover { color: #fff; background: var(--w10); }
.search-clear .icon { width: 16px; height: 16px; }
.search-tabs { display: flex; justify-content: center; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--w05); border: 1px solid var(--w10); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--w70); transition: color 0.2s, background-color 0.2s; }
.seg button:hover { color: #fff; }
.seg button.is-active { background: #fff; color: #000; }
.search-results { width: 100%; max-width: 1600px; padding-bottom: 80px; }
.search-results h2 { margin-bottom: 24px; font-size: 18px; line-height: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--w70); text-align: center; }
.search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.search-grid .card { width: auto; }
.search-hint { padding: 32px var(--side); color: var(--w50); text-align: center; }

@media (min-width: 640px) { .search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .search-page { padding: 128px 48px 0; }
  .search-top h1 { font-size: 36px; line-height: 40px; }
  .search-results h2 { font-size: 20px; }
  .search-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
}

/* --------------------------------------------------------------------------
   Overlays: player, modal, toast, back-to-top
   -------------------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: rgba(2, 4, 3, 0.7); -webkit-backdrop-filter: blur(26px) saturate(1.3); backdrop-filter: blur(26px) saturate(1.3); animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } }

.player { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; }
.player iframe, .player video { flex: 1; width: 100%; border: 0; background: #000; }
.player-bar { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent); transition: opacity 0.3s; }
.player.is-idle .player-bar { opacity: 0; pointer-events: none; }
.player-title { flex: 1; min-width: 0; }
.player-title b { display: block; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-title small { color: var(--w70); }
.player-status { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; color: var(--w70); pointer-events: none; }

/* Player chrome drawn over the playback frame (play bar, top bar, popover). */
.player iframe { position: absolute; inset: 0; height: 100%; }
.player.is-idle { cursor: none; }
.gp-chrome { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity 0.3s var(--ease); }
.player.is-idle .gp-chrome { opacity: 0; }
.player.is-idle .gp-chrome * { pointer-events: none !important; }
.gp-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, transparent 28%, transparent 62%, rgba(0, 0, 0, 0.8) 100%); }
.gp-top { position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 24px 24px 16px; }
.gp-back { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; pointer-events: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); transition: transform 0.2s var(--ease); }
.gp-back:hover { transform: scale(1.08); }
.gp-back .icon { width: 32px; height: 32px; }
.gp-title { min-width: 0; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.gp-title b { display: block; font-size: 17px; line-height: 24px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-title small { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

.gp-bottom { position: absolute; inset: auto 0 0; padding: 0 32px calc(12px + env(safe-area-inset-bottom)); pointer-events: auto; }
.gp-progress { position: relative; height: 32px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.gp-track { position: relative; width: 100%; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.3); transition: height 0.15s var(--ease); }
.gp-progress:hover .gp-track, .player.is-scrubbing .gp-track, .gp-progress:focus-visible .gp-track { height: 6px; }
.gp-buffer, .gp-played { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; }
.gp-buffer { background: rgba(255, 255, 255, 0.3); }
.gp-played { background: var(--accent); }
.gp-thumb { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25); transform: translate(-50%, -50%) scale(0); transition: transform 0.15s var(--ease); pointer-events: none; }
.gp-progress:hover .gp-thumb, .player.is-scrubbing .gp-thumb { transform: translate(-50%, -50%) scale(1); }
.gp-tip { position: absolute; bottom: 30px; left: 0; padding: 4px 8px; border-radius: 6px; background: rgba(15, 15, 15, 0.85); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; transform: translateX(-50%); opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.gp-progress:hover .gp-tip, .player.is-scrubbing .gp-tip { opacity: 1; }
.gp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; margin-bottom: 4px; }
.gp-left, .gp-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gp-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; padding: 8px; border-radius: 50%; color: #fff; transition: background-color 0.15s, transform 0.1s; }
.gp-btn:hover { background: rgba(255, 255, 255, 0.1); }
.gp-btn:active { transform: scale(1.1); background: rgba(255, 255, 255, 0.2); }
.gp-btn .icon { width: 24px; height: 24px; }
.gp-btn[data-gp="play"] .icon.fill { width: 24px; height: 24px; }
.gp-btn[data-gp="play"] .icon:not(.fill) { fill: currentColor; stroke: none; }
.gp-btn[hidden], .gp-volume[hidden] { display: none; }
.gp-seek { position: relative; display: grid; place-items: center; width: 24px; height: 24px; }
.gp-seek .icon { width: 24px; height: 24px; }
.gp-seek b { position: absolute; bottom: -5px; font-size: 10px; font-weight: 800; line-height: 1; }
.gp-seek-back b { left: -3px; }
.gp-seek-forward b { right: -3px; }
.gp-volume { display: flex; align-items: center; }
.gp-volume-range {
  width: 0; height: 4px; margin: 0; opacity: 0; appearance: none; -webkit-appearance: none; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, #fff var(--fill, 100%), rgba(255, 255, 255, 0.3) var(--fill, 100%)); transition: width 0.25s var(--ease), opacity 0.2s, margin 0.25s var(--ease);
}
.gp-volume:hover .gp-volume-range, .gp-volume:focus-within .gp-volume-range { width: 88px; opacity: 1; margin: 0 8px 0 4px; }
.gp-volume-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.gp-volume-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.gp-time { order: 99; flex: 0 0 auto; font-size: 14px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

.gp-actions { position: absolute; right: 32px; bottom: 104px; z-index: 4; display: flex; gap: 10px; transition: bottom 0.3s var(--ease); }
.player.is-idle .gp-actions { bottom: 40px; }
.gp-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(15, 15, 15, 0.72); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: transform 0.15s, background-color 0.2s;
}
.gp-pill:hover { transform: scale(1.04); background: rgba(40, 40, 40, 0.8); }
.gp-pill.is-light { background: #fff; color: #000; border-color: #fff; }
.gp-pill .icon { width: 18px; height: 18px; }

.gp-pop {
  position: absolute; right: 48px; bottom: 96px; z-index: 6; width: 343px; max-width: calc(100vw - 24px); max-height: calc(100% - 140px); overflow-y: auto; scrollbar-width: none;
  border-radius: 16px; background: rgba(15, 15, 15, 0.72); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8); animation: popIn 0.22s var(--ease);
}
.gp-pop::-webkit-scrollbar { display: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.gp-pop-body { padding: 0 24px 16px; }
.gp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 24px; }
.gp-box { display: grid; gap: 5px; min-height: 80px; padding: 10.4px 12.8px; border-radius: 8px; text-align: left; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.06); transition: background-color 0.15s; align-content: center; }
.gp-box:hover { background: rgba(255, 255, 255, 0.1); }
.gp-box-label { display: inline-flex; align-items: center; gap: 5.6px; font-size: 11.5px; line-height: 1; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.gp-box-label .icon { width: 15px; height: 15px; }
.gp-box-value { font-size: 16.8px; line-height: 19.3px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-links { display: grid; gap: 4px; padding-top: 16px; margin: 0 -12px; }
.gp-links-split { margin-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.gp-link { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 8px; text-align: left; color: #fff; transition: background-color 0.15s; }
.gp-link:hover { background: rgba(255, 255, 255, 0.08); }
.gp-link > .icon { width: 19px; height: 19px; color: rgba(255, 255, 255, 0.85); }
.gp-link-title { flex: 1; font-size: 16px; line-height: 24px; font-weight: 500; }
.gp-link-right { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.gp-link-right .icon { width: 20px; height: 20px; color: rgba(255, 255, 255, 0.7); }
.gp-option.is-active { color: var(--accent); }
.gp-option .icon { width: 18px; height: 18px; color: var(--accent); }
.gp-pop-head { display: flex; align-items: center; gap: 6px; padding: 18px 0 4px; margin: 0 -8px; }
.gp-pop-head b { font-size: 16px; font-weight: 600; }
.gp-pop-back { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: rgba(255, 255, 255, 0.8); }
.gp-pop-back:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.gp-pop-back .icon { width: 18px; height: 18px; }
.gp-field { display: grid; gap: 10px; padding: 12px 16px; }
.gp-field > span { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.55); }
.gp-field .segment { justify-self: start; }
.gp-field .range input { width: 160px; }
.gp-pop .toggle { width: 44px; height: 24px; display: inline-block; position: relative; pointer-events: none; }
.gp-pop .toggle span { left: 2px; top: 2px; }

@media (max-width: 767px) {
  .gp-top { padding: 12px 12px 8px; }
  .gp-back { width: 40px; height: 40px; }
  .gp-back .icon { width: 26px; height: 26px; }
  .gp-bottom { padding: 0 14px calc(8px + env(safe-area-inset-bottom)); }
  .gp-left, .gp-right { gap: 4px; }
  .gp-btn { width: 36px; height: 36px; padding: 6px; }
  .gp-btn .icon { width: 22px; height: 22px; }
  .gp-time { font-size: 12px; }
  .gp-volume-range { display: none; }
  .gp-pop { right: 12px; left: 12px; bottom: 84px; width: auto; }
  .gp-actions { right: 14px; bottom: 92px; }
  .player .gp-btn[data-control="pip"] { display: none; }
}

.modal-wrap { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadeIn 0.2s ease; }
/* Dialogs share the frosted 30px panel used by the profile screens. */
.modal { position: relative; width: min(460px, 100%); max-height: calc(100svh - 40px); overflow-y: auto; padding: 40px 32px 30px; border-radius: 30px; background: rgba(16, 16, 18, 0.72); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 40px 100px rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(40px) saturate(1.6); backdrop-filter: blur(40px) saturate(1.6); animation: modalIn 0.3s var(--ease); }
.modal.is-wide { width: min(980px, 100%); padding: 0; overflow: hidden; border-radius: 20px; }
.modal h2 { font-size: 22px; line-height: 33px; font-weight: 600; letter-spacing: -0.01em; }
.modal p { color: rgba(255, 255, 255, 0.55); }
.modal-close { position: absolute; top: 20px; right: 20px; z-index: 2; width: 36px; height: 36px; background: rgba(255, 255, 255, 0.04); border: 0; color: rgba(255, 255, 255, 0.7); }
.modal-close:hover { background: rgba(255, 255, 255, 0.1); transform: none; color: #fff; }
.modal-close .icon { width: 18px; height: 18px; }
.field { display: grid; gap: 8px; margin-top: 16px; }
.field label { padding-left: 4px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.55); }
.input { height: 53px; padding: 14px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); outline: none; font-size: 15px; transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.input:focus { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.22); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.toast { position: fixed; left: 50%; bottom: 96px; z-index: 130; transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(18, 18, 20, 0.9); border: 1px solid var(--w10); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: toastIn 0.3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

.to-top {
  position: fixed; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 50; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); border: 2px solid var(--green-hi); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease), background-color 0.2s;
}
.to-top:hover { background: color-mix(in srgb, var(--accent-strong) 45%, transparent); }
.to-top .icon { width: 20px; height: 20px; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 1024px) {
  .toast { bottom: 28px; }
  .to-top { right: 32px; bottom: 32px; }
}

/* --------------------------------------------------------------------------
   My List, settings, sports, watch parties
   -------------------------------------------------------------------------- */
.lists-page { max-width: 1152px; margin: 0 auto; padding: 88px 16px 120px; }
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: 1100px; margin: 0 auto; padding: 0 var(--side) 24px; }
.lists-page .list-head { max-width: none; padding: 0 0 32px; }
.list-head h1 { display: flex; align-items: center; gap: 16px; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.025em; }
.list-head h1 .icon { width: 32px; height: 32px; }
.list-head .head-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; }
.list-tabs { margin-bottom: 24px; }
.lists-page .grid { padding: 0; }
.lists-page .list-head .btn { height: 44px; }
.lists-page .list-head .btn .icon { width: 16px; height: 16px; }
.narrow { max-width: 1100px; margin: 0 auto; }
.row-card {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 20px; border-radius: 20px; text-align: left;
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: border-color 0.25s, background-color 0.25s;
}
.row-card:hover { border-color: rgba(255, 255, 255, 0.16); background: rgba(28, 28, 28, 0.66); }
.row-card .row-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--w05); border: 1px solid var(--w10); transition: color 0.2s, background-color 0.2s; }
.row-card .row-icon .icon { width: 18px; height: 18px; }
.row-card:hover .row-icon { background: var(--w10); }
.row-card > span:nth-child(2) { flex: 1; min-width: 0; }
.row-card b { display: block; font-size: 15px; line-height: 22.5px; font-weight: 600; }
.row-card small { display: block; margin-top: 2px; color: var(--w40); font-size: 12.5px; line-height: 18.75px; }
.row-card .chev { margin-left: auto; color: var(--w40); transition: transform 0.2s var(--ease), color 0.2s; }
.row-card:hover .chev { color: #fff; transform: translateX(3px); }
.stack { display: grid; gap: 12px; }
/* Cinejoy's Continue Watching rail and floating preview. */
[data-continue-row]:empty, [data-account-rows]:empty, [data-because-row]:empty { display: none; }
.section-title-link { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.section-title-link > .icon { width: 20px; height: 20px; opacity: 0; transform: translateX(-4px); transition: opacity 0.3s, transform 0.3s; }
.section-head:hover .section-title-link > .icon, .section-title-link:focus-visible > .icon { opacity: 0.7; transform: none; }
.cw-edit { width: 28px; height: 28px; color: var(--w50); background: none; border: 0; }
.cw-edit .icon { width: 17px; height: 17px; }
.cw-rail { display: flex; align-items: flex-start; gap: 16px; overflow-x: auto; overflow-y: clip; padding: 12px var(--side) 24px; margin-top: -8px; scrollbar-width: none; }
.cw-rail::-webkit-scrollbar { display: none; }
.cw-card { flex: 0 0 240px; min-width: 0; position: relative; transition: opacity 0.18s, transform 0.18s; }
.cw-art { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #1a1a1a; box-shadow: 0 10px 16px rgba(0, 0, 0, 0.4); transition: transform 0.3s; }
.cw-art:active { transform: scale(0.95); }
.cw-art > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cw-progress { position: absolute; left: 0; right: 0; bottom: 0; display: block; height: 3px; background: var(--w20); overflow: hidden; }
.cw-progress > i { display: block; height: 100%; border-radius: 0 999px 999px 0; background: #fff; }
.cw-caption { display: block; margin-top: 8px; padding: 0 2px; }
.cw-caption h3 { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--w90); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-caption p { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--w50); min-width: 0; }
.cw-caption .icon { width: 12px; height: 12px; flex: 0 0 auto; }
.cw-episode { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cw-remaining { flex: 0 0 auto; }
.cw-remove { display: none; position: absolute; top: -8px; right: -8px; z-index: 6; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #171717; place-items: center; box-shadow: 0 3px 10px #0005; }
.cw-remove .icon { width: 17px; height: 17px; }
.is-editing .cw-remove { display: grid; }
.is-editing .cw-card, .is-editing .cw-history-item { animation: cwWiggle 0.28s ease-in-out infinite alternate; }
.is-editing .cw-card:nth-child(2n), .is-editing .cw-history-item:nth-child(2n) { animation-direction: alternate-reverse; }
.is-editing .cw-card a, .is-editing .cw-history-item a { pointer-events: none; }
.cw-card.is-removing, .cw-history-item.is-removing { animation: none; transition: none; opacity: 0; transform: translateY(12px) scale(0.86); pointer-events: none; }
.cw-popover { position: fixed; z-index: 90; overflow: hidden; border-radius: 13px; border: 1px solid var(--w20); background: rgba(42, 42, 44, 0.82); box-shadow: 0 18px 50px #0009; -webkit-backdrop-filter: blur(35px) saturate(1.5); backdrop-filter: blur(35px) saturate(1.5); animation: cwPopoverIn 0.2s var(--ease-out); }
.cw-popover-art { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #1a1a1a; }
.cw-popover-art > img { width: 100%; height: 100%; object-fit: cover; }
.cw-popover-body { padding: 12px; }
.cw-popover-actions { display: flex; align-items: center; gap: 10px; }
.cw-popover-actions .icon-btn { width: 44px; height: 44px; border: 1px solid var(--w20); background: var(--w10); }
.cw-popover-actions .cw-info { margin-left: auto; }
.cw-play { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #050505; transition: transform 0.2s; }
.cw-play:hover { transform: scale(1.08); }
.cw-play .icon { width: 22px; height: 22px; }
.cw-popover-episode { margin-top: 10px; color: var(--w80); font-size: 13px; }
.cw-popover-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--w70); font-weight: 500; }
.cw-popover-progress > .cw-progress { position: static; flex: 1; height: 4px; border-radius: 999px; }
.cw-history-item { position: relative; min-width: 0; }
.cw-history-item .card { width: 100%; }
.cw-history .grid { padding-top: 10px; }
.toast-undo { margin-left: 16px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.because-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.because-title .picker { margin: 0; }
.because-title .picker-btn > span { text-decoration: underline; text-underline-offset: 5px; }
.because-title .picker-btn { font-size: inherit; font-weight: inherit; }
.page-enter { animation: pageAppear 0.2s ease-out; }
.detail-modal { animation: detailAppear 0.2s ease-out; }
@keyframes cwWiggle { from { transform: rotate(-0.7deg); } to { transform: rotate(0.7deg); } }
@keyframes cwPopoverIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes pageAppear { from { opacity: 0; } to { opacity: 1; } }
@keyframes detailAppear { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@media (min-width: 768px) { .cw-card { flex-basis: 288px; } }
@media (min-width: 1024px) { .cw-rail { mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); } }

/* Settings page: sticky section tabs over glass cards of setting rows. */
.settings-page { max-width: 780px; margin: 0 auto; padding: 108px 24px 120px; }
.settings-page h1 { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.025em; }
.settings-page h1 .icon { width: 32px; height: 32px; }
.settings-tabs {
  position: sticky; top: 76px; z-index: 50; display: flex; gap: 24px; width: max-content; max-width: 100%; margin: 0 0 24px; padding: 0 30px;
  overflow-x: auto; scrollbar-width: none; border-radius: 999px; transition: background-color 0.3s, box-shadow 0.3s;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 0; border-bottom: 2px solid transparent; color: rgba(255, 255, 255, 0.65); font-size: 14px; line-height: 21px; font-weight: 500; transition: color 0.2s, border-color 0.2s; }
.settings-tab .icon { width: 15px; height: 15px; }
.settings-tab:hover { color: #fff; }
.settings-tab.is-active { color: #fff; border-bottom-color: #fff; }
.topbar.is-scrolled ~ .page .settings-tabs, body.settings-stuck .settings-tabs {
  background: rgba(12, 12, 14, 0.52); border: 1px solid var(--w10); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 36px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
}
.settings-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.settings-card { position: relative; z-index: 1; padding: 24px; border-radius: 20px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); scroll-margin-top: 140px; }
.settings-card-head h2 { font-size: 17.6px; line-height: 26.4px; font-weight: 600; color: rgba(255, 255, 255, 0.95); }
.settings-card-head p { margin-top: 2px; font-size: 13.6px; line-height: 20.4px; color: rgba(255, 255, 255, 0.65); }
.server-order-list { display: grid; gap: 8px; }
.server-order-row { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px; background: var(--w05); border: 1px solid var(--w10); border-radius: 12px; }
.server-order-row.is-dragging { opacity: 0.4; }
.server-grip { cursor: grab; color: var(--w50); }
.server-grip:active { cursor: grabbing; }
.server-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; }
.server-name small { display: block; font-size: 11px; font-weight: 400; color: var(--w50); }
.server-first { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--accent); padding: 2px 6px; border-radius: 99px; background: var(--w05); }
.server-order-row .icon-btn { width: 30px; height: 30px; flex: 0 0 auto; }
.server-order-row .icon-btn:disabled { opacity: 0.2; pointer-events: none; }
.server-order-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.settings-list { margin-top: 20px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.setting-row + .setting-row, .setting-row + .settings-links, .sub-preview + .setting-row { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.setting-meta { display: grid; gap: 4px; min-width: 0; max-width: 470px; }
.setting-title { display: inline-flex; align-items: center; gap: 10px; font-size: 15.2px; line-height: 22.8px; font-weight: 500; color: rgba(255, 255, 255, 0.9); }
.setting-desc { font-size: 12.8px; line-height: 17.92px; color: rgba(255, 255, 255, 0.65); }
.setting-control { flex: 0 0 auto; display: flex; align-items: center; }
.profile-chip { width: 28px; height: 28px; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; background: rgba(255, 255, 255, 0.16); font-size: 12px; font-weight: 700; }
.profile-chip img { width: 100%; height: 100%; object-fit: cover; }

.toggle { position: relative; width: 44px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--w10); transition: background 0.25s, border-color 0.25s; }
.toggle span { position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s; }
.toggle.is-on { background: var(--accent-strong); border-color: var(--accent-strong); }
.toggle.is-on span { transform: translateX(20px); background: #fff; }

.segment { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--w05); border: 1px solid var(--w10); }
.segment-btn { padding: 6px 14px; border-radius: 999px; font-size: 12px; line-height: 18px; font-weight: 400; color: rgba(255, 255, 255, 0.85); transition: color 0.25s, background-color 0.25s; }
.segment-btn:hover { color: #fff; }
.segment-btn.is-active { background: #f2f2f2; color: #101015; font-weight: 500; }

.setting-control .select-btn { width: auto; min-width: 150px; height: 38px; }
.swatch { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.theme-btn .swatch { width: 18px; height: 18px; }
.menu .swatch { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 2px 6px #0006; }
.color-input { width: 44px; height: 32px; padding: 0; border: 1px solid var(--w10); border-radius: 10px; background: transparent; cursor: pointer; }
.color-input::-webkit-color-swatch-wrapper { padding: 3px; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 7px; }

.range { display: flex; align-items: center; gap: 14px; }
.range span { min-width: 44px; text-align: right; font-size: 13px; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }
.range input { width: 118px; height: 4px; appearance: none; -webkit-appearance: none; border-radius: 99px; background: rgba(255, 255, 255, 0.2); accent-color: #fff; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); cursor: pointer; }
.range input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }

.swatches { display: flex; gap: 10px; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.color-dot:hover { transform: scale(1.08); }
.color-dot.is-active { box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.9), 0 0 0 4px rgba(255, 255, 255, 0.85); }

.sub-preview { display: grid; place-items: end center; height: 120px; margin-bottom: 8px; padding: 18px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.4)), radial-gradient(80% 120% at 70% 20%, color-mix(in srgb, var(--accent-strong) 55%, transparent), transparent 70%), #101210; }
.sub-sample { font-weight: 600; line-height: 1.28; text-align: center; -webkit-text-stroke: 0.055em rgba(0, 0, 0, 0.98); paint-order: stroke fill;
  text-shadow: 0 0.075em 0.05em rgba(0, 0, 0, 0.96), -0.045em -0.045em 0 #000, 0.045em -0.045em 0 #000, -0.045em 0.045em 0 #000, 0.045em 0.045em 0 #000; }
.sub-sample.is-blur { padding: 0.06em 0.34em; border-radius: 0.28em; background: rgba(0, 0, 0, 0.32); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.settings-links { display: grid; gap: 6px; margin-top: 0; padding-top: 8px; }
.link-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 12px; border-radius: 12px; text-align: left; transition: background-color 0.15s var(--ease); }
.link-row:hover { background: var(--w05); }
.link-row-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--w05); color: rgba(255, 255, 255, 0.8); }
.link-row-icon .icon { width: 17px; height: 17px; }
.link-row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.link-row-text b { font-size: 14.5px; line-height: 21.75px; font-weight: 500; color: rgba(255, 255, 255, 0.9); }
.link-row-text small { font-size: 13px; line-height: 19.5px; color: rgba(255, 255, 255, 0.4); }
.link-row .chev { color: rgba(255, 255, 255, 0.35); transition: transform 0.2s var(--ease), color 0.2s; }
.link-row:hover .chev { color: #fff; transform: translateX(3px); }

.controls-group { margin: 22px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--w50); }
.controls-list { display: grid; gap: 6px; }
.control-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--w05); border: 1px solid rgba(255, 255, 255, 0.06); transition: opacity 0.2s; }
.control-row.is-off .control-name { color: var(--w40); text-decoration: line-through; }
.control-grip { color: var(--w40); }
.control-grip .icon { width: 16px; height: 16px; }
.control-name { flex: 1; font-size: 14px; font-weight: 500; }
.control-move { width: 32px; height: 32px; }
.control-move .icon { width: 16px; height: 16px; }
.control-move[disabled] { opacity: 0.3; pointer-events: none; }

@media (max-width: 640px) {
  .settings-card { padding: 20px; }
  .setting-row { flex-wrap: wrap; }
  .setting-row:has(> .setting-control > .toggle) { flex-wrap: nowrap; }
  .setting-control { max-width: 100%; margin-left: auto; }
  .setting-control .segment { flex-wrap: wrap; }
  .settings-tabs { top: 68px; padding: 0 5px; gap: 28px; }
  .server-order-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px 30px; gap: 6px; padding: 8px; }
  .server-order-footer { flex-wrap: wrap; gap: 12px; }
  .control-row { flex-wrap: wrap; }
  .control-name { flex-basis: calc(100% - 30px); }
}
@media (min-width: 1024px) {
  /* Once scrolled, the tabs ride in the header row beside the nav pill. */
  .settings-tabs { top: 12px; z-index: 59; }
}

/* --------------------------------------------------------------------------
   Detail modal, trailers, episode grid, spoiler-free, reduced motion
   -------------------------------------------------------------------------- */
.detail-wrap { position: fixed; inset: 0; z-index: 95; overflow-y: auto; overscroll-behavior: contain; padding: 0; background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadeIn 0.2s ease; }
.detail-modal { position: relative; min-height: 100%; background: var(--base); overflow: hidden; }
.detail-close { position: absolute; top: 16px; right: 16px; z-index: 40; }
.detail-body .footer { display: none; }
.detail-body .title-sections { padding-bottom: 48px; }
@media (min-width: 1024px) {
  .detail-wrap { padding: 40px 24px; }
  .detail-modal { max-width: 1120px; min-height: 0; margin: 0 auto; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); animation: modalIn 0.3s var(--ease); }
  .detail-body .title-backdrop { height: 58vh; }
  .detail-body .title-layout { margin-top: -260px; padding: 0 48px; }
  .detail-body .title-side { margin-top: 120px; }
  .detail-body .title-sections { padding: 0 48px 48px; }
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(0.985); } }

.title-backdrop { --bh: 65vh; }
/* Fades in slowly, out fast so YouTube's spinner never lingers, and gently at the end (mountBackdropTrailer). */
.title-trailer { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity .25s var(--ease); pointer-events: none; }
.title-trailer.is-on { opacity: 1; transition-duration: 1.2s; }
.title-trailer.is-ending { transition-duration: 1s; }
.title-trailer iframe { position: absolute; top: 50%; left: 50%; width: max(100%, calc(var(--bh) * 1.7778)); aspect-ratio: 16 / 9; height: auto; border: 0; transform: translate(-50%, -50%) scale(1.22); }
.trailer-mute { position: absolute; top: 84px; right: var(--side); z-index: 25; width: 40px; height: 40px; }
.trailer-mute .icon { width: 18px; height: 18px; }
@media (min-width: 1024px) {
  .title-backdrop { --bh: 75vh; }
  /* Sits just above the facts card. */
  .trailer-mute { top: calc(75vh - 260px); }
  .detail-body .title-backdrop { --bh: 58vh; }
  .detail-body .trailer-mute { top: 72px; right: 76px; }
}


.episodes.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px 16px; overflow: visible; padding: 16px var(--side) 24px; }
.episodes.is-grid .episode { width: auto; }
@media (min-width: 1024px) { .episodes.is-grid { padding: 16px 32px 32px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.episode.is-spoiler .episode-art img { filter: blur(14px) brightness(0.7); transform: scale(1.12); }
.episode.is-spoiler:hover .episode-art img { transform: scale(1.15); }
.episode.is-spoiler p { font-style: italic; color: var(--w40); }

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
body.reduce-motion .card:hover, body.reduce-motion .card:focus-visible { transform: none; }

@media (min-width: 1024px) {
  .lists-page { padding: 96px 32px 80px; }
  .list-head h1 { font-size: 36px; line-height: 40px; }
  .settings-page { padding: 104px 32px 80px; }
  .settings-page h1 { font-size: 36px; line-height: 40px; }
}

.match { display: grid; gap: 12px; padding: 16px; border-radius: 18px; text-align: left; transition: transform 0.25s var(--ease), background-color 0.2s; }
.match:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.14); }
.match-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--w70); }
.match-teams { display: grid; gap: 8px; }
.team { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.team img { width: 28px; height: 28px; object-fit: contain; }
.team .score { margin-left: auto; font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25); animation: pulse 1.6s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 0 var(--side); }

.room { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1fr) 360px; background: #000; }
.room.is-chat-hidden { grid-template-columns: minmax(0, 1fr) 0; }
.room-stage { position: relative; display: flex; flex-direction: column; min-width: 0; }
.room-stage iframe { flex: 1; width: 100%; border: 0; background: #000; }
.room-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(10, 12, 12, 0.92); border-bottom: 1px solid var(--w10); }
.room-bar .grow { flex: 1; min-width: 0; }
.room-bar b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-bar small { color: var(--w70); }
.room-side { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #0b0d0c; border-left: 1px solid var(--w10); }
.room-people { padding: 14px 16px; border-bottom: 1px solid var(--w10); font-size: 13px; color: var(--w70); }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.chat-msg b { font-size: 13px; }
.chat-msg p { font-size: 14px; color: var(--w70); overflow-wrap: anywhere; }
.chat-msg.is-system p { color: var(--text-3); font-style: italic; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--w10); }
.chat-form .input { flex: 1; min-width: 0; height: 42px; border-radius: 999px; }

/* --------------------------------------------------------------------------
   Responsive leftovers
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .topbar { padding-top: calc(16px + env(safe-area-inset-top)); padding-left: max(var(--head-x), env(safe-area-inset-left)); padding-right: max(var(--head-x), env(safe-area-inset-right)); }
  .topbar.is-scrolled { padding-top: calc(12px + env(safe-area-inset-top)); }
  .title-meta .tag { font-size: 12px; line-height: 16px; }
  .settings-tabs { top: calc(76px + env(safe-area-inset-top)); }
  .page-top { padding-bottom: 120px; }
  .room { grid-template-columns: 1fr; grid-template-rows: minmax(0, 56vh) minmax(0, 1fr); }
  .room.is-chat-hidden { grid-template-rows: 1fr 0; }
  .room-side { border-left: 0; border-top: 1px solid var(--w10); }
}

@media (max-width: 600px) {
  .btn-lg { height: 52px; font-size: 18px; }
  .filters { gap: 8px; }
  .select-btn { width: auto; min-width: 0; padding: 8px 12px; gap: 6px; }
  .modal { padding: 22px; border-radius: 22px; }
}

@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; }
}
