:root{--bg:#111a20;--panel:#19262eee;--line:#354953;--text:#dfebe9;--muted:#94aaa9;--accent:#8dd4ba;--warning:#f2b77b;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--text);background:var(--bg);font-size:12px;color-scheme:dark}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button,input,select{font:inherit}button,a,input,select{outline-offset:3px}button{cursor:pointer;color:inherit;border:1px solid var(--line);background:#25363e;border-radius:8px}button:disabled{opacity:.28;cursor:default}button:hover:not(:disabled){background:#354d51;border-color:#648c80}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent)}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.app-header{height:54px;display:flex;align-items:center;gap:9px;padding:7px 13px;background:#152229;border-bottom:1px solid #2c3e46;position:relative;z-index:10}.brand{display:grid;place-items:center;width:32px;height:36px;font-size:25px;font-weight:750;color:var(--accent);margin-right:0}.case-button{position:relative}.case-button #dirtyDot{position:absolute;top:3px;right:5px;font-size:8px;color:#e4b96a}.project-actions,.panel-actions,.view-modes{display:flex;align-items:center;gap:5px}.panel-actions{margin-left:auto}.icon-button,.view-button,.tool-button{display:grid;place-items:center;min-width:36px;width:36px;height:36px;flex:none;padding:0;font-size:21px;font-weight:400;line-height:1;background:#203139}.button{padding:9px 12px;min-height:36px;font-size:11px}.button.small{min-height:30px;padding:5px 9px}.button.full{width:100%;margin:5px 0}.primary,.active.icon-button,.active.tool-button{background:#36574b;border-color:#7aa590;color:#cdfbe4}.workspace{position:relative;height:calc(100% - 54px);width:100%}.workflow{position:absolute;inset:0;pointer-events:none;z-index:6}.steps{pointer-events:auto;position:absolute;left:10px;top:12px;display:flex;flex-direction:column;gap:4px;padding:5px;border:1px solid #374b53;border-radius:12px;background:#14252ad9;backdrop-filter:blur(10px)}.step{position:relative;width:35px;height:35px;display:grid;place-items:center;background:transparent;border-color:transparent;border-radius:7px;font-size:24px;color:#99adaa}.step.active{color:var(--accent);background:#35544b;border-color:#668c7b}.step.complete:after{content:'';position:absolute;bottom:3px;right:3px;width:3px;height:3px;border-radius:50%;background:var(--accent)}.floating-panel{position:absolute;z-index:8;max-height:calc(100% - 90px);overflow:auto;scrollbar-width:thin;scrollbar-color:#557766 transparent;background:#192930f2;backdrop-filter:blur(16px);border:1px solid #4b615e;border-radius:11px;box-shadow:0 12px 35px #0005}.stage-panel{pointer-events:auto;top:12px;left:67px;width:220px;padding:17px}.stage-panel h2{font-size:14px;font-weight:500;margin:0 0 15px}.stage-panel p{font-size:11px;line-height:1.6}.field{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:13px 0}.field label{font-size:11px;color:#b9cdca}.input-wrap{display:flex;align-items:center;gap:5px}.input-wrap>span{font-size:10px;color:#8caaa5;min-width:16px}input[type=number]{width:66px;min-height:30px;background:#101f26;color:#eef5ec;border:1px solid #3a5558;border-radius:6px;text-align:right;padding:5px}select{background:#102028;border:1px solid #3a5558;color:#cfdfdb;padding:6px;border-radius:6px;max-width:125px}.stage-action{display:flex;justify-content:space-between;align-items:center}.stage-nav-next{width:100%;padding:8px;margin-top:8px;background:transparent;color:#a4c8b7;border-color:transparent}.tool-grid{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:14px}.stat-pair{display:flex;align-items:center;justify-content:space-between;color:#acc1b9;margin:10px 0}.warnings{margin-top:12px;color:var(--warning)}.warnings summary{cursor:pointer}.warnings p{font-size:11px}.viewport-section{position:absolute;inset:0}.viewport-topbar{position:absolute;right:10px;top:12px;z-index:4}.view-modes{padding:4px;background:#14252adb;border:1px solid #374b53;border-radius:10px}.view-button{background:transparent;border-color:transparent;font-size:21px;width:31px;min-width:31px;height:31px}.view-button.active{background:#344b46;color:var(--accent)}.view-modes .icon-button{width:31px;min-width:31px;height:31px;background:transparent;border-color:transparent}#viewport{position:absolute;inset:0;overflow:hidden;background:radial-gradient(ellipse at 51% 43%,#2f4249 0%,#20343e 48%,#14252e 100%);outline:none}#canvas{width:100%;height:100%;display:block;touch-action:none;outline:none}.trace-tools,.retention-tools,.survey-tools{position:absolute;left:69px;display:flex;align-items:center;gap:4px;z-index:5;padding:5px;background:#172b30e8;backdrop-filter:blur(10px);border:1px solid #45615f;border-radius:10px}.trace-tools{top:64px}.retention-tools{top:112px}.survey-tools{left:70px;bottom:18px;max-width:calc(100% - 90px);gap:8px;flex-wrap:wrap}.survey-tools label{display:flex;align-items:center;gap:4px;font-size:11px}.survey-tools input{width:49px}.survey-tools .icon-button{width:30px;min-width:30px;height:30px;font-size:19px}.survey-colors{display:flex;gap:2px}.survey-colors i{display:block;height:17px;width:7px;border-radius:2px;background:#dbe3da}.survey-colors i:first-child{background:#b62549}.survey-colors i:nth-child(2){background:#3abaac}.survey-colors i:nth-child(3){background:#e3b258}.axis-indicator{position:absolute;right:25px;bottom:27px;width:44px;height:46px;pointer-events:none;font-size:10px;opacity:.7}.axis-z{color:#a1c8ee;position:absolute;top:0;left:20px}.axis-y{color:#92ceaf;position:absolute;top:27px;left:0}.axis-x{color:#da9b9f;position:absolute;top:32px;right:0}.axis-indicator:before,.axis-indicator:after{content:'';position:absolute;left:24px;top:16px;height:20px;width:1px;background:#739395;transform:rotate(-48deg);transform-origin:top}.axis-indicator:after{transform:rotate(50deg)}.empty-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:15px;pointer-events:none}.empty-state>*{pointer-events:auto}.empty-import{display:grid;place-items:center;width:82px;height:82px;font-size:45px;border:1px dashed #7fa59d;border-radius:24px;color:var(--accent);background:#25423c77}.tool-hint{display:none!important}.drawing-bar,.curve-bar{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:7px;z-index:6;padding:7px;background:#182f32ef;border:1px solid #527568;border-radius:11px;box-shadow:0 8px 25px #0003;max-width:calc(100% - 90px)}.drawing-bar>span{min-width:15px;text-align:center;color:var(--accent)}.curve-bar{flex-wrap:wrap;width:max-content;font-size:11px}.curve-bar label{display:flex;gap:5px;align-items:center}.curve-bar input{width:55px}.curve-bar select{max-width:70px}.curve-bar-label{font-size:22px;color:var(--accent)}.transform-hint{position:absolute;top:175px;left:50%;transform:translateX(-50%);padding:10px 15px;background:#274438ef;border:1px solid #8be4cd;border-radius:7px;z-index:9;font-size:12px;white-space:nowrap}.preview-warning{position:absolute;left:70px;bottom:85px;max-width:calc(100% - 90px);padding:10px;background:#452c2bf0;border:1px solid #945953;color:#ffcbc7;border-radius:7px;z-index:7;font-size:11px;line-height:1.5}.inspector{right:12px;top:60px;width:244px;padding:14px}.inspector details{margin-bottom:13px}.inspector summary{cursor:pointer;font-size:11px;color:#bdd1c8;padding:0 0 9px}.inspector summary span{float:right;color:#7eaaa0}.layer-item{padding:8px 7px;border:1px solid transparent;border-radius:7px;margin-bottom:3px}.layer-item.visible{background:#2b413f;border-color:#415d50}.layer-top{display:flex;align-items:center;gap:8px}.layer-swatch{width:7px;height:7px;border-radius:3px}.layer-title{flex:1;font-size:11px}.layer-eye{background:transparent;border:0;width:23px;height:23px;font-size:19px}.layer-eye.off{opacity:.3}.layer-data{display:none}.layer-opacity{display:flex;align-items:center;gap:7px;font-size:9px;margin-top:5px}.layer-opacity>span:first-child{display:none}.layer-opacity input{width:100%;height:3px;accent-color:var(--accent)}.object-list{max-height:230px;overflow:auto}.object-row{display:flex;align-items:center;gap:9px;background:transparent;border-color:transparent;width:100%;text-align:left;padding:7px}.object-row.active{background:#344b3e;border-color:#657e5e}.object-icon{font-size:20px;color:#d8c18a;width:22px}.object-row-name{font-size:11px}.empty-list{text-align:center;opacity:.3;padding:10px}.object-inspector h3{font-size:13px;font-weight:500;border-top:1px solid #3c534e;padding-top:14px;margin:16px 0 8px}.object-inspector .field{margin:10px 0}.point-edit-button{width:100%;font-size:18px;margin-top:10px}.point-edit-button.active{background:#446758;color:#d1f5d5}.delete-button{color:#dca69c;background:#302d2b;border-color:#704c43}.inspector-footer{margin-top:13px}.secondary-row,.sculpt-tools{display:flex;gap:6px;align-items:center;justify-content:center}.vector-fields{border-top:1px solid #3b534b;padding-top:8px;margin-top:10px}.vector-fields>span{font-size:10px;color:#8fac9c}.busy-overlay{position:absolute;left:50%;bottom:85px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:12px 18px;background:#1d353eef;border:1px solid #57756e;border-radius:10px;z-index:10;font-size:11px;pointer-events:none}.spinner{width:20px;height:20px;border:2px solid #466960;border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.drop-overlay{position:absolute;inset:14px;display:grid;place-items:center;background:#1d453ee8;border:2px dashed var(--accent);border-radius:15px;font-size:70px;pointer-events:none;z-index:11}.toast{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);max-width:min(550px,calc(100% - 30px));padding:12px 17px;background:#244d3d;border:1px solid #80b29d;border-radius:9px;box-shadow:0 10px 40px #0005;color:#e0f2e6;z-index:20;font-size:12px;line-height:1.5}.toast.error{background:#4c302c;border-color:#bb7665;color:#ffd6c9}dialog{color:var(--text);background:#1c3034;border:1px solid #60756e;border-radius:13px;width:min(440px,calc(100% - 30px));padding:22px;box-shadow:0 25px 70px #0008;max-height:85%;overflow:auto}dialog::backdrop{background:#07171c99;backdrop-filter:blur(5px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.dialog-heading h2{font-size:17px;font-weight:500;margin:0}.dialog-heading button{background:transparent;border:0;font-size:23px}.dialog-input,.dialog-select{width:100%;max-width:100%;margin:10px 0 18px;background:#102427;color:var(--text);padding:10px;border:1px solid #4b6960;border-radius:7px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}.dialog-description{display:none}.eyebrow{font-size:10px;color:#9fbfae}.case-row,.export-link{display:flex;align-items:center;justify-content:space-between;width:100%;background:#2c4742;border:1px solid #466c5e;padding:12px;margin:7px 0;border-radius:7px;text-align:left}.case-row small{display:block;font-size:9px;margin-top:4px;color:#9db8a8}.warning-text{color:var(--warning);line-height:1.5;font-size:11px}
@media(max-width:600px){.app-header{padding:6px 9px;gap:4px;height:49px}.brand{font-size:23px;width:25px}.icon-button{min-width:31px;width:31px;height:33px;font-size:20px}.project-actions,.panel-actions{gap:3px}.workspace{height:calc(100% - 49px)}.steps{left:7px;top:9px;padding:3px;gap:3px}.step{width:31px;height:31px;font-size:22px}.stage-panel{left:50px;top:54px;width:210px;max-height:calc(100% - 145px);padding:14px}.viewport-topbar{top:9px;right:8px}.view-modes{gap:1px;padding:3px}.view-button,.view-modes .icon-button{height:28px;width:29px;min-width:29px}.trace-tools{left:53px;top:53px;gap:3px;padding:4px}.retention-tools{left:53px;top:99px;gap:3px;padding:4px}.trace-tools .icon-button,.retention-tools .icon-button{width:32px;min-width:32px;height:32px}.survey-tools{left:53px;bottom:16px;max-width:calc(100% - 65px);gap:5px;padding:5px}.survey-tools input{width:46px;font-size:11px}.survey-colors{display:none}.axis-indicator{right:17px;bottom:80px;transform:scale(.8);transform-origin:bottom right}.drawing-bar,.curve-bar{left:53px;transform:none;max-width:calc(100% - 66px);bottom:16px;padding:6px;gap:5px}.curve-bar{justify-content:flex-start}.curve-bar-label{display:none}.curve-bar label{font-size:10px}.curve-bar input{width:48px}.curve-bar>span:not(.curve-bar-label){font-size:10px}.curve-bar select{max-width:61px}.inspector{right:8px;top:54px;width:226px;max-height:calc(100% - 135px);padding:12px}.preview-warning{left:53px;max-width:calc(100% - 65px);bottom:103px}.busy-overlay{bottom:114px}.transform-hint{top:154px}.toast{font-size:11px}.floating-panel{z-index:9}}
@media(max-height:580px){.steps{gap:1px;top:5px}.step{height:28px}.survey-tools{bottom:8px}.trace-tools{top:58px}.retention-tools{top:104px}.floating-panel{max-height:calc(100% - 90px)}}
.trace-tools{z-index:7}.curve-menu{position:relative}.curve-menu>summary{display:grid;place-items:center;cursor:pointer;list-style:none;width:36px;height:36px;font-size:23px;border:1px solid #46615a;border-radius:8px;background:#203139;color:#bcd7c9}.curve-menu>summary::-webkit-details-marker{display:none}.curve-menu[open]>summary{background:#36574b;color:#cdfbe4;border-color:#7aa590}.curve-menu-types{position:absolute;top:45px;left:-84px;width:218px;max-height:calc(100dvh - 210px);overflow:auto;scrollbar-width:thin;padding:8px;background:#192c31f7;border:1px solid #536f63;border-radius:11px;box-shadow:0 14px 35px #0006;backdrop-filter:blur(15px)}.curve-menu-types>details+details{border-top:1px solid #304b45}.curve-menu-types summary{display:flex;align-items:center;gap:9px;cursor:pointer;list-style:none;padding:9px 7px;font-size:11px;border-radius:6px}.curve-menu-types summary::-webkit-details-marker{display:none}.curve-menu-types summary:after{content:'›';margin-left:auto;font-size:17px;color:#86aa9e}.curve-menu-types details[open]>summary:after{transform:rotate(90deg)}.curve-menu-types summary:hover{background:#2b4640}.curve-menu-types summary>span:first-child{display:grid;place-items:center;width:24px;font-size:21px;color:#c9daca}.curve-menu-types summary small{margin-left:auto;color:#89a89a}.type-actions{display:flex;gap:5px;padding:0 7px 6px}.type-actions .icon-button{width:31px;min-width:31px;height:29px;font-size:20px}.curve-menu-types .object-row{padding:5px 9px}.curve-menu-types .object-row-name{font-variant-numeric:tabular-nums}.spline-backup{margin-left:auto;color:#83b79a}.object-type{border-bottom:1px solid #3a5148;margin-bottom:6px!important}.object-type>summary{display:flex;align-items:center;gap:7px;padding:7px!important}.object-type>summary>span{float:none;font-size:20px}.object-type>summary>small{margin-left:auto;color:#94bbaa}.object-list{max-height:310px}.curve-menu:focus-within{outline:0}#designModeButton.active{background:#5e5236;border-color:#c6aa70;color:#ffe9b7}
@media(max-width:600px){.curve-menu>summary{width:32px;height:32px}.curve-menu-types{top:41px;left:-74px;width:207px;max-height:calc(100dvh - 194px)}}
@media(max-width:410px){.app-header{gap:2px;padding:6px}.app-header .icon-button{min-width:27px;width:27px;height:31px;font-size:18px}.project-actions,.panel-actions{gap:2px}.brand{width:21px}}

.corrugation-panel{border:1px solid #53655f;border-radius:8px;margin:15px 0;padding:0 10px 10px}.corrugation-panel>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:12px;padding:12px 0;list-style:none}.corrugation-panel>summary::-webkit-details-marker{display:none}.corrugation-panel>summary span{font-size:18px;color:#bcc5ce}.corrugation-panel:not([open]){padding-bottom:0}.corrugation-panel .field{margin-top:8px}.mask-preview{display:flex;gap:12px;align-items:center;padding:8px 0}.mask-preview canvas{width:94px;height:94px;max-width:60%;border:1px solid #61746d;border-radius:6px;background:#101717}.mask-actions{display:flex;flex-wrap:wrap;gap:4px}.mask-actions>span{width:100%;font-size:11px;margin-bottom:5px;color:#b2c6be}.mask-actions .icon-button{width:30px;min-width:30px;height:30px;font-size:21px}.corrugation-panel .secondary-row{margin-top:12px;justify-content:space-between}.corrugation-panel .button{font-size:11px;padding:8px 10px}

/* Dimensions remain visible while the slider previews their effect. */
.slider-field{display:grid;grid-template-columns:1fr auto;gap:3px 8px;align-items:center;margin:13px 0 16px}.slider-field>label{min-width:0}.slider-field>output,.survey-angle output,.curve-section-dimension output{font-size:11px;color:#e1e7ec;font-variant-numeric:tabular-nums;white-space:nowrap}.slider-field>input[type=range]{grid-column:1/-1;width:100%;margin:0}.object-inspector .slider-field{margin:12px 0 15px}input[type=range]{accent-color:#b8c6cc;cursor:ew-resize;height:22px;min-width:0;touch-action:pan-y}input[type=range]:disabled{cursor:default;opacity:.4}.slider-field>input[type=range],.survey-angle input[type=range],.curve-section-dimension input[type=range]{appearance:none;-webkit-appearance:none;background:transparent;border:0;padding:0}.slider-field>input[type=range]::-webkit-slider-runnable-track,.survey-angle input[type=range]::-webkit-slider-runnable-track,.curve-section-dimension input[type=range]::-webkit-slider-runnable-track{height:4px;background:#56656b;border:1px solid #63747a;border-radius:4px}.slider-field>input[type=range]::-webkit-slider-thumb,.survey-angle input[type=range]::-webkit-slider-thumb,.curve-section-dimension input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:13px;height:13px;background:#d7e0e5;border:1px solid #eff4f6;border-radius:50%;margin-top:-5px;box-shadow:0 1px 4px #0007}.slider-field>input[type=range]::-moz-range-track,.survey-angle input[type=range]::-moz-range-track,.curve-section-dimension input[type=range]::-moz-range-track{height:4px;background:#56656b;border:1px solid #63747a;border-radius:4px}.slider-field>input[type=range]::-moz-range-thumb,.survey-angle input[type=range]::-moz-range-thumb,.curve-section-dimension input[type=range]::-moz-range-thumb{width:12px;height:12px;background:#d7e0e5;border:1px solid #eff4f6;border-radius:50%}.survey-title{font-size:11px;color:#d5e1df;padding:0 3px}.survey-tools .survey-angle{gap:7px;min-width:0}.survey-tools .survey-angle input{width:112px;margin:0}.survey-angle output{min-width:40px;text-align:right}.survey-tools #surveyFromView{min-width:46px;height:30px}.curve-bar .curve-section-dimension{gap:8px}.curve-bar .curve-section-dimension input{width:132px;margin:0}.curve-section-dimension output{min-width:48px;text-align:right}.object-icon{color:#bcc5ce}
@media(max-width:780px){.survey-tools .survey-angle input{width:76px}.survey-tools{gap:6px}.survey-colors{display:none}}
@media(max-width:600px){.slider-field{gap:3px 7px}.survey-tools .survey-angle input{width:70px}.survey-title{padding-left:1px}.survey-tools{gap:5px 7px}.survey-angle output{min-width:36px}.curve-bar .curve-section-dimension{gap:5px}.curve-bar .curve-section-dimension input{width:95px}.curve-section-dimension output{min-width:44px;font-size:10px}}
@media(max-width:420px){.survey-tools{max-width:calc(100% - 65px);padding:5px 7px}.survey-title{width:calc(100% - 45px)}.survey-tools .survey-angle{flex:1 0 100%}.survey-tools .survey-angle input{flex:1;width:125px}.survey-tools #surveyFromView{margin-left:auto}.curve-bar .curve-section-dimension input{width:78px}.curve-bar{gap:5px}.curve-bar .button.small{padding:5px 7px}}

.dialog-description{display:block;line-height:1.6;color:#bed1cd;margin:14px 0 20px}.busy-overlay{pointer-events:auto}
.toast.warning{background:#4d3817;color:#ffe1a2;border:1px solid #b08031;max-width:min(620px,90vw);white-space:normal}
#busyMessage,#busyElapsed{display:block;margin-top:8px;max-width:420px}#cancelJobButton{margin-top:12px}.tab-overlay{position:fixed;inset:0;z-index:9999;background:#14242ff5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}.tab-overlay[hidden]{display:none}
.thickness-readout{display:flex;align-items:center;gap:10px;font-size:11px;margin:8px 0}.thickness-readout span:first-child{color:#72aafd}.thickness-readout span:nth-child(2){color:#c7d9e6}.thickness-readout span:nth-child(3){color:#ffd179}.thickness-readout b{display:block;font-variant-numeric:tabular-nums}.thickness-readout button{margin-left:auto}
.workspace:has(#stagePanel:not([hidden])) .trace-tools,.workspace:has(#stagePanel:not([hidden])) .retention-tools{left:300px}

.survey-colors i:nth-child(1){background:#ffd600}.survey-colors i:nth-child(2){background:#ff8a00}.survey-colors i:nth-child(3){background:#ed2525}
.tooth-picker{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px;padding:16px 0}.tooth-quadrant{display:grid;grid-template-columns:repeat(8,1fr);gap:4px}.tooth-choice{padding:10px 5px;min-width:30px}.tooth-number{display:block;text-align:center;font-size:22px;padding:8px}.view-modes{flex-wrap:wrap;max-width:100%}@media(max-width:700px){.tooth-picker{grid-template-columns:1fr}.viewport-topbar{max-width:calc(100% - 64px)}}

dialog:has(.tooth-picker){width:min(740px,calc(100vw - 32px));max-width:calc(100vw - 32px)}

.arch-toolbar{display:flex;align-items:center;gap:3px;margin-left:auto;padding:3px;border:1px solid var(--border,#354b51);border-radius:9px}.arch-toolbar .button{min-width:67px;padding:8px;font-size:11px}.arch-toolbar .active{background:#446c60;border-color:#9aab84}.arch-toolbar button[data-loaded="true"]::after{content:" ·";color:#b3d9c5}.project-actions{flex-shrink:1}.panel-actions{margin-left:8px}@media(max-width:850px){.arch-toolbar .button{min-width:50px;font-size:10px;padding:7px 3px}.project-actions{gap:2px}.app-header{gap:4px}}


.appearance-options{display:grid;gap:9px}.appearance-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:7px 0;font-size:12px;color:#e1e7ec}.appearance-row input[type=color]{width:64px;height:33px;padding:2px;border:1px solid #82929b;border-radius:7px;background:#14212a;cursor:pointer}.appearance-row select{width:130px}.appearance-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.appearance-version{font-size:11px;color:#adc1cd;margin-top:9px}.view-modes,.steps,.floating-panel{border-color:#65757e}.app-header .icon-button:focus-visible,.view-modes button:focus-visible{outline:2px solid #dcf7ef;outline-offset:2px}

/* Initial scan cleanup tools stay outside the mesh inspector. */
.cleanup-tools{position:absolute;left:74px;top:66px;z-index:7;display:flex;align-items:center;gap:5px;flex-wrap:wrap;max-width:calc(100% - 94px);padding:5px;background:#14252aee;border:1px solid #374b53;border-radius:10px;backdrop-filter:blur(10px)}
.trim-actions{display:flex;align-items:center;gap:5px;padding-left:5px;border-left:1px solid #4b615e}
.workspace:has(#stagePanel:not([hidden])) .cleanup-tools{left:300px;max-width:calc(100% - 320px)}
.steps{max-height:calc(100% - 24px);overflow-y:auto;scrollbar-width:none}
@media(max-width:760px){.cleanup-tools{top:110px}.workspace:has(#stagePanel:not([hidden])) .cleanup-tools{left:300px;max-width:calc(100% - 310px)}}
.gpu-light{display:inline-block;width:10px;height:10px;flex:0 0 10px;border-radius:50%;border:1px solid #72818b;background:#45515b;margin:0 3px 0 0;box-shadow:inset 0 0 2px #0008}
.gpu-light[data-state=active]{background:#53f396;border-color:#a4ffca;box-shadow:0 0 8px #53f39688}
.gpu-light[data-state=software]{background:#e7ac49;border-color:#f7d39a;box-shadow:0 0 5px #e7ac4944}

/* Compact secondary palette; selected objects are edited in the inspector. */
.curve-menu-types{display:grid;grid-template-columns:repeat(4,40px);gap:7px;width:max-content;left:0;padding:10px}.curve-menu-types .icon-button{width:40px;height:40px}.view-gizmo{position:absolute;right:16px;top:58px;width:112px;height:112px;z-index:5;touch-action:none;border-radius:50%;background:#12232b55}.view-gizmo svg{position:absolute;inset:0;pointer-events:none}.gizmo-axis,.gizmo-center{position:absolute;transform:translate(-50%,-50%);border-radius:50%;width:24px;height:24px;padding:0;font-size:12px;font-weight:700;line-height:22px;border:1px solid var(--axis-color);background:var(--axis-color);color:#13232b;touch-action:none}.gizmo-center{left:56px;top:56px;width:19px;height:19px;line-height:15px;color:#dbe6e9;background:#324951;border-color:#789099;z-index:1}.gizmo-axis:hover{filter:brightness(1.3)}.layer-sliders{position:absolute;right:17px;top:184px;z-index:5;display:flex;flex-direction:column;gap:7px;padding:10px;background:#192930e3;border:1px solid #45615f;border-radius:10px;backdrop-filter:blur(10px)}.layer-sliders:empty{display:none}.visibility-slider{display:flex;align-items:center;gap:8px}.visibility-slider>span{width:24px;text-align:center;font-size:21px;color:var(--layer-color)}.visibility-slider input{width:94px;height:18px;margin:0}.brush-toolbar{position:absolute;left:69px;top:63px;z-index:7;display:flex;gap:6px;align-items:center;background:#192930ee;border:1px solid #45615f;border-radius:10px;padding:5px;backdrop-filter:blur(10px)}.brush-toolbar label{display:flex;align-items:center;gap:5px;padding:0 5px}.brush-toolbar input{width:95px}.brush-toolbar output{min-width:47px;font-variant-numeric:tabular-nums;font-size:11px}.brush-toolbar label>span{font-size:18px}.inspector{top:12px;right:153px}.object-inspector h3{margin-top:0;border-top:0;padding-top:0}.view-modes{max-width:90px}
@media(max-width:720px){.brush-toolbar{flex-wrap:wrap;max-width:calc(100% - 210px)}.brush-toolbar input{width:70px}.layer-sliders{padding:6px;right:10px}.visibility-slider input{width:70px}.inspector{right:10px;top:338px;max-height:calc(100% - 350px)}.curve-menu-types{grid-template-columns:repeat(3,40px)}}

.brush-toolbar{top:116px}

/* Keep framing reachable when an axis points directly at the camera. */
.gizmo-center{z-index:20}

/* Persistent PPR palette, next to the workflow rail. */
#traceTools{--ppr-button:clamp(20px,calc((100dvh - 154px)/17),34px);left:69px;top:12px;flex-direction:column;gap:3px;padding:5px;width:46px;max-height:calc(100% - 24px);overflow-y:auto;scrollbar-width:thin;align-items:center}
#traceTools .icon-button{width:34px;min-width:34px;height:var(--ppr-button);min-height:var(--ppr-button);font-size:21px;flex-shrink:0}
#traceTools #curveMenu{position:static;border-top:1px solid #45615f;padding-top:4px;margin-top:1px}
#traceTools #curveMenuTypes{position:static;display:grid;grid-template-columns:34px;gap:3px;width:auto;max-height:none;overflow:visible;padding:0;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none}
.workspace:has(#traceTools:not([hidden])) #retentionTools{left:126px;top:12px}
.workspace:has(#traceTools:not([hidden])) #stagePanel{left:126px;top:64px}
@media(max-width:600px){#traceTools{left:53px;top:9px;width:42px;padding:3px}.workspace:has(#traceTools:not([hidden])) #retentionTools{left:104px;top:9px;gap:3px;padding:3px}.workspace:has(#traceTools:not([hidden])) #stagePanel{left:104px;top:58px}}
/* PROCA R: monochrome controls, with a reserved status strip. */
:root{--bg:#090909;--panel:#090909;--line:#444;--text:#fff;--muted:#999;--accent:#fff;--warning:#ddd;color:#fff;background:#090909;color-scheme:dark}
body,.app-header{background:#090909;color:#fff}.app-header{border-bottom:1px solid #444}.brand{width:auto;min-width:86px;font-size:18px;white-space:nowrap;letter-spacing:.03em;color:#fff}
button,.button,.icon-button,input,select,.dialog-input,.dialog-select{background:#090909;color:#fff;border-color:#555}
button:hover:not(:disabled){background:#292929;border-color:#ddd}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #fff!important}
button.active,.button.primary,.icon-button.primary,.step.active,.point-edit-button.active,.arch-toolbar .active,.view-button.active{background:#353535;color:#fff;border-color:#999}
.steps,.floating-panel,.stage-panel,.inspector,.view-modes,.trace-tools,.retention-tools,.survey-tools,.cleanup-tools,.layer-sliders,.brush-toolbar,.drawing-bar,.curve-bar,.transform-hint,dialog{background:#090909;color:#fff;border-color:#444;box-shadow:0 2px 8px #0000000a;backdrop-filter:none}
.step{color:#ddd}.step.complete{color:#fff}.stage-nav-next,.field label,.field output,.field-value,.stat-pair,.object-icon,.object-inspector h3,.inspector summary,.inspector summary span,.vector-fields>span,.eyebrow,.case-row small,.appearance-row,.appearance-version,.help-note,.thickness-readout,.curve-bar-label,.drawing-bar>span{color:#ededed}
.case-row,.export-link,.layer-item.visible,.object-row.active,.appearance-row input[type=color],.delete-button,.empty-import{background:#161616;color:#fff;border-color:#444}
input[type=range]{accent-color:#fff}.arch-toolbar button[data-loaded=true]::after{color:#fff}.visibility-slider>span{color:#ededed}.view-gizmo{background:#ffffff0a}.gizmo-center{background:#090909;color:#fff;border-color:#888}
.workspace{height:calc(100% - 90px)}
.toast,.toast.warning,.toast.error,.preview-warning{position:fixed;left:0;right:0;bottom:0;top:auto;transform:none;width:100%;max-width:100%;height:36px;padding:9px 14px;background:#090909;color:#fff;border:0;border-top:1px solid #444;border-radius:0;box-shadow:none;font-size:12px;line-height:18px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;z-index:20}
.toast.error{border-top:2px solid #fff}.busy-overlay{position:fixed;bottom:0;left:0;right:0;transform:none;height:36px;max-width:100%;padding:3px 14px;background:#090909;color:#fff;border:0;border-top:1px solid #444;border-radius:0;box-shadow:none;z-index:21;justify-content:center}.busy-overlay>div{display:flex;gap:12px;align-items:center}.spinner{border-color:#555;border-top-color:#fff;width:17px;height:17px}
.workspace:has(#stagePanel:not([hidden])) #traceTools{left:69px}.workspace:has(#traceTools:not([hidden])) #stagePanel{left:126px}.brush-toolbar{left:126px;top:12px}
@media(max-width:600px){.brand{font-size:14px;min-width:67px}.workspace{height:calc(100% - 85px)}.workspace:has(#stagePanel:not([hidden])) #traceTools{left:53px}.workspace:has(#traceTools:not([hidden])) #stagePanel{left:104px}.brush-toolbar{left:104px;top:9px}}
.app-header button.active,.trace-tools .icon-button.active,.brush-toolbar .icon-button.active,.cleanup-tools .icon-button.active,button[aria-pressed=true],.arch-toolbar button.active{background:#353535!important;color:#fff!important;border-color:#999!important}
.field input[type=range]::-webkit-slider-thumb{background:#fff}.field input[type=range]::-webkit-slider-runnable-track{background:#555}

/* Complete the dark UI, including higher-specificity legacy fields. */
input[type=number],input[type=text],select,option,.orientation-select,.curve-menu>summary,.curve-menu[open]>summary,.tab-overlay{background:#090909;color:#fff;border-color:#555}
#viewport{background:#090909}
.field .input-wrap>span,.slider-field>output,.survey-angle output,.curve-section-dimension output,.survey-title,.dialog-description,.mask-actions>span,.corrugation-panel>summary span,.thickness-readout span:nth-child(n),.viewport-hint,.viewport-footer,.viewport-footer span{color:#fff}
.steps,.floating-panel,.stage-panel,.inspector,.view-modes,.trace-tools,.retention-tools,.survey-tools,.cleanup-tools,.layer-sliders,.brush-toolbar,.drawing-bar,.curve-bar,.transform-hint,dialog{background:#090909;scrollbar-color:#777 #090909}
.survey-angle input[type=range]::-webkit-slider-thumb,.curve-section-dimension input[type=range]::-webkit-slider-thumb{background:#fff;border-color:#fff}
.survey-angle input[type=range]::-webkit-slider-runnable-track,.curve-section-dimension input[type=range]::-webkit-slider-runnable-track{background:#555;border-color:#888}

/* Progress stays in the reserved notification strip, below its message. */
.notification-progress{position:fixed;left:0;right:0;bottom:0;height:4px;background:#333;overflow:hidden;z-index:22;pointer-events:none}
.notification-progress>span{display:block;height:100%;width:var(--progress,0%);background:#fff;transform-origin:left}
.notification-progress.indeterminate>span{width:28%;animation:notification-progress-slide 1.5s linear infinite;will-change:transform}
@keyframes notification-progress-slide{from{transform:translateX(-100%)}to{transform:translateX(460%)}}
@media(prefers-reduced-motion:reduce){.notification-progress.indeterminate>span{animation:notification-progress-pulse 2s ease-in-out infinite;width:100%;transform:none}}
@keyframes notification-progress-pulse{50%{opacity:.35}}
.busy-overlay .spinner{display:none}.busy-overlay>div{min-width:0;width:100%;justify-content:center;gap:10px}
#busyMessage{margin:0;max-width:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#busyElapsed{margin:0;white-space:nowrap}#busyTitle{flex:none}#cancelJobButton{margin:0;width:24px;min-width:24px;height:24px;flex:none}

#saveButton{position:relative}#saveButton #dirtyDot{position:absolute;right:2px;top:1px;font-size:8px;color:currentColor}#saveButton[data-state=pending]{border-color:#eee}#saveButton[data-state=working]{opacity:.5}

/* Transient menus stay clear of the design surface after selection. */
.ppr-pie{position:fixed;width:0;height:0;z-index:100;pointer-events:none}
.ppr-pie[hidden],.spline-context[hidden]{display:none}
.ppr-pie button{position:absolute;transform:translate(-50%,-50%);width:46px;height:46px;border-radius:50%;border:1px solid #888;background:#101010;color:#fff;font-size:22px;pointer-events:auto;box-shadow:0 2px 12px #0008}
.ppr-pie button.active{background:#fff;color:#080808;border-color:#fff;scale:1.12}
.pie-label{position:absolute;transform:translate(-50%,-50%);padding:8px 12px;background:#080808e8;border:1px solid #777;border-radius:8px;color:white;white-space:nowrap;font-size:12px}
.spline-context{position:fixed;z-index:101;padding:5px;background:#0b0b0b;color:white;border:1px solid #777;border-radius:8px;box-shadow:0 5px 24px #0008;min-width:155px}
.spline-context button{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;text-align:left;border:0;border-radius:4px;background:none;color:inherit;padding:9px 12px}
.spline-context kbd{font:inherit;font-size:11px;text-align:center;min-width:20px;padding:2px 4px;border:1px solid currentColor;border-radius:3px;opacity:.7}
.spline-context button:hover{background:#fff;color:#000}
.rotation-field input[type=number]{width:85px;text-align:right;padding:3px 5px;justify-self:end;background:#080808;color:white;border:1px solid #555;border-radius:4px}
.survey-tools .rotation-field{width:155px;margin:0}

.mask-toolbar{top:auto;bottom:20px;left:50%;transform:translateX(-50%);max-width:calc(100% - 130px)}

/* Numeric hints for the shared sculpt tools. */
.sculpt-shortcut{position:relative}
.sculpt-shortcut kbd{position:absolute;right:3px;bottom:2px;font:9px/1 sans-serif;opacity:.75;pointer-events:none}

/* Preparation tools: compact groups, readable insertion bands and clear apply. */
.cleanup-tools{top:14px;left:74px;padding:7px;gap:7px;border-radius:12px;background:#111e;box-shadow:0 8px 24px #0005}
#repairTools{display:flex;align-items:center;gap:7px;flex-wrap:wrap}#repairTools[hidden]{display:none}#repairTools label{display:flex;align-items:center;gap:6px;font-size:11px}#repairSize{width:110px}#repairAccept:disabled{opacity:.35}
.viewport-section:has(#brushToolbar:not([hidden])) .cleanup-tools{top:70px}
.trim-actions{gap:7px;margin-left:3px;padding-left:10px;border-left:1px solid #555}
.trim-count{display:grid;place-items:center;min-width:25px;height:25px;border-radius:50%;background:#59302b;color:#ffd2ca;font:600 12px/1 sans-serif}
#trimApply{padding:7px 13px;background:#eee;color:#111;border-color:#fff;font-weight:600}
#trimApply:disabled{opacity:.35}
.survey-tools{border-radius:12px;padding:10px 12px;gap:12px;box-shadow:0 8px 24px #0005;align-items:center}
.survey-tools .rotation-field{width:140px;padding-left:10px;border-left:1px solid #3b3b3b}
.survey-tools .survey-colors{display:flex;gap:4px;align-items:center}
.survey-tools .survey-colors i{width:auto;min-width:30px;height:24px;display:grid;place-items:center;border-radius:5px;padding:0 4px;color:#191919;font:600 10px/1 sans-serif}
.survey-tools .survey-colors i:last-child{color:#fff}
.survey-tools .survey-title{font-size:11px;font-weight:600}
#surveyInlineToggle{width:30px;min-width:30px;height:30px;font-size:19px}
@media(max-width:760px){.cleanup-tools{left:54px;max-width:calc(100% - 66px)}.trim-actions{flex-wrap:wrap}.survey-tools{left:54px;gap:6px;padding:7px;flex-wrap:wrap;max-width:calc(100% - 70px)}.survey-tools .rotation-field{width:110px}.survey-tools .survey-title{display:none}}
/* Appearance stays beside the model, without a modal backdrop. */
#dialog.options-panel{position:fixed;inset:64px 10px auto auto;margin:0;width:min(300px,calc(100vw - 74px));max-width:none;max-height:calc(100dvh - 78px);padding:18px;z-index:12;border-radius:12px;box-shadow:0 12px 32px #0006;overscroll-behavior:contain}
#dialog.options-panel .dialog-heading{position:sticky;top:-18px;background:#090909;padding:4px 0 10px;z-index:1}
#dialog.options-panel .appearance-actions{flex-wrap:wrap}

.layer-toggle{width:27px;height:27px;padding:0;border:1px solid transparent;background:transparent;color:var(--layer-color);font-size:21px;line-height:25px;border-radius:6px}.layer-toggle[aria-pressed=false]{opacity:.42}.layer-toggle:hover{border-color:#888}.layer-toggle:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* A stable location for the operation that advances the workflow. */
.process-panel{position:absolute;right:16px;bottom:16px;z-index:9;width:200px;padding:12px;background:#090909;color:#fff;border:1px solid #777;border-radius:12px;box-shadow:0 5px 20px #0004;max-height:calc(100% - 205px);overflow:auto;scrollbar-width:thin}
.process-panel h2{font-size:11px;font-weight:500;letter-spacing:.06em;color:#aaa;margin:0 0 10px}
.process-panel>button{width:100%;min-height:40px;font-size:12px;font-weight:600;margin:0;background:#ededed;color:#111;border-color:#fff}
.process-panel>button:hover:not(:disabled){background:#fff;color:#000}
.process-panel details{border-top:1px solid #444;padding-top:8px;margin-bottom:12px}
.process-panel summary{cursor:pointer;color:#ddd;font-size:11px;list-style-position:inside}
.process-panel .field{margin:12px 0 4px}
.workspace:has(#processPanel:not([hidden])) .inspector{max-height:calc(100% - 230px)}
.workspace:has(#processPanel:not([hidden])) .curve-bar,.workspace:has(#processPanel:not([hidden])) .drawing-bar{max-width:calc(100% - 390px);left:calc(50% - 60px)}
@media(max-width:760px){.process-panel{right:10px;bottom:12px;width:156px;padding:10px}.workspace:has(#processPanel:not([hidden])) .curve-bar,.workspace:has(#processPanel:not([hidden])) .drawing-bar{left:106px;transform:none;max-width:calc(100% - 282px)}.process-panel h2{margin-bottom:7px}}

/* Insertion controls are opened by V and occupy two short rows. */
#surveyTools{display:grid;grid-template-columns:minmax(0,1fr) 24px;grid-template-rows:24px 24px;width:216px;max-width:calc(100% - 80px);padding:5px 7px;gap:2px 7px;border-radius:8px;left:70px;bottom:16px;box-shadow:0 3px 10px #0004}
#surveyTools[hidden]{display:none}
#surveyTools .rotation-field{display:grid;grid-template-columns:12px 46px minmax(0,1fr);grid-column:1;gap:4px;width:auto;height:24px;padding:0;margin:0;border:0;align-items:center}
#surveyTools .rotation-field label{grid-area:1/1;margin:0;padding:0;font-size:10px}
#surveyTools .rotation-field input[type=number]{grid-area:1/2;width:46px;min-width:0;height:22px;margin:0;padding:2px;font-size:10px;border-radius:4px}
#surveyTools .rotation-field input[type=range]{grid-area:1/3;width:100%;min-width:0;margin:0;height:20px}
#surveyTools #surveyFromView{grid-area:1/2;min-width:24px;width:24px;height:24px;padding:0;font-size:18px;margin:0}
#surveyTools .survey-colors{grid-area:2/2;display:flex;gap:2px;width:24px}
#surveyTools .survey-colors i{display:block;width:6px;min-width:0;height:13px;padding:0;border-radius:2px}
.case-overlay{position:absolute;right:17px;top:180px;z-index:5;width:clamp(240px,23vw,320px);display:flex;align-items:flex-end;flex-direction:column;gap:8px;max-height:calc(100% - 300px);overflow:auto;scrollbar-width:thin;pointer-events:none}
.case-overlay #layerSliders{position:static;flex:none;width:148px;padding:6px;gap:2px;box-sizing:border-box;pointer-events:auto}
.case-overlay .layer-toggle{width:24px;height:24px;line-height:22px;font-size:19px}
.case-info{position:relative;flex:none;width:100%;padding:14px 16px;background:#090909ee;border:1px solid #444;border-radius:10px;color:#fff;pointer-events:auto}
.case-info[hidden]{display:none}
.case-info dl{display:grid;grid-template-columns:1fr;margin:0;gap:3px}
.case-info dt{font-size:11px;font-weight:500;color:#a5a5a5;line-height:13px;letter-spacing:.08em;text-transform:uppercase}
.case-info dd{margin:0 0 8px;font-size:20px;font-weight:550;line-height:1.15;overflow-wrap:anywhere}
.case-info dd:last-child{margin-bottom:0}
.case-info-edit{position:absolute;right:5px;top:4px;width:24px;height:24px;padding:0;border:0;background:transparent;color:#bbb;font-size:16px;border-radius:4px}
.case-info-edit:hover{background:#333;color:#fff}
.case-button#renameButton{display:flex;align-items:center;gap:7px;width:auto;max-width:clamp(80px,17vw,240px);padding:0 9px;min-width:36px}
#caseName{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.order-field{display:block;margin:12px 0;color:#bbb;font-size:11px}.order-field input{display:block;margin-top:5px}
@media(max-width:900px){.case-button#renameButton{max-width:110px}.case-overlay{right:10px;width:220px}.case-info{padding:14px}.case-info dd{font-size:18px}.case-overlay #layerSliders{width:130px}.case-overlay .visibility-slider input{width:73px}}
@media(max-width:760px){#surveyTools{left:54px;bottom:10px}.case-button#renameButton{max-width:85px}}

/* A section is a read-only inspection panel, separate from the cutting tools. */
.section-toggle{position:absolute;right:18px;top:12px;z-index:6;font-size:13px;font-weight:600;background:#090909;border:1px solid #666}
.section-toggle.active{background:#d6eeeb;color:#102220;border-color:#a3e6dd}
.section-panel{position:absolute;left:70px;bottom:86px;z-index:8;width:clamp(310px,35vw,470px);max-width:calc(100% - 90px);background:#090909;border:1px solid #555;border-radius:12px;box-shadow:0 8px 28px #0007;overflow:hidden;color:#fff;touch-action:none}
.section-panel[hidden]{display:none}
.section-header{display:flex;align-items:center;gap:6px;padding:8px;border-bottom:1px solid #333}
.section-header strong{font-size:12px;margin-right:auto;font-weight:500}
.section-axes{display:flex;gap:3px}
.section-axes .button{min-width:28px;height:28px;padding:3px 7px;font-size:11px}
.section-axes .button.active{background:#d6eeeb;color:#102220}
.section-panel .icon-button{width:28px;min-width:28px;height:28px;font-size:19px}
.section-drawing{position:relative;height:clamp(200px,31vh,360px);background:#0b0d0f}
#sectionCanvas{display:block;width:100%;height:100%;cursor:grab;touch-action:none}
#sectionCanvas:active{cursor:grabbing}
#sectionCanvas:focus-visible{outline:1px solid #a3e6dd;outline-offset:-2px}
.section-empty{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#a1adb0;font-size:12px;pointer-events:none}
.section-pending{position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,#a3e6dd,transparent);animation:section-progress .9s ease-in-out infinite;pointer-events:none}
.section-position{display:flex;align-items:center;gap:4px;padding:6px;border-top:1px solid #333;font-size:10px}
.section-position input[type=range]{flex:1;min-width:35px;width:0;height:24px;margin:0;accent-color:#a3e6dd}
.section-position input[type=number]{width:63px;min-width:63px;height:27px;font-size:11px;padding:4px;border:1px solid #555;border-radius:5px;background:#111;color:#fff}
@keyframes section-progress{0%,100%{opacity:.35}50%{opacity:1}}
@media(max-width:760px){.section-panel{left:54px;bottom:70px;width:320px;max-width:calc(100% - 65px)}.section-drawing{height:200px}.section-header{gap:3px;padding:5px}}
@media(max-height:600px){.section-panel{bottom:70px}.section-drawing{height:160px}}
@media(prefers-reduced-motion:reduce){.section-pending{animation:none}}
/* Compact floating case controls; the canvas also occupies the former header. */
.app-header{position:absolute;top:10px;left:70px;height:42px;width:max-content;max-width:calc(100% - 150px);padding:4px 7px;gap:6px;border:1px solid var(--line);border-radius:13px;box-shadow:0 4px 18px #0002}
.app-header .brand{display:flex;align-items:center;gap:7px;min-width:0;width:auto;height:32px;padding:0 6px;font-size:14px;cursor:pointer;list-style:none}
.brand::-webkit-details-marker{display:none}
.brand>span{font-size:12px;color:var(--muted)}
.app-header .icon-button,.app-header .arch-toolbar .button{height:32px;min-height:32px;min-width:32px;font-size:16px}
.app-header .arch-toolbar{margin:0;padding:0 0 0 5px;border:0;border-left:1px solid var(--line);border-radius:0;gap:2px}
.app-header .arch-toolbar .button{padding:5px 8px;font-size:11px}
.app-header .case-button#renameButton{max-width:150px;font-size:12px}
.project-menu{position:relative;flex:none}
.project-menu .project-actions{position:absolute;top:40px;left:-7px;display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:240px;max-height:calc(100dvh - 100px);overflow:auto;padding:7px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 8px 28px #0003}
.project-menu:not([open]) .project-actions{display:none}
.project-menu .button{width:100%;text-align:left;padding:9px 12px;font-size:12px;border-color:transparent;background:transparent}
.project-menu .panel-actions{display:flex;flex-direction:column;align-items:stretch;margin:5px 0 0;padding-top:5px;border-top:1px solid var(--line);gap:2px}
.workspace{height:calc(100% - 36px)}
.workspace #stagePanel,.workspace:has(#traceTools:not([hidden])) #stagePanel{top:64px}
.workspace .cleanup-tools,.workspace #retentionTools,.workspace:has(#traceTools:not([hidden])) #retentionTools,.workspace .brush-toolbar,.workspace #traceTools{top:64px}
@media(max-width:760px){.app-header{left:54px;max-width:calc(100% - 103px);gap:3px;padding:4px}.app-header .case-button#renameButton{max-width:90px}.app-header .brand{font-size:12px;padding:0 3px}.app-header .arch-toolbar .button{padding:5px;font-size:10px}}
@media(max-width:540px){.app-header .case-button#renameButton{display:none}.app-header .arch-toolbar .button{padding:4px 3px}.app-header{gap:2px}.app-header .gpu-light{display:none}}
.design-shortcut-hint{padding:0 6px;font-size:11px;color:var(--muted);white-space:nowrap}
