* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; font-family: monospace; }
#wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #142040 0%, #000 70%); }
#game { image-rendering: pixelated; image-rendering: crisp-edges; display: block; background: #000; box-shadow: 0 0 60px rgba(0,0,0,0.8); }
#touch { position: fixed; inset: 0; pointer-events: none; display: none; }
#touch.on { display: block; }
.pad { position: absolute; bottom: 18px; display: flex; gap: 14px; pointer-events: none; }
.pad.left { left: 18px; }
.pad.right { right: 18px; }
.pad.top { top: 12px; right: 18px; bottom: auto; gap: 10px; }
.tbtn { pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.14); color: #fff; font-size: 24px; font-weight: bold; font-family: monospace; touch-action: none; -webkit-tap-highlight-color: transparent; backdrop-filter: blur(2px); }
.tbtn.jump { background: rgba(224,60,40,0.35); border-color: rgba(255,120,100,0.7); width: 74px; height: 74px; }
.tbtn.run { background: rgba(60,184,76,0.35); border-color: rgba(120,255,140,0.7); margin-top: 14px; }
.tbtn.small { width: 44px; height: 44px; font-size: 16px; }
.tbtn.active { background: rgba(255,255,255,0.45); transform: scale(0.94); }
#rotate { display: none; position: fixed; top: calc(50% - 28.85vw - 30px); white-space: nowrap; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 6px; background: rgba(0,0,0,0.6); color: #ffd93c; font-size: 12px; letter-spacing: 1px; pointer-events: none; z-index: 2; }
@media (orientation: portrait) { .pad { bottom: 60px; } }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: block; } }
