:root { color-scheme: dark; --bg:#0b0d10; --fg:#e8eaed; --muted:#8a9099; --accent:#4f8cff; --err:#ff6b6b; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; background:var(--bg); color:var(--fg); font:15px/1.4 system-ui, sans-serif; }
main { max-width: 1100px; margin: 0 auto; padding: env(safe-area-inset-top) 12px 12px; }
h1 { font-weight:600; letter-spacing:.02em; }
#login { display:grid; place-items:center; min-height:80vh; text-align:center; }
#login form { display:flex; flex-direction:column; gap:10px; width:min(320px, 90vw); }
input, button { font:inherit; padding:10px 12px; border-radius:8px; border:1px solid #2a2f37; background:#14181d; color:var(--fg); }
button { cursor:pointer; background:#1b2230; }
button:hover { border-color:var(--accent); }
button.link { background:none; border:none; color:var(--muted); padding:4px 0; }
.error { color:var(--err); min-height:1.4em; margin:0; }
header { display:flex; align-items:center; gap:10px; padding:12px 0; }
header .title { font-weight:600; }
header .link { margin-left:auto; }
.pill { font-size:12px; padding:2px 8px; border-radius:99px; background:#222831; color:var(--muted); }
.pill.live { background:#3b0d0d; color:#ff8a8a; }
.stage { position:relative; background:#000; border-radius:10px; overflow:hidden; aspect-ratio:16/9; }
video { width:100%; height:100%; object-fit:contain; display:block; }
.overlay { position:absolute; inset:0; display:grid; place-items:center; color:var(--muted); pointer-events:none; }
.controls { display:flex; gap:8px; align-items:center; padding:10px 0; }
.stats { margin-left:auto; color:var(--muted); font:12px ui-monospace, monospace; }
[hidden] { display: none !important; }
.sep { width: 12px; }
.ptz { display:flex; flex-direction:column; align-items:center; gap:6px; padding:6px 0 18px; }
.ptz div { display:flex; gap:6px; }
.ptz button { width:52px; height:44px; font-size:18px; }
.seg { display:inline-flex; }
.seg button { border-radius:0; margin-left:-1px; }
.seg button:first-child { border-radius:8px 0 0 8px; }
.seg button:last-child { border-radius:0 8px 8px 0; }
.seg button.on, button.on { border-color: var(--accent); color: var(--accent); }
.pill.motion { background:#3b2a0d; color:#ffc46b; }
#talk.active { background:#3b0d0d; border-color:#ff6b6b; color:#ffb3b3; }
.timeline-wrap { padding: 4px 0 8px; }
.timeline-head { display:flex; gap:10px; align-items:center; color:var(--muted); font-size:13px; padding-bottom:6px; }
.timeline-head .link { margin-left:auto; }
.timeline { position:relative; height:34px; background:#14181d; border:1px solid #2a2f37; border-radius:8px; overflow:hidden; cursor:pointer; }
.timeline .span { position:absolute; top:6px; bottom:6px; background:#2e4f86; border-radius:3px; }
.timeline .mark { position:absolute; top:0; bottom:0; width:3px; background:#ff6b6b; opacity:.85; }
.timeline .playhead { position:absolute; top:0; bottom:0; width:2px; background:#fff; }
