body.game-page {
  background: #7ec8ff;
  color: #16324a;
}
html:has(body.game-page) { background: #7ec8ff; }
.game-screen {
  height: 100svh; height: 100dvh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #8fd4ff 0%, #6ec0f5 40%, #7fd36a 100%);
  padding: 0;
  position: relative; overflow: hidden;
  user-select: none;
}
.game-hud {
  position: absolute; left: 0; right: 0; top: 0;
  z-index: 4; pointer-events: none;
  padding: calc(8px + env(safe-area-inset-top)) 12px 0;
}
.game-hud > * { pointer-events: auto; }
.game-topbar {
  display: flex; align-items: center; justify-content: space-between;
}
.game-title {
  font-size: 20px; letter-spacing: 1.5px; margin: 0;
  cursor: pointer; padding: 6px 4px;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 0 #1a6fb3, 0 4px 10px rgba(18, 70, 120, 0.35);
  transition: transform 0.15s ease;
}
.game-title.pressing { animation: pulse 0.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.hud-sound {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.92);
  color: #1a5f96;
  box-shadow: 0 4px 0 rgba(26, 95, 150, 0.18);
}
.race-progress {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
}
.race-progress-track {
  flex: 1; height: 10px; border-radius: 8px;
  background: rgba(255,255,255,0.55);
  border: 2px solid rgba(255,255,255,0.9);
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(20,80,40,0.12);
}
.race-progress-fill {
  height: 100%; width: 0%; border-radius: 6px;
  background: linear-gradient(90deg, #ffd24a, #ff9a3c 60%, #ff5d7a);
  transition: width 0.15s linear;
}
.race-progress-flag { font-size: 16px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25)); }
.hud {
  display: flex; gap: 10px; margin-top: 8px;
}
.hud-item {
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px; font-weight: 700; color: #4a6278;
  box-shadow: 0 3px 0 rgba(26, 95, 150, 0.12);
}
.hud-item span { color: #1560a8; font-weight: 800; }
.hud-item.loot span { color: #ca8a04; }
#gameCanvas {
  flex: 1; width: 100%; height: 100%; display: block; touch-action: none;
  background: #7ec8ff;
}
.overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(40, 90, 140, 0.28); backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
  z-index: 6;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay-card {
  text-align: center; padding: 26px 22px 22px; border-radius: 24px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff 70%);
  box-shadow: 0 16px 40px rgba(20, 50, 90, 0.28), 0 0 0 3px #fff inset;
  max-width: 320px; width: calc(100% - 48px);
  animation: popIn 0.35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  from { transform: scale(0.85) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.hero-avatar {
  display: flex; justify-content: center; margin-bottom: 2px;
  filter: drop-shadow(0 8px 10px rgba(30, 90, 160, 0.25));
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.overlay-card h2 {
  margin: 4px 0 10px; font-size: 22px; letter-spacing: 1px;
  color: #1a6fb3;
  text-shadow: 0 2px 0 rgba(255, 210, 74, 0.5);
}
.overlay-card p { color: #5b7186; margin-bottom: 18px; font-size: 14px; line-height: 1.45; }
.overlay-card .btn.primary {
  min-width: 180px;
  box-shadow: 0 5px 0 #158a48, 0 8px 16px rgba(37, 211, 102, 0.28);
}
.steer-hint {
  display: flex; justify-content: center; gap: 18px; margin: 4px 0 14px;
  color: #7a90a4; font-size: 12px; font-weight: 700;
}
.steer-hint span { opacity: 0.9; }
.game-page .toast {
  background: rgba(20, 50, 90, 0.88);
}
