:root{color-scheme:dark;--yellow:#ffe066;--violet:#7958ed;--panel:#17132d}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(circle at 50% -20%,#523b91,#211943 48%,#0e0b20);color:#fff;font-family:Inter,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;touch-action:manipulation}
button{font:inherit}
.app-shell{width:min(100%,1050px);margin:auto;padding:max(13px,env(safe-area-inset-top)) 10px max(28px,env(safe-area-inset-bottom))}
header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.eyebrow{margin:0;color:var(--yellow);font-size:10px;font-weight:900;letter-spacing:.17em}
h1{margin:1px 0 0;font-size:clamp(26px,7vw,40px);letter-spacing:-.04em}
.header-actions{display:flex;gap:6px}
.header-actions button{width:42px;height:42px;border:1px solid #ffffff2c;border-radius:11px;background:#ffffff10;color:#fff;font-size:19px;cursor:pointer}
.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-bottom:7px}
.stats div{padding:6px 3px;border:1px solid #ffffff1a;border-radius:8px;background:#100d21b8;text-align:center}
.stats span{display:block;color:#9d93c6;font-size:8px;font-weight:900;letter-spacing:.1em}
.stats strong{display:block;margin-top:1px;font-family:"SFMono-Regular",Consolas,monospace;font-size:clamp(12px,3.4vw,18px)}
#lives{color:#ff7f9d;letter-spacing:.08em}
.game-stage{position:relative;width:100%;margin:auto;border:2px solid #7664c4;border-radius:15px;background:#83d9ff;box-shadow:0 22px 65px #070410b8,0 0 40px #704eff2e;overflow:hidden}
canvas{display:block;width:100%;height:auto;aspect-ratio:16/9;touch-action:none}
.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;background:#160f37b8;backdrop-filter:blur(4px);text-align:center}
.overlay p{margin:3px 0;color:#d7d0f2;font-size:clamp(12px,3vw,15px)}
.overlay h2{margin:4px 0;font-size:clamp(28px,8vw,48px);text-shadow:0 4px 0 #342562}
.overlay #overlayKicker{color:var(--yellow);font-size:11px;font-weight:900;letter-spacing:.2em}
.overlay button{margin-top:13px;border:0;border-radius:999px;background:var(--yellow);color:#2a2100;padding:12px 25px;font-weight:900;box-shadow:0 0 25px #ffe0665e;cursor:pointer}
.message{min-height:21px;margin:8px 0 3px;text-align:center;color:#d1caec;font-size:13px}
.controls{display:flex;align-items:center;justify-content:space-between;width:min(100%,610px);margin:5px auto 12px;padding:0 7px}
.move-controls{display:flex;gap:9px}
.controls button{width:68px;height:56px;border:1px solid #6d5eaa;border-radius:15px;background:linear-gradient(#40346d,#2a2250);color:#fff;font-size:22px;font-weight:900;box-shadow:0 6px 0 #100b26;cursor:pointer;user-select:none;-webkit-user-select:none}
.controls button.active,.controls button:active{transform:translateY(4px);box-shadow:0 2px 0 #100b26;background:#594692}
.controls .jump{width:92px;border-color:#e8c94f;background:linear-gradient(#ffe77d,#e2b92e);color:#382b00;font-size:15px;box-shadow:0 6px 0 #826512}
details{max-width:760px;margin:12px auto;padding:11px 14px;border:1px solid #ffffff18;border-radius:12px;background:#130f29;color:#bfb6df;font-size:13px;line-height:1.5}
summary{color:#f0ecff;font-weight:800;cursor:pointer}
details p{margin:8px 0 2px}
[hidden]{display:none!important}
@media(max-width:520px){.app-shell{padding-left:5px;padding-right:5px}.stats{gap:3px}.header-actions button{width:39px;height:39px}.controls{margin-top:2px}.controls button{width:64px;height:52px}.controls .jump{width:86px}}
