/* Chinese temple theme. All decoration is code-native and keeps the game controls accessible. */
html[data-theme="temple"] {
  --temple-red:#8b3029; --temple-red-deep:#5e211e; --temple-gold:#c8a66a;
  --temple-paper:#f2e7d0; --temple-ink:#3c2b23; --temple-muted:#7d6853;
  --sansa-ui:"Songti SC","STSong","Noto Serif SC","SimSun",serif;
  --paper:var(--temple-paper); --ink:var(--temple-ink); --muted:var(--temple-muted);
  --glass-focus:#dbb777; --glass-ink:#f4e3bd; --regular-ink:#3c2b23;
  --regular-muted:#7d6853; --regular-line:#b49a6c55; --regular-fill:#ede0c3;
  font-family:var(--sansa-ui);
}
html[data-theme="temple"] body {background:#211b14}
html[data-theme="temple"] button,html[data-theme="temple"] input,html[data-theme="temple"] textarea {font-family:var(--sansa-ui)}
html[data-theme="temple"] button:focus-visible,html[data-theme="temple"] a:focus-visible {outline:2px solid #c8954f;outline-offset:4px}
.temple-frame {position:fixed;inset:0;pointer-events:none;z-index:2;box-shadow:inset 0 0 110px #23170d40}
.temple-frame:before {content:"";position:absolute;inset:12px;border:1px solid #d5ba7a35;pointer-events:none}
.temple-masthead {position:fixed;top:24px;left:50%;transform:translateX(-50%);z-index:4;pointer-events:none;color:#f4e3b8;text-align:center;text-shadow:0 2px 10px #23160c,0 1px 2px #23160c}
.temple-masthead .temple-name {display:flex;align-items:center;justify-content:center;gap:20px;font:500 32px/1.3 var(--sansa-ui);letter-spacing:12px;padding-left:12px}
.temple-name:before,.temple-name:after {content:"";width:30px;height:1px;background:linear-gradient(90deg,transparent,#d8b77b)}
.temple-name:after {transform:rotate(180deg)}
.temple-masthead p {margin:7px 0 0;font-size:10px;letter-spacing:4px;color:#e0c99c}
html[data-theme="temple"] :is(.sansa-game,body) .game-header {top:28px;left:28px;right:28px}
html[data-theme="temple"] :is(.sansa-game,body) :is(.game-room-tools,.game-tools[data-liquid-nav],.game-modes[data-liquid-nav]),
html[data-theme="temple"] :is(.sansa-game,body) :is([data-liquid-glass="clear"],.game-toast,.chant-invite,.chant-banner,.moonlight-radio) {
  background:linear-gradient(130deg,#38281fec,#241b16f5)!important;
  border:1px solid #b3925e!important;border-radius:3px!important;
  box-shadow:0 5px 20px #1b100d38,inset 0 0 0 3px #332219,inset 0 0 0 4px #a5834945!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:#eddbb6!important;text-shadow:none!important;
}
html[data-theme="temple"] :is(.sansa-game,body) [data-liquid-nav]:before,
html[data-theme="temple"] :is(.sansa-game,body) [data-liquid-nav]:after {display:none}
html[data-theme="temple"] :is(.sansa-game,body) [data-liquid-nav] .liquid-nav-source {opacity:1!important;filter:none!important}
html[data-theme="temple"] :is(.sansa-game,body) [data-liquid-nav] canvas {display:none!important}
html[data-theme="temple"] :is(.sansa-game,body) :is(.tool,.exit-tool,#game-room,.game-modes button) {border-radius:1px;color:#eddbb6;letter-spacing:1px}
html[data-theme="temple"] :is(.sansa-game,body) .game-room-tools {padding:5px 9px!important;min-height:52px}
html[data-theme="temple"] :is(.sansa-game,body) #game-room>span {font-size:18px;letter-spacing:3px}
html[data-theme="temple"] :is(.sansa-game,body) .game-tools {padding:5px 8px!important;gap:5px}
html[data-theme="temple"] :is(.sansa-game,body) :is(.tool:hover,.game-modes button:hover) {background:#b6915430}
html[data-theme="temple"] :is(.sansa-game,body) .support-tool>span {font-size:0}
html[data-theme="temple"] :is(.sansa-game,body) .support-tool>span:before {content:"供";font:20px var(--sansa-ui);color:#dfba73;border:1px solid #a67d48;padding:3px}
html[data-theme="temple"] :is(.sansa-game,body) .game-bottom {width:min(430px,calc(100% - 36px));bottom:28px}
html[data-theme="temple"] :is(.sansa-game,body) .game-modes[data-liquid-nav] {height:78px;padding:7px 12px;overflow:visible}
html[data-theme="temple"] :is(.sansa-game,body) .game-modes[data-liquid-nav]:after {display:block;content:"日　课";position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:#7d2d26;border:1px solid #d1ad6a;color:#f3dbac;padding:3px 18px;font:11px var(--sansa-ui);letter-spacing:3px;pointer-events:none;z-index:3}
html[data-theme="temple"] :is(.sansa-game,body) .game-modes .liquid-nav-source {height:62px;gap:4px}
html[data-theme="temple"] :is(.sansa-game,body) .game-modes .liquid-nav-source>button {height:62px;min-width:65px;font-size:14px;gap:5px;letter-spacing:3px;border-right:1px solid #b3925e30}
html[data-theme="temple"] :is(.sansa-game,body) .game-modes .liquid-nav-source>button:last-child {border-right:0}
html[data-theme="temple"] :is(.sansa-game,body) .game-modes button svg {color:#d9b678;stroke-width:1.3;width:23px;height:23px}
html[data-theme="temple"] :is(.sansa-game,body) .game-modes button.is-active {background:#7d2d26!important;color:#ffebc0!important;box-shadow:inset 0 0 0 1px #c5a05a80}
html[data-theme="temple"] :is(.sansa-game,body) .game-hint {font-size:12px;letter-spacing:2px;color:#f6e9cb;text-shadow:0 1px 5px #28190b;opacity:.85}
html[data-theme="temple"] :is(.sansa-game,body) .game-context {top:128px}
html[data-theme="temple"] :is(.sansa-game,body) .chant-invite {padding:10px 17px;letter-spacing:2px;top:92px;right:28px;font-size:12px}
html[data-theme="temple"] :is(.sansa-game,body) .game-toast {font-size:14px;letter-spacing:1px;padding:14px 24px}
html[data-theme="temple"] :is(.sansa-game,body) .visitor-label {background:#f2e4c9ed;color:#644332;border:1px solid #a88150;border-radius:2px;box-shadow:0 2px 8px #29160b20;font-family:var(--sansa-ui)}
html[data-theme="temple"] :is(.sansa-game,body) .visitor-label-me {background:#8b3029;color:#f4e2b7;border-radius:1px}
/* Scroll-like dialogs: opaque warm paper, bronze rules, and cinnabar seals. */
html[data-theme="temple"] :is(.sansa-game,body) :is(.game-dialog,.cafe25-artwork-dialog,.cafe25-coffee-panel,.cafe25-share) {
 --regular-ink:#3c2b23;--regular-muted:#78624d;--regular-line:#b59a6c55;--regular-fill:#eee0c5;
 color:#3c2b23!important;background-color:#f2e7d0!important;
 background-image:radial-gradient(ellipse at 15% 10%,#fff9e980,transparent 65%),repeating-linear-gradient(0deg,#896b3b04 0px,#896b3b04 1px,transparent 1px,transparent 4px)!important;
 border:1px solid #b49660!important;border-top:5px solid #773129!important;border-bottom:5px solid #773129!important;
 border-radius:0!important;box-shadow:0 24px 90px #140d0a65,inset 0 0 0 5px #e5d2ab,inset 0 0 0 6px #b99b6b70!important;
 backdrop-filter:none!important;-webkit-backdrop-filter:none!important;text-shadow:none!important;
 font-family:var(--sansa-ui)!important;padding:28px!important;
}
html[data-theme="temple"] :is(.sansa-game,body) .game-dialog::backdrop {background:#1b1510a3;backdrop-filter:blur(4px)}
html[data-theme="temple"] :is(.sansa-game,body) :is(.game-dialog,.cafe25-artwork-dialog,.cafe25-coffee-panel)>header,
html[data-theme="temple"] :is(.sansa-game,body) .cafe25-coffee-heading {padding:0 0 17px;margin:0 0 18px;border-bottom:1px solid #b4996866;gap:11px}
html[data-theme="temple"] :is(.sansa-game,body) .game-dialog>header:before {content:"禅";display:grid;place-items:center;flex:0 0 28px;width:28px;height:29px;background:#8b3029;color:#f9e8c7;border:2px solid #f2e7d0;outline:1px solid #8b3029;font:18px var(--sansa-ui)}
html[data-theme="temple"] :is(.sansa-game,body) :is(.game-dialog h2,.cafe25-coffee-heading h2) {color:#71312a!important;font-size:23px!important;font-weight:600;letter-spacing:4px!important;flex:1;line-height:1.5}
html[data-theme="temple"] :is(.sansa-game,body) .game-dialog h3 {color:#65472e;letter-spacing:1px;font-size:16px}
html[data-theme="temple"] :is(.sansa-game,body) :is(.dialog-close,.cafe25-coffee-close,.cafe25-share-close) {background:#e4d3b2!important;color:#744b39!important;border:1px solid #b69a6c!important;border-radius:2px!important;width:36px;height:36px;flex-shrink:0;margin-left:auto}
html[data-theme="temple"] :is(.sansa-game,body) :is(.dialog-description,.setting-row small,.audio-status,.control-help p,.small-note,.artwork-credit,.sound-credit,.sound-master p,.support-description,.support-note,#visitor-list small,.cafe25-share-description,.cafe25-share-note,.cafe25-share-status,.cafe25-artwork-dialog p) {color:#78624d!important;line-height:1.85}
html[data-theme="temple"] :is(.sansa-game,body) :is(.sound-channel,.chant-section,.support-account,.cafe25-delivery,.cafe25-coffee-purpose) {border:1px solid #b89b6955!important;background:#fff8e85c!important;color:#3c2b23!important;border-radius:3px!important;box-shadow:none!important}
html[data-theme="temple"] :is(.sansa-game,body) .sound-channel {padding:18px!important}
html[data-theme="temple"] :is(.sansa-game,body) .sound-channel-icon {color:#9c6d3a}
html[data-theme="temple"] :is(.sansa-game,body) :is(.sound-channel-toggle,.chant-heading button,.chant-review-buttons button,.solid-button,.outline-button,.support-payment,.room-option,.cafe25-coffee-purpose,.cafe25-share button) {border-radius:2px!important;font-family:var(--sansa-ui)!important;letter-spacing:1px}
html[data-theme="temple"] :is(.sansa-game,body) :is(.sound-channel-toggle,.chant-review-buttons button,.outline-button) {color:#764735!important;border:1px solid #b896625e!important;background:#e5d6b8!important}
html[data-theme="temple"] :is(.sansa-game,body) :is(.solid-button,.cafe25-share-send,.support-payment,.cafe25-coffee-brew) {background:#84342c!important;color:#f9e8c7!important;border:1px solid #a47645!important;box-shadow:inset 0 0 0 3px #84342c,inset 0 0 0 4px #d4ae6445!important}
html[data-theme="temple"] :is(.sansa-game,body) :is(.sound-channel-toggle[aria-pressed=true],.chant-review-buttons button[aria-pressed=true]) {background:#84342c!important;color:#f9e8c7!important}
html[data-theme="temple"] :is(.sansa-game,body) .switch {border-radius:2px!important;background:transparent!important}
html[data-theme="temple"] :is(.sansa-game,body) .switch:before {border-radius:2px;background:#bbaa8c;border:1px solid #a38c67}
html[data-theme="temple"] :is(.sansa-game,body) .switch:after {background:#fff6df;border-radius:1px;box-shadow:0 1px 3px #37220f40}
html[data-theme="temple"] :is(.sansa-game,body) .switch[aria-checked=true]:before {background:#8b3029;border-color:#8b3029}
html[data-theme="temple"] :is(.sansa-game,body) input[type=range] {accent-color:#8b3029}
html[data-theme="temple"] :is(.sansa-game,body) input[type=range]::-webkit-slider-thumb {background:#8b3029!important;border:2px solid #f3dfb6!important;box-shadow:0 0 0 1px #9f704b!important;border-radius:50%}
html[data-theme="temple"] :is(.sansa-game,body) :is(input:not([type=range]),textarea) {background:#fff8e9!important;color:#4e3628!important;border:1px solid #b69b6b!important;border-radius:2px!important}
html[data-theme="temple"] :is(.sansa-game,body) :is(.game-dialog a:not(.solid-button):not(.support-payment),.text-button,.sound-credit summary,.control-help summary) {color:#8b3029!important}
html[data-theme="temple"] :is(.sansa-game,body) .support-account-number {color:#4e3628}
html[data-theme="temple"] :is(.sansa-game,body) :is(.room-list button,#visitor-list li) {border:1px solid #b89b694d;background:#fff8e860;color:#684d36;border-radius:2px;padding:12px}
html[data-theme="temple"] :is(.sansa-game,body) .room-list button:is([aria-current=true],[aria-pressed=true],.is-current) {border-color:#8b3029;background:#8b302911;color:#8b3029}
html[data-theme="temple"] :is(.sansa-game,body) :is(.visitor-mark,.visitor-mark svg) {color:#8b3029;background:#e4d2ae}
html[data-theme="temple"] :is(.sansa-game,body) .sound-credit,.control-help {border-color:#b4996855}
html[data-theme="temple"] :is(.sansa-game,body) .settings-dialog-body::-webkit-scrollbar-thumb {background:#b99c70;border-radius:0}
html[data-theme="temple"] :is(.sansa-game,body) .game-dialog::-webkit-scrollbar {width:5px}
html[data-theme="temple"] :is(.sansa-game,body) .game-dialog::-webkit-scrollbar-thumb {background:#b99c70}
/* Ritual views retain their original 3D instruments. */
html[data-theme="temple"] :is(.sansa-game,body) .sansa-beads-view {background:radial-gradient(ellipse at 50% 45%,#30221770,#180f0de0);--beads-ink:#f3dfb7;--beads-muted:#d2b889;--beads-count-ink:#f7d8a0;font-family:var(--sansa-ui)}
html[data-theme="temple"] :is(.sansa-game,body) .sansa-beads-view:before {content:"静 心 持 珠";position:absolute;top:88px;width:100%;text-align:center;color:#e3bd7c;font:22px var(--sansa-ui);letter-spacing:7px;pointer-events:none}
html[data-theme="temple"] :is(.sansa-game,body) .beads-stage {top:135px}
html[data-theme="temple"] :is(.sansa-game,body) :is(.beads-back,.beads-sound,.beads-counter,.beads-round,.beads-gesture-guide,.moktak-controls) {color:#eedab2!important;border-radius:2px!important;border:1px solid #b5935c!important;background:#302017ed!important;box-shadow:inset 0 0 0 3px #a27b3e22!important;text-shadow:none}
html[data-theme="temple"] :is(.sansa-game,body) .beads-count {color:#f5d29b;background:transparent;box-shadow:none;font-family:var(--sansa-ui)}
html[data-theme="temple"] :is(.sansa-game,body) .beads-gesture-guide {padding:8px 16px;letter-spacing:2px}
html[data-theme="temple"] :is(.sansa-game,body) .moktak-instrument:before {content:"静 心 叩 木 鱼";position:absolute;top:-28px;left:0;width:100%;font:18px var(--sansa-ui);letter-spacing:4px;color:#f0d6a4;text-shadow:0 1px 6px #21130d}
html[data-theme="temple"] :is(.sansa-game,body) .moktak-controls button {color:#eedab2;border-radius:1px}
html[data-theme="temple"] :is(.sansa-game,body) .moktak-controls button:hover {background:#8b3029}
html[data-theme="temple"] :is(.sansa-game,body) :is(.devotional-dock,.incense-note,.cafe25-coffee-dock,.cafe25-transfer,.cafe25-map-actions button,.cafe25-coffee-open) {background:#33231aed!important;color:#ecd5a8!important;border:1px solid #ae8d59!important;border-radius:2px!important;box-shadow:inset 0 0 0 3px #b18d4c22!important}
html[data-theme="temple"] :is(.sansa-game,body) .devotional-action {border-color:#aa874850;color:#eddbb6}
html[data-theme="temple"] :is(.sansa-game,body) .render-rest,html[data-theme="temple"] :is(.sansa-game,body) .game-loading {background:#efe2c9f5;color:#6b4330;font-family:var(--sansa-ui)}
html[data-theme="temple"] :is(.sansa-game,body) .game-loading h1 {font-size:32px;letter-spacing:10px;color:#8b3029}
html[data-theme="temple"] :is(.sansa-game,body) .render-rest button {background:#8b3029;color:#f5dfb4;border:1px solid #b5935b;border-radius:2px}
html[data-theme="temple"] #local-tools {left:28px;bottom:28px;gap:12px;padding:9px 14px;color:#e9d0a1;border:1px solid #a78b58;border-radius:2px;background:#2c211ae8;box-shadow:inset 0 0 0 3px #ae894022;backdrop-filter:none;font:11px var(--sansa-ui)}
html[data-theme="temple"] #local-tools span {color:#d8aa6c;opacity:1;font:11px var(--sansa-ui)}
html[data-theme="temple"] #local-tools button {color:#e9d0a1;font:12px var(--sansa-ui);letter-spacing:1px}
html[data-theme="temple"] #local-tools button:hover {color:#fff0c9}
@media(max-width:700px) {
 .temple-masthead {top:89px}.temple-masthead .temple-name {font-size:24px;letter-spacing:8px;gap:12px}.temple-masthead p {font-size:9px;letter-spacing:2px;margin-top:4px}
 .temple-name:before,.temple-name:after {width:16px}.temple-frame:before {inset:6px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-header {top:16px;left:12px;right:12px;gap:8px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-room-tools {padding:3px!important;min-height:46px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-tools {padding:3px!important;gap:0}
 html[data-theme="temple"] :is(.sansa-game,body) #game-room>span {font-size:16px;letter-spacing:1px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-context {top:156px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-hint {font-size:10px;letter-spacing:1px}
 html[data-theme="temple"] :is(.sansa-game,body) .chant-invite {top:151px;right:12px;padding:8px 10px;font-size:11px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-bottom {bottom:18px;width:calc(100% - 30px)}
 html[data-theme="temple"] :is(.sansa-game,body) .game-modes[data-liquid-nav] {height:76px;padding:7px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-modes .liquid-nav-source>button {min-width:0;font-size:13px;letter-spacing:2px}
 html[data-theme="temple"] #local-tools {bottom:112px;left:15px;padding:7px 10px;gap:9px}
 html[data-theme="temple"] :is(.sansa-game,body) :is(.game-dialog,.cafe25-artwork-dialog,.cafe25-coffee-panel,.cafe25-share) {padding:23px!important;max-width:calc(100% - 24px)}
 html[data-theme="temple"] :is(.sansa-game,body) .game-dialog h2 {font-size:21px!important;letter-spacing:3px!important}
 html[data-theme="temple"] :is(.sansa-game,body) .sansa-beads-view:before {top:151px;font-size:18px}
 html[data-theme="temple"] :is(.sansa-game,body) .beads-stage {top:195px}
}
@media(max-height:550px) {
 .temple-masthead {display:none}html[data-theme="temple"] :is(.sansa-game,body) .game-header{top:10px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-bottom{bottom:12px}html[data-theme="temple"] #local-tools{bottom:12px}
 html[data-theme="temple"] :is(.sansa-game,body) .game-context{top:85px}
 html[data-theme="temple"] :is(.sansa-game,body) .sansa-beads-view:before{top:72px}html[data-theme="temple"] :is(.sansa-game,body) .beads-stage{top:108px;bottom:120px}
}
@media(prefers-reduced-motion:reduce) {.temple-masthead,.temple-frame{animation:none}}
html[data-theme="temple"] :is(.sansa-game,body) .liquid-nav-lens {display:none!important}
html[data-theme="temple"] .sansa-boot {background:#f2e7d0;color:#81372d;font-family:var(--sansa-ui)}
html[data-theme="temple"] .sansa-boot-mark {color:#a88148}
html[data-theme="temple"] .sansa-boot h1 {font-size:32px;letter-spacing:10px}
html[data-theme="temple"] .sansa-boot p {color:#8c7053}
html[data-theme="temple"] :is(.sansa-game,body) .room-choice strong {color:#69462f;letter-spacing:1px}
html[data-theme="temple"] :is(.sansa-game,body) .room-choice span {color:#94744e}
html[data-theme="temple"] :is(.sansa-game,body) .room-choice.is-current {border-color:#8b3029;background:#8b302910}

/* Practice controls sit above the taller temple dock. */
html[data-theme="temple"] .sansa-game {--practice-controls-bottom:145px;--practice-stage-bottom:210px}
html[data-theme="temple"] :is(.sansa-game,body) .sansa-moktak-view {bottom:145px}
html[data-theme="temple"] :is(.sansa-game,body) .chant-invite {top:-34px}
html[data-theme="temple"] body:has(.sansa-game.is-practicing) #local-tools {display:none}
html[data-theme="temple"] .is-practicing .cafe25-map-actions {display:none!important}
@media(max-width:700px) {
 html[data-theme="temple"] .sansa-game {--practice-controls-bottom:150px;--practice-stage-bottom:215px}
 html[data-theme="temple"] :is(.sansa-game,body) .sansa-moktak-view {bottom:150px}
 html[data-theme="temple"] :is(.sansa-game,body) .chant-invite {top:-6px}
}
@media(max-height:550px) {
 html[data-theme="temple"] .sansa-game {--practice-controls-bottom:108px;--practice-stage-bottom:150px}
 html[data-theme="temple"] :is(.sansa-game,body) .sansa-moktak-view {bottom:108px}
}
html[data-theme="temple"] :is(.sansa-game,body) .cafe25-coffee-purpose[aria-pressed=true] {background:#84342c!important;color:#f9e8c7!important;border-color:#bb9458!important}
html[data-theme="temple"] :is(.sansa-game,body) .cafe25-coffee-purpose[aria-pressed=true] :is(strong,span,svg) {color:#f9e8c7!important}
html[data-theme="temple"] :is(.sansa-game,body) .cafe25-coffee-purpose:not([aria-pressed=true]) :is(strong,span) {color:#73553b}
html[data-theme="temple"] :is(.sansa-game,body) .cafe25-share-editor {border-color:#b69a6c;background:#fff8e96b;border-radius:2px}
html[data-theme="temple"] :is(.sansa-game,body) .cafe25-artwork-dialog img {border:5px solid #ddd0ad;outline:1px solid #b49b70;border-radius:0}
html[data-theme="temple"] :is(.sansa-game,body) .cafe25-context-actions {bottom:132px}
@media(max-width:700px) {html[data-theme="temple"] :is(.sansa-game,body) .cafe25-context-actions {bottom:165px}}
@media(max-height:550px) {html[data-theme="temple"] :is(.sansa-game,body) .cafe25-context-actions {bottom:110px}}
html[data-theme="temple"] #temple-track {width:104px;min-height:30px;background:#35251b;color:#edd7af;border:1px solid #a78b58;border-radius:1px;padding:4px 6px;font:12px var(--sansa-ui);cursor:pointer}
html[data-theme="temple"] .temple-track-field {display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;margin:14px 0 6px;font-size:12px;color:#79583e}
html[data-theme="temple"] .temple-track-field select {min-width:0;width:100%;min-height:38px;padding:7px 9px;border:1px solid #b99a67;background:#fff7e6;color:#65432c;border-radius:2px;font:14px var(--sansa-ui)}
html[data-theme="temple"] .temple-track-note {margin:8px 0 14px;font-size:11px;line-height:1.8;color:#866d53}
html[data-theme="temple"] #local-tools select:focus-visible {outline:2px solid #dbb777;outline-offset:3px}
@media(max-width:700px){html[data-theme="temple"] #local-tools{gap:8px}html[data-theme="temple"] #temple-track{width:98px;font-size:11px}}
html[data-theme="temple"] #local-tools {pointer-events:auto;isolation:isolate;max-width:calc(100vw - 30px)}
html[data-theme="temple"] #local-tools :is(button,select) {pointer-events:auto;touch-action:manipulation}
html[data-theme="temple"] #local-tools .temple-music-feedback {position:absolute;bottom:calc(100% + 10px);left:0;width:max-content;max-width:min(340px,calc(100vw - 30px));padding:10px 14px;border:1px solid #b5935c;background:#302017f5;color:#eedab2;font:12px/1.7 var(--sansa-ui);letter-spacing:1px;white-space:normal;pointer-events:none;box-shadow:0 4px 16px #1a100c40}
html[data-theme="temple"] #local-tools .temple-music-feedback[data-state=error] {background:#6e2924;color:#ffecd0;border-color:#d9a576}
html[data-theme="temple"] #local-tools .temple-music-feedback[hidden] {display:none!important}
html[data-theme="temple"] #ambient[aria-busy=true] {cursor:progress;opacity:.7}
.temple-track-picker {position:relative;flex-shrink:0}
html[data-theme="temple"] #local-tools #temple-track {display:flex;align-items:center;justify-content:space-between;gap:6px;text-align:left;padding:4px 7px!important;white-space:nowrap}
html[data-theme="temple"] #temple-track:after {content:"";width:5px;height:5px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-2px) rotate(45deg);flex-shrink:0}
html[data-theme="temple"] #temple-track[aria-expanded=true]:after {transform:translateY(2px) rotate(225deg)}
html[data-theme="temple"] #local-tools .temple-track-options {position:absolute;bottom:calc(100% + 16px);left:0;width:270px;max-width:calc(100vw - 32px);padding:5px;border:1px solid #b5935c;background:#302017;box-shadow:0 8px 28px #180f0ca0;z-index:3}
html[data-theme="temple"] #local-tools .temple-track-options[hidden] {display:none!important}
html[data-theme="temple"] #local-tools .temple-track-options button {display:block;width:100%;min-height:64px;padding:10px 12px;border:1px solid transparent;border-left:3px solid transparent;text-align:left;white-space:normal;color:#eedab2;font-family:var(--sansa-ui)}
html[data-theme="temple"] #local-tools .temple-track-options button+button {border-top:1px solid #b5935c35}
html[data-theme="temple"] #local-tools .temple-track-options button strong {display:block;font-size:14px;letter-spacing:2px;font-weight:500}
html[data-theme="temple"] #local-tools .temple-track-options button small {display:block;margin-top:5px;font-size:11px;line-height:1.6;color:#c6ae86;letter-spacing:0}
html[data-theme="temple"] #local-tools .temple-track-options button:is(:hover,:focus-visible) {background:#ae874f25;outline:1px solid #c8a66a;outline-offset:-1px}
html[data-theme="temple"] #local-tools .temple-track-options button[aria-selected=true] {background:#78302a;border-left-color:#d1ac6b}
@media(max-width:700px){html[data-theme="temple"] #local-tools .temple-track-options {left:-100px;width:270px}}
@media(max-width:360px){
 html[data-theme="temple"] #local-tools{gap:5px;padding:7px 8px}
 html[data-theme="temple"] #local-tools #temple-track{width:88px;font-size:11px}
 html[data-theme="temple"] #local-tools .temple-track-options{left:-80px}
 html[data-theme="temple"] #local-tools button{font-size:11px}
}
/* Music remains operable during startup and buffering; loading is cancellable. */
html[data-theme="temple"] #local-tools #ambient[aria-busy=true] {opacity:1;cursor:pointer;color:#ffe5ad}
html[data-theme="temple"] #local-tools :is(#ambient,#temple-track) {opacity:1;cursor:pointer;min-height:32px}
/* Keep song selection available while using beads or the wooden fish. */
html[data-theme="temple"] body:has(.sansa-game.is-practicing) #local-tools {display:flex}
@media(max-width:700px){html[data-theme="temple"] body:has(.sansa-game.is-practicing) #local-tools {bottom:98px}}
html[data-theme="temple"] #local-tools #ambient {background:#84342c;color:#ffe8be;box-shadow:inset 0 0 0 1px #c49c60;border-radius:1px}
html[data-theme="temple"] #local-tools #ambient:hover {background:#9a4034;color:#fff1d4}
html[data-theme="temple"] #local-tools #temple-track {color:#ffe6b5;border-color:#d0ae6d}
/* Named halls extend the existing lacquer/wood controls and native dialog. */
html,html * {scrollbar-color:#9d8056 #e9ddc3;scrollbar-width:thin}
html[data-theme="temple"] ::-webkit-scrollbar {width:10px;height:10px}
html[data-theme="temple"] ::-webkit-scrollbar-track {background:#e9ddc3}
html[data-theme="temple"] ::-webkit-scrollbar-thumb {background:#9d8056;border:2px solid #e9ddc3}
html[data-theme="temple"] ::-webkit-scrollbar-thumb:hover {background:#785c3c}
.temple-hall-identity {position:fixed;right:22px;bottom:88px;z-index:8;width:230px;max-width:calc(100vw - 28px);padding:12px 16px;color:#eddbb6;background:#33251de8;border:1px solid #b48d4d;font-family:"Songti SC","STSong",serif;box-shadow:0 5px 18px #0003}
.temple-hall-identity summary {cursor:pointer;list-style-position:inside}
.temple-hall-identity summary:focus-visible {outline:2px solid #f0d496;outline-offset:5px}
.temple-hall-identity summary:hover {color:#fff1d2}
.temple-hall-identity summary span {font-size:13px}
.temple-hall-identity h2 {font-size:22px;line-height:1.4;font-weight:500;margin:5px 0 0}
.temple-hall-identity p {font-size:13px;line-height:1.7;margin:8px 0 0}
.temple-hall-tradition {color:#d0b88b}
.room-deity {display:block;font-size:13px;line-height:1.5;opacity:.8}
.room-choice {cursor:pointer}
.room-choice:disabled {cursor:default}
.room-choice:focus-visible {outline:2px solid #8b3029;outline-offset:3px}
@media(max-width:600px){.temple-hall-identity {right:12px;bottom:calc(112px + env(safe-area-inset-bottom));width:156px;padding:8px 12px}.temple-hall-identity h2 {font-size:17px}.temple-hall-identity p {font-size:12px}.room-list {max-height:60vh;overflow:auto;scrollbar-gutter:stable}}
@media(forced-colors:active){html,html * {scrollbar-color:auto}.temple-hall-identity {background:Canvas;color:CanvasText;border-color:CanvasText}}
