* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: system-ui, sans-serif;
  background: #365314;
  color: #f7fee7;
  text-align: center;
}

:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.hud {
  width: 100%;
  padding: 0.75rem;
  background: #1a2e05;
}

.hud h1 {
  margin: 0;
  font-size: 1.25rem;
}

.hud__score {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.field {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 96px));
  grid-template-rows: repeat(3, minmax(80px, 96px));
  gap: 8px;
}

.hole {
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #1a2e05;
  font-size: 2.5rem;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.06s ease;
}

.hole .mole {
  display: inline-block;
  transform: translateY(100%) scale(0.6);
  opacity: 0;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.hole.up .mole {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.hole:active:not(:disabled) {
  transform: scale(0.94);
}

.hole:disabled {
  cursor: default;
}

.status {
  min-height: 1.5rem;
  margin: 0;
  max-width: 320px;
  font-weight: 600;
}

.button {
  padding: 0.5rem 1.5rem;
  border: 0;
  border-radius: 8px;
  background: #a3e635;
  color: #1a2e05;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.button:hover:not(:disabled) {
  background: #bef264;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  margin: 0;
  max-width: 320px;
  color: #d9f99d;
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .hole,
  .hole .mole {
    transition: none;
  }

  .hole:active:not(:disabled) {
    transform: none;
  }
}
