/* Temple HUD: warm lacquer, gold borders, generous touch controls. */
:root{--temple-gold:#d8af65;--temple-panel:#32130dea}body{overscroll-behavior:none;-webkit-user-select:none;user-select:none}input,textarea{user-select:text}#scene{touch-action:none}#game::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 130px #210b0640}
.top{z-index:2;left:max(16px,env(safe-area-inset-left));width:min(520px,calc(100% - 180px))}.location{background:linear-gradient(110deg,#5e2b17ee,#2b100dee);border-color:#b78e52;min-height:65px}.seal{border-radius:11px;background:linear-gradient(140deg,#ae321c,#6e1e12)}.location strong{font-size:23px;letter-spacing:.5px}.guide{border-radius:22px;background:linear-gradient(110deg,#3e1b11ed,#28100be8)}.subtitle{background:#34160ede;font-family:Arial,sans-serif;letter-spacing:0}.tools{z-index:3;grid-template-columns:repeat(2,60px);gap:19px 13px;right:max(16px,env(safe-area-inset-right))}.tool{width:60px;height:60px;background:radial-gradient(ellipse at 40% 30%,#56301c,#301109);border-color:#ac864f}.tool.gold{background:radial-gradient(circle at 35% 20%,#ffeba8,#d9a32b)}.tools .secondary{display:grid}.tool small{top:63px}.bottom{z-index:3;gap:16px;bottom:max(43px,calc(env(safe-area-inset-bottom) + 30px))}.action{width:84px;height:84px;border-radius:25px;background:linear-gradient(140deg,#bd4029,#8e2115 65%,#72190f);border-color:#cda05e;font-size:34px;box-shadow:inset 0 1px 2px #ffe8b340,0 6px 20px #0006}.action small{top:91px;font-size:12px}.target{z-index:2;bottom:163px;font-size:17px;max-width:70%;white-space:normal;text-align:center;background:#381b10e8}.corner{z-index:3;bottom:61px;width:57px;height:57px}.corner.left{left:22px}.corner.right{right:22px}.scene-name{display:none}#hint3d{right:14px;bottom:8px;font-size:9px;max-width:65%;text-align:right;opacity:.65}
.joystick{z-index:3;display:block;position:absolute;left:max(20px,env(safe-area-inset-left));bottom:165px;width:148px;height:148px;border:1px solid #ddc18c88;border-radius:50%;background:radial-gradient(circle,#d9c1971f,#dbb9840a 70%);box-shadow:inset 0 0 22px #d3b17c0d;touch-action:none;cursor:grab;outline:none}.joystick.active{cursor:grabbing;border-color:#efca8fc0;background:#d9b17120}.joystick .knob{position:absolute;left:50%;top:50%;width:62px;height:62px;transform:translate(-50%,-50%);border:1px solid #ddc399aa;background:radial-gradient(circle at 38% 30%,#d5c19b55,#8a73543b);box-shadow:0 3px 10px #0002;border-radius:50%;pointer-events:none;will-change:transform}.stick-arrow{position:absolute;font:19px Arial;color:#ddc99c9c;pointer-events:none}.stick-n{top:9px;left:calc(50% - 6px)}.stick-s{bottom:8px;left:calc(50% - 6px)}.stick-w{left:10px;top:calc(50% - 11px)}.stick-e{right:10px;top:calc(50% - 11px)}#resetView{z-index:3;position:absolute;bottom:101px;left:50%;transform:translateX(-50%);border:1px solid #ac854a77;background:#2c140bdc;border-radius:50%;width:34px;height:34px;color:#e6cc97;font:20px Arial;display:none}#languageSettings{position:fixed!important;left:auto!important;bottom:auto!important;right:max(16px,env(safe-area-inset-right))!important;top:428px!important;width:60px!important;height:60px!important;border-radius:50%!important;font-size:13px!important;z-index:45!important;display:grid;place-items:center}body:has(.temple-entry:not([hidden])) #languageSettings{top:18px!important}#languageDialog{max-height:85dvh;overflow:auto}.control-settings{border-top:1px solid #a27c3d66;margin-top:20px;padding-top:10px;text-align:left}.control-settings h3{font:19px Georgia,serif;color:#e8c67b}.control-settings output{float:right;color:#efd89e}.control-settings input[type=range]{width:100%;min-height:30px;accent-color:#d8ac65}.control-settings select{width:100%;min-height:44px;border:1px solid #b18b4c;background:#32160f;color:#e7d2aa;border-radius:10px;padding:8px;font:15px Arial}body.clean #languageSettings,body.clean #resetView{display:none}body.clean #view{z-index:50}.sheet{z-index:40;max-height:82dvh;backdrop-filter:blur(12px)}.sheet header{position:sticky;top:-26px;z-index:1;background:#27110cf5;padding:5px 0 10px}.navlist{max-height:none}.navlist h3{margin:24px 0 12px}.navlist .zonebtn{padding:16px 20px}.mp3-card>span{letter-spacing:4px}.music-transport{flex-wrap:wrap}.music-track{min-height:62px}
@media(max-width:600px){.top{top:max(12px,env(safe-area-inset-top));left:12px;width:calc(100% - 152px)}.location{min-height:56px;gap:7px;padding:7px 10px}.location strong{font-size:18px;white-space:normal}.location .status{display:none}.seal{font-size:20px;padding:5px 7px}.switch{font-size:11px;padding:7px 9px;margin-left:auto;flex-shrink:0}.guide{padding:10px 12px;gap:5px;margin-top:9px}.guide b{font-size:10px;letter-spacing:.5px}.guide p{font-size:12px;line-height:1.45}.guide button{padding:8px 10px;font-size:11px}.subtitle{font-size:10px;padding:8px 12px;letter-spacing:0}.tools{top:max(12px,env(safe-area-inset-top));right:12px;grid-template-columns:repeat(2,56px);gap:17px 10px}.tool{width:56px;height:56px;font-size:23px}.tool svg{width:24px;height:24px}.tool small{display:none}.tools .secondary{display:grid}#languageSettings{width:56px!important;height:56px!important;right:12px!important;top:377px!important}.bottom{gap:12px;bottom:max(43px,calc(env(safe-area-inset-bottom) + 27px))}.action{width:72px;height:72px;font-size:31px;border-radius:22px}.action small{top:80px;font-size:11px}.joystick{left:16px;bottom:185px;width:140px;height:140px}.joystick .knob{width:58px;height:58px}.target{bottom:142px;max-width:70%;font-size:14px;padding:11px 19px}.corner{width:44px;height:44px;bottom:135px;font-size:24px}.corner.left{left:20px}.corner.right{right:16px}.sheet h2{font-size:23px}.sheet header{top:-22px}.sheet{padding-bottom:max(28px,env(safe-area-inset-bottom))}html[lang=en] .location strong{font-size:15px}html[lang=en] .action small{font-size:10px}#hint3d{max-width:65%;font-size:8px;bottom:5px}}
@media(max-width:390px){.top{width:calc(100% - 135px)}.tools{grid-template-columns:repeat(2,49px);gap:14px 9px}.tool{width:49px;height:49px}.location{gap:5px;padding:7px}.location strong{font-size:16px}.switch{padding:6px;font-size:10px}.guide{padding:8px}.guide p{font-size:11px}.action{width:65px;height:65px}.action small{top:73px}.bottom{gap:10px}.joystick{width:125px;height:125px;bottom:180px}.joystick .knob{width:52px;height:52px}#languageSettings{width:49px!important;height:49px!important;top:327px!important}.target{font-size:12px;bottom:136px}}
@media(max-height:560px) and (min-width:601px){.top{top:10px;left:12px;width:340px}.location{min-height:48px}.location strong{font-size:18px}.guide{padding:8px 12px;margin-top:6px}.subtitle{display:none}.tools{top:10px;right:12px;grid-template-columns:repeat(2,40px);gap:10px}.tool{width:40px;height:40px}.tool small{display:none}#languageSettings{top:260px!important;width:40px!important;height:40px!important;right:12px!important}.bottom{bottom:30px;gap:12px}.action{width:58px;height:58px;font-size:26px}.action small{top:64px;font-size:10px}.joystick{width:108px;height:108px;bottom:55px;left:20px}.joystick .knob{width:46px;height:46px}.target{bottom:111px;padding:8px 16px;font-size:13px}.corner{bottom:37px;width:42px;height:42px}.corner.left{left:150px}.corner.right{right:120px}.sheet{max-height:90dvh}}
@media(prefers-reduced-motion:reduce){.toast{transition:none}}

body.clean .tools{opacity:1;pointer-events:none}body.clean .tools .tool{opacity:0;pointer-events:none}body.clean .tools #view{opacity:1;pointer-events:auto;z-index:50}
body:has(.temple-entry:not([hidden])) #languageSettings{z-index:90!important}body:has(#sheet:not([hidden])) #languageSettings{visibility:hidden}
