/* The shared film player: start screen, control bar and status line.
   Each film sets these tokens on :root, and styles its own title:
   --bg, --ink, --ink-2 (secondary text), --ink-3 (hover borders), --line (borders),
   --accent (focus ring, progress), --btn-ink (text on the primary button), --btn-hover, --sans */
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow: hidden; }
#film { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: var(--bg); }

#gate { position: fixed; inset: 0; display: grid; place-items: center; padding-inline: 20px; }
.gate-inner { max-width: 34rem; display: grid; gap: 1.4rem; justify-items: center; text-align: center; }
#gate h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }
.btn { font-family: var(--sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .8rem 1.3rem; cursor: pointer; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--btn-ink); border-color: var(--ink); }
.btn.primary:hover { background: var(--btn-hover); }
.btn:focus-visible, .icon:focus-visible, #scrub:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

#bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .9rem;
  padding: .7rem max(16px, 2vw) calc(.8rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(5,6,10,.85), rgba(5,6,10,0)); transition: opacity .6s ease; font-family: var(--sans); }
#bar.idle { opacity: 0; }
.icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer; padding: 0; }
.icon svg { width: 14px; height: 14px; fill: currentColor; }
#time { font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
#scrub { flex: 1; min-width: 60px; accent-color: var(--accent); }
#status { position: fixed; right: max(16px, 2vw); bottom: calc(4.2rem + env(safe-area-inset-bottom, 0px)); margin: 0;
  font-family: var(--sans); font-size: .74rem; color: var(--ink-2); text-align: right; max-width: 70vw; transition: opacity .6s; }
#bar.idle ~ #status { opacity: 0; }
@media (max-width: 520px) { #time { font-size: .7rem; } }
