/* Whack-a-Mole: 3×3 holes; a mole slides up out of each pit. */
.whack { position: relative; width: min(100%, 480px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 10px; }
.whack-hole {
  position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; cursor: pointer;
  background: var(--chip); border: 1px solid var(--card-line); border-radius: 16px; -webkit-tap-highlight-color: transparent;
}
.whack-hole:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.whack-pit { position: absolute; left: 14%; right: 14%; bottom: 14%; height: 22%; border-radius: 50%; background: var(--bg); }
/* the mole lives in a clip box that ends at the pit's centre line, so it rises out of the hole */
.whack-clip { position: absolute; left: 0; right: 0; top: 0; bottom: 25%; overflow: hidden; pointer-events: none; }
.whack-mole {
  position: absolute; left: 24%; right: 24%; bottom: 0; height: 72%;
  background: #8b6a4e; border-radius: 999px 999px 10px 10px;
  transform: translateY(105%); transition: transform .12s ease-out;
}
.whack-hole.up .whack-mole { transform: translateY(0); }
.whack-hole.hit .whack-mole { background: #6f523b; transform: translateY(18%) scaleY(.92); transition-duration: .08s; }
.whack-eyes { position: absolute; top: 26%; left: 50%; width: 46%; height: 12%; transform: translateX(-50%);
  background: radial-gradient(circle, #1a1a1a 55%, transparent 60%) left / 30% 100% no-repeat,
              radial-gradient(circle, #1a1a1a 55%, transparent 60%) right / 30% 100% no-repeat; }
.whack-hole.hit .whack-eyes { background: none; border-top: 2px solid #1a1a1a; height: 0; top: 32%; }
.whack-nose { position: absolute; top: 44%; left: 50%; width: 20%; height: 11%; transform: translateX(-50%); border-radius: 50%; background: #e7a1a1; }
.whack-pop { position: absolute; top: 8%; left: 0; right: 0; text-align: center; font-weight: 500; color: var(--green); opacity: 0; pointer-events: none; }
.whack-pop.show { animation: whack-pop .5s ease-out; }
@keyframes whack-pop { 0% { opacity: 1; transform: translateY(6px); } 100% { opacity: 0; transform: translateY(-14px); } }
.whack-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: color-mix(in srgb, var(--panel) 86%, transparent); border-radius: 16px; padding: 16px;
}
.whack-title { font-size: 26px; font-weight: 400; }
.whack-sub { color: var(--dim); margin-bottom: 8px; }
.whack.paused::after {
  content: "Paused · tap or press P"; position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--panel) 80%, transparent); border-radius: 16px; font-size: 18px;
}
