/* Always dark: it's a film screen. System fonts only, so the package makes no font requests. */
:root {
  --bg: #000; --card: #15161b; --panel: rgba(12, 14, 20, .84); --line: rgba(255,255,255,.14);
  --text: #f2f4f8; --muted: #a9b1c4; --air: #ff4b3a; --accent: #3fe7dd;
  --head: "Arial Black", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --bar-top: calc(10px + var(--safe-top));   /* moved down to TikTok's menu button row by app.js */
  --bar-h: 36px;
  --bar-right: 14px;                          /* widened past TikTok's menu button by app.js */
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.45 var(--body); }
h1, h2, h3 { margin: 0; font-family: var(--head); text-wrap: balance; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- home ---------- */
.home { max-width: 520px; margin: 0 auto; padding: calc(var(--bar-top) + var(--bar-h) + 8px) 16px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.hero { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; background: #000 center 30% / cover; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; gap: 10px; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0) 25%, rgba(0,0,0,.92)); }
.hero > * { position: relative; }
.hero-top { display: flex; gap: 8px; align-items: center; }
.hero h1 { font-size: 2.6rem; line-height: .95; letter-spacing: -.01em; }
.hero p { margin: 0; color: #d6dbe6; max-width: 36ch; }
.onair { font: 600 .68rem var(--mono); letter-spacing: .16em; background: var(--air); color: #fff; padding: 4px 8px; border-radius: 3px; }
.ai { font: 600 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.14); border: 1px solid var(--line); padding: 3px 7px; border-radius: 3px; }
.sec { font: 600 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.eps { display: flex; flex-direction: column; gap: 10px; }
.ep { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; }
.ep img, .ep .blank { width: 64px; height: 86px; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.ep .t { flex: 1; min-width: 0; }
.ep b { display: block; font-weight: 700; }
.ep small { color: var(--muted); font-size: .85rem; display: block; }
.tag { font: 600 .68rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tag.done { color: var(--accent); }
.ep.soon { opacity: .5; cursor: default; }
.go { color: var(--air); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.go.lock { color: var(--accent); }
footer { color: var(--muted); font-size: .78rem; text-align: center; }
footer a { color: inherit; }

/* ---------- player ---------- */
.stage { position: fixed; inset: 0; background: #000; overflow: hidden; }
.ve { position: absolute; inset: 0; }
.ve video { object-fit: cover; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: opacity .25s; }
.poster.off { opacity: 0; pointer-events: none; }
.tap { position: absolute; inset: 0; z-index: 3; }
.paused, .buffer { position: absolute; inset: 0; z-index: 4; display: none; place-items: center; pointer-events: none; }
.paused.on, .buffer.on { display: grid; }
.paused span { width: 72px; height: 72px; border-radius: 50%; background: rgba(0,0,0,.5); display: grid; place-items: center; border: 1px solid var(--line); }
.buffer i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.top { position: absolute; left: 0; right: 0; top: 0; z-index: 7; display: flex; align-items: center; gap: 10px; padding: var(--bar-top) var(--bar-right) 10px 10px; min-height: calc(var(--bar-top) + var(--bar-h) + 10px); background: linear-gradient(#000b, #0000); pointer-events: none; }
.top > * { pointer-events: auto; }
.back { width: var(--bar-h); height: var(--bar-h); border-radius: 50%; border: 1px solid var(--line); background: rgba(0,0,0,.45); display: grid; place-items: center; cursor: pointer; flex: none; }
.ttl { font: 800 .82rem var(--head); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes-btn { margin-left: auto; background: rgba(0,0,0,.45); border: 1px solid var(--line); border-radius: 999px; height: var(--bar-h); padding: 0 12px; font-size: .82rem; cursor: pointer; flex: none; }
.notes-btn b { color: var(--accent); }

.sheet { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 24px 18px calc(28px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.55) 35%, rgba(0,0,0,.93)); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet.on { opacity: 1; pointer-events: auto; }
.sheet.center { justify-content: center; text-align: center; align-items: center; }
.kicker { font: 600 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.sheet h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); line-height: .95; }
.sheet h2 { font-size: 1.3rem; line-height: 1.15; }
.sheet p { margin: 0; color: var(--muted); max-width: 34ch; }
.big { background: var(--air); color: #fff; border: 0; border-radius: 12px; padding: 14px 22px; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 10px 30px rgba(255,75,58,.35); }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; cursor: pointer; color: var(--text); }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; transition: border-color .15s, transform .15s; }
.opt:active { transform: scale(.98); border-color: var(--air); }
.opt img { width: 54px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.opt .who { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 800 1.1rem var(--head); background: #1d2230; border: 1px solid var(--line); }
.opt b { display: block; font-weight: 700; }
.opt span { color: var(--muted); font-size: .88rem; }
.lock-opts { width: 100%; max-width: 360px; }
.lock-opts button { width: 100%; }
.lock-msg { min-height: 1.4em; color: var(--accent) !important; font-size: .9rem; }
.timer { height: 3px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--accent); width: 100%; }

.notes { position: absolute; z-index: 9; left: 12px; right: 12px; top: calc(var(--bar-top) + var(--bar-h) + 10px); background: rgba(14,16,22,.95); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: none; }
.notes.on { display: block; }
.notes h3 { margin: 0 0 8px; font: 600 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.notes ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.notes li.empty { color: var(--muted); list-style: none; margin-left: -20px; }

.toast { position: absolute; z-index: 10; left: 50%; top: calc(var(--bar-top) + var(--bar-h) + 16px); transform: translate(-50%, -10px); background: var(--accent); color: #041416; font-weight: 700; font-size: .9rem; padding: 8px 14px; border-radius: 999px; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.verdict { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-align: left; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }
.verdict .small { color: var(--muted); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* Wide screens (website on a computer): keep the 9:16 film in a centered column instead of cropping it. */
@media (min-aspect-ratio: 3/4) { .stage { left: 50%; right: auto; width: min(100vw, calc(100vh * 9 / 16)); transform: translateX(-50%); } }
.restore { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.restore label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.restore input { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.restore input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
