1:root { --sidebar-w: 420px; --plate-h: 40vh; --readouts-h: 190px; --bg: #14161a; --panel: #1d2026; --border: #2c3038; --text: #e6e6e6; --muted: #9aa0a8; --accent: #e0a23a; --danger: #d9534f; }
2* { box-sizing: border-box; }
3html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 system-ui, sans-serif; }
4#app { display: grid; grid-template-columns: var(--sidebar-w) 6px 1fr; height: 100vh; }
5.splitter { background: var(--border); flex: none; }
6.splitter.vertical { width: 6px; cursor: col-resize; }
7.splitter.horizontal { height: 6px; cursor: row-resize; }
8.splitter:hover, .splitter.active { background: var(--accent); }
9#sidebar { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
10#sidebar header { padding: 10px 12px 4px; }
11#sidebar h1 { margin: 0; font-size: 18px; display: inline; }
12.subtitle { color: var(--muted); margin-left: 8px; }
13.run { padding: 6px 12px; border-bottom: 1px solid var(--border); }
14.row { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
15.row label { display: flex; gap: 6px; align-items: center; flex: 1; }
16.row select { flex: 1; }
17.buttons button { flex: 1; }
18button { background: #2a2e36; color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 5px 10px; cursor: pointer; }
19button:hover:not(:disabled) { background: #343943; }
20button:disabled { opacity: 0.45; cursor: default; }
21button.primary { background: var(--accent); color: #111; border-color: var(--accent); font-weight: 600; }
22select, input[type="text"], input[type="number"] { background: #111318; color: var(--text); border: 1px solid var(--border); border-radius: 3px; padding: 3px 5px; }
23progress { flex: 1; height: 10px; }
24.muted { color: var(--muted); }
25.tabs { display: flex; border-bottom: 1px solid var(--border); }
26.tabs button { flex: 1; border: none; border-radius: 0; background: transparent; padding: 6px; color: var(--muted); }
27.tabs button.active { color: var(--text); border-bottom: 2px solid var(--accent); }
28.tab { flex: 1; min-height: 0; overflow: auto; }
29.tab.hidden { display: none; }
30#editor { height: 100%; }
31#editor .cm-editor { height: 100%; font-size: 12px; }
32#editor .cm-scroller { font-family: ui-monospace, Menlo, Consolas, monospace; }
33#issues { list-style: none; margin: 0; padding: 4px 12px; max-height: 120px; overflow: auto; border-top: 1px solid var(--border); font-size: 12px; }
34#issues li { color: var(--danger); }
35#issues li.ok { color: #6fbf73; }
36#issues code { color: var(--text); }
37#form { padding: 6px 10px; }
38#form details { margin-bottom: 4px; }
39#form summary { cursor: pointer; font-weight: 600; padding: 3px 0; }
40#form .grid { display: grid; grid-template-columns: 1fr 120px; gap: 3px 8px; align-items: center; padding: 2px 0 6px 10px; }
41#form .grid label { color: var(--muted); }
42#form .grid label span.unit { color: #6d737b; margin-left: 4px; }
43#form .hit { border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; margin: 4px 0; }
44#form .hit .head { display: flex; justify-content: space-between; align-items: center; }
45#form input[type="number"] { width: 100%; }
46#summary { padding: 6px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; white-space: pre-wrap; }
47main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
48main section { min-height: 0; display: flex; flex-direction: column; }
49#plate-section { height: var(--plate-h); flex: none; }
50#spec-section { flex: 1; min-height: 60px; }
51#playback { flex: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
52.toolbar { display: flex; gap: 14px; align-items: center; padding: 4px 10px; font-weight: 600; }
53.toolbar label { font-weight: normal; color: var(--muted); display: flex; gap: 6px; align-items: center; }
54canvas { flex: 1; width: 100%; height: 100%; display: block; min-height: 0; }
55#playback { flex-direction: row; align-items: center; gap: 10px; padding: 6px 10px; }
56#playback #position { flex: 1; }
57#playback label { color: var(--muted); display: flex; gap: 6px; align-items: center; }
58#readouts { padding: 6px 10px; height: var(--readouts-h); flex: none; overflow: auto; font-size: 12px; }
59#readouts table { border-collapse: collapse; margin-right: 24px; display: inline-table; vertical-align: top; }
60#readouts th, #readouts td { padding: 1px 8px; text-align: right; border-bottom: 1px solid var(--border); }
61#readouts th { color: var(--muted); font-weight: normal; }
62#readouts .log { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); white-space: pre-wrap; margin-top: 4px; }
63@media (max-width: 900px) { #app { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; } #sidebar { max-height: 45vh; } .splitter.vertical { display: none; } }