/* A separate screen-sized vector room preserves sharp edges during entry. */
body.temple-interior-view .world{transform:translate(var(--temple-entry-x),var(--temple-entry-y)) scale(var(--temple-entry-scale))}
.temple-interior{position:fixed;inset:0;z-index:6;overflow:hidden;pointer-events:none;background:#171b1a;opacity:0;transition:opacity 560ms ease;isolation:isolate;contain:paint}
.temple-interior[hidden]{display:none!important}
.temple-interior.is-visible{opacity:1;transition-delay:200ms}
.temple-interior-art,.temple-interior-art>svg{display:block;width:100%;height:100%;overflow:hidden}
body.temple-interior-view .temple-return{color:#f2e8cf;text-shadow:0 2px 5px #111a18}
.temple-enter{position:fixed;z-index:11;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:4px;border:0;color:#f2e8cf;background:transparent;cursor:pointer;touch-action:manipulation;text-shadow:0 1px 5px #101715;font-size:13px;white-space:nowrap}
.temple-enter[hidden]{display:none!important}
.temple-enter>span:first-child{font-size:25px;line-height:1}
.temple-enter:focus-visible{outline:1px solid #e4d5b0;outline-offset:4px}
.temple-enter:hover{background:#d8c79218}
.temple-enter[aria-busy=true]{cursor:progress}
.temple-door-toggle[aria-expanded=true] .temple-door-label{top:50%;transform:translate(-50%,-50%);opacity:1;font-size:13px}
@media(max-width:760px){.temple-enter{font-size:12px;gap:1px}.temple-enter>span:first-child{font-size:19px}}
@media(prefers-reduced-motion:reduce){html:not([data-motion="full"]) .temple-interior{transition:none}}

/* Front hall -> side wall -> the plaque itself. All artwork keeps its aspect ratio. */
.temple-interior-art{position:absolute;inset:0;background:#15271f}
.temple-interior-art>svg{position:absolute;inset:0}
.temple-gallery-intro{position:absolute;top:max(126px,17vh);left:50%;transform:translateX(-50%);text-align:center;color:#eee4cb;text-shadow:0 2px 6px #15271f;pointer-events:none}
.temple-gallery-intro p{margin:0 0 8px;font:24px Georgia,serif;letter-spacing:.025em}
.temple-gallery-intro span{font-size:13px;color:#c5bda8}
[data-gallery-view=hall] .temple-gallery-intro,.is-inspecting .temple-gallery-intro{display:none}
.temple-gallery-wings{position:absolute;inset:0;pointer-events:none;opacity:0;visibility:hidden}
.is-ready .temple-gallery-wings{opacity:1;visibility:visible}
.temple-gallery-wings button{position:absolute;top:64%;display:flex;flex-direction:column;gap:6px;align-items:center;padding:12px 18px;min-height:62px;border:1px solid #b6a47570;background:#16261fe6;color:#f0e6cd;cursor:pointer;pointer-events:auto;transition:background 150ms}
.temple-gallery-wings button:hover{background:#29392a}
.temple-gallery-wings button[data-gallery-side=left]{left:9%}
.temple-gallery-wings button[data-gallery-side=right]{right:9%}
.temple-gallery-wings span{font-size:15px}.temple-gallery-wings small{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#bfb188}
.temple-exhibit-hotspots{position:absolute;inset:0;pointer-events:none;opacity:0;visibility:hidden;transition:opacity 180ms}
.is-ready:not(.is-inspecting) .temple-exhibit-hotspots{opacity:1;visibility:visible}
.temple-exhibit-hotspot{position:absolute;border:0;background:transparent;color:#324035;cursor:pointer;pointer-events:auto;padding:0}
.temple-exhibit-hotspot>span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:4%;font-family:Georgia,serif;letter-spacing:.08em;text-align:center;line-height:1.45}
.temple-exhibit-hotspot:hover>span{background:#ead79720;color:#18281f}
.temple-gallery-wings[hidden],.temple-exhibit-hotspot[hidden],.temple-exhibit-panel[hidden],.temple-gallery-back[hidden]{display:none!important}
.temple-exhibit-panel{position:absolute;margin:0;box-sizing:border-box;padding:clamp(12px,2vw,28px);border:3px solid #78603a;background:#c2ae7d;color:#20362b;box-shadow:inset 0 0 0 3px #e0cb95,inset 0 0 0 6px #877044;opacity:0;pointer-events:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#78643e #c2ae7d;scrollbar-width:thin;outline:none;transition:opacity 160ms}
.plaque-arrived .temple-exhibit-panel{opacity:1;pointer-events:auto}
.temple-exhibit-panel h2{font:clamp(23px,2.4vw,35px)/1.1 Georgia,serif;letter-spacing:-.025em;margin:0}
.temple-exhibit-panel p{font-size:15px;line-height:1.6;margin:0 0 14px}
.temple-exhibit-kicker{font-size:11px!important;letter-spacing:.06em;text-transform:uppercase;margin-bottom:9px!important;color:#4d5038}
.temple-exhibit-korean{font-size:13px!important;letter-spacing:.06em;margin:8px 0 18px!important;color:#47513c}
.temple-exhibit-detail{color:#344932}
.temple-exhibit-panel a{display:inline-block;min-height:30px;font-size:12px;color:#304936;text-underline-offset:4px;padding:4px 0}
.temple-exhibit-paging{position:sticky;bottom:-28px;display:flex;justify-content:space-between;align-items:center;margin-top:10px;border-top:1px solid #76684080;background:#c2ae7d;color:#384932}
.temple-exhibit-paging button{width:44px;min-height:44px;border:0;background:transparent;font-size:24px;color:#233b2c;cursor:pointer}
.temple-exhibit-paging span{font-size:11px;letter-spacing:.12em}
.temple-gallery-back,body.temple-interior-view .temple-return{position:absolute;top:auto;bottom:max(20px,env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:52px;max-width:calc(100% - 32px);padding:6px 16px;border:0;background:transparent;color:#eee4cb;font-size:14px;line-height:1.3;text-align:center;text-shadow:0 2px 5px #111a18;cursor:pointer;pointer-events:auto;white-space:nowrap}
body.temple-interior-view .temple-return{position:fixed}
.temple-gallery-back::after{content:'↓';font-size:22px;line-height:1}
body.temple-interior-view .temple-return>[aria-hidden]{order:1;font-size:22px;line-height:1}
.temple-gallery-back:hover,body.temple-interior-view .temple-return:hover{color:#fff6df}
body.temple-interior-view .temple-interior:not([data-gallery-view=hall])~.temple-return{display:none}
.temple-gallery-note{position:absolute;top:max(96px,12vh);left:50%;transform:translateX(-50%);margin:0;text-align:center;font-size:10px;color:#bfb499;text-shadow:0 2px 4px #15271f;white-space:nowrap;pointer-events:none}
.is-inspecting .temple-gallery-note{display:none}
.is-inspecting .temple-gallery-back{top:max(100px,14vh);bottom:auto;left:4vw;transform:none;flex-direction:row;min-height:44px;font-size:13px}
.is-inspecting .temple-gallery-back::after{content:'←';order:-1;font-size:18px}
.temple-gallery-wings button:focus-visible,.temple-exhibit-hotspot:focus-visible,.temple-gallery-back:focus-visible,.temple-exhibit-paging button:focus-visible{outline:2px solid #ecda9f;outline-offset:4px}
@media(max-width:760px),(max-aspect-ratio:4/3){
 .temple-gallery-wings button[data-gallery-side=left]{left:5%}.temple-gallery-wings button[data-gallery-side=right]{right:5%}
 .temple-gallery-wings button{top:58%;padding:10px;max-width:44%}.temple-gallery-wings span{font-size:14px}.temple-gallery-wings small{font-size:10px}
 .temple-gallery-intro{top:calc(158px + env(safe-area-inset-top,0px));width:calc(100% - 36px)}.temple-gallery-intro p{font-size:21px}.temple-gallery-intro span{font-size:12px}
 .is-inspecting .temple-gallery-back{top:calc(114px + env(safe-area-inset-top,0px));left:20px}
 .temple-exhibit-hotspot{font-size:11px;padding:3px}
 .temple-exhibit-panel{padding:15px}.temple-exhibit-panel h2{font-size:24px}.temple-exhibit-panel p{font-size:13px;line-height:1.55}.temple-exhibit-kicker{font-size:10px!important}
 .temple-exhibit-korean{margin-bottom:12px!important}.temple-exhibit-paging{bottom:-15px}
 .temple-gallery-note{top:calc(116px + env(safe-area-inset-top,0px));width:calc(100% - 40px);white-space:normal;font-size:9px}
}
@media(max-width:1100px){.temple-gallery-back,body.temple-interior-view .temple-return{bottom:calc(82px + env(safe-area-inset-bottom,0px));font-size:13px}.temple-interior.is-inspecting .temple-gallery-back{bottom:auto}}
@media(max-height:580px) and (min-aspect-ratio:4/3){
 body.temple-interior-view .site-header{visibility:hidden;pointer-events:none}
 .temple-gallery-intro{top:34px}.temple-gallery-intro p{font-size:18px}.temple-gallery-intro span{display:none}
 .temple-gallery-note{top:12px;font-size:9px}
 .is-inspecting .temple-gallery-back{top:12px;left:20px}
 .temple-exhibit-panel{padding:12px}.temple-exhibit-panel h2{font-size:23px}.temple-exhibit-panel p{font-size:13px}.temple-exhibit-paging{bottom:-12px}
}
@media(max-width:760px){
 .temple-exhibit-kicker{display:none}
 .temple-exhibit-panel h2{font-size:22px}
 .temple-exhibit-korean{margin:4px 0 9px!important}
 .temple-exhibit-paging{position:static}
}
