:root { --bg:#f4f6f9; --card:#fff; --ink:#1f2937; --mute:#6b7280; --pri:#0f62fe; --line:#e5e7eb; --warn:#fff7e6; --danger:#dc2626; }
* { box-sizing: border-box; }
body { margin:0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); }
header { display:flex; justify-content:space-between; align-items:center; padding:10px 18px; background:#0b1f3a; color:#fff; }
header .brand { font-size:18px; }
header .status { font-size:13px; opacity:.9; }
nav { display:flex; flex-wrap:wrap; gap:4px; padding:8px 12px 0; background:#0b1f3a; }
nav button { border:0; background:#1d3557; color:#cfd8e3; padding:9px 14px; border-radius:8px 8px 0 0; cursor:pointer; font-size:14px; }
nav button.active { background:var(--bg); color:var(--ink); font-weight:600; }
main { padding:16px 18px 60px; max-width:1280px; margin:0 auto; }
.tab { display:none; } .tab.active { display:block; }
h2 { margin:6px 0 8px; font-size:20px; } h3 { margin:18px 0 8px; font-size:16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin:10px 0; }
.row { display:flex; gap:12px; align-items:flex-end; } .wrap { flex-wrap:wrap; } .grow { flex:1; min-width:200px; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:10px 18px; }
label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--mute); }
label:has(> input[type=checkbox]) { flex-direction:row; align-items:center; color:var(--ink); }
input, select { font:inherit; padding:7px 9px; border:1px solid #cbd5e1; border-radius:7px; background:#fff; color:var(--ink); }
input[type=range] { padding:0; } input[type=checkbox] { width:18px; height:18px; }
button, .btnlike { font:inherit; padding:8px 14px; border-radius:8px; border:1px solid #cbd5e1; background:#fff; color:var(--ink); cursor:pointer; display:inline-flex; align-items:center; gap:6px; flex-direction:row; }
button:hover, .btnlike:hover { background:#eef2ff; }
button.primary, .btnlike.primary { background:var(--pri); color:#fff; border-color:var(--pri); }
button.primary:hover { background:#0043ce; }
button.danger { color:var(--danger); border-color:#fca5a5; }
button:disabled { opacity:.45; cursor:not-allowed; }
.hint { color:var(--mute); font-size:13px; margin:6px 0; }
.warn { background:var(--warn); border:1px solid #fcd34d; border-radius:10px; padding:10px 14px; margin:10px 0; font-size:14px; }
.banner { background:#e0f2fe; border-bottom:1px solid #7dd3fc; padding:10px 18px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.hidden { display:none !important; }
.stats { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:13px; white-space:pre-wrap; }
.stage { position:relative; display:inline-block; max-width:100%; background:#000; border-radius:8px; overflow:hidden; line-height:0; }
.stage video, .stage canvas { max-width:100%; max-height:70vh; display:block; }
.stage canvas.overlay { position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none; }
.stage canvas.overlay.interactive { pointer-events:auto; cursor:crosshair; }
.offscreen { position:fixed; left:-10px; top:-10px; width:2px; height:2px; opacity:0; pointer-events:none; }
.tbl { border-collapse:collapse; width:100%; margin:8px 0; font-size:13.5px; background:#fff; }
.tbl th, .tbl td { border:1px solid var(--line); padding:5px 8px; text-align:left; }
.tbl th { background:#f1f5f9; }
.tbl td.num, .tbl th.num { text-align:right; font-variant-numeric: tabular-nums; }
.tbl input, .tbl select { padding:4px 6px; width:100%; min-width:70px; }
.tbl tr.total td { font-weight:700; background:#f8fafc; }
.progress { height:16px; background:#e5e7eb; border-radius:8px; overflow:hidden; }
.progress > div { height:100%; width:0; background:linear-gradient(90deg,#0f62fe,#22c55e); transition:width .3s; }
.keys { display:flex; gap:10px; flex-wrap:wrap; margin:10px 0; }
.key { border-radius:10px; padding:10px 16px; color:#fff; min-width:130px; font-size:14px; }
.key b { font-size:28px; display:block; }
.key.flash { outline:4px solid #111; }
.ok { color:#15803d; font-weight:600; } .bad { color:var(--danger); font-weight:600; }
code { background:#eef2f7; padding:1px 5px; border-radius:4px; }
