:root{--bg: #15131f;--accent: #6b5bd2;--accent-d: #4c3fa3;--text: #e8e6f2;--muted: #9a96b5;--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px)}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Hiragino Kaku Gothic ProN,Segoe UI,Roboto,sans-serif;overflow:hidden;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#game{position:fixed;top:var(--safe-top);left:0;right:0;bottom:0;display:flex;padding-top:46px;background:#000}#screen{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;image-rendering:crisp-edges}#bar{position:fixed;top:calc(var(--safe-top) + 6px);right:calc(var(--safe-right) + 8px);z-index:50;display:flex;gap:6px}.tool{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:#1f1c2ed1;color:var(--text);font-size:14px;font-weight:600;padding:7px 10px;border-radius:10px;min-height:34px;cursor:pointer;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.tool:active{background:var(--accent)}#overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;justify-content:center;background:#0c0b12f0;padding:24px;text-align:center}#overlay-card{max-width:340px}#overlay-card h1{margin:0 0 10px;font-size:30px;letter-spacing:1px;color:var(--accent)}#overlay-card p{color:var(--muted);line-height:1.6;margin:0 0 18px}#overlay-card .hint{font-size:13px}.primary{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:var(--accent);color:#fff;font-size:17px;font-weight:700;padding:14px 26px;border-radius:14px;cursor:pointer}.primary:active{background:var(--accent-d)}#log{position:fixed;left:0;right:0;bottom:0;max-height:45vh;margin:0;padding:10px 12px calc(10px + var(--safe-bottom));background:#000000e6;color:#b6f09a;font:11px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-word;overflow-y:auto;z-index:200;border-top:1px solid #333;user-select:text;-webkit-user-select:text}#log[hidden]{display:none}#log .err{color:#ff8a8a}#controller{position:fixed;bottom:0;height:210px;width:100%;padding-bottom:var(--safe-bottom);touch-action:none;opacity:.8;z-index:60}#controller_dpad{position:absolute;bottom:calc(20px + var(--safe-bottom));left:calc(20px + env(safe-area-inset-left,0px));width:184px;height:184px}#controller_dpad:before{content:"";display:block;width:48px;height:48px;background:radial-gradient(ellipse at center,#5c5c5c,#555 59%,#5c5c5c 60%);position:absolute;left:68px;top:68px}#controller_left,#controller_right,#controller_up,#controller_down{position:absolute;width:48px;height:48px;background:radial-gradient(ellipse at center,#666,#5c5c5c 80%)}#controller_left{left:20px;top:68px;border-radius:4px 0 0 4px}#controller_right{left:116px;top:68px;border-radius:0 4px 4px 0}#controller_up{left:68px;top:20px;border-radius:4px 4px 0 0}#controller_down{left:68px;top:116px;border-radius:0 0 4px 4px}.roundBtn{display:flex;justify-content:center;align-items:center;font-weight:700;font-size:32px;color:#440f1f;width:64px;height:64px;border-radius:64px;background:radial-gradient(ellipse at center,#ab1465,#8b1e57);box-shadow:0 4px 5px #0003}.capsuleBtn{display:flex;justify-content:center;align-items:center;font-weight:700;font-size:10px;color:#111;text-transform:uppercase;width:64px;height:32px;border-radius:40px;background:radial-gradient(ellipse at center,#666,#555);box-shadow:0 4px 5px #0003}#controller_a{position:absolute;bottom:calc(110px + var(--safe-bottom));right:calc(20px + var(--safe-right))}#controller_b{position:absolute;bottom:calc(80px + var(--safe-bottom));right:calc(100px + var(--safe-right))}#controller_start{position:absolute;bottom:calc(20px + var(--safe-bottom));right:calc(15px + var(--safe-right))}#controller_select{position:absolute;bottom:calc(20px + var(--safe-bottom));right:calc(100px + var(--safe-right))}.btnPressed{opacity:.5}#controller_dpad,.roundBtn,.capsuleBtn{touch-action:none}@media only screen and (orientation:landscape){#controller{bottom:50%;transform:translateY(50%);opacity:.5}}
