:root{font-family:"Microsoft YaHei","PingFang SC",sans-serif;color:#fff1d1;background:#142f39}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;font:inherit;color:inherit;border:1px solid #dbbe7d8a;background:#173e48d9;border-radius:24px}button:hover{background:#487078}button:focus-visible,a:focus-visible{outline:2px solid #ffe6a5;outline-offset:3px}#interior-world{display:block;width:100vw;height:100vh;touch-action:none}header{position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 28px;background:linear-gradient(#12353acb,transparent);pointer-events:none}header>*{pointer-events:auto}header a{color:#ffe6af;text-decoration:none;border-bottom:1px solid #e6cb8e7d;padding:8px}header div{display:flex;align-items:center;gap:15px;font-size:14px;letter-spacing:3px}#room-fullscreen{font-size:19px;padding:7px 13px}#room-title{position:fixed;top:97px;left:34px;text-shadow:0 2px 15px #0e2626;pointer-events:none}#room-title span{color:#ead19e;font-size:12px;letter-spacing:3px}#room-title h1{font:normal 37px/1.4 "Songti SC",SimSun,serif;letter-spacing:6px;margin:8px 0}#room-title p{font-size:13px;max-width:375px;line-height:1.8}#room-hint{position:fixed;bottom:25px;left:32px;font-size:12px;color:#ffedcf;text-shadow:0 1px 8px #112629}#room-pad{position:fixed;bottom:67px;right:25px;text-align:center;touch-action:none}#room-pad button{width:43px;height:42px;margin:3px;font-size:20px;touch-action:none;user-select:none}#room-loading{position:fixed;inset:0;display:grid;place-items:center;background:#153840e8;text-align:center;padding:25px}#room-loading[hidden]{display:none}#room-loading>div{width:min(450px,100%);border:1px solid #cfb47075;padding:35px;background:#10323c}#room-loading span{font-size:12px;letter-spacing:5px;color:#e5c685}#room-loading h2{font:normal 27px "Songti SC",SimSun,serif;letter-spacing:5px}#room-loading progress{width:100%;height:6px;accent-color:#e1be74}#room-load-status{line-height:1.7;font-size:14px;color:#e9e1ca}@media(max-width:700px){header{padding:12px}#room-title{top:69px;left:18px}#room-title h1{font-size:27px}#room-title p{max-width:220px;font-size:11px}#room-hint{bottom:15px;left:13px;max-width:180px;line-height:1.6}#room-pad{right:12px;bottom:40px}#room-pad button{width:40px;height:40px}}

#memorial-detail{position:fixed;max-width:min(430px,calc(100vw - 32px));width:100%;padding:39px 32px 36px;border:1px solid #d8b976;background:linear-gradient(160deg,#163f45,#0f2934);box-shadow:0 22px 80px #061b25b8;color:#fff0d0;text-align:center}
#memorial-detail::backdrop{background:#091b24bd;backdrop-filter:blur(5px)}
#memorial-close{position:absolute;top:13px;right:13px;width:34px;height:34px;border-radius:50%;font-size:23px;line-height:1}
#memorial-slot{font-size:12px;letter-spacing:4px;color:#e1c18b}
#memorial-detail .memorial-lotus{font-size:54px;line-height:1.5;color:#f3c8d4;text-shadow:0 0 24px #f2d8b8}
#memorial-name{font:normal clamp(25px,5vw,38px)/1.45 "Songti SC",SimSun,serif;letter-spacing:3px;margin:2px 0 16px;overflow-wrap:anywhere}
#memorial-dedication{font-size:15px;line-height:1.9;color:#eee2c8;margin:0;overflow-wrap:anywhere}
#saints-status{position:fixed;right:22px;top:90px;max-width:min(320px,calc(100vw - 44px));padding:10px 16px;border:1px solid #d8b9769c;border-radius:18px;background:#143840df;color:#ffe9ba;font-size:12px;letter-spacing:1px;line-height:1.5;text-align:center;pointer-events:none}#saints-status[hidden]{display:none}
@media(max-width:700px){#saints-status{top:auto;bottom:190px;right:10px;font-size:11px}}

#room-chant,#room-photo{padding:8px 13px;font-size:12px;letter-spacing:1px;white-space:nowrap}#room-chant[aria-pressed=true]{background:#aa834e9c;border-color:#ffdf99}#room-audio-status{position:fixed;top:80px;right:20px;z-index:5;max-width:320px;padding:10px 14px;border:1px solid #dabd7b88;border-radius:12px;background:#143840e8;color:#fff2d5;font-size:12px;line-height:1.5}#room-audio-status[hidden]{display:none}@media(max-width:700px){header div{gap:4px;letter-spacing:0}#room-name{display:none}#room-chant,#room-photo{padding:7px 8px;font-size:11px}#room-audio-status{top:59px;right:10px;max-width:220px}}

#memorial-finder{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid #e1bd6b80;border-radius:22px;background:#183a40e8;font-size:12px}#memorial-finder[hidden]{display:none}#find-slot{width:76px;padding:6px;border:1px solid #ceae6980;background:#102c32;color:#fff2ce;border-radius:5px;text-transform:uppercase}#memorial-finder button{padding:6px 12px}#find-status{position:absolute;bottom:100%;left:0;right:0;text-align:center;white-space:nowrap;padding:6px;text-shadow:0 1px 5px #123}@media(max-width:700px){#memorial-finder{bottom:74px;left:12px;transform:none;gap:5px;font-size:11px}#find-slot{width:65px}#memorial-finder label{display:none}}

#scene-language{font:inherit;font-size:12px;letter-spacing:0;color:#fff1d1;background:#173e48ed;border:1px solid #dbbe7d8a;border-radius:20px;padding:8px 9px;max-width:78px;cursor:pointer}#scene-language:focus-visible{outline:2px solid #ffe6a5;outline-offset:3px}html[lang=en] header div{letter-spacing:0;gap:10px}html[lang=en] #room-title h1{letter-spacing:1px;font-size:32px;max-width:440px}html[lang=en] #room-title span{letter-spacing:1px}html[lang=en] #room-loading h2{letter-spacing:1px}html[lang=en] #room-loading span{letter-spacing:2px}html[lang=en] #memorial-slot{letter-spacing:1px}html[lang=en] #room-hint{max-width:min(480px,42vw);line-height:1.7}html[lang=en] #find-status{white-space:normal;min-width:240px}
@media(max-width:700px){header{gap:6px}header a{font-size:12px;padding:5px;max-width:124px;line-height:1.45}header div,html[lang=en] header div{gap:4px}#scene-language{padding:7px 5px;max-width:59px;font-size:11px}#room-fullscreen{padding:6px 10px}html[lang=en] #room-title h1{font-size:25px;max-width:290px}html[lang=en] #room-hint{max-width:175px;font-size:10px}html[lang=en] #room-photo{max-width:68px}html[lang=en] #room-chant{padding:7px 6px;font-size:10px}}
@media(max-width:520px){header{flex-wrap:wrap;align-items:flex-start}header>div{width:100%;justify-content:flex-end}#room-title{top:110px}#room-audio-status{top:100px}}

/* Eye-level walking uses the same pointer-owned joystick as the outdoor world. */
#room-pad{left:28px;right:auto;bottom:141px;width:144px;z-index:4;user-select:none;-webkit-user-select:none;isolation:isolate;touch-action:none}
#room-pad .joystick-pad{position:relative;margin:0 auto;width:124px;height:124px;border-radius:50%;border:1px solid #b493598c;background:radial-gradient(circle,#fffaf0b8 0 25%,#e9d8b477 26% 28%,#faf2e5b5 29% 64%,#b7945960 65% 66%,#fff8ecb8 67%);box-shadow:inset 0 0 20px #fff9,0 6px 26px #52371626;backdrop-filter:blur(6px);touch-action:none;cursor:grab;transition:opacity .6s,transform .6s}
#room-pad .joystick-pad:active{cursor:grabbing}#room-pad .joystick-pad:focus-visible{outline:2px solid #f8d897;outline-offset:4px}
#room-pad .joystick-guide{position:absolute;inset:21px;border:1px dashed #ab865a70;border-radius:50%;pointer-events:none}
#room-pad .joystick-thumb{position:absolute;left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;border-radius:50%;background:radial-gradient(circle at 34% 26%,#fffef8,#e6d0a3);border:1px solid #b38d4f;box-shadow:0 3px 9px #68451d2b,inset 0 0 0 5px #fffaf07a;pointer-events:none;will-change:transform}
#room-pad .joystick-thumb:after{content:'✦';position:absolute;inset:0;display:grid;place-items:center;color:#a2763c;font-size:20px}
#room-pad .joystick-caption{display:block;margin:8px 0 5px;font-size:10px;letter-spacing:2px;color:#fff1d1;text-shadow:0 1px 6px #142f39;transition:opacity .6s}
#room-pad .joystick-wake{position:absolute;left:50%;top:52px;transform:translateX(-50%);width:130px;color:#fff1d1;text-shadow:0 1px 7px #142f39;font-size:23px;pointer-events:none;opacity:0;transition:opacity .6s}
#room-pad .joystick-wake span{display:block;font-size:10px;letter-spacing:1px;margin-top:4px}
#room-pad.is-idle .joystick-pad{opacity:.08;transform:scale(.8)}#room-pad.is-idle .joystick-thumb,#room-pad.is-idle .joystick-caption{opacity:0}#room-pad.is-idle .joystick-wake{opacity:.65}#room-pad.is-idle{cursor:pointer}
@media(max-width:700px){#room-pad{left:14px;right:auto;bottom:167px;width:130px}#room-pad .joystick-pad{width:112px;height:112px}#room-pad .joystick-wake{top:45px}}
@media(max-height:560px){#room-pad{bottom:113px}#room-pad .joystick-pad{width:88px;height:88px}#room-pad .joystick-thumb{width:36px;height:36px;left:calc(50% - 18px);top:calc(50% - 18px)}#room-pad .joystick-caption{margin:4px 0}#room-pad .joystick-wake{top:30px}}
@media(prefers-reduced-motion:reduce){#room-pad .joystick-pad,#room-pad .joystick-caption,#room-pad .joystick-wake{transition:none}}

/* Keep recovery controls above the hall and comfortably tappable on phones. */
#room-loading[data-load-state=error]{z-index:20;overflow:auto}
#room-load-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:22px}
#room-load-actions[hidden]{display:none}
#room-load-actions button,#room-load-actions a{display:flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:10px 16px;border:1px solid #dbbe7d8a;border-radius:24px;background:#173e48;color:#fff1d1;font:inherit;font-size:14px;line-height:1.5;text-decoration:none;overflow-wrap:anywhere}
#room-load-actions button:hover,#room-load-actions a:hover{background:#487078}

/* The hall loader shares the visitor's light/dark preference with the main 3D world. */
#room-loading.b3d-load{--load-paper:#fffaf0eb;--load-ink:#49362b;--load-muted:#745f4d;--load-line:#b48a5688;z-index:30;display:flex;justify-content:flex-start;align-items:center;padding:clamp(18px,5vw,82px);overflow:auto;color:var(--load-ink);background-color:#f8f0de;background-image:linear-gradient(90deg,#faf7f0f9 0%,#faf7f0e8 29%,#faf7f057 54%,#faf7f014 100%),url('/media/welcoming-triad.webp');background-size:cover;background-position:center,center;text-align:center}
#room-loading.b3d-load[hidden]{display:none}
#room-loading.b3d-load>.loading-inner{width:min(510px,100%);max-height:calc(100dvh - 36px);overflow:auto;padding:clamp(24px,3.3vw,45px);border:1px solid var(--load-line);border-radius:155px 155px 14px 14px;background:var(--load-paper);box-shadow:0 24px 80px #533b2524,0 0 0 7px #fffaf050;backdrop-filter:blur(10px)}
#room-loading.b3d-load .loading-lotus{position:relative;width:130px;height:104px;margin:4px auto 13px;filter:drop-shadow(0 7px 12px #aa75352b);animation:b3d-lotus-breathe 5s ease-in-out infinite}
#room-loading.b3d-load h2{margin:0 0 6px;color:var(--load-ink);font:400 clamp(24px,3vw,34px)/1.5 'Songti SC',SimSun,Georgia,serif;letter-spacing:.11em}
#room-loading.b3d-load .b3d-load-verse{margin:0 auto 20px;color:var(--load-muted);font:14px/1.8 'Songti SC',SimSun,Georgia,serif;letter-spacing:.14em}
#room-loading.b3d-load #room-progress{display:block;width:100%;height:6px;margin:0;accent-color:#b68a4b}
#room-loading.b3d-load #room-load-status{margin:12px auto 0;min-height:22px;color:var(--load-muted);font-size:13px;line-height:1.7}
#room-loading.b3d-load #room-load-actions button,#room-loading.b3d-load #room-load-actions a{min-height:44px;background:#f7ebd3;color:#603e2f;border-color:#b58c5d}
#room-loading.b3d-load #room-load-actions button:hover,#room-loading.b3d-load #room-load-actions a:hover{background:#e7c99a}
html[data-loading-theme=dark] #room-loading.b3d-load{--load-paper:#25202bea;--load-ink:#fff0d9;--load-muted:#e0cfb5;--load-line:#d4ad7190;background-color:#231f2d;background-image:linear-gradient(90deg,#211b28fa 0%,#281e2cea 31%,#271b2a8a 60%,#251a2770 100%),url('/media/welcoming-triad.webp')}
html[data-loading-theme=dark] #room-loading.b3d-load>.loading-inner{box-shadow:0 25px 85px #0c071a9c,0 0 0 7px #d9b77b15}
html[data-loading-theme=dark] #room-loading.b3d-load #room-load-actions button,html[data-loading-theme=dark] #room-loading.b3d-load #room-load-actions a{background:#332632;color:#f5dcad;border-color:#bb985f}
header .b3d-theme-cycle{min-width:38px;min-height:38px;width:38px;height:38px;padding:0;display:grid;place-items:center;flex:0 0 38px;font-size:20px;letter-spacing:0}
@media(max-width:760px){#room-loading.b3d-load{align-items:flex-end;justify-content:center;padding:16px;background-position:center,63% 38%}#room-loading.b3d-load>.loading-inner{padding:25px 22px 22px;border-radius:125px 125px 12px 12px}#room-loading.b3d-load .loading-lotus{width:96px;height:74px;margin:0 auto 11px;transform:scale(.75);transform-origin:bottom center}#room-loading.b3d-load h2{font-size:25px}}
@media(max-width:520px){header .b3d-theme-cycle{width:34px;height:34px;min-width:34px;min-height:34px;flex-basis:34px}#room-loading.b3d-load .b3d-load-verse{font-size:12px}}
@media(prefers-reduced-motion:reduce){#room-loading.b3d-load .loading-lotus{animation:none}}

/* The library uses a warm manuscript palette, keeping its heading legible over the sky. */
body[data-hall=library] header{background:linear-gradient(#f8eacddf,#f8eacd00)}
body[data-hall=library] header a{color:#5a392b;border-color:#a97642}
body[data-hall=library] header button,body[data-hall=library] #scene-language{background:#f4e7cbdc;border-color:#ad8656;color:#543b30}
body[data-hall=library] header button:hover{background:#e7d09f}
body[data-hall=library] #room-title{max-width:min(470px,calc(100vw - 36px));padding:14px 19px 16px;border-left:3px solid #b88b50;border-radius:0 4px 4px 0;background:linear-gradient(95deg,#fff8e9ee,#fff8e9c8);box-shadow:0 8px 30px #6648211c;color:#4f392c;text-shadow:none;backdrop-filter:blur(5px)}
body[data-hall=library] #room-title span{color:#8d643e}
body[data-hall=library] #room-title h1{color:#513829}
body[data-hall=library] #room-title p{max-width:410px;color:#694c38}
body[data-hall=library] #room-hint{max-width:min(430px,calc(100vw - 40px));padding:8px 11px;border:1px solid #b8895775;border-radius:5px;background:#fff8e9d9;color:#5a4232;text-shadow:none}
@media(max-width:700px){body[data-hall=library] #room-title{padding:10px 13px 12px;max-width:min(280px,calc(100vw - 36px))}body[data-hall=library] #room-title p{max-width:235px}body[data-hall=library] #room-hint{max-width:175px;font-size:10px}}

/* Text is HTML at native screen resolution; keep it large and opaque enough
   to read over paintings and the moving 3D scene on every hall. */
#room-title{max-width:min(480px,calc(100vw - 36px));padding:13px 19px 15px;border-left:3px solid #e1bd79;border-radius:0 5px 5px 0;background:#17333ce8;text-shadow:none}
#room-title span{font-size:13px;color:#ffe4ad}#room-title p{font-size:15px;line-height:1.65;color:#fff2d9}
#room-hint{padding:8px 11px;border:1px solid #d9b97c8c;border-radius:5px;background:#17333ce8;font-size:14px;line-height:1.5;text-shadow:none}
#saints-status,#room-audio-status,#memorial-finder{font-size:13px}
body[data-hall=library] #room-title{background:#fff9eef5}body[data-hall=library] #room-title p{color:#523b2b}
body[data-hall=library] #room-hint{background:#fff9eef5;color:#523b2b}
@media(max-width:700px){#room-title{max-width:min(290px,calc(100vw - 28px));padding:10px 13px 12px}#room-title span{font-size:12px}#room-title p{max-width:260px;font-size:13px;line-height:1.55}#room-hint{max-width:210px;font-size:12px}body[data-hall=library] #room-title p{font-size:13px}body[data-hall=library] #room-hint{max-width:210px;font-size:12px}}
/* The hall description is opt-in on narrow screens, leaving the 3D view open. */
#room-intro-toggle{display:none}
@media(max-width:700px){
 body #room-title{top:68px;left:12px;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:10px;max-width:calc(100vw - 24px);max-height:min(48vh,330px);overflow:auto;padding:7px 10px;pointer-events:auto}
 body #room-title span{display:none}
 body #room-title h1,html[lang=en] body #room-title h1{font-size:19px;line-height:1.35;letter-spacing:1px;margin:0}
 body #room-title p{display:none;grid-column:1/-1;max-width:260px;margin:8px 0 2px;font-size:12px;line-height:1.5}
 body #room-title.is-expanded p{display:block}
 #room-intro-toggle{display:block;padding:5px 9px;border-radius:14px;background:#bc92534d;border-color:#dec48999;color:#fff3da;font-size:11px;white-space:nowrap}
 body[data-hall=library] #room-intro-toggle{color:#543b2a;background:#ead2a988;border-color:#b68a55}
}
@media(max-width:520px){body #room-title{top:100px}}
@media(max-width:700px) and (max-height:560px){body #room-title{top:58px;max-height:42vh}}

/* Leave each hall's left introduction closed on entry at every screen size. */
#room-title{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px;width:max-content;max-width:min(380px,calc(100vw - 36px));padding:9px 12px;pointer-events:auto}
#room-title h1{font-size:20px;letter-spacing:2px;line-height:1.35;margin:0;white-space:nowrap}
#room-title span,#room-title p{display:none}
#room-intro-toggle{display:block;padding:6px 10px;border-radius:16px;background:#bc92534d;border-color:#dec48999;color:#fff3da;font-size:12px;white-space:nowrap}
#room-title.is-expanded{width:auto;max-width:min(480px,calc(100vw - 36px));padding:13px 19px 15px}
#room-title.is-expanded span,#room-title.is-expanded p{display:block;grid-column:1/-1}
#room-title.is-expanded h1{font-size:31px;letter-spacing:4px}
@media(max-width:700px){body #room-title{width:max-content;max-width:calc(100vw - 24px)}body #room-title.is-expanded{width:auto;padding:10px 13px 12px}body #room-title.is-expanded h1{font-size:22px;letter-spacing:1px}body #room-title.is-expanded span{display:block;font-size:11px}#room-intro-toggle{font-size:11px;padding:5px 9px}}

/* Vertical travel shares the outdoor joystick and stays on the same left side. */
#room-pad .altitude{display:flex;justify-content:center;gap:7px;margin-top:5px;transition:opacity .6s}
#room-pad .altitude button{width:62px;min-height:38px;margin:0;padding:5px 8px;border-radius:22px;background:#fff8e9e3;color:#684c2e;border-color:#cba76d;font-size:16px;line-height:1;touch-action:none}
#room-pad .altitude button span{font-size:12px;margin-left:2px}
#room-pad .altitude button:active{background:#efd4a4}
#room-pad.is-idle .altitude{opacity:0;pointer-events:none}
@media(max-width:700px){#room-pad .altitude button{width:55px;min-height:36px}}
@media(max-height:560px){#room-pad .altitude button{min-height:30px;height:30px}}
@media(prefers-reduced-motion:reduce){#room-pad .altitude{transition:none}}

/* Three-language selector: show the whole language name. */
#scene-language{width:100px;max-width:110px;min-width:88px;font-size:12px;letter-spacing:0}
@media(max-width:760px){#scene-language{width:88px;max-width:94px;min-width:82px;padding-left:6px;padding-right:3px;font-size:11px}}
.language-notice{position:fixed;left:12px;right:12px;bottom:12px;z-index:150;padding:12px;background:var(--paper,#fff7e4);color:var(--ink,#543b30);border:1px solid var(--line,#c0a171)}
