:root {
  --bg: #f4f4f2; --fg: #1b1b1b; --muted: #666; --panel: #ffffff; --accent: #d93a2b;
  --track: #d7d7d2; --fill: #1b1b1b; --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0f10; --fg: #ececec; --muted: #9a9a9a; --panel: #1a1a1c; --track: #333; --fill: #ececec; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.app { max-width: 960px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.stage { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; }
@media (max-width: 600px) and (orientation: portrait) { .stage { aspect-ratio: auto; height: 56vw; min-height: 200px; } }
video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.55); text-align: center; padding: 16px; }
.overlay[hidden] { display: none; }
.overlay p { margin: 0; max-width: 32ch; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin 1s linear infinite; }
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge { font: 600 12px/1 system-ui, sans-serif; letter-spacing: .04em; padding: 6px 8px; border-radius: 6px;
  background: rgba(0,0,0,.6); color: #fff; }
.badge[data-state="on"] { background: var(--accent); }
.badge[data-state="off"] { opacity: .7; }
.badge[hidden] { display: none; }
.controls { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--panel); }
.seek input { width: 100%; height: 44px; margin: 0; accent-color: var(--accent); }
.seek-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -4px; }
.buttons { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
button { min-width: 48px; min-height: 44px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--track);
  background: transparent; color: var(--fg); font: inherit; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#goLive { margin-left: auto; }
.meta { margin: 10px 0 0; font-size: 13px; color: var(--muted); min-height: 1.4em; }
