*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden;background:#1a1410;font-family:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:#f5ead6;touch-action:none;user-select:none;-webkit-user-select:none}
#c{position:fixed;inset:0;width:100%;height:100%;display:block}
.hidden{display:none!important}
button{font-family:inherit;cursor:pointer}

.modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,rgba(60,35,10,.55),rgba(10,6,2,.85));z-index:20;padding:16px}
.card{width:100%;max-width:380px;background:rgba(40,24,10,.92);border:1px solid #b8862b;border-radius:16px;padding:28px 22px;text-align:center;box-shadow:0 10px 40px rgba(0,0,0,.5)}
.lotus{font-size:44px;color:#e8b64a}
.card h1{font-weight:600;letter-spacing:2px;color:#f3c968;margin:6px 0}
.sub{font-size:13px;opacity:.8;margin-bottom:18px}
.card input{width:100%;padding:12px 14px;margin-bottom:10px;border-radius:10px;border:1px solid #7a5a2a;background:#1d130a;color:#f5ead6;font-size:16px}
.primary{width:100%;padding:12px;border:0;border-radius:10px;background:linear-gradient(#e2a93a,#b67a1c);color:#2a1705;font-weight:700;font-size:16px}
.ghost{margin-top:12px;background:none;border:0;color:#d9c39b;text-decoration:underline;font-size:14px}
.err{color:#ff9d7a;font-size:13px;min-height:18px;margin-top:6px}
.hint{font-size:12px;opacity:.65;margin-top:14px;line-height:1.5}

#loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#1a1410;z-index:30;font-size:18px;color:#e8b64a}

#zone{position:fixed;top:12px;left:50%;transform:translateX(-50%);padding:6px 16px;border-radius:20px;background:rgba(30,18,6,.6);border:1px solid rgba(232,182,74,.5);font-size:14px;letter-spacing:1px;z-index:5;white-space:nowrap}
#topRight{position:fixed;top:10px;right:12px;display:flex;gap:8px;z-index:6}
#topRight button{width:42px;height:42px;border-radius:50%;border:1px solid rgba(232,182,74,.6);background:rgba(30,18,6,.65);font-size:20px;color:#fff}
#tip{position:fixed;bottom:110px;left:50%;transform:translateX(-50%);padding:8px 14px;border-radius:10px;background:rgba(20,12,4,.7);font-size:14px;opacity:0;transition:opacity .4s;pointer-events:none;z-index:5;text-align:center;max-width:90vw}
#tip.show{opacity:1}

#prayer{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);display:flex;gap:6px;z-index:6;flex-wrap:wrap;justify-content:center;max-width:calc(100vw - 24px)}
#prayer button{width:64px;padding:6px 2px;border-radius:12px;border:1px solid rgba(232,182,74,.6);background:rgba(40,22,6,.75);color:#f5ead6;font-size:22px;display:flex;flex-direction:column;align-items:center}
#prayer button span{font-size:11px;margin-top:2px}
#prayer button.on{background:rgba(196,138,36,.85);color:#2a1705}
#counter{position:fixed;top:56px;left:50%;transform:translateX(-50%);font-size:15px;padding:4px 14px;border-radius:14px;background:rgba(30,18,6,.6);z-index:5}
#standBtn{position:fixed;top:56px;left:12px;padding:8px 14px;border-radius:10px;border:1px solid #b8862b;background:rgba(40,22,6,.8);color:#f5ead6;z-index:6}

#sutra{position:fixed;top:92px;left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 24px));max-height:38vh;overflow:hidden;background:rgba(30,16,4,.72);border:1px solid rgba(232,182,74,.45);border-radius:12px;padding:14px;z-index:5;text-align:center}
#sutraText{font-size:17px;line-height:1.9;color:#f8e6bf}
#sutraText .cur{color:#ffd36b;font-weight:700;text-shadow:0 0 10px rgba(255,200,90,.6)}
#sutraText .done{opacity:.45}
#sutraStop{margin-top:8px;padding:4px 12px;border-radius:8px;border:1px solid #b8862b;background:none;color:#f5ead6}

#chat{position:fixed;right:12px;top:62px;width:min(320px,calc(100vw - 24px));height:min(360px,45vh);background:rgba(20,12,4,.78);border:1px solid rgba(232,182,74,.45);border-radius:12px;display:flex;flex-direction:column;z-index:7}
#chatHead{padding:8px 12px;border-bottom:1px solid rgba(232,182,74,.3);font-size:14px;color:#f3c968}
#online{font-size:12px;opacity:.75;color:#f5ead6}
#chatLog{flex:1;overflow-y:auto;padding:8px 12px;font-size:14px;line-height:1.45;user-select:text;-webkit-user-select:text}
#chatLog .m{margin-bottom:6px;word-wrap:break-word}
#chatLog .n{color:#f3c968;font-weight:600}
#chatLog .sys{opacity:.6;font-style:italic;font-size:12px}
#chatForm{display:flex;border-top:1px solid rgba(232,182,74,.3)}
#chatInput{flex:1;padding:10px;background:transparent;border:0;color:#fff;font-size:16px;outline:none;min-width:0}
#chatForm button{padding:0 14px;background:none;border:0;color:#f3c968;font-weight:700}

#joy{position:fixed;left:24px;bottom:24px;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.08);border:2px solid rgba(232,182,74,.35);z-index:4;display:none}
#joyKnob{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;background:rgba(232,182,74,.55)}
body.touch #joy{display:block}
body.touch.inhall #joy{bottom:110px}
@media (max-width:600px){
#prayer{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;left:8px;right:8px;transform:none;max-width:none;gap:5px;padding-bottom:2px;-webkit-overflow-scrolling:touch;touch-action:pan-x}
#prayer button{flex:0 0 58px;width:58px;font-size:19px}
#zone{left:12px;transform:none;font-size:12px;max-width:calc(100vw - 130px);overflow:hidden;text-overflow:ellipsis}
#counter{top:58px;font-size:13px}
#chat{top:auto;bottom:200px;height:34vh}
#sutra{top:auto;bottom:96px;max-height:22vh}
#sutraText{font-size:15px}
body.touch.inhall #joy{bottom:96px;width:100px;height:100px}
body.inhall #tip{bottom:210px}
}
#sutra{top:auto;bottom:92px;max-height:24vh}
#fade{position:fixed;inset:0;background:#000;opacity:0;pointer-events:none;transition:opacity .35s;z-index:15}#fade.on{opacity:1}
body.seated #joy{display:none!important}

#templeList{display:flex;flex-direction:column;gap:10px;margin-top:6px}
#templeList button{display:block;width:100%;text-align:left;padding:12px 14px;border-radius:12px;border:1px solid #7a5a2a;background:#1d130a;color:#f5ead6}
#templeList b{color:#f3c968;font-size:17px}#templeList small{display:block;opacity:.75;margin-top:3px;line-height:1.4}
#sv{position:fixed;inset:0;z-index:8;background:#000}
#svFrame{position:absolute;inset:0;width:100%;height:100%;border:0}
#svBar{position:absolute;left:0;right:0;bottom:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:flex;gap:8px;align-items:center;background:linear-gradient(transparent,rgba(20,10,2,.85));flex-wrap:wrap}
#svSpots{display:flex;gap:6px;flex:1;overflow-x:auto;min-width:0}
#svSpots button{flex:0 0 auto;padding:8px 12px;border-radius:18px;border:1px solid rgba(232,182,74,.6);background:rgba(40,22,6,.8);color:#f5ead6;font-size:14px}
#svSpots button.on{background:#c48a24;color:#2a1705}
#svHall{width:auto;padding:10px 16px}
body.svmode #topRight{z-index:9}
body.svmode #zone{z-index:9}
#yt{position:fixed;left:12px;top:56px;width:200px;height:200px;z-index:9;border-radius:10px;overflow:hidden;border:1px solid rgba(232,182,74,.5);background:#000;transition:opacity .4s}
#yt iframe{width:200px;height:200px;display:block}
#ytClose{position:absolute;right:4px;top:4px;width:26px;height:26px;border-radius:50%;border:0;background:rgba(0,0,0,.7);color:#fff;font-size:13px}
#topRight button.off{opacity:.45}
#admin{position:fixed;left:50%;top:60px;transform:translateX(-50%);width:min(420px,calc(100vw - 24px));max-height:calc(100vh - 80px);overflow:auto;background:rgba(30,18,6,.96);border:1px solid #b8862b;border-radius:12px;padding:14px;z-index:12}
#admHead{display:flex;justify-content:space-between;align-items:center;color:#f3c968;margin-bottom:10px}
#admHead button,#admList button{background:none;border:0;color:#f5ead6;font-size:16px}
#admin input{width:100%;padding:10px;margin-bottom:8px;border-radius:8px;border:1px solid #7a5a2a;background:#1d130a;color:#f5ead6;font-size:15px}
#admList{list-style:none;margin-top:8px}
#admList li{display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-top:1px solid rgba(232,182,74,.2)}
@media (max-width:600px){#topRight{gap:5px;right:8px}#topRight button{width:38px;height:38px;font-size:18px}#zone{top:56px;left:8px;max-width:calc(100vw - 16px)}#counter{top:90px}#yt{top:auto;bottom:96px;left:8px}body.svmode #yt{bottom:70px}}
