/* SagaSnap website. Always dark; the accent gradient matches the app logo (app/src/theme.ts + assets/brand/marks.js). */
:root {
  --bg: #0a0a0d;
  --card: #17141b;
  --card-hi: #221d27;
  --border: #2d2631;
  --text: #fff;
  --sub: #c3b9c4;
  --dim: #85798a;
  --accent: #ff2d87;      /* SagaSnap hot pink (same as the app: src/theme.ts ACCENT) */
  --accent-2: #ff6a9f;
  --accent-3: #c2126b;
  --grad: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 55%, var(--accent-3) 100%);
  --radius: 10px;
  --gutter: 16px;
  --nav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── layout ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); min-height: 100vh; }
.top {
  position: sticky; top: 0; z-index: 20; padding-top: var(--safe-t);
  background: linear-gradient(var(--bg) 70%, rgba(10,10,13,0));
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: 0.02em; }
.brand img { width: 30px; height: 30px; }
.brand .word { font-size: 19px; font-weight: 900; letter-spacing: 0.04em; white-space: nowrap; }
.brand .word i { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top .spacer { flex: 1; }
.top-links { display: none; gap: 22px; font-weight: 700; color: var(--sub); }
.top-links a.on, .top-links a:hover { color: var(--text); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:hover { background: var(--card); }
.icon-btn svg { width: 22px; height: 22px; }

.tabs { display: flex; gap: 26px; margin: 4px 0 14px; }
.tabs button { font-size: 20px; font-weight: 800; color: var(--dim); padding: 4px 0 8px; position: relative; }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 40%; bottom: 0; height: 3px; border-radius: 2px; background: var(--grad); }

/* bottom nav (phones) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(10,10,13,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid #1d1b24;
}
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--dim); }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--text); }
.nav a.on svg { color: var(--accent); }

/* ── home ───────────────────────────────────────────────────────────────────────────────────────────────────────── */
.hero { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 22px; background: var(--card); aspect-ratio: 16 / 10; display: block; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(10,10,13,0.95)); }
.hero .txt { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.hero .hero-link { position: absolute; inset: 0; z-index: 2; }
.hero .txt { z-index: 3; pointer-events: none; }
.hero .txt a { pointer-events: auto; }
.hero > img { object-position: center 12%; } /* wide banners: keep faces and hats in view */
.hero.poster-hero { aspect-ratio: 4 / 3; }
.hero.poster-hero::after { background: linear-gradient(90deg, rgba(10,10,13,0.92) 0%, rgba(10,10,13,0.55) 50%, rgba(10,10,13,0) 75%); }
.hero .hbg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(0.6); transform: scale(1.1); }
.hero .hposter { position: absolute; top: 12px; bottom: 12px; right: 12px; aspect-ratio: 9 / 16; /* posters are 720x1280 */ border-radius: 10px; overflow: hidden; z-index: 1; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.hero .hposter img { width: 100%; height: 100%; object-fit: cover; }
.hero.poster-hero .txt { right: auto; max-width: 56%; }
.hero h2 { font-size: 24px; line-height: 1.1; margin: 6px 0 6px; }
.hero p { margin: 0 0 12px; color: var(--sub); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,0.14); text-transform: uppercase; }
.chip.hot { background: var(--grad); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 999px; font-weight: 800; background: var(--grad); color: #fff; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: var(--card-hi); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
/* 2026-11-20 cleanup: round icon-only buttons (My List, Share), page titles, bigger poster rows, tidy footer */
.btn.icon { flex: 0 0 44px; width: 44px; padding: 0; }
.btn.icon svg { width: 20px; height: 20px; }
.page-title { font-size: 26px; line-height: 1.1; margin: 10px 0 14px; }

.sec-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.sec-title h2 { font-size: 19px; }
.sec-title a { color: var(--dim); font-size: 13px; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
.card { display: block; min-width: 0; }
.card .pic { position: relative; aspect-ratio: 3 / 4.3; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover .pic img { transform: scale(1.04); }
.card .badge { position: absolute; top: 6px; left: 6px; }
.card .eps { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,0.6); }
.card .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); }
.card h3 { font-size: 14px; font-weight: 700; margin-top: 7px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 12px; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row .card { flex: 0 0 36%; scroll-snap-align: start; }
.feed .sec-title { margin: 26px 0 12px; }

.list-ep { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #1b1921; align-items: center; }
.list-ep .pic { flex: 0 0 64px; aspect-ratio: 9 / 13; border-radius: 8px; overflow: hidden; background: var(--card); }
.list-ep .pic img { width: 100%; height: 100%; object-fit: cover; }
.list-ep b { display: block; font-size: 14px; }
.list-ep span { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }

.empty { text-align: center; color: var(--sub); padding: 60px 20px; }
.empty h2 { font-size: 22px; color: var(--text); margin-bottom: 8px; }
.empty img { width: 72px; margin: 0 auto 18px; }
.note { font-size: 12px; color: var(--dim); text-align: center; margin: 26px 0 0; }
.note a { text-decoration: underline; }

/* skeleton */
.sk { background: linear-gradient(90deg, #1c1a23 0%, #2a2733 50%, #1c1a23 100%); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ── show page ──────────────────────────────────────────────────────────────────────────────────────────────────── */
.show-head { position: relative; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 18px; overflow: hidden; }
.show-head .blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(0.45); transform: scale(1.1); }
.show-head .in { position: relative; display: flex; gap: 14px; align-items: flex-end; }
.show-head .poster { flex: 0 0 120px; aspect-ratio: 3 / 4.3; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.show-head .poster img { width: 100%; height: 100%; object-fit: cover; }
.show-head h1 { font-size: 22px; line-height: 1.15; }
.show-head .meta { color: var(--sub); font-size: 13px; margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { font-size: 12px; color: var(--sub); background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 999px; }
.actions { display: flex; gap: 10px; margin: 16px 0 6px; }
.actions .btn:first-child { flex: 1; }
.desc { color: var(--sub); font-size: 14px; margin: 12px 0 0; }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more { color: var(--text); font-weight: 700; font-size: 13px; margin-top: 4px; }
.ai-label { display: flex; gap: 5px; align-items: center; font-size: 11px; color: var(--dim); margin-top: 10px; }

.ranges { display: flex; gap: 18px; overflow-x: auto; margin: 4px 0 12px; scrollbar-width: none; }
.ranges button { color: var(--dim); font-weight: 700; white-space: nowrap; padding-bottom: 4px; }
.ranges button.on { color: var(--text); border-bottom: 2px solid var(--accent); }
.ep-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ep-grid a {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: 8px; background: var(--card);
  font-weight: 800; font-size: 16px; overflow: hidden;
}
.ep-grid a:hover { background: var(--card-hi); }
.ep-grid a.seen { color: var(--dim); }
.ep-grid a.cur { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.ep-grid a .p { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); }
.ep-grid a .playing { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── player ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
.player { position: fixed; inset: 0; z-index: 100; background: #000; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.player .bgblur { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(50px) brightness(0.35); }
.player .stage { position: absolute; inset: 0; margin: 0 auto; max-width: calc(100vh * 9 / 16); transition: transform 0.28s cubic-bezier(.2,.8,.2,1); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.player video.contain { object-fit: contain; }
.player .poster-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s; pointer-events: none; }
.player .shade-t { position: absolute; left: 0; right: 0; top: 0; height: 120px; background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0)); pointer-events: none; }
.player .shade-b { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.75)); pointer-events: none; }
.player .ptop { position: absolute; top: calc(var(--safe-t) + 8px); left: 8px; right: 8px; display: flex; align-items: center; gap: 6px; z-index: 3; }
.player .ptop .ttl { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.player .side { position: absolute; right: 10px; bottom: calc(var(--safe-b) + 110px); display: flex; flex-direction: column; gap: 18px; z-index: 3; }
.player .side button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.player .side svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6)); }
.player .side .on svg { color: var(--accent); }
.player .pinfo { position: absolute; left: 14px; right: 70px; bottom: calc(var(--safe-b) + 46px); z-index: 3; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.player .pinfo b { display: block; font-size: 16px; }
.player .pinfo span { display: block; font-size: 13px; color: #ddd; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.player .pinfo .ai { font-size: 11px; color: #bbb; margin-top: 6px; }
.player .scrub { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 14px); height: 26px; z-index: 3; padding: 0 14px; display: flex; align-items: center; gap: 10px; font-size: 11px; color: #ddd; }
.player .scrub .track { flex: 1; height: 3px; background: rgba(255,255,255,0.25); border-radius: 2px; position: relative; }
.player .scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--grad); border-radius: 2px; }
.player .scrub .knob { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; }
/* a taller invisible strip so a finger can grab the bar easily; the bar thickens while it's being dragged */
.player .scrub { height: 40px; bottom: calc(var(--safe-b) + 7px); cursor: pointer; touch-action: none; }
.player .scrub .track { transition: height .12s; }
.player .scrub.on .track { height: 6px; }
.player .scrub.on .knob { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.player .scrub .track:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.player .seekhint { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; padding: 10px 16px; border-radius: 999px;
  background: rgba(0,0,0,0.55); color: #fff; font-weight: 800; font-size: 15px; pointer-events: none; }
.player .seekhint.l { left: 12%; }
.player .seekhint.r { right: 12%; }
.player .bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0,0,0,0.45); display: grid; place-items: center; z-index: 2; pointer-events: none; }
.player .bigplay svg { width: 34px; height: 34px; margin-left: 4px; }
.player .spinner { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; z-index: 2; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.player .hint { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font-weight: 700; z-index: 2; pointer-events: none; animation: fade 2.4s forwards; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }
@keyframes fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.player .toast { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 120px); transform: translateX(-50%); background: rgba(20,18,26,0.92); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; z-index: 6; white-space: nowrap; }
.player .err { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; z-index: 4; }
.player .nextcard { position: absolute; left: 14px; right: 14px; bottom: calc(var(--safe-b) + 100px); z-index: 4; background: rgba(20,18,26,0.92); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.player .nextcard img { width: 54px; aspect-ratio: 9/13; object-fit: cover; border-radius: 6px; }
.player .nextcard .nextrow { display: flex; gap: 12px; align-items: center; width: 100%; }
.player .nextcard .nextrow > div { flex: 1; min-width: 0; }
.player .nextcard small { color: var(--sub); display: block; }
.player .nextcard.fin { flex-direction: column; align-items: stretch; }
/* upgrade chunk 4: polish - gentle motion (off for "reduce motion"), press feedback, poster framing */
.card:not(.ep) .pic img { object-position: center 72%; } /* 9:16 posters in card frames: keep the baked-in title at the bottom */
.card .pic { transition: transform .18s ease, box-shadow .18s ease; }
.card:active .pic { transform: scale(0.97); }
@media (hover: hover) { .card:hover .pic { box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,45,135,0.35); } }
.btn { transition: transform .12s ease, filter .12s ease; }
.btn:active { transform: scale(0.97); filter: brightness(0.95); }
.feed > .hero, .feed > .sec-title, .feed > .row, .feed > .grid, .show-head, .actions, .ep-grid { animation: rise .45s ease-out both; }
.feed > .row, .feed > .grid { animation-delay: .06s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.menu a, .menu button { transition: background-color .15s ease; }
@media (hover: hover) { .menu a:hover, .menu button:hover { background: rgba(255,255,255,0.03); } }
@media (prefers-reduced-motion: reduce) {
  .feed > *, .show-head, .actions, .ep-grid { animation: none !important; }
  .card .pic, .btn { transition: none; }
}
.show-head .next-ep { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,45,135,0.18); color: var(--accent-2); font-size: 12px; font-weight: 800; }
/* upgrade chunk 2: episode pages (/series/<id>/ep-<n>/) */
.ep-page .crumbs { font-size: 13px; color: var(--dim); margin: 12px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.ep-page .crumbs a { color: var(--sub); }
.ep-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ep-still { position: relative; display: block; width: min(320px, 72vw); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: 0 16px 50px rgba(0,0,0,0.5); }
.ep-still img { width: 100%; height: 100%; object-fit: cover; }
.ep-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,0.55); display: grid; place-items: center; font-size: 26px; color: #fff; padding-left: 4px; }
.ep-info h1 { font-size: 26px; line-height: 1.15; margin: 4px 0 10px; text-wrap: balance; }
.ep-info p { color: var(--sub); line-height: 1.5; }
.ep-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2) !important; margin: 0; }
.ep-meta { font-size: 13px; color: var(--dim) !important; }
.ep-nav { display: flex; flex-wrap: wrap; gap: 10px 18px; font-weight: 700; }
.ep-nav a { color: var(--text); }
@media (min-width: 760px) { .ep-hero { grid-template-columns: 320px minmax(0, 1fr); align-items: center; gap: 36px; } .ep-still { margin: 0; width: 320px; } }
/* upgrade chunk 1: Up next pill, Previously caption, speed button, shortcut list, hidden preload */
.player .upnext { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 64px); z-index: 12;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 120px); padding: 8px 14px 8px 16px; border-radius: 999px;
  background: rgba(10,10,13,0.82); border: 1px solid rgba(255,255,255,0.18); color: #fff; animation: pillIn .25s ease-out; }
.player .upnext small { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-2); white-space: nowrap; }
.player .upnext b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.player .upnext svg { width: 16px; height: 16px; flex: 0 0 auto; }
.player .prevon { position: absolute; top: calc(var(--safe-t) + 60px); left: 14px; right: 70px; z-index: 6; text-align: left;
  padding: 10px 12px; border-radius: 12px; background: rgba(10,10,13,0.72); color: #fff; font-size: 13px; line-height: 1.35;
  transition: opacity .6s; animation: pillIn .3s ease-out; }
.player .prevon b { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 2px; }
.player .prevon span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.player .prevon.out { opacity: 0; }
.player .side .spd { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto; font-size: 13px; font-weight: 900; border: 2px solid currentColor; border-radius: 8px; }
.player .preload-next { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9px; top: -9px; }
.keys { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.keys li { display: flex; align-items: center; gap: 12px; color: var(--sub); }
.keys kbd { min-width: 64px; text-align: center; padding: 4px 8px; border-radius: 6px; background: var(--card-hi); color: var(--text); font: 700 12px/1.4 inherit; border: 1px solid var(--border); }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.player .prevon { animation-name: fadeIn; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .player .upnext, .player .prevon { animation: none; } }
/* Android app gate: full-screen "get the app" card (per visit / before an episode) and the Ep 2+ gate in the player */
.appgate { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #0a0a0d; padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px); }
.appgate .agbg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(34px) brightness(0.35); transform: scale(1.1); }
.appgate::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(255,45,135,0.22), transparent 60%), linear-gradient(180deg, rgba(10,10,13,0.2), rgba(10,10,13,0.85)); }
.appgate .agin { position: relative; z-index: 1; width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.appgate .agicon { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 12px 40px rgba(255,45,135,0.35); }
.appgate .agposter { width: 46%; max-width: 170px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.12); }
.appgate .agposter img { width: 100%; height: 100%; object-fit: cover; }
.appgate h2 { font-size: 24px; line-height: 1.2; margin: 4px 0 0; text-wrap: balance; }
.appgate p { margin: 0; color: var(--sub); font-size: 15px; line-height: 1.45; }
.appgate .play-badge { margin-top: 6px; }
.appgate .play-badge img { height: 64px; width: auto; }
.appgate .aglink { color: var(--sub); font-weight: 700; font-size: 15px; padding: 10px 18px; text-decoration: underline; text-underline-offset: 3px; }
.appgate small { color: var(--dim); font-size: 10px; opacity: 0.8; }
.ep-grid a.app::after { content: "APP"; position: absolute; top: 4px; right: 4px; font-size: 8px; font-weight: 800; letter-spacing: 0.04em;
  padding: 1px 4px; border-radius: 4px; background: var(--grad); color: #fff; }
/* Season 2 sign-up card (series page, and the finale's end card) */
.s2card { margin: 16px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,45,135,0.16), rgba(255,255,255,0.03)); }
.s2card b { display: block; font-size: 16px; }
.s2card p { margin: 4px 0 10px; color: var(--sub); font-size: 13px; line-height: 1.4; }
.player .nextcard .s2card { margin: 0 0 12px; }
.s2out { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--grad); color: #fff; }
.s2out b { font-size: 16px; }
.s2out span:not(.btn) { flex: 1; min-width: 0; font-size: 13px; opacity: 0.95; }
.s2out .btn { background: rgba(0,0,0,0.3); }
.player .desk-arrows { display: none; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 12px; z-index: 3; }
.player .desk-arrows button { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.12); display: grid; place-items: center; }
.player .desk-arrows button:hover { background: rgba(255,255,255,0.22); }
.player .desk-arrows svg { width: 24px; height: 24px; }

/* sheets (episode list, report, install, purchases) */
.sheet-bg { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.6); display: flex; align-items: flex-end; justify-content: center; animation: bgin 0.2s; }
@keyframes bgin { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 80vh; overflow: auto; background: #15131b; border-radius: 18px 18px 0 0; padding: 18px var(--gutter) calc(var(--safe-b) + 20px); animation: up 0.25s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
.sheet h3 { font-size: 18px; margin-bottom: 4px; }
.sheet .sub { color: var(--sub); font-size: 13px; margin-bottom: 14px; }
.sheet .x { float: right; margin: -6px -6px 0 0; }
.sheet label { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #221f2a; }
.sheet textarea { width: 100%; min-height: 70px; margin: 12px 0; border-radius: 10px; background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 10px; font: inherit; }

/* ad break card */
.brk { position: absolute; inset: 0; z-index: 10; background: rgba(5,4,8,0.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.brk .box { width: 100%; max-width: 360px; text-align: center; }
.brk .ring { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 24px; font-weight: 900; background: conic-gradient(var(--accent) var(--p, 0%), rgba(255,255,255,0.12) 0); }
.brk .ring span { width: 54px; height: 54px; border-radius: 50%; background: #0a0a0d; display: grid; place-items: center; }
.brk h3 { font-size: 20px; }
.brk p { color: var(--sub); font-size: 14px; margin: 8px 0 18px; }
.brk .slot { width: 300px; max-width: 100%; min-height: 250px; margin: 0 auto 14px; background: #111; border-radius: 8px; display: grid; place-items: center; color: var(--dim); font-size: 12px; overflow: hidden; }
.brk .row2 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.brk .ima { position: absolute; inset: 0; }
.brk.preroll .box { position: relative; z-index: 1; }
.brk.preroll.soon { background: rgba(0,0,0,0.35); }
/* "Ad in 3 · then EP 4" pill at the bottom of the player (YouTube style) */
.adsoon { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 64px); z-index: 12;
  background: rgba(10,10,13,0.82); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 14px;
  white-space: nowrap; pointer-events: none; border: 1px solid rgba(255,255,255,0.18); }
.adsoon b { color: var(--accent-2); display: inline-block; min-width: 1ch; text-align: center; }
.adsoon span { font-weight: 600; color: #ddd; }
.brk.preroll.playing { background: #000; padding: 0; }
.brk .skip { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; }
/* side-rail ads on the browsing pages (wide screens only). The rails are fixed at the screen edges; the page content gets
   matching side padding so nothing ever sits under an ad, and the space is reserved before the ad loads. */
.rail { position: fixed; top: 76px; z-index: 15; text-align: center; }
.rail.left { left: 16px; }
.rail.right { right: 16px; }
.rail small { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.rail .box { height: 600px; background: rgba(255,255,255,0.04); border-radius: 6px; overflow: hidden; }
.rail .box .sx, .bx .sx, .brk .slot .sx { display: block; margin: 0 auto; border: 0; max-width: 100%; background: transparent; }
.bx { position: relative; }
.bx[data-ast] { min-height: 0; margin: 0 auto; }
/* an ad must never pass for one of our own cards: a labelled, bordered dark panel set apart with space around it */
.bx.filled { display: block; width: fit-content; max-width: 100%; margin: 44px auto 12px; padding: 26px 14px 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.03); }
.bx.filled::before { content: 'Advertisement'; position: absolute; top: 8px; left: 0; right: 0; text-align: center; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.sxnote { font-size: 12.5px; line-height: 1.45; color: var(--dim); text-align: center; max-width: 300px; margin: 0 auto; }
.sxnote b { color: var(--text, inherit); font-weight: 600; }
.sxnote a { color: inherit; text-decoration: underline; }
.rail .housefill .sxnote { margin-top: 10px; font-size: 11.5px; }
.bx.blocked { padding: 14px; margin-top: 26px; } .bx.blocked::before { content: none; }
.splabel { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.brk .slot { border: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.rail:not(.house) .box { border: 1px solid var(--border); }
.rail:not(.house) > small { letter-spacing: 0.1em; }
.sx.pending { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
.rail .testad { height: 100%; display: grid; place-items: center; color: var(--dim); font-size: 12px; border: 1px dashed var(--border); border-radius: 6px; }
/* house cards in the empty side space while there are no side ads */
.rail .promo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,45,135,0.10), rgba(255,255,255,0.03)); border: 1px solid var(--border); color: var(--text, #fff); text-decoration: none; }
.rail .promo b { font-size: 16px; line-height: 1.2; }
.rail .promo p { margin: 0; color: var(--sub); font-size: 13px; line-height: 1.4; }
.rail .promo small { margin: 0; color: var(--accent-2); }
.rail .promo .mk { border-radius: 12px; }
.rail .pp { width: 100%; aspect-ratio: 9 / 16; max-height: 46vh; border-radius: 10px; overflow: hidden; background: var(--card); }
.rail .pp img { width: 100%; height: 100%; object-fit: cover; }
.rail .promo .btn { width: 100%; }
.rail a.promo:hover { border-color: var(--accent); }
/* ad rail waiting for Google to fill it: the ad spot stays laid out (so Google can fill it) but invisible, and the
   house card shows in its place; once Google marks it "filled", the ad shows and the card goes */
.rail .housefill { display: none; }
.rail.waiting .housefill { display: block; }
.rail.waiting > small { display: none; }
.rail.waiting .box { position: absolute; top: 0; left: 0; opacity: 0; pointer-events: none; background: none; }
body.rails-160 { --rail-space: 200px; }
body.rails-300 { --rail-space: 340px; }
body.rails-160 main, body.rails-300 main, body.rails-160 .top, body.rails-300 .top, body.rails-160 .appbar, body.rails-300 .appbar {
  padding-left: var(--rail-space); padding-right: var(--rail-space);
}
body.rails-160 .install, body.rails-300 .install { left: var(--rail-space); right: var(--rail-space); }

/* Android: "Get the app" banner + card */
.appbar { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 8px) max(10px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); background: linear-gradient(90deg, rgba(255,45,135,0.22), rgba(255,45,135,0.08)); border-bottom: 1px solid var(--border); }
.appbar .ic { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.appbar .t { flex: 1; min-width: 0; font-size: 12px; color: var(--sub); line-height: 1.25; }
.appbar .t b { display: block; color: var(--text); font-size: 14px; }
.appbar .icon-btn { flex: none; width: 34px; height: 34px; }
.play-badge { display: inline-block; flex: none; line-height: 0; }
.play-badge img { width: auto; max-width: none; }
.appbar + .top { padding-top: 0; }
.appcard { text-align: center; display: grid; justify-items: center; gap: 10px; padding-top: 6px; }
.appcard .ic { width: 64px; height: 64px; border-radius: 14px; }
.appcard .sub { margin: 0; }
.appcard .tm { font-size: 10px; color: var(--dim); margin: 0; }
.install.adblock { align-items: flex-start; }
@media (max-width: 360px) { .appbar .t span { display: none; } }

.bx { margin: 26px auto 0; min-height: 100px; text-align: center; }

/* install banner */
.install { position: fixed; left: 10px; right: 10px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 40; background: #1b1922; border: 1px solid var(--border); border-radius: 14px; padding: 12px 12px 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); max-width: 520px; margin: 0 auto; }
.install img { width: 40px; height: 40px; border-radius: 9px; }
.install div { flex: 1; font-size: 13px; color: var(--sub); }
.install b { color: var(--text); display: block; font-size: 14px; }
.ios-share { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }

/* text pages (privacy, more, SEO show pages) */
.page { max-width: 720px; }
.page h1 { font-size: 28px; margin: 10px 0 14px; }
.page h2 { font-size: 18px; margin: 24px 0 8px; }
.page p, .page li { color: var(--sub); }
.page a { color: var(--text); text-decoration: underline; }
.page .menu a { text-decoration: none; }
.menu a, .menu button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 0; border-bottom: 1px solid #1d1b24; font-weight: 700; text-align: left; }
.menu svg { width: 22px; height: 22px; color: var(--sub); }
.menu .r { margin-left: auto; color: var(--dim); font-weight: 400; font-size: 13px; }
.plan { border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 12px 0; background: var(--card); }
.plan b { font-size: 17px; }
.plan .price { float: right; font-weight: 900; font-size: 17px; }
.plan p { margin: 6px 0 12px; font-size: 13px; color: var(--sub); }
footer.foot { color: var(--dim); font-size: 12px; text-align: center; padding: 34px 0 10px; }
footer.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; }
footer.foot a { margin: 0; padding: 14px 6px; display: inline-block; }
footer.foot small { display: block; margin-top: 8px; font-size: 11px; color: var(--dim); opacity: 0.8; }

/* no-JS / SEO content inside show pages before the app takes over */
.seo-eps { padding-left: 18px; color: var(--sub); }

/* ── bigger screens ─────────────────────────────────────────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 14px; }
  .row .card { flex-basis: 23%; }
  .ep-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .hero { aspect-ratio: 21 / 9; }
  .hero h2 { font-size: 34px; }
  .hero .txt { left: 28px; bottom: 26px; max-width: 520px; }
  .hero.poster-hero { aspect-ratio: 21 / 9; }
  .hero.poster-hero .txt { max-width: min(520px, 50%); }
  .hero .hposter { top: 18px; bottom: 18px; right: 28px; }
  .show-head .poster { flex-basis: 180px; }
  .show-head h1 { font-size: 30px; }
}
@media (min-width: 900px) {
  :root { --gutter: 28px; }
  .nav { display: none; }
  main { padding-bottom: 40px; }
  .top-links { display: flex; }
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .row .card { flex-basis: 16%; }
  .ep-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .install { bottom: 20px; }
  .player .desk-arrows { display: flex; }
  .player .side { right: max(10px, calc(50% - (100vh * 9 / 32) - 70px)); }
  .player .desk-arrows { right: max(24px, calc(50% - (100vh * 9 / 32) - 150px)); }
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 18px; }
  .actions { max-width: 460px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* landing: big "Tap for sound" (muted autoplay) and "Play Part N" (no autoplay) - 2026-11-20 TikTok ad fix */
.player .soundon { position: absolute; z-index: 6; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 0; border-radius: 999px; background: rgba(0,0,0,.62); color: #fff; font: inherit; font-size: 17px; font-weight: 800;
  box-shadow: 0 6px 24px rgba(0,0,0,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; animation: soundpulse 1.6s ease-in-out infinite; }
.player .soundon svg { width: 24px; height: 24px; }
@keyframes soundpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,45,135,.55), 0 6px 24px rgba(0,0,0,.4); } 50% { box-shadow: 0 0 0 12px rgba(255,45,135,0), 0 6px 24px rgba(0,0,0,.4); } }
.player .startcov { position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 0; background: rgba(0,0,0,.35); color: #fff; font: inherit; cursor: pointer; }
.player .startcov .pl { width: 96px; height: 96px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(255,45,135,.45); animation: soundpulse 1.6s ease-in-out infinite; }
.player .startcov .pl svg { width: 44px; height: 44px; margin-left: 5px; }
.player .startcov b { font-size: 22px; font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.player .startcov small { font-size: 15px; opacity: .9; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) { .player .soundon, .player .startcov .pl { animation: none; } }

/* website subscriptions: paywall in the player, plan buttons, sign-in form, account box */
.paywall { position: absolute; inset: 0; z-index: 60; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; padding: 20px 16px; background: rgba(10,10,13,0.9); }
.paywall .pwbg { position: fixed; inset: -60px; background-size: cover; background-position: center; filter: blur(34px) brightness(0.3); transform: scale(1.1); z-index: -1; }
.paywall .pwin { position: relative; width: 100%; max-width: 400px; margin: auto; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.paywall h2 { font-size: 24px; line-height: 1.2; margin: 0; text-wrap: balance; }
.paywall p, .acctsheet p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.45; }
.pwplans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pwplan { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 16px 8px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.pwplan b { font-size: 16px; } .pwplan span { font-size: 13px; color: var(--sub); }
.pwplan.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pwplan em { font-style: normal; font-size: 10.5px; color: var(--dim); line-height: 1.25; padding: 0 4px; }
.pwplan i { position: absolute; top: -9px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 99px; }
.pwplan:disabled { opacity: .55; }
.pwtest { font-size: 12px; font-weight: 700; color: #ffd166; background: rgba(255,209,102,0.1); border: 1px solid rgba(255,209,102,0.4); border-radius: 10px; padding: 8px 10px; }
.pwerr { color: #ff8a9a !important; min-height: 0; } .pwerr:empty { display: none; }
.pwsigned button, .aalt button { color: var(--text); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-weight: 700; padding: 0; }
.pwfine { font-size: 11.5px !important; color: var(--dim) !important; } .pwfine a { text-decoration: underline; }
.pwor { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin-top: 4px; }
.pwor::before, .pwor::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pwapps { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pwios { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; height: 48px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--border); background: #000; color: var(--sub); font-size: 13px; font-weight: 700; line-height: 1.1; opacity: .75; }
.pwios small { font-size: 10px; font-weight: 600; color: var(--dim); }
.paywall .aglink { color: var(--sub); font-weight: 700; font-size: 15px; padding: 10px 18px; text-decoration: underline; text-underline-offset: 3px; margin: 0 auto; }
.authf { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.authf label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--sub); }
.authf input { height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg, #0d0d10); color: var(--text); padding: 0 12px; font: inherit; font-size: 16px; }
.authf .aerr { color: #ff8a9a; font-size: 13px; margin: 0; } .authf .aerr:empty { display: none; }
.authf .aalt { text-align: center; font-size: 13px; }
.acctsheet { display: flex; flex-direction: column; gap: 12px; }
.acctsheet h3 { margin: 0; font-size: 20px; }
.plan .tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; background: rgba(255,209,102,0.15); color: #ffd166; padding: 2px 7px; border-radius: 99px; vertical-align: middle; }
.plan .pwerr { margin: 8px 0 0; font-size: 13px; }