#visual-preview-tools{position:fixed;left:12px;bottom:12px;z-index:15;display:flex;align-items:center;gap:8px;padding:7px 10px;background:#142a24d9;border:1px solid #c9ad7355;border-radius:8px;color:#f4e0b5;font:11px "Microsoft YaHei",sans-serif;backdrop-filter:blur(12px)}#visual-preview-tools button{background:#b18a50;color:#172a22;border:0;padding:5px 8px;border-radius:5px;font:inherit;cursor:pointer}#visual-preview-tools output{font-variant-numeric:tabular-nums;color:#e7efd6}body:has(dialog[open]) #visual-preview-tools{display:none}@media(max-width:700px){#visual-preview-tools{bottom:72px;left:8px;padding:5px 7px;font-size:10px;gap:5px}}
.wash{background:linear-gradient(180deg,#13211a55,transparent 25%,transparent 70%,#101c1955)}.title{top:110px;left:38px}.title h1{font-size:clamp(28px,3vw,42px);font-weight:400;margin:8px 0;letter-spacing:.12em}.title p{font-size:12px;max-width:330px;line-height:1.8}.title .eyebrow{font-size:10px}#visual-preview-tools{top:83px;right:20px;bottom:auto;left:auto}body:has(#entry:not([hidden])) #visual-preview-tools{display:none}@media(max-width:700px){.title{top:124px;left:23px;max-width:200px}.title h1{font-size:29px}.title p{font-size:10px;max-width:185px}#visual-preview-tools{top:119px;right:10px;left:auto;bottom:auto;max-width:135px;justify-content:center;flex-wrap:wrap;gap:5px}#visual-preview-tools>span{width:100%;text-align:center}}
#scene-loading-screen{position:fixed;inset:0;z-index:100;display:grid;place-items:center;overflow:hidden;padding:28px;background:radial-gradient(ellipse at 50% 40%,#30463b 0,#182c24 48%,#0b1915 100%);color:#f3e4c5}
#scene-loading-screen[hidden]{display:none}
.scene-loading-halo{position:absolute;width:min(88vw,640px);aspect-ratio:1;border:1px solid #cfb47916;border-radius:50%;box-shadow:0 0 0 60px #c3ac7005,0 0 0 125px #c3ac7004;pointer-events:none}
.scene-loading-card{position:relative;width:min(100%,360px);text-align:center}
.scene-loading-emblem{position:relative;display:grid;place-items:center;width:98px;height:98px;margin:0 auto 36px}
.scene-loading-emblem::before,.scene-loading-emblem::after{content:"";position:absolute;inset:0;border:1px solid #ccb17b40;border-radius:50%}
.scene-loading-emblem::after{inset:-7px;border-color:transparent;border-top-color:#d6b47699;animation:scene-loading-turn 8s linear infinite}
.scene-loading-emblem span{display:grid;place-items:center;width:66px;height:66px;border:1px solid #d2aa6b88;border-radius:18px;background:linear-gradient(145deg,#a6653f,#73442d);box-shadow:0 7px 35px #0004,inset 0 1px #ffe2b52b;font:38px "Songti SC",serif;color:#fff0cf}
.scene-loading-kicker{margin:0 0 14px;font-size:10px;letter-spacing:.3em;color:#c5b387}
#scene-loading-title{margin:0;font:46px/1.3 "Songti SC",serif;letter-spacing:.2em;text-indent:.2em;font-weight:400}
.scene-loading-welcome{margin:17px 0 38px;color:#d1d4bd;font-size:13px;letter-spacing:.09em}
#scene-loading-progress{height:5px;overflow:hidden;border-radius:10px;background:#b9c3ac20;box-shadow:inset 0 1px 2px #0003}
#scene-loading-fill{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#a88750,#e5cc94);box-shadow:0 0 12px #ddbe7780;transition:width .22s ease-out}
.scene-loading-detail{display:flex;justify-content:space-between;gap:12px;margin-top:13px;font-size:11px;color:#cbd0ba;text-align:left}
#scene-loading-percent{font-variant-numeric:tabular-nums;color:#dfc892}
.scene-loading-note{margin:45px 0 0;font-size:10px;color:#a0b0a0;letter-spacing:.12em}
#scene-loading-retry{margin-top:24px;padding:10px 24px;border:1px solid #c5a47188;border-radius:22px;background:#d1b17b;color:#203127}
@keyframes scene-loading-turn{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.scene-loading-emblem::after{animation:none}#scene-loading-fill{transition:none}}
/* Short touch screens need a landscape layout even when wider than a tablet. */
@media (orientation:landscape) and (max-height:600px) and (max-width:960px), (orientation:landscape) and (max-height:600px) and (max-width:1400px) and (pointer:coarse){
 #experience .top{padding:8px max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:12px}
 #experience .brand,#experience .top-controls{gap:8px}
 #experience .brand strong{display:block;font-size:13px;letter-spacing:.1em}
 #experience .seal{width:36px;height:40px;font-size:25px}
 #experience .top button{min-height:44px;padding:6px 11px;font-size:12px;white-space:nowrap}
 #experience .top #temple-map-open,#experience .top #help,#experience .top #account-open{width:44px;min-width:44px;height:44px;transform:none}
 #experience .destinations{top:8px;left:calc(max(12px,env(safe-area-inset-left)) + 132px);right:calc(max(12px,env(safe-area-inset-right)) + 264px);transform:none;max-width:none;height:44px;padding:2px;gap:2px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x}
 #experience:has(#hall-view:not([hidden])) .destinations{right:calc(max(12px,env(safe-area-inset-right)) + 344px)}
 #experience .destinations::-webkit-scrollbar{display:none}
 #experience .destinations button{flex:none;min-height:38px;padding:5px 10px;font-size:12px;letter-spacing:0}
 #experience .title{top:70px;left:max(16px,env(safe-area-inset-left));max-width:200px}
 #experience .title h1{font-size:25px;margin:4px 0}
 #experience .title .eyebrow{font-size:9px}
 #experience .title p,#experience .location{display:none}
 #experience .dock{width:auto;max-width:calc(100% - 100px);gap:3px;bottom:calc(var(--world-chat-height,76px) + 8px)}
 #experience:has(#world-chat[data-collapsed]) .dock{bottom:max(4px,env(safe-area-inset-bottom))}
 #experience .dock nav{gap:3px;padding:3px;border-radius:16px}
 #experience .dock nav button{flex-direction:row;min-width:76px;min-height:44px;padding:5px 11px;gap:6px;font-size:12px}
 #experience .dock nav svg{width:18px;height:18px}
 #experience .dock kbd{display:none}
 #experience .dock .status{font-size:11px;line-height:1.3}
 #experience .dock .foot,#experience:has(#world-chat[data-collapsed]) .dock .foot{width:100%;justify-self:center;font-size:10px;line-height:1.3;letter-spacing:0;text-align:center}
 #experience #world-chat{--chat-gutter:max(10px,env(safe-area-inset-left),env(safe-area-inset-right));inset:auto 0 0;width:100%;padding:4px var(--chat-gutter) calc(5px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:0}
 #experience #world-chat-input{font-size:16px;min-height:38px}
 #experience #world-chat button{min-height:38px;min-width:44px}
 #experience #world-chat #world-chat-visibility{display:block;position:absolute;right:var(--chat-gutter);bottom:100%;border-radius:7px 7px 0 0;color:#eac788;background:#273328ee}
 #experience #world-chat[data-collapsed]{bottom:env(safe-area-inset-bottom);padding:0;border:0}
 #experience #world-chat[data-collapsed] #world-chat-content{display:none}
 #experience #world-chat[data-collapsed] #world-chat-visibility{min-height:28px;height:28px;min-width:36px;padding:2px 7px}
 #experience #world-chat-log{height:min(130px,24dvh)}
}
@media (orientation:landscape) and (max-height:390px) and (pointer:coarse){
 #experience .title{top:70px}
 #experience .title .eyebrow{display:none}
}

/* Installed iPhone scene UI uses document positioning; the canvas stays intact. */
html.fojie-installed,html.fojie-installed body{min-height:100%;height:100%}
html.fojie-installed body{position:relative}
html.fojie-installed #experience{position:absolute;inset:0;min-height:0;height:100dvh}
