@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&display=swap');

:root {
  font-family: 'Baloo 2', system-ui, sans-serif;
  color: #fff8df;
  background: #17251f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: radial-gradient(circle at 50% 0%, #294235 0, #17251f 62%);
}

.game-over {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 19, 15, 0.78);
}

.game-over[hidden] { display: none; }
.setup { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 24px; background: rgba(10, 19, 15, .78); }
.setup[hidden] { display: none; }
.round-transition { position: fixed; inset: 0; z-index: 4; display: grid; place-content: center; gap: 2px; background: rgba(10, 19, 15, .82); text-align: center; }
.round-transition[hidden] { display: none; }
.round-transition p { margin: 0; color: #f3bd56; font-size: 1.6rem; font-weight: 700; }
.round-transition strong { color: #fff8df; font-size: 6rem; line-height: .95; }
.round-transition span { color: #a5bd9f; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .12em; }
.setup-board { width: min(100%, 390px); padding: 30px 28px 34px; border: 4px solid #f3bd56; border-radius: 28px; background: #20362c; box-shadow: 0 12px 0 #102019, inset 0 2px 0 #557b5d; text-align: center; }
.setup h2 { margin: 0 0 22px; font-size: 2.25rem; line-height: 1; }
.setup fieldset { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; text-align: left; }
.setup legend, .round-select { color: #f3bd56; font-size: 1.1rem; font-weight: 700; }
.setup fieldset label { padding: 8px 12px; border: 2px solid #3f664c; border-radius: 12px; cursor: pointer; }
.setup input { accent-color: #f3bd56; }
.round-select { display: block; margin-top: 20px; text-align: left; }
.round-select select { display: block; width: 100%; margin-top: 6px; padding: 9px 12px; border: 2px solid #3f664c; border-radius: 10px; color: #fff8df; background: #17251f; font: inherit; }
.start-game { margin-top: 22px; }

.game-over-board {
  width: min(100%, 390px);
  padding: 34px 28px 38px;
  border: 4px solid #f3bd56;
  border-radius: 28px;
  background: #20362c;
  box-shadow: 0 12px 0 #102019, inset 0 2px 0 #557b5d;
  text-align: center;
}

.game-over-kicker { margin: 0 0 6px; color: #f3bd56; font-size: 1.1rem; font-weight: 700; }
.game-over h2 { margin: 0; color: #fff8df; font-size: clamp(2.5rem, 10vw, 4rem); line-height: 1; }
.final-label { margin: 24px 0 0; color: #a5bd9f; font-size: 1.05rem; }
.final-score { margin: 0; color: #f3bd56; font-size: 5rem; font-weight: 800; line-height: 1; }
.leaderboard { margin: 22px auto 0; max-width: 230px; text-align: left; }
.leaderboard h3 { margin: 0 0 5px; color: #f3bd56; font-size: 1.15rem; text-align: center; }
.leaderboard ol { margin: 0; padding-left: 28px; color: #fff8df; }
.leaderboard li { padding: 2px 0; font-size: 1.05rem; }
.leaderboard li:first-child { color: #f3bd56; font-weight: 800; }
.play-again {
  margin-top: 24px;
  padding: 11px 25px;
  border: 0;
  border-radius: 999px;
  color: #17251f;
  background: #f3bd56;
  font: 700 1.15rem 'Baloo 2', system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 0 #b8792b;
}
.play-again:hover { background: #ffd477; }
.play-again:active { transform: translateY(2px); box-shadow: 0 2px 0 #b8792b; }

.game { width: min(100%, 640px); }

.game-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 2px;
  color: #f3bd56;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 { margin: 0; color: #fff8df; font-size: clamp(2.7rem, 8vw, 4.5rem); line-height: 0.9; }

.score-card {
  display: grid;
  min-width: 100px;
  padding: 10px 17px 8px;
  border: 2px solid #f3bd56;
  border-radius: 18px;
  background: #20362c;
  text-align: center;
  box-shadow: 0 6px 0 #102019;
}

.score-label { color: #f3bd56; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.score-value { font-size: 2.35rem; font-weight: 800; line-height: 0.95; }
.score-value small { font-size: 1rem; margin-left: 2px; }
.timer-card { border-color: #df7860; }
.timer-card .score-label { color: #df7860; }
.round-card { border-color: #8dc6a0; }
.round-card .score-label { color: #8dc6a0; }

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 3vw, 24px);
  padding: clamp(22px, 5vw, 40px);
  border: 3px solid #3f664c;
  border-radius: 30px;
  background: #31563f;
  box-shadow: 0 12px 0 #102019, inset 0 2px 0 #557b5d;
}

.combo-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: max-content;
  margin: 0;
  padding: 9px 22px 7px;
  border: 3px solid #f3bd56;
  border-radius: 16px;
  color: #17251f;
  background: #f3bd56;
  box-shadow: 0 5px 0 #b8792b;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-3deg);
}
.combo-banner[hidden] { display: none; }
.combo-banner small { display: block; margin-top: 4px; font-size: .72rem; letter-spacing: .08em; }

.hole {
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #101813 0 44%, #1b2a21 46% 64%, #243b2b 66% 100%);
  box-shadow: inset 0 8px 8px rgba(0, 0, 0, 0.28), 0 3px 0 #274633;
}

.hole::after {
  content: '';
  position: absolute;
  inset: 10%;
  display: grid;
  place-items: center;
  font-size: clamp(2.3rem, 9vw, 4.8rem);
  line-height: 1;
  transform: translateY(12px) scale(0.7);
  opacity: 0;
  pointer-events: none;
  transition: transform 120ms ease-out, opacity 120ms ease-out;
}

.hole.active::after {
  content: '🐸';
  transform: translateY(-4px) scale(1);
  opacity: 1;
}

.hole.special::after {
  content: '⭐';
  transform: translateY(-4px) scale(1);
  opacity: 1;
}

.hint { margin: 28px 0 0; color: #a5bd9f; text-align: center; font-size: 1.05rem; }

@media (max-width: 420px) {
  .game-header { align-items: flex-start; }
  .score-card { min-width: 72px; padding-inline: 10px; }
  .score-value { font-size: 1.9rem; }
}
