:root { font-family: system-ui, sans-serif; color: white; background: #17243e; }
body { margin: 0 auto; padding: 12px; max-width: 820px; text-align: center; }
h1 { margin: .3em; }
.tagline { margin: 0 0 8px; opacity: .9; }
#hud { margin: 8px 0; font-size: 1.1rem; }
#hint { min-height: 1.6em; font-weight: bold; color: #ffdf6b; margin: 6px 0; }
canvas { display: block; width: 100%; height: auto; background: #213555; border-radius: 16px; touch-action: none; }
button { font: inherit; padding: 10px 18px; border: 0; border-radius: 12px; cursor: pointer; }
#restart { margin-left: 10px; }
#touch { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0; }
#touch .move, #touch .act { display: flex; gap: 12px; }
#touch button { font-size: 1.2rem; padding: 16px 22px; min-width: 76px; min-height: 60px; background: #33507e; color: white; }
#btn-shrink { background: #a855f7; font-weight: bold; }
#btn-jump { background: #22a06b; font-weight: bold; }
#touch button:active { transform: scale(.95); }
.keys { opacity: .75; font-size: .9rem; }
section { margin: 20px auto; max-width: 480px; }
form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 16px 0; }
label { display: flex; flex-direction: column; gap: 6px; }
input { font: inherit; padding: 10px; width: 7em; }
ol { text-align: left; line-height: 1.8; }
@media (max-width: 480px) {
  body { padding: 8px; }
  h1 { font-size: 1.5rem; }
  #touch button { font-size: 1rem; padding: 14px 16px; min-width: 68px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  h1, .tagline, .keys { display: none; }
  #touch { margin: 8px 0; }
}
