:root {
  --bg: #09090b;
  --surface: #121215;
  --surface-2: #1a1a1f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --muted: #8e8e98;
  --faint: #5c5c66;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --pad: clamp(18px, 4vw, 56px);
  --r: 10px;
  --poster: clamp(118px, 11.5vw, 176px);
  --wide: clamp(230px, 21vw, 320px);
  --font: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --accent: #ffffff;
  --accent-hover: #e4e4e7;
  --accent-ink: #09090b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { min-height: 100vh; overflow-x: hidden; }
body.modal-open, body.playing { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: 0.5; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
img { display: block; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.ic { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.bold { font-weight: 600; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.wordmark { font-weight: 700; letter-spacing: 0.1em; font-size: 0.95rem; color: #fff; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; }
.boot .brand { font-weight: 700; letter-spacing: 0.22em; font-size: 1.1rem; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; height: 42px; padding: 0 1.25em; border-radius: 999px; font-weight: 600; font-size: 0.95rem; white-space: nowrap; transition: background 0.15s, opacity 0.15s, transform 0.1s; }
.btn .ic { width: 1.15em; height: 1.15em; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn.small { height: 32px; font-size: 0.83rem; padding: 0 0.95em; }
.btn.wide { width: 100%; height: 46px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(12px); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.circle { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--line-2); color: #fff; flex: none; transition: background 0.15s; backdrop-filter: blur(12px); }
.circle:hover { background: rgba(255, 255, 255, 0.16); }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; }
select { background: transparent; border: 1px solid var(--line-2); padding: 0 30px 0 12px; height: 34px; border-radius: 999px; appearance: none; font-size: 0.85rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238e8e98'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 16px; cursor: pointer; }
select option { background: var(--surface); }
.badge { display: inline-flex; align-items: center; gap: 0.35em; height: 24px; padding: 0 0.7em; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: rgba(255, 255, 255, 0.07); color: var(--text); white-space: nowrap; }
.badge .ic { width: 1.05em; height: 1.05em; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.bad { color: var(--bad); }
.badge.lg { height: 42px; padding: 0 1.1em; font-size: 0.88rem; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.12); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.spinner.big { width: 52px; height: 52px; border-width: 3px; }
.spinner.tiny { width: 1em; height: 1em; border-width: 2px; display: inline-block; vertical-align: -0.15em; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-pad { display: grid; place-items: center; padding: 48px; }
.empty { padding: 72px 20px; text-align: center; color: var(--muted); display: grid; gap: 18px; justify-items: center; }
.empty p { max-width: 460px; margin: 0; }

.toasts { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: rgba(28, 28, 33, 0.92); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line-2), 0 12px 32px rgba(0, 0, 0, 0.45); padding: 12px 16px; border-radius: 12px; font-size: 0.9rem; animation: up 0.2s ease-out; transition: opacity 0.3s, transform 0.3s; }
.toast.ok::before, .toast.warn::before, .toast.error::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; }
.toast.ok::before { background: var(--ok); }
.toast.warn::before { background: var(--warn); }
.toast.error::before { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes up { from { opacity: 0; transform: translateY(6px); } }

/* ---------- sign in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%), var(--bg); }
.login-card { width: min(360px, 100%); display: grid; gap: 14px; }
.login-card .wordmark { font-size: 1.15rem; margin-bottom: 4px; }
.login-card p { margin: 0 0 14px; }
.field { display: grid; gap: 6px; font-size: 0.8rem; color: var(--muted); }
.field input { height: 46px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.15s; }
.field input::placeholder { color: var(--faint); }
.field input:focus { border-color: rgba(255, 255, 255, 0.4); }
.login-error { color: var(--bad); font-size: 0.85rem; }

/* ---------- header ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 var(--pad); padding-top: env(safe-area-inset-top); transition: background 0.25s, box-shadow 0.25s; background: linear-gradient(to bottom, rgba(9, 9, 11, 0.7), transparent); }
.topbar.solid { background: rgba(9, 9, 11, 0.82); backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.wordmark { justify-self: start; }
.top-right { justify-self: end; display: flex; align-items: center; gap: 14px; grid-column: 3; }
.nav { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(16px); grid-column: 2; }
.nav a { position: relative; z-index: 1; height: 32px; padding: 0 16px; display: grid; place-items: center; border-radius: 999px; font-size: 0.86rem; font-weight: 500; color: var(--muted); transition: color 0.3s var(--ease); white-space: nowrap; }
.nav a:hover { color: #fff; }
.nav a.active { color: var(--accent-ink); }
.nav-ind { position: absolute; top: 4px; left: 4px; width: 0; height: 32px; border-radius: 999px; background: var(--accent); opacity: 0; transition: transform 0.5s var(--spring), width 0.45s var(--ease), opacity 0.2s; }
.nav.no-anim .nav-ind { transition: none; }
.search-box { display: flex; align-items: center; gap: 10px; height: 40px; width: min(320px, 28vw); padding: 0 8px 0 15px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 4px 18px rgba(0, 0, 0, 0.25); backdrop-filter: blur(16px); color: #d4d4d8; transition: background 0.2s, box-shadow 0.2s, width 0.35s var(--ease); cursor: text; }
.search-box:hover { background: rgba(255, 255, 255, 0.13); }
.search-box:focus-within { width: min(380px, 32vw); background: rgba(255, 255, 255, 0.15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 0 4px rgba(255, 255, 255, 0.06); color: #fff; }
.search-box .ic { width: 18px; height: 18px; flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 0.9rem; color: #fff; }
.search-box input::placeholder { color: #a1a1aa; }
.search-kbd { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; font: 600 0.72rem var(--font); color: #a1a1aa; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--line-2); }
.search-box:focus-within .search-kbd { opacity: 0; }
.search-box input::-webkit-search-cancel-button { display: none; }
.profile { position: relative; }
.profile-btn { display: block; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar.letter { display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; font-size: 0.85rem; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: rgba(24, 24, 28, 0.96); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 48px rgba(0, 0, 0, 0.5); border-radius: 14px; padding: 8px; display: grid; }
.pm-name { font-weight: 600; padding: 8px 10px 0; }
.profile-menu > .muted { padding: 0 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pm-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-align: left; width: 100%; font-size: 0.9rem; color: #d4d4d8; }
.pm-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.pm-link .ic { width: 17px; height: 17px; color: var(--muted); }
.tabbar { display: none; }

/* ---------- hero ---------- */
.page { min-height: 70vh; padding-bottom: 60px; }
.padded { padding: 104px var(--pad) 60px; }
.page-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 28px; }
.hero { position: relative; height: min(68vh, 720px); min-height: 460px; overflow: hidden; background: var(--bg); }
.hero.none { height: 80px; min-height: 0; }
.hero.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%); animation: shimmer 1.6s infinite; }
.hero-img { position: absolute; top: 0; right: 0; width: 82%; height: 100%; object-fit: cover; object-position: center 25%; animation: fade 0.8s ease-out; }
@keyframes fade { from { opacity: 0; } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 18%, rgba(9, 9, 11, 0.85) 32%, rgba(9, 9, 11, 0.2) 62%, rgba(9, 9, 11, 0.1)), linear-gradient(to top, var(--bg) 0%, transparent 38%); }
.hero-content { position: absolute; left: var(--pad); bottom: 64px; width: min(520px, 84vw); display: grid; gap: 14px; justify-items: start; animation: up 0.5s ease-out; }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hero-logo { max-width: min(400px, 70vw); max-height: 130px; object-fit: contain; object-position: left bottom; }
.hero-title { font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
.hero-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.88rem; white-space: pre; }
.hero-overview { margin: 0; color: #c4c4cc; font-size: 0.98rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* ---------- rows ---------- */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 4px; }
.row { min-width: 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--pad); margin-bottom: 12px; }
.row-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.row-more { font-size: 0.82rem; color: var(--muted); transition: color 0.15s; }
.row-more:hover { color: #fff; }
.row-viewport { position: relative; }
.row-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 4px var(--pad) 6px; scroll-padding: 0 var(--pad); }
.row-track::-webkit-scrollbar { display: none; }
.row-arrow { position: absolute; top: calc(50% - 40px); width: 38px; height: 38px; border-radius: 50%; z-index: 5; display: grid; place-items: center; background: rgba(24, 24, 28, 0.9); box-shadow: inset 0 0 0 1px var(--line-2), 0 8px 20px rgba(0, 0, 0, 0.5); color: #fff; opacity: 0; transition: opacity 0.2s; }
.row.wide .row-arrow { top: calc(50% - 36px); }
.row-arrow.left { left: calc(var(--pad) - 19px); }
.row-arrow.right { right: calc(var(--pad) - 19px); }
.row-viewport:hover .row-arrow:not(.hide) { opacity: 1; }
.row-arrow.hide { pointer-events: none; opacity: 0 !important; }

/* ---------- cards ---------- */
.card { flex: none; width: var(--poster); scroll-snap-align: start; cursor: pointer; outline: none; }
.card.wide { width: var(--wide); }
.card-img { position: relative; aspect-ratio: 2 / 3; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card.wide .card-img { aspect-ratio: 16 / 9; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.25s; }
.card-fallback { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 12px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.card-img.noimg .card-fallback { display: grid; }
.card-cap { padding: 9px 2px 0; min-width: 0; }
.card-name { font-size: 0.86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e4e4e7; }
.card-sub { font-size: 0.76rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mark { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(9, 9, 11, 0.72); backdrop-filter: blur(8px); }
.mark .ic { width: 13px; height: 13px; }
.mark.ok { color: var(--ok); }
.mark.warn { color: var(--warn); }
.mark.bad { color: var(--bad); }
.card-play { position: absolute; left: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #09090b; opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.2s; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.card-play .ic { width: 18px; height: 18px; margin-left: 2px; }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.18); }
.card-progress div { height: 100%; background: var(--accent); }
.card.wide .card-play { opacity: 1; transform: none; background: rgba(9, 9, 11, 0.55); color: #fff; backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (hover: hover) {
  .card:hover .card-img, .card:focus-visible .card-img { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 30px rgba(0, 0, 0, 0.45); }
  .card:hover .card-img img { filter: brightness(1.08); }
  .card:hover .card-play { opacity: 1; transform: none; }
  .card.wide:hover .card-play { background: #fff; color: #09090b; }
  .card:hover .card-name { color: #fff; }
}
.card:focus-visible .card-img { outline: 2px solid #fff; outline-offset: 2px; }
.skeleton { cursor: default; }
.skeleton .card-img { position: relative; overflow: hidden; }
.skeleton .card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%); animation: shimmer 1.4s infinite; }
.skeleton::after { content: ""; display: block; height: 32px; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.grid { display: grid; gap: 26px 14px; grid-template-columns: repeat(auto-fill, minmax(var(--poster), 1fr)); }
.grid .card { width: auto; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(var(--wide), 1fr)); }

/* ---------- browse ---------- */
.browse { padding: 96px var(--pad) 60px; }
.browse-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.browse-head h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.browse-head .count { color: var(--faint); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.filter-pin { height: 1px; margin-bottom: -1px; }
.filterbar { position: sticky; top: 64px; z-index: 20; display: flex; align-items: center; gap: 14px; margin: 0 calc(-1 * var(--pad)) 26px; padding: 10px var(--pad); background: rgba(9, 9, 11, 0.8); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px) saturate(1.3); transition: box-shadow 0.3s; }
.filterbar.stuck { box-shadow: 0 1px 0 var(--line); }
.filter-sep { width: 1px; height: 20px; background: var(--line-2); flex: none; }
.seg { position: relative; display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { position: relative; z-index: 1; height: 30px; padding: 0 15px; border-radius: 999px; font-size: 0.84rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color 0.3s var(--ease); }
.seg button:hover:not(.on) { color: #fff; }
.seg button.on { color: var(--accent-ink); }
.seg-ind { position: absolute; top: 3px; left: 3px; width: 0; height: 30px; border-radius: 999px; background: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); transition: transform 0.5s var(--spring), width 0.45s var(--ease); }
.seg.no-anim .seg-ind { transition: none; }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.segmented button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 0.84rem; color: var(--muted); font-weight: 500; transition: all 0.15s; }
.segmented button.on { background: #fff; color: #09090b; }
.segmented button:not(.on):hover:not(:disabled) { color: #fff; }
.chips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px 0; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 30px; padding: 0 13px; border-radius: 999px; font-size: 0.84rem; font-weight: 500; color: var(--muted); transition: color 0.2s, background 0.25s var(--ease); }
.chip:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.chip.on { background: rgba(255, 255, 255, 0.14); color: #fff; }
.chips:after { content: ''; flex: none; width: 40px; }
.sentinel { min-height: 80px; }
.section-title { font-size: 1.05rem; margin-bottom: 14px; }
.search-sec { margin-bottom: 44px; }
.mobile-search { display: none; }

/* ---------- requests ---------- */
.requests { display: grid; gap: 2px; max-width: 820px; }
.req { display: flex; align-items: center; gap: 16px; padding: 10px 12px; border-radius: 12px; transition: background 0.15s; }
.req:hover { background: var(--surface); }
.req img, .req-noimg { width: 44px; height: 66px; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: none; }
.req-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.req-name { font-weight: 500; }

/* ---------- title modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(6px); overflow-y: auto; padding: 40px 16px; opacity: 0; transition: opacity 0.2s; overscroll-behavior: contain; }
.modal-backdrop.in { opacity: 1; }
.modal { position: relative; width: min(920px, 100%); margin: 0 auto; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line), 0 40px 100px rgba(0, 0, 0, 0.7); transform: translateY(14px); transition: transform 0.25s ease-out; min-height: 300px; }
.modal-backdrop.in .modal { transform: none; }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 6; width: 36px; height: 36px; background: rgba(9, 9, 11, 0.6); }
.modal-close .ic { width: 18px; height: 18px; }
.modal-body { min-height: 300px; }
.detail-hero { position: relative; aspect-ratio: 16 / 8.5; width: 100%; background: var(--surface-2); }
.detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 0%, rgba(18, 18, 21, 0.75) 30%, transparent 70%); }
.detail-hero-content { position: absolute; left: 40px; right: 40px; bottom: 26px; display: grid; gap: 14px; justify-items: start; }
.detail-logo { max-width: min(340px, 60%); max-height: 110px; object-fit: contain; object-position: left bottom; }
.detail-title { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; }
.detail-note { font-size: 0.83rem; color: var(--muted); max-width: 520px; }
.detail-note.warn { color: var(--warn); }
.detail-progress { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--muted); }
.detail-progress .bar { width: 160px; height: 3px; background: rgba(255, 255, 255, 0.18); border-radius: 2px; overflow: hidden; }
.detail-progress .bar div { height: 100%; background: #fff; }
.slot { display: contents; }
.audio-pick { height: 42px; }
.detail-info { display: grid; grid-template-columns: 1.7fr 1fr; gap: 36px; padding: 4px 40px 28px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: 0.88rem; }
.ratings { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.rating { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: #e4e4e7; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.rating b { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em; color: var(--muted); }
.rating.imdb b { color: #f5c518; }
.rating .ic { width: 12px; height: 12px; color: var(--faint); }
a.rating:hover { background: rgba(255, 255, 255, 0.1); }
.cert { box-shadow: inset 0 0 0 1px var(--line-2); padding: 0 6px; border-radius: 4px; font-size: 0.75rem; }
.tagline { color: var(--muted); margin: 16px 0 0; font-size: 0.92rem; }
.overview { line-height: 1.6; color: #d4d4d8; margin: 12px 0 0; }
.detail-right { font-size: 0.86rem; }
.detail-right p { margin: 0 0 10px; line-height: 1.5; color: #d4d4d8; }
.detail-right .btn { margin-top: 6px; }
.detail-section { padding: 8px 40px 32px; }
.detail-section h3 { font-size: 1.1rem; margin-bottom: 14px; }
.episodes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.episodes-head h3 { margin: 0; }
.episode { display: grid; grid-template-columns: 28px 150px 1fr; gap: 16px; align-items: center; padding: 14px 10px; border-radius: 12px; cursor: pointer; transition: background 0.15s; }
.episode.static { cursor: default; }
.episode:not(.static):hover { background: rgba(255, 255, 255, 0.04); }
.ep-num { color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.ep-img { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.ep-img img { width: 100%; height: 100%; object-fit: cover; }
.ep-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.2s; background: rgba(0, 0, 0, 0.3); }
.ep-play .ic { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: #fff; color: #09090b; }
.episode:hover .ep-play { opacity: 1; }
.ep-text { min-width: 0; display: grid; gap: 4px; }
.ep-text p { margin: 0; }
.ep-top { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; }
.ep-top .bold { font-weight: 500; }
.ep-done { color: var(--ok); }
.ep-action { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.season-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; margin: 4px 0 8px; background: rgba(255, 255, 255, 0.04); border-radius: 12px; }
.more .grid { --poster: 128px; gap: 20px 12px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: up 0.15s; }
.sheet { width: min(420px, 100%); max-height: 85vh; overflow: auto; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 16px; padding: 22px; display: grid; gap: 14px; }
.sheet h3 { font-size: 1.05rem; }
.season-list { display: grid; gap: 2px; }
.season-opt { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; }
.season-opt:hover { background: rgba(255, 255, 255, 0.05); }
.season-opt.off { opacity: 0.45; cursor: default; }
.season-opt input { width: 17px; height: 17px; accent-color: #fff; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; }
.trailer-box { position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; }
.trailer-box iframe { width: 100%; height: 100%; border: 0; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; outline: none; cursor: none; }
.player.show { cursor: default; }
.player-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-video::cue { background: rgba(0, 0, 0, 0.5); font-size: clamp(16px, 2.4vw, 32px); }
.player-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.75)); opacity: 0; transition: opacity 0.3s; }
.player-top, .player-bottom { position: absolute; left: 0; right: 0; padding: 18px clamp(14px, 3vw, 36px); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.player.show .player-shade, .player.show .player-top, .player.show .player-bottom { opacity: 1; pointer-events: auto; }
.player-top { top: 0; display: flex; align-items: center; gap: 14px; padding-top: max(18px, env(safe-area-inset-top)); }
.player-titles { min-width: 0; }
.player-title { font-size: 1.05rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }
.player-bottom { bottom: 0; display: grid; gap: 6px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.pbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; transition: background 0.15s; }
.pbtn .ic { width: 26px; height: 26px; }
.pbtn:hover { background: rgba(255, 255, 255, 0.1); }
.player-row { display: flex; align-items: center; gap: clamp(2px, 0.8vw, 10px); }
.player-time { font-variant-numeric: tabular-nums; font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); margin-left: 6px; white-space: nowrap; }
.vol-wrap { display: flex; align-items: center; }
.volume { width: 0; opacity: 0; transition: all 0.2s; accent-color: #fff; }
.vol-wrap:hover .volume { width: 84px; opacity: 1; margin-right: 6px; }
.seek-wrap { position: relative; height: 18px; display: flex; align-items: center; }
.seek-buffered { position: absolute; left: 0; height: 3px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; pointer-events: none; top: 7.5px; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; background: linear-gradient(to right, #fff var(--p, 0%), rgba(255, 255, 255, 0.18) var(--p, 0%)); border-radius: 2px; outline: none; position: relative; cursor: pointer; transition: height 0.15s; margin: 0; }
.seek-wrap:hover .seek { height: 5px; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; transform: scale(0); transition: transform 0.15s; }
.seek-wrap:hover .seek::-webkit-slider-thumb { transform: scale(1); }
.seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.seek-tip { position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(24, 24, 28, 0.92); padding: 3px 8px; border-radius: 6px; font-size: 0.78rem; opacity: 0; pointer-events: none; transition: opacity 0.15s; font-variant-numeric: tabular-nums; }
.seek-wrap:hover .seek-tip { opacity: 1; }
.player .spinner.big { position: absolute; left: 50%; top: 50%; margin: -26px 0 0 -26px; }
.player-bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(12px); }
.player-bigplay .ic { width: 36px; height: 36px; margin-left: 4px; }
.player-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(24, 24, 28, 0.95); box-shadow: inset 0 0 0 1px var(--line-2); padding: 18px 22px; border-radius: 14px; max-width: min(440px, 90vw); text-align: center; }
.player-menu { position: absolute; right: clamp(14px, 3vw, 36px); bottom: 100px; background: rgba(24, 24, 28, 0.94); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px rgba(0, 0, 0, 0.5); border-radius: 14px; padding: 10px; max-height: 60vh; overflow: auto; }
.menu-cols { display: flex; gap: 18px; }
.menu-col { display: grid; gap: 1px; align-content: start; min-width: 180px; }
.menu-head { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 8px; }
.menu-opt { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; text-align: left; color: #c4c4cc; font-size: 0.9rem; }
.menu-opt:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.menu-opt.active { color: #fff; font-weight: 500; }
.menu-opt .check { width: 18px; display: inline-grid; }
.menu-note { padding: 10px 8px 2px; color: var(--faint); font-size: 0.78rem; }
.upnext { position: absolute; right: clamp(14px, 3vw, 36px); bottom: 110px; display: flex; align-items: center; gap: 14px; background: rgba(24, 24, 28, 0.92); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 14px; padding: 10px; max-width: min(440px, 90vw); }
.upnext img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }

/* ---------- phones & tablets ---------- */
@media (max-width: 900px) {
  :root { --poster: 31vw; --wide: 72vw; --pad: 16px; }
  .nav, .search-box { display: none; }
  .topbar { height: calc(56px + env(safe-area-inset-top)); gap: 12px; }
  .tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 30; border-radius: 24px; padding: 6px; background: rgba(22, 22, 26, 0.82); backdrop-filter: blur(24px) saturate(1.5); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 34px rgba(0, 0, 0, 0.55); }
  .tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 3px 0; color: var(--faint); transition: color 0.3s var(--ease); }
  .tab-ic { width: 54px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background 0.35s var(--ease), transform 0.35s var(--spring); }
  .tabbar .ic { width: 21px; height: 21px; }
  .tab-label { font-size: 0.64rem; font-weight: 500; letter-spacing: 0.01em; }
  .tabbar a.active { color: #fff; }
  .tabbar a.active .tab-ic { background: rgba(255, 255, 255, 0.15); }
  .tabbar a:active .tab-ic { transform: scale(0.92); }
  .page { padding-bottom: 110px; }
  .toasts { bottom: 104px; }
  .filterbar { top: calc(56px + env(safe-area-inset-top)); flex-wrap: wrap; gap: 10px; padding: 8px var(--pad); }
  .filter-sep { display: none; }
  .sort-seg { width: 100%; }
  .sort-seg button { flex: 1; padding: 0 8px; }
  .chips { flex-basis: 100%; }
  .hero { height: 118vw; max-height: 74vh; min-height: 420px; }
  .hero-img { width: 100%; object-position: center top; }
  .hero-shade { background: linear-gradient(to top, var(--bg) 4%, rgba(9, 9, 11, 0.75) 38%, transparent 70%); }
  .hero-content { left: var(--pad); right: var(--pad); width: auto; bottom: 28px; }
  .hero-overview { -webkit-line-clamp: 2; font-size: 0.9rem; }
  .rows { gap: 28px; }
  .row-arrow { display: none; }
  .row-track { gap: 10px; }
  .card-play { display: none; }
  .card.wide .card-play { display: grid; }
  .browse { padding-top: 76px; }
  .padded { padding-top: 80px; }
  .mobile-search { display: block; width: 100%; height: 46px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--surface-2); font-size: 1rem; margin-bottom: 26px; outline: none; }
  .grid { gap: 20px 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; box-shadow: none; }
  .detail-hero { aspect-ratio: 4 / 3.4; }
  .detail-hero-content { left: 18px; right: 18px; bottom: 16px; }
  .detail-info { grid-template-columns: 1fr; gap: 10px; padding: 4px 18px 20px; }
  .detail-section { padding: 6px 18px 24px; }
  .episode { grid-template-columns: 118px 1fr; gap: 12px; padding: 10px 2px; }
  .ep-num { display: none; }
  .more .grid { --poster: 28vw; }
  .player-menu { left: 12px; right: 12px; bottom: 96px; }
  .menu-cols { flex-direction: column; gap: 10px; }
  .vol-wrap { display: none; }
  .upnext { left: 12px; right: 12px; bottom: 96px; }
  .upnext img { width: 88px; }
}
@media (max-width: 420px) {
  .player-time { font-size: 0.78rem; }
  .pbtn { width: 38px; height: 38px; }
  .pbtn .ic { width: 23px; height: 23px; }
}

/* ---------- My List, playlists, queue ---------- */
.list-sec { margin-bottom: 44px; }
.sec-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head .section-title { margin-bottom: 4px; }
.sec-head p { margin: 0; }
.list-toggle.on { background: #fff; color: #09090b; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 14px; }
.pl-tile { display: grid; gap: 8px; }
.pl-art { aspect-ratio: 1; border-radius: var(--r); background: linear-gradient(135deg, var(--surface-2), var(--surface)); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.pl-art img { width: 100%; height: 100%; object-fit: cover; }
.pl-art .ic { width: 40px; height: 40px; color: var(--muted); }
.pl-tile:hover .pl-art { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 30px rgba(0, 0, 0, 0.45); }
.pl-list { display: grid; gap: 2px; margin-top: 28px; }
.pl-row { display: grid; grid-template-columns: 28px 128px 1fr auto; gap: 16px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; transition: background 0.25s var(--ease); }
.pl-row:hover { background: var(--surface); }
.pl-row:hover .ep-play { opacity: 1; }
.pl-row .grow { min-width: 0; }
.pl-row .bold { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row .circle { width: 34px; height: 34px; opacity: 0.6; }
.pl-row .circle:hover { opacity: 1; }
.pl-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.back-link { display: inline-block; margin-bottom: 14px; }
.back-link:hover { color: #fff; }
.new-playlist { display: flex; gap: 8px; }
.new-playlist input, .party-join input { flex: 1; min-width: 0; height: 40px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 16px; color: var(--text); outline: none; }
.new-playlist input:focus, .party-join input:focus { border-color: rgba(255, 255, 255, 0.4); }
.new-playlist.inline input { height: 34px; width: 200px; }
.pl-opt { width: 100%; text-align: left; }
.pl-opt .ic { width: 20px; height: 20px; color: var(--muted); }
.queue-sec { margin-bottom: 40px; }
.queue-sec .req .circle { width: 34px; height: 34px; }
.req.q-done, .req.q-failed, .req.q-declined { opacity: 0.6; }
.narrow { max-width: 560px; }
.party-join { display: flex; gap: 10px; margin: 24px 0; }
.party-join input { height: 46px; font-size: 1.1rem; letter-spacing: 0.25em; text-transform: uppercase; }

/* ---------- watch party ---------- */
.party-btn { position: relative; }
.party-btn.on { color: #09090b; background: #fff; }
.party-btn.on:hover { background: #e4e4e7; }
.party-btn.unread::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 0 2px #000; }
.party-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 100%); z-index: 6; display: flex; flex-direction: column; gap: 12px; padding: 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); background: rgba(14, 14, 17, 0.92); backdrop-filter: blur(24px); box-shadow: -1px 0 0 var(--line-2); cursor: auto; animation: slideIn 0.4s var(--ease); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.player.panel-open .player-top, .player.panel-open .player-bottom { right: min(340px, 100%); }
.party-head { display: flex; align-items: center; gap: 10px; }
.party-head .circle { width: 34px; height: 34px; }
.party-code { font-weight: 700; color: #fff; letter-spacing: 0.15em; font-variant-numeric: tabular-nums; }
.party-actions { display: flex; gap: 8px; }
.members { display: flex; flex-wrap: wrap; gap: 6px; }
.member { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); animation: pop 0.35s var(--spring); }
.avatar.sm { width: 22px; height: 22px; font-size: 0.7rem; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; min-height: 60px; }
.chat-msg { font-size: 0.88rem; line-height: 1.4; display: grid; gap: 1px; animation: up 0.3s var(--ease); overflow-wrap: anywhere; }
.chat-name { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.chat-msg.mine .chat-name { color: #a1a1aa; }
.reacts { display: flex; justify-content: space-between; }
.reacts button { font-size: 1.25rem; width: 36px; height: 36px; border-radius: 50%; transition: transform 0.35s var(--spring), background 0.2s; }
.reacts button:hover { background: rgba(255, 255, 255, 0.08); transform: scale(1.15); }
.reacts button:active { transform: scale(0.9); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; height: 40px; border-radius: 999px; padding: 0 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-2); color: #fff; outline: none; }
.chat-form .circle { width: 40px; height: 40px; background: #fff; color: #09090b; }
.party-notices { position: absolute; left: 50%; top: 76px; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; z-index: 5; pointer-events: none; }
.party-notice { background: rgba(24, 24, 28, 0.88); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line-2); padding: 7px 14px; border-radius: 999px; font-size: 0.84rem; max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: pop 0.35s var(--spring); transition: opacity 0.4s, transform 0.4s; }
.party-notice.out { opacity: 0; transform: translateY(-6px); }
.float-emoji { position: absolute; bottom: 120px; font-size: 2.4rem; z-index: 7; pointer-events: none; animation: floatUp 2.6s var(--ease) forwards; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 15% { opacity: 1; transform: translateY(-30px) scale(1.15); } 100% { opacity: 0; transform: translateY(-320px) scale(1); } }
@media (max-width: 700px) {
  .party-panel { top: auto; height: 55%; width: 100%; border-radius: 18px 18px 0 0; box-shadow: 0 -1px 0 var(--line-2); animation: sheetUp 0.4s var(--ease); }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
  .player.panel-open .player-top, .player.panel-open .player-bottom { right: 0; }
  .player.panel-open .player-bottom { bottom: 55%; }
  .pl-row { grid-template-columns: 22px 96px 1fr auto; gap: 10px; }
  .pl-grid { grid-template-columns: repeat(2, 1fr); }
  .new-playlist.inline input { width: 140px; }
}

/* ---------- motion ---------- */
#page > .page { animation: pageIn 0.5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.card.enter { animation: cardIn 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.card-img img, .hero-img, .detail-backdrop, .ep-img img, .req img, .upnext img, .detail-logo, .hero-logo { opacity: 0; transition: opacity 0.25s ease-out, filter 0.3s var(--ease), transform 0.3s var(--ease); }
.card-img img.loaded, .hero-img.loaded, .detail-backdrop.loaded, .ep-img img.loaded, .req img.loaded, .upnext img.loaded, .detail-logo.loaded, .hero-logo.loaded { opacity: 1; }
.hero-img { animation: kenburns 28s ease-in-out infinite alternate; transform-origin: 70% 40%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-content > * { animation: up 0.7s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: 0.06s; }
.hero-content > :nth-child(3) { animation-delay: 0.12s; }
.hero-content > :nth-child(4) { animation-delay: 0.18s; }
.hero-content > :nth-child(5) { animation-delay: 0.24s; }
.card-img { transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.card-play { transition: opacity 0.3s var(--ease), transform 0.4s var(--spring); }
.btn { transition: background 0.2s var(--ease), transform 0.35s var(--spring), box-shadow 0.2s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled), .circle:active, .chip:active { transform: scale(0.96); transition-duration: 0.08s; }
.circle, .chip { transition: background 0.2s var(--ease), color 0.2s, transform 0.35s var(--spring); }
.segmented button { transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.modal-backdrop { transition: opacity 0.32s var(--ease), backdrop-filter 0.32s; }
.modal { transform: translateY(28px) scale(0.97); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.35s var(--ease); }
.modal-backdrop.in .modal { transform: none; opacity: 1; }
.detail-hero-content > *, .detail-info, .detail-section { animation: up 0.6s var(--ease) both; animation-delay: 0.08s; }
.detail-info { animation-delay: 0.14s; }
.detail-section { animation-delay: 0.2s; }
.episode { transition: background 0.25s var(--ease); }
.player { animation: fadeIn 0.35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
.player-menu:not([hidden]), .profile-menu:not([hidden]), .upnext:not([hidden]) { animation: pop 0.3s var(--spring); transform-origin: bottom right; }
.profile-menu:not([hidden]) { transform-origin: top right; }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(6px); } }
.sheet { animation: pop 0.35s var(--spring); }
.toast { animation: pop 0.4s var(--spring); }
.topbar { transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s; }

/* Long catalog grids: skip rendering off-screen cards. */
.grid .card { content-visibility: auto; contain-intrinsic-size: auto 300px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.btn.soon:disabled { opacity: 1; background: rgba(255, 255, 255, 0.1); color: #e4e4e7; box-shadow: inset 0 0 0 1px var(--line-2); cursor: default; }
.trailer-wrap { width: min(1100px, 100%); display: grid; gap: 10px; justify-items: center; }
.trailer-wrap .trailer-box { width: 100%; }
.trailer-yt { display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s; }
.trailer-yt .ic { width: 14px; height: 14px; }
.trailer-yt:hover { color: #fff; }

.grid.stale { opacity: 0.45; transition: opacity 0.15s; }
.search-page .grid { transition: opacity 0.15s; }

/* ---------- themes ---------- */
[data-theme="oled"] { --bg: #000; --surface: #0b0b0d; --surface-2: #131316; }
[data-theme="oled"] .topbar.solid { background: rgba(0, 0, 0, 0.85); }
[data-theme="cinema"] { --bg: #0c0a08; --surface: #16130f; --surface-2: #1f1a14; --line: rgba(255, 236, 200, 0.08); --line-2: rgba(255, 236, 200, 0.15); --muted: #9c9283; --faint: #665d51; --accent: #f2c46d; --accent-hover: #f6d38f; --accent-ink: #1a1207; }
[data-theme="cinema"] .eyebrow { color: #f2c46d; }
[data-theme="cinema"] .topbar.solid { background: rgba(12, 10, 8, 0.85); }
[data-theme="christmas"] { --bg: #06110c; --surface: #0d1c15; --surface-2: #14281e; --line: rgba(220, 255, 235, 0.08); --line-2: rgba(220, 255, 235, 0.15); --muted: #8fa59a; --faint: #5b7066; --accent: #e5384f; --accent-hover: #f04f65; --accent-ink: #ffffff; }
[data-theme="christmas"] body { background: radial-gradient(1200px 600px at 85% -10%, rgba(229, 56, 79, 0.13), transparent 60%), radial-gradient(900px 500px at -10% 30%, rgba(34, 160, 90, 0.12), transparent 60%), var(--bg); background-attachment: fixed; }
[data-theme="christmas"] .topbar.solid { background: rgba(6, 17, 12, 0.85); }
[data-theme="christmas"] .eyebrow { color: #f5d27a; }
[data-theme="christmas"] .wordmark::after { content: ' ✦'; color: #f5d27a; font-size: 0.8em; }
[data-theme="christmas"] .chip.on { background: rgba(34, 160, 90, 0.28); }
[data-theme="christmas"] .card-progress div, [data-theme="christmas"] .bar div { background: #e5384f; }
.snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#page { position: relative; z-index: 1; }
.snow i { position: absolute; top: -10px; border-radius: 50%; background: #fff; filter: blur(0.4px); animation-name: snowfall, sway; animation-timing-function: linear, ease-in-out; animation-iteration-count: infinite, infinite; animation-direction: normal, alternate; }
@keyframes snowfall { to { transform: translateY(110vh); } }
@keyframes sway { from { margin-left: -14px; } to { margin-left: 14px; } }
body.playing .snow, body.modal-open .snow { display: none; }

/* ---------- poster size + motion ---------- */
[data-size="small"] { --poster: clamp(100px, 9vw, 140px); --wide: clamp(200px, 17vw, 260px); }
[data-size="large"] { --poster: clamp(150px, 14.5vw, 224px); --wide: clamp(270px, 25vw, 380px); }
@media (max-width: 900px) {
  [data-size="small"] .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [data-size="small"] { --poster: 24vw; }
  [data-size="large"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-size="large"] { --poster: 42vw; }
}
[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }

/* ---------- settings page ---------- */
.settings { max-width: 820px; }
.set-sec { padding: 26px 0; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.set-sec:first-of-type { border-top: 0; padding-top: 0; }
.set-head h2 { font-size: 1.1rem; margin: 0 0 4px; }
.set-head p { margin: 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.set-label { font-weight: 500; }
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.theme-card { text-align: left; display: grid; gap: 4px; padding: 8px 8px 12px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.25s, transform 0.35s var(--spring); }
.theme-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2); }
.theme-card.on { box-shadow: inset 0 0 0 2px var(--accent); }
.theme-preview { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; margin-bottom: 6px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 14px 1fr 16px; gap: 5px; padding: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.tp-bar { grid-column: 1 / -1; border-radius: 4px; }
.tp-card { border-radius: 4px; }
.tp-btn { grid-column: 1 / 2; border-radius: 99px; }
.tp-snow { position: absolute; inset: 0; background-image: radial-gradient(#fff 1px, transparent 1.6px); background-size: 14px 14px; opacity: 0.5; }
.theme-name { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 0.92rem; padding: 0 4px; }
.theme-card .muted { padding: 0 4px; }
.theme-check { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.35s var(--spring); }
.theme-check .ic { width: 14px; height: 14px; }
.theme-card.on .theme-check { opacity: 1; transform: none; }
.set-select { height: 38px; min-width: 200px; }
.switch { width: 48px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); position: relative; flex: none; transition: background 0.25s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform 0.35s var(--spring); }
.switch.on { background: var(--accent); }
.switch.on span { transform: translateX(20px); background: var(--accent-ink); }
[data-theme="default"] .switch.on span, [data-theme="oled"] .switch.on span { background: #09090b; }
.pw-form { display: grid; gap: 12px; max-width: 380px; }
.set-msg { font-size: 0.86rem; min-height: 1.2em; }
.set-msg.ok { color: var(--ok); }
.set-msg.bad { color: var(--bad); }
@media (max-width: 700px) { .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .set-select { width: 100%; } }

/* ---------- v8: social, previews, admin ---------- */
.pm-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.kids-badge { margin-left: 8px; padding: 2px 8px; border-radius: 99px; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; background: #fbbf24; color: #1a1207; vertical-align: 2px; }
body.kids .wordmark { letter-spacing: 0.08em; }
.link-btn { color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-size: 0.86rem; padding: 4px 0; justify-self: start; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tiny { font-size: 0.72rem; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 0.72rem; font-weight: 600; background: rgba(255, 255, 255, 0.08); color: #d4d4d8; white-space: nowrap; }
.pill.warn { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.pill.bad { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }

/* sheets */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: 1.1rem; }
.sheet textarea, .sheet input[type=text], .sheet input[type=datetime-local], .pin-input, .settings .inline input { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 0.95rem; color: var(--text); outline: none; resize: vertical; color-scheme: dark; }
.settings .inline input { width: 140px; height: 40px; padding: 0 12px; }
.sheet textarea:focus, .sheet input:focus { border-color: rgba(255, 255, 255, 0.4); }
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-kind { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; transition: box-shadow 0.2s, background 0.2s; }
.fb-kind .ic { width: 17px; height: 17px; }
.fb-kind.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface-2); }
.people-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 240px; overflow: auto; }
.person-pick { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.88rem; transition: box-shadow 0.2s; }
.person-pick .avatar { width: 26px; height: 26px; font-size: 0.75rem; }
.person-pick.on { box-shadow: inset 0 0 0 2px var(--accent); }

/* title page */
.thumb.down .ic { transform: rotate(180deg); }
.thumb.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.person-link { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color 0.2s; }
.person-link:hover { border-color: var(--text); }
.collection-note { margin: -8px 0 14px; }
.more h3 + .grid, .more .grid + h3 { margin-top: 0; }
.more .grid + h3 { margin-top: 26px; }

/* trailer previews */
.trailer-frame { position: absolute; top: 50%; left: 50%; height: 100%; aspect-ratio: 16 / 9; transform: translate(-50%, -50%) scale(1.02); border: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s var(--ease); }
.card.wide .trailer-frame { width: 100%; height: auto; }
.card.previewing .trailer-frame { opacity: 1; }
.card.previewing .card-img { transform: scale(1.04); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--line-2); }
.hero-trailer { position: absolute; top: 50%; right: 0; left: auto; width: 82%; height: auto; min-height: 100%; aspect-ratio: 16 / 9; transform: translateY(-50%) scale(1.15); }
.hero.trailer-on .hero-trailer { opacity: 1; }
.hero.trailer-on .hero-img { opacity: 0 !important; transition: opacity 0.8s; }
.hero-sound { margin-left: 4px; }

/* ranked (Top 10) */
.card.ranked { position: relative; padding-left: clamp(34px, 3.6vw, 52px); }
.rank { position: absolute; left: 0; bottom: 34px; font-size: clamp(4.5rem, 7.5vw, 7rem); font-weight: 800; line-height: 0.8; letter-spacing: -0.06em; color: var(--bg); -webkit-text-stroke: 2px rgba(255, 255, 255, 0.55); pointer-events: none; z-index: 0; }
.card.ranked .card-img, .card.ranked .card-cap { position: relative; z-index: 1; }
.ranked-row .row-track { gap: 6px; }

/* planned watch parties */
.planned { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; padding: 0 var(--pad); margin-bottom: 8px; }
.planned.stack { padding: 0; grid-template-columns: 1fr; }
.planned-card { position: relative; overflow: hidden; border-radius: 16px; min-height: 180px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: flex-end; }
.planned-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.planned-shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface) 10%, transparent 90%), linear-gradient(to top, var(--surface), transparent 70%); }
.planned-body { position: relative; padding: 18px; display: grid; gap: 4px; }
.planned-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
.planned-body .hero-actions { margin-top: 10px; }
.planned-card.live { box-shadow: inset 0 0 0 2px var(--accent); }
.planned-card.live .eyebrow::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-right: 7px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* player: skip intro / credits */
.skip-seg { position: absolute; right: clamp(14px, 3vw, 36px); bottom: 120px; z-index: 6; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; background: rgba(255, 255, 255, 0.92); color: #09090b; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: up 0.25s var(--ease); }
.skip-seg .ic { width: 18px; height: 18px; }
.skip-seg:hover { background: #fff; }
.upnext:not([hidden]) ~ .skip-seg { bottom: 200px; }

/* person page */
.person-head { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; margin-bottom: 34px; max-width: 980px; }
.person-photo { width: 180px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.person-photo.noimg { display: grid; place-items: center; font-size: 3rem; color: var(--faint); }
.person-text { display: grid; gap: 8px; }
.person-bio { color: #d4d4d8; line-height: 1.6; margin: 6px 0 0; white-space: pre-line; }
@media (max-width: 700px) { .person-head { grid-template-columns: 110px 1fr; gap: 16px; } .person-photo { width: 110px; } }

/* admin */
.admin { max-width: 980px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { padding: 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stat-n { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.admin-list { display: grid; gap: 2px; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.admin-row .ic { width: 18px; height: 18px; color: var(--muted); }
.rank-sm { width: 22px; font-weight: 700; color: var(--muted); }
.fb-item { padding: 12px 14px; border-radius: 12px; background: var(--surface); display: grid; gap: 6px; margin-bottom: 6px; }
.fb-item.done { opacity: 0.55; }
.fb-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-text-view { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.set-select.small { min-width: 0; height: 34px; }
.add-person { margin-top: 12px; }
@media (max-width: 600px) {
  .modal .hero-actions { gap: 8px; }
  .modal .hero-actions .circle { width: 40px; height: 40px; }
  .modal .hero-actions .circle .ic { width: 19px; height: 19px; }
}
.copy-val { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; word-break: break-all; }
/* Binge wordmark: a word, not initials */
.wordmark { font-weight: 800; letter-spacing: -0.03em; font-size: 1.35rem; }
.boot .brand, .brand { letter-spacing: -0.03em; font-weight: 800; }
.boot .brand.big { font-size: 2rem; }

/* ---------- brand logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 0.32em; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.logo-mark { display: inline-flex; width: 0.95em; height: 1.2em; }
.logo-mark svg { width: 100%; height: 100%; }
.logo-word { transform: translateY(-0.04em); }
.wordmark { display: inline-flex; align-items: center; letter-spacing: 0; font-size: 1.45rem; }
.boot .logo { font-size: 2.6rem; }

/* ---------- sign-in (cinematic) ---------- */
.login { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: grid; place-items: stretch; padding: 0; background: #07070a; }
.login-wall { position: absolute; inset: -25% -35%; display: grid; gap: 18px; align-content: center; transform: perspective(1600px) rotateX(16deg) rotateZ(-8deg); opacity: 0; transition: opacity 1.8s var(--ease); pointer-events: none; }
.login-wall.ready { opacity: 1; }
.wall-row { display: flex; gap: 18px; width: max-content; animation: wall 140s linear infinite; }
.wall-row:nth-child(even) { animation-direction: reverse; animation-duration: 170s; }
.wall-row img { width: clamp(220px, 22vw, 380px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55); opacity: 0.9; }
@keyframes wall { to { transform: translateX(-50%); } }
.login-glow { position: absolute; width: 70vmax; height: 70vmax; left: -22vmax; top: -30vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 61, 113, 0.28), rgba(255, 154, 61, 0.08) 40%, transparent 65%); animation: glowdrift 16s ease-in-out infinite alternate; pointer-events: none; }
@keyframes glowdrift { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
.login-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7, 7, 10, 0.94) 0%, rgba(7, 7, 10, 0.7) 42%, rgba(7, 7, 10, 0.55) 62%, rgba(7, 7, 10, 0.85) 100%), linear-gradient(to top, #07070a 0%, transparent 30%, transparent 75%, rgba(7, 7, 10, 0.8) 100%); }
.login-main { position: relative; z-index: 1; width: 100%; max-width: 1220px; margin: auto; display: grid; grid-template-columns: 1.25fr minmax(320px, 410px); gap: clamp(32px, 6vw, 110px); align-items: center; padding: 56px clamp(20px, 5vw, 64px); }
.login-pitch { animation: rise 0.9s var(--ease) both; }
.login-pitch .logo.big { font-size: clamp(2.8rem, 5.5vw, 4.4rem); }
.login-pitch h1 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); line-height: 1.04; letter-spacing: -0.035em; margin: 26px 0 14px; max-width: 13ch; }
.grad-text { background: linear-gradient(90deg, #ff3d71, #ff9a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-pitch .lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #d4d4d8; margin: 0; font-weight: 500; }
.login-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; padding: 0; }
.login-feats li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 99px; font-size: 0.88rem; color: #e4e4e7; background: rgba(255, 255, 255, 0.07); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.login-feats .ic { width: 17px; height: 17px; color: #ff7a59; }
.login .login-card { width: 100%; gap: 16px; padding: clamp(24px, 3vw, 36px); border-radius: 26px; background: rgba(18, 18, 24, 0.6); backdrop-filter: blur(26px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 90px rgba(0, 0, 0, 0.6); animation: rise 0.9s var(--ease) 0.15s both; }
.login-card h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.login-card p { margin: 0; }
.login .field input { background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.12); height: 50px; }
.login .field input:focus { border-color: #ff6a5a; box-shadow: 0 0 0 4px rgba(255, 61, 113, 0.15); }
.btn-brand { height: 52px; font-size: 1rem; background: linear-gradient(90deg, #ff3d71, #ff7a45); color: #fff; box-shadow: 0 14px 34px rgba(255, 61, 113, 0.35); transition: transform 0.25s var(--spring), box-shadow 0.25s; }
.btn-brand:hover:not(:disabled) { background: linear-gradient(90deg, #ff4f7e, #ff8a55); transform: translateY(-1px); box-shadow: 0 18px 40px rgba(255, 61, 113, 0.45); }
.login-foot { text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (max-width: 860px) {
  .login-main { grid-template-columns: 1fr; gap: 28px; padding: max(40px, env(safe-area-inset-top)) 20px 32px; align-content: center; }
  .login-pitch { text-align: center; }
  .login-pitch h1 { margin: 18px auto 10px; font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .login-pitch .logo.big { font-size: 2.6rem; }
  .login-feats { justify-content: center; margin-top: 18px; }
  .login-feats li:nth-child(n + 3) { display: none; }
  .login-shade { background: linear-gradient(to bottom, rgba(7, 7, 10, 0.6), rgba(7, 7, 10, 0.85) 45%, #07070a 100%); }
}
@media (prefers-reduced-motion: reduce) { .wall-row, .login-glow { animation: none; } }
.boot .logo-mark { width: auto; height: auto; }
.boot-icon { width: 1.2em; height: 1.2em; }

/* ---------- Christmas lights (around content, never over posters) ---------- */
[data-theme="christmas"] { --strand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='26' viewBox='0 0 64 26'%3E%3Cpath d='M0 3 Q16 12 32 3 Q48 12 64 3' stroke='%232c3b31' stroke-width='1.6' fill='none'/%3E%3Crect x='13.8' y='6.2' width='4.4' height='4' rx='1' fill='%231d2a22'/%3E%3Cellipse cx='16' cy='15' rx='3.8' ry='5.6' fill='%23ff3347'/%3E%3Cellipse cx='14.8' cy='13' rx='1.1' ry='2' fill='white' opacity='.55'/%3E%3Crect x='45.8' y='6.2' width='4.4' height='4' rx='1' fill='%231d2a22'/%3E%3Cellipse cx='48' cy='15' rx='3.8' ry='5.6' fill='%232ee06e'/%3E%3Cellipse cx='46.8' cy='13' rx='1.1' ry='2' fill='white' opacity='.55'/%3E%3C/svg%3E"); --glow-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='26' viewBox='0 0 64 26'%3E%3Ccircle cx='16' cy='15' r='10' fill='%23ff3347' opacity='.35'/%3E%3C/svg%3E"); --glow-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='26' viewBox='0 0 64 26'%3E%3Ccircle cx='48' cy='15' r='10' fill='%232ee06e' opacity='.35'/%3E%3C/svg%3E"); }
.xmas-strand { display: none; }
[data-theme="christmas"] .topbar::after,
[data-theme="christmas"] .row-head::before,
[data-theme="christmas"] .page-title::after,
[data-theme="christmas"] .modal-body::before {
  content: ''; position: absolute; left: 0; right: 0; height: 26px; pointer-events: none;
  background-image: var(--glow-a), var(--glow-b), var(--strand); background-repeat: repeat-x; background-size: 64px 26px;
  animation: twinkle 2.4s steps(2, jump-none) infinite;
}
[data-theme="christmas"] .topbar::after { bottom: -20px; z-index: 2; }
[data-theme="christmas"] .row-head { position: relative; padding-top: 22px; }
[data-theme="christmas"] .row-head::before { top: -4px; left: var(--pad); right: var(--pad); width: auto; animation-delay: -1.2s; }
[data-theme="christmas"] .row:nth-child(even) .row-head::before { animation-delay: -0.4s; background-position: 32px 0; }
[data-theme="christmas"] .page-title { position: relative; padding-bottom: 26px; }
[data-theme="christmas"] .page-title::after { bottom: -2px; }
[data-theme="christmas"] .modal-body { position: relative; }
[data-theme="christmas"] .modal-body::before { top: 0; z-index: 3; border-radius: inherit; }
@keyframes twinkle {
  0% { background-image: var(--glow-a), var(--strand); }
  50% { background-image: var(--glow-b), var(--strand); }
  100% { background-image: var(--glow-a), var(--glow-b), var(--strand); }
}
/* Posters: a soft red-and-green glow around the edge on hover, never on top. */
[data-theme="christmas"] .card:hover .card-img, [data-theme="christmas"] .card:focus-visible .card-img {
  box-shadow: 0 0 0 2px rgba(255, 51, 71, 0.85), 0 0 18px rgba(255, 51, 71, 0.45), 0 0 34px rgba(46, 224, 110, 0.3);
}
[data-theme="christmas"] .row:nth-child(even) .card:hover .card-img {
  box-shadow: 0 0 0 2px rgba(46, 224, 110, 0.85), 0 0 18px rgba(46, 224, 110, 0.4), 0 0 34px rgba(255, 51, 71, 0.3);
}
/* Screen edges: a faint warm red / green glow that breathes. */
[data-theme="christmas"] body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 24;
  box-shadow: inset 0 0 90px rgba(255, 51, 71, 0.12), inset 0 0 160px rgba(46, 224, 110, 0.08);
  animation: edgeglow 6s ease-in-out infinite alternate;
}
@keyframes edgeglow { to { box-shadow: inset 0 0 90px rgba(46, 224, 110, 0.12), inset 0 0 160px rgba(255, 51, 71, 0.08); } }
body.playing::after { display: none; }
[data-motion="reduced"] .topbar::after, [data-motion="reduced"] .row-head::before, [data-motion="reduced"] .page-title::after, [data-motion="reduced"] .modal-body::before { animation: none; }
.grad-text { white-space: nowrap; }
