/* Stand Studio component contract: one top bar, left catalogue, right tools. */
.unified-studio .combined-toolbar{height:auto;min-height:64px;flex:0 0 auto;display:flex;flex-wrap:wrap;gap:8px;padding:8px 16px;background:white;border-bottom:1px solid var(--color-border)}
.combined-toolbar .project-title{min-width:100px;flex:1 1 150px;width:auto;max-width:300px;overflow:hidden;padding:0 8px}
.combined-toolbar .project-title b{display:flex;align-items:center;gap:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}
.combined-toolbar .project-title small{font-size:12px;line-height:1.4}
.combined-toolbar .wide-view-tools{display:flex;align-items:center;flex-wrap:nowrap;gap:8px;padding:0;border:0;min-height:44px;background:none;margin-left:auto}
.combined-toolbar .wide-view-tools .segmented button{padding:8px;min-width:44px;min-height:44px}
.combined-toolbar .view-history{display:flex;gap:4px;margin:0}
.unified-studio .combined-toolbar .project-tools{display:flex!important;width:auto;flex:0 0 auto;gap:4px}
.unified-studio .tool-icon,.unified-studio .combined-toolbar .project-tools .tool-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:8px;gap:0;border-radius:8px}
.tool-icon:hover:not(:disabled){background:var(--color-selected);color:var(--color-primary)}
.tool-icon:focus-visible{outline:3px solid var(--color-primary);outline-offset:2px}
.tool-icon:disabled{opacity:.42;cursor:default}
.unified-studio .canvas-workspace .workspace{position:relative;display:flex;flex-direction:row;gap:0;flex:1 1 auto;min-height:280px;overflow:hidden}
.unified-studio .workspace>.viewport{flex:1 1 auto;min-width:0;min-height:280px;height:100%;position:relative}
.workspace-tools{flex:0 0 256px;width:256px;max-height:100%;overflow:auto;background:white;border-left:1px solid var(--color-border);z-index:5;padding:12px;transition:width .18s ease,flex-basis .18s ease}
.workspace-tools.collapsed{flex-basis:60px;width:60px;padding:8px}
.tools-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;min-height:44px}
.tools-heading b{font-size:16px}.tools-heading b[hidden]{display:none}
.workspace-tools #context-controls{display:flex;flex-direction:column;align-items:stretch;gap:16px}.workspace-tools #context-controls[hidden]{display:none}
.workspace-tools .object-toolbar{display:flex;flex-direction:column;gap:16px;width:100%;padding:0;margin:0;background:transparent;border:0;box-shadow:none}
.workspace-tools .selection-identity{display:flex;align-items:flex-start;gap:8px;width:100%}
.workspace-tools .selection-identity h3{flex:1;min-width:0;font-size:16px;line-height:1.45;margin:0;white-space:normal}
.workspace-tools .selection-identity small{display:block;font-size:14px;font-weight:400;margin-top:4px}
.workspace-tools .selection-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0;width:100%}
.workspace-tools .transform-tools{display:flex;flex-direction:column;gap:16px;align-items:stretch;padding:16px 0 0;border-top:1px solid var(--color-border)}
.transform-row{display:flex;align-items:flex-end;gap:8px;width:100%}
.workspace-tools .transform-row label{flex:1;min-width:0;font-size:14px;gap:8px;margin:0}
.workspace-tools .transform-row input{width:100%;min-width:0;min-height:44px;padding:8px;font-size:16px}
.workspace-tools .height-panel{display:flex;flex-direction:column;gap:8px;width:100%;margin:0;padding:0;background:transparent;border:0}
.workspace-tools .height-panel h3,.workspace-tools .height-panel .choice-grid{display:none}
.workspace-tools .height-panel label{display:flex;flex-direction:column;gap:8px;font-size:14px}
.workspace-tools .height-panel input{min-height:44px;width:100%}.workspace-tools .height-panel .helper{margin:0;font-size:14px}
.workspace-tools .canvas-utility-tools{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding-top:16px;border-top:1px solid var(--color-border)}
.utility-row{display:flex;gap:8px;align-items:center;justify-content:center}.utility-row .small{flex:1;min-height:44px;padding:8px;gap:8px}
.workspace-tools .pan-handle{cursor:grab;touch-action:none}.workspace-tools .pan-handle.dragging{cursor:grabbing;background:var(--color-selected)}
.workspace-tools .canvas-control-bar{width:100%;padding:0;display:block}.workspace-tools .canvas-control-bar .segmented{display:none}.workspace-tools .canvas-control-bar button{width:100%;min-height:44px}
.workspace-tools .move-controls,.workspace-tools .move-controls>div{display:flex;flex-direction:column;gap:8px;width:100%}.workspace-tools .move-controls .nudge-controls{display:flex;flex-direction:row;flex-wrap:wrap}.workspace-tools .nudge-controls button{min-width:44px;min-height:44px}.workspace-tools .move-controls span{font-size:14px}
.catalogue-disclosure{border-top:1px solid var(--color-border);margin:16px 0 0;padding:0;min-width:0}
.catalogue-disclosure>summary{display:flex;align-items:center;gap:8px;min-height:52px;padding:8px 0;list-style:none;font-size:16px;font-weight:600;cursor:pointer}
.catalogue-disclosure>summary::-webkit-details-marker{display:none}.catalogue-disclosure>summary>svg{margin-left:auto;transition:transform .18s}.catalogue-disclosure:not([open])>summary>svg{transform:rotate(-90deg)}
.catalogue-disclosure>summary:hover{background:var(--color-selected)}.catalogue-disclosure .count{font-weight:400;color:var(--color-muted)}
.selected-product-list{display:flex;flex-direction:column;gap:8px;padding-bottom:8px}
.selected-product-card{display:flex;align-items:center;gap:12px;width:100%;min-width:0;padding:12px;background:white;border:1px solid var(--color-border);border-radius:8px;text-align:left;color:var(--color-ink)}
.selected-product-card:hover,.selected-product-card.selected{background:var(--color-selected);border-color:var(--color-primary)}
.selected-product-image{display:flex;align-items:center;justify-content:center;width:72px;height:72px;flex:0 0 72px;background:white;border-radius:6px;overflow:hidden}
.selected-product-image img,.selected-product-image svg{width:100%;height:100%;object-fit:contain}.selected-product-image .mini-item{width:100%;height:100%}
.selected-product-copy{display:flex;flex-direction:column;flex:1;min-width:0;gap:4px}.selected-product-copy b{font-size:14px;line-height:1.4}.selected-product-copy small{font-size:14px;color:var(--color-muted)}.selected-product-copy>span{font-size:14px;font-weight:600}.selected-product-card>svg{flex:none}
/* Compact screens reserve space for tools beneath the canvas. Never overlay the stand. */
@media(max-width:1199px){
 .unified-studio .canvas-workspace .workspace{flex-direction:column}
 .workspace-tools.expanded,.workspace-tools.collapsed{position:relative;inset:auto;flex:0 1 auto;width:100%;max-height:40%;min-height:60px;border:0;border-top:1px solid var(--color-border);border-radius:0;box-shadow:none;padding:8px 12px}
 .workspace-tools .tools-heading{margin-bottom:8px;position:sticky;top:-8px;background:white;z-index:1}
 .workspace-tools.collapsed .tools-heading{margin:0;justify-content:flex-end}
 .workspace-tools .tools-heading svg{transform:rotate(90deg)}
 .workspace-tools .canvas-utility-tools{flex-direction:row;flex-wrap:wrap;justify-content:center;padding:0;border:0}
 .workspace-tools .utility-row{flex:1 1 auto}
 .workspace-tools .selection-actions{gap:8px}
 .workspace-tools .transform-tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
 .workspace-tools .transform-row{align-self:end}
 .unified-studio .combined-toolbar{padding:8px;gap:4px}
 .combined-toolbar .wide-view-tools{gap:4px}
 .combined-toolbar .project-title{flex-basis:120px}
 .combined-toolbar .view-history{gap:0}
}
@media(max-width:599px){.combined-toolbar .project-title{max-width:none;flex:1 1 150px}.combined-toolbar .wide-view-tools{order:4;width:100%;justify-content:center;margin:4px 0 0}.combined-toolbar .project-tools{margin-left:auto}.selected-product-card{padding:8px}.selected-product-image{width:64px;height:64px;flex-basis:64px}}
@media(prefers-reduced-motion:reduce){.workspace-tools,.catalogue-disclosure>summary>svg{transition:none}}
.unified-studio .workspace-tools .object-toolbar{position:static!important;inset:auto!important;transform:none!important;backdrop-filter:none;max-width:100%;min-height:0;align-items:stretch;flex-wrap:nowrap;border-radius:0}
.workspace-tools .selection-identity{flex:0 0 auto!important}
.workspace-tools .selection-identity h3 small{margin-left:0}
.workspace-tools .height-panel label{max-width:none}
.workspace-tools .height-panel .helper{display:block}
@media(max-width:899px){.workspace-body:has(.mobile-item-sheet) .workspace-tools{display:none}}

/* Two-row bottom toolbar: identity above tools; preserve 44px touch targets. */
.unified-studio .canvas-workspace .workspace{flex-direction:column}
.unified-studio .workspace>.viewport{height:auto;flex:1 1 0;min-height:240px}
.unified-studio .workspace-tools.expanded,.unified-studio .workspace-tools.collapsed{position:relative;inset:auto;flex:0 0 auto;width:100%;max-height:none;min-height:0;overflow:visible;padding:6px 12px;background:#fff;border:0;border-top:1px solid var(--color-border);border-radius:0;box-shadow:none}
.workspace-tools .tools-heading{position:static;display:flex;align-items:center;gap:8px;min-height:44px;margin:0;background:#fff}
.workspace-tools .tools-heading svg{transform:none}
.workspace-tools .toolbar-identity{display:flex;align-items:baseline;gap:8px;flex:1;min-width:0;overflow:hidden;white-space:nowrap}
.workspace-tools .toolbar-identity b{font-size:14px;overflow:hidden;text-overflow:ellipsis}
.workspace-tools .toolbar-identity span{font-size:14px;color:var(--color-muted);flex:none}
.workspace-tools #context-controls{display:flex;flex-direction:row;align-items:center;gap:12px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;min-height:52px;padding:4px 0;scrollbar-width:thin}
.workspace-tools #context-controls[hidden]{display:none}
.workspace-tools .selection-actions,.workspace-tools .canvas-utility-tools,.workspace-tools .transform-tools{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:4px;flex:0 0 auto;width:auto;margin:0;padding:0;border:0}
.workspace-tools .transform-tools,.workspace-tools .canvas-utility-tools{border-left:1px solid var(--color-border);padding-left:12px}
.workspace-tools .transform-tools label{display:flex;flex-direction:row;align-items:center;gap:4px;white-space:nowrap;margin:0;font-size:14px}
.workspace-tools .transform-tools input{width:64px;min-width:64px;height:44px;min-height:44px;padding:6px;font-size:16px}
.workspace-tools .canvas-utility-tools{margin-left:auto}
.workspace-tools .canvas-control-bar{width:auto;flex:0 0 auto}
.workspace-tools .move-controls,.workspace-tools .move-controls>div{display:flex;flex-direction:row;align-items:center;gap:8px;flex:0 0 auto;width:auto;white-space:nowrap}
.workspace-tools .move-controls .nudge-controls{flex-wrap:nowrap}
#tool-tip{position:fixed;z-index:10000;max-width:min(300px,calc(100vw - 16px));padding:8px 12px;background:#182231;color:white;border-radius:6px;font-size:14px;line-height:1.4;box-shadow:0 2px 8px #0003;pointer-events:auto}
#tool-tip[hidden]{display:none}
@media(max-width:599px){.unified-studio .workspace-tools.expanded,.unified-studio .workspace-tools.collapsed{padding:4px 8px}.workspace-tools .toolbar-identity span{display:none}}

.download-options{display:grid;gap:16px}.download-options section{padding:16px;border:1px solid var(--color-border);border-radius:8px}.download-options h3{margin:0 0 8px}.download-options p{font-size:14px;line-height:1.5}.download-options a.text-button{display:block;margin-top:8px}
/* Progressive disclosures remain hidden even when a shared button class sets display. */
#modal [hidden]{display:none!important}
