:root{color-scheme:dark;--glass:rgba(16,16,16,.91);--surface:#252629;--line:rgba(215,215,215,.22);--text:#edeef0;--muted:#b3b5b9;--accent:#d5d7db;--accent-ink:#17181b;--error:#ffd0bb;font:14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#111214;color:var(--text)}
*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;width:100%;height:100%;overflow:hidden}button,input,select,textarea{font:inherit}button,.file-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;border:1px solid var(--line);border-radius:3px;padding:6px 9px;background:var(--surface);color:var(--text);text-decoration:none;cursor:pointer;white-space:normal}button:hover,.file-button:hover{background:#36383c;border-color:#d4d6db}button:disabled{opacity:.4;cursor:default}.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}.danger{color:var(--error)}button[aria-pressed=true],button[aria-selected=true],button[aria-current=step]{background:#404247;border-color:#d5d7db;color:#f1f2f4}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible,.file-button:focus-within{outline:2px solid var(--accent);outline-offset:3px}input,select,textarea{min-width:0;max-width:100%;border:1px solid var(--line);border-radius:5px;padding:9px;background:#18191c;color:var(--text)}input[type=range]{padding:0;accent-color:var(--accent);height:30px;width:100%}input[type=color]{width:100%;height:42px;padding:4px}input[type=file]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}textarea{resize:vertical;line-height:1.65}h1,h2,h3,p{margin:0}h1{font-size:16px;font-weight:500;letter-spacing:-.02em}h2{font-size:17px;font-weight:500}h3{font-size:14px;font-weight:600;margin:20px 0 10px}.workspace,.editor-panel,.stage-column{display:contents}.world{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;z-index:0;background:#17181a;isolation:isolate}.world canvas{display:block;width:100%;height:100%;touch-action:none;outline-offset:-3px}.world #graphics-status{position:absolute;z-index:5;left:50%;top:50%;transform:translate(-50%,-50%);max-width:min(400px,calc(100% - 40px));padding:16px 20px;border:1px solid var(--line);border-radius:5px;background:var(--glass);font-size:13px}.world[data-renderer-state=ready] #graphics-status{display:none}.app-header{position:fixed;z-index:10;left:max(16px,env(safe-area-inset-left));top:max(14px,env(safe-area-inset-top));padding:10px 14px;border:1px solid var(--line);border-radius:5px;background:var(--glass);backdrop-filter:blur(12px);pointer-events:none}.identity{display:flex;gap:14px;align-items:center}.brand{font-size:12px;font-weight:600;letter-spacing:.12em;color:var(--accent)}.badge{display:none}.space-summary{position:fixed;z-index:8;right:max(16px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));max-width:calc(100vw - 370px);padding:8px 12px;border-radius:5px;background:var(--glass);font-size:12px;color:#d1d3d7;pointer-events:none;font-variant-numeric:tabular-nums}.tool-rail{position:fixed;z-index:20;top:84px;display:flex;flex-direction:column;gap:7px;padding:7px;border:1px solid var(--line);border-radius:5px;background:var(--glass);backdrop-filter:blur(12px)}#left-tools{left:max(16px,env(safe-area-inset-left))}#right-tools{right:max(16px,env(safe-area-inset-right))}#original-tools{display:flex;flex-direction:column;gap:7px}.icon-tool{position:relative;width:38px;height:38px;min-height:38px;padding:9px;border:0;background:transparent;border-radius:5px;color:#dedfe2;flex-shrink:0}.icon-tool svg{display:block;width:21px;height:21px}.icon-tool:hover,.icon-tool[aria-expanded=true],.icon-tool[aria-selected=true],.icon-tool[aria-pressed=true]{background:#42454a;color:#f0f1f3}.icon-tool[data-hint]::after{content:attr(data-hint);position:absolute;left:calc(100% + 14px);top:50%;transform:translateY(-50%);display:none;width:max-content;max-width:200px;padding:6px 9px;border:1px solid var(--line);border-radius:5px;background:#1d1e21;color:#e9eaed;font-size:12px;font-weight:400;pointer-events:none;white-space:normal}.icon-tool:hover::after,.icon-tool:focus-visible::after{display:block}#right-tools .icon-tool::after{left:auto;right:calc(100% + 14px)}.tool-popover{position:fixed;z-index:25;top:84px;left:88px;width:min(360px,calc(100vw - 104px));max-height:calc(100dvh - 112px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:18px;border:1px solid var(--line);border-radius:5px;background:var(--glass);box-shadow:0 18px 60px #0004;backdrop-filter:blur(18px)}.tool-popover[data-side=right]{left:auto;right:88px}.popover-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.popover-heading .icon-tool{width:30px;height:30px;min-height:30px;padding:6px}.popover-heading .icon-tool::after{display:none}.tool-panel>h2:first-child{display:none}.panel-content{padding:0;min-width:0}.field{display:flex;flex-direction:column;gap:6px;margin:0 0 14px;font-size:12px;color:var(--muted)}.field input,.field select,.field textarea{width:100%;color:var(--text)}.field output{font-variant-numeric:tabular-nums;color:var(--text)}.field-pair,.field-triple{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.field-triple{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.field-triple input{padding:8px 6px}.note{font-size:12px;line-height:1.7;color:var(--muted);margin:10px 0 15px}.full{width:100%}.button-row,.file-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.file-actions{margin-top:18px}.file-actions>*{flex:1 1 115px;font-size:12px}.project-bar{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.project-bar>label{font-size:12px;color:var(--muted);width:100%}.project-bar #project-title{width:100%;flex:1 1 100%}.project-bar #save-status{font-size:12px;color:var(--muted);width:100%;margin:2px 0 8px}.project-bar button{font-size:12px}.view-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.viewport-toolbar{display:grid;gap:12px}.view-buttons button{font-size:12px}.object-palette{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0}.palette-item{display:flex;flex-direction:column;gap:8px;min-height:84px;padding:12px 6px;font-size:11px;line-height:1.35;background:#24262a;touch-action:manipulation}.palette-item svg{width:30px;height:30px;pointer-events:none}.palette-item>span{pointer-events:none}.palette-item[draggable=true]{cursor:grab}.palette-item:active{cursor:grabbing}.object-list,.saved-list{list-style:none;padding:0;margin:14px 0;display:grid;gap:7px}.object-list button{width:100%;justify-content:space-between;text-align:left;gap:12px}.object-list small{color:var(--muted);font-size:11px}.object-context{position:fixed;z-index:19;transform:translateX(-50%);max-width:calc(100vw - 24px);padding:5px 6px 6px;border:1px solid var(--line);border-radius:5px;background:var(--glass);backdrop-filter:blur(12px);box-shadow:0 7px 24px #0003}.object-context>span{display:block;text-align:center;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#d9dade;padding:3px 7px 5px}.context-actions{display:flex;gap:1px}.context-actions .icon-tool{width:34px;height:34px;min-height:34px;padding:7px}.context-actions .icon-tool::after{top:auto;left:50%;bottom:calc(100% + 15px);transform:translateX(-50%)}.colour-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 18px}.colour-presets button{font-size:11px;justify-content:flex-start}.colour-presets span{display:block;width:20px;height:20px;flex-shrink:0;background:var(--swatch);border-radius:50%;border:1px solid #d1d2d699}.check-field{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted);margin:0 0 15px}.check-field input{accent-color:var(--accent);width:17px;height:17px;padding:0;min-height:0}.compact-playback{position:fixed;z-index:16;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:5px 7px;border:1px solid var(--line);border-radius:5px;background:var(--glass);backdrop-filter:blur(12px)}.compact-playback output{font-size:12px;font-variant-numeric:tabular-nums;min-width:64px;text-align:center;color:#dcdee2}.compact-playback .icon-tool::after{top:auto;left:50%;bottom:calc(100% + 12px);transform:translateX(-50%)}.timeline-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:13px}.timeline-controls>button{font-size:12px}.timeline-controls label{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--muted)}.timeline-controls output{width:100%;font-size:13px;font-variant-numeric:tabular-nums;color:var(--accent)}.timeline-footer{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin:10px 0 17px}.timeline-footer>span{width:100%;font-size:11px}.timeline-footer input{width:80px}.viewport-message{position:fixed;z-index:14;left:88px;bottom:19px;max-width:min(430px,calc(100vw - 130px));max-height:110px;overflow:auto;padding:10px 13px;border:1px solid var(--line);border-radius:5px;background:var(--glass);font-size:12px;line-height:1.6;opacity:0;pointer-events:none;transition:opacity .15s}.viewport-message.is-visible{opacity:1}.viewport-message[data-level=error]{color:var(--error);border-color:#d4a08b}.resume-builder{position:fixed;z-index:11;left:max(16px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));font-size:11px;min-height:33px;padding:7px 10px;background:var(--glass)}.resume-builder:not([hidden])~.viewport-message{bottom:65px}.builder-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:8px 0 18px}.builder-steps button{font-size:10px;padding:5px 1px;min-height:32px;border-radius:4px}#builder-progress{font-size:11px;color:var(--muted)}.builder-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.builder-footer button{font-size:12px;min-width:75px}.scale-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:14px 0 18px}.scale-presets button{font-size:12px;padding:8px 2px}.scale-warning{color:var(--error)}.text-action{background:transparent;color:var(--accent);font-size:12px}.refine-links{display:grid;gap:9px}.refine-links button{justify-content:flex-start;font-size:12px}.analysis-values{margin:14px 0;font-size:12px}.analysis-values>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.analysis-values dt{color:var(--muted)}.analysis-values dd{margin:0;white-space:nowrap;font-variant-numeric:tabular-nums}.calculation{font-size:14px;color:var(--accent);margin:12px 0}.instruction-preview{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}.instruction-preview h3{margin-top:0}.instruction-preview ol,.command-history{font-size:12px;line-height:1.7;padding-left:18px;overflow-wrap:anywhere}.command-history li{padding:8px 0;border-bottom:1px solid var(--line)}.account-original{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted)}details{border-top:1px solid var(--line);padding-top:12px;margin-top:15px}summary{margin-bottom:12px;font-size:12px;cursor:pointer;color:#dedfe3}.help-list{font-size:12px}.help-list dt{margin-top:16px;font-weight:600}.help-list dd{margin:5px 0 0;color:var(--muted);line-height:1.7}.sr-only,.skip-link:not(:focus){position:absolute;width:1px!important;height:1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip-link:focus{position:fixed;left:16px;top:12px;z-index:100;padding:12px;background:var(--accent);color:var(--accent-ink)}dialog{width:min(580px,calc(100% - 32px));max-height:80dvh;overflow:auto;background:#1c1d20;color:var(--text);border:1px solid var(--line);border-radius:5px;padding:22px;box-shadow:0 25px 70px #0005}dialog::backdrop{background:#08090bad}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.saved-list button{width:100%;justify-content:space-between;gap:15px;text-align:left;line-height:1.5}.saved-list small{color:var(--muted)}
@media(max-width:700px){.app-header{top:10px;left:10px;padding:8px 10px}.identity{gap:9px}.brand{font-size:10px}h1{font-size:13px}.space-summary{top:58px;right:10px;max-width:calc(100vw - 20px);padding:5px 8px;font-size:10px}.tool-rail{top:98px;padding:5px;gap:5px}#left-tools{left:10px}#right-tools{right:10px}#original-tools{gap:5px}.icon-tool{width:34px;height:34px;min-height:34px;padding:7px}.tool-popover,.tool-popover[data-side=right]{top:98px;left:64px;right:auto;width:calc(100vw - 76px);max-height:calc(100dvh - 178px);padding:14px}.tool-popover[data-side=right]{left:12px;right:64px;width:calc(100vw - 76px)}.tool-popover:not([hidden]){z-index:30}.tool-rail:has(.icon-tool[aria-expanded=true]){z-index:31}.builder-steps button{font-size:9px}.field-pair,.field-triple{gap:7px}.field-triple input{padding:8px 4px}.viewport-message{left:12px;bottom:80px;max-width:calc(100vw - 24px);font-size:11px;max-height:80px}.compact-playback{bottom:13px;padding:4px 6px;gap:4px}.resume-builder{left:10px;bottom:14px;font-size:10px;max-width:97px;padding:6px 8px}.context-actions .icon-tool{width:32px;height:32px;min-height:32px;padding:6px}.object-context>span{max-width:200px}.icon-tool[data-hint]::after{display:none}.reconstruction-movement{bottom:72px!important;left:70px!important;max-width:210px!important}.scale-presets{gap:4px}.scale-presets button{font-size:11px}.popover-heading h2{font-size:16px}}
@media(pointer:coarse){button,.file-button{min-height:42px}input,select,textarea{font-size:16px;min-height:42px}.tool-rail .icon-tool{width:40px;height:40px;min-height:40px;padding:9px}.context-actions .icon-tool{width:36px;height:36px;min-height:36px}.compact-playback .icon-tool{min-height:40px}.check-field input{min-height:0}.builder-steps button{min-height:35px}.tool-popover,.tool-popover[data-side=right]{left:72px;width:calc(100vw - 84px)}.tool-popover[data-side=right]{left:12px;right:72px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto}}
body[data-building=true] .viewport-message{bottom:65px}
.viewport-message[data-level=error]{z-index:45}
@media(max-width:700px){.builder-steps{grid-template-columns:repeat(3,minmax(0,1fr))}body[data-building=true] .viewport-message{bottom:80px}}
@media(max-width:700px){#left-tools{top:auto;bottom:74px;left:10px;right:10px;flex-direction:row;overflow-x:auto;scrollbar-width:none}#original-tools{flex-direction:row}#right-tools{z-index:35}.tool-popover,.tool-popover[data-side=right]{left:12px;right:72px;width:calc(100vw - 84px);max-height:calc(100dvh - 240px)}.resume-builder{bottom:132px;max-width:160px}.viewport-message,body[data-building=true] .viewport-message{bottom:134px}body:has(#object-context:not([hidden])) .resume-builder{display:none}.reconstruction-movement{bottom:136px!important}}
/* Optional authoring controls remain inside the existing popover. */
.assembly-palette{display:grid;gap:8px;margin-bottom:15px}.assembly-palette button{display:flex;align-items:flex-start;flex-direction:column;gap:5px;text-align:left;padding:12px;cursor:grab}.assembly-palette small{font-size:11px;line-height:1.6;color:var(--muted)}.motion-segment{min-width:0;margin:12px 0;padding:12px 10px;border:1px solid var(--line);border-radius:5px}.motion-segment legend{padding:0 5px;font-size:12px;color:var(--accent)}.motion-segment-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.motion-segment .field{margin-bottom:3px}.motion-segment input{padding:8px 6px}.motion-segment .button-row{margin-top:10px;gap:5px}.motion-segment button,#motion-sequence-actions button{font-size:11px;padding:7px 8px}.motion-segment input:disabled{opacity:.5}#terrain-start{white-space:normal}#terrain-resolution{color:var(--accent)}
.stop-ground-brush{position:fixed;z-index:21;right:88px;top:58px;font-size:11px;min-height:30px;padding:5px 9px;background:var(--glass);border-color:var(--accent)}@media(max-width:700px){.stop-ground-brush{top:98px;right:64px;max-width:calc(100vw - 130px);font-size:10px;min-height:34px}}

/* Floating tools: compact translucent surfaces, without visible borders. */
:root{--glass:rgba(17,17,17,.67);--surface:rgba(50,50,50,.48);--line:transparent;--soft-shadow:0 3px 12px rgba(0,0,0,.18);--panel-shadow:0 9px 28px rgba(0,0,0,.26)}
button,.file-button{min-height:32px;padding:6px 10px;border:0;border-radius:5px;background:var(--surface);box-shadow:0 2px 8px rgba(6,6,6,.12);outline:none;transition:background .15s,box-shadow .15s}
button:hover,.file-button:hover{background:rgba(80,80,80,.56);border:0;box-shadow:0 4px 12px rgba(6,6,6,.17)}
button[aria-pressed=true],button[aria-selected=true],button[aria-current=step]{background:rgba(169,169,169,.25);border:0;color:#f0f1f3;box-shadow:0 2px 8px rgba(6,6,6,.12)}
.primary{background:rgba(199,199,199,.86);border:0;color:var(--accent-ink)}
.primary:hover{background:rgba(218,218,218,.92);color:var(--accent-ink)}
input,select,textarea{padding:8px;border:0;outline:none;background:rgba(15,15,15,.48);box-shadow:inset 0 1px 4px rgba(0,0,0,.14)}
input:disabled,select:disabled{opacity:.5}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible,.file-button:focus-within{outline:none;box-shadow:0 0 0 2px rgba(201,201,201,.92),var(--soft-shadow)}
.app-header,.space-summary,.tool-rail,.tool-popover,.object-context,.compact-playback,.resume-builder,.viewport-message,.stop-ground-brush,dialog,.world #graphics-status{border:0;outline:none;box-shadow:var(--soft-shadow);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.app-header{padding:8px 12px;border-radius:5px;background:rgba(17,17,17,.65)}
.space-summary{padding:6px 10px;background:rgba(17,17,17,.6)}
.tool-rail{padding:5px;gap:4px;border-radius:5px;background:rgba(17,17,17,.62)}
#original-tools{gap:4px}
.icon-tool{width:34px;height:34px;min-height:34px;padding:7px;background:transparent;box-shadow:none;border:0}
.icon-tool:hover,.icon-tool[aria-expanded=true],.icon-tool[aria-selected=true],.icon-tool[aria-pressed=true]{background:rgba(188,188,188,.17);box-shadow:0 2px 7px rgba(6,6,6,.12)}
.icon-tool svg{width:20px;height:20px}
.icon-tool[data-hint]::after{border:0;padding:6px 8px;background:rgba(18,18,18,.86);box-shadow:var(--soft-shadow)}
.tool-popover{width:min(350px,calc(100vw - 104px));padding:14px;border-radius:5px;background:rgba(18,18,18,.79);box-shadow:var(--panel-shadow)}
.popover-heading{position:sticky;top:0;z-index:3;margin:0 -2px 12px;padding:0 2px 10px;background:rgba(18,18,18,.9);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border-radius:5px}
.popover-heading .icon-tool{width:28px;height:28px;min-height:28px;padding:5px}
.field{gap:5px;margin-bottom:11px}
.field-pair,.field-triple{gap:8px}
.note{margin:8px 0 12px;line-height:1.65}
.palette-item{min-height:68px;padding:9px 6px;gap:6px;background:rgba(50,50,50,.36)}
.palette-item svg{width:26px;height:26px}
.object-palette{gap:6px;margin:12px 0}
.object-list,.saved-list{gap:6px;margin:12px 0}
.object-list button{padding:8px 10px}
.object-context{padding:4px 5px 5px;border-radius:5px;background:rgba(17,17,17,.7)}
.object-context>span{padding:2px 6px 4px}
.context-actions .icon-tool{width:30px;height:30px;min-height:30px;padding:6px}
.compact-playback{padding:4px 6px;gap:6px;border-radius:5px;background:rgba(17,17,17,.65)}
.compact-playback output{min-width:60px}
.resume-builder,.stop-ground-brush{background:rgba(17,17,17,.68)}
.viewport-message{padding:8px 11px;background:rgba(17,17,17,.76)}
.viewport-message[data-level=error]{border:0;background:rgba(53,31,31,.83)}
.builder-footer{padding-top:12px;margin-top:14px;border:0}
.builder-footer button{min-width:68px}
.builder-steps{gap:4px;margin:8px 0 14px}
.builder-steps button{min-height:30px}
.scale-presets{gap:5px;margin:12px 0 14px}
details{border:0;padding-top:10px;margin-top:12px}
summary{margin-bottom:10px}
.analysis-values>div{border:0;padding:8px 0}
.command-history li{border:0}
.instruction-preview{border:0;padding-top:10px;margin-top:12px}
.motion-segment{padding:10px 9px;margin:10px 0;border:0;border-radius:5px;background:rgba(55,55,55,.2);box-shadow:0 3px 13px rgba(6,6,6,.1)}
.motion-segment legend{padding:0 4px}
.motion-segment .button-row{margin-top:8px}
.assembly-palette button{padding:10px;background:rgba(50,50,50,.36)}
.colour-presets{gap:6px;margin:10px 0 14px}
.colour-presets span{border:0;box-shadow:0 2px 6px rgba(0,0,0,.15)}
dialog{background:rgba(18,18,18,.88);box-shadow:var(--panel-shadow);padding:18px}
.morphology-templates{display:grid;gap:7px;margin:10px 0 14px}
.morphology-templates button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:10px;gap:4px;cursor:grab;background:rgba(50,50,50,.36)}
.morphology-templates small{font-size:11px;line-height:1.55;color:var(--muted)}
.part-actions{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.part-actions button{font-size:11px;padding:6px 9px}
.part-summary{font-size:11px;color:var(--muted);line-height:1.6;margin:8px 0}
#compound-part-editor{margin:12px 0 0;padding:12px 10px 2px;border-radius:5px;background:rgba(53,53,53,.18);box-shadow:0 3px 13px rgba(6,6,6,.1)}
#compound-part-editor .field-triple{gap:6px}
#compound-part-editor input{padding:7px 6px}
#compound-part-editor summary{font-size:12px}
@media(max-width:700px){
 .app-header{padding:7px 9px}.tool-rail{padding:4px;gap:4px}#original-tools{gap:4px}.icon-tool{width:36px;height:36px;min-height:36px;padding:8px}
 .tool-popover,.tool-popover[data-side=right]{width:calc(100vw - 84px);padding:12px}
 .popover-heading{margin-bottom:10px;padding-bottom:8px}.popover-heading .icon-tool{width:30px;height:30px;min-height:30px}
 .context-actions .icon-tool{width:32px;height:32px;min-height:32px}.palette-item{min-height:68px}
 .part-actions button{min-height:34px}.builder-footer button{min-height:34px;min-width:60px}
}
@media(prefers-reduced-motion:reduce){button,.file-button{transition:none}}

#add-compound-part{align-self:end;margin-bottom:11px;min-height:36px}
.profile-tools{margin:12px 0}.profile-tools h3{font-size:13px;font-weight:500;margin:14px 0 8px}.profile-tools .button-row{gap:6px;margin:8px 0 12px}.profile-tools button{font-size:11px;min-height:34px}.profile-tools .button-row button{flex:1}.profile-tools input{padding:7px 6px}#place-profile-body{cursor:grab}#profile-outline{display:block;width:100%;height:auto;aspect-ratio:10/7;overflow:visible;margin:8px 0 12px;border:0;border-radius:5px;background:rgba(15,15,15,.26);box-shadow:inset 0 1px 8px rgba(6,6,6,.12);touch-action:none;user-select:none}#profile-outline text{fill:var(--muted);font-size:10px;pointer-events:none}.profile-axis{fill:none;stroke:rgba(211,211,211,.22);stroke-width:1;stroke-dasharray:3 5;pointer-events:none}.profile-silhouette{fill:rgba(201,201,201,.16);stroke:rgba(201,201,201,.4);stroke-width:1;pointer-events:none}.profile-section{fill:none;stroke:rgba(230,230,230,.5);stroke-width:1;pointer-events:none;stroke-dasharray:3 3}.profile-handle{fill:#e1e3e6;stroke:rgba(21,21,21,.65);stroke-width:1.5;cursor:grab}.profile-handle[aria-pressed=true]{fill:var(--accent);stroke:#f1f2f4;stroke-width:1.5}.profile-handle:focus-visible{outline:none;stroke:#fff;stroke-width:3;filter:drop-shadow(0 0 3px rgba(201,201,201,.8))}#profile-editor[data-dragging=true] .profile-handle{cursor:grabbing}#profile-editor input:read-only{opacity:.6}#profile-editor .note{font-size:11px}#profile-point-note{margin-top:0}#profile-budget{margin-bottom:12px}
.icon-tool:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(201,201,201,.92),var(--soft-shadow)}
.transform-target{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 3px 4px}.transform-target select{width:145px;max-width:100%;font-size:11px;min-height:28px;padding:5px 7px;background:rgba(55,55,55,.3);box-shadow:0 2px 7px rgba(6,6,6,.1)}.transform-target button{font-size:11px;min-height:28px;padding:5px 8px}.object-context[data-scope=part]>span{color:var(--accent)}#edit-part-in-scene{font-size:12px;margin:0 0 10px}
@media(pointer:coarse){.transform-target select{font-size:16px;min-height:40px;width:164px}.transform-target button{min-height:40px}}

.path-scene-actions{margin:10px 0}.path-scene-actions button{flex:1;font-size:11px;min-height:34px}.scene-mode-stop{position:fixed;z-index:21;right:88px;top:58px;font-size:11px;min-height:30px;padding:5px 9px;border:0;border-radius:5px;background:rgba(17,17,17,.68);box-shadow:var(--soft-shadow);backdrop-filter:blur(20px)}#waypoint-editor{margin:12px 0;padding:12px 10px 2px;border-radius:5px;background:rgba(53,53,53,.18);box-shadow:0 3px 13px rgba(6,6,6,.1)}#waypoint-editor input{padding:7px 6px}@media(max-width:700px){.scene-mode-stop{top:98px;right:64px;max-width:calc(100vw - 130px);font-size:10px;min-height:34px}}
/* Observation comparisons stay within the existing floating analysis tool. */
.analysis-panel .analysis-values{font-variant-numeric:tabular-nums}
.analysis-panel .analysis-values dd{overflow-wrap:anywhere}
#compare-observation{margin:0 0 12px}
.range-comparison-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:11px;font-variant-numeric:tabular-nums;margin:12px 0}
.range-comparison-table caption{text-align:left;font-size:12px;color:var(--muted);padding-bottom:7px}
.range-comparison-table th,.range-comparison-table td{padding:7px 4px;text-align:right;overflow-wrap:anywhere;border:0}
.range-comparison-table th{font-weight:500;color:var(--muted);vertical-align:bottom}
.range-comparison-table tbody tr{background:rgba(54,54,54,.2)}
.range-comparison-table tbody tr:nth-child(even){background:rgba(54,54,54,.34)}
#calc-result[data-state=invalid]{color:var(--error)}
.analysis-panel input[aria-invalid=true]{box-shadow:0 0 0 1px rgba(255,165,127,.7)}
/* Piloting overlays share the editor's compact translucent surfaces. */
body[data-piloting=true] #object-context,body[data-piloting=true] .compact-playback,body[data-piloting=true] #resume-builder{display:none!important}
body[data-piloting=true] #left-tools{visibility:hidden}
.pilot-hud{position:fixed;z-index:38;left:50%;bottom:14px;transform:translateX(-50%);width:min(660px,calc(100vw - 28px));max-height:calc(100dvh - 160px);overflow:auto;padding:10px 12px;border:0;border-radius:5px;background:rgba(17,17,17,.76);box-shadow:var(--panel-shadow);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.pilot-hud-heading,.pilot-hud-stats,.pilot-hud-actions,.pilot-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.pilot-hud-heading{justify-content:space-between}.pilot-hud-stats{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums;margin:5px 0}
.pilot-hud-actions button,.pilot-actions button{font-size:12px;padding:6px 9px}.pilot-hud select{width:auto;max-width:180px}
.pilot-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:8px}
.pilot-control-group{display:flex;flex-wrap:wrap;gap:4px;min-width:0}.pilot-control-group>span,.pilot-control-group>legend{width:100%;font-size:10px;color:var(--muted)}
.pilot-control-button{flex:1;min-width:38px;font-size:11px;padding:6px;touch-action:none;user-select:none;-webkit-user-select:none}.pilot-control-button[aria-pressed=true]{background:rgba(201,201,201,.3)}
.pilot-key{font-size:10px;color:var(--muted)}.pilot-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pilot-settings input{min-width:0}
.pilot-panel .note{font-size:12px}.pilot-panel label{min-width:0}.pilot-hud details{margin:6px 0 0;padding:0}
#flight-editor{font-variant-numeric:tabular-nums}#flight-editor .button-row{margin:8px 0}#flight-editor .button-row button{flex:1;font-size:11px;padding:6px}
@media(max-width:700px){.pilot-hud{bottom:12px;width:calc(100vw - 24px);max-height:calc(100dvh - 150px);padding:9px}.pilot-hud-heading{font-size:12px}.pilot-controls{gap:5px}.pilot-hud-actions{gap:5px}.pilot-hud-actions button{padding:6px 8px}.pilot-hud select{max-width:150px}.pilot-settings{grid-template-columns:1fr}.pilot-control-button{min-height:42px}.context-actions{flex-wrap:wrap}.pilot-hud-stats{font-size:10px}}
.pilot-settings{border:0;margin:10px 0;padding:0}.pilot-settings legend{padding:0 0 8px;font-size:12px;color:var(--muted)}
.pilot-controls{display:block}.pilot-control-group{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin:7px 0}.pilot-control-button{min-width:0;white-space:normal;overflow-wrap:anywhere}.pilot-brake-group{grid-template-columns:1fr}.pilot-focus-note,.pilot-hud-message{font-size:12px;line-height:1.45;margin:6px 0}
body[data-piloting=true] .viewport-message{z-index:42;top:64px;bottom:auto;left:14px;max-width:min(480px,calc(100vw - 100px))}
@media(max-width:700px){.pilot-control-button{padding:5px 3px;font-size:10px}.pilot-key{font-size:9px}body[data-piloting=true] .viewport-message{top:98px;left:12px}}
body[data-pilot-phase=flying] .pilot-hud-message[data-level=info],body[data-pilot-phase=recording] .pilot-hud-message[data-level=info],body[data-pilot-phase=flying] .pilot-controls>.note,body[data-pilot-phase=recording] .pilot-controls>.note{display:none}
#pilot-hud-take-note{font-size:11px;line-height:1.5;margin:7px 0 0}

/* Local reference matching: the media layer remains separate from WebGL. */
.matching-panel{min-width:0;overflow-wrap:anywhere}
.matching-panel .matching-source-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.matching-panel .matching-secondary-actions{gap:6px;margin:8px 0 16px}
.matching-panel .matching-secondary-actions button{flex:1 1 92px;font-size:11px}
.matching-panel .matching-witness-actions{margin:16px 0}
.matching-panel .matching-witness-actions button{flex:1 1 120px}
.matching-panel .matching-source-details{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.matching-panel .matching-video-preview{width:100%;overflow:hidden;border-radius:5px;margin-bottom:12px}
.matching-panel .matching-video-preview video{display:block;width:100%;max-height:230px;object-fit:contain;background:#101114}
.matching-panel .matching-go-time{display:flex;align-items:flex-end;padding-bottom:14px}
.matching-panel .matching-go-time button{width:100%}
.matching-panel .matching-panel-actions{position:sticky;bottom:-1px;padding:10px 0;background:rgba(20,20,20,.93);z-index:1}
.matching-panel .matching-panel-actions button{flex:1 1 90px}
.matching-panel .matching-visibility-details{font-size:12px;line-height:1.7;color:var(--muted);font-variant-numeric:tabular-nums}
.matching-panel .matching-privacy-note{margin-bottom:0}
#world .matching-overlay{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}
#world .matching-overlay[hidden],#world .matching-actions[hidden]{display:none!important}
#world .matching-overlay #matching-reference-raster{position:absolute;display:block;width:auto;height:auto;max-width:none;max-height:none;pointer-events:none;touch-action:none}
#world .matching-overlay[data-moving=true] #matching-reference-raster{pointer-events:auto;cursor:move}
#world .matching-overlay #matching-guides{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none}
#world .matching-horizon-line{stroke:rgba(240,221,163,.95);stroke-width:1.5;stroke-dasharray:8 5;vector-effect:non-scaling-stroke}
#world .matching-centre{stroke:rgba(242,242,242,.85);stroke-width:1.3;fill:none;vector-effect:non-scaling-stroke}
#world .matching-horizon-handle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:rgba(109,120,105,.66);box-shadow:0 2px 10px #0004;cursor:grab;touch-action:none;pointer-events:auto}
#world .matching-horizon-handle:active{cursor:grabbing;background:rgba(86,105,100,.75)}
#world .matching-horizon-handle:disabled{pointer-events:none;opacity:.3}
#world .matching-actions{position:fixed;z-index:23;left:50%;bottom:max(82px,calc(env(safe-area-inset-bottom) + 66px));transform:translateX(-50%);display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;width:max-content;max-width:calc(100vw - 28px);padding:7px 10px;border-radius:5px;background:var(--glass);box-shadow:var(--panel-shadow);backdrop-filter:blur(18px);pointer-events:auto}
#world .matching-actions>span{font-size:11px;color:var(--muted)}
#world .matching-actions button{font-size:12px;min-height:36px}
@media(max-width:700px){.matching-panel .field-triple{grid-template-columns:minmax(0,1fr)}.matching-panel .matching-secondary-actions button{min-height:40px}#world .matching-actions{bottom:max(148px,calc(env(safe-area-inset-bottom) + 132px));gap:6px;padding:7px 9px}#world .matching-actions>span{width:100%;text-align:center}#world .matching-actions button{min-height:40px;flex:1 1 80px}}
@media(pointer:coarse){.matching-panel button{min-height:42px}#world .matching-actions button{min-height:42px}}

body[data-matching-draft=true] #object-context{display:none!important}
body[data-matching-visible=true] #object-context{display:none!important}

/* Inspection navigation stays within the viewport and outside the scene data. */
.navigation-controls{position:fixed;z-index:26;right:max(16px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));width:40px;height:40px}
.navigation-toggle{width:40px;height:40px;min-height:40px;padding:9px;border:0;border-radius:5px;background:rgba(17,17,17,.73);box-shadow:var(--panel-shadow);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.navigation-toggle:hover,.navigation-toggle[aria-expanded=true]{background:rgba(63,63,63,.8)}
.navigation-toggle svg{width:22px;height:22px}
body[data-piloting=true] .navigation-controls{display:none!important}
@media(max-width:700px){.navigation-controls{right:max(12px,env(safe-area-inset-right));width:44px;height:44px}.navigation-toggle{width:44px;height:44px;min-height:44px}.navigation-pad{bottom:calc(100% + 88px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 164px)}}
@media(pointer:coarse){.navigation-pad .navigation-direction{min-height:42px;font-size:14px}.navigation-close{min-height:36px;width:36px;height:36px;padding:8px}}

/* Guided authoring and quick controls share the existing translucent surfaces. */
.workflow-mode-toggle{position:fixed;z-index:24;left:max(16px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));width:68px;min-height:40px;padding:7px 5px;border:0;border-radius:5px;background:rgba(17,17,17,.76);box-shadow:var(--panel-shadow);font-size:11px;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.guided-workflow{position:fixed;z-index:22;left:86px;top:84px;width:304px;max-width:calc(100vw - 172px);max-height:calc(100dvh - 172px);overflow:auto;overscroll-behavior:contain;padding:10px 12px;border:0;border-radius:5px;background:rgba(17,17,17,.81);box-shadow:var(--panel-shadow);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.workflow-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.workflow-heading h2{font-size:16px;line-height:1.35;font-weight:500}
.workflow-heading .icon-tool{width:32px;height:32px;min-height:32px;padding:7px;flex-shrink:0}
.workflow-heading .icon-tool svg{width:18px;height:18px}
.workflow-note{font-size:12px;line-height:1.55;color:var(--muted);margin:8px 0}
.workflow-start-choices,.workflow-action-list{display:grid;gap:7px}
.workflow-start-choices button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:4px;padding:11px 12px;white-space:normal}
.workflow-start-choices strong{font-size:13px;font-weight:500}
.workflow-start-choices span{font-size:11px;line-height:1.4;color:var(--muted)}
.workflow-progress{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;font-size:11px;color:var(--muted)}
.workflow-progress select{min-width:0;width:146px;padding:6px 7px;font-size:12px;border:0;background:rgba(54,54,54,.28)}
.guided-workflow h3{font-size:13px;font-weight:500;margin:14px 0 7px}
.guided-workflow details{margin:10px 0;font-size:12px}
.guided-workflow summary{cursor:pointer;color:var(--muted)}
.guided-workflow button,.morphology-quick button{border:0;box-shadow:0 2px 8px rgba(6,6,6,.13);background:rgba(58,58,58,.34)}
.guided-workflow button:hover,.morphology-quick button:hover{background:rgba(79,79,79,.48)}
.guided-workflow .icon-tool{background:transparent;box-shadow:none}
.workflow-scale-presets,.workflow-asset-grid,.workflow-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:7px 0 10px}
.workflow-scale-presets button,.workflow-asset-grid button,.workflow-form-grid button{min-width:0;min-height:35px;padding:7px 6px;font-size:12px;line-height:1.35}
.workflow-text-button{font-size:12px;min-height:34px;margin-top:5px}
.workflow-slider,.quick-slider{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;align-items:center;font-size:12px;line-height:1.4;margin:10px 0 14px}
.workflow-slider output,.quick-slider output{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.workflow-slider input,.quick-slider input{grid-column:1/-1;width:100%;min-width:0;padding:0;height:26px;accent-color:var(--accent)}
.workflow-footer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:12px;padding-top:9px;background:rgba(17,17,17,.87);position:static;bottom:-10px;z-index:1}
.workflow-footer button{font-size:12px;min-width:0;min-height:35px;padding:7px 4px}
.workflow-footer .primary{background:rgba(192,192,192,.72);color:var(--accent-ink)}
.morphology-quick{min-width:0;margin:10px 0 0}
.quick-object-heading{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:0 0 8px;font-size:13px}
.quick-object-heading>span{min-width:0;overflow-wrap:anywhere}
.quick-history{display:flex;gap:4px;flex-shrink:0}
.quick-history button{font-size:10px;padding:5px 6px;min-height:28px}
.quick-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:10px 0}
.quick-tabs button{font-size:12px;min-height:34px;padding:6px 5px}
.guided-workflow .quick-tabs button[aria-selected=true],.morphology-quick .quick-tabs button[aria-selected=true]{background:rgba(157,157,157,.3);color:var(--text)}
.quick-colour{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;margin:10px 0 15px}
.quick-colour input[type=color]{width:68px;height:34px;padding:3px;border:0;border-radius:5px;background:rgba(58,58,58,.3)}
.morphology-quick .button-row button,.morphology-quick .workflow-action-list button{font-size:12px;min-height:35px;padding:7px 6px}
.morphology-quick .note{font-size:11px;line-height:1.55;margin:7px 0}
.morphology-quick .quick-advanced{font-size:11px;width:100%;min-height:32px;margin-top:11px;padding:6px}
.morphology-quick select{font-size:12px;min-height:34px;padding:6px 7px;border:0;background:rgba(54,54,54,.28)}
.morphology-quick .field{font-size:11px;margin-bottom:8px}
#workflow-morphology-host .morphology-quick{padding-top:7px}
#workflow-open-quick{font-size:12px;width:100%;min-height:34px}
body[data-piloting=true] .workflow-mode-toggle,body[data-piloting=true] .guided-workflow{display:none!important}
body[data-workflow-mode=guided] #left-tools,body[data-workflow-mode=guided] #right-tools,body[data-workflow-mode=guided] #resume-builder,body[data-workflow-mode=guided] #object-context{display:none!important}
@media(max-width:700px){.workflow-mode-toggle{left:max(12px,env(safe-area-inset-left));width:56px;min-height:44px;font-size:10px;padding:5px 3px}.guided-workflow{left:12px;top:123px;width:calc(100vw - 82px);max-width:304px;max-height:calc(100dvh - 270px);padding:9px 10px}.workflow-heading h2{font-size:15px}.workflow-heading .icon-tool{width:34px;height:34px;min-height:34px}.workflow-progress{gap:7px}.workflow-progress select{width:128px;max-width:65%;font-size:11px}.workflow-scale-presets button,.workflow-asset-grid button,.workflow-form-grid button{font-size:11px;padding:7px 4px}.quick-object-heading{align-items:flex-start;flex-wrap:wrap}.quick-history{margin-left:auto}.quick-slider,.workflow-slider{font-size:11px}.quick-slider output,.workflow-slider output{font-size:10px}.workflow-footer{bottom:-9px}}
@media(pointer:coarse){.guided-workflow button,.morphology-quick button{min-height:40px}.guided-workflow select,.morphology-quick select{font-size:16px;min-height:40px}.workflow-slider input,.quick-slider input{height:34px}.quick-tabs button{min-height:40px}.quick-colour input[type=color]{height:40px}.quick-history button{font-size:11px;min-height:34px}.workflow-heading .icon-tool{min-height:40px;width:40px;height:40px}}
@media(max-width:700px){#tool-popover[data-active-panel=morphology-quick]{left:12px;right:12px;top:auto;bottom:max(146px,calc(env(safe-area-inset-bottom) + 132px));width:auto;max-width:none;max-height:min(36dvh,280px);height:auto}#tool-popover[data-active-panel=morphology-quick] #tool-panels{max-height:none}#panel-morphology-quick .morphology-quick{margin-top:0}}
.navigation-controls .icon-tool:focus-visible,.workflow-heading .icon-tool:focus-visible{outline:none;box-shadow:0 0 0 2px var(--accent),var(--panel-shadow)}
.quick-view-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0 12px}.quick-view-actions button{font-size:11px;min-height:34px;padding:6px 4px}
#quick-morphology-controls[data-context=true] .quick-view-actions{display:grid;grid-template-columns:1fr}
body[data-authoring-dragging=true] .guided-workflow{opacity:.15;pointer-events:none}
@media(max-width:700px){.guided-workflow{left:12px;right:12px;top:auto;bottom:max(146px,calc(env(safe-area-inset-bottom) + 132px));width:auto;max-width:none;max-height:min(40dvh,320px)}.quick-view-actions button{min-height:40px}}
.authoring-context-menu{position:fixed;z-index:60;display:grid;gap:4px;min-width:190px;max-width:min(240px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;overscroll-behavior:contain;padding:10px;border:0;border-radius:5px;background:rgba(17,17,17,.9);box-shadow:var(--panel-shadow);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.authoring-context-menu strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;line-height:1.4;padding:2px 5px 6px;color:var(--muted)}
.authoring-context-menu button{justify-content:flex-start;text-align:left;min-height:36px;padding:7px 9px;border:0;border-radius:5px;background:rgba(58,58,58,.3);box-shadow:0 2px 7px rgba(6,6,6,.12);font-size:12px;line-height:1.4}
.authoring-context-menu button:hover{background:rgba(79,79,79,.5)}
.authoring-context-menu button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--accent)}
@media(pointer:coarse){.authoring-context-menu button{min-height:44px;font-size:14px}}
@media(pointer:coarse){.morphology-quick button,.morphology-quick .button-row button,.morphology-quick .workflow-action-list button,.morphology-quick .quick-advanced,.morphology-quick .quick-history button,.morphology-quick .quick-tabs button,.morphology-quick .quick-view-actions button{min-height:44px}}

/* Project entry, shared morphology catalogue and component editing. */
.studio-entry{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.52);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.studio-entry-dialog{width:min(620px,100%);max-height:calc(100dvh - 48px);overflow:auto;overscroll-behavior:contain;padding:24px;border:0;border-radius:5px;background:rgba(19,20,22,.95);box-shadow:0 18px 64px rgba(0,0,0,.4);outline:none}
.studio-entry-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}
.studio-entry-dialog>header h2{font-size:20px;line-height:1.3;font-weight:500;letter-spacing:-.025em}
.studio-entry-dialog>header button{flex-shrink:0;min-height:30px;padding:5px 8px;background:transparent;box-shadow:none;font-size:12px;color:var(--muted)}
.entry-project-actions,.entry-routes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.entry-project-actions button,.entry-routes button{min-width:0;min-height:94px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px;padding:16px;text-align:left;border:0;border-radius:3px;background:rgba(255,255,255,.045);box-shadow:none;white-space:normal}
.entry-project-actions button:hover,.entry-routes button:hover{background:rgba(255,255,255,.09)}
.entry-project-actions strong,.entry-routes strong{font-size:14px;font-weight:500;line-height:1.4}
.entry-project-actions span,.entry-routes span{font-size:12px;line-height:1.55;color:var(--muted)}
.entry-overview{font-size:14px;line-height:1.75;color:var(--text);margin:0 0 22px;max-width:58ch}
.entry-routes button{min-height:86px;padding:13px 15px}
.entry-saved{margin-top:20px;padding-top:15px;border-top:1px solid rgba(255,255,255,.09)}
.entry-saved h3{margin:17px 0 9px;font-size:12px;font-weight:500;color:var(--muted)}
.entry-saved ul{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.entry-saved li button{width:100%;justify-content:flex-start;text-align:left;overflow-wrap:anywhere;font-size:12px;min-height:34px;background:rgba(255,255,255,.04);box-shadow:none}
.entry-saved>p{font-size:12px;line-height:1.5;color:var(--muted)}
.entry-import{font-size:12px;min-height:34px}
.entry-guide-intro{font-size:13px;line-height:1.6;color:var(--muted);max-width:55ch}
.entry-guide-visual{width:min(270px,100%);margin:12px auto 8px;color:#d3d5d9}
.entry-guide-visual svg{display:block;width:100%;height:auto;max-height:158px}
.entry-guide-step{min-height:96px}
.entry-guide-step>span{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.entry-guide-step h3{font-size:16px;font-weight:500;line-height:1.4;margin:5px 0 7px}
.entry-guide-step p{font-size:13px;line-height:1.6;color:var(--muted);max-width:56ch}
.entry-guide-progress{display:flex;align-items:center;gap:6px;margin:14px 0 20px}
.entry-guide-progress button{width:30px;min-height:30px;padding:4px;font-size:11px;border-radius:3px;box-shadow:none;background:rgba(255,255,255,.04);color:var(--muted)}
.entry-guide-progress button[aria-current=step]{background:rgba(219,221,225,.2);color:var(--text)}
.studio-entry-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px}
.studio-entry-dialog footer button{font-size:12px;min-width:68px;box-shadow:none}
.studio-entry-dialog footer .primary{background:#c6c8cc;color:#151618}
#studio-entry-error{font-size:12px;line-height:1.6;color:var(--error);margin-top:14px;overflow-wrap:anywhere}
.studio-gallery{margin:10px 0 14px;min-width:0}
.studio-gallery-controls{display:grid;grid-template-columns:minmax(0,1fr) 108px;gap:6px;margin-bottom:8px}
.studio-gallery-controls input,.studio-gallery-controls select{width:100%;min-width:0;min-height:32px;margin:0;padding:6px 7px;border:0;border-radius:3px;background:rgba(255,255,255,.05);font-size:11px}
.studio-gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:5px;list-style:none;margin:0;padding:0}
.studio-gallery-grid li{min-width:0}
.studio-gallery-grid .studio-gallery-form{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;min-width:0;min-height:76px;height:100%;padding:6px 4px;border:0;border-radius:3px;background:rgba(255,255,255,.035);box-shadow:none;color:#d0d2d6;line-height:1.3;text-align:center;touch-action:manipulation}
.studio-gallery-form[draggable=true]{cursor:grab}
.studio-gallery-form[draggable=true]:active{cursor:grabbing}
.studio-gallery-grid .studio-gallery-form:hover{background:rgba(255,255,255,.085);color:#f0f1f3}
.studio-gallery-form svg{display:block;width:58px;height:38px;max-width:100%;pointer-events:none;flex-shrink:0}
.studio-gallery-form span{font-size:10px;max-width:100%;overflow-wrap:anywhere;pointer-events:none}
.studio-gallery-status{margin:7px 0 0;font-size:10px;color:var(--muted);line-height:1.4}
.quick-scope-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:10px 0}
.quick-scope-tabs button{min-height:30px;padding:5px 8px;font-size:12px;border-radius:3px;box-shadow:none}
.quick-scope-tabs button[aria-pressed=true]{background:rgba(219,221,225,.18);color:var(--text)}
#quick-part-editor .field{margin-top:10px}
.quick-part-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:8px 0}
.quick-part-actions button{min-width:0;min-height:30px;padding:5px 4px;font-size:11px}
#quick-part-editor .button-row{margin:9px 0;gap:5px}
#quick-part-editor .button-row button{flex:1;min-width:0}
#quick-part-remove{color:var(--error)}
#quick-part-add,#quick-convert-parts{width:100%;font-size:12px;min-height:32px}
@media(max-width:520px){.studio-entry{padding:12px}.studio-entry-dialog{padding:18px;max-height:calc(100dvh - 24px)}.studio-entry-dialog>header{margin-bottom:16px}.studio-entry-dialog>header h2{font-size:18px}.entry-project-actions,.entry-routes{grid-template-columns:1fr;gap:7px}.entry-project-actions button,.entry-routes button{min-height:72px;padding:12px 13px}.entry-overview{font-size:13px;line-height:1.65;margin-bottom:16px}.entry-guide-visual{max-width:220px;margin:7px auto}.entry-guide-step{min-height:104px}.entry-guide-progress{margin:12px 0}.studio-entry-dialog footer{gap:6px}.studio-entry-dialog footer button{min-width:0;padding:7px 9px}.studio-gallery-controls{grid-template-columns:minmax(0,1fr) 104px}.studio-gallery-form span{font-size:11px}}
@media(pointer:coarse){button,.file-button{min-height:44px!important}.tool-rail .icon-tool,.context-actions .icon-tool,.popover-heading .icon-tool,.workflow-heading .icon-tool,.navigation-close{width:44px;height:44px;min-width:44px}.navigation-controls,.navigation-toggle{width:44px;height:44px}.studio-gallery-controls input,.studio-gallery-controls select{min-height:44px;font-size:16px}.studio-gallery-controls{grid-template-columns:minmax(0,1fr) 116px}.studio-gallery-grid .studio-gallery-form{min-height:82px!important}.entry-guide-progress button{width:44px;min-width:44px}.quick-scope-tabs button,.quick-part-actions button{font-size:12px}input[type=range]{height:44px}}
@media(prefers-reduced-motion:reduce){.studio-entry *,.studio-gallery *{scroll-behavior:auto;transition:none}}

/* Account interpretation is a compact review list within the existing panel. */
.account-assistant{min-width:0;margin:12px 0 16px}
.assistant-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.assistant-actions button{min-width:0;min-height:32px;padding:6px 8px;font-size:11px;line-height:1.4;box-shadow:none}
.assistant-filter{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:12px 0 8px}
.assistant-filter button{min-width:0;min-height:30px;padding:5px 3px;font-size:11px;border-radius:3px;background:rgba(255,255,255,.04);box-shadow:none}
.assistant-filter button[aria-pressed=true]{background:rgba(219,221,225,.18);color:var(--text)}
.assistant-choices{display:grid;gap:4px;max-height:230px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:2px}
.assistant-choices button{width:100%;min-width:0;min-height:34px;justify-content:flex-start;text-align:left;white-space:normal;overflow-wrap:anywhere;padding:7px 8px;font-size:12px;line-height:1.4;background:rgba(255,255,255,.04);box-shadow:none}
.assistant-choices button[aria-pressed=true]{background:rgba(219,221,225,.16);color:var(--text)}
#assistant-status,#assistant-questions{font-size:12px;line-height:1.6;margin:10px 0;color:var(--muted);overflow-wrap:anywhere}
#assistant-status:empty,#assistant-questions:empty{display:none}
#assistant-status[data-level=error]{color:var(--error)}
#assistant-spelling{margin:10px 0;padding-top:9px;border-top:1px solid rgba(255,255,255,.07)}
#assistant-spelling summary{font-size:11px;margin-bottom:6px}
#assistant-spelling p{font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
#assistant-review{margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.09)}
#assistant-review h3{font-size:14px;line-height:1.4;font-weight:500;margin:0 0 6px}
#assistant-action-summary{font-size:12px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
#assistant-action-summary:empty{display:none}
#assistant-values{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);gap:7px 12px;margin:12px 0;font-size:12px;line-height:1.5}
#assistant-values dt{color:var(--muted)}
#assistant-values dd{min-width:0;margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#assistant-notes p{font-size:11px;line-height:1.6;margin:7px 0;color:var(--muted);overflow-wrap:anywhere}
#assistant-review>.button-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:12px}
#assistant-review>.button-row button{min-width:0;min-height:32px;padding:6px 7px;font-size:11px;line-height:1.4;box-shadow:none}
#exact-instructions{margin-top:16px;padding-top:12px;border-top:1px solid rgba(255,255,255,.09)}
#exact-instructions>summary{font-size:12px;color:var(--muted)}
@media(pointer:coarse){.assistant-filter button{font-size:12px}.assistant-choices button{font-size:13px}.assistant-actions button,#assistant-review>.button-row button{font-size:12px}}
.workflow-form-grid.studio-gallery-host{display:block}
body[data-studio-panel=morphology-quick] #object-context{display:none!important}
.studio-project-menu{position:fixed;z-index:24;left:94px;bottom:max(14px,env(safe-area-inset-bottom));min-width:68px;min-height:36px;padding:6px 10px;border:0;border-radius:3px;background:rgba(20,20,22,.82);box-shadow:var(--soft-shadow);font-size:11px;backdrop-filter:blur(18px)}
.studio-guide-links{display:grid;gap:5px;margin:0 0 14px}.studio-guide-links button{justify-content:flex-start;text-align:left;font-size:12px}
.entry-saved .entry-recovery{min-height:28px;background:transparent;color:var(--muted);font-size:11px;padding-top:3px;padding-bottom:3px}
@media(max-width:700px){.studio-project-menu{left:auto;right:12px;top:14px;bottom:auto;min-height:36px}.space-summary{top:64px}.studio-project-menu{min-width:72px}}

/* Morphology categories share one floating control surface. */
.morphology-palette{position:fixed;z-index:28;right:max(16px,env(safe-area-inset-right));top:84px;width:78px;padding:5px;border:0;border-radius:5px;background:rgba(17,17,19,.79);box-shadow:var(--panel-shadow);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.morphology-category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
button,input,select,summary{-webkit-tap-highlight-color:rgba(220,222,226,.15)}
body[data-morphology-palette-visible=true] #left-tools #tab-scene,body[data-morphology-palette-visible=true] #left-tools #tab-objects{display:none}
@media(max-width:700px){body[data-morphology-palette-visible=true] #left-tools{right:auto;width:auto;max-width:calc(100vw - 20px)}}
.morphology-palette .morphology-category{position:relative;width:32px;min-width:0;height:34px;min-height:34px;padding:7px 6px;border:0;border-radius:3px;background:transparent;box-shadow:none;color:#c9cbd0}
.morphology-category svg{display:block;width:20px;height:20px;pointer-events:none}
.morphology-category>span{display:none;pointer-events:none}
.morphology-palette .morphology-category:hover,.morphology-palette .morphology-category[aria-expanded=true]{background:rgba(225,226,230,.13);color:#f2f3f5}
.morphology-category::after{content:attr(data-label);position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);z-index:2;display:none;width:max-content;max-width:190px;padding:6px 8px;border:0;border-radius:3px;background:rgba(20,20,22,.96);box-shadow:var(--soft-shadow);font-size:11px;font-weight:400;line-height:1.4;white-space:normal;pointer-events:none}
.morphology-category:hover::after,.morphology-category:focus-visible::after{display:block}
.morphology-category:nth-child(even)::after{right:calc(100% + 48px)}
.morphology-palette .morphology-more-tools{display:flex;flex-direction:column;gap:0;width:100%;min-height:36px;margin-top:4px;padding:3px 0;border:0;border-radius:3px;background:transparent;box-shadow:none;font-size:9px;line-height:1.3;color:var(--muted)}
.morphology-more-tools svg{width:20px;height:16px}
.morphology-palette .morphology-more-tools:hover,.morphology-palette .morphology-more-tools[aria-expanded=true]{background:rgba(225,226,230,.1);color:var(--text)}
.morphology-palette button:focus-visible{outline:none;box-shadow:0 0 0 2px #c9cbd0}
body[data-morphology-palette-visible=true] #right-tools,body[data-morphology-palette-visible=true] #object-context{display:none!important}
body[data-morphology-palette-visible=true] #workflow-form-library,body[data-morphology-palette-visible=true] #workflow-morphology-host,body[data-morphology-palette-visible=true] #workflow-open-quick,body[data-morphology-palette-visible=true] #studio-gallery-advanced{display:none!important}
body[data-morphology-palette-visible=true] #tool-popover[data-side=right]{right:104px;width:min(330px,calc(100vw - 122px))}
.morphology-palette-panel .studio-gallery{margin:0 0 4px}
.morphology-panel-actions{display:grid;gap:5px}
.morphology-panel-actions button{width:100%;min-width:0;justify-content:flex-start;text-align:left;min-height:32px;padding:7px 9px;background:rgba(255,255,255,.045);box-shadow:none;font-size:12px}
.morphology-quick[data-category] .quick-tabs,.morphology-quick[data-category]:not([data-category=size]) .quick-view-actions{display:none}
.morphology-quick[data-category]:not([data-category=size]) .quick-advanced{display:none}
.morphology-quick[data-category=surface] #quick-field-glow{display:none}
.morphology-quick[data-category=additions] .quick-scope-tabs{display:none}
.morphology-quick[data-category] .quick-object-heading{margin-top:0}
.morphology-quick[data-category] .quick-scope{margin-bottom:10px}
#quick-part-picker-row{margin:8px 0}
#quick-part-creation{margin:8px 0 12px}
#quick-part-creation .note,#quick-section-lighting>.note{font-size:11px;line-height:1.5}
#quick-add-light,#quick-place-part,#quick-part-precise{min-height:32px;font-size:12px;box-shadow:none}
#quick-part-precise{margin-top:7px}
.craft-library-save-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.craft-library-save-actions button,#craft-library-import{min-width:0;min-height:32px;padding:6px 7px;font-size:11px;box-shadow:none}
#craft-library-import{width:100%;margin:4px 0 3px}
#craft-library-status:empty{display:none}
#craft-library-status[data-level=error]{color:var(--error)}
.craft-library-list{display:grid;gap:7px;list-style:none;margin:12px 0 0;padding:0}
.craft-library-list li{min-width:0;padding:9px;background:rgba(255,255,255,.035);border:0;border-radius:3px}
.craft-library-list strong{display:block;font-size:12px;font-weight:500;line-height:1.5;overflow-wrap:anywhere}
.craft-library-meta{display:block;font-size:10px;color:var(--muted);margin:2px 0 7px}
.craft-library-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.craft-library-actions button{min-width:0;min-height:30px;padding:5px 3px;font-size:10px;box-shadow:none}
.craft-library-actions [data-craft-action=remove]{color:var(--error)}
.craft-library-list .craft-library-empty{background:transparent;padding:5px 0;font-size:12px;line-height:1.5;color:var(--muted)}
body[data-piloting=true] .morphology-palette{display:none!important}
@media(pointer:coarse){.morphology-palette{width:106px;padding:5px}.morphology-palette .morphology-category{width:46px;min-width:44px;height:48px;min-height:48px;padding:3px;display:flex;flex-direction:column;gap:1px}.morphology-category>span{display:block;font-size:9px;line-height:1.2}.morphology-category::after{display:none!important}.morphology-palette .morphology-more-tools{min-height:44px;font-size:10px}.morphology-category svg{width:20px;height:20px}body[data-morphology-palette-visible=true] #tool-popover[data-side=right]{right:132px;width:min(330px,calc(100vw - 150px))}.craft-library-actions button{font-size:11px}}
@media(max-width:700px){.morphology-palette{top:96px;right:12px;max-height:calc(100dvh - 246px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}body[data-morphology-palette-visible=true] #tool-popover[data-side=right]{left:12px;right:100px;top:auto;bottom:max(146px,calc(env(safe-area-inset-bottom) + 132px));width:auto;max-width:none;max-height:min(40dvh,320px);padding:9px}body[data-morphology-palette-visible=true] #tool-popover[data-side=right] .popover-heading{gap:5px}body[data-morphology-palette-visible=true] #tool-popover[data-side=right] .popover-heading h2{font-size:14px}body[data-morphology-palette-visible=true] #tool-popover[data-side=right] .quick-part-actions{grid-template-columns:1fr}body[data-morphology-palette-visible=true] #tool-popover[data-side=right] .button-row{display:grid;grid-template-columns:1fr}body[data-morphology-palette-visible=true] #tool-popover[data-side=right] .quick-history{margin-left:0}body[data-morphology-palette-visible=true] #tool-popover[data-side=right] .quick-object-heading{gap:5px}.craft-library-save-actions,.craft-library-actions{grid-template-columns:1fr}.morphology-palette-panel .studio-gallery-controls{grid-template-columns:1fr}.morphology-palette-panel .studio-gallery-grid{grid-template-columns:repeat(auto-fit,minmax(66px,1fr))}.morphology-palette-panel .studio-gallery-form svg{width:52px}}
@media(max-width:700px) and (pointer:coarse){body[data-morphology-palette-visible=true] #tool-popover[data-side=right]{right:124px}}
@media(max-height:540px) and (pointer:coarse){.morphology-palette{max-height:calc(100dvh - 238px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}}
@media(prefers-reduced-motion:reduce){.morphology-palette *{transition:none}}

/* Keep craft placement notices clear of the project and playback controls. */
@media(min-width:701px){body[data-morphology-palette-visible=true]:not([data-piloting=true]) .viewport-message{bottom:70px}}

/* Common craft names and surface-light placement. */
.quick-object-heading .quick-name-button{padding:0;margin:0;min-width:0;min-height:24px;max-width:100%;flex:1;text-align:left;font:inherit;font-weight:600;background:transparent;box-shadow:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quick-rename-row{width:100%;margin:8px 0 12px}.quick-rename-row .field{margin-bottom:6px}.quick-rename-row input{width:100%;min-width:0}.light-arrangement-builder .quick-slider{display:block;margin:14px 0;font-size:12px;font-weight:600}.light-arrangement-builder .quick-slider output{float:right;font-weight:400;color:#c4c5c7}.light-arrangement-builder input[type=range]{display:block;width:100%;margin-top:6px;accent-color:#c4c5c7;height:24px}.light-arrangement-builder .quick-colour{display:flex;align-items:center;justify-content:space-between;margin:14px 0;font-size:12px}.light-arrangement-builder .quick-colour input{width:52px;height:30px;padding:2px}.light-arrangement-builder .note[data-level=error]{color:#e7c2b4}.light-arrangement-builder #arrangement-inspect{width:100%;margin:2px 0 6px}.light-arrangement-builder details{margin:12px 0}.light-arrangement-builder details summary{font-size:12px}.light-arrangement-builder .field-pair{gap:8px}@media(pointer:coarse){.quick-object-heading .quick-name-button{min-height:44px}.light-arrangement-builder input[type=range]{min-height:44px}}@media(max-width:700px){.light-arrangement-builder .field-pair{display:block}.light-arrangement-builder .field{margin-bottom:10px}.light-arrangement-builder .quick-slider{margin:12px 0}}

/* Event lighting uses the shared compact tool drawer. */
.solar-result{margin:.65rem 0;padding:.75rem;background:rgba(255,255,255,.035);border:0;border-radius:8px;box-shadow:0 7px 20px rgba(0,0,0,.18)}
.solar-result dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:.45rem .65rem;margin:0 0 .75rem;font-size:.78rem}
.solar-result dt{color:var(--muted)}
.solar-result dd{margin:0;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#event-context-fields>.note{margin:.45rem 0 .8rem}
#solar-status[data-level=error]{color:#f0a5a5}
#solar-occurrence{max-width:100%;font-size:.75rem}
#solar-method p{font-size:.74rem;line-height:1.5}

/* Leave the two-column craft dock reachable beside every narrow-screen tool. */
@media(max-width:700px){
  body[data-morphology-palette-visible=true] #tool-popover{left:12px;right:100px;top:auto;bottom:max(146px,calc(env(safe-area-inset-bottom) + 132px));width:auto;max-width:none;max-height:min(40dvh,320px);padding:9px}
  body[data-morphology-palette-visible=true] #tool-popover .popover-heading{gap:5px}
  body[data-morphology-palette-visible=true] #tool-popover .popover-heading h2{font-size:14px}
  #panel-location .field-pair{display:block}
  #panel-location .field{margin-bottom:10px}
  #panel-location input[type=date],#panel-location input[type=time]{width:100%;min-width:0;font-size:12px;padding:7px}
}
@media(max-width:700px) and (pointer:coarse){body[data-morphology-palette-visible=true] #tool-popover{right:124px}}

/* Review a separate scene copy before its local download. */
.share-scope,.share-review dl{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.7fr);gap:.5rem .7rem;font-size:.78rem;line-height:1.6}
.share-scope dt,.share-review dt{color:var(--muted)}
.share-scope dd,.share-review dd{margin:0;overflow-wrap:anywhere}
.share-review{padding:.75rem;background:rgba(255,255,255,.035);border:0;border-radius:8px;box-shadow:0 7px 20px rgba(0,0,0,.18)}
.share-review h3{margin:0 0 .6rem;font-size:.9rem}
.share-review dl{grid-template-columns:minmax(0,1fr) minmax(0,1fr);font-variant-numeric:tabular-nums}
.share-review dd{text-align:right}
.video-interval{display:grid;grid-template-columns:1fr auto;gap:7px}
.video-interval input{grid-column:1/-1;width:100%;margin:0;accent-color:#c7c9ce}
.video-interval output{font-variant-numeric:tabular-nums;color:var(--muted)}
.video-export-dialog{width:min(360px,calc(100vw - 32px));box-sizing:border-box;padding:24px;border:0;border-radius:10px;background:rgba(18,20,24,.94);color:var(--text,#eef0f2);box-shadow:0 16px 60px rgba(0,0,0,.42);backdrop-filter:blur(18px)}
.video-export-dialog::backdrop{background:rgba(0,0,0,.28);backdrop-filter:blur(2px)}
.video-export-dialog h2{margin:0 0 10px;font-size:18px;font-weight:500}
.video-export-dialog progress{display:block;width:100%;height:5px;margin:20px 0 12px;accent-color:#c7c9ce}
.video-export-dialog p[role=status]{min-height:20px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.video-export-dialog button{width:100%;margin-top:8px;min-height:40px}
.analysis-series-interval{display:grid;grid-template-columns:1fr auto;gap:7px}
.analysis-series-interval input{grid-column:1/-1;width:100%;margin:0;accent-color:#c7c9ce}
.analysis-series-interval output{font-variant-numeric:tabular-nums;color:var(--muted)}
.analysis-series-chart{display:block;width:100%;height:auto;margin:12px 0 4px;background:rgba(0,0,0,.14);border:0;border-radius:6px;touch-action:pan-y;cursor:crosshair}
.analysis-series-chart text{font:var(--series-axis-font,18px) system-ui;fill:#bac0c8}
.analysis-series-axis{stroke:#b7bdc8;stroke-width:.7;opacity:.4}
.analysis-series-point{fill:#bfc5cd;opacity:.75}
.analysis-series-current{fill:#fff}
.analysis-series-values{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:6px 8px;font-size:.78rem;line-height:1.55;font-variant-numeric:tabular-nums}
.analysis-series-values dt{color:var(--muted)}
.analysis-series-values dd{margin:0;text-align:right;overflow-wrap:anywhere}
.analysis-series-record dd{font-size:.72rem}
#series-target{overflow-wrap:anywhere}
#series-progress{display:block;width:100%;height:5px;margin:10px 0;accent-color:#c7c9ce}
#series-progress[hidden]{display:none}
#series-status[data-level=error]{color:#f0a5a5}
#series-download{margin-bottom:8px}
.environment-layer-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0}
.environment-layer-switch{min-height:36px;padding:7px 9px;border:0;background:rgba(255,255,255,.045);box-shadow:0 3px 10px rgba(0,0,0,.12);color:var(--muted);font-size:12px;text-align:left}
.environment-layer-switch[aria-pressed=true]{background:rgba(220,224,230,.14);color:#eef0f2;box-shadow:0 3px 10px rgba(0,0,0,.18)}
#environment-generated-layers .button-row{flex-wrap:wrap}
#share-status[data-level=error]{color:#f0a5a5}
#open-share-scene{margin-top:.65rem}

#coordinate-paste{margin:.5rem 0 .9rem}
#coordinate-values{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:.35rem .6rem;font-size:.78rem;font-variant-numeric:tabular-nums}
#coordinate-values dt{color:var(--muted)}
#coordinate-values dd{margin:0;text-align:right;overflow-wrap:anywhere}
#coordinate-status[data-level=error]{color:#f0a5a5}
@media(max-width:700px){body[data-morphology-palette-visible=true] #tool-popover .popover-heading{top:-9px}}
/* Environment detail remains inside the existing tool surface. */
.environment-drawing-palette h3{font-size:.83rem;margin:.25rem 0 .35rem;font-weight:600;color:#e0e2e5}
.environment-design-field{display:grid;grid-template-columns:1fr auto;gap:.3rem .6rem;margin:.75rem 0;font-size:.78rem;color:#c7c9ce}
.environment-design-field input{grid-column:1/-1;width:100%;accent-color:#c4c8d0}
.environment-design-field output{font-variant-numeric:tabular-nums;color:#eceef1}
.environment-check{display:flex;align-items:center;gap:.4rem;margin:.6rem 0;font-size:.8rem}
#environment-appearance{margin:.65rem 0;padding:.65rem;background:rgba(255,255,255,.025);border:0;border-radius:9px}
#environment-appearance summary,#environment-asset-library summary{cursor:pointer;font-size:.82rem;color:#dce0e5}
#environment-asset-library{margin-top:1rem;padding-top:.4rem}
.environment-library-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.3rem;margin:.4rem 0}
.environment-library-row button{font-size:.72rem;padding:.45rem .5rem;min-width:0;overflow-wrap:anywhere}
.environment-library-row button:first-child{text-align:left}
.environment-route-point{display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.75rem;margin:.35rem 0}
.environment-route-point button{padding:.3rem .5rem;font-size:.72rem}
#route-point-tools{margin-top:.6rem}
.ground-layout-bar{position:fixed;z-index:70;left:50%;bottom:5.1rem;transform:translateX(-50%);display:flex;align-items:center;gap:.35rem;max-width:calc(100vw - 1.5rem);padding:.4rem .5rem;border:0;border-radius:11px;background:rgba(14,16,20,.86);box-shadow:0 8px 30px rgba(0,0,0,.4);backdrop-filter:blur(18px);color:#d9dce1;font-size:.75rem}
.ground-layout-bar[hidden]{display:none}
.ground-layout-bar span{padding:0 .45rem;white-space:nowrap}
.ground-layout-bar button{border:0;outline:0;border-radius:7px;padding:.45rem .65rem;background:rgba(207,212,222,.09);color:#e1e4e9;box-shadow:0 2px 8px rgba(0,0,0,.17);font:inherit;white-space:nowrap}
.ground-layout-bar button:hover{background:rgba(207,212,222,.17)}
.ground-layout-bar button:focus-visible{box-shadow:0 0 0 2px #b9bec8}
.ground-layout-bar button:disabled{opacity:.4}
@media(max-width:700px){.ground-layout-bar{bottom:4.6rem;flex-wrap:wrap;justify-content:center;width:max-content}.ground-layout-bar span{flex:1 1 100%;text-align:center;padding:.2rem}.environment-library-row{grid-template-columns:minmax(0,1fr) auto}.environment-library-row button:last-child{grid-column:2}}

@media(max-width:700px){body:has(#tool-popover:not([hidden])) .ground-layout-bar span{display:none}}

#ground-layout-bar:has(#route-back[hidden]) #route-cancel{display:none}
#object-list>li{display:flex;align-items:center;gap:7px}
#object-list>li>input[type=checkbox]{flex:0 0 auto;width:16px;height:16px;accent-color:#b8bec7;margin:0}
#object-list>li>[data-select]{flex:1;min-width:0}
#object-list>li.editor-hidden-object>[data-select]{opacity:.6}
#organisation-controls{margin-bottom:.8rem}
#organisation-selection-status{margin:.4rem 0}
#organisation-selection-tools{margin:.6rem 0}
.organisation-group-list{display:grid;gap:.35rem;margin:.6rem 0}
.organisation-group-list:empty{display:none}
.organisation-group-list button{justify-content:flex-start;font-size:.75rem;padding:.45rem .6rem}
#vegetation-brush-tools{margin-top:.75rem}
.comparison-range{margin:12px 0}.comparison-range h3{margin:0 0 7px;font-size:.83rem;font-weight:500}.comparison-range-sliders{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.comparison-range-sliders label{display:grid;grid-template-columns:1fr auto;gap:5px;font-size:.78rem;color:#bbc0c7}.comparison-range-sliders input{grid-column:1/-1;min-width:0;width:100%}.comparison-range-sliders output{font-variant-numeric:tabular-nums;color:#eef0f3}.comparison-range details{margin-top:5px}.comparison-table-wrap{overflow-x:auto;max-width:100%}.comparison-table{width:100%;border-collapse:collapse;font-size:.73rem;font-variant-numeric:tabular-nums}.comparison-table caption{text-align:left;padding:8px 0;color:#e0e3e7}.comparison-table th,.comparison-table td{padding:7px 5px;text-align:right;vertical-align:middle}.comparison-table th:first-child,.comparison-table td:first-child{text-align:left}.comparison-table th{font-weight:500;color:#aeb5bf}.comparison-table tr{box-shadow:0 1px 0 #ffffff0a}.comparison-table button{white-space:nowrap;padding:5px 7px;font-size:inherit}.comparison-table button[aria-pressed=true]{background:#b8c0ce28;color:#fff;box-shadow:0 2px 7px #0005}#comparison-source{overflow-wrap:anywhere}#scenario-comparison>summary{cursor:pointer;font-weight:500}#scenario-comparison{margin-top:15px}#comparison-preview-bar{max-width:min(680px,calc(100vw - 24px))}#comparison-preview-bar span{white-space:nowrap}#comparison-progress{width:100%}

/* Flat Studio navigation; editor controls remain in their existing panels. */
body[data-studio-navigation=flat]{--studio-rail-top:84px}
body[data-studio-navigation=flat] #left-tools{display:flex;gap:4px;padding:6px;z-index:30}
body[data-studio-navigation=flat] #left-tools .icon-tool{width:46px;height:48px;min-height:48px;padding:4px;display:flex;flex-direction:column;gap:2px}
body[data-studio-navigation=flat] #left-tools .icon-tool svg{width:20px;height:20px}
.core-tool-label{font-size:9px;line-height:1.1;font-weight:400;white-space:nowrap}
body[data-studio-navigation=flat] .description-tool{background:rgba(221,225,232,.13)}
body[data-studio-navigation=flat] #right-tools,body[data-studio-navigation=flat] #workflow-mode,body[data-studio-navigation=flat] #resume-builder{display:none!important}
.workspace-modes{position:fixed;z-index:46;top:14px;left:282px;right:auto;display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:max-content;max-width:calc(100vw - 20px);margin:0;padding:0;background:none;border:0;box-shadow:none;pointer-events:none}
.workspace-switch{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:7px 10px;border:0;border-radius:5px;background:rgba(22,23,25,.76);box-shadow:0 3px 12px #0003;color:var(--text);font-size:12px;line-height:1.25;white-space:nowrap;backdrop-filter:blur(18px);pointer-events:auto}
.workspace-switch svg{width:16px;height:16px;flex-shrink:0;color:#bfc3ca}.workspace-switch:hover,.workspace-switch[aria-expanded=true]{background:rgba(50,52,56,.86)}
.workspace-options{display:grid;gap:2px;width:max-content;min-width:174px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 118px);overflow:auto;padding:5px;border:0;border-radius:6px;background:linear-gradient(145deg,rgba(42,44,47,.93),rgba(21,22,24,.92));box-shadow:0 7px 24px #0004;backdrop-filter:blur(22px);pointer-events:auto}
.workspace-options button{width:100%;min-height:34px;padding:7px 10px;justify-content:flex-start;border:0;border-radius:4px;background:transparent;box-shadow:none;color:#c7cbd1;font-size:13px;line-height:1.3;text-align:left}
.workspace-options button:hover,.workspace-options button[aria-checked=true]{background:#d0d5dd1a;color:#f2f3f5}
body[data-studio-navigation=flat] .morphology-palette{top:var(--studio-rail-top);width:104px;padding:6px;max-height:calc(100dvh - var(--studio-rail-top) - 82px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;z-index:30}
body[data-studio-navigation=flat] .morphology-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
body[data-studio-navigation=flat] .morphology-palette .morphology-category{width:44px;min-width:0;height:44px;min-height:44px;padding:3px;display:flex;flex-direction:column;gap:2px}
body[data-studio-navigation=flat] .morphology-category svg{width:20px;height:20px}
body[data-studio-navigation=flat] .morphology-category>span{display:block;max-width:100%;font-size:9px;line-height:1.1;font-weight:400;white-space:nowrap}
body[data-studio-navigation=flat] .morphology-category::after,body[data-studio-navigation=flat] .icon-tool[data-hint]::after{display:none!important}
body[data-studio-navigation=flat] #tool-popover{top:var(--studio-rail-top)}
body[data-studio-navigation=flat] #tool-popover[data-side=right]{left:auto;right:132px;width:min(360px,calc(100vw - 148px))}
body[data-studio-navigation=flat] #tool-popover[data-side=left]{left:88px;right:auto;width:min(360px,calc(100vw - 104px))}
.studio-tooltip{position:fixed;z-index:450;pointer-events:none;max-width:min(260px,calc(100vw - 16px));padding:7px 10px;border:0;border-radius:5px;background:rgba(13,15,18,.97);box-shadow:0 4px 18px #0007;color:#eff1f4;font-size:12px;line-height:1.4;font-weight:400;white-space:normal}
body[data-studio-entry=true] .studio-tooltip{display:none!important}
.studio-library-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:16px}
.studio-library-tabs button{border:0;background:#d0d8e20b;font-size:12px}
.studio-sky-controls{margin-bottom:20px}.studio-sky-controls>h3{margin:0 0 12px}
.entry-description-start{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:6px;margin:0 0 18px;padding:16px;border:0;border-radius:6px;background:rgba(213,220,231,.12);box-shadow:0 3px 14px #0003;text-align:left}
.entry-description-start strong{font-size:16px;font-weight:500}.entry-description-start span{font-size:13px;line-height:1.6;color:#c3cad3}
.entry-intro-steps{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px}.entry-intro-steps section{padding:12px;border:0;border-radius:5px;background:#d8e0ed06}.entry-intro-steps h3{margin:4px 0 8px;font-weight:500}.entry-intro-steps p{font-size:12px;line-height:1.6;color:#bdc4ce}.entry-intro-visual{width:112px;max-width:100%;height:66px;color:#c6cdd7}.entry-intro-visual svg{width:100%;height:100%}
.workflow-stage-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:12px 0 16px}.workflow-stage-tabs button{border:0;padding:6px 3px;font-size:10px;min-width:0;background:#cfd7e20a;box-shadow:none}.workflow-stage-tabs button[aria-current=step]{background:#cfd7e222;color:#fff}
.guided-workflow #workflow-stage-title{margin:4px 0 8px;font-weight:500}.guided-workflow .workflow-action-list{display:grid;gap:6px}.guided-workflow .workflow-action-list button{width:100%;justify-content:flex-start}.guided-workflow .workflow-footer{display:flex;justify-content:space-between;gap:10px;margin-top:16px}.guided-workflow #workflow-progress{font-size:11px;color:#aeb6c1}
@media(max-width:1100px){body[data-studio-navigation=flat]{--studio-rail-top:84px}body[data-studio-navigation=flat] #left-tools{top:var(--studio-rail-top)}}
@media(max-width:700px){body[data-studio-navigation=flat]{--studio-rail-top:62px}.workspace-modes{top:61px;left:10px;right:auto}.workspace-switch{font-size:12px}.workspace-options{max-height:calc(100dvh - 126px)}.space-summary{display:none}body[data-studio-navigation=flat] #left-tools{top:auto;left:10px;right:auto;bottom:74px;flex-direction:row;gap:2px;padding:4px}body[data-studio-navigation=flat] #left-tools .icon-tool{width:44px;min-width:44px;height:44px;min-height:44px;gap:0}body[data-studio-navigation=flat] .morphology-palette{top:var(--studio-rail-top);right:10px;max-height:calc(100dvh - var(--studio-rail-top) - 108px)}body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right]{top:auto;left:10px;right:124px;bottom:134px;width:auto;max-width:none;max-height:min(48dvh,390px);padding:10px}body[data-studio-navigation=flat] #tool-popover .popover-heading{top:-10px}body[data-studio-navigation=flat] #tool-popover .popover-heading h2{font-size:14px}body[data-studio-navigation=flat] .guided-workflow{left:10px;right:124px;bottom:134px;max-height:min(48dvh,390px);padding:10px}.workflow-stage-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.workflow-stage-tabs button{font-size:9px;min-height:32px!important}.entry-intro-steps{grid-template-columns:1fr;gap:8px}.entry-intro-steps section{display:grid;grid-template-columns:54px 1fr;gap:2px 10px;padding:7px}.entry-intro-visual{width:54px;height:58px;grid-row:1/3;align-self:center}.entry-intro-steps h3{margin:0}.entry-intro-steps p{grid-column:2;font-size:11px}.entry-description-start{padding:13px}.entry-description-start strong{font-size:15px}.entry-description-start span{font-size:12px}}
@media(max-height:540px) and (min-width:701px){body[data-studio-navigation=flat] .morphology-palette{max-height:calc(100dvh - var(--studio-rail-top) - 65px)}}

/* Scene families, workspace utilities and the selected-item inspector. */
body[data-studio-navigation=flat] .morphology-category>span{display:none}
body[data-studio-navigation=flat] .morphology-category svg{width:23px;height:23px}
.studio-utilities{position:fixed;z-index:31;left:18px;bottom:20px;display:flex;gap:3px;padding:5px;border:0;border-radius:7px;background:rgba(16,18,21,.76);box-shadow:0 5px 22px #0004;backdrop-filter:blur(16px)}
.studio-utilities .icon-tool{display:flex;flex-direction:column;gap:3px;width:49px;min-width:0;min-height:46px;padding:5px 3px;border:0;border-radius:4px;background:transparent;box-shadow:none}
.studio-utilities .icon-tool svg{width:19px;height:19px}
.studio-utilities .icon-tool span{font-size:9px;font-weight:400;line-height:1.15}
.studio-utilities .icon-tool:hover,.studio-utilities .icon-tool[aria-expanded=true]{background:#ced5df1b;color:#f1f3f6}
.selected-item-tool{position:fixed;z-index:30;top:calc(var(--studio-rail-top) + 204px);right:18px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:104px;min-height:50px;padding:9px 10px;border:0;border-radius:6px;background:rgba(16,18,21,.78);box-shadow:0 5px 20px #0004;backdrop-filter:blur(16px);text-align:left}
.selected-item-tool span{font-size:9px;color:#abb3bf}.selected-item-tool strong{font-size:11px;font-weight:400;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.selected-item-tool:hover{background:rgba(41,45,51,.87)}
.selection-inspector{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;margin:0 0 14px;padding:3px;border:0;border-radius:5px;background:#b8c2d009}
.selection-inspector .icon-tool{display:flex;flex-direction:column;gap:3px;width:100%;min-width:0;min-height:43px;padding:5px 2px;box-shadow:none;border:0;background:transparent}
.selection-inspector .icon-tool svg{width:18px;height:18px}.selection-inspector .icon-tool span{font-size:9px;line-height:1.15}
.selection-inspector .icon-tool[aria-pressed=true]{background:#cbd2df21;color:#fff}
.scene-family-panel h3,#vegetation-brush-tools>h3{font-size:13px;font-weight:500;margin:15px 0 9px}.scene-family-placement .object-palette{margin:8px 0 14px}.scene-family-routes .button-row{flex-wrap:wrap}.scene-family-placement .palette-item{min-height:39px}
body[data-studio-navigation=flat] .guided-workflow{bottom:92px}
body[data-studio-navigation=flat][data-workflow-mode=guided] #left-tools{display:flex!important}
body[data-studio-entry=true] .studio-utilities,body[data-studio-entry=true] .selected-item-tool,body[data-piloting=true] .selected-item-tool{display:none!important}
.studio-utilities[hidden],.selection-inspector[hidden],.selected-item-tool[hidden],.selection-inspector button[hidden]{display:none}
body[data-studio-navigation=flat] .navigation-controls{z-index:40}
@media(max-width:700px){body:has(#ground-layout-bar:not([hidden])) .studio-utilities,body:has(#paint-action-bar:not([hidden])) .studio-utilities{display:none}}
@media(max-width:700px){body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right],body[data-studio-navigation=flat] .guided-workflow{max-height:min(48dvh,calc(100dvh - var(--studio-rail-top) - 204px))}}
@media(max-width:1100px){.studio-utilities{bottom:84px;left:16px}body[data-studio-navigation=flat] .guided-workflow{bottom:151px}}
@media(max-width:700px){.studio-utilities{bottom:76px;left:10px;right:10px;justify-content:space-between;gap:1px;padding:4px}.studio-utilities .icon-tool{flex:1;width:auto;min-height:44px}.selected-item-tool{right:10px;top:calc(var(--studio-rail-top) + 204px)}body[data-studio-navigation=flat] #left-tools{bottom:134px}body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right],body[data-studio-navigation=flat] .guided-workflow{bottom:194px;max-height:min(48dvh,390px)}.selection-inspector{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}.selection-inspector .icon-tool{min-height:44px!important}.studio-family-panel .button-row{display:grid;grid-template-columns:1fr 1fr}}
@media(max-width:700px){body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right],body[data-studio-navigation=flat] .guided-workflow{left:10px;right:10px;width:auto;max-height:min(48dvh,calc(100dvh - var(--studio-rail-top) - 398px))}body:has(#tool-popover:not([hidden])) .selected-item-tool{display:none}}
@media(max-width:700px) and (max-height:720px){body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right],body[data-studio-navigation=flat] .guided-workflow{bottom:76px;max-height:48dvh}body:has(#tool-popover:not([hidden])) .morphology-palette,body:has(#tool-popover:not([hidden])) .workspace-modes,body:has(#tool-popover:not([hidden])) .studio-utilities,body:has(#tool-popover:not([hidden])) #left-tools,body:has(#guided-workflow:not([hidden])) .morphology-palette,body:has(#guided-workflow:not([hidden])) .workspace-modes,body:has(#guided-workflow:not([hidden])) .studio-utilities,body:has(#guided-workflow:not([hidden])) #left-tools{display:none!important}}
@media(max-width:700px){body:has(#guided-workflow:not([hidden])) .selected-item-tool{display:none}}
@media(max-width:700px){.selection-inspector{grid-template-columns:repeat(6,minmax(0,1fr));gap:1px;padding:2px}}
.quick-scope-tabs[hidden]{display:none}

/* Continuous menu surfaces and compact actions. The heading stays outside the scroller. */
body[data-studio-navigation=flat] #tool-popover{display:flex;flex-direction:column;overflow:hidden;padding:0;background:linear-gradient(145deg,rgba(39,41,44,.83),rgba(20,21,23,.85));border-radius:6px}
body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right]{width:min(340px,calc(100vw - 148px))}
body[data-studio-navigation=flat] #tool-popover .popover-heading{position:relative;top:0;flex:0 0 auto;gap:10px;width:100%;margin:0;padding:10px 16px 8px;background:transparent;border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
body[data-studio-navigation=flat] #tool-popover .popover-heading h2{font-size:16px;line-height:1.35}
body[data-studio-navigation=flat] #tool-panels{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 16px 14px}
body[data-studio-navigation=flat] #selection-inspector{flex:0 0 auto;margin:0 12px 8px}
body[data-studio-navigation=flat] #builder-header{flex:0 0 auto;padding:0 16px}body[data-studio-navigation=flat] #builder-footer{flex:0 0 auto;margin:0;padding:10px 16px 14px}
.tool-popover .field{gap:4px;margin-bottom:9px}.tool-popover .note{margin:6px 0 9px;line-height:1.55}.tool-popover h3{margin:12px 0 7px}.tool-popover .button-row{gap:5px}.tool-popover .quick-slider{margin-bottom:10px}
.studio-library-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px}.studio-library-tabs button{flex:0 1 auto;padding:6px 9px}
.scene-family-placement .object-palette{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0 10px}.scene-family-placement .palette-item{flex:0 0 auto;flex-direction:row;gap:6px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.3}.scene-family-placement .palette-item svg{width:20px;height:20px}
.scene-family-routes .button-row,.scene-family-panel .workflow-action-list,.morphology-panel-actions{display:flex;flex-wrap:wrap;gap:5px}.scene-family-routes button,.scene-family-panel .workflow-action-list button,.morphology-panel-actions button{flex:0 1 auto;width:auto;min-height:32px;padding:6px 9px}
.tool-popover .view-buttons,.tool-popover .quick-view-actions,.tool-popover .workflow-action-list,.guided-workflow .workflow-action-list{display:flex;flex-wrap:wrap;gap:5px}
.tool-popover .view-buttons button,.tool-popover .quick-view-actions button,.tool-popover .workflow-action-list button,.guided-workflow .workflow-action-list button{flex:0 1 auto;width:auto;min-width:0;padding:6px 9px}
.tool-popover button.full,.tool-popover .file-button.full,.tool-popover .quick-advanced{width:fit-content;max-width:100%}.tool-popover .file-actions>*{flex:0 1 auto}.tool-popover .builder-footer button{min-width:0}
body[data-studio-navigation=flat] #tool-popover .scene-family-routes .button-row{display:flex}
.tool-popover #focus-object,.tool-popover [data-frame-space]{width:fit-content;max-width:100%}.tool-popover .viewport-toolbar{gap:8px}
body[data-studio-navigation=flat] .guided-workflow{padding:12px 16px;background:linear-gradient(145deg,rgba(39,41,44,.83),rgba(20,21,23,.85));border-radius:6px}.guided-workflow .workflow-heading{margin-bottom:8px}.guided-workflow .workflow-footer{margin-top:12px}
@media(max-width:700px){body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right]{width:auto;padding:0}body[data-studio-navigation=flat] #tool-popover .popover-heading{padding:8px 14px 6px}body[data-studio-navigation=flat] #tool-popover .popover-heading h2{font-size:15px}body[data-studio-navigation=flat] #tool-panels{padding:0 14px 12px}body[data-studio-navigation=flat] #selection-inspector{margin:0 10px 6px}body[data-studio-navigation=flat] .guided-workflow{padding:10px 14px}}

/* Category tasks share the canonical property editors and grow to their content. */
body[data-studio-navigation=flat] .guided-workflow{top:var(--studio-rail-top);bottom:auto;height:max-content;max-height:calc(100dvh - var(--studio-rail-top) - 92px)}
body[data-studio-navigation=flat] .guided-workflow .workflow-footer{background:none;box-shadow:none;border:0;padding:10px 0 0;margin-top:10px;position:static;bottom:auto}
.guided-workflow #workflow-status:empty{display:none}.guided-workflow #workflow-stages{min-height:0}.guided-workflow .workflow-stage-tabs{margin:9px 0 12px}
.family-activities{display:flex;flex-wrap:wrap;gap:4px;flex:0 0 auto;margin:0 16px 9px;padding:0}.family-activities button{min-height:31px;padding:5px 9px;font-size:12px;border:0;box-shadow:none;background:#d0d5dd0a}.family-activities button[aria-pressed=true]{background:#d0d5dd20;color:var(--text)}
.family-member-picker{margin:2px 0 12px}.family-activity-area{min-height:0}.family-activity-area:empty{display:none}
.tool-popover[data-active-family] #quick-object-picker-label{display:none}.tool-popover .scene-family-routes{display:flex;flex-wrap:wrap;gap:5px}.tool-popover .scene-family-routes button{flex:0 0 auto;width:fit-content;min-height:32px;padding:6px 10px}
.tool-popover .terrain-measurements{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px 16px}.tool-popover .terrain-measurements .field{flex:0 0 auto;max-width:100%}.tool-popover .terrain-measurements input{width:9ch;max-width:100%;padding:7px 8px}
.brush-variation{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;margin:10px 0}.brush-variation .field{margin:0;font-size:11px}.brush-variation input{width:12ch;max-width:100%;font-variant-numeric:tabular-nums}.brush-variation button{width:fit-content}
body[data-studio-navigation=flat] #selection-inspector{display:flex;flex-wrap:wrap;align-self:flex-start;width:fit-content;max-width:calc(100% - 24px);gap:1px}
.selection-inspector .icon-tool{flex:0 0 44px;width:44px}
body[data-studio-navigation=flat] #tool-popover .quick-view-actions{display:flex;flex-wrap:wrap}.tool-popover .quick-view-actions button{width:fit-content}
#family-vegetation-paint>#vegetation-brush-tools{margin:0;padding:0}#family-ground-rocks>#vegetation-brush-tools{padding-top:0}
@media(max-width:1100px) and (min-width:701px){body[data-studio-navigation=flat] .guided-workflow{max-height:calc(100dvh - var(--studio-rail-top) - 151px)}}
@media(max-width:700px){body[data-studio-navigation=flat] .guided-workflow{top:auto;bottom:194px;height:max-content;max-height:min(48dvh,calc(100dvh - var(--studio-rail-top) - 398px))}.family-activities{margin:0 14px 7px}.family-activities button{min-height:36px}.tool-popover .terrain-measurements{gap:8px 12px}}
@media(max-width:700px) and (max-height:720px){body[data-studio-navigation=flat] .guided-workflow{top:auto;bottom:76px;max-height:48dvh}}
body[data-studio-navigation=flat] .guided-workflow{display:flex;flex-direction:column;overflow:hidden}
.guided-workflow .workflow-heading,.guided-workflow .workflow-footer{flex:0 0 auto}
.guided-workflow #workflow-stages{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
.workflow-stage-content{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.guided-workflow #workflow-chooser{min-height:0;overflow:auto}
@media(max-width:700px){.guided-workflow .workflow-stage-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;gap:4px}.guided-workflow .workflow-stage-tabs button{flex:0 0 auto;min-height:44px!important;padding:6px 9px;font-size:11px}}

/* Contextual sizing and the primary shape editor share the same controls. */
.quick-slider>label:first-child{grid-column:1}.quick-slider>input[type=range]{grid-column:1/-1}.quick-slider output button{min-height:28px!important;padding:2px 5px;font:inherit;color:inherit;background:transparent;box-shadow:none}.quick-exact-row{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px}.quick-exact-row input{width:10ch;min-width:0}.quick-exact-row[hidden]{display:none}.morphology-design-entry{width:100%;margin-bottom:12px;text-align:left;padding:10px 12px;background:#c5cbd51c}.morphology-quick[data-context=true] #quick-asset-parts{display:none}#panel-morphology #quick-object-name,#panel-morphology #quick-editing-target,#panel-morphology #quick-object-picker-label,#panel-morphology .quick-scope,#panel-morphology #quick-edit-shape,#panel-morphology #quick-advanced{display:none}#panel-morphology #quick-object-editor>.quick-object-heading{justify-content:flex-end;margin:0}#panel-morphology #quick-section-shape{margin:0 0 12px}#panel-morphology #morphology-live-controls:empty{display:none}

.quick-exact-row input[type=number]{width:10ch;height:34px;padding:5px 7px}@media(pointer:coarse){.quick-slider output button{min-height:44px!important}.quick-exact-row input[type=number]{height:44px}}

body[data-studio-navigation=flat] #tool-popover #panel-morphology .quick-view-actions{display:none}

.quick-exact-row{scroll-margin-block:12px}.quick-exact-row input{scroll-margin-block:12px}

/* Craft manipulation stays with the active editor. */
.morphology-category-grid[hidden]{display:none!important}.finish-craft-button{width:auto;min-height:34px;padding:6px 9px;white-space:nowrap;background:#c7cbd51a;border:0;box-shadow:0 3px 12px #0002}.morphology-palette>.finish-craft-button{width:100%;margin-top:5px}.popover-heading .finish-craft-button{margin-left:auto;flex:0 0 auto;font-size:11px}.quick-transform-modes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;margin:5px 0}.quick-transform-modes button{min-width:0;font-size:11px;padding:7px 2px;min-height:36px}.quick-transform-modes [aria-pressed=true]{background:#d4dae32a}.quick-transform-tools{margin:8px 0}.quick-scope-tabs{display:flex;gap:4px}.quick-scope-tabs button{flex:1}body[data-studio-navigation=flat] .morphology-quick[data-category=additions] .quick-scope-tabs{display:flex}#quick-parts-tools #quick-move-part,#quick-parts-tools #quick-lift-part{display:none}#panel-morphology .quick-scope{display:block}#panel-morphology #quick-part-picker-row,#panel-morphology #quick-parts-tools{display:none}#panel-morphology #quick-editing-target{display:block}#panel-morphology .quick-scope[hidden]{display:none}#panel-craft-finish .workflow-action-list{display:flex;flex-wrap:wrap;gap:5px}#panel-craft-finish #craft-finish-name{max-width:26ch}#panel-craft-finish h3{margin-top:4px}@media(pointer:coarse){.quick-transform-modes button,.finish-craft-button{min-height:44px}}

body[data-studio-navigation=flat] #edit-selected-item{top:var(--studio-selected-top,calc(var(--studio-rail-top) + 204px))}.quick-transform-modes button{font-size:14px;line-height:1.15;min-height:44px}#quick-transform-hint{font-size:14px;line-height:1.35}.popover-heading .finish-craft-button{font-size:14px}

body[data-workspace-mode=morphology] [data-environment-example=true]{display:none}

/* Screen controls share the studio's compact silver and black surfaces. */
#studio-fullscreen{position:fixed;z-index:90;top:16px;right:16px;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:10px;border:0;border-radius:5px;color:var(--text);background:var(--glass);box-shadow:var(--soft-shadow)}
#studio-fullscreen svg{width:23px;height:23px}#studio-fullscreen:focus-visible{outline:2px solid #e3e4e5;outline-offset:3px}.space-summary{right:70px}html.is-window-fullscreen{position:fixed;inset:0;width:100vw;height:100dvh}
body[data-embedded-studio=true] .space-summary{right:70px}
@media(max-width:700px){#studio-fullscreen{top:10px;right:10px}}
@media(min-width:701px) and (max-height:360px){
  body[data-studio-navigation=flat] #left-tools{top:68px;bottom:auto;left:10px;right:auto;flex-direction:row}
  body[data-studio-navigation=flat] .studio-utilities{top:68px;bottom:auto;left:220px;right:auto;gap:2px;padding:4px}
  body[data-studio-navigation=flat] .morphology-palette{top:68px;max-height:calc(100dvh - 78px);overflow-y:auto;scrollbar-width:thin}
  body[data-studio-navigation=flat] .navigation-controls{right:auto;left:10px;bottom:10px}
  body[data-studio-navigation=flat] #tool-popover[data-side=left],body[data-studio-navigation=flat] #tool-popover[data-side=right],body[data-studio-navigation=flat] .guided-workflow{top:10px;bottom:10px;left:10px;right:70px;width:auto;max-height:calc(100dvh - 20px)}
}

/* Three small dots keep the selected object clear. */
.direct-controls{position:absolute;inset:0;z-index:8;pointer-events:none;overflow:hidden;touch-action:none}
.direct-controls .direct-control-handle{position:absolute;display:grid;place-items:center;transform:translate(-50%,-50%);width:28px;height:28px;min-height:28px;margin:0;padding:0;border:0;background:transparent;box-shadow:none;color:#fff;pointer-events:auto;touch-action:none;cursor:grab}
.direct-control-handle>span{display:block;width:6px;height:6px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #14202b66,0 1px 4px #0008;pointer-events:none}
.direct-control-handle:hover>span,.direct-control-handle:focus-visible>span{width:8px;height:8px}
.direct-controls .direct-control-handle:disabled{opacity:.4;cursor:default}.direct-control-handle:active{cursor:grabbing}
.direct-control-note{position:absolute;transform:translateX(-50%);padding:3px 7px;border-radius:3px;background:#101820df;color:#fff;font:12px/1.4 Inter,ui-sans-serif,system-ui,sans-serif;box-shadow:0 2px 8px #0003;pointer-events:none;white-space:nowrap}
.direct-rotation-rings{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none;touch-action:none}
.rotation-ring-target{cursor:grab;outline:none}.rotation-ring-hit{fill:none;stroke:transparent;stroke-width:18;pointer-events:stroke;vector-effect:non-scaling-stroke;touch-action:none}
.rotation-ring-line{fill:none;stroke:#fff;stroke-width:1;opacity:.42;pointer-events:none;vector-effect:non-scaling-stroke}
.rotation-ring-target:hover .rotation-ring-line,.rotation-ring-target:focus .rotation-ring-line,.rotation-ring-target[data-active=true] .rotation-ring-line{opacity:1;stroke-width:1.25}
.rotation-ring-target:focus-visible .rotation-ring-line{stroke-width:2;opacity:1}
.rotation-ring-target[aria-disabled=true]{opacity:.4;pointer-events:none}.rotation-ring-marker{fill:#fff;stroke:#14202b66;stroke-width:1;pointer-events:none}
.quick-precise-transform{margin:10px 0 0;padding:8px 0 0;border-top:1px solid #ffffff1f}.quick-precise-transform>summary{cursor:pointer;font-size:12px;font-weight:500;line-height:1.5;color:#fff}.quick-precise-transform[open]>summary{margin-bottom:12px}
@media(pointer:coarse){.direct-controls .direct-control-handle{width:44px;height:44px;min-height:44px}.direct-control-handle>span{width:7px;height:7px}.rotation-ring-hit{stroke-width:28}}

.spectrum-colour-picker{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:4px 0 12px!important}.spectrum-colour-heading{flex-basis:100%;font-size:14px}.spectrum-colour-choose{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:13px}.spectrum-colour-picker input[type=color]{width:38px;height:32px;min-width:38px;padding:2px;border:0;border-radius:3px;background:#ffffff0b;cursor:pointer}.spectrum-colour-exact{display:inline-flex;align-items:center;gap:6px;font-size:12px}.spectrum-colour-exact input[type=text]{width:10ch;min-width:0;height:32px;padding:4px 6px;font:13px/1.4 ui-monospace,monospace;text-transform:lowercase}.spectrum-colour-exact [aria-invalid=true]{box-shadow:0 0 0 1px #ffc2ad}

/* Frosted panel surfaces retain the compact studio layout. */
:root{
  --preview-glass-fill:rgba(20,28,38,.18);
  --preview-glass-sheen:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.055'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23f)' d='M0 0h120v120H0z'/%3E%3C/svg%3E"),linear-gradient(135deg,rgba(255,255,255,.23),rgba(255,255,255,.035) 38%,rgba(255,255,255,.11)),linear-gradient(115deg,rgba(255,255,255,.11),transparent 36% 70%,rgba(255,255,255,.07));
  --preview-glass-shadow:inset 0 1px 0 rgba(255,255,255,.62),inset 1px 0 0 rgba(255,255,255,.19),inset -1px -1px 0 rgba(255,255,255,.08),inset 0 0 24px rgba(255,255,255,.055),0 10px 30px rgba(6,16,29,.28);
}
.app-header,.space-summary,.tool-rail,.tool-popover,.object-context,
.compact-playback,.guided-workflow,.studio-entry-dialog,.studio-utilities,
.studio-core-tools,.morphology-palette,.workspace-options,.camera-navigation,
.ground-layout-bar,dialog,.world #graphics-status{
  background-color:var(--preview-glass-fill)!important;
  background-image:var(--preview-glass-sheen)!important;
  background-size:120px 120px,100% 100%,100% 100%!important;
  box-shadow:var(--preview-glass-shadow)!important;
  backdrop-filter:blur(28px) saturate(1.45) brightness(.78)!important;
  -webkit-backdrop-filter:blur(28px) saturate(1.45) brightness(.78)!important;
}
.tool-popover .popover-heading,.guided-workflow .popover-heading{
  background-color:transparent!important;
  background-image:none!important;
}
/* White labels and a fine brushed button surface. */
:is(.tool-popover,.guided-workflow,.studio-entry-dialog,dialog) :is(p,label,small,summary,dt,dd,output,h1,h2,h3,.note){color:#fff!important}
:is(.tool-popover,.guided-workflow,.studio-entry-dialog,dialog) [role=status]:not([data-level=error]){color:#fff!important}
:is(.tool-popover,.guided-workflow,.studio-entry-dialog,dialog) :is(span,a,legend,input,select,textarea,button:not(.primary)){color:#fff!important}
:is(.tool-popover,.guided-workflow,.studio-entry-dialog,dialog) [data-level=error]{color:#ffd0bb!important}
:is(.tool-popover,.guided-workflow,.studio-entry-dialog,dialog) button:not(.icon-tool,.panel-help-toggle){
  background-image:linear-gradient(180deg,rgba(255,255,255,.20),rgba(255,255,255,.025) 48%,rgba(0,0,0,.12)),repeating-linear-gradient(95deg,rgba(255,255,255,.028) 0 1px,transparent 1px 3px)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(0,0,0,.12),0 2px 8px rgba(0,0,0,.16)!important;
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .app-header,.space-summary,.tool-rail,.tool-popover,.object-context,
  .compact-playback,.guided-workflow,.studio-entry-dialog,.studio-utilities,
  .studio-core-tools,.morphology-palette,.workspace-options,.camera-navigation,
  .ground-layout-bar,dialog,.world #graphics-status{background-color:rgba(52,56,61,.92)!important}
}

/* The contour is a primary editor; precision fields and point tools stay compact. */
#profile-tools{margin:0 0 12px}#profile-tools h3{margin-top:0}
.profile-coordinates{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0}
.profile-coordinates .field{display:flex;flex-direction:column;gap:5px;margin:0;width:max-content}
#profile-editor .profile-coordinates input{width:88px;min-width:0;max-width:100%;padding:6px 7px;font-variant-numeric:tabular-nums;appearance:textfield}
#profile-editor .profile-coordinates input::-webkit-inner-spin-button,#profile-editor .profile-coordinates input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.profile-point-actions{display:flex;gap:5px;margin:7px 0 12px}
#profile-tools .profile-point-actions .icon-tool{width:32px;height:32px;min-height:32px;padding:6px;flex:0 0 auto}
.profile-point-actions svg{width:20px;height:20px}
.profile-surface{display:flex;align-items:center;gap:12px;font-size:12px;margin:10px 0}
.profile-surface [role=group]{display:flex;gap:3px}.profile-surface button{display:flex;align-items:center;gap:5px;padding:4px 7px;min-height:32px}
.profile-surface svg{width:24px;height:24px}.profile-surface button[aria-pressed=true]{background:rgba(223,231,238,.2);box-shadow:inset 0 1px 3px #fff2,0 2px 8px #0002}
.studio-history{position:fixed;z-index:40;display:flex;gap:4px;right:calc(max(16px,env(safe-area-inset-right)) + 46px);bottom:max(14px,env(safe-area-inset-bottom));pointer-events:auto;background:var(--preview-glass-fill);background-image:var(--preview-glass-sheen);box-shadow:var(--preview-glass-shadow);backdrop-filter:blur(24px) saturate(125%);-webkit-backdrop-filter:blur(24px) saturate(125%);border-radius:5px}
.studio-history .icon-tool{width:36px;height:40px;min-height:40px;padding:8px}.studio-history svg{width:21px;height:21px}
body[data-studio-entry=true] .studio-history,body[data-piloting=true] .studio-history{display:none}
.scene-family-routes button,.paint-start{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;padding:6px 9px;min-height:34px}.scene-family-routes svg,.paint-start svg{width:23px;height:23px;flex:0 0 auto}
.ground-layout-bar .icon-tool{width:32px;height:32px;min-height:32px;padding:6px}.ground-layout-bar .icon-tool svg{width:20px;height:20px}
body[data-compact-studio=true] #mobile-tools-tray .studio-history{position:static;display:flex;justify-content:flex-end;gap:4px;width:100%;margin:0;padding:0;background:none;box-shadow:none}
body[data-compact-studio=true] #mobile-tools-tray .studio-history .icon-tool{width:44px!important;min-width:44px}
@media(pointer:coarse){#profile-tools .profile-point-actions .icon-tool{width:44px;height:44px;padding:11px}.profile-surface button{min-height:44px}#profile-editor .profile-coordinates input{font-size:16px}}

/* Compact controls follow the screen edges; the whole card can scroll. */
.compact-sheet-toggle{display:none}
@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 body[data-compact-studio=true]{--edge-button:32px;--edge-top:44px}
 body[data-compact-studio=true] .app-header{top:max(6px,env(safe-area-inset-top));left:6px;padding:5px 7px;height:30px}
 body[data-compact-studio=true] .app-header .brand{display:none}body[data-compact-studio=true] .app-header h1{font-size:12px}
 body[data-compact-studio=true] #workspace-modes{top:6px;left:106px;right:44px;width:max-content;max-width:calc(100vw - 152px)}
 body[data-compact-studio=true] #workspace-switch{min-height:30px!important;height:30px;padding:4px 6px;font-size:10px;gap:5px}body[data-compact-studio=true] #workspace-switch svg{width:15px;height:15px}
 body[data-compact-studio=true] .space-summary{display:none}
 body[data-compact-studio=true] #left-tools{top:var(--edge-top);bottom:auto;left:6px;right:auto;display:flex;flex-direction:column;gap:0;width:36px;padding:2px;z-index:90}
 body[data-compact-studio=true] #studio-utilities{position:fixed;top:auto;bottom:max(6px,env(safe-area-inset-bottom));left:6px;right:auto;width:196px;height:36px;display:flex;flex-direction:row;justify-content:flex-start;gap:0;padding:2px;z-index:90}
 body[data-compact-studio=true] #morphology-palette:not([hidden]){position:fixed;display:block!important;top:var(--edge-top)!important;right:6px;left:auto;bottom:auto;width:72px;padding:2px;max-height:calc(100dvh - 88px);overflow-y:auto;z-index:90}
 body[data-compact-studio=true] .morphology-category-grid{grid-template-columns:repeat(2,32px);gap:2px}
 body[data-compact-studio=true] .tool-rail .icon-tool,body[data-compact-studio=true] #studio-utilities .icon-tool,body[data-compact-studio=true] .morphology-category{width:32px;min-width:32px;height:32px;min-height:32px!important;flex:0 0 32px;padding:6px;gap:0}
 body[data-compact-studio=true] .tool-rail svg,body[data-compact-studio=true] #studio-utilities svg,body[data-compact-studio=true] .morphology-category svg{width:20px;height:20px}
 body[data-compact-studio=true] .core-tool-label,body[data-compact-studio=true] #studio-utilities .icon-tool>span,body[data-compact-studio=true] .morphology-category>span{display:none}
 body[data-compact-studio=true] .compact-playback{top:var(--edge-top);bottom:auto;left:48px;right:auto;transform:none;gap:2px;padding:2px;height:36px;z-index:80}
 body[data-compact-studio=true] .compact-playback .icon-tool{width:32px;height:32px;min-height:32px!important;padding:6px}body[data-compact-studio=true] #quick-time{min-width:40px;font-size:10px}
 body[data-compact-studio=true] #navigation-controls{right:6px;left:auto;bottom:max(6px,env(safe-area-inset-bottom));width:32px;height:36px;z-index:90}
 body[data-compact-studio=true] #navigation-toggle{width:32px;height:36px;min-height:32px!important;padding:6px}
 body[data-compact-studio=true] #studio-history{position:fixed;right:44px;left:auto;bottom:max(6px,env(safe-area-inset-bottom));gap:0;padding:2px;width:68px;height:36px;z-index:90}
 body[data-compact-studio=true] #studio-history .icon-tool{width:32px;height:32px;min-height:32px!important;padding:6px}
 body[data-compact-studio=true] #edit-selected-item{right:6px;top:184px;bottom:auto;width:72px;min-height:32px!important;padding:5px;font-size:10px}
 body[data-compact-studio=true] #edit-selected-item small{display:none}
 body[data-compact-studio=true] #tool-popover[data-side=left],body[data-compact-studio=true] #tool-popover[data-side=right],body[data-compact-studio=true] .guided-workflow{display:block;top:84px!important;bottom:auto!important;left:48px!important;right:84px!important;width:auto!important;max-width:360px;max-height:min(54dvh,calc(100dvh - 134px))!important;height:auto!important;min-height:0!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:0;z-index:70;scroll-padding:44px 0 8px;scrollbar-width:thin}
 body[data-compact-studio=true] #tool-popover .popover-heading,body[data-compact-studio=true] .guided-workflow .workflow-heading{position:sticky;top:0;display:flex;align-items:center;gap:2px;min-height:34px;margin:0;padding:2px 4px;z-index:8;background:var(--preview-glass-fill);background-image:var(--preview-glass-sheen);backdrop-filter:blur(24px)}
 body[data-compact-studio=true] .popover-heading h2,body[data-compact-studio=true] .workflow-heading h2{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px!important;line-height:1.3}
 body[data-compact-studio=true] .popover-heading .icon-tool,body[data-compact-studio=true] .workflow-heading .icon-tool,body[data-compact-studio=true] .compact-sheet-toggle{display:inline-flex;flex:0 0 28px;width:28px;min-width:28px;min-height:28px!important;height:28px;padding:5px}
 body[data-compact-studio=true] #tool-panels{display:block;flex:none;min-height:0;max-height:none!important;height:auto;overflow:visible;padding:0 8px 30px}
 body[data-compact-studio=true] .tool-panel,body[data-compact-studio=true] .panel-content{min-height:0;height:auto;padding-top:0}
 body[data-compact-studio=true] #selection-inspector{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-self:auto;width:auto;max-width:none;margin:0 6px 5px;gap:1px;padding:1px}
 body[data-compact-studio=true] #selection-inspector .icon-tool{width:100%;height:30px;min-height:30px!important;padding:5px;gap:0}
 body[data-compact-studio=true] #selection-inspector .icon-tool span{display:none}
 body[data-compact-studio=true] .family-activities{display:flex;flex-wrap:wrap;gap:3px;margin:0 8px 6px;padding:0}
 body[data-compact-studio=true] #tool-popover button:not(.direct-control-handle),body[data-compact-studio=true] .guided-workflow button{min-height:32px!important;padding:5px 7px;font-size:11px}
 body[data-compact-studio=true] .field{margin-bottom:8px;gap:3px;font-size:11px}body[data-compact-studio=true] .field-pair,body[data-compact-studio=true] .field-triple{gap:5px}
 body[data-compact-studio=true] #tool-popover input:not([type=range]):not([type=checkbox]):not([type=color]),body[data-compact-studio=true] #tool-popover select{min-height:32px;padding:5px;font-size:16px}
 body[data-compact-studio=true] #tool-popover input[type=range]{height:32px}body[data-compact-studio=true] #tool-popover h3{font-size:12px;margin:10px 0 6px}
 body[data-compact-studio=true] #tool-popover .note,body[data-compact-studio=true] .guided-workflow .note{font-size:11px;line-height:1.4;margin:5px 0 8px}
 body[data-compact-studio=true] #tool-popover details{margin-top:8px;padding-top:6px}body[data-compact-studio=true] #tool-popover summary{margin-bottom:7px;font-size:11px}
 body[data-compact-studio=true] #quick-transform-hint{display:none}body[data-compact-studio=true] .quick-precise-transform{margin-top:5px;padding-top:5px}
 body[data-compact-studio=true] .profile-coordinates{gap:8px}.profile-coordinates .field-qualifier{font-size:inherit}
 body[data-compact-studio=true] .profile-coordinates .field-qualifier{display:none}body[data-compact-studio=true] #profile-editor .profile-coordinates input{width:72px;font-size:16px;padding:5px}
 body[data-compact-studio=true] #profile-tools .profile-point-actions .icon-tool{width:32px;height:32px;min-height:32px!important;padding:6px}
 body[data-compact-studio=true] .spectrum-colour-heading{font-size:12px}body[data-compact-studio=true] .spectrum-colour-picker{gap:5px 8px;margin-bottom:8px!important}
 body[data-compact-studio=true] .spectrum-colour-choose>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}body[data-compact-studio=true] .spectrum-colour-exact input[type=text]{width:9ch;font-size:13px!important}
 body[data-compact-studio=true] .guided-workflow #workflow-stages,body[data-compact-studio=true] .guided-workflow #workflow-chooser{padding:0 8px 7px}
 body[data-compact-studio=true] #tool-popover[data-mobile-collapsed=true],body[data-compact-studio=true] .guided-workflow[data-mobile-collapsed=true]{height:auto!important;max-height:40px!important}
 body[data-compact-studio=true] #tool-popover[data-mobile-collapsed=true]>:not(.popover-heading),body[data-compact-studio=true] .guided-workflow[data-mobile-collapsed=true]>:not(.workflow-heading),body[data-compact-studio=true][data-mobile-scene-gesture=true] #tool-popover>:not(.popover-heading),body[data-compact-studio=true][data-mobile-scene-gesture=true] .guided-workflow>:not(.workflow-heading){display:none!important}
 body[data-compact-studio=true] .viewport-message{bottom:48px!important;left:48px;max-width:calc(100vw - 132px);max-height:65px;padding:5px 7px;font-size:10px}
 body[data-compact-studio=true][data-studio-entry=true] #left-tools,body[data-compact-studio=true][data-studio-entry=true] #studio-utilities,body[data-compact-studio=true][data-studio-entry=true] #morphology-palette,body[data-compact-studio=true][data-piloting=true] #left-tools,body[data-compact-studio=true][data-piloting=true] #studio-utilities,body[data-compact-studio=true][data-piloting=true] .compact-playback{display:none!important}
}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){body[data-compact-studio=true] #tool-popover[data-side],body[data-compact-studio=true] .guided-workflow{top:44px!important;max-height:calc(100dvh - 90px)!important;left:auto!important;right:84px!important;width:300px!important}body[data-compact-studio=true] .compact-playback{left:48px;top:44px}}

/* Function icons retain their accessible names and shared hover annotations. */
body[data-panel-ui=true] .studio-action-icon{width:34px!important;min-width:34px!important;min-height:34px;height:34px;padding:6px!important;gap:0!important;flex:0 0 34px!important;font-size:0!important}
body[data-panel-ui=true] .studio-action-icon>span{display:none!important}
body[data-panel-ui=true] .studio-action-icon>svg{display:block;width:22px;height:22px;flex:0 0 auto;pointer-events:none}
body[data-panel-ui=true] .button-row:not([hidden]):has(>.studio-action-icon),body[data-panel-ui=true] .quick-part-actions:not([hidden]):has(>.studio-action-icon),body[data-panel-ui=true] .morphology-panel-actions:not([hidden]):has(>.studio-action-icon),body[data-panel-ui=true] .object-palette:not([hidden]):has(>.studio-action-icon),body[data-panel-ui=true] .scene-family-routes:not([hidden]):has(>.studio-action-icon){display:flex!important;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:4px}
body[data-panel-ui=true] .tool-rail .icon-tool>span,body[data-panel-ui=true] #studio-utilities .icon-tool>span,body[data-panel-ui=true] .morphology-category>span,body[data-panel-ui=true] .selection-inspector .icon-tool>span{display:none}
body[data-panel-ui=true] .morphology-category{width:44px;min-height:40px;padding:8px;gap:0}
body[data-panel-ui=true] .studio-gallery-grid{grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:4px}
body[data-panel-ui=true] .studio-gallery-form.studio-action-icon{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:3px!important;flex-basis:44px!important}
body[data-panel-ui=true] .studio-gallery-form.studio-action-icon svg{width:38px;height:30px}
body[data-panel-ui=true] .profile-surface{display:flex;gap:4px;margin:8px 0}.profile-surface button{width:34px;height:34px;padding:5px;gap:0}
body[data-panel-ui=true] #profile-editor>p.note,body[data-panel-ui=true] #profile-budget,body[data-panel-ui=true] #morphology-intro,body[data-panel-ui=true] .scene-family-placement>p.note{display:none}
.studio-panel-help{padding:2px 10px 8px}.panel-help-intro{font-size:12px;line-height:1.5;margin:4px 0 12px}
.panel-help-item{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;align-items:start;margin:10px 0;font-size:12px;line-height:1.5}.panel-help-item svg{width:26px;height:26px}
body[data-panel-ui=true] :is(#tool-popover,.guided-workflow) :is(.popover-heading,.workflow-heading) .panel-help-toggle {
  position:relative;display:inline-grid;place-items:center;flex:0 0 24px;align-self:center;
  width:24px;height:24px;min-width:24px;min-height:24px!important;
  margin:0;padding:0;border:0;border-radius:50%;
  background:none;box-shadow:none;color:#fff;
  font-size:11px;font-weight:650;line-height:1;
}
.panel-help-toggle::before {
  content:"";position:absolute;inset:4px;border:1px solid currentColor;border-radius:50%;pointer-events:none;
}
.panel-help-toggle:hover::before,.panel-help-toggle:focus-visible::before {border-width:2px;}
.panel-help-toggle svg {width:11px;height:11px;}
.popover-heading,.workflow-heading {justify-content:flex-start;}
.popover-heading h2,.workflow-heading h2 {flex:1 1 auto;min-width:0;}
.popover-heading .compact-sheet-toggle,.workflow-heading .compact-sheet-toggle {order:7;}
.popover-heading .panel-help-toggle,.workflow-heading .panel-help-toggle {order:8;}
.popover-heading #close-tools,.workflow-heading #workflow-all-tools {order:9;}
body[data-compact-studio=true] :is(#tool-popover,.guided-workflow)[data-mobile-collapsed=true] .panel-help-toggle,
body[data-mobile-scene-gesture=true] :is(#tool-popover,.guided-workflow) .panel-help-toggle {display:none!important;}
#tool-popover[data-panel-help=true]>:not(.popover-heading):not(.studio-panel-help):not(.panel-help-toggle),.guided-workflow[data-panel-help=true]>:not(.workflow-heading):not(.studio-panel-help):not(.panel-help-toggle){display:none!important}
body[data-panel-ui=true] .studio-tooltip{z-index:2000;pointer-events:none;padding:5px 8px;max-width:min(240px,calc(100vw - 16px));font-size:12px}
body[data-panel-ui=true] .direct-controls[data-active-control=""] .direct-control-note{display:none}
@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 body[data-compact-studio=true][data-panel-ui=true] .studio-action-icon{width:32px!important;min-width:32px!important;min-height:32px!important;height:32px!important;flex-basis:32px!important;padding:5px!important}
 body[data-compact-studio=true][data-panel-ui=true] #selection-inspector .icon-tool{width:100%!important;min-width:0!important;flex-basis:auto!important}
 body[data-compact-studio=true][data-panel-ui=true] .morphology-category{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:6px}
 body[data-compact-studio=true] .studio-panel-help{padding:2px 8px 8px}.panel-help-item{gap:6px}
 body[data-compact-studio=true][data-panel-ui=true] .studio-gallery-form.studio-action-icon{width:44px!important;min-width:44px!important;min-height:44px!important;height:44px!important;flex-basis:44px!important;padding:3px!important}
}

@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 body[data-compact-studio=true] #morphology-palette:not([hidden]){display:grid!important;grid-template-columns:repeat(2,32px);gap:2px}
 body[data-compact-studio=true] #morphology-palette>.morphology-category-grid{grid-column:1/-1;order:0}
 body[data-compact-studio=true] #morphology-palette>#edit-selected-item{position:static;order:1;transform:none;margin:0;width:32px!important;min-width:32px!important;height:32px;min-height:32px!important;padding:5px}
 body[data-compact-studio=true] #morphology-palette>.finish-craft-button{order:2;margin:0;width:32px!important;min-height:32px!important;height:32px;padding:5px}
}

body[data-workspace-mode=morphology] #selection-inspector{display:none!important}

@media(max-width:700px),(max-width:1000px) and (max-height:500px){body[data-compact-studio=true] #studio-fullscreen{top:6px;right:6px;width:32px;height:32px;min-height:32px!important;padding:6px}body[data-compact-studio=true] #studio-fullscreen svg{width:20px;height:20px}}

body[data-panel-ui=true]:not([data-compact-studio=true]) #studio-history{height:40px;padding:4px}
body[data-panel-ui=true]:not([data-compact-studio=true]) #studio-history .studio-action-icon{width:32px!important;min-width:32px!important;height:32px;min-height:32px!important;padding:5px!important}
body[data-panel-ui=true] #panel-craft-library>p.note:not([role=status]),body[data-panel-ui=true] #environment-asset-library>p.note:not([role=status]){display:none}
body[data-compact-studio=true] #instruction-text{height:96px;min-height:64px;max-height:240px}

@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 body[data-compact-studio=true] #selection-inspector{display:flex;flex-wrap:wrap;width:fit-content;max-width:calc(100% - 12px);gap:2px}
 body[data-compact-studio=true][data-panel-ui=true] #selection-inspector .icon-tool{width:32px!important;min-width:32px!important;flex:0 0 32px!important}
 body[data-compact-studio=true] #tool-popover .popover-heading,body[data-compact-studio=true] .guided-workflow .workflow-heading{padding:2px 8px}
}

body[data-panel-ui=true] .family-activities[data-single=true]{display:none}

/* Small control cards expand only when an editor needs the extra room. */
body[data-studio-navigation=flat] #tool-popover[data-side] {
  --editor-width: 310px;
  --editor-scale: .8;
  --slider-width: 100%;
  --editor-limit: min(var(--editor-width), calc(100vw - 148px));
  --editor-gutters: 20px;
  width: calc((var(--editor-limit) - var(--editor-gutters)) * var(--editor-scale) + var(--editor-gutters));
}
body[data-studio-navigation=flat] #tool-popover:is([data-active-panel="camera"],[data-active-panel="scale"],
  [data-active-panel="scene-water"],[data-active-panel="scene-people"],[data-active-panel="scene-lights"]),
body[data-studio-navigation=flat] #tool-popover[data-active-panel="morphology-quick"]:has(.morphology-quick[data-category="size"]) {
  --editor-width: 247px;
}
body[data-studio-navigation=flat] #tool-popover:is([data-active-panel="analysis"],[data-active-panel="matching"],
  [data-active-panel="flight"],[data-active-panel="pilot"],[data-active-panel="timeline"]) {
  --editor-width: 360px;
}
body[data-studio-navigation=flat] #tool-popover:is([data-active-panel="analysis"],[data-active-panel="matching"],
  [data-active-panel="flight"],[data-active-panel="pilot"],[data-active-panel="timeline"],[data-active-panel="morphology"]) {
  --editor-scale: 1;
  --slider-width: 80%;
}
body[data-studio-navigation=flat] #tool-popover .popover-heading {min-height:36px;padding:3px 9px;gap:4px;}
body[data-panel-ui=true] .guided-workflow .workflow-heading {gap:4px;}
body[data-studio-navigation=flat] #tool-panels {padding:0 10px 7px;}
body[data-studio-navigation=flat] #selection-inspector,
body[data-studio-navigation=flat] .family-activities {margin:0 9px 5px;gap:3px;}
body[data-studio-navigation=flat] #selection-inspector .icon-tool {
  flex:0 0 34px;width:34px;min-width:34px;min-height:34px!important;height:34px;padding:6px;
}
.tool-popover .field {margin-bottom:6px;gap:3px;}
.tool-popover :is(.tool-panel,.scene-family-placement) > .button-row {margin:5px 0 7px;}
.tool-popover details:not([open]) {margin-block:4px;padding-block:2px;}
.tool-popover details:not([open]) > summary {margin-bottom:0;}
.tool-popover .studio-library-tabs {margin-bottom:6px;gap:3px;}
.tool-popover .scene-family-placement .object-palette {margin:3px 0 6px;}
.tool-popover .quick-object-heading {justify-content:flex-start;gap:5px;margin:2px 0 5px;}
.tool-popover .quick-object-heading .quick-name-button {
  display:block;flex:0 1 auto;width:auto;min-width:0;max-width:100%;
  min-height:28px!important;text-align:left;padding:3px 7px;box-shadow:none;
  background:#181f261c;font-size:12px;
}
body[data-studio-navigation=flat] #tool-popover .quick-object-heading .quick-view-actions {
  margin:0;flex:0 0 auto;gap:3px;
}
.tool-popover .quick-scope-tabs {margin:4px 0 6px;gap:3px;}
.tool-popover #quick-asset-actions {display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:0;}
.tool-popover #asset-repeat-tools {align-self:center;margin:0;padding:4px 6px;border:0;}
.tool-popover #asset-repeat-tools[open] {flex-basis:100%;padding-inline:0;}
.tool-popover #quick-precise-transform {padding-block:3px;margin-block:4px;}
.tool-popover .quick-advanced {margin-top:3px;}
.tool-popover #panel-morphology-quick .morphology-quick {margin-block:0;}
#panel-camera .viewport-toolbar {display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:0;}
#panel-camera .view-buttons {gap:3px;}
#panel-camera .view-buttons button {min-height:30px!important;padding:3px 6px;font-size:11px;}
.camera-frame-actions {display:flex;gap:3px;}
.witness-settings {margin:4px 0 0;padding-top:4px;}
.witness-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px;padding-top:4px;}
.witness-fields .field {min-width:0;margin:0;}
.witness-fields input {width:100%;min-height:30px;padding:4px 6px;font-variant-numeric:tabular-nums;}

body[data-studio-navigation=flat] #navigation-controls {
  right:max(16px,env(safe-area-inset-right));left:auto;
  width:auto;height:40px;display:flex;align-items:center;gap:4px;
}
.navigation-sticks {display:flex;gap:4px;}
.navigation-stick,.navigation-toggle {
  width:40px;height:40px;min-height:40px!important;padding:8px;touch-action:none;
  background:rgba(17,22,30,.64);box-shadow:0 2px 10px #0003;backdrop-filter:blur(14px);
}
.navigation-stick {cursor:grab;user-select:none;}
.navigation-stick:active {cursor:grabbing;}
.navigation-stick svg {transform:translate(var(--stick-x,0),var(--stick-y,0));pointer-events:none;}
body:not([data-compact-studio=true]) #studio-history {right:calc(max(16px,env(safe-area-inset-right)) + 134px);}

@media(max-width:700px),(max-width:1000px) and (max-height:500px) {
  body[data-compact-studio=true] #tool-popover[data-side] {
    --editor-limit:min(var(--editor-width,280px),280px,calc(100vw - 132px));
    --editor-gutters:16px;
    --editor-min-width:min(176px,calc(100vw - 132px));
    width:max(var(--editor-min-width),calc((var(--editor-limit) - var(--editor-gutters)) * var(--editor-scale) + var(--editor-gutters)))!important;
    max-height:min(54dvh,calc(100dvh - 140px))!important;
  }
  body[data-compact-studio=true] #tool-popover[data-side=left] {left:48px!important;right:auto!important;}
  body[data-compact-studio=true] #tool-popover[data-side=right] {left:auto!important;right:84px!important;}
  body[data-compact-studio=true] #tool-popover #tool-panels {padding:0 8px 7px;}
  body[data-compact-studio=true] #tool-popover .popover-heading {min-height:34px;padding:2px 6px;}
  body[data-compact-studio=true][data-panel-ui=true] #selection-inspector .icon-tool {
    flex-basis:30px!important;width:30px!important;min-width:30px!important;height:30px;min-height:30px!important;
  }
  body[data-compact-studio=true] #tool-popover .field {margin-bottom:6px;}
  body[data-compact-studio=true] #tool-popover .witness-fields .field {margin:0;}
  body[data-compact-studio=true] #navigation-controls {right:6px;width:32px;height:36px;}
  body[data-compact-studio=true] .navigation-sticks {position:absolute;right:0;bottom:43px;}
  body[data-compact-studio=true] .navigation-stick {width:40px;height:40px;padding:8px;}
}

@media(max-width:1000px) and (max-height:500px) and (orientation:landscape) {
  body[data-compact-studio=true] #tool-popover[data-side] {
    max-height:calc(100dvh - 133px)!important;
  }
}

body[data-panel-ui=true] #quick-transform-hint{display:none}

@media(max-width:700px),(max-width:1000px) and (max-height:500px){body[data-compact-studio=true] #workspace-modes{z-index:130}}
body[data-panel-ui=true] .workspace-options button{color:#fff}

#tool-popover input[type=range] {width:var(--slider-width,80%);}

#panel-location .field-pair:has([data-location="latitude"]),
#panel-location .field-pair:has([data-environment="sunAzimuthDeg"]) {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:end;
  gap:6px;
}

#event-context-fields .field-pair:has([data-event="date"]) {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));
  gap:0 6px;
}

#tool-popover #panel-location :is(input[data-event], input[data-location],
  input[data-environment="sunAzimuthDeg"], input[data-environment="sunElevationDeg"]) {
  width:100%;
  min-width:0;
  min-height:30px;
  height:30px;
  padding:4px 6px;
  font-variant-numeric:tabular-nums;
}

#tool-popover #panel-location :is(input[type=date], input[type=time]) {max-width:156px;}
#tool-popover #panel-location input[data-location="precisionM"] {max-width:11ch;}
#solar-status:empty {display:none;}
