:root{--bg1:#f6f1e8;--bg2:#e9e1d3;--ink:#2d2a26;--soft:#8c8478;--card:#fffdf9;--line:#ddd3c2;--accent:#2f6fd6;--sel:#dce8fb;--bad:#e0473a;--badbg:#fbe0dc;--ok:#3aa76d}*{box-sizing:border-box}html,body{overscroll-behavior:none;height:100%;margin:0;overflow:hidden}body{background:linear-gradient(180deg, var(--bg1), var(--bg2));color:var(--ink);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;font-family:ui-rounded,SF Pro Rounded,system-ui,sans-serif}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit;border:0}#app{height:100dvh;padding:env(safe-area-inset-top) 6px env(safe-area-inset-bottom);flex-direction:column;max-width:640px;margin:0 auto;display:flex}header{flex:none;justify-content:space-between;align-items:center;height:64px;padding:0 4px;display:flex}header .side{gap:8px;display:flex}header button,header .spacer{border-radius:50%;justify-content:center;align-items:center;width:48px;height:48px;display:flex}header button{box-shadow:0 1px 0 var(--line);background:#ffffff90;font-size:24px}header button svg{width:22px;height:22px}header button:active{transform:scale(.9)}header button:disabled{color:#c8bfb1}#level{letter-spacing:-.5px;font-size:26px;font-weight:800}#level.pop{animation:.45s pop}main{flex:1;justify-content:center;align-items:center;min-height:0;display:flex}.overlay{padding:16px 16px calc(16px + env(safe-area-inset-bottom));z-index:10;background:#2d2a2655;justify-content:center;align-items:flex-end;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.card{background:var(--card);width:100%;max-width:420px;box-shadow:0 6px 0 var(--line);border-radius:24px;flex-direction:column;gap:10px;padding:18px 18px 16px;display:flex}.card .head{justify-content:space-between;align-items:center;display:flex}.card h2{margin:0;font-size:20px}.card p{color:var(--soft);margin:0;font-size:15px;line-height:1.45}.card p.msg{color:var(--ink);font-weight:700}.card .close{width:44px;height:44px;color:var(--soft);background:0 0;border-radius:50%;font-size:18px}.card .primary,.card .ghost{border-radius:16px;min-height:52px;font-size:17px;font-weight:800}.card .primary{background:var(--accent);color:#fff;box-shadow:0 3px #1f4fa8}.card .ghost{color:var(--soft);background:0 0}.card button:disabled{opacity:.5}body:has(#app.icon[data-icon=fg]){background:0 0}body:has(#app.icon[data-icon=mono]){background:0 0}@keyframes pop{40%{transform:scale(1.18)}}@keyframes shake{25%{transform:translate(-4px)}75%{transform:translate(4px)}}header .side.right{position:relative}header button.hint{font-size:22px;position:absolute;top:0;right:calc(100% + 8px)}header button.hint.pop{animation:.45s pop}header button.hint .play{background:var(--accent);color:#fff;width:20px;height:20px;box-shadow:0 0 0 2px var(--bg1,#f6f1e8);border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;bottom:-2px;right:-2px}header button.hint .play svg{width:10px;height:10px;margin-left:1px}header button.hint.wait{opacity:.38;filter:grayscale()}header button.hint.wait:active{transform:none}header button.hint.shake{animation:.3s shake}canvas{touch-action:none;width:100%;height:100%;display:block}main{position:relative}main canvas{position:absolute;top:0;bottom:0;left:0;right:0}#app.icon{max-width:none;height:100vh;padding:0}
