/* A single camera, at the exact aspect ratio of the approved original plate. */
.immersive-world{grid-template-rows:var(--header) var(--scene-height) var(--ledge);--header:112px;--ledge:52px;--scene-height:calc(100svh - 164px);--stage-width:calc(var(--scene-height)*1670/942);--scene-width:min(100vw,var(--stage-width))}
.town-surround{width:var(--scene-width);height:var(--scene-height);border:0;outline:1px solid #986b443d;outline-offset:-1px}
.immersive-stage{width:var(--stage-width);height:var(--scene-height);min-width:0;aspect-ratio:1670/942}
.world-poster{object-fit:contain;transform:none;max-width:none}
.town-pan{align-items:flex-start}.town-welcome{height:100%;padding:0;align-items:center}.welcome-plaque{width:min(350px,calc(100vw - 92px));max-height:100%;aspect-ratio:3}.welcome-lettering h1{font-size:34px}.welcome-lettering p{font-size:10px}.welcome-lettering>span{font-size:11px}
.town-ledge{height:var(--ledge);width:var(--scene-width);padding:0 62px;align-items:center;box-sizing:border-box}
.town-navigation{position:absolute;inset:4px 46px auto;display:flex;justify-content:center;gap:4px;height:32px}
.town-navigation[hidden]{display:none}.town-navigation button{color:#ccb18a;background:none;border:0;border-radius:3px;padding:5px 12px;font:12px Georgia;letter-spacing:.015em;min-height:32px;cursor:pointer;text-shadow:0 -1px #28190e}
.town-navigation button[aria-current=true]{color:#ffe9b6;background:#21140d36;box-shadow:inset 0 1px 2px #140c0b45,0 1px #c8a36a16}
.can-pan .town-ticket,.can-pan .ledge-replay,.can-pan .social-badge{margin-top:32px}
.town-ticket{min-width:146px}.social-badge .prop-art{display:none}.social-badge{border:1px solid #b28d5655;border-radius:50%;width:32px;height:32px;background:radial-gradient(circle at 32% 23%,#795334,#37251b);box-shadow:inset 0 1px #edc28722}.social-badge svg{width:14px}.ledge-replay{left:16px}.social-badge{right:16px}
.scene-tools{top:max(20px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));bottom:auto}.scene-tools button{width:auto;min-width:36px;height:36px}.scene-sound>span{font-size:11px}
.resident-hit,.prop-hit{outline:none}.resident-hit:focus-visible,.prop-hit:focus-visible{outline:2px solid #f5ddb1;outline-offset:2px}.prop-rope,.prop-gift{z-index:7;min-width:24px;min-height:44px}.evidence-hit{z-index:7;min-width:24px;min-height:24px}.evidence-hit[hidden]{display:none}
.discovery-layers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;overflow:hidden}
.secret-ink{opacity:0;transition:opacity .9s;filter:drop-shadow(0 0 1.8px #b1e5a5)}.object-light .secret-ink{opacity:.94}
.story-arrow,.story-flyer{opacity:0;transition:opacity .6s}.has-wrong-turn .story-arrow,.has-no-takers .story-flyer{opacity:1}
.vanity-award{opacity:0;transition:opacity .2s .55s}.award-sheet{transform:scaleY(0);transform-origin:936px 36px;transition:transform .7s cubic-bezier(.22,.7,.2,1)}.portrait-revealed .vanity-award{opacity:1;transition-delay:0s}.portrait-revealed .award-sheet{transform:scaleY(1)}
.parcel-surprise{opacity:0;transition:opacity .15s}.gift-opening .parcel-surprise{opacity:1}.parcel-plush{transform:translateY(30px);transition:transform .8s .15s cubic-bezier(.2,.75,.2,1)}.parcel-lid{transform-origin:743px 328px;transition:transform .65s cubic-bezier(.2,.75,.2,1)}.gift-opening .parcel-plush{transform:translateY(0)}.gift-opening .parcel-lid{transform:translate(-4px,-6px) rotate(-37deg)}
.object-light .story-flyer,.object-light .story-arrow,.object-light .vanity-award,.object-light .parcel-surprise{filter:brightness(.5)}
/* The full landscape film remains visible on every screen. */
dialog{box-sizing:border-box}dialog[data-panel=cinema]{width:min(1080px,96vw);max-height:96svh}.chapter-cinema{padding:28px 24px 22px}.cinema-heading{padding:0 40px;margin-bottom:16px}.chapter-cinema .cinema-heading h2{font-size:clamp(27px,3.4vw,40px)}.cinema-mark{margin-bottom:7px}.chapter-cinema .chapter-number{font-size:12px}.cinema-screen-frame{max-width:calc(62svh * 16 / 9);padding:5px}.cinema-screen{aspect-ratio:16/9;position:relative}.chapter-film{object-fit:contain!important;width:100%;height:100%}.cinema-footlight{margin:12px auto}.chapter-tickets{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.chapter-ticket{min-height:58px;padding:9px 12px}.chapter-ticket h3{font-size:12px}.chapter-ticket p{font-size:10px}
.film-recovery{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#251b17cf;backdrop-filter:blur(3px);color:#f2e1be;text-align:center;padding:20px}.film-recovery[hidden]{display:none}.film-recovery p{color:inherit;font:16px Georgia}.film-recovery button{border:1px solid #bf9c65;background:#64442c;color:#f8e9c9;padding:11px 22px;border-radius:4px;cursor:pointer}
/* Gallery and viewer now depict the same meshes. */
dialog[data-panel=shop]{width:min(1040px,94vw)}.product-card{display:block!important;background:transparent;border:0;width:100%;color:#352736}.product-card .product-photo{aspect-ratio:1;border-radius:48% 48% 10px 10px;background:#efe5d4}.product-card .product-photo img{object-fit:cover;height:100%;width:100%;transform:none!important}.product-card h3{font-size:18px!important}.product-card:focus-visible{outline:2px solid #986847;outline-offset:5px;border-radius:5px}.product-grid{align-items:start}.back-to-shop{position:absolute;top:22px;left:24px;background:none;border:0;color:#80654d;font:13px Georgia;padding:8px;cursor:pointer}.plush-inspector{position:relative;padding-top:62px}.plush-inspector h2:focus,#dialog-title:focus{outline:none}.plush-stage{background:radial-gradient(ellipse at 50% 42%,#fff4e3,#f0e5d4 80%);border-radius:18px}.viewer-failure{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.viewer-failure[hidden]{display:none}.viewer-failure img{width:100%;height:calc(100% - 48px);object-fit:contain;border-radius:18px}.viewer-failure button{border:1px solid #9c7b4f;background:#faf0df;color:#644b35;font:14px Georgia;border-radius:30px;padding:10px 20px;cursor:pointer}.viewer-snapshot{object-fit:contain;background:#f5ebde}.viewer-status{color:#76604d;font-size:12px;line-height:1.4}.viewer-controls button:focus-visible,.back-to-shop:focus-visible,.snapshot-actions button:focus-visible,.viewer-failure button:focus-visible{outline:2px solid #9c7b4f;outline-offset:3px}
@media(max-width:760px){.welcome-lettering h1{font-size:28px}.welcome-lettering p{font-size:9px}.welcome-lettering>span{font-size:10px}.scene-tools{top:17px;right:8px}.scene-tools button{min-width:34px;width:34px;height:34px;padding:7px}.scene-sound>span{display:none}.town-ledge{padding:0 52px}.town-navigation{inset:5px 16px auto}.town-navigation button{min-height:34px;padding:5px 16px}.town-ticket{min-width:138px}.physical-shop b{font-size:clamp(13px,1.3cqw,20px)}
 dialog[data-panel=cinema]{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:100svh;border-radius:14px!important}.chapter-cinema{padding:36px 8px 15px}.chapter-cinema:before{inset:4px}.cinema-heading{padding:0 35px;margin-bottom:12px}.cinema-mark{display:none}.chapter-cinema .cinema-heading h2{font-size:28px}.chapter-cinema .chapter-number{margin-bottom:3px;font-size:11px}.cinema-screen-frame{padding:3px;border-radius:6px}.cinema-screen{border-radius:3px}.cinema-footlight{margin:9px auto}.chapter-tickets{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 5px!important}.chapter-ticket{min-height:57px;padding:8px 12px;gap:10px}.chapter-ticket h3{font-size:13px}.ticket-number{font-size:24px}.ticket-perforation{left:39px}.plush-inspector{padding-top:58px}.back-to-shop{top:17px;left:13px}.viewer-controls{flex-wrap:wrap}.product-card h3{font-size:16px!important}
}
@media(max-height:580px){.welcome-plaque{width:222px}.welcome-lettering h1{font-size:23px;margin-bottom:2px}.welcome-lettering>span{font-size:9px}.welcome-lettering p{font-size:8px}.scene-tools{top:12px}.chapter-cinema{padding-top:20px}.cinema-heading{margin-bottom:10px}.chapter-cinema .cinema-heading h2{font-size:26px}.cinema-mark{display:none}.cinema-screen-frame{max-width:calc(66svh * 16 / 9)}.chapter-tickets{display:flex;overflow:auto;padding-bottom:8px!important}.chapter-tickets>li{min-width:170px}.plush-stage{height:60svh;min-height:190px}}
@media(prefers-reduced-motion:reduce){.discovery-layers *{transition:none!important;animation:none!important}}
.reduced .discovery-layers *{transition:none!important;animation:none!important}
/* Insets are measured by townLayout, so the scene keeps its exact proportions. */
.town-welcome{box-sizing:border-box;padding-top:env(safe-area-inset-top,0px)}
.town-ledge{padding-bottom:env(safe-area-inset-bottom,0px)}
.scene-tools{top:calc(env(safe-area-inset-top,0px) + 14px);right:max(8px,env(safe-area-inset-right,0px))}
.town-ledge .ledge-replay{left:max(16px,env(safe-area-inset-left,0px))}
.town-ledge .social-badge{right:max(16px,env(safe-area-inset-right,0px))}
.town-ledge .town-ticket{min-width:162px;height:32px;padding:0 24px;border:1px solid #b48b54;border-radius:3px;background:linear-gradient(#a27745,#604024 12%,#69432b 78%,#39251b);box-shadow:inset 0 1px 1px #e2ba7f77,inset 0 -2px 0 #2f1b17,0 2px 3px #1c100d66}
.town-ledge .town-ticket span{font:600 11px Georgia;color:#f0d8a7;letter-spacing:.07em;text-shadow:0 1px 2px #2e190d}
.town-ledge .town-ticket:before,.town-ledge .town-ticket:after{width:3px;height:3px;border:0;background:#d1ac70;box-shadow:0 1px 1px #28190e}

/* A clothbound welcome book rests on the existing timber ledge. */
.ledge-book{position:absolute;left:max(13px,env(safe-area-inset-left,0px));width:88px;height:33px;padding:0 3px 3px 8px;border:1px solid #9d6664;border-radius:2px 4px 4px 2px;background:repeating-linear-gradient(0deg,#fff2 0 .3px,transparent .3px 3px),linear-gradient(90deg,#452631 5px,#915b61 7px,#633a47 10px,#603744);box-shadow:0 2px 0 #c3b093,0 3px 0 #7a5e48,0 5px 5px #25170d99,inset 0 0 0 3px #643c47;transform:rotate(-2deg);cursor:pointer;color:#edd39e}
.ledge-book:before{content:'';position:absolute;inset:4px 4px 7px 11px;border:1px solid #c2a06c88;border-radius:1px;pointer-events:none}
.ledge-book span{position:relative;font:italic 12px Georgia;text-shadow:0 1px #39202b}
.ledge-book:hover{filter:brightness(1.1)}
.can-pan .ledge-book{margin-top:32px}
@media(max-width:360px){.ledge-book{width:72px;left:9px}.ledge-book span{font-size:11px}.town-ledge .town-ticket{min-width:132px;padding:0 12px}.town-ledge .town-ticket span{font-size:10px}}

/* The miniature itself holds the destinations; no separate control strip. */
.town-ledge{position:absolute;left:50%;bottom:0;transform:translateX(-50%);height:0!important;padding:0 0 env(safe-area-inset-bottom,0px);border:0;background:none;box-shadow:none;display:block;pointer-events:none}
.town-navigation{inset:auto 64px 8px;z-index:9;pointer-events:auto;max-width:300px;margin:auto;border-radius:4px;background:#352219d9;box-shadow:0 1px 4px #160d0a66;border:1px solid #bd93574d}
.town-surround{position:relative}
.town-surround>.social-badge{position:absolute;z-index:9;right:14px;bottom:14px;margin:0;width:34px;height:34px;background:radial-gradient(circle at 32% 23%,#a17b48,#44301c);border:1px solid #d2ab6a99;box-shadow:inset 0 1px #edc28766,0 2px 4px #1b100a88}
.immersive-stage>.town-sign{position:absolute;z-index:6;display:block;left:var(--sign-x);top:var(--sign-y);right:auto;bottom:auto;width:var(--sign-w);height:4.8%;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;transform:translate(-50%,-50%);cursor:pointer;touch-action:pan-x;filter:none}
.immersive-stage>.town-sign:before,.immersive-stage>.town-sign:after{display:none}
.immersive-stage>.town-sign .physical-shop{position:absolute;inset:auto;left:50%;top:50%;width:100%;height:80%;min-height:0;display:grid;place-items:center;border-radius:3px;transform:translate(-50%,-50%) rotate(var(--sign-tilt,-1deg));background:linear-gradient(#a27745,#604024 12%,#69432b 78%,#39251b);box-shadow:inset 0 1px 1px #e2ba7f77,inset 0 -2px 0 #2f1b17;filter:drop-shadow(1px 3px 1px #29180bc0)}
.immersive-stage>.town-sign .physical-shop b{font:600 clamp(11px,1.2cqw,20px) Georgia;letter-spacing:.04em;color:#f0d8a7;text-shadow:0 1px 2px #2e190d}
.immersive-stage>.town-sign:hover .physical-shop{filter:drop-shadow(1px 3px 1px #29180bc0) brightness(1.12)}
.immersive-stage>.town-sign:focus-visible{outline:2px solid #f4d390;outline-offset:3px}
.story-sign{--sign-x:57.5%;--sign-y:65.5%;--sign-w:8.8%;--sign-tilt:-2deg}
.play-sign{--sign-x:50%;--sign-y:14%;--sign-w:8%;--sign-tilt:-1deg}
.token-sign{--sign-x:94.5%;--sign-y:72%;--sign-w:10%;--sign-tilt:-1deg}
.immersive-stage>.token-sign[aria-disabled=true]{cursor:default}
@media(max-width:760px){.town-navigation{inset:auto 56px 6px}.town-surround>.social-badge{right:9px;bottom:8px;width:32px;height:32px}.immersive-stage>.town-sign .physical-shop b{font-size:clamp(12px,1.2cqw,20px)}}
/* Static dimming avoids a live backdrop-filter surface behind decoded video. */
dialog::backdrop{background:#21151bb3;backdrop-filter:none;-webkit-backdrop-filter:none}
body:has(dialog[open]) .immersive-world *{animation-play-state:paused!important}
dialog[data-panel=cinema][open]{animation:cinema-panel-in .22s ease-out}
@keyframes cinema-panel-in{from{opacity:0}to{opacity:1}}

/* The welcome plaque belongs to the town; sound and motion stay at the viewport edge. */
.immersive-world{display:block;--header:0px;--scene-height:100svh;--stage-width:calc(100svh*1670/942)}
.town-surround{margin:0 auto}
.immersive-stage>.town-welcome{position:absolute;inset:0 0 auto;height:auto;z-index:8;padding:calc(env(safe-area-inset-top,0px) + 3px) 0 0;pointer-events:none}
.town-welcome .welcome-plaque{width:min(320px,calc(100vw - 100px));height:auto;max-height:none}
.town-welcome .welcome-lettering h1{font-size:31px}.town-welcome .welcome-lettering>span{font-size:10px}.town-welcome .welcome-lettering p{font-size:9px}
.town-surround>.scene-tools{position:absolute;inset:calc(env(safe-area-inset-top,0px) + 12px) 12px auto auto;display:flex;flex-direction:row;gap:6px;z-index:10}
.immersive-stage>.play-sign{top:calc(env(safe-area-inset-top,0px) + 135px)}
.town-navigation{bottom:54px;width:270px;left:0;right:0}
@media(max-width:760px){
 .town-welcome .welcome-plaque{width:min(270px,calc(100vw - 100px))}
 .town-welcome .welcome-lettering h1{font-size:26px}.town-welcome .welcome-lettering>span{font-size:9px}.town-welcome .welcome-lettering p{font-size:8px}
 .town-surround>.scene-tools{top:calc(env(safe-area-inset-top,0px) + 9px);right:8px;left:auto;flex-direction:column}
 .immersive-stage>.play-sign{top:calc(env(safe-area-inset-top,0px) + 113px)}
 .town-navigation{bottom:calc(env(safe-area-inset-bottom,0px) + 51px);width:258px;max-width:calc(100vw - 48px)}
}
@media(max-height:580px){.town-welcome .welcome-plaque{width:220px}.town-welcome .welcome-lettering h1{font-size:23px}.town-welcome .welcome-lettering>span{font-size:8px}.town-welcome .welcome-lettering p{font-size:7px}.immersive-stage>.play-sign{top:calc(env(safe-area-inset-top,0px) + 92px)}}

/* The fair's little tab hangs from the welcome plaque and pans with the same town. */
.town-welcome .play-sign{position:absolute;left:50%;top:calc(100% + 7px);width:108px;height:33px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;transform:translateX(-50%);pointer-events:auto;cursor:pointer;z-index:9}
.town-welcome .play-sign .physical-shop{position:absolute;left:0;top:0;transform:none;width:100%;height:100%;min-height:0;display:grid;place-items:center;border-radius:3px;background:linear-gradient(#a27745,#604024 12%,#69432b 78%,#39251b);box-shadow:inset 0 1px 1px #e2ba7f77,inset 0 -2px 0 #2f1b17;filter:drop-shadow(0 2px 2px #29180bc0)}
.town-welcome .play-sign b{font:600 17px Georgia;color:#f0d8a7;letter-spacing:.04em;text-shadow:0 1px 2px #2e190d}
.town-welcome .play-sign:before,.town-welcome .play-sign:after{content:'';position:absolute;top:-12px;height:13px;width:3px;left:17px;background:repeating-linear-gradient(#d6ad6b 0 3px,#795327 3px 5px);box-shadow:1px 0 1px #24150e;z-index:1}
.town-welcome .play-sign:after{left:auto;right:17px}.town-welcome .play-sign:hover .physical-shop{filter:brightness(1.12)}
.town-welcome .play-sign:focus-visible{outline:2px solid #f4d390;outline-offset:3px}
@media(max-width:760px){.town-welcome .play-sign{width:96px;height:30px}.town-welcome .play-sign b{font-size:16px}}
@media(max-height:580px){.town-welcome .play-sign{width:86px;height:26px;top:calc(100% + 4px)}.town-welcome .play-sign b{font-size:14px}}

.scene-tools .scene-sound{width:36px;min-width:36px;height:36px;padding:8px}.scene-sound>span.sr-only{display:block}
@media(max-width:760px){.scene-tools .scene-sound{width:34px;min-width:34px;height:34px}}

.immersive-stage>.story-sign:after{display:block;content:'';position:absolute;left:48%;top:70%;width:6px;height:36px;z-index:-1;background:linear-gradient(90deg,#5d3d24,#ac794a 45%,#68452a);box-shadow:2px 2px 3px #2f201b44}.immersive-stage>.story-sign .physical-shop b{font-size:clamp(12px,1.1cqw,18px)}

/* Background is scenery; only real controls advertise a click. */
.town-pan,.town-pan:active,.immersive-stage{cursor:default}.town-pan.is-dragging,.town-pan.is-dragging *{cursor:grabbing!important}

.masterplan-panel{position:relative;overflow:hidden}.plan-fold{position:absolute;bottom:0;right:0;width:68px;height:68px;background:linear-gradient(135deg,transparent 49%,#9d754a55 50%,#ecd7b2 54%,#fff0d0);border:0;cursor:pointer;filter:drop-shadow(-3px -3px 3px #46301c33);z-index:4}.plan-fold:focus-visible{outline:2px solid #795640;outline-offset:-5px}.plan-fold[aria-expanded=true]{background:linear-gradient(135deg,transparent 49%,#a48b66 50%,#d2b58a 55%,#efe1c3)}
.plan-certificate{position:absolute;inset:20% 10% 8%;padding:36px;text-align:center;color:#5b422f;background:repeating-linear-gradient(0deg,#a97d4207 0 1px,transparent 1px 4px),#f3e6c9;border:1px solid #ba9665;box-shadow:0 14px 30px #3f241c44,inset 0 0 0 8px #e3d0aa,inset 0 0 0 9px #bca078;transform:rotate(-3deg);z-index:3;animation:plan-certificate-unfold .65s cubic-bezier(.2,.7,.2,1)}.plan-certificate[hidden]{display:none}.plan-certificate small{font:9px Georgia;letter-spacing:.2em}.plan-certificate h3{font:32px/1.1 Georgia;margin:20px 0}.plan-certificate p{font:16px/1.8 Georgia}.certificate-seal{display:block;width:42px;height:42px;margin:0 auto 20px;border:3px double #a75d49;border-radius:50%;font:italic 26px/36px Georgia;color:#a75d49}.certificate-signature{font:italic 28px Georgia;border-bottom:1px solid #9c8263}.plan-certificate-unfold{opacity:1}@keyframes plan-certificate-unfold{from{transform:translateY(60px) rotate(5deg);opacity:0}to{transform:translateY(0) rotate(-3deg);opacity:1}}
@media(max-width:500px){.plan-certificate{inset:18% 5% 8%;padding:24px}.plan-certificate h3{font-size:27px}}
@media(prefers-reduced-motion:reduce){.plan-certificate{animation:none}}

/* Mobile explores the same set with two brass arrows; destinations stay in the scene. */
.town-waypoints{display:flex;align-items:center;justify-content:center;gap:4px;width:100%;height:100%}
.town-pan-arrows{display:none}
@media(max-width:760px),(hover:none) and (pointer:coarse){
 .town-navigation{inset:auto auto calc(env(safe-area-inset-bottom,0px) + 12px) 50%;width:auto;height:46px;max-width:none;margin:0;padding:0;transform:translateX(-50%);border:0;border-radius:0;background:none;box-shadow:none;pointer-events:none}
 .town-navigation[hidden]{display:none}
 .town-navigation .town-waypoints{display:none}
 .town-pan-arrows{display:flex;align-items:center;gap:12px;height:46px}
 .town-navigation .town-pan-arrow{display:grid;place-items:center;box-sizing:border-box;width:46px;height:46px;min-width:46px;min-height:46px;padding:10px;border:1px solid #bf9b64;border-radius:50%;color:#f1d8ad;background:radial-gradient(circle at 35% 24%,#825936,#4b3020 72%,#342219);box-shadow:inset 0 1px 1px #f8dda54d,inset 0 -2px 2px #26160e70,0 2px 5px #20130d66;pointer-events:auto;touch-action:manipulation;transition:opacity .18s,box-shadow .18s}
 .town-pan-arrow svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
 .town-navigation .town-pan-arrow:active:not(:disabled){box-shadow:inset 0 2px 4px #24150cb3,0 1px 2px #20130d55}
 .town-navigation .town-pan-arrow:disabled{opacity:.35;cursor:default}
 .town-navigation .town-pan-arrow:focus-visible{outline:2px solid #ffe5ae;outline-offset:4px}
}
.reduced .town-pan-arrow{transition:none}
@media(prefers-reduced-motion:reduce){.town-pan-arrow{transition:none}}
