.background-panel .background-launch{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-panel .button{white-space:normal;padding:10px 6px}
#backgroundDialog{box-sizing:border-box;width:min(1000px,96vw);height:min(850px,94dvh);max-width:none;max-height:none;padding:0;border:1px solid #e6c5d6;border-radius:16px;background:#fffbfd;color:#654451;overflow:hidden}#backgroundDialog[open]{display:flex;flex-direction:column}#backgroundDialog::backdrop{background:#34232b88}.bg-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;gap:12px;border-bottom:1px solid #eedce5}.bg-header h2{font-size:19px;margin:0}.bg-header button{font-size:24px;width:40px;height:40px;border:1px solid #ead2de;border-radius:9px;background:white;color:#80516a}.bg-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:10px 16px}.bg-controls button,.bg-footer button,.bg-view button{min-height:40px;border:1px solid #e5ccda;border-radius:8px;background:white;padding:7px 12px;color:#724f61;font:inherit;cursor:pointer}.bg-controls button[aria-pressed=true],.bg-view button[aria-pressed=true]{box-shadow:inset 0 0 0 2px currentColor;background:#fff0f6}.bg-controls .bg-remove{color:#bb3d57}.bg-controls .bg-keep{color:#258368}.bg-controls label{display:flex;align-items:center;gap:7px;font-size:13px}.bg-controls input[type=range]{width:95px;accent-color:#b3507d}.bg-controls button:disabled,.bg-footer button:disabled{opacity:.45;cursor:default}.bg-canvas-wrap{position:relative;flex:1;min-height:160px;margin:0 16px;overflow:hidden;border:1px solid #e8d6e1;border-radius:10px;background:repeating-conic-gradient(#f5eef2 0 25%,#fff 0 50%) 0/20px 20px}.bg-canvas-wrap canvas{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.bg-view{position:absolute;bottom:10px;right:10px;display:flex;gap:4px;background:#fffcfce8;border-radius:8px;padding:3px}.bg-view button{padding:4px 9px;min-height:36px;font-size:14px}.bg-footer{padding:10px 16px 14px}.bg-footer p{margin:0 0 8px;font-size:13px;line-height:1.45;min-height:37px}.bg-footer>div{display:flex;align-items:center;gap:12px;justify-content:flex-end}.bg-footer label{margin-right:auto;font-size:13px;display:flex;gap:6px;align-items:center}.bg-footer .bg-apply{background:#f5d6e5;border-color:#dca7c1;color:#743b57;font-weight:650}.bg-help{padding:0 16px 8px;margin:0;font-size:13px;line-height:1.45;color:#8d6e7e}#backgroundDialog [hidden]{display:none!important}@media(max-width:750px){#backgroundDialog{width:100%;height:100dvh;margin:0;border:0;border-radius:0}.bg-header{padding:7px 12px}.bg-header h2{font-size:17px}.bg-controls{padding:8px 10px;gap:6px}.bg-controls button{font-size:13px;padding:7px 9px}.bg-controls label{font-size:12px}.bg-controls input[type=range]{width:74px}.bg-canvas-wrap{margin:0 10px;min-height:120px}.bg-help{padding:0 10px 7px;font-size:12px}.bg-footer{padding:8px 10px 12px}.bg-footer>div{gap:7px;flex-wrap:wrap}.bg-footer label{font-size:12px}.bg-footer button{font-size:13px;padding:7px 10px}.bg-footer p{font-size:12px;min-height:34px}.bg-view{right:5px;bottom:5px}.bg-view button{min-height:36px;font-size:12px}}
.bg-controls select{max-width:118px;min-height:40px;background:white;border:1px solid #e5ccda;border-radius:8px;padding:6px;color:#724f61;font:inherit}#bgAnalyze[aria-busy=true]{background:#fff1f7;color:#a0436b}#bgAnalyze{font-weight:600}@media(max-width:750px){.bg-controls select{font-size:16px;max-width:110px}.bg-controls label{max-width:100%}}
/* Unified image preparation window. */
.processing-window{box-sizing:border-box;width:min(1000px,96vw);height:min(870px,94dvh);max-width:none;max-height:none;padding:0;border:1px solid #e6c5d6;border-radius:16px;background:#fffbfd;color:#654451;overflow:hidden}.processing-window[open]{display:flex;flex-direction:column}.processing-window::backdrop{background:#34232b88}.processing-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px 9px;gap:12px}.processing-header h2{font-size:20px;margin:0}.processing-header p{font-size:12px;color:#9a7c8b;margin:4px 0 0;max-width:70vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.processing-header>button{flex-shrink:0;font:inherit;font-size:24px;width:40px;height:40px;border:1px solid #ead2de;border-radius:9px;background:white;color:#80516a}.processing-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0 16px 12px;border-bottom:1px solid #ecd9e3}.processing-tabs button{display:flex;justify-content:center;gap:9px;align-items:center;min-height:44px;padding:6px 8px;border:1px solid #e6cedc;border-radius:9px;background:white;color:#896b7c;font:inherit;font-size:14px;cursor:pointer}.processing-tabs button b{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#f3e8ee;font-size:12px}.processing-tabs button[aria-selected=true]{background:#fbe4ee;color:#83415f;border-color:#dca2bd;font-weight:650}.processing-tabs button[aria-selected=true] b{background:#b3507d;color:white}.processing-window button:disabled{opacity:.5;cursor:default}.processing-content{display:flex;flex:1;min-height:0;overflow:hidden}.processing-content>[hidden],.processing-window [hidden]{display:none!important}.processing-quality{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;padding:14px 16px;gap:12px}.processing-quality .panel{margin:0;border:0;background:transparent;box-shadow:none;border-radius:0;padding:0}.processing-quality h2{font-size:17px;margin:0 0 6px}.processing-quality #imageEnhancementSize{margin:0 0 8px}.processing-quality #enhanceImage{max-width:330px}.processing-image{display:flex;align-items:center;justify-content:center;flex:1;min-height:100px;overflow:hidden;border:1px solid #e8d6e1;border-radius:10px;background:repeating-conic-gradient(#f5eef2 0 25%,#fff 0 50%) 0/20px 20px}.processing-image img{display:block;width:100%;height:100%;object-fit:contain;padding:12px;box-sizing:border-box;min-height:0}.processing-footer{display:flex;gap:9px;align-items:center;padding:12px 16px;border-top:1px solid #ecd9e3}.processing-footer>span{font-size:12px;color:#9b7e8e;margin-right:auto}.processing-footer .button{white-space:nowrap;min-height:40px}.processing-notice{font-size:13px;line-height:1.45;padding:8px 16px;margin:0;background:#eaf6ef;color:#39755d}.processing-cleanup{box-sizing:border-box;flex:1;min-width:0;width:100%;max-height:none;overflow:auto;padding:14px 16px}.processing-cleanup h2{font-size:17px;margin:0 0 7px}.processing-cleanup>p{font-size:13px;line-height:1.5}.processing-cleanup #cleanupPreview{max-height:380px;max-width:100%;width:auto;height:auto}.processing-cleanup .cleanup-list{grid-template-columns:repeat(2,minmax(0,1fr))}.processing-window #backgroundDialog{position:static;box-sizing:border-box;display:flex;flex-direction:column;flex:1;width:100%;height:auto;max-height:none;border:0;border-radius:0;margin:0;min-height:0;padding:0}.processing-window #backgroundDialog>.bg-header{display:none}.processing-window #backgroundDialog .bg-canvas-wrap{min-height:100px}#backgroundDialog[hidden]{display:none!important}.processing-window #backgroundDialog .bg-footer{padding-bottom:12px}.processing-window #backgroundDialog .bg-controls{padding-top:12px}
@media(max-width:750px){.processing-window{width:100%;height:100dvh;margin:0;border:0;border-radius:0}.processing-header{padding:8px 10px}.processing-header h2{font-size:17px}.processing-header p{font-size:11px}.processing-tabs{padding:0 10px 9px;gap:5px}.processing-tabs button{font-size:12px;padding:5px 3px;gap:5px;min-height:42px}.processing-tabs button b{width:20px;height:20px;font-size:11px}.processing-quality{padding:10px;gap:9px}.processing-quality h2{font-size:16px}.processing-quality #imageEnhancementSize{font-size:12px}.processing-quality .hint{font-size:12px}.processing-footer{padding:9px 10px;gap:7px;flex-wrap:wrap}.processing-footer>span{flex-basis:100%;font-size:11px}.processing-footer .button{font-size:13px;flex:1}.processing-cleanup{padding:10px}.processing-cleanup #cleanupPreview{max-height:34dvh}.processing-cleanup .cleanup-actions .button{font-size:12px;min-height:38px;padding:7px 8px;flex:1 1 40%}.processing-cleanup .cleanup-list{grid-template-columns:1fr}.processing-window #backgroundDialog .bg-controls{padding-top:9px}.processing-window #backgroundDialog .bg-help{font-size:11px}.processing-notice{font-size:12px;padding:7px 10px}}
@media(max-width:750px){.compact-appearance #cleanupOpen{width:auto;min-width:78px;flex:0 0 auto;gap:4px;font-size:12px;padding:4px 6px}.compact-appearance #cleanupOpen>.toolbar-short{display:inline}.compact-appearance #cleanupOpen>.toolbar-long{display:none}.compact-appearance #cleanupOpen .mobile-tool-icon{width:18px;height:18px}}
.processing-zoom{position:relative;overflow:hidden;touch-action:none;cursor:grab;user-select:none}.processing-zoom.dragging{cursor:grabbing}.processing-zoom>#processingPreview,.processing-zoom>#cleanupPreview{position:absolute;left:0;top:0;display:block;max-width:none;max-height:none;margin:0;padding:0;transform-origin:0 0;object-fit:fill;user-select:none;touch-action:none}.image-zoom-controls{position:absolute;z-index:2;bottom:8px;right:8px;display:flex;align-items:center;gap:4px;padding:4px;border-radius:8px;background:#fffafdf0;font-size:11px;color:#946e82}.image-zoom-controls span{padding:0 6px;pointer-events:none}.image-zoom-controls button{min-width:32px;min-height:34px;border:1px solid #e5ccda;border-radius:7px;background:white;color:#724f61;font:inherit;font-size:13px;padding:4px 8px}.processing-cleanup-viewport{height:360px;max-height:42dvh;min-height:160px;border:1px solid #e8d6e1;border-radius:9px;background:white;margin:10px 0}.compact-correction .brush-tools [data-brush=add] .add-brush-name{display:inline!important}.compact-correction .brush-tools [data-brush=add]{flex:0 0 auto!important}.processing-window #backgroundDialog .bg-controls #bgPan[aria-pressed=true]{color:#785597;background:#f0eaf9}@media(max-width:750px){.image-zoom-controls span{display:none}.processing-cleanup-viewport{height:32dvh}.compact-correction .brush-tools [data-brush=add]>span{display:none!important}}
.folding-panel{border:1px solid #dfb3c9;background:linear-gradient(180deg,#fff3f9 0,#fff 145px);box-shadow:0 3px 14px #a5457010;padding:0;overflow:hidden}.folding-panel>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;padding:20px 20px 14px;user-select:none}.folding-panel>summary::-webkit-details-marker{display:none}.folding-panel>summary:after{content:'';width:8px;height:8px;border-right:2px solid #ac6e8d;border-bottom:2px solid #ac6e8d;transform:rotate(45deg);margin-left:auto;flex-shrink:0;transition:transform .15s}.folding-panel[open]>summary:after{transform:rotate(225deg)}.folding-panel>summary h2{font-size:18px;font-weight:700;line-height:1.35;margin:0!important}.folding-body{padding:0 20px 20px}.folding-panel:not([open])>summary{padding-bottom:20px}.model-build #modelBuildRetry:not([hidden]){display:block;pointer-events:auto;margin:12px auto 0}.model-build:has(#modelBuildRetry:not([hidden])){pointer-events:auto}@media(max-width:750px){.folding-panel>summary{padding:16px 14px 12px}.folding-body{padding:0 14px 16px}.folding-panel:not([open])>summary{padding-bottom:16px}.folding-panel>summary h2{font-size:17px}}

#recessPanel.folding-panel{padding:0}#cutterControls .folding-panel{padding:0}#cutterControls .folding-panel>.folding-body{padding-top:0}#cutterControls .folding-panel>summary h2{min-width:0}
.inner-local-settings{flex-basis:100%;display:flex;flex-wrap:wrap;gap:6px 18px}.inner-local-settings .check{font-size:12px;line-height:1.4}.inner-local-settings input{flex-shrink:0}

.inner-thickness{flex-basis:100%;margin:4px 0;font-size:12px}
/* Shared internal settings with compact, individually expandable overrides. */
#innerCommon{margin:12px 0 14px;padding:12px;border:1px solid #ead4e0;border-radius:12px;background:linear-gradient(130deg,#fffafd,#f9e8f1)}
#innerDetails .inner-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:10px;margin:0 0 8px}
#innerDetails .inner-settings .field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:12px}
#innerDetails .inner-settings .field>span{display:flex;align-items:flex-end;min-height:32px;line-height:1.3}
#innerDetails .inner-settings input,#innerDetails .inner-settings select{box-sizing:border-box;width:100%;height:44px;min-height:44px;max-width:100%;margin:0;border:1px solid #dfc9d5;border-radius:8px;padding:8px;color:var(--ink);background:#fff;font:inherit;font-size:13px}
#innerDetails .inner-settings input:disabled,#innerDetails .inner-settings select:disabled{background:#f5eff2;color:#a18c97;opacity:1}
#innerDetails .inner-local-settings{display:grid;gap:7px;margin:6px 0 0}
#innerDetails .inner-local-settings .check{margin:0;font-size:12px}
.inner-individual{margin:4px 0 12px;border:1px solid #ead4e0;border-radius:10px;background:#ffffff80;overflow:hidden}
.inner-individual>summary,.inner-row>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;padding:12px;font-size:13px;font-weight:600}
.inner-individual>summary::-webkit-details-marker,.inner-row>summary::-webkit-details-marker{display:none}
.inner-individual>summary:after,.inner-row>summary:after{content:'';width:7px;height:7px;border-right:1.5px solid #aa6d8b;border-bottom:1.5px solid #aa6d8b;transform:rotate(45deg);flex-shrink:0;margin-left:auto;margin-right:3px;margin-top:-4px}
.inner-individual[open]>summary:after,.inner-row[open]>summary:after{transform:rotate(225deg);margin-top:4px}
#innerList .inner-row{display:block;margin:0;padding:0;border-top:1px solid #ead4e0}
.inner-row>summary{min-height:44px;box-sizing:border-box;padding:8px 12px;flex-wrap:wrap;font-weight:500}
.inner-row>summary .check{margin:0;font-size:13px;cursor:pointer}.inner-custom-badge{font-size:10px;color:#a05479;background:#f9e4ee;padding:3px 6px;border-radius:5px}
.inner-row-body{padding:0 12px 12px}.inner-row-actions{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-top:10px}
.inner-row-actions .text-button{min-height:32px;white-space:normal}
@media(max-width:750px){#innerDetails .inner-settings input,#innerDetails .inner-settings select{font-size:16px}#innerDetails .inner-settings{gap:8px}#innerCommon{padding:10px}.inner-row>summary{min-height:48px}}
.inner-reset-all{padding:10px 12px 12px;border-top:1px solid #ead4e0}.inner-reset-all .button{min-height:40px;font-size:13px}
#innerList .inner-row.inner-selected>summary{background:#fbe5f0;color:#963e6b}
.inner-identify-halo{stroke:#f2a7ce;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;opacity:.5}
.inner-identify-selected{stroke:#a73875;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.inner-identify-disabled{stroke:#a89ba2;stroke-width:1.5;stroke-dasharray:4 4;opacity:.75}
.inner-number{cursor:pointer;outline:none}.inner-number-leader{stroke:#b8789a;stroke-width:1}.inner-number-disc{fill:#fffafd;stroke:#b8789a;stroke-width:1.2}.inner-number-text{fill:#91516f;font-family:inherit;font-weight:700;pointer-events:none}
.inner-number.selected .inner-number-disc,.inner-number:focus .inner-number-disc{fill:#ac427a;stroke:#ac427a}.inner-number.selected .inner-number-text,.inner-number:focus .inner-number-text{fill:#fff}.inner-number.disabled:not(.selected){opacity:.65}
#exportSection .compact-export-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px}
#exportSection .compact-export-grid .button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:56px;margin:0;padding:6px 3px;border-radius:8px;font-size:13px;line-height:1.2;font-weight:600;overflow-wrap:normal;text-align:center;background:#f49ac2;border-color:#ef94bd;color:#61364a;-webkit-text-stroke:0;text-shadow:none}
#exportSection .compact-export-grid .button>span,#exportSection .compact-export-grid .button>small{display:block;width:100%;margin:0;text-align:center}
#exportSection .compact-export-grid .button small{font-size:10px;line-height:1.1;font-weight:500;color:inherit}
#exportSection .compact-export-grid .button:hover{background:#f18fbc;border-color:#e780ae}
.stamp-view{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:10px}.stamp-view button{min-height:38px;padding:6px 4px;background:#fff;border:1px solid #e4bdd2;border-radius:7px;color:#87516c;font-size:12px}.stamp-view button[aria-pressed=true]{background:#f6c8df;border-color:#bd7398;color:#713b58}.stamp-mode .inner-reset-all{display:none}.stamp-contour-summary{display:flex;align-items:center;min-height:42px;padding:7px 12px}.stamp-contour-summary .check{margin:0!important}.stamp-mode #stampPanel .two-fields .field{font-size:12px}#stampDownloads .button{font-size:13px}
#innerDetails .inner-settings .field>span{flex:1}
#cutterControls #stampPanel .two-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:10px}#cutterControls #stampPanel .two-fields .field{display:grid;grid-template-rows:1fr 44px;gap:7px;min-width:0;margin:0 0 12px;padding-right:0}#stampPanel .two-fields .field>span{display:flex;align-items:flex-end;min-height:36px;padding-right:23px;line-height:1.45}#cutterControls #stampPanel .two-fields .field>input{box-sizing:border-box;width:100%;min-width:0;height:44px;min-height:44px;margin:0;padding:9px 10px}#stampPanel .check.has-field-help{padding-right:0;gap:6px}#stampPanel .check .field-help{flex-shrink:0;margin-left:auto}
.stamp-handle-body{padding:10px}.stamp-handle-panel>summary{font-size:13px}.stamp-handle-body .button{font-size:13px}.stamp-holder-plan{cursor:grab;touch-action:none}.stamp-holder-plan:active{cursor:grabbing}.stamp-holder-plan circle{fill:#e6b0cd;fill-opacity:.7;stroke:#a6537c;stroke-width:1.5;vector-effect:non-scaling-stroke}.stamp-holder-plan text{fill:#7b3c5d;font-weight:600;pointer-events:none}