.sb-editor{--sb-bg:#fff;--sb-canvas:#f8fafc;--sb-grid:#e2e8f0;--sb-line:#cbd5e1;--sb-text:#0f172a;--sb-muted:#64748b;--sb-piece:#f1f5f9;--sb-piece-stroke:#334155;--sb-accent:#f7791d;--sb-accent-soft:#f7791d24;--sb-splash:#0ea5e9;--sb-waterfall:#8b5cf6;--sb-appliance:#f59e0b;--sb-seam:#dc2626;--sb-ok:#16a34a;border:1px solid var(--sb-line);background:var(--sb-bg);height:calc(100dvh - 11rem);min-height:560px;color:var(--sb-text);border-radius:.75rem;flex-direction:column;font-size:.875rem;display:flex;overflow:hidden}.dark .sb-editor{--sb-bg:#111827;--sb-canvas:#0b1120;--sb-grid:#1e293b;--sb-line:#334155;--sb-text:#e2e8f0;--sb-muted:#94a3b8;--sb-piece:#1e293b;--sb-piece-stroke:#cbd5e1}.sb-editor button,.sb-editor .sb-file,.sb-editor .sb-toolbar a{border:1px solid var(--sb-line);background:var(--sb-bg);color:var(--sb-text);cursor:pointer;white-space:nowrap;border-radius:.5rem;align-items:center;gap:.25rem;padding:.35rem .6rem;font-size:.8125rem;line-height:1.2;display:inline-flex}.sb-editor button:hover,.sb-editor .sb-file:hover,.sb-editor .sb-toolbar a:hover{border-color:var(--sb-accent)}.sb-editor button.sb-active{background:var(--sb-accent-soft);border-color:var(--sb-accent)}.sb-editor button.sb-primary{background:var(--sb-accent);border-color:var(--sb-accent);color:#111827;font-weight:600}.sb-editor button.sb-danger{color:#dc2626}.sb-editor button:disabled{opacity:.5;cursor:not-allowed}.sb-file input{display:none}.sb-toolbar{border-bottom:1px solid var(--sb-line);flex-wrap:wrap;align-items:center;gap:.5rem 1rem;padding:.5rem .75rem;display:flex}.sb-group{flex-wrap:wrap;align-items:center;gap:.35rem;display:flex}.sb-right{margin-left:auto}.sb-status{color:var(--sb-muted);font-size:.75rem}.sb-status[data-state=dirty]{color:var(--sb-appliance)}.sb-status[data-state=saved]{color:var(--sb-ok)}.sb-status[data-state=error]{color:#dc2626}.sb-body{flex:1;min-height:0;display:flex}.sb-canvas{background:var(--sb-canvas);touch-action:none;flex:1;min-width:0;position:relative;overflow:hidden}.sb-canvas svg{-webkit-user-select:none;user-select:none;width:100%;height:100%;display:block}.sb-hint{background:var(--sb-bg);border:1px solid var(--sb-line);color:var(--sb-muted);pointer-events:none;border-radius:.5rem;padding:.35rem .6rem;font-size:.75rem;position:absolute;top:.75rem;left:.75rem}.sb-hint:empty{display:none}.sb-dim-input{text-align:center;border:2px solid var(--sb-accent);background:var(--sb-bg);width:100px;color:var(--sb-text);z-index:5;border-radius:.4rem;padding:.25rem .4rem;font-weight:600;position:absolute}.sb-panel{border-left:1px solid var(--sb-line);flex-direction:column;flex-shrink:0;width:340px;min-height:0;display:flex}.sb-panel>[data-panel]{flex-direction:column;flex:1;gap:.6rem;padding:.75rem;display:flex;overflow-y:auto}.sb-panel h3{font-size:.95rem;font-weight:600}.sb-panel label{color:var(--sb-muted);flex-direction:column;flex:none;gap:.2rem;min-width:0;font-size:.75rem;display:flex}.sb-row>label{flex:1 1 0}.sb-panel input,.sb-panel select{border:1px solid var(--sb-line);background:var(--sb-bg);width:100%;color:var(--sb-text);border-radius:.4rem;padding:.35rem .45rem;font-size:.8125rem}.sb-panel input:disabled{opacity:.7}.sb-row{align-items:flex-end;gap:.5rem;display:flex}.sb-row>button{flex:1;justify-content:center}.sb-muted{color:var(--sb-muted);font-size:.75rem}.sb-tabs{flex-wrap:wrap;gap:.25rem;display:flex}.sb-tabs button{flex:1;justify-content:center;padding:.3rem .4rem}.sb-list{flex-direction:column;gap:.4rem;display:flex}.sb-item{border:1px solid var(--sb-line);border-radius:.5rem;flex-direction:column;gap:.45rem;padding:.4rem .6rem;display:flex}.sb-item[open],.sb-item-active{border-color:var(--sb-accent)}.sb-item summary{cursor:pointer;font-size:.8125rem}.sb-item>:not(summary){margin-top:.4rem}.sb-item.sb-flat>*{margin-top:0}.sb-bump{border:1px dashed var(--sb-line);border-radius:.5rem;flex-direction:column;gap:.4rem;padding:.4rem .5rem;display:flex}.sb-bump legend{color:var(--sb-muted);padding:0 .25rem;font-size:.7rem}.sb-summary{border-top:1px solid var(--sb-line);grid-template-columns:1fr 1fr;gap:.2rem .75rem;padding:.6rem .75rem;font-size:.75rem;display:grid}.sb-summary div{justify-content:space-between;gap:.5rem;display:flex}.sb-summary span{color:var(--sb-muted)}.sb-legend{color:var(--sb-muted);grid-template-columns:1fr 1fr;gap:.3rem;font-size:.75rem;display:grid}.sb-legend span{align-items:center;gap:.4rem;display:flex}.sb-sw{border-top:3px solid var(--sb-piece-stroke);width:18px;height:0;display:inline-block}.sb-sw-u{border-top:1px dashed var(--sb-muted)}.sb-sw-a{border-top:3px dashed var(--sb-appliance)}.sb-sw-s{border-top:6px solid var(--sb-splash);opacity:.6}.sb-sw-w{border-top:6px solid var(--sb-waterfall);opacity:.6}.sb-sw-seam{border-top:2px dashed var(--sb-seam)}.sb-grid{stroke:var(--sb-grid);stroke-width:1px;fill:none}.sb-piece{fill:var(--sb-piece);stroke:none;cursor:move}.sb-piece.sb-selected{fill:var(--sb-accent-soft)}.sb-edge-finished{stroke:var(--sb-piece-stroke);stroke-width:2.5px;fill:none}.sb-edge-unfinished{stroke:var(--sb-muted);stroke-width:1px;stroke-dasharray:5 4;fill:none}.sb-edge-appliance{stroke:var(--sb-appliance);stroke-width:2.5px;stroke-dasharray:6 3;fill:none}.sb-edge-waterfall{stroke:var(--sb-waterfall);stroke-width:3px;fill:none}.sb-edge-active{stroke:var(--sb-accent)!important;stroke-width:4px!important}.sb-hit{stroke:#0000;stroke-width:14px;fill:none;cursor:pointer}.sb-splash{fill:var(--sb-splash);opacity:.35;cursor:pointer}.sb-waterfall{fill:var(--sb-waterfall);opacity:.35;cursor:pointer}.sb-band-label{fill:var(--sb-text);text-anchor:middle;pointer-events:none}.sb-dim{fill:var(--sb-text);text-anchor:middle;cursor:text;paint-order:stroke;stroke:var(--sb-canvas);stroke-width:3px;font-weight:600}.sb-dim:hover{fill:var(--sb-accent)}.sb-piece-label{fill:var(--sb-text);text-anchor:middle;cursor:move;font-weight:700}.sb-piece-sub{fill:var(--sb-muted);text-anchor:middle;cursor:move}.sb-free-label{fill:var(--sb-text);cursor:move}.sb-selected-text{fill:var(--sb-accent)}.sb-cutout{fill:var(--sb-bg);stroke:var(--sb-piece-stroke);stroke-width:1.5px;cursor:move}.sb-cutout.sb-selected{stroke:var(--sb-accent);stroke-width:2.5px}.sb-cutout-label{fill:var(--sb-muted);text-anchor:middle;pointer-events:none}.sb-hole{fill:var(--sb-bg);stroke:var(--sb-piece-stroke);stroke-width:.25px}.sb-seam{stroke:var(--sb-seam);stroke-width:2px;stroke-dasharray:6 4}.sb-seam-active{stroke-width:3.5px}.sb-vertex{fill:var(--sb-bg);stroke:var(--sb-accent);stroke-width:.35px;cursor:grab}.sb-vertex-mod{fill:var(--sb-accent-soft)}.sb-vertex-active{fill:var(--sb-accent)}.sb-draft{fill:none;stroke:var(--sb-accent);stroke-width:2px;stroke-dasharray:4 3}.sb-draft-point{fill:var(--sb-accent)}.sb-slab-frame{fill:none;stroke:var(--sb-piece-stroke);stroke-width:1.5px}.sb-slab-name{fill:var(--sb-text);font-weight:600}.sb-slab-info{fill:var(--sb-muted)}.sb-part{fill-opacity:.25;stroke-width:2px;cursor:move}.sb-part.sb-ok{fill:var(--sb-ok);stroke:var(--sb-ok)}.sb-part.sb-overlap{fill:#eab308;stroke:#eab308}.sb-part.sb-off{fill:#f97316;stroke:#f97316}.sb-part.sb-bad{fill:#dc2626;stroke:#dc2626}.sb-part.sb-selected{stroke:var(--sb-accent);stroke-width:3.5px}.sb-part-textured{fill-opacity:.05}.sb-part-label{fill:#0f172a;text-anchor:middle;pointer-events:none;paint-order:stroke;stroke:#fffc;stroke-width:3px;font-weight:700}.sb-tray{flex-wrap:wrap;gap:.35rem;display:flex}.sb-tray button{font-weight:600}.sb-slab-list img{object-fit:cover;border-radius:.35rem;width:100%;height:80px}.sb-crop{-webkit-user-select:none;user-select:none;touch-action:none;position:relative}.sb-crop img{width:100%;height:auto;display:block}.sb-crop-box{border:2px solid var(--sb-accent);cursor:move;position:absolute;box-shadow:0 0 0 9999px #00000073}.sb-crop-handle{background:var(--sb-accent);border-radius:3px;width:14px;height:14px;position:absolute}.sb-preview{background:var(--sb-canvas);justify-content:center;align-items:center;display:flex;position:absolute;inset:0;overflow:auto}.sb-preview canvas{max-width:100%;max-height:100%}.sb-3d{background:var(--sb-canvas);position:absolute;inset:0}.sb-preview[hidden],.sb-3d[hidden]{display:none}.sb-3d canvas{display:block;width:100%!important;height:100%!important}.sb-modal{z-index:20;background:#0f172a8c;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.sb-modal-card{background:var(--sb-bg);border-radius:.75rem;flex-direction:column;gap:.75rem;width:min(720px,94%);max-height:90%;padding:1rem;display:flex;overflow:auto}.sb-slab-picker{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.5rem;display:grid}.sb-slab-picker button{text-align:left;white-space:normal;flex-direction:column;align-items:stretch;padding:.4rem}.sb-slab-picker img{object-fit:cover;border-radius:.35rem;width:100%;height:90px}.sb-editor.sb-is-fullscreen{border:0;border-radius:0;height:100dvh;min-height:0}.sb-editor.sb-fullscreen{z-index:60;position:fixed;inset:0}.sb-editor:fullscreen{width:100vw;height:100vh}html.sb-no-scroll,html.sb-no-scroll body{overflow:hidden}@media (pointer:coarse){.sb-hit{stroke-width:30px}.sb-editor button,.sb-editor .sb-file,.sb-editor .sb-toolbar a{padding:.5rem .7rem;font-size:.875rem}.sb-panel input,.sb-panel select{padding:.5rem;font-size:1rem}.sb-dim-input{width:120px;font-size:1rem}}@media (width<=640px){.sb-toolbar{-webkit-overflow-scrolling:touch;flex-wrap:nowrap;overflow-x:auto}.sb-group{flex-wrap:nowrap}.sb-right{margin-left:0}.sb-status{display:none}}@media (width<=900px){.sb-editor{height:auto}.sb-body{flex-direction:column}.sb-canvas{flex:none;height:60dvh}.sb-panel{border-left:0;border-top:1px solid var(--sb-line);width:100%}}
