/* One compact header, one scroll surface. Do not trap fields under fixed palettes. */
.kh-configurator #selection-panel {top:auto;bottom:18px;width:330px;max-height:calc(100% - 110px)}
.kh-configurator #selection-panel.is-expanded {position:absolute;inset:88px 14px 14px auto;width:360px;max-width:calc(100% - 80px);height:auto;max-height:none;margin:0;display:flex;flex-direction:column}
.kh-configurator #selection-panel .selection-summary {flex:0 0 auto;padding:10px;max-height:none;overflow:visible;border-bottom:1px solid #dde6e0}
.kh-configurator #selection-panel .selection-fields {flex:1 1 auto;min-height:0;overflow:auto;padding:16px;scrollbar-gutter:stable;overscroll-behavior:contain}
.kh-configurator #selection-panel .selection-fields[hidden] {display:none}
.kh-configurator #selection-panel:not(.is-expanded) .selection-summary {border-bottom:0}
.kh-configurator #selection-panel .selection-name {font-size:15px;line-height:1.3}
.kh-configurator #selection-panel .selection-designer-button {min-height:38px;margin-top:4px;padding:8px 12px;font-size:13px;box-shadow:none}
.selection-essentials {padding:0 0 12px;border-bottom:1px solid #dfe3e7;margin-bottom:12px}
.kh-configurator #selection-panel .field {display:flex;flex-direction:column;gap:6px;min-width:0;margin:0 0 12px}
.kh-configurator #selection-panel .field>span {font-size:12px;font-weight:500;color:#40465b}
.kh-configurator #selection-panel input,.kh-configurator #selection-panel select {min-height:38px;padding:8px 10px;font-size:13px;max-width:100%;box-sizing:border-box}
.kh-configurator #selection-panel .inspector-details {margin:10px 0;padding:12px;border:1px solid #e0e3e8;border-radius:12px;background:#fff}
.kh-configurator #selection-panel summary {font-size:13px;line-height:1.5;cursor:pointer}
.kh-configurator #selection-panel details[open]>summary {margin-bottom:12px}
.kh-configurator #selection-panel .quick-finishes {display:block;padding:0;border:0;background:transparent}
.kh-configurator #selection-panel .cabinet-colour,.kh-configurator #selection-panel .cabinet-colour+button {display:none}
.kh-configurator #selection-panel .position-note {font-size:11px;margin:8px 0}
.kh-configurator #selection-panel .designer-section {padding:10px 0}
.kh-configurator #selection-panel .field-row {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.kh-configurator #settings[hidden] {display:none!important}
.kh-configurator .catalog-card .add {display:grid;place-items:center;padding:0!important;line-height:1;box-sizing:border-box}
.kh-configurator .catalog-card .add svg {display:block;width:16px;height:16px;margin:0;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.applied-bead-controls {background:#f2f5f1;border:1px solid #dce3da;padding:14px;border-radius:12px;margin:12px 0}
.applied-bead-controls strong {font-size:13px}
.applied-bead-controls p,.applied-bead-controls small {font-size:11px;line-height:1.5;color:#566052}
.bead-insets {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.bead-fit-warning {font-size:12px;color:#935024;line-height:1.5}
.bead-fit-warning:empty {display:none}
.door-studio [data-bead] .applied-bead-controls {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px}
.door-studio .applied-bead-controls>strong,.door-studio .applied-bead-controls>p,.door-studio .applied-bead-controls>small {grid-column:1/-1;margin:0}
.door-studio .applied-bead-controls .field {display:flex;flex-direction:column;gap:4px;font-size:12px;min-width:0}
.door-studio .applied-bead-controls input,.door-studio .applied-bead-controls select,.studio-construction select {width:100%;min-width:0;box-sizing:border-box;padding:7px;border:1px solid #ccd3d0;border-radius:7px;background:white;color:#242b42}
.studio-construction {display:flex;align-items:center;gap:12px;margin:8px 0;font-size:12px}
.studio-construction select {width:auto}
.door-studio-tray:has(.applied-bead-controls) {max-height:55%;overflow-y:auto}
@media(min-width:901px){
 .kh-configurator:not(.door-studio-mode):has(#selection-panel.is-expanded:not([hidden])) #cabinet-placement-bar {right:390px}
 .door-studio-mode #scene {top:120px;bottom:18px;left:0;right:390px}
 .door-studio .door-studio-tray,.door-studio .door-studio-tray:has(.applied-bead-controls),.door-studio .door-studio-tray:has(.door-studio-panels[open]) {left:auto;right:14px;top:120px;bottom:18px;width:370px;max-height:none;transform:none;padding:14px;border-radius:18px}
 .door-studio-controls {flex-wrap:wrap;gap:8px}
 .door-studio-current {order:3;flex:1 0 100%;justify-content:space-between}
 .door-studio [data-bead] .applied-bead-controls {grid-template-columns:1fr 1fr;padding:10px;gap:10px}
 .door-studio .applied-bead-controls>.field-row,.door-studio .applied-bead-controls>.bead-insets {grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px}
 .door-studio .design-tile-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
 .studio-construction {flex-direction:column;align-items:stretch;gap:5px}
 .studio-construction select {width:100%}
}
@media(max-width:760px){
 .kh-configurator #selection-panel.is-expanded {inset:auto 8px 8px;max-width:none;width:auto;height:54%;max-height:560px}
 .door-studio [data-bead] .applied-bead-controls {grid-template-columns:1fr 1fr}
 .door-studio .applied-bead-controls>.bead-insets {grid-column:1/-1}
}

/* Keep the preview tall on laptops and zoomed desktops; controls scroll separately. */
.end-panel-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.end-panel-choices button{min-height:44px;border:1px solid #cdd3dc;border-radius:10px;background:white;color:#292e49}
.end-panel-choices button[aria-pressed=true]{background:#292e49;color:white}
.end-panel-choices button:disabled{opacity:.4;cursor:not-allowed}
.end-panel-diagram{display:flex;align-items:stretch;justify-content:center;gap:5px;margin:18px auto;max-width:310px;text-align:center}
.end-panel-diagram>div{padding:35px 18px;background:#ecece7;border:1px solid #cdd3dc;border-radius:6px}
.end-panel-diagram>span{display:grid;place-items:center;padding:8px;border:2px dashed #ccd5cf;border-radius:5px;font-size:12px}
.end-panel-diagram>span.is-active{background:#d8eee1;border:2px solid #277752;color:#1b593b}
.door-studio .door-studio-tray[hidden]{display:none!important}
.door-studio-mode:has(.door-studio[data-options-hidden=true]) #scene{bottom:12px!important;right:0!important}
@media(min-width:701px){
 .door-studio-mode .workspace{--studio-options-width:clamp(270px,29vw,340px)}
 .door-studio .door-studio-heading{top:10px;left:20px;right:14px;gap:8px}
 .door-studio .door-studio-heading h2{font-size:18px;margin:2px 0}
 .door-studio .door-studio-heading>button{padding:8px 13px;font-size:12px}
 .door-studio .door-studio-orbit{top:65px;left:20px;gap:8px}
 .door-studio .door-studio-orbit [data-view-label]{display:none}
 .door-studio-mode #scene{top:108px;bottom:12px;left:0;right:calc(var(--studio-options-width) + 24px)}
 .door-studio .door-studio-tray,.door-studio .door-studio-tray:has(.applied-bead-controls),.door-studio .door-studio-tray:has(.door-studio-panels[open]){top:108px;bottom:12px;left:auto;right:12px;width:var(--studio-options-width);max-height:none;transform:none;padding:12px;border-radius:16px}
 .door-studio .door-studio-controls{flex-wrap:wrap;gap:6px}
 .door-studio .door-studio-current{order:3;flex:1 0 100%;justify-content:space-between;gap:5px}
 .door-studio .design-tile-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .door-studio .design-tile-sample,.door-studio .design-tile-sample img{height:62px}
 .door-studio .studio-construction{flex-direction:column;align-items:stretch;gap:5px}
 .door-studio .studio-construction select{width:100%}
 .door-studio [data-bead] .applied-bead-controls{grid-template-columns:1fr 1fr;padding:8px;gap:8px}
 .door-studio .applied-bead-controls>.field-row,.door-studio .applied-bead-controls>.bead-insets{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
}
@media(max-width:700px){
 .door-studio [data-bead] .applied-bead-controls{grid-template-columns:1fr 1fr}
 .door-studio .applied-bead-controls>.field-row{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .door-studio .door-studio-heading{top:8px;left:12px;right:12px}
 .door-studio .door-studio-heading h2{font-size:15px;max-width:50vw}
 .door-studio .door-studio-orbit{top:75px;left:12px;right:12px;gap:5px}
 .door-studio .door-studio-orbit [data-view-label]{display:none}
 .door-studio .door-studio-orbit button{font-size:10px;padding:5px 8px}
 .door-studio .door-studio-tray,.door-studio .door-studio-tray:has(.applied-bead-controls),.door-studio .door-studio-tray:has(.door-studio-panels[open]){max-height:38%}
 .door-studio-mode #scene{top:116px;bottom:calc(var(--door-tray-height,210px) + 18px)}
}

.hardware-finish-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:6px}
.hardware-sample{display:flex;align-items:center;gap:6px;background:white;color:#292e49;border:1px solid #d7dcda;border-radius:8px;padding:7px;text-align:left;font:inherit;font-size:12px;min-height:38px}
.hardware-sample[aria-pressed="true"]{border-color:#335c4e;box-shadow:inset 0 0 0 1px #335c4e;background:#edf3ef}
.hardware-sample i{width:19px;height:19px;border-radius:50%;border:1px solid #7775;flex:none}

.studio-shelving{border:1px solid #cddbd1;border-radius:11px;padding:10px;margin:8px 0;background:#f3f7f2}
.studio-shelving summary{cursor:pointer;font-weight:550;color:#284538}.studio-shelving summary span{float:right;font-size:12px;font-weight:400}
.door-studio .studio-shelving p{text-align:left;font-size:12px;margin:9px 0}.shelf-stepper{display:flex;align-items:center;justify-content:space-between;gap:4px}
.shelf-stepper button{border:1px solid #bcc9be;background:white;border-radius:8px;width:34px;font-size:18px}.shelf-stepper output{font-size:12px}
.studio-shelving label{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin-top:8px}.studio-shelving input{width:56px;padding:5px}
.door-studio .door-studio-controls[hidden],.door-studio .door-studio-apply[hidden]{display:none}

/* Colour is immediately visible in the full kitchen designer. */
body:not(.mobile-cabinet) .door-studio .studio-colour-controls{position:sticky;top:-12px;z-index:3;margin:0 0 14px;padding:10px;background:#f7f8fb;box-shadow:0 5px 8px #292e4910}
body:not(.mobile-cabinet) .door-studio .studio-colour-controls .quick-materials{grid-template-columns:repeat(4,minmax(0,1fr))}
body:not(.mobile-cabinet) .door-studio .studio-colour-controls .quick-materials button{font-size:10px;min-height:48px;padding:4px;gap:3px}
body:not(.mobile-cabinet) .door-studio .studio-colour-controls .quick-materials i{height:20px}
body:not(.mobile-cabinet) .door-studio .studio-colour-controls small{display:none}
body:not(.mobile-cabinet) .door-studio .studio-colour-controls .quick-paint{gap:5px;margin-top:9px}
body:not(.mobile-cabinet) .door-studio .studio-colour-controls .quick-paint label{margin-left:0}
.door-studio .studio-other-finishes{border-block:1px solid #e1e4e5;padding:8px 0;margin:10px 0}
.door-studio .studio-other-finishes h3{font-size:13px;margin:4px 0 10px}
.door-studio .studio-other-finishes .field{display:flex;flex-direction:column;gap:5px;margin:9px 0;font-size:12px}
.door-studio .studio-other-finishes select{width:100%;min-height:36px;padding:7px;font-size:12px}
@media(max-height:620px),(max-width:700px){body:not(.mobile-cabinet) .door-studio .studio-colour-controls{position:static}}

body:not(.mobile-cabinet) .door-studio .door-studio-tray{animation:none}
.studio-finish-jumps{display:flex;gap:8px;border-top:1px solid #e1e4e5;margin-top:8px;padding-top:6px}
body:not(.mobile-cabinet) .door-studio .studio-colour-controls{position:static}
.door-studio .studio-colour-controls .paint-reference small{display:block}
.door-studio .studio-finish-jumps button{background:none;border:none;border-radius:3px;color:#364762;padding:3px 0;min-height:24px;font-size:10px;text-decoration:underline;text-underline-offset:3px}
.door-studio .studio-pan-hint{position:absolute;left:14px;bottom:18px;max-width:calc(100% - var(--studio-options-width,340px) - 42px);margin:0;padding:6px 9px;background:#fffffff0;border-radius:12px;color:#565e6b;font-size:11px;line-height:1.4;pointer-events:none}
.door-studio .studio-pan-hint span{display:none}
.mobile-cabinet .studio-pan-hint{display:none}
@media(pointer:coarse){.door-studio .studio-pan-hint span{display:inline}}
@media(max-width:700px){.door-studio .studio-pan-hint{bottom:calc(var(--door-tray-height,210px) + 23px);max-width:calc(100% - 28px)}}
body:not(.mobile-cabinet) .door-studio .studio-finish-jumps{position:sticky;top:-12px;z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0 0 8px;padding:5px 0;background:#fbfaf7;border:0}
body:not(.mobile-cabinet) .door-studio .studio-finish-jumps button{min-height:32px;border:1px solid #dce0e4;border-radius:8px;text-decoration:none;font-size:12px;background:#fff}
.door-studio .visual-choices button{border-radius:9px;padding:4px;white-space:normal}
