html, body { margin: 0; height: 100%; overflow: hidden; background: #cfe6fb; }
body { font-family: "EB Garamond", Garamond, Baskerville, "Liberation Serif", "Times New Roman", serif;
  -webkit-user-select: none; user-select: none; touch-action: none; }
canvas { display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; color: #fffaf0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55); }
#title { position: absolute; top: 14px; left: 20px; font-size: 30px; letter-spacing: 0.5px; }
#title small { display: block; font-size: 15px; opacity: 0.9; }
#stats { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 22px; font-size: 28px; background: rgba(20,30,50,0.35);
  padding: 4px 18px; border-radius: 10px; }
#coins { color: #ffd84d; }
#speed { position: absolute; bottom: 22px; left: 24px; font-size: 22px; }
#speed b { font-size: 52px; font-weight: normal; }
#map { position: absolute; top: 14px; right: 16px; width: 170px; height: 170px;
  border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
#msg { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font-size: 46px;
  color: #fff3c4; opacity: 0; transition: opacity 0.35s; }
#msg.show { opacity: 1; }
#start { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(15,25,45,0.35); cursor: pointer; }
#start.hidden { display: none; }
.card { background: rgba(255,250,240,0.94); color: #2b2a33; padding: 26px 34px; border-radius: 14px;
  max-width: 460px; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.card h1 { margin: 0 0 8px; font-size: 44px; font-weight: normal; }
.card p { font-size: 19px; line-height: 1.4; margin: 8px 0; }
.card .keys { color: #555; font-size: 17px; }
.card .go { margin-top: 16px; color: #b3541e; font-size: 21px; }
#touch { position: fixed; left: 0; right: 0; bottom: 0; display: none; justify-content: space-between;
  padding: 0 14px 18px; pointer-events: none; }
body.touch #touch { display: flex; }
body.touch #speed { bottom: 140px; }
body.touch #map { width: 120px; height: 120px; }
body.touch #title { font-size: 22px; }
body.touch #title small { display: none; }
body.touch #stats { top: 150px; left: auto; right: 16px; transform: none; font-size: 22px; flex-direction: column; gap: 0; align-items: flex-end; }
.pad { display: flex; gap: 12px; align-items: flex-end; pointer-events: auto; }
.pad button { width: 86px; height: 86px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.7);
  background: rgba(20,30,50,0.35); color: #fff; font-size: 34px; font-family: inherit;
  touch-action: none; -webkit-tap-highlight-color: transparent; }
.pad button.small { width: 66px; height: 66px; font-size: 18px; }
.pad button.on { background: rgba(255,216,77,0.55); }
@media (max-width: 699px) {
  .pad { gap: 7px; }
  .pad button { width: 66px; height: 66px; font-size: 27px; }
  .pad button.small { width: 54px; height: 54px; font-size: 15px; }
  #touch { padding-left: 8px; padding-right: 8px; }
}
@media (min-width: 700px) { body.touch #stats { top: 14px; left: 50%; right: auto; transform: translateX(-50%); flex-direction: row; gap: 22px; } }
