:root{--accent:#fdae27;--accent-strong:#de8500;--accent-soft:#fdae2724;--ink:#17202b;--muted:#626b76;--page:#f5f6f8;--panel:#fff;--surface:#f2f4f7;--surface-strong:#e5e7eb;--line:#d0d5dd;--line-soft:#e5e7eb;--white:#fff;--link:#235f9f;--success:#13795b;--danger:#9f1d20;color:var(--ink);background:var(--page);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#root{min-height:100%}body{background:var(--page);min-width:320px;margin:0}body.pane-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}button,select,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:7px;font-weight:700}button:disabled{cursor:not-allowed;opacity:.45}select{border:1px solid var(--line);background:var(--white);min-height:38px;color:var(--ink);border-radius:6px;padding:0 34px 0 10px}button:focus-visible,select:focus-visible,textarea:focus-visible,.pane-resizer:focus-visible{outline-offset:2px;outline:3px solid #fdae2759}.app-shell{background:var(--page);min-height:100vh;color:var(--ink);grid-template-rows:auto minmax(0,1fr);display:grid}.topbar{border-bottom:1px solid var(--line);background:var(--panel);justify-content:space-between;align-items:center;gap:18px;min-height:72px;padding:14px 18px;display:flex}.brand{align-items:center;gap:12px;min-width:0;display:flex}.brand-icon{color:var(--accent);flex:none}.brand h1{margin:0;font-size:20px;line-height:1.1}.brand p{color:var(--muted);margin:3px 0 0;font-size:13px;line-height:1.35}.topbar-actions{align-items:center;gap:10px;display:flex}.select-label{color:#4f5964;text-transform:uppercase;font-size:12px;font-weight:700;line-height:1.2}.workspace{grid-template-columns:minmax(300px, var(--editor-pane-width,44%)) 12px minmax(360px, 1fr);gap:18px;width:calc(100% - 36px);min-width:0;height:calc(100vh - 108px);min-height:560px;margin:18px auto;display:grid}.panel{border:1px solid var(--line);background:var(--panel);border-radius:8px;flex-direction:column;min-width:0;min-height:0;display:flex;overflow:hidden}.panel-heading{border-bottom:1px solid var(--line);background:var(--panel);justify-content:space-between;align-items:center;gap:14px;min-height:58px;padding:10px 14px;display:flex}.panel-heading h2{margin:0;font-size:15px;line-height:1.2}.editor-actions,.preview-actions,.preview-toolbar,.zoom-controls{align-items:center;display:flex}.editor-actions,.preview-actions{gap:8px}.editor-actions button,.preview-actions button,.zoom-controls button{background:var(--surface-strong);width:38px;min-height:38px;color:var(--ink);justify-content:center;align-items:center;padding:0;display:inline-flex}.editor-actions button:not(:disabled):hover,.preview-actions button:not(:disabled):hover,.zoom-controls button:not(:disabled):hover{background:var(--surface);box-shadow:inset 0 0 0 1px var(--accent)}.example-row{border-bottom:1px solid var(--line);background:var(--surface);align-items:center;gap:8px;padding:10px 14px;display:flex;overflow-x:auto}.example-row button{border:1px solid var(--line);background:var(--white);min-height:34px;color:var(--ink);border-radius:999px;flex:none;align-items:center;gap:7px;padding:0 12px;display:inline-flex}.example-row button:not(:disabled):hover{background:#fffdf9;border-color:#fdae27d9}.example-row button.active{background:var(--accent-soft);color:#6f4b00;border-color:#fdae27b3}textarea{resize:none;color:#e6edf3;tab-size:2;background:#101722;border:0;outline:0;flex:1 1 0;width:100%;min-width:0;min-height:0;padding:16px;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:13px;line-height:1.58}.pane-resizer{cursor:col-resize;touch-action:none;justify-content:center;align-items:center;min-height:0;display:flex}.pane-resizer span{background:var(--surface-strong);border-radius:999px;width:4px;height:72px;display:block;position:relative}.pane-resizer span:before,.pane-resizer span:after{content:"";background:var(--surface-strong);border-radius:999px;width:4px;height:72px;position:absolute;top:0}.pane-resizer span:before{left:-6px}.pane-resizer span:after{right:-6px}.pane-resizer:hover span,.pane-resizer:hover span:before,.pane-resizer:hover span:after,.pane-resizer:focus-visible span,.pane-resizer:focus-visible span:before,.pane-resizer:focus-visible span:after{background:var(--accent)}.preview-panel{min-width:0}.status{min-height:20px;color:var(--success);align-items:center;gap:5px;margin-top:3px;font-size:13px;line-height:1.35;display:flex}.status.bad{color:var(--danger)}.preview-toolbar{flex-wrap:wrap;justify-content:flex-end;gap:10px}.zoom-controls{border:1px solid var(--line);background:var(--surface);border-radius:8px;gap:6px;min-height:38px;padding:4px}.zoom-controls button{border-radius:7px;width:30px;min-height:30px}.zoom-controls input[type=range]{width:118px;accent-color:var(--accent-strong)}.zoom-controls output{min-width:42px;color:var(--muted);font-variant-numeric:tabular-nums;text-align:right;font-size:13px;line-height:1}.preview-surface{overscroll-behavior:contain;background:linear-gradient(#d0d5dd73 1px, transparent 1px), linear-gradient(90deg, #d0d5dd73 1px, transparent 1px), var(--white);background-size:24px 24px;flex:1 1 0;min-height:0;padding:28px;display:block;overflow:auto}.diagram-stage{width:max-content;min-width:100%;min-height:100%}.diagram-frame{margin:0 auto}.diagram,.diagram svg{width:100%;height:100%;display:block}.diagram svg{border:1px solid var(--line-soft);background:var(--white);border-radius:8px;max-width:none;padding:18px}.error-box,.empty-state{border:1px solid var(--line);background:var(--panel);border-radius:8px;width:min(680px,100%);margin:0;padding:14px}.error-box{color:var(--danger);white-space:pre-wrap;background:#9f1d2014;border-color:#9f1d2047;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:12px;line-height:1.55}.empty-state{color:var(--muted);font-size:13px}@media (width<=760px){.topbar{flex-direction:column;align-items:stretch;padding:14px}.topbar-actions{width:100%}select{flex:160px}.workspace{grid-template-columns:1fr;gap:12px;width:calc(100% - 24px);height:auto;min-height:0;margin:12px auto}.panel{height:560px}.pane-resizer{display:none}.panel-heading{flex-direction:column;align-items:stretch;min-height:0}.editor-actions,.preview-actions,.preview-toolbar,.zoom-controls{width:100%}.editor-actions button,.preview-actions button,.zoom-controls button{flex:1 1 0}.zoom-controls input[type=range]{flex:auto;width:auto}.preview-surface{padding:16px}}
