:root {
  --bg: #0e0f12;
  --panel: #17191e;
  --line: #2a2d35;
  --text: #eceef2;
  --muted: #9aa0ad;
  --gold: #ffc400;
  --red: #ff6b6b;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.brand { font-size: 18px; letter-spacing: 0.02em; }
.brand b { color: var(--gold); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.panel { display: flex; flex-direction: column; gap: 16px; }
.panel[hidden] { display: none; }
#dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 320px; border: 2px dashed var(--line); border-radius: 12px; background: var(--panel); cursor: pointer;
  text-align: center; padding: 24px;
}
#dropzone.over { border-color: var(--gold); }
#dropzone strong { font-size: 22px; }
#dropzone span, .hint, .status { color: var(--muted); }
.hint[hidden] { display: none; }
.status.error { color: var(--red); }
#stage { position: relative; width: 100%; border-radius: 8px; overflow: hidden; background: #000; }
#stage video { display: block; width: 100%; height: auto; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#click-layer { position: absolute; inset: 0; cursor: crosshair; }
#click-layer.off { cursor: default; }
#picking, #tracking { display: flex; flex-direction: column; gap: 16px; }
#picking[hidden], #tracking[hidden] { display: none; }
#marker {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 3px solid var(--gold); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6); pointer-events: none;
}
.controls { display: flex; align-items: center; gap: 8px; }
.controls input[type="range"] { flex: 1; accent-color: var(--gold); }
.mono { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 120px; text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trim button { padding: 6px 12px; }
.trim .mono { min-width: 0; text-align: left; }
button, .button {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 16px; cursor: pointer; text-decoration: none;
}
.controls button { padding: 6px 12px; min-width: 40px; }
button:disabled { opacity: 0.4; cursor: default; }
.primary { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 600; }
.link { background: none; border: none; color: var(--muted); padding: 0; }
header nav { display: flex; align-items: center; gap: 16px; }
.who { color: var(--muted); font-size: 14px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signin { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; margin: 48px auto 0; }
.signin h1 { font-size: 22px; margin: 0 0 4px; }
.signin label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.signin label[hidden] { display: none; }
.signin input {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px;
}
.signin input:focus { outline: none; border-color: var(--gold); }
.signin .link { align-self: flex-start; }
