:root { font-family: Inter,"Segoe UI",sans-serif; color:#e8eff0; background:#0b1216; color-scheme:dark; --line:#25363e; --muted:#8da5ae; --accent:#82e8c3; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
main { max-width:1920px; margin:auto; padding:18px 24px; }
button,input,select { font:inherit; }
button { cursor:pointer; border:0; border-radius:8px; padding:10px 16px; background:var(--accent); color:#0c3025; font-size:12px; font-weight:700; }
button.secondary { background:#22343c; color:#d3e2e7; }
button:disabled { opacity:.4; cursor:default; }
button:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
h1,h2,h3,p { margin:0; }
p { font-size:12px; line-height:1.6; color:var(--muted); }
h2 { font-size:14px; } h3 { font-size:12px; }
.topbar,.header-actions,.brand,.panel-heading,.panel-heading>div,.utility-row { display:flex; align-items:center; }
.topbar { justify-content:space-between; gap:20px; margin-bottom:18px; }
.brand { gap:12px; } .brand h1 { font-size:22px; letter-spacing:-.6px; margin-bottom:2px; }
.brand-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:var(--accent); color:#15392f; font-size:24px; font-weight:900; }
.eyebrow { color:var(--accent); font-size:10px; font-weight:700; letter-spacing:1.3px; }
.header-actions { gap:8px; } .badge { font-size:11px; border:1px solid var(--line); border-radius:24px; padding:8px 12px; color:var(--muted); }
.dashboard { display:grid; grid-template-columns:minmax(0,1fr) clamp(300px,25vw,360px); gap:16px; height:calc(100dvh - 160px); min-height:570px; }
.game-card { background:#101c22; border:1px solid var(--line); border-radius:16px; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.panel-heading { justify-content:space-between; gap:10px; } .panel-heading>div { gap:10px; }
.game-card>.panel-heading { padding:16px 20px; border-bottom:1px solid var(--line); }
.live-dot { width:6px; height:6px; background:var(--accent); border-radius:50%; }
.muted { color:var(--muted); font-size:10px; }
.game-stage { flex:1; min-height:0; position:relative; display:grid; place-items:center; background:#070e12; container-type:size; }
#godot-frame { display:block; width:min(100cqw,200cqh); height:auto; aspect-ratio:2 / 1; border:0; background:#000; }
.game-placeholder { text-align:center; padding:24px; } .game-placeholder h2 { font-size:clamp(18px,2vw,28px); margin:16px 0 10px; letter-spacing:-.6px; } .stage-mark { display:block; color:#233e46; font-size:80px; margin-top:16px; }
.game-stage:has(#godot-frame:not([hidden])) .game-placeholder { display:none; }
.game-bottom { padding:16px 20px; border-top:1px solid var(--line); }
.text-button { color:var(--muted); background:none; padding:4px 0; font-size:11px; }
#count-list { color:var(--accent); font-size:14px; font-weight:600; margin:10px 0 5px; }
#count-status,#count-detail { font-size:11px; }
.count-help { margin-top:8px; color:var(--muted); font-size:10px; } summary { cursor:pointer; } .count-help p { padding-top:6px; font-size:11px; }
.side-panel { display:flex; flex-direction:column; gap:12px; overflow:auto; min-width:0; scrollbar-width:thin; }
.camera-card,.analysis-card { background:#121f26; border:1px solid var(--line); border-radius:14px; }
.camera-card { overflow:hidden; flex-shrink:0; } .camera-card>.panel-heading { padding:10px 14px; } #fps { color:var(--accent); font-size:10px; }
.camera { position:relative; height:clamp(145px,23dvh,230px); display:grid; place-items:center; background:#080f13; }
video,canvas { position:absolute; width:100%; height:100%; object-fit:contain; transform:scaleX(-1); }
#placeholder { color:#78919c; text-align:center; font-size:11px; padding:14px; }
.camera-label { position:absolute; bottom:8px; left:10px; font-size:8px; letter-spacing:.6px; color:#b8d1d7; background:#081218b8; padding:4px 6px; border-radius:4px; }
.analysis-card { padding:16px; flex:1; }
#label { font-size:21px; letter-spacing:-.6px; margin:8px 0 6px; }
#raw-prediction { color:#b7c9ce; font-size:11px; }
#status { font-size:10px; line-height:1.45; margin-top:5px; }
progress { width:100%; height:4px; accent-color:var(--accent); margin-top:8px; display:block; }
.stats { display:flex; gap:26px; margin:12px 0; padding-bottom:12px; border-bottom:1px solid var(--line); }
.stats span { display:block; color:var(--muted); font-size:10px; } .stats strong { display:block; margin-top:4px; font-size:21px; }
.class-row { margin:9px 0; } .class-title { display:flex; justify-content:space-between; gap:8px; font-size:10px; color:#abc1ca; }
.track { height:3px; background:#293e47; border-radius:4px; margin-top:5px; } .fill { height:100%; width:0; background:var(--accent); transition:width .2s; }
.note,.empty-scores { font-size:10px; color:#7d98a3; margin-top:12px; }
.utility-row { justify-content:space-between; gap:16px; margin:12px 0; font-size:10px; color:#76909b; }
.record-panel { border:1px solid var(--line); border-radius:10px; background:#101b21; }
.record-panel>summary { padding:12px 16px; font-size:12px; } .record-panel>summary>span { color:var(--muted); font-size:10px; margin-left:10px; }
.record-content { padding:4px 16px 16px; } .record-content h2 { margin-bottom:8px; }
.record-fields { display:flex; gap:14px; flex-wrap:wrap; margin-top:12px; } .record-fields label { font-size:11px; color:var(--muted); }
.record-fields input,.record-fields select { display:block; margin-top:6px; padding:8px; border-radius:6px; border:1px solid #3c535d; background:#1e3038; color:#e1ecef; max-width:100%; }
.record-fields input[type=number] { width:85px; } .controls { display:flex; gap:8px; padding:14px 0; flex-wrap:wrap; } #record-list { font-size:12px; padding-left:20px; } #record-list li { margin:8px 0; } #record-list button { padding:4px 8px; font-size:10px; }
@media (max-width:900px) {
 main { padding:14px; } .dashboard { height:auto; min-height:0; grid-template-columns:1fr; }
 .game-stage { flex:none; aspect-ratio:2 / 1; container-type:normal; } #godot-frame { width:100%; }
 .side-panel { display:grid; grid-template-columns:1fr 1fr; overflow:visible; align-items:start; }
 .camera { height:auto; aspect-ratio:4/3; } .game-placeholder .stage-mark { display:none; }
}
@media (max-width:540px) {
 .topbar { flex-wrap:wrap; gap:12px; } .brand h1 { font-size:20px; } .header-actions { width:100%; } .header-actions .badge { margin-right:auto; }
 .side-panel { grid-template-columns:1fr; } .game-card>.panel-heading { padding:12px; } .game-card>.panel-heading .muted { display:none; }
 .game-bottom { padding:12px; } .utility-row { align-items:flex-start; flex-direction:column; gap:4px; } .record-panel>summary>span { display:none; }
}
@media (min-width:901px) and (max-height:800px) {
 .camera { height:130px; } .side-panel { gap:8px; } .analysis-card { padding:12px; }
 #label { font-size:18px; margin:6px 0 4px; } #status { font-size:9px; margin-top:4px; }
 .stats { margin:8px 0; padding-bottom:8px; } .stats strong { font-size:18px; }
 .class-row { margin:6px 0; } .track { margin-top:3px; } .note { font-size:9px; margin-top:8px; }
}
