/* Bound the studio to the viewport, not the number of catalog products. */
.studio{height:calc(100dvh - 72px);min-height:0;grid-template-columns:minmax(0,1fr) minmax(350px,410px)}
.scene-panel{min-height:0;height:100%}
.view-controls{position:absolute;bottom:20px;left:7%;right:7%;display:flex;gap:8px;flex-wrap:wrap}
.view-controls .view-button{position:static;min-height:44px;border:1px solid #a6b1a7;border-radius:8px;background:#f7f5f0f5;color:var(--ink);padding:10px 14px;font:600 12px Arial,sans-serif;box-shadow:0 2px 8px #17231e14}
.view-controls .view-button[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.view-controls .view-button:hover{box-shadow:0 0 0 2px #b56e3b99}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.control-panel{min-height:0;min-width:0;padding:20px 24px 12px;overflow:hidden}
.control-panel>.step,.step-actions,.quote,#save,#schedule,.status{flex-shrink:0}
.control-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:14px 8px 4px 0}
.options{max-height:none;overflow:visible}
.step{padding-bottom:12px}
.step-actions{padding-top:10px}
.quote{margin-top:0;padding:12px 0}
.design-details{margin-top:8px;font-size:12px}
.design-details summary{cursor:pointer;padding:5px 0}
.design-details .selection-summary{max-height:130px;overflow-y:auto;margin-top:5px}
.control-panel>.primary,.control-panel>.secondary{padding:11px}
.design-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;flex-shrink:0}
.design-actions button{min-height:44px;padding:11px}
#reset-design{border:1px solid #8b968e;background:transparent;color:var(--ink);font:600 12px Arial,sans-serif;cursor:pointer}
.reset-dialog-content{padding:28px}
.reset-dialog-content h2{font-size:29px;margin:0 0 14px}
.reset-dialog-actions{display:flex;gap:10px;margin-top:22px}
.reset-dialog-actions button{flex:1;min-height:44px;padding:10px;font:600 13px Arial,sans-serif;cursor:pointer}
.reset-dialog-actions .primary{margin:0;width:auto}
#cancel-reset-design{background:transparent;border:1px solid #8b968e;color:var(--ink)}
.status:empty{display:none}
.control-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.select-control{display:block;font-size:13px;margin-bottom:16px}
.select-control[hidden]{display:none}
.select-control select{display:block;width:100%;padding:10px;margin-top:8px;font:inherit}
.choice:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.floor-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.floor-filters .select-control{min-width:0;margin-bottom:8px}
.floor-filters .select-control:has(input){grid-column:1/-1}
.floor-filters select{margin-top:4px;padding:8px;min-height:40px}
.floor-filters:has(#floor-collection:disabled){grid-template-columns:1fr}
#floor-results{margin:4px 0 12px;color:#687168}
#room-wall-results{margin:4px 0 12px;color:#687168;font-size:12px;line-height:1.5}
.room-wall-filters{grid-template-columns:1fr}
.shower-tile-filters{grid-template-columns:1fr}
.shower-tile-filters[hidden]{display:none}
[data-group="wall"] .tile-choice .product-thumb{height:106px;object-fit:contain;background:#fff}
[data-group="wall"] .tile-choice{overflow-wrap:anywhere}
[data-group="roomWall"] .product-thumb{height:106px;object-fit:contain;background:#fff}
[data-group="roomWall"] .choice{overflow-wrap:anywhere}
[data-group="roomWall"] [data-id="paint"]{grid-column:1/-1;display:grid;grid-template-columns:52px 1fr;align-items:center;column-gap:10px;min-height:0}
[data-group="roomWall"] [data-id="paint"] .product-thumb{grid-row:1/3;width:52px;height:48px;margin:0;border:1px solid #b7b9b1}
[data-group="roomWall"] [data-id="paint"] small{margin:0}
.paint-controls{grid-column:1/-1;min-width:0;margin:0;padding:12px;border:1px solid var(--line);border-radius:8px;background:#edf0e9}
.paint-controls[hidden]{display:none}
.paint-controls legend{font-size:13px;font-weight:600;padding:0 4px}
.paint-inputs{display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px}
.paint-inputs label{font-size:12px;min-width:0}
.paint-inputs input{display:block;box-sizing:border-box;width:100%;height:44px;margin-top:6px;border:1px solid #8b968e;border-radius:5px;background:#fff;font:inherit}
#paint-picker{padding:3px;cursor:pointer}
#paint-hex{padding:8px 10px;font:15px ui-monospace,monospace}
#paint-hex[aria-invalid="true"]{border-color:#9a3328}
#paint-hint,#paint-error{font-size:11px;line-height:1.5;margin:10px 0}
#paint-error{color:#85291f}
#paint-error:empty{display:none}
#reset-paint{min-height:36px;padding:6px 10px;border:1px solid #8b968e;border-radius:5px;background:transparent;color:var(--ink);font:inherit;font-size:12px;cursor:pointer}
.paint-controls input:focus-visible,.paint-controls button:focus-visible{outline:3px solid #b56e3b;outline-offset:2px}
.floor-filters input{display:block;box-sizing:border-box;width:100%;min-height:40px;padding:10px;margin-top:8px;font:inherit;border:1px solid #9caaa4;border-radius:3px;background:white}
.floor-note,#floor-results,#floor-empty,.floor-references{font-size:12px;line-height:1.5}
.floor-note:empty{display:none}
.floor-selected{padding:10px;border-left:3px solid var(--accent);background:#edf1ea;font-size:12px;line-height:1.5}
[data-group="floor"] .product-thumb{height:106px;object-fit:contain;background:#fff}
[data-group="floor"] .choice{overflow-wrap:anywhere}
.floor-references{margin:16px 0}
.floor-references summary{cursor:pointer;min-height:32px}
.floor-references img{width:100%;max-height:230px;object-fit:contain}
[data-group="base"]>.choices{grid-template-columns:repeat(2,minmax(0,1fr))}
[data-group="base"] .product-thumb{object-fit:contain;background:white}
.base-controls{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.base-controls[hidden]{display:none}
.base-tile-note,#base-tile-source{font-size:12px;line-height:1.5}
#base-tile-source{display:inline-block;padding:8px 0;min-height:32px}
#base-tile-controls .choice{overflow-wrap:anywhere}
.curb-controls{margin:0 0 18px;padding:12px;border:1px solid var(--line);border-radius:8px}
.curb-controls summary{cursor:pointer;font-size:13px;font-weight:600;min-height:24px;line-height:1.5}
.curb-reference{margin:10px 0;font-size:12px;line-height:1.5}
.curb-reference img{width:100%;height:90px;object-fit:contain;background:#fff;margin-bottom:8px}
.curb-reference img[hidden]{display:none}
.door-controls{padding:12px;border:1px solid var(--line);border-radius:8px;margin:12px 0 16px}
.door-controls[hidden]{display:none}
.door-controls .select-control:last-child{margin-bottom:0}
[data-group="door"] .product-thumb{height:142px;object-fit:contain;background:#fff}
#door-fit,#door-spec,#door-pending{font-size:12px;line-height:1.5}
#door-pending:empty{display:none}
.match-base{display:flex;align-items:center;gap:9px;min-height:44px;font-size:13px;font-weight:bold}
.match-base input{width:18px;height:18px;accent-color:var(--ink);flex:none}
#base-fit,#base-match-note,#base-material-status{font-size:12px;line-height:1.5}
.base-reference{margin:12px 0 0}
.base-reference img{display:block;width:100%;height:150px;object-fit:contain;background:white;border-radius:6px}
.base-reference figcaption{font-size:11px;line-height:1.5;color:#687168;margin-top:8px}
@media(max-width:800px){
 .view-controls{left:12px;right:12px;bottom:10px;display:grid;grid-template-columns:1fr 1.2fr auto;gap:5px}
 .view-controls .view-button{min-width:0;padding:7px 8px;font-size:11px}
 .studio{display:block;height:auto}
 .scene-panel{height:40dvh;min-height:260px;max-height:420px}
 .control-panel{padding:18px 16px;overflow:visible}
 .control-scroll{flex:none;max-height:55dvh;min-height:180px;overflow:auto}
 .step-actions{position:sticky;bottom:0;background:var(--paper);padding:10px 0;z-index:2}
 .quote{padding-top:16px}
 .scene-copy{top:12px}
}
@media(min-width:801px) and (max-height:650px){
 .studio{height:650px}
}
