:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #fff; color: #141414; -webkit-tap-highlight-color: transparent; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overscroll-behavior: none; }
body { min-height: 100svh; display: grid; place-items: center; }
.game { width: 100%; min-width: 0; padding: 24px 0 8px; position: relative; }
.game, .game * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.field { width: 100%; aspect-ratio: 359 / 181; position: relative; overflow: hidden; background-color: #f8f8f8; background-image: radial-gradient(circle, #e6e6e6 .45px, transparent .6px); background-size: 7px 7px; }
canvas { display: block; width: 100%; height: 100%; }
.hud { position: absolute; left: 14px; right: 14px; top: 11px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; font-variant-numeric: tabular-nums; }
.record { color: #b2b2b2; font-size: 10px; line-height: 16px; letter-spacing: .15px; }
.score { color: #a2a2a2; display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 16px; }
.coin-icon { display: inline-block; width: 14px; height: 14px; background-image: url('./assets/coins.png'); background-size: 40.5px 40.5px; background-position: 0 0; }
.controls { height: 64px; margin-top: 12px; position: relative; touch-action: none; }
.controls img { -webkit-user-drag: none; }
.steer-area { position: absolute; inset: 0; cursor: ew-resize; touch-action: none; outline: none; }
.steer-area:focus-visible { outline: 2px solid #ffa100; outline-offset: -2px; }
#control { width: 48px; height: 48px; border: 0; padding: 0; background: transparent; color: white; display: grid; place-items: center; cursor: pointer; touch-action: none; outline: none; position: absolute; left: 16px; top: 8px; z-index: 2; }
.button-face { width: 48px; height: 48px; border-radius: 50%; background: #000; display: grid; place-items: center; position: relative; transition: transform 120ms, box-shadow 120ms; pointer-events: none; }
#control:focus-visible .button-face { outline: 2px solid #ffa100; outline-offset: 5px; }
#control.pressed .button-face { box-shadow: 0 0 0 4px #ffa10019; }
#control.charging .button-face::before { content: ''; position: absolute; inset: -5px; padding: 2px; border-radius: 50%; background: conic-gradient(#ffa100 calc(var(--charge, 0) * 1turn), #ffa10012 0); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.button-art { width: 20px; height: 20px; display: block; position: relative; overflow: hidden; pointer-events: none; }
.button-union { position: absolute; left: 2.064px; top: 1px; width: 15.87px; height: 18px; overflow: hidden; }
.button-union img { display: block; transform-origin: top left; transform: scale(.495941, .5625); }
.button-character { position: absolute; left: 1.3px; top: .6px; width: 18.213px; height: 18.214px; }
.button-character img { display: block; }
.restart-icon { display: none; font-size: 26px; line-height: 1; margin-top: -2px; }
#control.restart .button-art { display: none; }
#control.restart .restart-icon { display: block; }
.drag-guide { display: flex; justify-content: space-between; align-items: center; position: absolute; top: 0; bottom: 0; left: 50%; width: 64px; transform: translateX(-50%); color: #202020; transition: color .12s; pointer-events: none; }
.drag-guide span { display: block; width: 12px; height: 12px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(135deg); }
.drag-guide span:last-child { transform: rotate(-45deg); }
.controls.steering .drag-guide { color: #ffa100; }
.power { position: absolute; left: 76px; top: 50%; transform: translateY(-50%); color: #ffa100; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; pointer-events: none; }
.hint { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; margin: 0; text-align: center; font-size: 10px; line-height: 16px; color: #b2b2b2; white-space: nowrap; transition: opacity .2s; pointer-events: none; }
.message { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; background: #f8f8f8e8; backdrop-filter: blur(3px); }
.message-title { font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.message-reason { font-size: 11px; color: #888; }
.message-action { font-size: 10px; color: #b2b2b2; margin-top: 5px; }
.pause-note { position: absolute; inset: 0; display: grid; place-items: center; background: #f8f8f8d9; color: #999; font-size: 12px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: -1px; }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; } }
@media (max-height: 350px) { .game { padding-top: 8px; } .hint { top: calc(100% - 2px); } }
