/* Compact devices keep the model on screen and place tools in a scrollable drawer. */
#mobile-options,#close-options{display:none}.camera-tools{position:absolute;right:18px;bottom:55px;display:flex;gap:7px;z-index:3}.camera-tools button{min-width:44px;min-height:44px}.camera-tools #touch-mode{font-size:11px;display:none}.walking .camera-tools{display:none}#render-note{margin:6px 0 12px}.quality-controls{margin:14px 0;border-top:1px solid #d6dfd0;padding-top:4px}.kit-button{margin-top:9px}#walk-pad button{touch-action:none}
@media(pointer:coarse){.camera-tools #touch-mode{display:block}button,select,input[type=number]{min-height:44px}.room-swatches button{min-width:36px;min-height:36px}#walk-pad button{width:48px;height:48px}}
@media(max-width:700px){
 html,body{height:100%;height:100dvh;overflow:hidden}header{height:68px;min-height:68px;padding:8px 12px}.brand strong{font-size:12px}.brand small{letter-spacing:.8px;font-size:8px}.brand .mark{width:36px;height:36px}.header-links{max-width:185px}.header-links .old-link{display:none}#mobile-options{display:inline-block;min-height:40px;font-size:11px}#back-building{font-size:10px}.save-banner{padding:5px 10px;font-size:9px}main{display:flex;flex-direction:row;overflow:hidden;min-height:0}.stage{height:auto;min-height:0;flex:1}aside{position:fixed;left:0;right:0;bottom:0;width:100%;height:60dvh;max-height:calc(100dvh - 80px);overflow-y:auto;overscroll-behavior:contain;padding:16px 18px 34px;background:#faf9f5;z-index:20;border:1px solid #cad5c8;border-radius:18px 18px 0 0;box-shadow:0 -8px 40px #193b3b30;transform:translateY(105%);visibility:hidden;transition:transform .18s ease,visibility .18s}body.controls-open aside{transform:none;visibility:visible}#close-options{display:block;position:sticky;top:0;margin-left:auto;z-index:3;background:#254f47;color:white;min-height:44px}.view-toolbar{top:12px;left:10px;right:10px}.view-toolbar button{min-height:42px;font-size:11px;padding:10px 9px}.view-toolbar>div{max-width:calc(100vw - 68px)}.model-tag{top:72px;left:14px;font-size:8px}#editor-caption{top:97px;font-size:10px;left:14px;right:14px}.selection-card{bottom:98px;left:12px;width:220px;padding:12px}.selection-card h2{font-size:18px}.selection-card p{font-size:10px}.selection-card .quick-actions{margin:8px 0}.selection-card button{padding:8px;font-size:10px;min-height:38px}.stage-bottom{min-height:38px;font-size:9px;padding:6px 12px}.camera-tools{bottom:46px;right:12px}.camera-tools #touch-mode{display:block}.camera-tools button{min-height:44px}.catalog{grid-template-columns:repeat(2,minmax(0,1fr));max-height:320px}#scene-stats{display:none}#walk-pad{right:12px;bottom:48px}#walk-pad button{width:48px;height:48px}#near-door{bottom:160px;right:12px;min-height:44px}#scale-bar{bottom:105px;right:14px}.walking .selection-card{display:none}
}
@media(max-height:500px) and (max-width:950px){header{height:54px;min-height:54px}.save-banner{display:none}.model-tag,#editor-caption{display:none}.selection-card{bottom:45px;padding:8px;width:200px}.selection-card p{display:none}.camera-tools{bottom:45px}.view-toolbar{top:8px}}
@media(prefers-reduced-motion:reduce){aside{transition:none}}
body.embed-mode header .brand small{display:none}body.embed-mode .header-links .old-link{display:none}

.mobile-s4-link{display:none}@media(max-width:700px){.mobile-s4-link{display:block;margin-top:18px;font-size:12px}}

/* Product-specific local previews and filters immediately above the results. */
.catalog-section{margin-top:22px;min-width:0}.catalog-filterbar{position:sticky;top:0;z-index:4;background:#faf9f5;padding:3px 0 8px;border-bottom:1px solid #d4dece}.catalog-filterbar .control-label{margin:7px 0 5px}.catalog-shortcuts{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.catalog-shortcuts button{padding:7px 8px;font-size:10px;min-height:32px}.catalog-shortcuts #catalog-reset{margin-left:auto;background:#eef2e9}.catalog-extra-filters{margin:9px 0 0;padding:0;border:0}.catalog-extra-filters .two-fields{margin:8px 0}.catalog-extra-filters .helper{margin:0}.catalog-filterbar #catalog-count{margin:7px 0 0}.catalog{grid-template-columns:repeat(2,minmax(0,1fr));max-height:480px;gap:8px}.catalog .product-card>button{display:flex;height:auto;min-height:180px;justify-content:flex-start;padding:7px;gap:7px}.catalog img{width:100%;height:auto;aspect-ratio:1.8;object-fit:contain;background:#f2f3ee;border-radius:5px}.catalog .product-card span{font-size:11px;line-height:1.35}.catalog .product-card small{font-size:10px;line-height:1.5}.catalog .product-card{display:flex;flex-direction:column}.catalog .product-card>a{margin-top:auto}.catalog img{pointer-events:none}
@media(max-width:700px){.catalog-filterbar{top:48px;z-index:2}.catalog{max-height:360px}.catalog-shortcuts button{min-height:36px}.catalog .product-card>button{min-height:170px}.catalog-filterbar input[type=search],.catalog-filterbar select{font-size:16px}.catalog-extra-filters .two-fields select{font-size:14px}}

/* Controls belong to the viewport, on mouse and touch devices. */
.stage-edit-controls{position:absolute;top:82px;left:24px;z-index:4}.furniture-lock-label{display:flex;align-items:center;gap:7px;min-height:42px;padding:9px 12px;background:#fffffff2;color:#234642;border:1px solid #d4ded3;border-radius:8px;font-size:11px;cursor:pointer;box-shadow:0 3px 15px #193b3b0d}.furniture-lock-label input{width:17px;height:17px;margin:0}.stage-lighting-controls{position:absolute;top:22px;right:24px;z-index:8;display:flex;align-items:start;gap:6px}.day-night{display:flex;gap:2px;padding:4px;background:#fffffff2;border-radius:9px}.day-night button{min-height:36px;padding:9px 10px;border:0;background:transparent;font-size:11px}.day-night button[aria-pressed=true]{background:#284f47;color:#fff}.stage-lighting-controls details{margin:0;padding:0;border:0}.stage-lighting-controls summary{list-style:none;padding:13px 10px;min-height:44px;background:#fffffff2;border-radius:8px;font-size:11px}.stage-lighting-controls details[open]{position:relative}.stage-lighting-controls details[open]>:not(summary){position:relative;z-index:1}.stage-lighting-controls details[open]{background:#fff;padding:0 12px 12px;border:1px solid #cad5c8;border-radius:9px;width:260px;box-shadow:0 6px 25px #193b3b26}.stage-lighting-controls details[open] summary{padding-left:0}.stage-lighting-controls:has(details[open]) .day-night{position:absolute;right:0;top:-1px;transform:translateX(-270px)}.model-tag{top:137px}#editor-caption{top:159px}.view-toolbar{right:auto;z-index:4}.furniture-locked{cursor:grab}.camera-tools #reset-camera{min-width:44px;min-height:44px}
@media(max-width:1200px){.stage-lighting-controls{top:82px}.model-tag{top:140px}#editor-caption{top:162px}}
@media(max-width:700px){.view-toolbar{left:10px;right:10px;top:12px}.view-toolbar>div{width:100%;max-width:none;justify-content:space-between}.view-toolbar button{font-size:10px;padding:9px 7px}.view-toolbar #smart-cutaway{position:static;max-width:80px;font-size:10px;padding:9px 5px}.stage-edit-controls{top:70px;left:10px}.furniture-lock-label{padding:9px 7px;font-size:10px;gap:4px}.stage-lighting-controls{top:70px;right:10px;gap:3px}.day-night{padding:2px}.day-night button{padding:9px 7px;min-height:40px;font-size:10px}.stage-lighting-controls summary{padding:12px 7px;font-size:10px}.stage-lighting-controls:has(details[open]) .day-night{position:static;transform:none}.stage-lighting-controls details[open]{position:absolute;top:49px;right:0;width:260px;max-width:calc(100vw - 20px)}.model-tag{top:126px;left:14px}#editor-caption{top:148px}.stage-lighting-controls input[type=checkbox]{min-height:18px}.furniture-lock-label input{min-height:17px}}
.night-scene .model-tag{color:#ccd6d0;text-shadow:0 1px 3px #000}.night-scene #editor-caption{color:#e1e7e0;text-shadow:0 1px 3px #000}

/* The apartment information card is a native, collapsible disclosure. */
.selection-card{margin:0;color:#193b3b;line-height:1.4}.selection-card-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none;color:inherit;cursor:pointer}.selection-card-toggle::-webkit-details-marker{display:none}.selection-heading{min-width:0}.selection-card .selection-card-toggle h2{margin:7px 0 0}.card-toggle-text{flex:none;font-size:10px;color:#31594b;white-space:nowrap;min-height:44px;display:flex;align-items:center}.selection-card:not([open]) .card-less,.selection-card[open] .card-more{display:none}#selection-card-content{margin-top:10px}.selection-card-toggle:focus-visible{outline:3px solid #cd6f3b;outline-offset:4px;border-radius:4px}
@media(max-width:700px){.selection-card{width:auto;left:12px;right:12px;max-width:none;padding:10px 12px;bottom:98px}.selection-card small{font-size:8px;letter-spacing:1px}.selection-card .selection-card-toggle h2{font-size:16px;margin-top:4px}.selection-card[open]{max-height:min(45dvh,310px);overflow-y:auto;overscroll-behavior:contain}.selection-card-toggle{position:sticky;top:-10px;background:#fffffff5;z-index:1;padding:2px 0}.selection-card[open] .selection-card-toggle{padding-top:10px;padding-bottom:8px}.card-toggle-text{font-size:11px}.selection-card #selection-card-content .quick-actions button{min-height:44px}.selection-card #source-link{display:block;padding:7px 0}}
@media(max-height:500px) and (max-width:950px){.selection-card{right:auto;width:220px;bottom:46px}.selection-card[open]{max-height:calc(100dvh - 150px)}}

/* Phone controls: one header theme icon, direct explode sliders and item-local rotation. */
#mobile-period,#mobile-explode,#mobile-rotation,#mobile-rotate-panel{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){
 .header-links{max-width:none;flex-wrap:nowrap;gap:4px}#mobile-period{display:inline-grid;place-items:center;min-height:40px;min-width:40px;width:40px;padding:6px;font-size:22px}#mobile-options{padding:8px;min-height:40px}.header-links #back-building{padding:6px;font-size:10px;min-height:40px;max-width:104px}.brand strong{font-size:10px}.brand small{font-size:7px;letter-spacing:.4px}.brand{gap:7px}
 .stage-lighting-controls{display:none}#mobile-lighting-slot .stage-lighting-controls{display:block;position:static;margin:14px 0}#mobile-lighting-slot .day-night{display:none}#mobile-lighting-slot details{width:100%;padding:10px 12px;box-shadow:none;border:1px solid #d6ded2}#mobile-lighting-slot details summary{padding:3px 0;min-height:30px;background:transparent}#mobile-lighting-slot details[open]{position:static;max-width:none}
 #mobile-explode{position:absolute;z-index:4;top:8px;left:10px;right:10px;display:grid;grid-template-columns:56px minmax(0,1fr) 34px;align-items:center;gap:5px 7px;padding:7px 10px;background:#fffffff2;border:1px solid #d6ded2;border-radius:9px;font-size:10px}#mobile-explode input{margin:0;min-height:30px;touch-action:pan-y}#mobile-explode output{text-align:right;font-size:10px}.stage.editing #mobile-explode{display:none}.stage:not(.editing) .view-toolbar{top:99px}.stage:not(.editing) .model-tag{top:157px}.stage:not(.editing) .stage-edit-controls{display:none}.stage.editing .stage-edit-controls{top:68px}.stage.editing .model-tag{top:122px}.stage.editing #editor-caption{top:145px}
 #mobile-rotation:not([hidden]){display:block;position:absolute;z-index:6}#mobile-rotate-toggle{width:44px;height:44px;padding:0;display:grid;place-items:center;background:#28594d;color:#fff;font-size:29px;border:2px solid #fff;border-radius:50%;box-shadow:0 3px 12px #193b3b40;touch-action:manipulation}
 #mobile-rotate-panel:not([hidden]){display:block;position:absolute;z-index:9;right:10px;bottom:108px;width:min(294px,calc(100% - 20px));padding:10px;background:#fffffff5;color:#193b3b;border:1px solid #bacabb;border-radius:10px;box-shadow:0 5px 24px #193b3b30}.rotation-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.rotation-panel-head strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rotation-panel-head button{width:36px;min-height:36px;padding:0;font-size:22px}.rotation-panel-row{display:grid;grid-template-columns:1fr 58px 38px 1fr;gap:4px;align-items:center}.rotation-panel-row button{min-height:44px;padding:6px 4px;font-size:11px}.rotation-panel-row input{min-width:0;width:100%;min-height:44px;padding:5px;font-size:16px;border:1px solid #bdccbe;border-radius:6px}.rotation-panel-row .sr-only{position:absolute}#mobile-rotation-draft p{font-size:10px;color:#94452e;margin:8px 0}#mobile-rotation-cancel{min-height:40px;font-size:11px;width:100%}
}
@media(max-width:360px){header .brand>span:last-child{display:none}.header-links #back-building{max-width:104px}.stage.editing #editor-caption{font-size:9px}}
