/* Shared controls follow the left-production / centre-drawing / right-tools flow. */
.studio-button-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.studio-button-grid>.studio-action{width:100%;min-width:0;min-height:40px;padding:8px;font-size:12px;line-height:1.3;border:1px solid #627d86;border-radius:9px;background:#11384b;color:#f3dfa0;white-space:normal;overflow-wrap:anywhere;margin:0;display:flex;align-items:center;justify-content:center;text-align:center}
.studio-button-grid>.studio-action:hover{background:#20566b;border-color:#e0c36d}
.studio-button-grid>.studio-action:focus-visible{outline:2px solid #62cfff;outline-offset:2px}
#studioShortcuts{flex-shrink:0;padding-bottom:12px;margin-bottom:10px;border-bottom:1px solid #354b60}
#studioShortcuts h3,#studioOutputs h3{font-size:12px;color:#adc5d9;margin:0 0 8px;font-weight:600}
#studioSketch{background:#17607a;border-color:#57b7c7;font-weight:700}
#studioOutputs #nestOpen{grid-column:1/-1}
#studioOutputs .pricecheck{margin:8px 0 0;font-size:11px}
.studio-order .order-footer{max-height:43dvh;overflow:auto;padding-right:3px;overscroll-behavior:contain}
.studio-order .workflow-drawer>summary{font-size:12px;padding:3px;line-height:1.4}
.studio-tools .parameter-group>summary{min-height:28px;display:list-item;align-content:center;font-size:12px}
.studio-tools #fields{gap:9px}
.studio-tools #studioToolAssignments,.studio-tools #studioMachineSettings{margin:0}
.studio-tools #studioToolAssignments>summary{color:#7fd5e3}
.studio-tools>h2{margin-bottom:12px}
@media(max-width:1000px){.studio-order .order-footer{max-height:none;overflow:visible}#studioShortcuts{margin-bottom:12px}.studio-button-grid>.studio-action{min-height:44px}.studio-tools #fields{overflow:visible}}
@media(max-height:720px) and (min-width:1001px){.studio-button-grid>.studio-action{min-height:34px;padding:6px;font-size:11px}#studioShortcuts{padding-bottom:8px;margin-bottom:8px}.studio-order .order-footer{max-height:42dvh}}

/* Section labels and disclosure controls share a restrained, consistent hierarchy. */
.studio-layout .studio-panel-title{display:flex;align-items:center;min-height:43px;padding:10px 12px;border:1px solid #46617a;border-radius:9px;background:#103047;color:#dcebf4;font-size:14px;font-weight:650;line-height:1.3;letter-spacing:.15px;margin:0 0 12px;flex-shrink:0}
.studio-layout .scenehead .studio-panel-title{flex:1;min-width:0;margin-right:8px;font-size:13px}
.studio-layout .scenehead>div{align-content:start;align-items:center;margin-bottom:12px}
.studio-layout .studio-disclosure{padding:0;border:1px solid #46617a;border-radius:9px;overflow:hidden;background:#0a2132}
.studio-layout .studio-disclosure>summary{list-style:none;display:flex;align-items:center;gap:8px;min-height:43px;padding:10px 12px;color:#dcebf4;font-size:13px;font-weight:600;line-height:1.35;cursor:pointer}
.studio-layout .studio-disclosure>summary::-webkit-details-marker{display:none}
.studio-layout .studio-disclosure>summary::before{content:'›';font-size:19px;font-weight:400;line-height:1;color:#9bbacb;transition:transform .12s}
.studio-layout .studio-disclosure[open]>summary::before{transform:rotate(90deg)}
.studio-layout .studio-disclosure>summary[data-face]::after{content:attr(data-face);margin-left:auto;white-space:nowrap;font-size:10px;font-weight:500;padding:3px 6px;border:1px solid #37566b;border-radius:5px;color:#a9c3d3;background:#0c293c}
.studio-layout .studio-disclosure>summary:hover{background:#173c51}
.studio-layout .studio-disclosure>summary:focus-visible{outline:2px solid #62cfff;outline-offset:-3px}
.studio-layout .studio-disclosure[open]>summary{border-bottom:1px solid #355267;background:#123247}
.studio-layout .studio-disclosure>:not(summary){margin:12px}
.studio-layout .studio-disclosure>.parameter-grid{padding-top:0}
.studio-layout .studio-disclosure>.note{font-size:12px;line-height:1.5}
.studio-layout #totals{display:grid;grid-template-columns:1fr 1fr;gap:8px;border:0;padding:0;margin:10px 0}
.studio-total-item{display:flex;flex-direction:column;gap:3px;border:1px solid #46617a;border-radius:9px;padding:9px 12px;background:#103047;min-width:0}
.studio-total-item strong{font-size:17px;font-weight:650;line-height:1.2;color:#e1edf5;overflow-wrap:anywhere}
.studio-total-item small{font-size:11px;font-weight:400;color:#9cb8cb;line-height:1.3}
@media(max-width:600px){.studio-layout .scenehead{flex-wrap:wrap}.studio-layout .scenehead .studio-panel-title{flex-basis:100%;margin-right:0}.studio-layout .scenehead>div{margin-bottom:8px}.studio-layout .studio-disclosure>summary{min-height:44px}}
/* Preview title and view controls start and end on the same horizontal line. */
.studio-layout .scenehead{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px;margin-bottom:12px}
.studio-layout .scenehead .studio-panel-title{margin:0;min-height:43px}
.studio-layout .scenehead>div{display:flex;align-items:stretch;align-content:stretch;gap:4px;flex-wrap:nowrap;margin:0}
.studio-layout .scenehead button{display:flex;align-items:center;justify-content:center;min-height:43px;height:auto;line-height:1.25;margin:0;border-color:#627d86;background:#11384b;color:#dcebf4}
@media(max-width:600px){.studio-layout .scenehead{grid-template-columns:1fr}.studio-layout .scenehead>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}.studio-layout .scenehead button{font-size:11px;padding:6px 4px;min-width:0;overflow-wrap:anywhere}}

/* Focus one operation without hiding the drawing or the save action. */
#studioOperationBack{flex-shrink:0;width:100%;min-height:40px;padding:9px 12px;margin:0 0 10px;border:1px solid #627d86;border-radius:9px;text-align:left;background:#11384b;color:#dcebf4;font-size:13px}
.studio-focus #studioShortcuts{display:none}
.studio-focus #fields{display:block;min-height:0;overflow:auto;padding-right:5px;overscroll-behavior:contain}
.studio-focus #fields>details:not([open]){display:none}
.studio-focus #fields>details[open]{margin:0;min-width:0}
.studio-focus #fields .parameter-grid{grid-template-columns:minmax(0,1fr);gap:4px;padding-top:4px}
.studio-focus #fields label{font-size:13px;line-height:1.4;margin-bottom:13px;gap:6px}
.studio-focus #fields input,.studio-focus #fields select{min-height:40px;padding:10px;font-size:14px}
.studio-focus #fields .tool-recipe{padding:12px 0}
.studio-focus #fields .tool-recipe>summary{min-height:36px;line-height:1.4}
.studio-focus #fields .note{font-size:12px;line-height:1.65}
.studio-focus #inlineModelRules fieldset{margin:10px 0;padding:12px}
@media(max-width:1000px){.studio-focus #fields{max-height:65dvh;overflow:auto}.studio-focus #rightActions{position:sticky;bottom:0;background:#0a1c2e}}
/* Closed operation rows retain their full label height; the list scrolls. */
.studio-tools{overflow:auto}
.studio-tools #fields{min-height:150px}
.studio-tools #fields>details{flex:0 0 auto}
.studio-tools #fields{scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:#728d9e #0a2132}
