/* =============================================================
   GAME: Whack-a-Mole
   ============================================================= */
.board-whack { display: flex; flex-direction: column; align-items: center; outline: none; }
.wm-stage { position: relative; touch-action: none; }
.wm-canvas {
  display: block; width: min(calc(100vw - 60px), 520px, calc(100vh - 230px)); min-width: 240px; aspect-ratio: 1; border-radius: 18px;
  background: #1d5520; cursor: crosshair; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 2px #ffa53d, 0 0 26px rgba(255, 165, 61, .35), inset 0 -5px 0 rgba(0, 0, 0, .3);
}
.board-whack:focus-visible .wm-canvas { box-shadow: 0 0 0 3px #fff, 0 0 26px rgba(255, 165, 61, .55); }
.wm-msg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 80%;
  padding: 10px 16px; border-radius: 12px; background: rgba(30, 14, 4, .84); color: #ffe9c8; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 1px rgba(255, 165, 61, .6); pointer-events: none;
}
.wm-msg[hidden] { display: none; }
.wm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.wm-num { color: #ffc46b; font-variant-numeric: tabular-nums; }
.wm-hurry { box-shadow: 0 0 0 2px #ff5a3d; }
.wm-hurry .wm-num { color: #ff8a6b; }
@media (pointer: coarse) { .wm-canvas { width: min(calc(100vw - 48px), 520px, calc(100vh - 260px)); } }

/* bomb: short shake of the frame (off when motion is reduced) */
.wm-boom { animation: wmShake .4s cubic-bezier(.36, .07, .19, .97); }
@keyframes wmShake { 15%, 55% { translate: -6px 2px; } 35%, 75% { translate: 6px -2px; } 90% { translate: -2px 0; } }
@media (prefers-reduced-motion: reduce) { .wm-boom { animation: none; } }
