* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 16px/1.45 system-ui, sans-serif; background: #f1f5f9; color: #0f172a; }
.bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #0f172a; color: #fff; }
.badge { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: #334155; }
.badge.on { background: #15803d; } .badge.off { background: #b45309; }
main { padding: 16px; max-width: 640px; margin: 0 auto; }
h2 { font-size: 20px; margin: 4px 0 12px; } h3 { font-size: 16px; margin: 0 0 8px; }
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.muted { color: #64748b; font-size: 14px; }
.error { color: #b91c1c; font-size: 14px; }
.ok { color: #15803d; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 12px; font: inherit; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
textarea { min-height: 72px; }
button { width: 100%; padding: 14px; font: inherit; font-weight: 600; border: 0; border-radius: 10px;
  background: #0f172a; color: #fff; margin-top: 10px; }
button.primary { background: #f59e0b; color: #0f172a; }
button.ghost { background: #e2e8f0; color: #0f172a; }
button:disabled { opacity: .5; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 0; }
.checks input { width: 22px; height: 22px; }
video, canvas { display: block; max-width: 100%; max-height: 68vh; margin: 0 auto; border-radius: 8px; background: #000; }
video { width: 100%; object-fit: contain; }
canvas { width: auto; height: auto; touch-action: none; }
.hint { position: sticky; top: 52px; z-index: 4; margin: 8px 0; padding: 10px 12px; border-radius: 8px;
  background: #0f172a; color: #fff; font-weight: 700; font-size: 17px; }
.help { margin: 8px 0 12px; padding: 10px 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; }
.help summary { font-weight: 700; }
.help svg { width: 100%; max-width: 320px; display: block; margin: 8px auto; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #e2e8f0; }
.item:first-of-type { border-top: 0; }
.item button { width: auto; margin: 0; padding: 10px 14px; }
.big { font-size: 22px; font-weight: 700; }
a.link { display: block; text-align: center; padding: 12px; color: #0f172a; font-weight: 600; }
.item button.primary { background: #f59e0b; color: #0f172a; }
.card.alert { border: 2px solid #dc2626; background: #fef2f2; }
.cities { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cities button { width: auto; margin: 0; padding: 6px 12px; font-size: 14px; font-weight: 600; background: #e2e8f0; color: #0f172a; border-radius: 999px; }
.cities button.active { background: #0f172a; color: #fff; }
