:root{--bg:#11151c;--panel:#1a2029;--panel2:#212936;--text:#e6e9ef;--muted:#9aa4b2;--accent:#4ea1ff;--err:#ff6b6b;--warn:#f5c451;--ok:#4cd08a;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Hiragino Sans,Noto Sans JP,sans-serif}*{box-sizing:border-box}body{margin:0}button,select,.button{font:inherit;color:var(--text);background:var(--panel2);cursor:pointer;border:1px solid #344052;border-radius:6px;padding:5px 10px;font-size:13px;text-decoration:none}button:hover:not(:disabled),.button:hover{border-color:var(--accent)}button:disabled{opacity:.45;cursor:default}button.primary{background:#1f5fa8;border-color:#2c74c9;font-weight:600}button.link{color:var(--muted);background:0 0;border:none;padding:0 4px}.app{flex-direction:column;height:100vh;display:flex}.topbar{background:var(--panel);border-bottom:1px solid #2a3340;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 12px;display:flex}.topbar h1{white-space:nowrap;margin:0 8px 0 0;font-size:16px}.beta{color:var(--muted);border:1px solid #344052;border-radius:4px;padding:1px 5px;font-size:11px;font-weight:400}.spacer{flex:1}.sample-select,.top-select{color:var(--muted);align-items:center;gap:6px;font-size:13px;display:flex}.notice{background:#1c3350;justify-content:space-between;padding:6px 12px;font-size:13px;display:flex}.layout{flex:1;grid-template-columns:minmax(320px,1fr) minmax(480px,1.15fr);min-height:0;display:grid}.editor-pane{border-right:1px solid #2a3340;flex-direction:column;min-height:0;display:flex}.tabs{background:var(--panel);align-items:center;gap:2px;padding:4px 6px 0;display:flex}.tab{background:#161b23;border-radius:6px 6px 0 0;align-items:center;display:flex}.tab.active{background:#1e1e1e}.tab button{color:var(--muted);background:0 0;border:none;border-radius:6px 6px 0 0}.tab.active button{color:var(--text)}.tab .close{padding:2px 6px}.tab.add{background:0 0;border:none}.code-editor{flex:1;min-height:240px}.code-editor.loading{color:var(--muted);place-items:center;display:grid}.board-pane{flex-direction:column;gap:8px;min-height:0;padding:10px;display:flex;overflow:auto}.controls{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.step-group{gap:2px;display:inline-flex}.status{color:var(--muted);font-variant-numeric:tabular-nums;flex-wrap:wrap;align-items:center;gap:14px;font-size:13px;display:flex}.badge{background:var(--panel2);color:var(--text);border-radius:10px;padding:2px 8px}.badge.running{background:#1f6b44}.badge.paused{background:#6b5a1f}.badge.error{background:#7a2630}.badge.compiling,.badge.loading{background:#1f4a7a}.dirty{color:var(--warn)}.board{-webkit-user-select:none;user-select:none;touch-action:manipulation;width:100%;max-width:980px;height:auto}.pcb{fill:#14325c;stroke:#0b1f3a;stroke-width:3px}.hole{fill:#0b0f16;stroke:#c9b26b;stroke-width:3px}.silk{fill:#e8edf5;font-family:ui-monospace,monospace;font-size:13px}.silk.small{font-size:11px}.silk.title{font-family:system-ui,sans-serif;font-size:26px;font-weight:700}.chip{fill:#20242b;stroke:#555c66}.chip-text{fill:#c8ccd3;font-family:ui-monospace,monospace;font-size:14px}.chip-text.small{font-size:9px}.osc{fill:#b9bec7}.osc+.chip-text{fill:#222}.conn{fill:#2b2f36;stroke:#50565f}.unsupported{opacity:.55}.hex-panel{fill:#0d0f12}.hex-body{fill:#191b1f}.seg{fill:#2a1414;transition:fill 40ms}.seg.on{fill:#ff3b30;filter:url(#glow)}.seg.unknown{fill:#5a4a20}.led{fill:#3a1a1a;stroke:#111}.led.on{fill:#ff2d2d}.led.unknown{fill:#6b5a1f;stroke-dasharray:2 2;stroke:#f5c451}.switch,.key{cursor:pointer;outline:none}.switch:focus-visible .switch-body,.key:focus-visible .key-body{stroke:var(--accent);stroke-width:2px}.switch-body{fill:#1b1d22;stroke:#444}.switch-knob{fill:#e6e6e6;transition:y 80ms}.key-body{fill:#2a2d33;stroke:#555}.key-cap{fill:#2c2f35;stroke:#888;stroke-width:2px}.key-cap.pressed{fill:#555b66}.dim{opacity:.4}.console{background:#0d1117;border:1px solid #2a3340;border-radius:6px;flex-direction:column;min-height:120px;max-height:260px;font-family:ui-monospace,monospace;font-size:12px;display:flex}.console-head{color:var(--muted);border-bottom:1px solid #2a3340;justify-content:space-between;padding:4px 8px;font-family:system-ui,sans-serif;display:flex}.console-body{padding:4px 8px;overflow:auto}.log{white-space:pre-wrap;padding:1px 0}.log.error{color:var(--err)}.log.warning{color:var(--warn)}.log.info{color:var(--muted)}.log.stderr{color:#ff9f8f}.log.clickable{cursor:pointer;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.footer{color:var(--muted);border-top:1px solid #2a3340;gap:8px;padding:4px 12px;font-size:11px;display:flex}.footer a{color:var(--muted)}@media (max-width:900px){.app{height:auto}.layout{grid-template-columns:1fr}.board-pane{order:-1}.code-editor{height:50vh}}.app.embed .footer,.app.embed .beta{display:none}.app.embed .layout{grid-template-columns:1fr}.app.embed .board-pane{order:-1}.app.embed .code-editor{height:360px}.app.embed{height:auto}.board-name{color:#cfe3ff;background:#1c3350;border-radius:4px;padding:1px 6px;font-size:12px;font-weight:600}
