/* A grounded walk through a timber hall, into warm, quiet temple light. */
.journey-aura{position:absolute;inset:0;pointer-events:none;opacity:0;animation:templeRoomPresence 4.3s ease forwards}
.aura-ride-host,.aura-ride-canvas,.aura-fallback{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.aura-ride-host{z-index:1}
.aura-ride-host.has-aura-ride+.aura-fallback{display:none}
.aura-fallback{overflow:hidden;background:#19100c;perspective:760px}
.temple-room-depth{position:absolute;inset:0;transform-style:preserve-3d;animation:templeRoomApproach 8.4s ease-in-out both}
.temple-room-wall{position:absolute;inset:8% 8% 30%;background:linear-gradient(90deg,#2f1d12,#49321c 22%,#261b13 42% 58%,#49321c 78%,#2f1d12);border-top:22px solid #482018;box-shadow:inset 0 10px 0 #c09b532e}
.temple-room-floor{position:absolute;left:-70%;right:-70%;top:56%;height:130%;transform:rotateX(68deg);transform-origin:50% 0;background:repeating-linear-gradient(0deg,transparent 0 88px,#96774c55 89px 91px),repeating-linear-gradient(90deg,#40372e 0 108px,#74604c 109px 111px);box-shadow:inset 0 80px 100px #160f0bb0}
.temple-room-ceiling{position:absolute;inset:-25% -40% 78%;background:repeating-linear-gradient(0deg,#21100b 0 40px,#583224 42px 58px);transform:rotateX(-46deg);border-bottom:14px solid #693727}
.temple-room-bay{position:absolute;left:calc(3% + var(--depth)*9%);right:calc(3% + var(--depth)*9%);top:calc(3% + var(--depth)*8%);bottom:calc(-12% + var(--depth)*13%)}
.temple-room-bay i{position:absolute;top:0;bottom:0;width:clamp(19px,4vw,62px);background:linear-gradient(90deg,#391a12,#7b3525 35%,#9b5134 47%,#5b281c 72%,#2c130f);border-top:7px solid #af8750;border-bottom:12px solid #5f5240;box-shadow:8px 2px 18px #0007}
.temple-room-bay i:first-child{left:0}.temple-room-bay i:nth-child(2){right:0}
.temple-room-bay b{position:absolute;left:0;right:0;top:0;height:clamp(16px,3vw,40px);background:linear-gradient(#795035,#3a1b12);border-bottom:3px solid #ba935147}
.temple-room-light{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 25%,#f4d5958c,transparent 24%),conic-gradient(from 156deg at 50% 9%,transparent,#e6bb5c1f 10deg,transparent 23deg,#e6bb5c12 34deg,transparent 48deg);filter:blur(8px)}
.journey-aura-wash{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 34%,#efcf8b2e,transparent 64%);opacity:0;animation:templeWarmth 10.8s ease both}
@keyframes templeRoomPresence{0%,49%{opacity:0}100%{opacity:1}}
@keyframes templeRoomApproach{0%,27%{transform:scale(1)}88%,100%{transform:scale(1.42)}}
@keyframes templeWarmth{0%,36%{opacity:0}62%,77%{opacity:.8}100%{opacity:.15}}
.journey-copy{animation-duration:4.3s}
/* The welcome view and entrance share one live 3D scene. */
.temple-preview{position:absolute;inset:0;border-radius:12px;overflow:hidden;pointer-events:none}
.temple-preview:not(.has-aura-ride){visibility:hidden}
html.temple-loading .temple-art{visibility:hidden}
.altar-scene.has-live-temple .temple-preview{animation:templeWelcomeReveal .65s ease both}
@keyframes templeWelcomeReveal{from{opacity:0}to{opacity:1}}
.temple-preview.has-aura-ride~.temple-art{visibility:hidden}
/* Moving the live canvas into the entrance must not uncover the backup SVG
   while the welcome screen fades behind it. Keep the fallback for non-3D use. */
.temple-entering .altar-scene.has-live-temple .temple-art{visibility:hidden}
.altar-scene.has-live-temple{transform:none!important}
#templeJourney.journey-3d .journey-gate{display:none}
#templeJourney.journey-3d .journey-aura{opacity:1;animation:none}
#templeJourney.journey-3d .journey-aura::after{content:'';position:absolute;inset:0;z-index:2;background:radial-gradient(ellipse at 50% 48%,transparent 46%,#100a0538 100%),linear-gradient(#100a0526,transparent 18% 78%,#100a0542);pointer-events:none}
#templeJourney.journey-3d .journey-copy{z-index:3;bottom:7%;animation:templeDepthWords 4.6s 7s ease both;text-shadow:0 2px 20px #000,0 1px 4px #000}
#templeJourney:not(.journey-3d) .journey-aura{animation-duration:6.6s}
#templeJourney.journey-3d .journey-aura-wash{display:none}
@keyframes templeDepthReveal{from{opacity:0}to{opacity:1}}
@keyframes templeDepthWords{0%{opacity:0;transform:translateY(8px)}24%,66%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-4px)}}
#templeJourney.journey-leaving{transition:opacity 2.7s cubic-bezier(.4,0,.6,1)}
/* The tube resolves in the hall while the architecture gently recedes behind it. */
#shrine.has-temple-room::before{inset:0;background:linear-gradient(#100c09aa,#100c0966 35%,#100c0970 66%,#100c09d9),var(--temple-room-image);background-repeat:no-repeat;background-size:100% 100%,calc(100% + var(--ritual-look-down,0) * 70%) auto;background-position:center,center calc(50% - var(--ritual-look-down,0) * 19.5vh)}
#shrine.shrine-arriving{z-index:56;transition:none;pointer-events:none}
#shrine.shrine-arriving::before{opacity:0;animation:roomSettle 2.7s ease both}
#shrine.shrine-arriving .draw-scene{animation:tubeFocus 2.3s cubic-bezier(.22,.55,.3,1) both}
#shrine.shrine-arriving .instruct{animation:roomWords 1.4s .8s ease both}
#shrine.shrine-arriving .shake-ctl{animation:roomWords 1.2s 1.45s ease both}
/* Contrast stays around the letters, leaving the temple architecture uncovered. */
#shrine .instruct{max-width:min(760px,calc(100vw - 48px))}
#shrine .instruct .big{color:#f8e6bd;text-shadow:0 2px 3px #160d08,0 0 10px #160d08cc}
#shrine .instruct .sm{color:#fff2db;opacity:1;font-weight:600;line-height:1.75;text-shadow:-1px -1px 1px #160d08,1px -1px 1px #160d08,-1px 1px 1px #160d08,1px 1px 1px #160d08,0 2px 5px #160d08}
body.lang-E #shrine .instruct .sm{font-family:var(--temple-label,system-ui,sans-serif);font-size:15px;font-weight:600;letter-spacing:0}
#shrine .motion-hint{color:#e6d9c3;opacity:1;text-shadow:0 1px 3px #000}
@keyframes tubeFocus{0%{opacity:0;filter:blur(7px);transform:scale(.97)}35%{opacity:.35}100%{opacity:1;filter:none;transform:none}}
@keyframes roomSettle{from{opacity:0}to{opacity:1}}
/* A single, slow blessing of light accompanies the tube's arrival. The bloom
   settles into a quiet halo and never intercepts the shaking gesture. */
.tube-aura{position:absolute;inset:-38% auto -20%;left:50%;width:min(820px,88vw);margin-left:max(-410px,-44vw);z-index:0;pointer-events:none;opacity:0;transform-origin:50% 62%;mix-blend-mode:screen;background:radial-gradient(ellipse at 50% 49%,#fff1bdb3 0%,#f3cb737d 19%,#d9a13d38 39%,transparent 68%);filter:blur(9px)}
.tube-aura::before{content:'';position:absolute;inset:0 6% 11%;background:conic-gradient(from 153deg at 50% 0%,transparent 0deg,#ffe6ac66 7deg,transparent 12deg,#fff0c994 25deg,transparent 30deg,#ffd78e59 44deg,transparent 51deg 360deg);mask-image:linear-gradient(transparent,black 17% 60%,transparent);-webkit-mask-image:linear-gradient(transparent,black 17% 60%,transparent);transform-origin:50% 0;filter:blur(5px)}
.tube-aura::after{content:'';position:absolute;left:18%;right:18%;bottom:3%;height:12%;border-radius:50%;background:radial-gradient(ellipse,#ffe3a48c,#db9f3c50 35%,transparent 72%);filter:blur(5px)}
#shrine.on .tube-aura{animation:tubeBlessingBloom 6.5s cubic-bezier(.22,.61,.36,1) both}
#shrine.on .tube-aura::before{animation:tubeBlessingRays 6.5s ease-out both}
@keyframes tubeBlessingBloom{0%{opacity:0;transform:scale(.92)}20%{opacity:.85}40%{opacity:1;transform:scale(1.02)}100%{opacity:.38;transform:scale(1.08)}}
@keyframes tubeBlessingRays{0%{opacity:0;transform:rotate(-3deg)}28%,46%{opacity:1}100%{opacity:.45;transform:rotate(1deg)}}
@media(prefers-reduced-motion:reduce){#shrine.on .tube-aura{animation:none;opacity:.25;transform:none}#shrine.on .tube-aura::before{animation:none;opacity:.3;transform:none}}
#templeJourney.journey-reduced .journey-aura,#templeJourney.journey-reduced .journey-aura-wash{display:none}
@media(prefers-reduced-motion:reduce){.journey-aura,.journey-aura-wash{display:none}#shrine.shrine-arriving .draw-scene,#shrine.shrine-arriving .instruct,#shrine.shrine-arriving .shake-ctl,#shrine.shrine-arriving::before{animation:none;opacity:1;transform:none;filter:none}}
