/* One dock below the product; the canvas is free of the former header controls. */
.viewport{--stage-toolbar-height:64px;}
.viewport #canvas{inset:0 0 var(--stage-toolbar-height)!important;}
.viewport:fullscreen{height:100dvh!important;min-height:0!important;max-height:none!important;border-radius:0!important;}
.viewport .stage-toolbar{position:absolute;inset:auto 0 0;height:var(--stage-toolbar-height);z-index:8;display:grid;grid-template-columns:minmax(72px,1fr) auto auto 44px;align-items:center;gap:8px;padding:8px 12px;background:#f7f7f5;border-top:1px solid #e6e7e4;}
.stage-toolbar>.scene-picker{min-width:0;width:100%;max-width:190px!important;justify-self:start;}
.stage-toolbar>.scene-picker>summary{width:100%;max-width:190px!important;min-height:44px!important;padding:8px 10px!important;gap:6px!important;font-size:11px!important;border:0;border-radius:12px;background:#fff;box-shadow:none;}
.stage-toolbar #environment-label{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
#environment-short-label{display:none;white-space:nowrap;}
.stage-toolbar>.scene-picker>summary>svg{flex:none;width:17px;height:17px;}
.stage-toolbar>.scene-picker>summary>.chevron{width:12px;height:12px;margin-left:0;}
.stage-toolbar #environment-section{top:auto!important;bottom:calc(100% + 12px);left:0;width:320px;max-width:calc(100vw - 56px);max-width:min(320px,calc(100cqw - 24px));z-index:22;}
.stage-toolbar>.scene-picker[open]{z-index:22;}
.viewport:has(.scene-picker[open]) .stage-toolbar{z-index:30;}
.viewport .stage-toolbar>.view-presets{position:static!important;inset:auto!important;transform:none!important;max-width:none!important;display:flex;gap:2px!important;min-height:0!important;padding:0!important;border:0!important;background:#fff!important;box-shadow:none!important;white-space:nowrap;}
.viewport .stage-toolbar>.view-presets>button{min-height:44px!important;padding:8px 11px!important;font-size:11px!important;border-radius:20px;}
.viewport .stage-toolbar>.view-controls{position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:none!important;display:flex;gap:0!important;padding:0!important;border:0;background:transparent;box-shadow:none;justify-content:end;}
.viewport .stage-toolbar>.view-controls>button{min-width:36px!important;width:36px;min-height:42px!important;padding:7px!important;flex:none!important;font-size:0!important;justify-content:center!important;gap:0!important;}
.viewport .stage-toolbar>.view-controls>button:after{content:none!important;}
.stage-toolbar .view-controls .reset-label{display:none;}
.stage-toolbar>.icon-button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;border:0;border-radius:12px!important;background:#fff;box-shadow:none;}
.viewport #stage-state-toggle{bottom:calc(var(--stage-toolbar-height) + 12px)!important;right:12px!important;}
.viewport #loading{bottom:var(--stage-toolbar-height)!important;}
.viewport.render-unavailable #loading{inset:auto 12px calc(var(--stage-toolbar-height) + 12px)!important;}
.stage-toolbar summary:focus-visible,.stage-toolbar button:focus-visible{outline:2px solid #28628b;outline-offset:2px;}
@container(max-width:650px){
 .stage-toolbar #environment-label{display:none;}
 .stage-toolbar #environment-short-label{display:inline;}
 .stage-toolbar .view-label-long{display:none;}
 .viewport .stage-toolbar>.view-presets>button{min-width:44px!important;padding:8px!important;}
 .viewport .stage-toolbar{gap:5px;padding:8px;}
}
@media(max-width:760px), (max-width:1000px) and (max-height:500px){
 .viewport{--stage-toolbar-height:56px;}
 .viewport .stage-toolbar{grid-template-columns:minmax(64px,1fr) auto 44px;gap:4px;padding:6px 8px;}
 .stage-toolbar #environment-label{display:none;}
 .stage-toolbar #environment-short-label{display:inline;}
 .viewport .stage-toolbar>.scene-picker>summary{min-height:44px!important;padding:8px!important;font-size:11px!important;gap:5px!important;}
 .viewport .stage-toolbar>.view-presets>button{min-width:44px!important;min-height:44px!important;padding:8px!important;font-size:11px!important;}
 .stage-toolbar .view-label-long{display:none;}
 .viewport .stage-toolbar>.view-controls{display:none!important;}
 .viewport #stage-state-toggle{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;}
 .viewport .stage-toolbar>.icon-button{width:44px!important;min-width:44px!important;}
 .stage-expanded .viewport{--stage-toolbar-height:100px;}
 .stage-expanded .viewport .stage-toolbar{grid-template-rows:44px 38px;}
 .stage-expanded .viewport .stage-toolbar>.view-controls{grid-column:1/-1;grid-row:2;display:flex!important;justify-content:center;gap:14px!important;}
 .stage-expanded .viewport .stage-toolbar>.icon-button{grid-column:3;grid-row:1;}
 .viewport .stage-toolbar #fullscreen{grid-column:3;grid-row:1;}
}
@media(max-width:350px){.stage-toolbar>.scene-picker>summary>svg:first-child{display:none;}}
