html,body{margin:0;height:100%;background:#0e1a10;overflow:hidden;font-family:system-ui,Segoe UI,Arial,sans-serif;color:#f3ecd8;user-select:none}canvas{display:block}#hud{position:fixed;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none;font-weight:700;font-size:17px;text-shadow:0 2px 3px #000a}#hud .b{background:#0008;padding:6px 12px;border-radius:8px}#hpwrap{display:flex;align-items:center;gap:8px}#hpbar{width:140px;height:12px;background:#0006;border-radius:6px;overflow:hidden;border:1px solid #fff4}#hp{height:100%;width:100%;background:#5cc35c;transition:width .2s}#cross{position:fixed;left:50%;top:50%;width:6px;height:6px;margin:-3px 0 0 -3px;border-radius:50%;background:#fffc;box-shadow:0 0 3px #000;pointer-events:none}#hint{position:fixed;left:50%;top:calc(50% + 24px);transform:translate(-50%);font-weight:700;background:#000a;padding:4px 10px;border-radius:6px;pointer-events:none;opacity:0;transition:opacity .15s;white-space:nowrap}#pop{position:fixed;left:50%;top:38%;transform:translate(-50%);font-size:26px;font-weight:800;text-shadow:0 2px 4px #000,0 0 2px #000;pointer-events:none;opacity:0;white-space:nowrap}#tint{position:fixed;inset:0;pointer-events:none}#mini{position:fixed;right:14px;bottom:14px;border:3px solid #0009;border-radius:4px;pointer-events:none}#overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#0b140cc8;overflow:auto}.panel{max-width:600px;margin:16px;padding:22px 30px;background:#1d2b1c;border:2px solid #5b7a3c;border-radius:16px;text-align:center;line-height:1.45}.panel h1{margin:0 0 6px;font-size:32px;color:#ffd27a}.panel table{margin:8px auto;text-align:left;border-collapse:collapse;font-size:15px}.panel td{padding:2px 10px}kbd{background:#3a4a2e;border-radius:4px;padding:1px 7px;border:1px solid #6b8550}button{margin-top:12px;font:inherit;font-size:20px;font-weight:700;padding:10px 28px;border-radius:10px;border:none;background:#e0a33a;color:#2a1a05;cursor:pointer}button:hover{background:#f4b84d}#msg{position:fixed;left:50%;bottom:36px;transform:translate(-50%);font-size:20px;font-weight:800;text-shadow:0 2px 4px #000;pointer-events:none;transition:opacity .4s;text-align:center;width:70%}html,body{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none}#touch{display:none}body.touch #touch{display:block}#joy{position:fixed;left:calc(env(safe-area-inset-left,0px) + 28px);bottom:28px;width:140px;height:140px;border-radius:50%;background:#ffffff1f;border:2px solid #ffffff55;touch-action:none}#knob{position:absolute;left:44px;top:44px;width:52px;height:52px;border-radius:50%;background:#ffffffb0;box-shadow:0 2px 6px #0006;pointer-events:none}.tb{position:fixed;width:64px;height:64px;border-radius:50%;background:#000000a0;border:2px solid #ffffff80;color:#fff;font:800 24px system-ui;display:flex;align-items:center;justify-content:center;touch-action:none;user-select:none}.tb:after{content:attr(data-l);position:absolute;top:100%;margin-top:2px;font:700 11px system-ui;color:#fff;text-shadow:0 1px 2px #000;white-space:nowrap}.tb.on{background:#2b9348d0;border-color:#b9ffb0}.tb.down{transform:scale(.92);filter:brightness(1.3)}#bE{right:calc(env(safe-area-inset-right,0px) + 22px);bottom:34px;width:84px;height:84px;background:#c47a1ed8;font-size:30px}#bR{right:calc(env(safe-area-inset-right,0px) + 124px);bottom:30px}#bF{right:calc(env(safe-area-inset-right,0px) + 34px);bottom:150px}#bH{right:calc(env(safe-area-inset-right,0px) + 124px);bottom:126px;background:#7c4a1ed0}#bM{right:calc(env(safe-area-inset-right,0px) + 10px);top:92px;width:42px;height:42px;font-size:17px}#bP{right:calc(env(safe-area-inset-right,0px) + 60px);top:92px;width:42px;height:42px;font-size:15px}#bM:after,#bP:after{display:none}body.touch #mini{width:96px;height:96px;left:calc(env(safe-area-inset-left,0px) + 8px);right:auto;top:96px;bottom:auto}body.touch #hint{top:auto;bottom:16px;font-size:13px}body.touch #hud{font-size:13px;top:6px;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}body.touch #hud .b{padding:4px 8px}body.touch #hpbar{width:80px}body.touch #msg{font-size:15px;bottom:auto;top:62%}body.touch #pop{font-size:19px}body.touch .panel{padding:14px 16px;font-size:14px}body.touch .panel h1{font-size:22px}body.touch .panel table{font-size:12px}body.touch .keysTable,.touchHelp{display:none}body.touch .touchHelp{display:block;margin:8px 0;font-size:14px}#rotate{display:none}@media (orientation:portrait){body.touch #rotate{display:flex;position:fixed;inset:0;z-index:50;background:#0b140cf2;align-items:center;justify-content:center;text-align:center;font-size:22px;font-weight:700;padding:24px}}#overlay{z-index:20}.panel{width:min(600px,calc(100vw - 32px));box-sizing:border-box;box-shadow:0 20px 60px #000a}.panel h2{margin:0 0 10px;color:#ffd27a;font-size:24px}.sub{opacity:.8;margin-bottom:10px}.menuBtns{display:flex;flex-direction:column;gap:10px;align-items:stretch;max-width:340px;margin:14px auto 4px}.menuBtns button{margin:0;width:100%}button.secondary{background:#3a4a2e;color:#f3ecd8}button.secondary:hover{background:#4b5f3b}button:focus-visible{outline:3px solid #fff;outline-offset:2px}button small{display:block;font-size:12px;font-weight:600;opacity:.75}.row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #ffffff14;text-align:left}.row label{flex:1}.row input[type=range]{width:46%}.row select{font:inherit;background:#2b3a26;color:#f3ecd8;border:1px solid #6b8550;border-radius:6px;padding:4px 8px}.row input[type=checkbox]{width:22px;height:22px;accent-color:#e0a33a}.row output{min-width:42px;text-align:right;opacity:.8}.qlist{list-style:none;padding:0;margin:8px 0;text-align:left;max-height:52vh;overflow:auto}.qlist li{display:flex;gap:10px;align-items:center;padding:6px 8px;border-radius:8px}.qlist li.done{opacity:.55;text-decoration:line-through}.qlist li.active{background:#ffffff12}.qlist .r{margin-left:auto;color:#ffd27a;font-weight:700;white-space:nowrap}.rank{font-size:18px;font-weight:800;color:#b9ffb0}.foot{margin-top:12px;font-size:12px;opacity:.55}#questHud{background:#0008;padding:6px 10px;border-radius:8px;font-size:13px;font-weight:600;max-width:260px;line-height:1.35}#questHud b{color:#ffd27a}#questHud .p{opacity:.75}#toasts{position:fixed;top:70px;left:50%;transform:translate(-50%);display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;z-index:30}.toast{background:#1d2b1cf0;border:2px solid #e0a33a;color:#fff;padding:8px 16px;border-radius:12px;font-weight:800;box-shadow:0 6px 20px #0008;animation:toastIn .35s ease-out}.toast.out{transition:opacity .4s,transform .4s;opacity:0;transform:translateY(-10px)}@keyframes toastIn{0%{opacity:0;transform:translateY(-14px) scale(.96)}to{opacity:1;transform:none}}#loading{position:fixed;inset:0;z-index:40;background:#0e1a10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;font-size:20px;font-weight:700}#loading .bar{width:220px;height:8px;border-radius:4px;background:#fff2;overflow:hidden}#loading .bar i{display:block;height:100%;width:40%;background:#e0a33a;animation:load 1.1s ease-in-out infinite}@keyframes load{0%{transform:translate(-100%)}to{transform:translate(250%)}}#fatal{display:none;position:fixed;inset:0;z-index:50;background:#200c;color:#fff;align-items:center;justify-content:center;text-align:center;padding:24px;font-size:16px}body.touch #questHud{font-size:11px;max-width:180px;padding:4px 6px}body.touch #toasts{top:48px}@media (prefers-reduced-motion:reduce){.toast,#loading .bar i{animation:none}}#questHud:empty{display:none}body.inMenu #touch,body.inMenu #cross,body.inMenu #hint{display:none!important}body.touch .menuBtns{gap:6px;margin-top:8px}body.touch .menuBtns button{font-size:16px;padding:7px 16px}body.touch .panel h1{margin-bottom:2px}body.touch .sub{margin-bottom:4px;font-size:13px}body.touch .foot{margin-top:6px}@media (max-height:480px){.panel{padding:12px 18px}.panel h1{font-size:22px}.panel h2{font-size:19px;margin-bottom:4px}.row{padding:3px 0}.qlist{max-height:46vh}}body.touch #questHud{position:fixed;top:40px;left:50%;transform:translate(-50%);max-width:42vw;text-align:center;background:#0006}body.touch #questHud div:nth-child(n+3){display:none}#fps{position:fixed;left:50%;bottom:6px;transform:translate(-50%);font:700 12px system-ui;background:#0009;padding:2px 8px;border-radius:6px;pointer-events:none;z-index:5}.tabs{display:flex;gap:6px;margin:6px 0 10px}.tabs button{margin:0;color:#f3ecd8;flex:1;padding:8px 6px;font-size:14px;background:#ffffff14;border:1px solid #ffffff30}.tabs button.on{background:#c47a1e;border-color:#ffd27a}ol.board{margin:0 0 8px;padding-left:28px;max-height:46vh;overflow:auto;text-align:left}ol.board li{padding:4px 0;border-bottom:1px solid #ffffff14;display:flex;justify-content:space-between;gap:12px}ol.board li.me{color:#ffd27a;font-weight:700}ol.board li.rival{opacity:.7}#settingsPanel input[type=text]{background:#ffffff14;border:1px solid #ffffff40;color:inherit;border-radius:8px;padding:6px 8px;font:inherit;min-width:0;width:150px}#msg{white-space:pre-line}
