:root { --bg:#0b0e17; --panel:#121729; --line:#232b45; --text:#dfe6ff; --muted:#7c87ab; --acc:#ff8a3d; --good:#3ddc97; --bad:#ff5470; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:14px/1.45 system-ui, "Segoe UI", sans-serif; }
header { display:flex; align-items:center; justify-content:space-between; padding:10px 18px; border-bottom:1px solid var(--line); }
.brand { font-weight:700; font-size:18px; letter-spacing:.3px; }
.status { display:flex; align-items:center; gap:8px; font-size:13px; }
#led { width:10px; height:10px; border-radius:50%; background:#2a3350; display:inline-block; transition:background .1s; }
#led.on { background:var(--good); box-shadow:0 0 8px var(--good); }
nav { display:flex; gap:4px; padding:8px 14px 0; border-bottom:1px solid var(--line); overflow-x:auto; }
nav button { background:none; border:0; color:var(--muted); padding:8px 14px; font:inherit; font-weight:600; cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; }
nav button.on { color:var(--text); border-color:var(--acc); }
.stage { padding:12px 14px 4px; border-bottom:1px solid var(--line); }
.grid-wrap canvas, .trail-wrap canvas { width:100%; display:block; border-radius:10px; touch-action:none; }
.under { display:flex; gap:12px; margin-top:10px; }
#readout { width:120px; flex:none; background:#0f1320; border-radius:10px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
#readout b { font-size:36px; } #readout span { color:var(--muted); font-variant-numeric:tabular-nums; } #readout .heard { color:#c77dff; }
.trail-wrap { flex:1; min-width:0; }
.legend { display:flex; gap:14px; flex-wrap:wrap; padding:6px 2px; }
.legend i { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:5px; }
main { padding:6px 18px 40px; max-width:1300px; }
h2 { margin:10px 0 6px; font-size:19px; } h3 { margin:16px 0 6px; font-size:14px; color:#aab4d6; }
.muted { color:var(--muted); } .small { font-size:12px; } .bad { color:var(--bad); } .mono { font-family:ui-monospace, Consolas, monospace; }
.row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:8px 0; }
.grow { flex:1; }
.cols { display:grid; grid-template-columns:minmax(260px, 1fr) 2fr; gap:22px; }
.yt-cols { grid-template-columns:1.3fr 1fr; }
@media (max-width:900px) { .cols, .yt-cols { grid-template-columns:1fr; } }
select, input, textarea { background:#0f1320; color:var(--text); border:1px solid var(--line); border-radius:7px; padding:6px 8px; font:inherit; }
.btn { background:#1b2238; color:var(--text); border:1px solid var(--line); border-radius:8px; padding:7px 13px; font:inherit; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:4px; }
.btn:hover { border-color:#3a466e; } .btn:disabled { opacity:.4; cursor:default; }
.btn.primary { background:var(--acc); color:#1a0d00; border-color:var(--acc); }
.btn.danger { color:var(--bad); } .btn.sm { padding:4px 9px; font-size:12px; }
.btn.rec { background:var(--bad); color:#fff; border-color:var(--bad); animation:blink 1s infinite; }
@keyframes blink { 50% { opacity:.65; } }
.list { display:flex; flex-direction:column; gap:3px; max-height:420px; overflow:auto; }
.list .item { display:flex; justify-content:space-between; gap:10px; padding:8px 10px; border-radius:8px; background:var(--panel); cursor:pointer; border:1px solid transparent; }
.list .item:hover { border-color:var(--line); } .list .item.on { border-color:var(--acc); }
.strip, .chips { display:flex; flex-wrap:wrap; gap:5px; margin:10px 0; min-height:30px; }
.chip { padding:4px 9px; border-radius:20px; background:var(--panel); font-weight:600; font-size:13px; cursor:default; }
.chip.done { opacity:.35; } .chip.now { background:var(--good); color:#06130d; }
.chips { max-height:220px; overflow:auto; } .chips .chip { cursor:pointer; font-weight:400; } .chips .chip i { font-style:normal; color:var(--bad); margin-left:6px; cursor:pointer; }
.bar { height:6px; background:var(--panel); border-radius:3px; overflow:hidden; } .bar div { height:100%; background:var(--good); width:0; transition:width .2s; }
.score { color:var(--good); font-size:22px; } .big { font-size:17px; }
.yt-wrap { position:relative; aspect-ratio:16/9; background:#000; border-radius:10px; overflow:hidden; }
.yt-wrap iframe { position:absolute; inset:0; width:100%; height:100%; }
.yt-empty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
dialog { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:12px; width:min(560px, 92vw); }
dialog::backdrop { background:#0008; } dialog label { display:block; margin:8px 0; }
code { background:#0f1320; padding:1px 5px; border-radius:4px; }
.stats { display:flex; gap:12px; } .stats div { background:var(--panel); border-radius:10px; padding:12px 18px; display:flex; flex-direction:column; }
.stats b { font-size:26px; } .stats span { color:var(--muted); font-size:12px; }
.days { display:flex; gap:6px; height:110px; align-items:flex-end; }
.days div { flex:1; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:3px; }
.days i { width:100%; background:var(--acc); border-radius:4px 4px 0 0; min-height:2px; } .days span { font-size:10px; color:var(--muted); }
table { width:100%; border-collapse:collapse; } td { padding:5px 6px; border-bottom:1px solid var(--line); vertical-align:top; } td.num { text-align:right; font-weight:700; }
details { background:var(--panel); border-radius:8px; padding:8px 12px; margin:6px 0; } ol { margin:6px 0; padding-left:20px; }
pre.c-log { background:#0f1320; border-radius:8px; padding:10px; min-height:120px; max-height:260px; overflow:auto; font-size:12px; }
.chips .chip.miss { box-shadow:inset 0 0 0 1px var(--bad); } .chips .chip sup { color:var(--bad); font-weight:700; margin-left:2px; }
.ladder { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:8px 0; }
.ear-phrase { display:flex; gap:8px; margin:12px 0; min-height:44px; }
.ear-phrase span { width:44px; height:44px; border-radius:10px; background:var(--panel); display:flex; align-items:center; justify-content:center; font-weight:700; border:1px solid var(--line); }
.ear-phrase span.ok { background:var(--good); color:#06130d; } .ear-phrase span.bad { background:var(--bad); color:#fff; } .ear-phrase span.cur { border-color:var(--acc); }
.duel { display:flex; gap:12px; align-items:stretch; margin:10px 0; }
.duel div { background:var(--panel); border-radius:10px; padding:10px 16px; display:flex; flex-direction:column; min-width:90px; }
.duel b { font-size:24px; } .duel span { color:var(--muted); font-size:12px; }
