.editor{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;align-items:start;padding-bottom:64px;font-family:var(--sans)}
.editor-main{min-width:0}
.editor-toolbar,.editor-under,.editor-compare,.editor-geometry-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.editor-toolbar{margin-bottom:12px}
.editor-toolbar .btn,.editor-toolbar .btn-quiet,.editor-under .btn-quiet,.editor-geometry-actions .btn-quiet{font-size:13px;padding:9px 13px}
.editor-open{position:relative;display:inline-flex;align-items:center;gap:4px;overflow:hidden}
.editor-open input{position:absolute;inset:0;opacity:0;cursor:pointer;font-size:100px}
.editor-spacer{flex:1}
.editor-stage{position:relative;display:grid;place-items:center;min-height:440px;overflow:hidden;border-radius:18px;background:#202327;background-image:linear-gradient(45deg,#ffffff08 25%,transparent 25%,transparent 75%,#ffffff08 75%),linear-gradient(45deg,#ffffff08 25%,transparent 25%,transparent 75%,#ffffff08 75%);background-size:24px 24px;background-position:0 0,12px 12}
.editor-stage.dragging{outline:3px solid var(--amber);outline-offset:-3px}
.editor-stage.zoomed{display:block;max-height:70vh;overflow:auto}
.editor-canvas-wrap{display:grid;place-items:center;width:100%;padding:20px}
.editor-canvas-wrap canvas{display:block;max-width:100%;max-height:67vh;width:auto;height:auto;box-shadow:0 10px 32px #0007}
.editor-stage.zoomed .editor-canvas-wrap{width:max-content;min-width:100%;min-height:100%}
.editor-stage.zoomed .editor-canvas-wrap canvas{max-width:none;max-height:none}
.editor-loading{position:absolute;margin:0;color:#fff;font-size:16px}
.editor-loading[hidden]{display:none}
.editor-under{justify-content:space-between;padding:12px 0 4px;gap:8px 20px}
.editor-file{margin:0;font-size:14px;font-weight:700;overflow-wrap:anywhere}
.editor-compare{font-size:12px;color:var(--muted)}
.editor-hist{position:relative;height:80px;margin-top:8px;border:1px solid var(--rule);border-radius:12px;overflow:hidden;background:var(--paper-2)}
.editor-hist canvas{display:block;width:100%;height:100%}
.editor-hist span{position:absolute;bottom:4px;font-size:11px;color:var(--muted)}
.editor-hist span:nth-of-type(1){left:8px}.editor-hist span:nth-of-type(2){right:8px}
.editor-status{min-height:22px;margin:8px 0 0;font-size:13px;color:var(--muted)}
.editor-panel{min-width:0;overflow:hidden;border:1px solid var(--rule);border-radius:18px;background:var(--paper-2)}
.editor-tabs{display:flex;overflow-x:auto;padding:7px;gap:3px;border-bottom:1px solid var(--rule);scrollbar-width:none}
.editor-tabs button{flex:1;padding:9px 5px;border:0;border-radius:9px;background:transparent;color:var(--muted);font:700 12px var(--sans);cursor:pointer;white-space:nowrap}
.editor-tabs button[aria-selected=true]{background:var(--ink);color:var(--paper)}
.editor-panel-content{max-height:min(66vh,680px);min-height:350px;overflow-y:auto;padding:2px 18px 18px}
.editor-panel-content section[hidden]{display:none}
.editor-panel-content h3{margin:18px 0 6px;font-size:15px}
.editor-select-control{margin:14px 0 18px}
.editor-select-control .input{margin-top:7px;height:40px;font-size:14px}
.editor-pickers{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 12px}
.editor-pickers .btn-quiet{padding:7px 10px;font-size:12px}
.editor-pickers button[aria-pressed=true]{border-color:var(--amber);background:var(--amber);color:var(--body-2)}
.editor-stage.picking .editor-canvas-wrap canvas{cursor:crosshair}
.editor-curve,.editor-lch-map{display:block;width:100%;height:auto;border:1px solid var(--rule);border-radius:10px;cursor:crosshair;touch-action:none}
.editor-curve-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:7px 0 16px;color:var(--muted);font-size:11px;line-height:1.35}
.editor-curve-foot .btn-quiet{flex:none;padding:6px 9px;font-size:11px}
.editor-map-key{display:flex;justify-content:space-between;gap:8px;margin:4px 0 14px;color:var(--muted);font-size:11px}
.editor-lch-hint{margin:0 0 14px;padding:9px 11px;border-radius:8px;background:var(--paper);color:var(--ink);font-size:12px;line-height:1.4}
.editor-check-control{padding:13px 0;border-bottom:1px solid var(--rule)}
.editor-check-control label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;cursor:pointer}
.editor-check-control input{accent-color:var(--amber);width:17px;height:17px;margin:0}
.editor-group-intro{margin:12px 0;color:var(--muted);font-size:13px;line-height:1.45}
.editor-control{padding:12px 0;border-bottom:1px solid var(--rule)}
.editor-control-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;font-weight:700}
.editor-control-head label{flex:1}
.editor-info-btn{display:grid;place-items:center;flex:none;width:22px;height:22px;padding:0;border:1.5px solid var(--muted);border-radius:50%;background:transparent;color:var(--muted);font:800 13px var(--serif);cursor:pointer}
.editor-info-btn:hover,.editor-info-btn[aria-expanded=true]{border-color:var(--amber);background:var(--amber);color:var(--body-2)}
.editor-info-panel{margin:9px 0 1px;padding:9px 11px;border-left:3px solid var(--amber);border-radius:0 7px 7px 0;background:var(--paper);color:var(--ink);font-size:12px;font-weight:500;line-height:1.5}
.editor-control-row{display:grid;grid-template-columns:minmax(0,1fr) 66px;gap:12px;align-items:end;margin-top:6px}
.editor-range-box{min-width:0}
.editor-range-limits{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.editor-number{width:66px;height:34px;padding:0 4px;border:1px solid var(--rule);border-radius:7px;background:var(--paper);color:var(--ink);font:700 13px var(--sans);text-align:center;font-variant-numeric:tabular-nums}
.editor-number:focus{outline:2px solid var(--amber);outline-offset:1px}
.editor-control input[type=range]{height:22px;margin-top:1px}
.editor-control input[type=range]::-webkit-slider-thumb{width:20px;height:20px;margin-top:-8.5px}
.editor-geometry-actions{margin:12px 0}
.editor-crop-reset{margin-top:15px;font-size:13px}
.editor-export{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;align-items:center;padding:14px 18px 18px;border-top:1px solid var(--rule)}
.editor-export label{font-size:13px;font-weight:700}
.editor-export .input{height:38px;font-size:14px}
.editor-export .btn{grid-column:1/-1;margin-top:4px;font-size:14px}
.editor .btn:disabled,.editor .btn-quiet:disabled{opacity:.4;cursor:default}
.editor + .tool-notes{padding-top:36px}
@media(max-width:900px){.editor{grid-template-columns:1fr}.editor-panel-content{max-height:none;min-height:0}.editor-stage{min-height:300px}.editor-canvas-wrap canvas{max-height:55vh}}
@media(max-width:520px){.editor-toolbar{gap:6px}.editor-toolbar .btn,.editor-toolbar .btn-quiet{font-size:12px;padding:8px 10px}.editor-spacer{display:none}.editor-stage{min-height:240px}.editor-canvas-wrap{padding:10px}.editor-tabs button{font-size:12px;padding:8px 5px}}
