/* Without WebGL, all content remains in its original document flow. */
.room-journey,.room-hero-path,.room-wall-content {display:contents;}
.room-stage {display:none;}
html.room-ready:not(.room-reduced):not(.room-mobile) body.gallery-edition main {overflow:clip;}
html.room-ready:not(.room-reduced):not(.room-mobile) .room-journey {display:block;position:relative;isolation:isolate;}
html.room-ready:not(.room-reduced):not(.room-mobile) .room-stage {
 display:block;position:sticky;top:0;height:100svh;width:100%;z-index:0;overflow:hidden;background:#f6f0eb;
}
.room-stage canvas {display:block;width:100%;height:100%;transition:none!important;}
.room-stage::after {content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 30% 30%,rgba(25,29,33,.40),rgba(25,29,33,.24) 43%,transparent 76%);opacity:var(--room-scrim,1);pointer-events:none;}
@media(max-width:600px){.room-stage::after{background:linear-gradient(180deg,rgba(25,29,33,.22),rgba(25,29,33,.34) 48%,transparent 82%);}}
html.room-ready:not(.room-reduced):not(.room-mobile) .room-hero-path {display:block;position:relative;height:180svh;margin-top:-100svh;pointer-events:none;}
html.room-ready:not(.room-reduced):not(.room-mobile) body.gallery-edition .room-hero-path .gallery-hero {
 position:sticky;top:0;height:100svh;min-height:100svh;max-height:none;
 width:100%;margin:0;background:transparent;overflow:clip;border:0;box-shadow:none;
}
html.room-ready:not(.room-reduced):not(.room-mobile) .gallery-hero::after,
html.room-ready:not(.room-reduced):not(.room-mobile) .gallery-hero::before,
html.room-ready:not(.room-reduced):not(.room-mobile) .gh-scene,
html.room-ready:not(.room-reduced):not(.room-mobile) .gh-terrain,
html.room-ready:not(.room-reduced):not(.room-mobile) .gh-terrain-shadow {display:none!important;}
html.room-ready:not(.room-reduced):not(.room-mobile) .gallery-hero .gh-content {animation:none;transform-origin:50% 45%;will-change:transform,opacity;}
html.room-ready:not(.room-reduced):not(.room-mobile) .gh-motion {pointer-events:auto;}

html.room-ready:not(.room-reduced):not(.room-mobile) #work::before,html.room-ready:not(.room-reduced):not(.room-mobile) #work::after {display:none;}
html.room-ready:not(.room-reduced):not(.room-mobile) #work .wi-index>li {box-shadow:0 14px 24px -18px #272b3a50;}
html.room-ready:not(.room-reduced):not(.room-mobile) .room-journey:has(#work:focus-within) .room-wall-content {opacity:1!important;transform:none!important;}
/* Reduced motion bypasses the long camera route and preserves the original cards. */
html.room-reduced .gallery-hero .gh-content {transform:none!important;opacity:1!important;visibility:visible!important;}
@media(max-width:700px){
 html.room-ready:not(.room-reduced):not(.room-mobile) body.gallery-edition #work {width:calc(100% - 32px);padding:40px 16px 65px;}
}
@media print { .room-stage,.gh-motion {display:none!important;} .room-journey,.room-hero-path,.room-wall-content{display:contents!important;} }

html.room-ready:not(.room-reduced):not(.room-mobile) .gallery-hero .gh-content,html.room-ready:not(.room-reduced):not(.room-mobile) .room-wall-content {transition:none!important;}
html.room-ready:not(.room-reduced):not(.room-mobile) .gallery-hero .gh-motion {transition:none;}

/* Phones use the same native-scroll card carousel as the page, with no room
   runway, camera travel, animated terrain, or WebGL download on initial load. */
@media(max-width:760px){
 .room-journey,.room-hero-path,.room-wall-content {display:contents!important;}
 .room-stage,.room-journey::after,.gallery-hero .gh-terrain,.gallery-hero .gh-terrain-shadow,.gallery-hero .gh-motion {display:none!important;}
 .study-on body.gallery-edition .gallery-hero {
  position:relative;width:100%;height:100svh;min-height:640px;max-height:none;
  margin:0;padding:100px 0 60px;container-type:normal;
 }
 body.gallery-edition .gallery-hero .gh-content {top:0;animation:none;}
 body.gallery-edition .gallery-hero .gh-scene {animation:none;}
}

/* End the sticky intro before normal document content; no trailing wall runway. */
html.room-ready:not(.room-reduced):not(.room-mobile) .room-journey::after {display:none;}
html.room-ready:not(.room-reduced):not(.room-mobile) #work {position:relative;opacity:1;transform:none;clip-path:none;}

/* Normal-flow card wrapper: isolate Selected work from legacy full-bleed main > section rules. */
.work-content {position:relative;width:min(1380px,92.5%);margin:0 auto;padding-block:48px;}
html.study-on body.gallery-edition .work-content #work {
 box-sizing:border-box;width:100%;max-width:none;margin:0;
 padding:clamp(32px,5.5vw,88px);background:var(--panel,#f4f4ee);
 border:1px solid rgba(25,27,28,.10);border-radius:24px;
 box-shadow:0 18px 60px -40px rgba(25,27,28,.22);
}
@media(max-width:760px){
 .work-content {width:calc(100% - 32px);padding-block:24px;}
 html.study-on body.gallery-edition .work-content #work {padding:28px 20px;border-radius:20px;}
}


/* One depth journey. The destination stays in focus during the approach,
   then its sticky boundary releases into normal page scrolling. */
html.room-ready:not(.room-reduced):not(.room-mobile) .room-stage {position:sticky;top:0;height:100svh;background:#f6f0eb;}
html.room-ready:not(.room-reduced):not(.room-mobile) .room-hero-path {height:200svh;margin-top:-100svh;}
html.room-ready:not(.room-reduced):not(.room-mobile) body.gallery-edition .room-hero-path .gallery-hero {position:sticky;top:0;}
.content-arrival {display:contents;}
html.room-ready:not(.room-reduced):not(.room-mobile) .content-arrival {display:block;position:relative;margin-top:-200svh;z-index:2;pointer-events:none;}
html.room-ready:not(.room-reduced):not(.room-mobile) .work-content {position:sticky;top:0;margin:0 auto;pointer-events:auto;opacity:var(--content-arrival,0);visibility:var(--content-visibility,hidden);}

html.room-ready:not(.room-reduced):not(.room-mobile) .content-arrival::after {content:"";display:block;height:100svh;pointer-events:none;}
