/* The header sits above the room, leaving the entire scene visible. */
body.room-page{--room-header-height:85px;--room-available-height:calc(100svh - var(--room-header-height));background:#f6e8c7}
body.editorial.room-page .site-nav{position:relative;height:var(--room-header-height);min-height:var(--room-header-height);background:#f8eacf;color:#49260f;backdrop-filter:none;box-shadow:none}
.portal{height:var(--room-available-height);min-height:0;padding:0;background:#d9a52f}
.room-stage{position:relative;inset:auto;width:min(100vw,calc(var(--room-available-height) * 1.7768331562));height:min(var(--room-available-height),56.2799043062vw);overflow:hidden;flex:none}
.room-backdrop{top:0;bottom:auto;left:0;width:100%;height:100%;transform:none;background-size:100% 100%}
.room-site-return{top:15px}
.wardrobe-view,.room-gallery{top:var(--room-header-height);z-index:80}
.wardrobe-return{top:max(16px,env(safe-area-inset-top))}
@media(max-width:760px){body.room-page{--room-header-height:68px}.room-stage{width:min(100vw,calc(var(--room-available-height) * .5634730539));height:min(var(--room-available-height),177.4707757705vw)}}
body.room-page{background:#f6e8c7}.sam-bed{position:absolute;border:0;background:transparent;padding:0;cursor:pointer;z-index:9}.sam-bed img{display:block;width:100%;height:100%;object-fit:fill}.sam-one{left:4%;top:55%;width:9%;height:4%;transform:rotate(-5deg)}.sam-two{left:10%;top:56%;width:6%;height:6%;transform:rotate(5deg)}.original-drawer-layers{display:none;position:absolute;inset:0;z-index:15;pointer-events:none}.second-drawer .original-drawer-layers{display:block}.original-layer{position:absolute;pointer-events:auto;border:0;padding:0;background:transparent;cursor:pointer;filter:drop-shadow(1px 2px 2px #25140988)}.camera-photo .original-layer img{object-fit:fill;width:100%;height:100%}.original-layer.prologue{left:33%;top:23%;width:29%;height:65%;transform:rotate(-4deg)}.original-layer.drawing-one{left:9%;top:4%;width:34%;height:41%;transform:rotate(-8deg);clip-path:polygon(2.3% 11%,89.3% 0%,91.7% 89.3%,11.7% 100%)}.original-layer.drawing-two{left:64%;top:30%;width:22%;height:53%;transform:rotate(-9deg);clip-path:polygon(0 15%,100% 8.5%,100% 100%,0 100%)}.story:has(.original-view){max-width:min(850px,95vw);width:850px;padding:18px}.original-view{display:block;max-width:100%;width:auto;max-height:70svh;object-fit:contain;margin:15px auto}.room-gallery-frame.panorama-detail{height:min(58svh,650px);display:block;position:relative;overflow:hidden}.room-gallery-frame.panorama-detail img{width:100%;height:100%;object-fit:contain}.camera-photo.second-drawer{aspect-ratio:1616/973}.camera-view{padding-top:72px}.camera-photo{max-height:80svh;width:min(94vw,1000px,115svh)}
@media(max-width:760px){.sam-one{left:3%;top:49%;width:11%;height:2.5%}.sam-two{left:10%;top:49.5%;width:6%;height:3.5%}.room-gallery-frame.panorama-detail{height:56svh}}
.bambi-case-title{display:none;position:absolute;left:84%;top:66.8%;width:9%;height:4.2%;background:#27282c;color:#eee;text-align:center;font:bold clamp(9px,1.8vw,18px)/1.2 Georgia,serif;transform:rotate(-4deg);z-index:5;pointer-events:none}.first-drawer .bambi-case-title{display:grid;place-items:center}
body.wardrobe-entry{--room-header-height:0px!important;--room-available-height:100svh}.wardrobe-entry .wardrobe-view,.wardrobe-entry .room-gallery{top:0}.wardrobe-entry .portal{height:100svh}.wardrobe-entry .sam-bed{z-index:9}
.panorama-scene{position:relative;width:100%;height:100%;overflow:visible}.room-gallery-frame.panorama-detail .panorama-scene>img{object-fit:fill;width:100%;height:100%}
@media(min-width:761px){.room-gallery-frame.panorama-detail{aspect-ratio:1672/941;height:auto;max-height:62svh}}
@media(max-width:760px){.room-gallery-frame.panorama-detail{aspect-ratio:941/1670;width:min(100%,calc(58svh * .563473));height:58svh;margin-inline:auto}}
.camera-view{z-index:110}.camera-back{z-index:112}.room-gallery-card{max-height:calc(100svh - var(--room-header-height,0px) - 24px)}
/* The entrance presents only the wardrobe; the room belongs to its menu. */
.wardrobe-entry .room-stage,.wardrobe-entry .room-hint,.wardrobe-entry .room-site-return{display:none}
.wardrobe-entry .wardrobe-view{top:0;transition:none}
.wardrobe-entry .wardrobe-return{top:max(18px,env(safe-area-inset-top))}
.wardrobe-entry .caption{position:fixed;z-index:90;left:50%;bottom:max(18px,env(safe-area-inset-bottom));color:#49260f}
/* Keep the newly supplied drawer composition intact. Original sheets open from its hotspots. */
.second-drawer .original-drawer-layers{display:none}
/* Launch mode: the wardrobe is a visual entrance; the room offers zoom only. */
.launch-preview .wardrobe button:disabled,.launch-preview .sam-bed:disabled,.launch-preview .original-layer:disabled,.launch-preview .camera-hotspot:disabled{pointer-events:none;cursor:default;opacity:1}
.launch-preview .room-gallery-objects,.launch-preview .room-gallery-note{display:none}
.launch-preview .panorama-scene .sam-bed{pointer-events:none;cursor:default}

/* Restore prepared detail photographs; expanded objects are view-only. */
.room-details-restored .room-gallery-objects{display:flex}
.room-details-restored .room-gallery-objects button:disabled{opacity:1;cursor:default;pointer-events:none}
.room-details-restored .detail-hotspot:disabled{pointer-events:none;cursor:default;opacity:1}
.room-details-restored .room-backdrop .sam-bed{background:#f3e8d0;border:1px solid #d6c9ad;border-radius:1px;box-shadow:1px 2px 2px #52372145;pointer-events:none;cursor:default}
.room-details-restored .room-backdrop .sam-bed img{visibility:hidden}
.room-details-restored .room-backdrop .sam-one{left:6%;top:55%;width:9%;height:4%;transform:rotate(-5deg);z-index:10}
.room-details-restored .room-backdrop .sam-two{left:11%;top:55.5%;width:5%;height:6%;transform:rotate(5deg);z-index:9}
@media(max-width:760px){.room-details-restored .room-backdrop .sam-one{left:4%;top:49%;width:11%;height:2.5%}.room-details-restored .room-backdrop .sam-two{left:11%;top:49.5%;width:6%;height:3.5%}}

/* The VHS title is printed in the photograph; avoid a floating HTML label. */
.bambi-case-title,.first-drawer .bambi-case-title{display:none}
/* Keep the cabinet body and feet on a stable layer while doors/drawers move. */
.wardrobe-view .wardrobe{animation:none;transform:none;transition:none;filter:none;flex-shrink:0}
.wardrobe-view .wardrobe-back{background:none;transform:translateZ(0);backface-visibility:hidden;will-change:transform;animation:none;transition:none}
.wardrobe-view .wardrobe-back img{transform:none;animation:none;transition:none}

/* Same approved paired sheets as the close-up, shown smaller in the room. */
.room-details-restored .room-backdrop .sam-drawings{left:4%;top:54.5%;width:12%;height:auto;aspect-ratio:695/213;transform:none;border:0;border-radius:0;box-shadow:none;background-image:url('/art/bed-drawings-approved.png');background-size:240.5755% 441.784%;background-position:50.6653% 65.9341%;background-repeat:no-repeat;clip-path:polygon(0 18%,50% 3%,53% 12%,86% 0,100% 100%,54% 95%,52% 65%,8% 81%);z-index:10;pointer-events:none}
@media(max-width:760px){.room-details-restored .room-backdrop .sam-drawings{left:3%;top:48.3%;width:13%;height:auto}}
/* Expanded scenes contain only the image and the navigation controls. */
.room-page .room-gallery-title,.room-page #room-gallery-title,.room-page .room-gallery-note,.room-page .room-gallery-objects,.room-page #caption{display:none!important}

/* Portrait detail includes the full guitar and adjacent wardrobe. */
.room-details-restored .room-gallery-frame.guitar{height:min(68svh,780px);background:transparent}
.room-details-restored .room-gallery-frame.guitar img{width:100%;height:100%;object-fit:contain;transform:none;filter:none}

/* Each sprite tile stops before the hanger belonging to the next row. */
.wardrobe-view .garment[data-sprite="basics"][data-row="0"]{clip-path:inset(0 0 8% 0)}
.wardrobe-view .garment[data-sprite="basics"][data-row="1"]{clip-path:inset(0 0 15% 0)}
.wardrobe-view .garment[data-sprite="coats"][data-row="0"]{clip-path:inset(0 0 3% 0)}
/* Entire detail images fit in the usable viewport, including portrait artwork. */
#room-gallery .room-gallery-card{display:flex;flex-direction:column;overflow:hidden;max-height:calc(100svh - var(--room-header-height,85px) - 32px)}
#room-gallery .room-gallery-header{flex:none}
#room-gallery .room-gallery-frame.full-scene:not(.window){display:flex;align-items:center;justify-content:center;flex:none;width:100%;min-width:0;min-height:0;height:min(65svh,calc(100svh - var(--room-header-height,85px) - 120px));max-height:none;aspect-ratio:auto;overflow:hidden;padding:10px;background:#f5e6c9}
#room-gallery .room-gallery-frame.full-scene:not(.window)>#room-gallery-image{display:block;flex:none;width:auto!important;height:auto!important;min-width:0;min-height:0;max-width:100%!important;max-height:min(65svh - 20px,calc(100svh - var(--room-header-height,85px) - 140px))!important;object-fit:contain!important;object-position:center;transform:none;filter:none}
