/* PRO.REMONT51 · Three.js integration. Existing layout, colors and assets preserved. */
.chapter{height:calc(var(--scene-steps) * 100svh)}
.chapter .door-stage{position:absolute;inset:0;overflow:hidden;isolation:isolate;pointer-events:none}
.chapter .door-stage:after,.chapter .door-shadows,.chapter .door-floor{display:none!important}
.door-dolly{z-index:2;pointer-events:none!important}
.door-webgl-host{position:absolute;inset:0;z-index:3;opacity:1;pointer-events:none;overflow:hidden;will-change:opacity}
.door-webgl-host canvas{display:block;width:100%;height:100%;pointer-events:none}
.chapter.three-active .door-dolly{opacity:0!important;visibility:hidden;}
.fullscreen-gallery{position:absolute;inset:0;z-index:4;opacity:0;pointer-events:none;will-change:opacity;background:#18242a;overflow:hidden}
.fullscreen-gallery .photo-zoom{display:block!important;position:absolute;inset:0!important;width:100%!important;height:100%!important;overflow:hidden;pointer-events:inherit!important;border:0;background:#18242a;cursor:zoom-in;}
.fullscreen-gallery .photos-layer,.fullscreen-gallery .scene-photo{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 50%;max-width:none!important;max-height:none!important;transform:none!important;transition:none!important;filter:none;}
.fullscreen-gallery .scene-photo{opacity:0}
.fullscreen-gallery .scene-photo:first-child{opacity:1}
.fullscreen-gallery .photo-shading{opacity:.28;background:linear-gradient(to top,#0b1825a3,transparent 25%);pointer-events:none}
.chapter.is-entered .fullscreen-gallery .photo-zoom{pointer-events:auto!important}
.chapter-gallery-hud{z-index:10!important;left:clamp(20px,5vw,72px);bottom:clamp(20px,3vw,35px);max-width:min(400px,58vw);background:rgba(17,27,30,.72);backdrop-filter:blur(10px);}
.chapter:not(.is-entered) .chapter-gallery-hud{opacity:0!important;pointer-events:none}
.chapter .chapter-prompt{z-index:11;bottom:20px;transition:opacity .2s;}
.chapter .project-ident{z-index:9;transition:opacity .12s;}
.chapter .compare-chip{z-index:13!important;bottom:clamp(23px,3vw,38px)!important;right:clamp(20px,5vw,65px)!important;left:auto!important;transform:none!important}
.chapter .skip-experience{position:absolute;bottom:72px;left:50%;transform:translateX(-50%);border:1px solid #e0cda6a8;background:#14232ccf;color:#f8eddb;font:600 .7rem/1.3 system-ui,sans-serif;letter-spacing:.03em;border-radius:28px;padding:10px 17px;z-index:14;pointer-events:auto;cursor:pointer;box-shadow:0 6px 24px #0003;transition:background .18s,opacity .12s;white-space:nowrap}
.chapter .skip-experience:hover{background:#293d47}
.chapter--kids .chapter-wall{background:radial-gradient(ellipse at 51% 23%,#f4efe7 0%,#d9cbbd 43%,#b5a493 100%)}
.chapter--bath .chapter-wall{background:linear-gradient(105deg,#40494f,#717b80 43%,#3c4449)}
.chapter--country .chapter-wall{background:linear-gradient(110deg,#3d4b4a,#526166 46%,#283a3e)}
@media(max-width:800px){
 .chapter .project-ident{top:83px;left:13px;right:13px;width:auto;max-width:none;align-items:center;text-align:center}
 .chapter .project-ident strong{font-size:clamp(1.4rem,5vw,2rem)}
 .chapter .chapter-gallery-hud{bottom:15px;left:12px;transform:none!important;min-width:0;max-width:min(70vw,330px);padding:8px 11px;gap:3px;background:#12232ac9}
 .chapter--country .chapter-gallery-hud{max-width:53vw}
 .chapter .chapter-gallery-hud .hud-caption{font-size:.72rem;line-height:1.25}
 .chapter .compare-chip{bottom:19px!important;right:10px!important;left:auto!important;font-size:.67rem;padding:9px 10px}
 .chapter .skip-experience{bottom:80px;font-size:.66rem;padding:9px 12px}
 .chapter .chapter-prompt{bottom:18px;max-width:95%;white-space:normal;text-align:center;font-size:.62rem}
 .fullscreen-gallery .photo-zoom{inset:0 0 68px 0!important;height:calc(100% - 68px)!important}
 .chapter.is-entered .chapter-sticky:after{content:"";position:absolute;left:0;right:0;bottom:0;height:68px;background:#14232b;z-index:8;pointer-events:none}
}
@media(max-width:500px){
 .chapter .chapter-gallery-hud{max-width:calc(100vw - 28px)}
 .chapter--country .chapter-gallery-hud{max-width:55vw}
 .chapter .chapter-gallery-hud .hud-word,.chapter .chapter-gallery-hud .hud-fraction{font-size:.5rem}
 .chapter .chapter-gallery-hud .hud-caption{font-size:.68rem}
 .chapter .skip-experience{bottom:85px}
}
@media(prefers-reduced-motion:reduce){.door-webgl-host,.fullscreen-gallery,.skip-experience{display:none!important}}

/* Definitive fix: the legacy CSS door is never rendered, even between scenes.
   This rule also protects cached/older HTML if it still contains the obsolete markup. */
.chapter .door-dolly,.chapter .door-shadows,.chapter .door-floor{display:none!important;visibility:hidden!important}
.chapter:not(.three-active) .door-webgl-host{opacity:0!important;visibility:hidden!important}
.chapter.three-active .door-webgl-host{visibility:visible}
.chapter.three-error .fullscreen-gallery{opacity:1!important;pointer-events:auto!important}
.chapter.three-error .fullscreen-gallery .photo-zoom{pointer-events:auto!important}
.chapter.three-error .door-webgl-host{display:none!important}
.sound-toggle[hidden]{display:none!important}
@media (hover:none),(pointer:coarse){.sound-toggle{display:none!important}}

/* v5: the gallery fills the sticky VIEWPORT instead of a small door-stage box.
   No standalone rectangular photo exists in the 3D doorway anymore. */
.chapter-sticky{isolation:isolate}
.chapter-sticky>.fullscreen-gallery{position:absolute;inset:0;width:100%;height:100%;z-index:4;
 overflow:hidden;transform:translateZ(0);background:#17252a;}
.chapter-sticky>.fullscreen-gallery .photo-zoom{inset:0!important;width:100%!important;height:100%!important;}
.chapter-sticky>.fullscreen-gallery .photos-layer{position:absolute;inset:0;}
.chapter-sticky>.fullscreen-gallery .scene-photo{object-fit:cover;object-position:center center;}
/* Keep floating labels visible above the full-viewport gallery. */
.chapter-sticky>.chapter-gallery-hud{z-index:10!important}
@media(max-width:800px){
 .chapter-sticky>.fullscreen-gallery .photo-zoom{inset:0!important;height:100%!important}
 /* Use the entire mobile viewport: do not introduce a fake empty photo footer. */
 .chapter.is-entered .chapter-sticky:after{display:none!important}
 .chapter-sticky>.fullscreen-gallery .scene-photo{object-position:50% 50%}
}
