* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: ui-sans-serif, system-ui, sans-serif; background: #111429; color: #fff4dc; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 0, #2b2953, #111429 70%); }
.game { width: min(100%, 1060px); }
.hud { display: flex; align-items: center; gap: 24px; padding: 0 6px 14px; }
.hud > div { min-width: 90px; }
.label { display: block; color: #a9a6c7; font-size: 10px; font-weight: 750; letter-spacing: 1.5px; margin-bottom: 4px; }
.hud b { font-size: 24px; font-variant-numeric: tabular-nums; }
.mission { margin-right: auto; }
#lives { color: #f8ab82; letter-spacing: 3px; font-size: 21px; }
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
button:focus-visible { outline: 3px solid #fff4dc; outline-offset: 4px; }
.small-button { width: 42px; height: 42px; border: 1px solid #575172; border-radius: 12px; background: #292540; font-size: 22px; }
.small-button:disabled { opacity: .35; cursor: default; }
.stage { position: relative; border: 1px solid #565171; border-radius: 24px; overflow: hidden; background: #101425; box-shadow: 0 24px 80px #05061080; }
canvas { display: block; width: 100%; aspect-ratio: 16 / 9; touch-action: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: linear-gradient(90deg, #111429db, #1114298f 60%, #11142920); }
.overlay[hidden] { display: none; }
.panel { width: min(100%, 570px); text-align: center; }
.eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 2.8px; color: #d0bbf0; margin: 0 0 14px; }
h1 { font-size: clamp(38px, 7vw, 76px); line-height: 1; letter-spacing: -3px; margin: 0 0 20px; font-weight: 900; }
#message { color: #e0d9e9; font-size: clamp(13px, 1.8vw, 18px); line-height: 1.6; margin: 0; }
.rules { display: flex; justify-content: center; gap: 18px; margin: 20px 0; font-size: 12px; color: #e3dcf2; }
.rules[hidden] { display: none; }
.rules span { display: inline-flex; align-items: center; gap: 7px; }
.rules i { width: 11px; height: 11px; display: inline-block; border-radius: 3px; }
.snack-dot { background: #ffd86d; transform: rotate(15deg); }
.rock-dot { background: #948eaf; }
.primary { display: block; margin: 22px auto 0; min-width: 190px; padding: 14px 24px; border-radius: 14px; background: #ffd86d; color: #272139; font-weight: 850; box-shadow: 0 5px 0 #af783c; }
.primary:hover { background: #ffe6a0; }
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #af783c; }
.primary span { margin-left: 16px; }
.record { font-size: 12px; color: #b8adc8; margin: 18px 0 0; }
.record b { color: #fff4dc; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 6px 0; color: #aba6bf; font-size: 11px; line-height: 1.8; }
.controls p { margin: 0; }
kbd { display: inline-block; min-width: 20px; text-align: center; border: 1px solid #58526e; border-radius: 4px; color: #e4dcec; font: inherit; }
.divider { padding: 0 8px; color: #665f7b; }
.signature { font-size: 8px; letter-spacing: 1px; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  body { padding: 10px; }
  .hud { gap: 10px; padding-bottom: 10px; }
  .hud > div { min-width: 55px; }
  .hud b { font-size: 19px; }
  .label { font-size: 8px; letter-spacing: .6px; }
  #lives { font-size: 16px; letter-spacing: 0; }
  .small-button { width: 32px; height: 34px; border-radius: 8px; }
  .stage { border-radius: 16px; }
  canvas { aspect-ratio: 4 / 5; height: min(68dvh, 600px); }
  .overlay { padding: 16px; }
  h1 { font-size: 43px; letter-spacing: -2px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.8px; }
  .rules { gap: 12px; font-size: 10px; }
  .controls { justify-content: center; text-align: center; font-size: 10px; }
  .signature { display: none; }
}
@media (max-height: 500px) and (min-width: 601px) {
  body { padding: 8px; }
  .game { max-width: min(100%, calc((100dvh - 88px) * 16 / 9)); }
  .hud { padding-bottom: 6px; }
  .hud b { font-size: 18px; }
  .controls { padding-top: 6px; }
  h1 { font-size: 36px; margin-bottom: 10px; }
  .eyebrow { margin-bottom: 8px; }
  #message { font-size: 12px; }
  .rules { margin: 10px 0; }
  .primary { padding: 10px 20px; margin-top: 12px; }
  .record { margin-top: 12px; }
}
