[hidden] { display: none !important; }
:root {
  --bg: #0c0e12;
  --ink: #f2f4f7;
  --muted: #9aa3b2;
  --pill: rgba(255, 255, 255, 0.08);
  --pill-hover: rgba(255, 255, 255, 0.14);
  --accent: #f2f4f7;
  --controls: 46px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }

#stage { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
/* the phone screen: 720 x 1560, as large as the viewport allows above the button row */
#screen {
  position: relative;
  height: min(calc(100dvh - var(--controls) - 6px), calc(100vw * 1560 / 720));
  aspect-ratio: 720 / 1560;
  border-radius: clamp(10px, 3.2vh, 26px);
  overflow: hidden;
  background: #000;
}
@supports not (height: 100dvh) {
  #screen { height: min(calc(100vh - var(--controls) - 6px), calc(100vw * 1560 / 720)); }
}
#video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }

#cover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(120% 70% at 50% 20%, #1d2330 0%, #0f1218 70%);
  padding: 9%;
  transition: opacity .35s ease;
}
#cover.gone { opacity: 0; pointer-events: none; }
.cover-inner { max-width: 30ch; }
.eyebrow { margin: 0 0 .4em; font-size: .78em; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0 0 .5em; font-size: 1.7em; line-height: 1.15; font-weight: 650; }
.lede { margin: 0 0 1.6em; color: #c7cdd8; }
#start {
  font: inherit; font-weight: 600; font-size: 1.02em; color: #0c0e12; background: var(--accent);
  border: 0; border-radius: 999px; padding: .85em 1.6em; cursor: pointer; min-height: 48px;
}
#start:hover { background: #fff; }
#start:focus-visible, #controls button:focus-visible { outline: 2px solid #8ab4ff; outline-offset: 3px; }
#start[disabled] { opacity: .55; cursor: default; }
#spinner { width: 28px; height: 28px; margin: 1.4em auto 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #spinner { animation-duration: 3s; } #cover { transition: none; } }

#notice {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: rgba(12, 14, 18, .86); color: var(--ink); border-radius: 999px; padding: .45em 1em;
  font-size: .86em; white-space: nowrap; pointer-events: none; backdrop-filter: blur(6px);
}

#controls { height: var(--controls); margin-top: 6px; display: flex; gap: 10px; align-items: center; justify-content: center; }
#controls button {
  font: inherit; color: var(--ink); background: var(--pill); border: 0; border-radius: 999px; cursor: pointer;
  height: 40px; min-width: 52px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
}
#controls button:hover { background: var(--pill-hover); }
#controls button[disabled] { opacity: .35; cursor: default; }
#controls svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#clip { font-weight: 600; font-size: .9em; }

body.deny { display: flex; align-items: center; justify-content: center; text-align: center; padding: 2em; height: 100%; color: var(--muted); }
body.deny ul.plain { list-style: none; padding: 0; }
body.deny a { color: inherit; }
