:root {
  --bg: #0a0d18; --card: #111526; --line: #232942; --text: #e9ecf5; --muted: #98a0b8;
  --orange: #fd7119; --green: #34d399; --red: #f87171;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.55 "DM Sans", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
body.center { align-items: center; justify-content: center; padding: 24px; }
h1, h2, .brand { font-family: "Archivo Black", "DM Sans", sans-serif; font-weight: 400; letter-spacing: 0; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
a { color: var(--orange); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--red); min-height: 1.4em; margin: 6px 0; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.brand { color: var(--text); text-decoration: none; font-size: 20px; }
.brand span { font-family: "DM Sans", sans-serif; font-size: 14px; color: var(--muted); margin-left: 10px; }
#nav { display: flex; gap: 8px; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 20px 48px; flex: 1; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 14px 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.gate { width: 100%; max-width: 420px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.stack > * + * { margin-top: 16px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 6px; }
input, select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit; }
input:focus, select:focus, button:focus-visible, .opt:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.check input { width: auto; }
.btn { display: inline-block; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; font: 500 15px "DM Sans", sans-serif; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #14080a; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.on { border-color: var(--orange); color: var(--orange); }
form .btn.primary { margin-top: 14px; width: 100%; }
.facts { list-style: none; padding: 0; margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.facts li { padding: 3px 0; }
.facts b { color: var(--text); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.timer { font: 700 20px ui-monospace, Menlo, monospace; }
.timer.low { color: var(--red); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.progress i { display: block; height: 100%; background: var(--orange); }
.qtext { white-space: pre-wrap; font-size: 17px; margin-bottom: 18px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.opt:hover { border-color: var(--muted); }
.opt input { width: auto; margin-top: 4px; accent-color: var(--orange); }
.opt.sel { border-color: var(--orange); }
.opt.good { border-color: var(--green); background: rgba(52, 211, 153, .08); }
.opt.bad { border-color: var(--red); background: rgba(248, 113, 113, .08); }
.opt.locked { cursor: default; }
.key { font-weight: 700; color: var(--muted); }
.expl { border-left: 3px solid var(--green); padding: 4px 0 4px 14px; margin: 16px 0; color: var(--muted); white-space: pre-wrap; }
.actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.actions div { display: flex; gap: 10px; flex-wrap: wrap; }
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-top: 18px; }
.navgrid button { background: var(--bg); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 7px 0; font: 500 13px "DM Sans", sans-serif; cursor: pointer; }
.navgrid .done { color: var(--text); border-color: var(--muted); }
.navgrid .flag { border-color: var(--orange); color: var(--orange); }
.navgrid .cur { background: var(--orange); border-color: var(--orange); color: #14080a; }
.navgrid .ok { border-color: var(--green); color: var(--green); }
.navgrid .ko { border-color: var(--red); color: var(--red); }
.score { font-family: "Archivo Black", sans-serif; font-size: 56px; line-height: 1; margin: 6px 0 10px; }
.pass { color: var(--green); } .fail { color: var(--red); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 90px; }
.meter i { display: block; height: 100%; background: var(--green); }
.meter i.weak { background: var(--red); }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 24px; } .brand span { display: none; } }
[hidden] { display: none !important; }
.cam-preview { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; margin-bottom: 10px; }
.cam-preview.ok { border-color: var(--green); }
.rules { list-style: none; padding: 0; margin: 0; }
.rules li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.rules li:last-child { border-bottom: 0; }
.rules b { display: block; }
.startrow .actions { align-items: center; margin-top: 0; }
.chip { display: flex; align-items: center; gap: 10px; }
.chip-cam { position: relative; width: 56px; height: 40px; border-radius: 6px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.chip-video { width: 100%; height: 100%; object-fit: cover; }
.dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 2px #000; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--orange); } .dot.bad { background: var(--red); }
.badge { font-size: 12px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.badge.warn { border-color: var(--orange); color: var(--orange); } .badge.bad { border-color: var(--red); color: var(--red); }
.banner { border: 1px solid var(--orange); background: rgba(253, 113, 25, .08); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 15px; }
.confirm { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; border-color: var(--orange); }
.confirm div { display: flex; gap: 10px; }
.mask { position: fixed; inset: 0; background: var(--bg); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.watermark { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 60px 80px; opacity: .05; transform: rotate(-18deg) scale(1.3); }
.watermark span { font: 14px ui-monospace, Menlo, monospace; white-space: nowrap; }
.warn-text { color: var(--orange); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.photos figure { margin: 0; } .photos img { width: 100%; border-radius: 6px; border: 1px solid var(--line); display: block; }
