/* =============================================================
   GAME: Car Race
   ============================================================= */
.board-carrace { display: flex; flex-direction: column; align-items: center; gap: 10px; outline: none; }
.cr-stage { position: relative; touch-action: none; }
.cr-canvas {
  display: block; border-radius: 14px; background: #0d2616; cursor: ew-resize;
  box-shadow: 0 0 0 2px #c6ff3d, 0 0 28px rgba(198, 255, 61, .3);
}
.board-carrace:focus-visible .cr-canvas { box-shadow: 0 0 0 3px #fff, 0 0 28px rgba(198, 255, 61, .5); }
.cr-msg {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: max-content; max-width: 82%;
  padding: 10px 16px; border-radius: 12px; background: rgba(6, 12, 4, .86); color: #f0ffd8; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 1px rgba(198, 255, 61, .5); pointer-events: none;
}
.cr-msg[hidden] { display: none; }
.cr-num { color: #d8ff7a; font-variant-numeric: tabular-nums; }

/* on-screen buttons: phones and tablets only */
.cr-pad { display: none; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 8px; width: min(100%, 380px); touch-action: none; }
.cr-key {
  display: grid; place-items: center; height: 56px; border: 0; border-radius: 14px; cursor: pointer; color: #d8ff7a;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(198, 255, 61, .4), 0 4px 0 rgba(0, 0, 0, .35);
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.cr-key svg { width: 26px; height: 26px; fill: currentColor; }
.cr-key-steer { color: #fff; background: linear-gradient(180deg, #2f3d14, #1c260c); box-shadow: inset 0 0 0 1px #c6ff3d, 0 4px 0 rgba(0, 0, 0, .35); }
.cr-key.down { transform: translateY(2px); filter: brightness(1.3); }
@media (pointer: coarse) { .cr-pad { display: grid; } }
