:root{color-scheme:light;--bg: #f5f5f7;--surface: #ffffff;--surface-2: #f0f0f2;--surface-3: #e8e8ed;--surface-translucent: rgba(255, 255, 255, .92);--border: #e5e5ea;--border-strong: #c7c7cc;--text: #1d1d1f;--muted: #515154;--faint: #6e6e73;--accent: #0071e3;--accent-hover: #0077ed;--accent-ink: #ffffff;--accent-text: #0071e3;--accent-ring: rgba(0, 113, 227, .3);--danger: #ff3b30;--danger-bg: rgba(255, 59, 48, .08);--ok: #34c759;--info: #007aff;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);--shadow-md: 0 4px 16px rgba(0, 0, 0, .08);--radius: 10px;--radius-sm: 7px;--font-ui: "IBM Plex Sans", "Helvetica Neue", sans-serif;--font-mono: "JetBrains Mono", "SF Mono", monospace}:root[data-theme=dark]{color-scheme:dark;--bg: #0b0b0d;--surface: #1d1d1f;--surface-2: #242426;--surface-3: #2c2c2e;--surface-translucent: rgba(29, 29, 31, .92);--border: #35353a;--border-strong: #48484c;--text: #f5f5f7;--muted: #a1a1a6;--faint: #8e8e93;--accent: #0a84ff;--accent-hover: #409cff;--accent-ink: #ffffff;--accent-text: #409cff;--accent-ring: rgba(10, 132, 255, .35);--danger: #ff453a;--danger-bg: rgba(255, 69, 58, .12);--ok: #30d158;--info: #0a84ff;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);--shadow-md: 0 6px 20px rgba(0, 0, 0, .35)}*{box-sizing:border-box}html,body{height:100%;margin:0}body{font-family:var(--font-ui);font-size:14px;line-height:1.5;color:var(--text);background:var(--bg);transition:background-color .2s ease,color .2s ease}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}#app{display:grid;grid-template-rows:auto 1fr auto;height:100vh;height:100dvh;gap:12px;padding:12px 16px 0}.mono{font-family:var(--font-mono)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}button,select,label.toggle,label.control{cursor:pointer}.masthead{display:flex;align-items:center;gap:12px;padding:2px 2px 10px;border-bottom:1px solid var(--border)}.emblem{width:38px;height:38px}.wordmark{display:flex;align-items:center;gap:10px}.wordmark h1{margin:0;font-size:17px;font-weight:700;letter-spacing:-.01em}.wordmark .sub{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:3px 10px}.masthead nav{margin-left:auto;display:flex;align-items:center;gap:18px}.masthead nav a{color:var(--muted);text-decoration:none;font-size:13.5px;font-weight:500;transition:color .15s}.masthead nav a:hover{color:var(--text)}.icon-btn{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--muted);transition:background .15s,color .15s,border-color .15s}.icon-btn:hover{background:var(--surface-2);color:var(--text);border-color:var(--border-strong)}.icon-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}:root[data-theme=dark] .only-light,:root:not([data-theme=dark]) .only-dark{display:none}main{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:12px;min-height:0}.stage{display:flex;flex-direction:column;gap:10px;min-height:0}.field-wrap{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;position:relative}#field{border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow-sm);cursor:crosshair}.plate{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);transition:background-color .2s ease,border-color .2s ease}.controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 14px}.btn{display:inline-flex;align-items:center;gap:7px;font-family:var(--font-ui);font-size:13px;font-weight:600;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:7px 14px;min-height:34px;transition:background .15s,border-color .15s,transform .05s}.btn svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.btn:hover{background:var(--surface-2)}.btn:active{transform:translateY(1px)}.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}.btn.primary svg{fill:currentColor;stroke:none}.btn.danger{background:transparent;border-color:var(--danger);color:var(--danger)}.btn.danger:hover{background:var(--danger-bg)}.btn.small{padding:4px 10px;min-height:28px;font-size:12px}.btn.icon-only{padding:4px 7px}.divider{width:1px;height:20px;background:var(--border)}.control{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:500;color:var(--muted)}select,input[type=number],input[type=text]{font-family:var(--font-mono);font-size:12.5px;color:var(--text);background:var(--bg);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:5px 8px;min-height:30px;transition:border-color .15s,box-shadow .15s}select:focus,input:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border:1.5px solid var(--border-strong);border-radius:4px;background:var(--surface);cursor:pointer;position:relative;transition:background .15s,border-color .15s}input[type=checkbox]:checked{background:var(--accent);border-color:var(--accent)}input[type=checkbox]:checked:after{content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;border:solid var(--accent-ink);border-width:0 2px 2px 0;transform:rotate(45deg)}.quick{position:absolute;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:13px;z-index:5;background:var(--surface-translucent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:var(--shadow-md)}.quick #quick-coords{color:var(--accent-text);font-weight:600;font-size:12px}.quick input{width:58px}.hidden{display:none!important}.gauges{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.gauge{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:9px 12px 10px;box-shadow:var(--shadow-sm);transition:background-color .2s ease,border-color .2s ease}.gauge .label{font-size:10.5px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--faint);margin-bottom:4px;white-space:nowrap}.gauge .value{font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-size:16px;font-weight:600;color:var(--text);white-space:nowrap}.gauge .bar{height:6px;margin-top:7px;border-radius:3px;background:var(--surface-3);position:relative;overflow:hidden}.gauge .bar .fill{position:absolute;top:0;bottom:0;border-radius:3px;background:var(--accent)}.gauge .bar .center{position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--border-strong)}.panel{display:flex;flex-direction:column;min-height:0;overflow:hidden}.tabs{display:flex;gap:4px;padding:8px 10px 0;border-bottom:1px solid var(--border)}.tab-btn{font-family:var(--font-ui);font-size:13px;font-weight:600;color:var(--muted);background:none;border:none;border-bottom:2px solid transparent;padding:8px 12px 10px;transition:color .15s,border-color .15s}.tab-btn:hover{color:var(--text)}.tab-btn.active{color:var(--text);border-bottom-color:var(--accent)}.tab{flex:1;display:flex;flex-direction:column;min-height:0;padding:12px;gap:10px;overflow-y:auto}.editor-bar{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}.editor-bar label{display:flex;align-items:center;gap:8px;flex:1;font-weight:500;cursor:pointer}.editor-bar select{flex:1}#code{flex:1.6;min-height:180px;resize:none;font-family:var(--font-mono);font-size:12.5px;line-height:1.55;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;-moz-tab-size:2;tab-size:2;transition:background-color .2s ease,border-color .15s}.console-title{font-size:10.5px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--faint)}.console{flex:1;min-height:90px;overflow-y:auto;font-size:12px;line-height:1.6;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 12px;transition:background-color .2s ease}.console:empty:before{content:"Program output appears here. Press Run to start.";color:var(--faint);font-style:italic}.console .entry{color:var(--text)}.console .entry.info{color:var(--muted)}.console .entry.error{color:var(--danger)}.console .entry.ok{color:var(--ok)}.tuning{display:flex;flex-direction:column;gap:10px}.tune-group{border:1px solid var(--border);border-radius:var(--radius);padding:12px 14px 14px;background:var(--bg);transition:background-color .2s ease,border-color .2s ease}.tune-group h3{margin:0 0 10px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}.tune-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px 14px}.tune-field{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12.5px;color:var(--muted);cursor:pointer}.tune-field input[type=number]{width:74px;text-align:right}.tune-actions{display:flex;gap:8px;padding-top:2px}.statusbar{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;margin:0 -16px;border-top:1px solid var(--border);background:var(--surface);font-size:12.5px;color:var(--muted);transition:background-color .2s ease,border-color .2s ease}.statusbar .mono{font-variant-numeric:tabular-nums}#status-state{font-weight:700;letter-spacing:.06em;font-size:11.5px;color:var(--accent-text)}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:5px;border:2px solid var(--surface)}@media(max-width:1100px){main{grid-template-columns:1fr;overflow-y:auto}.stage{min-height:70vh}.gauges{grid-template-columns:repeat(4,1fr)}}.path-hint{margin:0;font-size:12.5px;color:var(--muted);line-height:1.5}.path-toolbar{display:flex;align-items:center;gap:8px}.path-toolbar .control input{width:70px}.path-list{flex:1;min-height:90px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px;background:var(--bg);transition:background-color .2s ease}.path-empty{font-size:12px;color:var(--faint);font-style:italic;padding:4px 2px}.path-row{display:flex;align-items:center;gap:6px;flex-shrink:0}.path-row input[type=number]{width:58px;min-height:26px;padding:3px 6px}.path-row select{width:72px;min-height:26px;padding:3px 4px}.path-row input.path-theta{width:52px}.path-row input:disabled,.path-row select:disabled{opacity:.45;cursor:not-allowed}.path-badge{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-family:var(--font-mono);font-size:10.5px;font-weight:600;flex-shrink:0}.path-badge.start{background:var(--ok)}.path-kind-label{font-size:11px;color:var(--faint);width:72px;flex-shrink:0}.path-rev{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--muted);cursor:pointer}.path-del{margin-left:auto}.path-code-title{display:flex;align-items:center;justify-content:space-between}.path-code{flex:1;min-height:130px;margin:0;overflow:auto;font-size:11.5px;line-height:1.55;white-space:pre;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;transition:background-color .2s ease}.path-stats{flex:1;font-size:11.5px;color:var(--muted)}.path-item{display:flex;flex-direction:column;gap:5px;flex-shrink:0;padding:6px;border:1px solid transparent;border-radius:var(--radius-sm);cursor:default}.path-item.selected{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,transparent)}.path-row.sub{padding-left:26px;color:var(--muted);font-size:11px}.path-row.sub:empty{display:none}.path-opt{display:inline-flex;align-items:center;gap:4px}.path-opt input[type=number]{width:52px}.path-order{display:inline-flex;gap:4px;margin-left:auto}.btn.icon-only:disabled{opacity:.4;cursor:not-allowed}.path-toolbar{flex-wrap:wrap}.path-row{gap:4px}.path-row input[type=number]{width:60px;padding:3px 3px 3px 5px}.path-row select{width:68px}.path-row input.path-theta{width:48px}.path-kind-label{width:68px}.path-opt input[type=number]{width:50px}.path-item:not(.selected) .path-row.sub{display:none}.path-item:not(.selected):hover{background:var(--bg-hover, rgba(127, 127, 127, .08))}.path-help{font-size:12px;color:var(--muted)}.path-help summary{cursor:pointer;width:fit-content}.path-help ul{margin:6px 0 0;padding-left:18px;line-height:1.6}.path-import{font-size:12px;color:var(--muted)}.path-import summary{cursor:pointer;width:fit-content}.path-import-hint{margin:6px 0;line-height:1.5}.path-import textarea{width:100%;min-height:110px;resize:vertical;box-sizing:border-box;padding:8px;font-size:11.5px;line-height:1.5;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg);color:var(--text)}.path-import textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-ring)}.path-import-actions{display:flex;align-items:flex-start;gap:10px;margin-top:6px}.path-import-notes{flex:1;white-space:pre-wrap;font-size:11px;line-height:1.5;color:var(--faint)}.btn:disabled{opacity:.5;cursor:not-allowed}.path-row input[type=number]{width:64px}.path-row input.path-theta{width:50px}
