/* Keep all editor actions available in a single-row toolbar. */
.pose-studio .pose-main-toolbar{flex-wrap:wrap;gap:8px 12px}
.pose-tool-group{display:flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:100%;min-width:0}
.pose-tool-group>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:9px 10px;font:550 14px/1.4 var(--sans);white-space:nowrap;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer;transition:background-color .15s,border-color .15s}
.pose-tool-group>button:hover:not(:disabled){background:var(--hover);border-color:var(--muted)}
.pose-tool-group>button[aria-pressed=true]{background:var(--action-bg);color:var(--action-ink);border-color:var(--action-bg)}
.pose-tool-group>button:disabled{opacity:.45;cursor:default}
.pose-tool-group>button svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.pose-canvas-fields>label{display:flex;align-items:center;gap:6px;margin:0;font-size:13px;color:var(--muted)}
.pose-canvas-fields select{height:44px;min-height:44px;margin:0;padding:8px 30px 8px 10px;border:1px solid var(--line);border-radius:6px;background-color:var(--surface);color:var(--ink);font:500 14px/1.4 var(--sans)}
.pose-canvas-fields #aspect-select{width:80px}
.pose-canvas-fields #background-select{width:108px}
.pose-canvas-fields .ls-select{flex:none;min-width:0}
.pose-canvas-fields .ls-select>summary{min-height:44px}
.pose-studio .pose-main-toolbar .stage-display-controls{flex-wrap:wrap;max-width:100%}
.pose-studio .pose-main-toolbar>.history-controls{flex-wrap:wrap;max-width:100%}
@media(max-width:600px){
 .pose-studio .pose-main-toolbar{gap:8px}
 .pose-tool-group{gap:8px}
 .pose-tool-group>button{padding-inline:8px}
 .pose-canvas-fields{column-gap:12px}
 .pose-studio .pose-main-toolbar .stage-display-controls{margin-left:0}
 .pose-studio .pose-main-toolbar>.history-controls{margin-left:auto}
}
@media(prefers-reduced-motion:reduce){.pose-tool-group>button{transition:none}}

.pose-studio .canvas-camera-readout #camera-distance-value{color:var(--ink)}
.canvas-pan-controls{position:absolute;top:10px;left:10px;right:90px;z-index:8;display:flex;align-items:center;gap:8px;pointer-events:none}
.canvas-pan-controls>.canvas-pan-tool{position:static;flex:none;pointer-events:auto}
.canvas-pan-hint{display:inline-flex;align-items:center;gap:14px;min-width:0;margin:0;padding:6px 9px;border-radius:6px;background:var(--surface);color:var(--ink);font:500 12px/1.4 var(--sans);white-space:nowrap;overflow-x:auto;scrollbar-width:none;pointer-events:auto}
.canvas-pan-hint[hidden]{display:none}
.canvas-pan-hint .mouse-gesture{display:inline-flex;align-items:center;gap:6px;flex:none}
.canvas-pan-hint svg{width:18px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.canvas-pan-hint .mouse-left-button,.canvas-pan-hint .mouse-right-button{fill:var(--accent);stroke:none}
/* Spacing belongs to the visible groups, since custom dropdowns hide selects. */
.pose-studio #prop-inspector>.entity-name-row{margin-top:14px}
.pose-studio #prop-inspector>.entity-name-row:has(.actor-appearance[hidden]){grid-template-columns:minmax(0,1fr)}
.pose-studio #prop-controls{margin-top:14px}
.pose-studio #prop-controls>.segmented{margin-top:12px}
.pose-studio #prop-controls>#prop-shape{margin:0}

/* Fit the actual canvas width and translated labels, not a viewport guess. */
.pose-studio .stage-toolbar{z-index:12}
.pose-studio .pose-main-toolbar{flex-wrap:nowrap;gap:8px}
.pose-studio .pose-main-toolbar>.pose-tool-group{flex:none;flex-wrap:nowrap}
.pose-studio .pose-main-toolbar .stage-display-controls,.pose-studio .pose-main-toolbar>.history-controls{flex-wrap:nowrap}
.pose-studio .pose-main-toolbar .pose-canvas-fields .ls-select{width:max-content!important;min-width:76px}
.pose-studio .pose-main-toolbar .pose-canvas-fields .ls-select>summary>span{overflow:visible;text-overflow:clip;flex:none}
.pose-studio .pose-main-toolbar.pose-toolbar-compact{gap:4px}
.pose-toolbar-compact>.pose-tool-group{gap:4px}
.pose-toolbar-compact>.pose-tool-group>button{font-size:13px;padding-inline:8px}
.pose-toolbar-compact>.pose-canvas-fields .ls-select>summary{font-size:13px}
.pose-toolbar-compact>.pose-annotation-actions>button,.pose-studio .pose-toolbar-compact>.history-controls :is(#new-scene,#save-scene){width:40px;min-height:44px;padding:8px}
.pose-toolbar-compact>.pose-annotation-actions>button>span,.pose-toolbar-compact>.history-controls :is(#new-scene,#save-scene)>span{display:none}
.pose-studio .pose-toolbar-compact>.stage-display-controls{font-size:13px;gap:8px;padding-inline:0}
.pose-toolbar-more{position:relative;flex:none;margin-left:auto}
.pose-toolbar-more>summary{display:flex;align-items:center;justify-content:center;width:40px;height:44px;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);list-style:none;cursor:pointer}
.pose-toolbar-more>summary::-webkit-details-marker,.pose-toolbar-more>summary::after{display:none}
.pose-toolbar-more>summary:hover{background:var(--hover)}
.pose-toolbar-more>.studio-menu-panel{left:auto;right:0;width:max-content;min-width:240px;max-width:calc(100vw - 32px);gap:12px}
.pose-toolbar-more .pose-tool-group{flex-wrap:nowrap}
.pose-studio .pose-toolbar-more .stage-display-controls{flex-direction:column;align-items:flex-start;margin:0;padding:0;gap:0}
.pose-toolbar-more .stage-display-controls label{display:flex;flex-direction:row;align-items:center;gap:8px;white-space:nowrap}
.pose-toolbar-more .history-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;width:100%}
.pose-toolbar-more .history-controls .icon-button{width:100%}
.pose-toolbar-more .history-controls :is(#new-scene,#save-scene){grid-column:1/-1;width:100%}
.pose-toolbar-more>.studio-menu-panel>button{white-space:nowrap}
