:root{font-family:"PingFang TC","Noto Sans TC",system-ui,sans-serif;color:#f6f0e1;font-size:16px;--gold:#dfc18a;--ink:#152724;--border:rgba(240,221,180,.23);color-scheme:dark}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#142c29}button,input,select{font:inherit}button,select{cursor:pointer}button{color:inherit;background:rgba(22,42,36,.83);border:1px solid var(--border);border-radius:9px;padding:.7rem 1rem;transition:background .18s,transform .18s}button:hover:not(:disabled){background:#385044;transform:translateY(-1px)}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #f3d38a;outline-offset:4px}button.primary{background:#e4c891;color:#24382f;border-color:#e4c891;font-weight:650}button.primary:hover{background:#f3dbb1}button.secondary{background:transparent;border-color:#ad9270}button[hidden],[hidden]{display:none!important}#app,#world{position:fixed;inset:0;width:100%;height:100%}#world{touch-action:none;outline:none;display:block}.vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,rgba(9,25,24,.43),transparent 25%,transparent 78%,rgba(9,25,24,.3))}.topbar{position:absolute;z-index:10;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.4rem 2rem;pointer-events:none}.brand{display:flex;align-items:center;gap:.7rem;text-shadow:0 2px 18px #11241f}.brand svg{width:39px;height:39px;stroke:#ecd6a6;fill:none;stroke-width:1.4}.brand strong{font-family:"Songti TC",serif;letter-spacing:.17em;font-size:1.3rem;font-weight:600;display:block}.brand span{font-size:.65rem;letter-spacing:.2em;display:block;margin-top:.25rem}.top-actions{pointer-events:auto;display:flex;gap:.45rem;align-items:center}.language-control{display:flex;align-items:center;gap:.45rem;font-size:.78rem;color:#e5dcc4}.language-control span{letter-spacing:.04em}.language-control select{min-width:110px;max-width:150px;padding:.48rem .55rem;backdrop-filter:blur(12px)}.top-actions button{backdrop-filter:blur(12px);font-size:.9rem}.local-label{font-size:.8rem;background:rgba(21,39,33,.75);padding:.5rem .7rem;border-radius:8px;color:#e9d4aa}.entrance{position:absolute;inset:0;background:linear-gradient(90deg,rgba(12,31,29,.94),rgba(12,31,29,.65) 36%,rgba(12,31,29,.06) 78%);display:flex;align-items:safe center;overflow-y:auto;padding:6rem 7vw 3rem}.entry-card{max-width:520px}.eyebrow{color:var(--gold);font-size:.85rem;letter-spacing:.22em;margin:0 0 .8rem}.entry-card h1{font-family:"Songti TC","Noto Serif TC",serif;font-size:clamp(2rem,3.8vw,3.8rem);font-weight:400;line-height:1.5;letter-spacing:.08em;margin:0 0 1.4rem}.entry-copy{color:#d2dcd0;font-size:1rem;line-height:1.9}.entry-line{width:58px;border-top:1px solid #bda579;margin:1.6rem 0}.entry-card .primary,.entry-card .secondary{display:block;min-width:240px;text-align:center}.fine{font-size:.8rem;color:#c0c9bc;line-height:1.7}.entry-card details{margin-top:1.6rem;max-width:410px;max-height:45dvh;overflow:auto;padding-right:.4rem;color:#b5c6bd;font-size:.82rem;line-height:1.8}.entry-card summary{cursor:pointer}.entry-card #entry-status{color:#f0c995;font-size:.9rem;min-height:1.2em}.location-card{position:absolute;top:6.5rem;left:2rem;max-width:290px;text-shadow:0 2px 16px #112b24;pointer-events:none}.location-card span{font-size:.72rem;letter-spacing:.12em;border-left:2px solid var(--gold);padding-left:.6rem}.location-card h2{font-family:"Songti TC",serif;font-size:2rem;letter-spacing:.15em;margin:.6rem 0 .2rem;font-weight:400}.location-card p{font-size:.84rem;color:#e4e4d1;line-height:1.6}.actionbar{position:absolute;bottom:3.2rem;left:50%;transform:translateX(-50%);display:flex;gap:.3rem;padding:.4rem;background:rgba(19,40,34,.84);backdrop-filter:blur(16px);border:1px solid var(--border);border-radius:14px;white-space:nowrap}.actionbar button{background:transparent;border:none;padding:.6rem 1.1rem;font-size:.9rem}.context-bar{position:absolute;bottom:8rem;left:50%;transform:translateX(-50%);display:flex;gap:.5rem;white-space:nowrap}.context-bar button{box-shadow:0 4px 24px #182c2738}.context-bar #sit:disabled{background:rgba(26,45,40,.76);color:#f5f0dd;opacity:.75;border-color:var(--border);font-size:.85rem}.control-hint{position:absolute;bottom:.7rem;left:50%;transform:translateX(-50%);font-size:.76rem;white-space:nowrap;margin:0;color:#e3e5d4;text-shadow:0 1px 8px #203f31}.toast{position:absolute;top:6rem;left:50%;transform:translateX(-50%);padding:.8rem 1.2rem;border-radius:8px;background:rgba(16,38,32,.94);color:#f9e6c0;border:1px solid var(--border);max-width:min(90vw,550px);opacity:0;pointer-events:none;transition:opacity .25s;text-align:center;font-size:.9rem;z-index:5}.toast.visible{opacity:1}.compass{position:absolute;right:2rem;bottom:3.2rem;width:44px;height:44px;border:1px solid var(--border);border-radius:50%;display:grid;place-items:center;background:#1c372b77}.compass span{position:absolute;top:-18px;font-size:.65rem;color:#f8e6ba}.compass i{display:block;width:1px;height:28px;background:linear-gradient(#f4d9a5 50%,#fff3 50%);transform-origin:center}.panel{position:fixed;margin:auto;background:rgba(20,38,34,.98);color:#f0ebde;border:1px solid #7c806253;border-radius:18px;box-shadow:0 25px 100px #0008;padding:1.8rem;width:min(620px,94vw);max-height:86dvh;overflow:auto}.panel::backdrop{background:#0e201b85;backdrop-filter:blur(5px)}.panel.small{max-width:440px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.7rem}.panel h2{font-family:"Songti TC",serif;font-size:1.6rem;font-weight:400;margin:0;letter-spacing:.08em}.panel h3{font-size:1rem;color:var(--gold)}.panel p,.panel li{line-height:1.8}.panel-head button{font-size:.85rem;padding:.5rem .8rem}.muted{color:#b9c5ba;font-size:.88rem}.map-wrap{background:#203d32;border-radius:12px;overflow:hidden;max-height:36vh}.map-wrap svg{width:100%;height:100%;max-height:36vh;display:block}.destination-list{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin-top:1rem}.destination-list button{font-size:.9rem;padding:.65rem}.sound-master{display:flex;justify-content:space-between;align-items:center;margin:1rem 0;padding-bottom:1rem;border-bottom:1px solid var(--border)}input[type=checkbox]{accent-color:#dfbd80;width:20px;height:20px}input[type=range]{accent-color:#dfbd80;min-width:0}.slider-row{display:flex;justify-content:space-between;gap:1rem;align-items:center;font-size:.9rem;margin:1.2rem 0}.slider-row input{max-width:55%}.sound-channel{display:grid;grid-template-columns:1fr 26px 130px;align-items:center;gap:.8rem;margin:1.1rem 0}.sound-channel input[type=range]{width:100%}select{color:#f4e9d6;background:#253d34;border:1px solid var(--border);border-radius:7px;padding:.5rem;appearance:none}.notice{margin-top:1.5rem;background:#304437;padding:1rem;border-radius:10px}.notice strong{font-size:.9rem}.notice p{margin:.4rem 0 0;font-size:.85rem}.panel pre{font-size:.8rem;white-space:pre-wrap;word-break:break-word;background:#0d211c;border-radius:8px;padding:1rem;max-height:38vh;overflow:auto}.dpad{display:none}#info-body{font-size:.95rem;color:#dbe1d3}#info-body a{color:#f3dba3}.key{border:1px solid #718578;border-radius:4px;padding:0 .3rem}.error-overlay{padding:8rem 2rem;color:#fff;position:absolute;inset:0;background:#163b30;z-index:20}body.in-visit .brand span{opacity:.8}
#map-dialog{width:min(1100px,96vw);max-height:94dvh}.map-wrap{width:min(100%,calc(76dvh * 1.1111));max-height:none;aspect-ratio:500/450;margin:0 auto;background:#fffef9}.map-wrap svg{width:100%;height:100%;max-height:none;display:block}
html[lang="en"] .entry-card h1.entry-name{font-size:clamp(2.1rem,2.7vw,3rem);margin-bottom:.45rem}html[lang="en"] .entry-welcome{font-size:clamp(2.2rem,3.4vw,3.6rem);margin-bottom:1rem}html[lang="en"] .entry-vow{font-size:clamp(1.35rem,1.8vw,2rem);margin-bottom:1rem}html[lang="en"] .entry-rule{margin:1rem 0 1.2rem}html[lang="en"] .entry-copy{margin-bottom:.7rem;line-height:1.65}
.entry-card{max-width:820px}.entry-card h1.entry-name{font-size:clamp(2.4rem,3.4vw,3.6rem);line-height:1.2;margin:0 0 .65rem;letter-spacing:.06em}.entry-motto{margin:0 0 1.6rem;letter-spacing:.12em}.entry-rule{border-top:1px solid #ad927080;margin:1.6rem 0 2rem}.entry-card .entry-welcome{font-family:"Songti TC","Noto Serif TC",serif;font-size:clamp(2.7rem,4.7vw,4.9rem);font-weight:400;line-height:1.35;letter-spacing:.04em;margin:0 0 1.7rem}.entry-card .entry-copy{max-width:760px;margin:0 0 1.2rem}.entry-card .entry-vow{font-family:"Songti TC","Noto Serif TC",serif;color:#ead7aa;font-size:clamp(1.6rem,2.4vw,2.7rem);line-height:1.5;letter-spacing:.03em;margin:0 0 1.8rem}
@media(max-width:850px){.topbar{padding:1rem}.brand strong{font-size:1.05rem}.brand span{font-size:.55rem}.brand svg{width:30px;height:30px}.top-actions{gap:.3rem}.top-actions button{padding:.6rem .7rem;font-size:.8rem}.local-label{display:none}.location-card{top:5.4rem;left:1rem}.location-card h2{font-size:1.6rem}.entry-card{max-width:440px}.entrance{padding:6rem 6vw 3rem}.actionbar button{padding:.6rem .8rem}.compass{right:1rem}.control-hint{font-size:.7rem}.destination-list{grid-template-columns:repeat(3,1fr)}}
@media(max-width:600px){.topbar{align-items:flex-start}.brand span,.language-control span{display:none}.language-control select{min-width:100px}.brand strong{font-size:1rem;letter-spacing:.05em}.brand svg{width:25px}.top-actions{max-width:210px;flex-wrap:wrap;justify-content:flex-end}.top-actions button{font-size:.78rem;padding:.5rem .55rem}.entrance{align-items:flex-start;background:linear-gradient(0deg,#102d29f5,#173c2bb0 55%,#173c2b22);padding:6rem 1.3rem 2rem}.entry-card h1{font-size:2.1rem}.entry-copy{font-size:.9rem}.entry-card details{margin-top:.8rem}.entry-card .fine{font-size:.75rem}.entry-card .primary,.entry-card .secondary{width:100%}.entry-line{margin:1rem 0}.location-card{top:5.4rem;max-width:230px}.location-card p{font-size:.78rem}.actionbar{bottom:calc(1.4rem + env(safe-area-inset-bottom));max-width:96vw}.actionbar button{font-size:.8rem;padding:.6rem .65rem}.control-hint{display:none}.context-bar{bottom:calc(6.2rem + env(safe-area-inset-bottom));flex-wrap:wrap;justify-content:center;width:94%;gap:.35rem}.context-bar button{font-size:.82rem;padding:.6rem .8rem}.compass{bottom:11rem;right:1rem}.dpad{display:grid;grid-template-columns:repeat(3,35px);grid-template-rows:repeat(2,35px);gap:4px;position:absolute;bottom:11rem;left:1rem;touch-action:none}.dpad button{padding:0;font-size:.72rem;touch-action:none;background:#19372ccc}.dpad [data-dir=up]{grid-column:2}.dpad [data-dir=left]{grid-column:1;grid-row:2}.dpad [data-dir=down]{grid-column:2;grid-row:2}.dpad [data-dir=right]{grid-column:3;grid-row:2}.panel{padding:1.2rem;max-height:84dvh}.sound-channel{grid-template-columns:1fr 22px 110px}.destination-list{grid-template-columns:repeat(2,1fr)}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.brand img{width:42px;height:42px;filter:drop-shadow(0 2px 8px #10221c88)}.hero-emblem{display:block;margin-bottom:1.4rem;filter:drop-shadow(0 4px 14px #081d1a77)}.weather-chip{pointer-events:auto;font-size:.75rem;padding:.4rem .6rem;border-radius:6px;text-shadow:none;background:#15372aa8}.panel a{color:#ead4a7}.rice-illustration{height:150px;position:relative;display:grid;place-items:center}.rice-bowl{position:absolute;width:140px;height:65px;border-radius:12px 12px 80px 80px;background:linear-gradient(100deg,#c8b880,#f8e7b2 35%,#a18a52);top:75px;border-top:6px solid #e5d4a8;box-shadow:0 12px 18px #09191180}.rice-mound{position:absolute;top:50px;width:132px;height:65px;border-radius:70% 70% 20% 20%;background:repeating-radial-gradient(ellipse at 30% 50%,#fff9e8 0px,#fff9e8 2px,#dcdac4 3px,#f2f1de 5px);transform-origin:bottom;transform:scaleY(0);transition:transform .5s}.offering-actions{display:flex;flex-wrap:wrap;gap:.5rem}.offering-actions button{flex:1 1 42%;font-size:.85rem}#offering-status{text-align:center;color:#ecd8a6}.rice-illustration.presented{filter:drop-shadow(0 0 12px #dabd7850)}
#map-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,1fr);column-gap:1rem;align-items:start}#map-dialog .panel-head,#map-dialog>.muted{grid-column:1/-1}#map-dialog .destination-list{grid-template-columns:1fr;max-height:76dvh;overflow-y:auto;margin-top:0;align-self:stretch}
@media(max-width:600px){#map-dialog[open]{display:block}#map-dialog .destination-list{grid-template-columns:repeat(2,1fr);max-height:none;overflow:visible;margin-top:1rem}html[lang="en"] .brand strong{font-size:.82rem;max-width:145px;line-height:1.25}html[lang="en"] .entry-card h1.entry-name{font-size:1.65rem}html[lang="en"] .entry-card .entry-welcome{font-size:1.9rem}html[lang="en"] .entry-card .entry-vow{font-size:1.2rem}html[lang="en"] .entry-copy{font-size:.82rem;line-height:1.55}.entry-card{max-width:100%}.entry-card h1.entry-name{font-size:2rem}.entry-card .entry-welcome{font-size:2.35rem;line-height:1.4;margin-bottom:1.1rem}.entry-card .entry-vow{font-size:1.55rem;line-height:1.55}.entry-rule{margin:1.2rem 0 1.5rem}.hero-emblem{width:64px;height:64px;margin-bottom:.6rem}.brand img{width:30px;height:30px}.entry-card h1{font-size:1.85rem}.entry-copy{margin:.5rem 0}.weather-chip{font-size:.7rem}.entrance{padding-bottom:1.3rem}}

.hall-panel{width:min(1240px,97vw);height:94dvh;max-height:94dvh;padding:1rem;overflow:hidden}.hall-panel[open]{display:flex;flex-direction:column}.hall-panel .panel-head{flex:none;margin:0 0 .5rem}.hall-panel .eyebrow{font-size:.7rem;letter-spacing:.05em;margin-bottom:.3rem}.hall-panel h2{font-size:1.35rem}#hall-status{flex:none;min-height:0;margin:.25rem 0;font-size:.85rem}#hall-status:empty{display:none}#hall-status.error{color:#ffbd9e}#hall-content{flex:1;min-height:0}#hall-content iframe{display:block;width:100%;height:100%;border:0;border-radius:8px;background:#0c0a0e}@media(max-width:600px){.hall-panel{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:.6rem}.hall-panel .panel-head{gap:.5rem}.hall-panel .eyebrow{font-size:.62rem}.hall-panel h2{font-size:1.1rem}.hall-panel .panel-head button{white-space:nowrap}}

.incense-illustration{height:158px;display:flex;justify-content:center;align-items:end;gap:15px;position:relative;padding-bottom:32px;margin:1rem 0}.incense-illustration i{height:100px;width:4px;background:linear-gradient(#735139 70%,#ba8052 70%);display:none;position:relative}.incense-illustration[data-stage="prepared"] i,.incense-illustration[data-stage="lit"] i,.incense-illustration[data-stage="offered"] i{display:block}.incense-illustration[data-stage="lit"] i::before,.incense-illustration[data-stage="offered"] i::before{content:"";position:absolute;top:-4px;width:5px;height:7px;background:#ffa86e;box-shadow:0 0 12px #e9a45e;border-radius:50%}.incense-bowl{position:absolute;bottom:5px;width:104px;height:38px;border-radius:8px 8px 45px 45px;border-top:7px solid #a8916e;background:linear-gradient(100deg,#8a6a43,#d3b880,#795c38)}#incense-status{text-align:center;min-height:3em;color:#ecd8a6}
@media(max-width:600px){.actionbar{gap:0;padding:.3rem}.actionbar button{padding:.65rem .48rem;font-size:.76rem}}

/* In-room controls stay in the temple view; no blocking dialog is required. */
.mandala-controls{position:absolute;bottom:11.8rem;left:50%;transform:translateX(-50%);width:min(680px,94vw);padding:.7rem;background:#102b27e8;border:1px solid #dbc48a66;border-radius:13px;backdrop-filter:blur(12px);box-shadow:0 8px 30px #071c1a55}.mandala-heading{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin:0 .2rem .55rem;font-size:.78rem;color:#e7d3a4}.mandala-heading output{font-size:.72rem;color:#cbd9cb}.mandala-actions{display:grid;grid-template-columns:repeat(6,1fr);gap:.35rem}.mandala-actions button{padding:.6rem .35rem;font-size:.82rem;border-color:#e6ce8a4d}.mandala-actions button[aria-pressed=true]{background:#d7bd82;color:#233a31}.in-mandala .location-card p{max-width:200px}
#map-dialog{width:min(1100px,96vw)}#map-dialog .map-wrap,#map-dialog .map-wrap svg{max-height:none}
@media(max-width:600px){.mandala-controls{bottom:calc(10.2rem + env(safe-area-inset-bottom));padding:.55rem}.mandala-actions{grid-template-columns:repeat(3,1fr)}.mandala-heading{font-size:.7rem;gap:.3rem}.mandala-heading output{font-size:.65rem}.mandala-actions button{min-height:39px;font-size:.8rem}.in-mandala .dpad{bottom:18.8rem}.in-mandala .compass{bottom:19.6rem}.in-mandala .location-card p{display:none}.in-mandala .context-bar{bottom:5.9rem}.in-mandala .context-bar button{padding:.45rem .55rem;font-size:.75rem}}

/* Hall experiences are visible on entry and retain a direct return to the room. */
#hall-dialog[open]{position:fixed;inset:5.7rem 1.3rem 1.3rem auto;margin:0;width:min(1120px,calc(100vw - 2.6rem));height:calc(100dvh - 7rem);max-height:none;box-shadow:0 16px 65px #05100ee6;z-index:20;display:flex;flex-direction:column;padding:1rem;background:#0e1715f5}
#hall-dialog .panel-head{flex:none;margin-bottom:.5rem}#hall-dialog .panel-head h2{font-size:1.2rem}#hall-dialog #hall-content{height:auto;flex:1;min-height:0}#hall-content iframe{height:100%;width:100%;border:0}#hall-status:empty{display:none}
.prostration-status{position:absolute;bottom:7.9rem;left:50%;transform:translateX(-50%);width:min(450px,80vw);text-align:center;padding:.5rem 1rem;background:#172b25e6;border:1px solid #dfc18a55;border-radius:12px;font-size:.85rem}.prostration-status progress{display:block;width:100%;height:6px;margin:.5rem 0;accent-color:#dfc18a}.prostration-status small{font-size:.66rem;color:#ced1bc}#prostrate[aria-pressed=true]{background:#dfc18a;color:#1d352a}
@media(max-width:600px){#hall-dialog[open]{inset:4.5rem .4rem .4rem;width:calc(100vw - .8rem);height:calc(100dvh - 4.9rem);padding:.6rem}#hall-dialog .eyebrow{font-size:.65rem;margin-bottom:.2rem}.prostration-status{bottom:10.5rem}.prostration-status small{font-size:.6rem}}

.prostration-status{left:auto;right:1.4rem;top:7rem;bottom:auto;transform:none;width:220px;pointer-events:none}.bowing .context-bar{visibility:hidden}.bowing .prostration-status{top:auto;right:auto;left:50%;bottom:7.8rem;transform:translateX(-50%);width:min(440px,88vw)}@media(max-width:600px){.prostration-status{top:8rem;right:.5rem;width:160px;font-size:.72rem}.bowing .prostration-status{bottom:10rem;top:auto}}
#hall-dialog[open][data-hall=mandala]{inset:.7rem;width:calc(100vw - 1.4rem);height:calc(100dvh - 1.4rem);padding:.65rem}#hall-dialog[data-hall=mandala] .panel-head{margin-bottom:.3rem}#hall-dialog[data-hall=mandala] .eyebrow{display:none}@media(max-width:600px){#hall-dialog[open][data-hall=mandala]{inset:.3rem;width:calc(100vw - .6rem);height:calc(100dvh - .6rem);padding:.4rem}}

/* Keep the repeating-bow counter beside the actor, never across the hands. */
.bowing .prostration-status{left:auto;right:1.4rem;top:auto;bottom:7.8rem;transform:none;width:270px}@media(max-width:600px){.bowing .prostration-status{top:8rem;bottom:auto;right:.5rem;width:160px}}

.seated .context-bar{left:auto;right:1.4rem;transform:none;flex-direction:column;align-items:stretch;bottom:8rem}@media(max-width:600px){.seated .context-bar{right:.5rem;width:150px;top:15rem;bottom:auto}.seated .context-bar button{white-space:normal}}

/* Local inspection only; default-hidden HTML keeps release and failed config loads automatic. */
body:not(.in-visit) #debug-lighting{display:none}#debug-lighting{border-color:#d8b978;color:#f7dfae;min-width:7.1rem}#debug-lighting[data-mode=day]{background:#67512f}#debug-lighting[data-mode=night]{background:#26334b}
@media(max-width:600px){#debug-lighting{min-width:0}.in-visit .location-card{top:7.3rem}}

#goshuin-art{max-width:280px;margin:1rem auto}#goshuin-art svg{width:100%;height:auto;max-height:46vh}.asset-credits{position:fixed;bottom:.5rem;left:.65rem;max-width:460px;font-size:10px;color:#e2ddc8;z-index:4}.asset-credits summary{cursor:pointer;opacity:.66}.asset-credits[open]{background:#172c25ed;padding:12px;border-radius:10px}.asset-credits a{color:#f2d69c}.asset-credits p{line-height:1.7}@media(max-width:650px){.asset-credits{bottom:5.5rem;max-width:85vw}}

.outdoor-controls{position:absolute;bottom:205px;left:50%;transform:translateX(-50%);display:flex;gap:12px;align-items:center;background:rgba(25,45,37,.94);border:1px solid #b5a57966;border-radius:16px;padding:14px 18px;color:#f7eac7;max-width:92vw;flex-wrap:wrap;justify-content:center}.outdoor-controls[hidden]{display:none}.outdoor-controls output{font-size:14px;font-variant-numeric:tabular-nums}.outdoor-controls button{background:#d8be85;color:#20382e}.outdoor-controls span{font-family:serif;font-size:20px}@media(max-width:650px){.outdoor-controls{bottom:185px;width:88%;gap:8px;padding:10px}.outdoor-controls button{padding:10px}}
.solar-stages button[aria-pressed="true"]{background:#dfc18a;color:#1d352a}

.scripture-panel {
  width: min(960px, 94vw);
  height: min(760px, 88dvh);
  max-height: 92dvh;
  padding: 0;
  overflow: hidden;
}
.scripture-panel[open] { display: flex; flex-direction: column; }
.scripture-panel .panel-head {
  flex: none;
  margin: 0;
  padding: .85rem 1.35rem;
  border-bottom: 1px solid var(--border);
}
.scripture-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(150px, 23%) minmax(0, 1fr);
}
.scripture-books {
  padding: 1.15rem .7rem;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}
.scripture-book { display: block; width: 100%; margin-bottom: .35rem; padding: .9rem; border: 1px solid transparent; background: transparent; text-align: start; }
.scripture-book[aria-current=true] { background: #32493e; border-color: #ad9663; color: #fff0c9; }
.scripture-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  color-scheme: light;
  background: #f4efe2;
  color: #322f26;
}
.scripture-page-head { flex: none; margin: 0 clamp(1rem, 4vw, 3rem); padding: 1.25rem 0 .85rem; border-bottom: 1px solid #c9c2aa; }
.scripture-entries { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.scripture-entry { border: 0; border-radius: 0; padding: .2rem 0; border-bottom: 2px solid transparent; color: #625b4e; background: transparent; font-size: .85rem; }
.scripture-entry:hover:not(:disabled), .scripture-entry[aria-current=true] { color: #774a25; background: transparent; border-bottom-color: #9b7147; }
.scripture-page h3 { color: #493723; margin: .55rem 0 .8rem; font: 500 clamp(1.35rem, 3vw, 1.9rem)/1.4 "Songti TC","Noto Serif TC",serif; }
.scripture-tools { display: flex; gap: .5rem 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.scripture-tools audio { width: min(100%, 22rem); height: 38px; }
.scripture-tools label { display: inline-flex; align-items: center; gap: .25rem; font-size: .85rem; color: #514c40; }
#scripture-audio-status { margin: .5rem 0 0; font-size: .88rem; }
#scripture-audio-status button { background: transparent; color: #62462c; text-decoration: underline; border: 0; padding: .25rem; }
.scripture-verses { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: .15rem clamp(1rem, 4vw, 3rem) 2rem; }
.scripture-verse { padding: 1.05rem 0; border-bottom: 1px solid #ddd6c3; overflow-wrap: anywhere; }
.scripture-verse p { margin: 0; }
.scripture-tibetan { font: 1.42rem/1.9 "Kailasa","Noto Serif Tibetan","Microsoft Himalaya",serif; }
.scripture-chinese, .scripture-pronunciation { font: 1.08rem/1.75 "Songti TC","Noto Serif TC",serif; }
.scripture-romanization, .scripture-chinese + .scripture-pronunciation { color: #665e4f; font: .88rem/1.7 system-ui,sans-serif; }
@media (max-width: 640px) {
  .scripture-panel { width: 96vw; height: 90dvh; }
  .scripture-panel .panel-head { padding: .55rem .8rem; }
  .scripture-panel .panel-head h2 { font-size: 1.22rem; }
  .scripture-layout { display: flex; flex-direction: column; }
  .scripture-books { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; padding: .45rem; border: 0; }
  .scripture-book { margin: 0; padding: .42rem .5rem; font-size: .85rem; }
  .scripture-page { flex: 1; }
  .scripture-page-head { padding-top: .55rem; }
  .scripture-tools audio { flex: 1 1 150px; min-width: 0; }
  .scripture-tools label { flex: none; }
  .scripture-verse { padding: .8rem 0; }
  .scripture-tibetan { font-size: 1.25rem; }
}
@media (max-height: 500px) {
  .scripture-panel { height: 96dvh; max-height: 96dvh; }
  .scripture-layout { display: grid; grid-template-columns: minmax(112px, 24%) minmax(0, 1fr); }
  .scripture-books { display: block; }
  .scripture-page-head { padding: .25rem 0; }
  .scripture-page h3 { margin: .15rem 0; }
}
.panel-actions { display: flex; align-items: center; gap: .4rem; }
.chant-button { white-space: nowrap; }
.chant-button > span { display: inline-block; vertical-align: .02em; margin-inline-end: .4em; width: 0; height: 0; border-top: .34em solid transparent; border-bottom: .34em solid transparent; border-left: .52em solid currentColor; }
.chant-button[aria-pressed=true] { color: #f6d89a; }
.chant-button[aria-pressed=true] > span { width: .53em; height: .68em; border: 0; border-inline: .17em solid currentColor; }
@media (max-width: 600px) {
  .panel-actions button { padding: .45rem .55rem; font-size: .82rem; }
  .scripture-panel .panel-head { gap: .3rem; }
  .top-actions .chant-button { padding-inline: .42rem; }
}
@media (max-width: 360px) {
  .actionbar button { padding-inline: .34rem; }
  .topbar { padding-inline: .55rem; }
  .top-actions { max-width: 190px; }
}

body:has(#hall-dialog[open], #sound-dialog[open], #scripture-dialog[open]) .top-actions .chant-button { visibility: hidden; }

/* The lamp court can also be opened directly from a private invitation. */
body.standalone-lamp{position:relative;overflow:auto;height:auto;min-height:100dvh;background:#171411;color:#efe4d3}
.standalone-lamp-main{width:min(100% - 1.5rem,69rem);margin:0 auto;padding:1rem 0 2rem}
.return-temple{display:inline-block;margin:.2rem 0 .85rem;color:#ddc895;text-decoration:underline;text-underline-offset:.3em}
#hall-content:has(.lamp-court){overflow:auto;overscroll-behavior:contain}

#wallet-picker { width:min(28rem,calc(100vw - 2rem)); }
#wallet-network,#sign-wallet { color:var(--gold); }
.wallet-choices { display:grid; gap:.55rem; }
.wallet-choices button { width:100%; min-height:2.9rem; text-align:start; }
.wallet-choices button:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
#wallet-status { line-height:1.6; }
