/* One optical and spacing system across the product's control surfaces. */
html:root body.ui-system .ui-icon{stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
html:root body.ui-system .r32-control-icon{width:20px;height:20px;min-width:20px;flex:0 0 20px;display:block;margin:0!important}
html:root body.ui-system :is(.glass-control-bar,.hc-header-actions,.hc-views,.hc-finishes,.hx-head-actions,.fx-head-actions,.ci-actions,.scenario-actions,.commerce-actions,.construction-tabs,.dw-tabs,.ui-appearance-actions) :is(button,a){gap:10px!important;line-height:1.4!important;height:auto;min-height:44px!important;border-radius:9px!important}
html:root body.ui-system :is(.glass-control-bar,.hx-head-actions,.fx-head-actions,.ci-actions,.ui-appearance-actions) :is(button,a){padding:10px 14px!important}
html:root body.ui-system :is(.hc-header-actions,.hc-views,.hc-finishes,.hx-head-actions,.fx-head-actions,.ci-actions,.scenario-actions,.commerce-actions,.ui-appearance-actions) .r32-icon-action{display:inline-flex;align-items:center;justify-content:center}
html:root body.ui-system .glass-control-bar:not(.scene-controls){gap:8px!important;padding:6px!important;border-radius:12px!important}
html:root body.ui-system .glass-control-bar:not(.scene-controls) .glass-tab-icon{width:20px;height:20px;flex:0 0 20px;margin:0!important}
html:root body.ui-system .glass-panel-head{gap:10px;min-height:44px;margin-bottom:18px}
html:root body.ui-system .glass-panel .glass-collapse{width:44px;min-width:44px;min-height:44px;height:44px;flex:0 0 44px;padding:10px!important;border-radius:10px!important}
html:root body.ui-system .glass-panel-head .glass-collapse .ui-icon{width:20px;height:20px}
html:root body.ui-system .glass-collapsed[data-glass-kind] :is(.glass-collapse,.glass-shortcut,.glass-panel-footer button){border-radius:9px!important;width:44px;min-width:44px;height:44px;min-height:44px;padding:10px!important}
html:root body.ui-system .glass-shortcut::after{inset-inline-start:calc(100% + 12px);font-size:12px;line-height:1.4;max-width:min(260px,calc(100vw - 100px));white-space:normal}
html:root body.ui-system .glass-panel-footer button{gap:10px;padding:10px 12px;min-height:44px}
html:root body.ui-system .glass-panel-footer svg{width:20px;height:20px;flex:0 0 20px;padding:0;background:transparent;color:inherit;border-radius:0}
html:root body.ui-system .hc-header-actions .r32-icon-action{white-space:normal;text-align:start}
html:root body.ui-system .hc-lighting{display:flex;gap:4px;padding:4px;border-radius:10px;max-width:calc(100% - 16px)}
html:root body.ui-system .hc-lighting button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:9px 10px!important;line-height:1.35;border-radius:7px!important}
html:root body.ui-system .hc-lighting .ui-icon{width:18px;height:18px;min-width:18px;flex-basis:18px}
html:root body.ui-system .hc-functions nav{gap:8px}
html:root body.ui-system .hc-functions nav :is(button,a){min-height:44px;padding:10px 14px;line-height:1.4;display:inline-flex;gap:10px;align-items:center;justify-content:center;border-radius:9px;white-space:normal}
html:root body.ui-system #capital-mp-modal{padding:24px;border-radius:16px;max-width:min(470px,calc(100vw - 24px))}
html:root body.ui-system #capital-mp-modal .close{display:grid;place-items:center;width:44px;height:44px;padding:10px;top:8px;right:8px}
html:root body.ui-system #capital-mp-modal h2{padding-inline-end:32px;font-size:26px;line-height:1.2}
html:root body.ui-system .scene-wrap>.multiplayer-status{position:absolute!important;left:10px!important;bottom:8px!important;z-index:36!important;max-width:calc(100% - 110px);min-height:36px!important;padding:8px 10px!important;font-size:11px!important;line-height:1.35!important;box-shadow:none!important;border-radius:9px!important}
html:root body.ui-system .hx-walkbar .hx-pad button,html:root body.ui-system .ci-walk-pad button{display:grid;place-items:center;min-width:44px;width:44px;height:44px;padding:10px!important;border-radius:9px!important}
html:root body.ui-system .hx-walkbar .hx-pad,html:root body.ui-system .ci-walk-pad{gap:8px!important}
html:root body.ui-system .scene-controls .scene-mode-icon{width:22px;height:22px;min-width:22px}
@media(min-width:851px){
 html:root body.ui-system .territory{display:grid!important;grid-template-columns:300px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr);height:calc(100dvh - var(--cap-header-height,84px));min-height:0!important;gap:14px;padding:14px}
 html:root body.ui-system .territory:has(>.project-rail.glass-collapsed){grid-template-columns:64px minmax(0,1fr)!important}
 html:root body.ui-system .territory>.scene-wrap{height:100%!important;min-height:0!important;min-width:0}
 html:root body.ui-system .territory>.project-rail.glass-collapsed{width:56px!important;min-width:56px;max-width:56px!important;margin:0 auto!important;border-radius:14px!important;padding:5px!important}
 html:root body.ui-system .project-rail.glass-collapsed .glass-compact-rail{gap:6px!important}
 html:root body.ui-system .territory>.project-rail:not(.glass-collapsed){width:100%!important;max-height:100%;margin:0!important;border-radius:14px!important}
 html:root body.ui-system .scene-bottom{bottom:50px!important}
}
@media(max-width:1099px) and (min-width:851px){html:root body.ui-system .territory{grid-template-columns:250px minmax(0,1fr)!important}.scene-wrap .scene-bottom{left:10px!important;right:10px!important;max-width:none!important;width:auto!important;min-width:0!important}.scene-wrap .scene-controls .segmented{display:contents!important}.scene-wrap .scene-controls{display:flex!important;flex-wrap:wrap!important}.scene-wrap .scene-controls button{flex:1 1 auto}.scene-wrap .scene-controls .scene-mode-label{font-size:11px!important}.scene-wrap .scene-controls .ui-icon{width:19px!important;height:19px!important}}
@media(max-width:850px){
 html:root body.ui-system .glass-control-bar:not(.scene-controls){max-width:100%;width:100%;gap:6px!important;padding:6px!important}
 html:root body.ui-system :is(.fx-toolbar,.hx-toolbar,.hx-perspective,.ci-tabs,.ci-toolbar,.ci-scene-controls,.dw-tabs){display:flex!important;flex-wrap:wrap!important}
 html:root body.ui-system :is(.fx-toolbar,.hx-toolbar,.hx-perspective,.ci-tabs,.ci-toolbar,.ci-scene-controls,.dw-tabs) :is(button,a){min-width:44px;flex:1 1 auto;white-space:normal;overflow-wrap:normal;word-break:normal;padding:10px!important;gap:8px!important;font-size:12px!important;line-height:1.4!important}
 html:root body.ui-system :is(.fx-toolbar,.hx-toolbar,.hx-perspective,.ci-tabs,.ci-toolbar,.ci-scene-controls,.dw-tabs) .glass-tab-icon{width:20px;height:20px}
 html:root body.ui-system .scene-controls button{gap:7px!important;padding:10px 4px!important}
 html:root body.ui-system .hc-header-actions .r32-icon-action{gap:8px!important;padding:10px 12px!important;font-size:12px!important}
 html:root body.ui-system .hc-lighting{top:8px;right:8px}.hc-lighting button{font-size:12px!important}
 html:root body.ui-system .hc-lighting button .ui-icon{display:none}
 html:root body.ui-system .project-rail .glass-shortcut::after{display:none!important}
 html:root body.ui-system .scene-wrap>.multiplayer-status{font-size:10px!important;min-height:34px!important;max-width:calc(100% - 112px)}
 html:root body.ui-system .scene-bottom{bottom:48px!important}
 html:root body.ui-system :is(.fx-unit-actions,.hx-room-actions,.ci-selected-actions){flex-wrap:wrap;gap:8px}
 html:root body.ui-system .hx-walkbar>button{min-height:44px;font-size:12px!important;padding:10px!important}
}
@media(hover:hover) and (pointer:fine){.r32-icon-action{transition:background-color 150ms ease,border-color 150ms ease}.r32-icon-action:active{filter:brightness(.94)}}
@media(prefers-reduced-motion:reduce){.r32-icon-action{transition:none!important}}
/* Navigation foregrounds must remain independent of the active-pill layer. */
html:root body.ui-system .header nav.glass-control-bar.glass-motion-bar a{color:#f3f7f4!important;opacity:1!important;visibility:visible!important}
html:root body.ui-system .header nav.glass-control-bar.glass-motion-bar a:is([aria-current=page],.active){color:#20372e!important;background:#e4eee7!important;border-radius:9px!important}
html:root body.ui-system .header nav.glass-control-bar.glass-motion-bar a :is(span,svg){color:inherit!important;opacity:1!important}
/* An image fills its actual thumbnail box, including during collapsed states. */
html:root body.ui-system #scene.capscene-integrated .capscene-label.has-object-image>.capscene-dot{display:block!important;position:relative!important;overflow:hidden!important;padding:0!important;background:#20372e!important}
html:root body.ui-system #scene.capscene-integrated .capscene-label.has-object-image>.capscene-dot>img{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;min-width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;object-fit:cover!important;object-position:50% 58%!important;border:0!important;border-radius:0!important;aspect-ratio:auto!important}
html:root body.ui-system #scene.capscene-integrated .capscene-label.has-object-image .capscene-dot>span{z-index:1}
html:root body.ui-system #scene.capscene-integrated .capscene-label.is-expanded .capscene-label-name{color:#20372e!important}
html:root body.ui-system .project-card img{object-fit:cover!important;object-position:50% 58%;display:block;flex-shrink:0;overflow:hidden;border-radius:8px}
html:root body.ui-system :is(button,a).r32-icon-action{display:inline-flex;align-items:center;justify-content:center;gap:10px;white-space:normal}
@media(min-width:851px) and (max-width:1099px){html:root body.ui-system .scene-wrap .timeline{max-width:calc(100% - 248px)!important;min-width:0;justify-self:start}html:root body.ui-system .scene-wrap .timeline>div:first-child{gap:8px;align-items:start}.scene-wrap .timeline>div:first-child>*{min-width:0}}

/* Keep scene controls clear of camera tools on compact screens. */
@media(max-width:850px){html:root body.ui-system .project-rail.glass-collapsed[data-glass-kind]{overflow-x:auto!important;overflow-y:hidden!important}html:root body.ui-system .imm-hud-host .scene-controls.glass-control-bar button{padding:8px 3px!important}html:root body.ui-system .scene-wrap:has(#scene[data-model-state=ready]) #scene-status{display:none!important}html:root body.ui-system .imm-hud-host>.immersive-hud{display:flex!important;flex-direction:column;align-items:flex-end;width:108px!important;max-width:108px!important;gap:8px}html:root body.ui-system .imm-hud-host .scene-tool-toggle{display:flex!important;align-items:center;justify-content:center;gap:6px;min-height:44px;width:108px;padding:8px!important;font-size:11px;line-height:1.25;border-radius:10px!important;background:#22352e;color:#f1f7f3}.scene-tool-toggle .ui-icon{width:18px;height:18px}html:root body.ui-system .imm-hud-host .imm-actions{display:none!important;grid-template-columns:repeat(2,44px);padding:6px;gap:4px}html:root body.ui-system .imm-hud-host .r31-tools-open .imm-actions{display:grid!important}html:root body.ui-system .imm-hud-host .imm-actions [data-panel-grip]{display:none!important}html:root body.ui-system .imm-hud-host .imm-touch-compass{width:96px!important;transform:scale(.84);transform-origin:top right;margin-bottom:-22px}.imm-hud-host .cap-weather:not([open]){width:108px!important;max-width:108px!important}.imm-hud-host .cap-weather[open]{right:0!important;top:0!important;width:min(300px,calc(100vw - 32px))!important;max-width:none!important}}
@media(max-width:850px){html:root body.ui-system .imm-hud-host>.immersive-hud>button.scene-tool-toggle{width:108px!important;min-width:108px!important;height:44px!important;padding:8px!important;background:#22352e!important;color:#f1f7f3!important;border-radius:10px!important;flex-direction:row!important;font-weight:500!important}html:root body.ui-system .imm-hud-host>.immersive-hud>.imm-touch-compass{width:108px!important;min-height:130px!important;transform:none!important;margin:0!important}html:root body.ui-system .imm-hud-host .imm-touch-compass .touch-compass{width:96px!important;max-width:96px!important;margin-inline-start:auto!important}html:root body.ui-system #territory .scene-wrap:has(#scene[data-model-state=ready]) #scene-status{display:none!important}}
@media(max-width:850px){html:root body.ui-system .imm-hud-host .immersive-hud .imm-map:not([hidden]){position:absolute!important;right:116px!important;top:52px!important;width:min(270px,calc(100vw - 156px))!important;max-width:none!important;max-height:min(360px,max(100px,calc(100dvh - 350px)))!important;overflow:auto!important;z-index:40}html:root body.ui-system .scene-wrap .imm-map-title>.cap-panel-handle{display:none!important}html:root body.ui-system .scene-wrap .imm-map-title strong{font-size:12px!important;line-height:1.4;overflow-wrap:normal;word-break:normal}html:root body.ui-system .scene-wrap .imm-map-title{padding-inline:4px;gap:4px}.scene-wrap .imm-map-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}.scene-wrap .imm-map-tabs button{white-space:normal!important;overflow-wrap:normal!important}}
@media(max-width:850px) and (max-height:600px){html:root body.ui-system .imm-hud-host .immersive-hud .imm-map:not([hidden]){top:8px!important}}
html:root body.ui-system .capital-full-studio{top:var(--cap-header-height,76px)!important}
@media(max-width:850px){
html:root body.ui-system .page-content :is(.fx-stage,.hx-stage)>:is(.fx-toolbar,.hx-toolbar){right:134px!important;left:12px!important;top:12px!important;width:auto!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;align-content:flex-start!important}
html:root body.ui-system :is(.fx-toolbar,.hx-toolbar)>button{flex:1 1 88px!important;min-width:0!important;padding:8px!important;font-size:11px!important;line-height:1.3!important;min-height:44px!important;white-space:normal!important}
html:root body.ui-system .page-content .hx-stage>.hx-perspective{top:calc(var(--stage-toolbar-height,100px) + 24px)!important;left:12px!important;right:134px!important;max-width:none!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important}
html:root body.ui-system .hx-perspective>button{flex:1 1 100%;min-width:0!important;font-size:11px!important;min-height:44px!important;white-space:normal!important}
html:root body.ui-system .capital-full-studio>header{min-height:56px!important;padding:6px 12px!important;gap:12px!important;flex-shrink:0}
html:root body.ui-system .capital-full-studio>header>strong{font-size:12px!important;line-height:1.4;min-width:0;overflow-wrap:anywhere}
html:root body.ui-system .capital-full-studio>header>button{font-size:11px!important;max-width:48%;padding:8px!important;line-height:1.35!important}
}
@media(max-width:850px){html:root body.ui-system .page-content :is(.fx-stage,.hx-stage)>:is(.fx-toolbar,.hx-toolbar){min-width:0!important;max-width:calc(100% - 146px)!important;padding:6px!important;box-sizing:border-box!important}html:root body.ui-system .page-content .hx-stage>.hx-perspective{box-sizing:border-box!important;min-width:0!important;padding:6px!important}}
@media(max-width:850px){html:root body.ui-system .imm-hud-host .immersive-hud>button.scene-tool-toggle{padding:6px!important;gap:5px!important}html:root body.ui-system .scene-tool-toggle>span{font-size:10px!important;white-space:nowrap!important}html:root body.ui-system .scene-tool-toggle>.ui-icon{width:16px!important;height:16px!important;flex:0 0 16px!important}}
@media(max-width:850px){html:root body.ui-system .page-content .hx-stage>.hx-perspective{width:calc(100% - 146px)!important;max-width:calc(100% - 146px)!important;right:auto!important}}
