.temple-dialog{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#202e26;color:#e9eddd}.temple-viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:crosshair}.world-stage{position:absolute;left:50%;top:50%;width:1500px;height:1000px;transform-origin:center;will-change:transform}.world-background{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}.world-stage canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.temple-dialog[data-world="moon"] .world-background{filter:brightness(.38) saturate(.65) hue-rotate(25deg)}.temple-vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#11271b50,transparent 25%,transparent 70%,#14251c70)}.temple-top{position:absolute;top:0;left:0;right:0;padding:22px 30px;display:flex;align-items:flex-start;justify-content:space-between;gap:15px;pointer-events:none}.temple-top>*{pointer-events:auto}.temple-brand{display:flex;align-items:center;gap:10px;padding:10px 15px;border:1px solid #fff3;border-radius:12px;background:#f6f6e8e8;color:#53664a;backdrop-filter:blur(15px)}.temple-brand>strong{font:700 25px var(--serif);letter-spacing:4px}.temple-brand>div{font-size:9px;line-height:1.8;border-left:1px solid #d1dbc6;padding-left:12px}.temple-brand input{width:105px;border:0;background:none;color:#53664a;outline-offset:1px;font:10px var(--sans);padding:0}.temple-top-right{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.temple-pill{display:flex;align-items:center;gap:7px;background:#f7f7e9e8;border:1px solid #fff6;border-radius:30px;padding:9px 14px;color:#5c7050;font-size:10px;backdrop-filter:blur(12px)}.temple-pill:hover{background:#fffff5}.temple-pill svg{width:15px;height:15px}.temple-location{position:absolute;left:50%;top:25px;transform:translateX(-50%);text-align:center;color:white;text-shadow:0 1px 10px #16231780;pointer-events:none}.temple-location strong{display:block;font:22px var(--serif);letter-spacing:4px}.temple-location span{font-size:9px;opacity:.8;letter-spacing:1px}.temple-guide{position:absolute;left:50%;top:100px;transform:translateX(-50%);background:#fffff1d9;color:#718060;padding:8px 16px;border-radius:30px;font-size:10px;text-align:center;max-width:85%;pointer-events:none;backdrop-filter:blur(8px)}.temple-area-tabs{position:absolute;left:25px;top:110px;display:flex;flex-direction:column;gap:7px}.temple-area-tabs button{background:#f8f8e8d9;color:#7d8a6f;border:1px solid #fff4;border-radius:8px;padding:9px 15px;font-size:10px;backdrop-filter:blur(10px);text-align:left}.temple-area-tabs button.active{background:#586d4be8;color:#fff;border-color:#a9bb9370}.temple-actions{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:6px;padding:8px;background:#f8f8ebee;color:#566b4c;border:1px solid #fff8;border-radius:17px;backdrop-filter:blur(18px);box-shadow:0 5px 30px #10271920;max-width:95vw}.temple-actions button{min-width:68px;padding:9px 11px;border-radius:11px;font-size:10px;display:flex;align-items:center;flex-direction:column;gap:5px;white-space:nowrap;transition:.2s}.temple-actions button:hover,.temple-actions button.active{background:#e0e7d3}.temple-actions .action-symbol{font-size:23px;line-height:1.2;height:28px;display:flex;align-items:center}.temple-actions kbd{font:8px var(--sans);color:#9aa58d;background:#e8eddf;border-radius:3px;padding:0 4px;margin-left:3px}.temple-actions .action-split{height:40px;width:1px;background:#dce4d0;margin:0 3px}.temple-bottom-left{position:absolute;left:25px;bottom:35px;color:#e5ebda;text-shadow:0 1px 6px #15291680;font-size:10px;max-width:200px}.temple-bottom-left button{font-size:10px;color:#e5ebda;padding:0;display:flex;gap:5px;align-items:center}.temple-bottom-left p{font-size:8px;opacity:.75;margin:7px 0 0}.temple-bottom-right{position:absolute;bottom:36px;right:25px;text-align:right;color:#edf0e1;text-shadow:0 1px 5px #18301d;font-size:10px}.temple-bottom-right strong{font:22px var(--serif)}.temple-bottom-right span{display:block;font-size:8px;opacity:.8}.temple-loading{position:absolute;inset:0;background:#eff1e6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;z-index:5;color:#697f57}.temple-loading .brand-mark{font-size:70px}.temple-loading h2{font:28px var(--serif);margin:0}.temple-loading p{font-size:12px;color:#929e86}.temple-loading button{font-size:11px;color:#637c51;border-bottom:1px solid #aab99a}.temple-loading.hidden{display:none}.temple-toast{position:absolute;top:150px;left:50%;transform:translateX(-50%);padding:10px 20px;background:#f9faedec;color:#617353;border:1px solid #fff8;border-radius:10px;font-size:11px;pointer-events:none;opacity:0;transition:.3s;max-width:85%;text-align:center;z-index:4}.temple-toast.visible{opacity:1}.ritual-dialog{text-align:center;width:min(490px,calc(100% - 28px))}.ritual-object{height:230px;width:230px;background-image:url('assets/ritual-objects.png');background-size:200% 100%;background-position:left center;margin:10px auto;touch-action:none;cursor:grab;user-select:none;outline-offset:3px}.ritual-object:active{cursor:grabbing}.moktak-object{background-position:right center;cursor:pointer;transition:transform .08s}.moktak-object.hit{transform:scale(.94) rotate(-3deg)}.ritual-count{font:36px var(--serif);color:#687e56;display:block;line-height:1.2}.ritual-count-label{font-size:10px;color:#98a589}.ritual-dialog .text-button{margin-top:17px}.ritual-object-hint{font-size:10px;color:#9ba48d;margin:14px 0}.ritual-inline{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:15px;font-size:11px}.ritual-inline input{max-width:130px}.ritual-inline select{font:11px var(--sans);background:#f1f4e8;border:1px solid #dfe6d2;padding:6px 10px;color:#708461;border-radius:6px}.bead-counter-ring{position:absolute;pointer-events:none;width:12px;height:12px;border-radius:50%;background:#d7e3bf;box-shadow:0 0 15px #d0e59c;top:20%;left:48%}.bead-wrap{position:relative;width:230px;margin:auto}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:15px 0;font-size:11px}.settings-row label>small{display:block;font-size:9px;color:#9aa68c;margin-top:4px}.settings-row input[type=range]{max-width:120px;flex:none;width:100px}.settings-row input[type=checkbox]{accent-color:#6a8156;width:17px;height:17px;flex-shrink:0}.settings-section-title{font-size:12px;margin:22px 0 0;color:#748965}.chant-actions{display:flex;gap:8px;margin:18px 0 10px}.chant-actions button{flex:1;font-size:11px;border:1px solid #dbe3cd;border-radius:8px;padding:10px;color:#7b8d69}.chant-actions button.active{background:#e4ecd9;border-color:#a1b38c;color:#536c40}.chant-status{font-size:10px;color:#889a78;line-height:1.9}.room-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:18px;max-height:330px;overflow:auto;padding:3px}.room-grid button{border:1px solid var(--line);border-radius:9px;padding:12px 4px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;color:#7a8c68}.room-grid button span{font-size:9px;color:#a1ac95}.room-grid button.selected{background:#e1ead3;border-color:#a9ba93}.temple-help p{font-size:11px;line-height:1.9;color:#8b987e}.temple-help ul{padding-left:17px;font-size:11px;line-height:2;color:#7c8c6f}.participant-list{display:flex;flex-direction:column;gap:9px;margin:20px 0}.participant-list>div{padding:12px 15px;background:#eaf0e0;border-radius:8px;font-size:12px;display:flex;align-items:center;justify-content:space-between}.participant-list small{font-size:9px;color:#94a285}.sleep-dialog{text-align:center}.sleep-dialog h2{font-family:var(--serif);font-size:28px}.sleep-dialog p{font-size:12px;color:#879779}.room-dialog .dialog-intro{margin-bottom:10px}.room-dialog .text-button{font-size:10px}.hero-art{object-position:center 80%}.temple-connection-error{color:#a4775b!important}
@media(max-width:1100px){.temple-bottom-left{bottom:125px}.temple-bottom-right{bottom:125px}.temple-location{top:95px}.temple-guide{top:155px}.temple-area-tabs{top:90px}.temple-toast{top:200px}}
@media(max-width:600px){.temple-top{padding:14px;gap:7px}.temple-brand{padding:9px 11px;gap:6px}.temple-brand>strong{font-size:21px}.temple-brand>div{padding-left:8px;font-size:8px}.temple-brand input{width:80px;font-size:9px}.temple-top-right{gap:5px;max-width:165px}.temple-pill{font-size:9px;padding:7px 9px;gap:4px}.temple-pill svg{width:13px;height:13px}.temple-location{top:110px}.temple-location strong{font-size:21px}.temple-area-tabs{left:12px;top:175px;gap:6px}.temple-area-tabs button{font-size:9px;padding:8px 11px}.temple-guide{top:auto;bottom:147px;font-size:9px;width:max-content;max-width:88%;padding:8px 12px}.temple-actions{bottom:max(20px,env(safe-area-inset-bottom));gap:1px;padding:6px;border-radius:14px;width:calc(100% - 20px);justify-content:space-around}.temple-actions button{min-width:0;padding:8px 5px;font-size:8px;gap:4px}.temple-actions .action-symbol{font-size:21px;height:25px}.temple-actions kbd{display:none}.temple-actions .action-split{margin:0;width:1px}.temple-bottom-left{bottom:112px;left:15px;font-size:9px}.temple-bottom-left button{font-size:9px}.temple-bottom-left p{font-size:7px}.temple-bottom-right{bottom:111px;right:15px}.temple-bottom-right strong{font-size:18px}.temple-toast{top:265px;font-size:10px}.hero-art{object-position:82% center}.ritual-object{height:210px;width:210px}.bead-wrap{width:210px}.room-grid{grid-template-columns:repeat(3,1fr)}.settings-row{font-size:10px}.settings-row input[type=range]{width:90px}.settings-row label>small{font-size:8px}.temple-brand .brand-mark{display:none}}
/* The action buttons use the same hand-painted assets as the scene. */
.temple-actions .action-symbol{font-size:0;width:30px;height:42px;background-repeat:no-repeat}
.temple-actions [data-temple-action="pray"] .action-symbol{background-image:url('assets/action-pray.png');background-size:contain;background-position:center;width:42px}
.temple-actions [data-temple-action="bow"] .action-symbol{background-image:url('assets/action-bow.png');background-size:contain;background-position:center;width:42px}
.temple-actions [data-temple-action="sit"] .action-symbol{background-image:url('assets/action-sit.png');background-size:contain;background-position:center;width:42px}
.temple-actions [data-temple-action="beads"] .action-symbol{background-image:url('assets/ritual-objects.png');background-size:84px 42px;background-position:2px center;width:42px}
.temple-actions [data-temple-action="moktak"] .action-symbol{background-image:url('assets/ritual-objects.png');background-size:84px 42px;background-position:right center;width:42px}
.temple-actions [data-temple-action="chant"] .action-symbol{background-image:url('assets/ritual-illustrations.png');background-size:126px 42px;background-position:center;width:42px;mix-blend-mode:multiply}
@media(max-width:600px){.temple-actions .action-symbol{height:42px}.temple-guide{bottom:165px}.temple-bottom-left,.temple-bottom-right{bottom:130px}}

/* 3D canvas follows the viewport; orbit is owned by the camera. */
.world-stage{inset:0;left:0;top:0;width:100%;height:100%;transform:none!important}.world-background{display:none}.world-stage canvas{display:block;width:100%;height:100%}.temple-area-tabs{max-height:50vh;overflow:auto}.temple-loading button{padding:8px}.temple-dialog[data-world="moon"] .world-stage{filter:none}

#beads-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;inset:0;margin:0;border-radius:0;display:none;flex-direction:column;justify-content:center;background:radial-gradient(ellipse at center,#fffdf3,#e6eadb)}#beads-dialog[open]{display:flex}.bead-wrap{width:min(52vh,430px);height:min(52vh,430px)}#bead-object{width:100%;height:100%;margin:0}.beads-3d{background-image:none}.bead-counter-ring[hidden]{display:none}

html:has(#temple-dialog[open]){overflow:hidden}.temple-actions{box-sizing:border-box}@media(max-width:600px){.temple-actions{max-width:calc(100vw - 20px)}.temple-actions button{flex:1;min-width:0}.temple-actions .action-symbol{max-width:42px}}
/* Failure is a settled state; small landscape screens can scroll every recovery action. */
.temple-loading{box-sizing:border-box;overflow:auto;padding:24px 20px;gap:14px;text-align:center}.temple-loading h2{font-size:clamp(21px,4vw,28px)}.temple-loading p{line-height:1.8;max-width:440px;margin:0}.temple-loading button{min-height:40px;flex-shrink:0}.temple-loading button:disabled{opacity:.45;cursor:wait}.temple-loading[data-state="error"] .brand-mark,.temple-loading[data-state="lost"] .brand-mark{animation:none}
@media(max-height:600px){.temple-loading{justify-content:flex-start}.temple-loading .brand-mark{font-size:36px}#beads-dialog[open]{justify-content:flex-start;overflow:auto}.bead-wrap{flex-shrink:0}}
@media(max-height:500px) and (min-width:601px){.temple-bottom-left,.temple-bottom-right{bottom:12px}.temple-area-tabs{max-height:calc(100dvh - 150px)}}
/* The close action remains reachable after scrolling a long settings/practice sheet. */
dialog .dialog-close{position:sticky;top:0;right:auto;float:right;align-self:flex-end;z-index:3;margin:-24px -24px 0 0;background:var(--paper);border-radius:50%;flex-shrink:0}
@media(max-width:600px){dialog .dialog-close{margin-right:-12px}}
/* Quiet material study: warm paper, sandalwood and aged brass. */
#beads-dialog{background:radial-gradient(ellipse at 50% 38%,#fffdf8 0%,#f0eade 58%,#ded5c5 100%);color:#514438;padding:44px 24px 28px}
#beads-dialog .eyebrow{color:#9a805b;letter-spacing:.25em;font-size:10px;margin:12px 0}
#beads-dialog h2{color:#493d32;font-weight:400;letter-spacing:.04em}
#beads-dialog .dialog-intro{color:#8e8071}
#beads-dialog .bead-wrap{width:min(56vh,480px,88vw);height:min(56vh,480px,88vw);margin:0 auto;background:radial-gradient(ellipse at 50% 85%,#80634415,transparent 45%)}
#beads-dialog .ritual-count{color:#61503c;font-size:44px;font-weight:400;font-variant-numeric:tabular-nums}
#beads-dialog .ritual-count-label{color:#9a886e;letter-spacing:.12em}
#beads-dialog .ritual-object-hint{color:#8b7c68}
#beads-dialog .text-button{color:#8b7659;margin-top:12px}
@media(max-height:600px){#beads-dialog{padding-top:22px}#beads-dialog .bead-wrap{width:260px;height:260px}}
.singing-dialog{text-align:center;width:min(520px,calc(100vw - 28px));background:radial-gradient(ellipse at 50% 30%,#fffdf5,#eee9dc)}
.singing-dialog h2{font-weight:400;font-size:26px;color:#514531}.singing-strike{display:flex;flex-direction:column;align-items:center;width:240px;margin:10px auto 24px;gap:8px;color:#8a7550;font-size:11px}.singing-strike svg{width:240px;height:165px;filter:drop-shadow(0 10px 15px #5c452314)}.singing-strike:active svg{transform:scale(.98)}.singing-dialog .primary-button{margin-top:24px}.singing-dialog .settings-row{text-align:left}

/* Offering popup: original glass treatment; supplied QR pixels are untouched. */
dialog.support-dialog{width:min(354px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow-y:auto;padding:24px 26px 20px;border-radius:26px;border:1px solid #f8f3dc4d;background:linear-gradient(145deg,#24382fe8,#1d2923ed);color:#f4f2e8;backdrop-filter:blur(22px);box-shadow:0 24px 90px #06150e66;text-align:center;scrollbar-width:thin;scrollbar-color:#b2baa455 transparent}
.support-dialog::backdrop{background:#07130d55;backdrop-filter:blur(3px)}
.support-dialog h2{font:600 20px var(--sans);text-align:left;margin:0 34px 24px 0;letter-spacing:-.5px;color:#f6f4e9}
.support-dialog .dialog-close{top:16px;right:17px;color:#dce3d3;background:#ffffff0a;border:0;width:34px;height:34px;border-radius:50%}
.support-dialog .dialog-intro{font-size:12px;color:#e0e4d5;line-height:1.7;margin:0 0 17px}
.support-account{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:1px solid #a6b89a55;border-radius:16px;background:linear-gradient(130deg,#58705299,#344b3b);color:#f4f5e8;padding:14px 15px;text-align:left;box-shadow:inset 0 1px #ffffff12;margin-bottom:15px}
.support-account small{display:block;font-size:10px;opacity:.8;margin-bottom:7px}.support-account strong{display:block;font-size:15px;letter-spacing:.3px;font-weight:650}.support-copy{font-size:10px;white-space:nowrap;opacity:.85}.support-account:hover{border-color:#cfdbb8}
.support-qr{margin:0;background:#fff;border-radius:18px;padding:22px 20px 17px;color:#596451;box-shadow:0 10px 30px #0002}.support-qr img{display:block;width:100%;height:auto;max-width:250px;margin:auto;object-fit:contain}.support-qr figcaption{font-size:10px;line-height:1.6;margin-top:15px;letter-spacing:-.2px}
.support-dialog .local-note{margin:18px 0 0;font-size:10px;line-height:1.7;color:#c2cbbb;border-top:1px solid #ffffff17;padding-top:14px}.support-dialog #support-options>a{margin-top:14px;color:#e7edcc}
@media(max-height:650px){dialog.support-dialog{padding:18px 22px 16px}.support-dialog h2{margin-bottom:16px}.support-qr{padding:16px}.support-qr img{max-width:195px}.support-dialog .local-note{margin-top:12px;padding-top:10px}}
