* {
  box-sizing: border-box;
  user-select: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(180deg, #fdd7aa, #ffa962);
  color: #2d2200;
}

.game {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 12vw, 110px);
  letter-spacing: 5px;
  text-shadow: 5px 5px 0 white;
}

.name-box {
  width: min(420px, 90vw);
  display: grid;
  gap: 8px;
  font-weight: 900;
  font-size: 20px;
}

.name-box input {
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  border: 4px solid #2d2200;
  border-radius: 18px;
  background: white;
  box-shadow: 5px 5px 0 #2d2200;
}

.counter {
  min-width: 230px;
  padding: 14px 28px;
  text-align: center;
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 900;
  background: white;
  border: 5px solid #2d2200;
  border-radius: 24px;
  box-shadow: 8px 8px 0 #2d2200;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cps-box,
.score-box {
  min-width: 140px;
  padding: 7px 14px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  background: white;
  border: 3px solid #2d2200;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #2d2200;
}

.score-box {
  min-width: 170px;
}

.lemon-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lemon-button:active {
  transform: scale(0.97);
}

.lemon-img {
  width: min(75vw, 420px);
  height: auto;
  display: block;
  pointer-events: none;
  image-rendering: auto;
}

.lemon-img.pop {
  transform: scale(1.04);
}

.hidden {
  display: none;
}

#message {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.leaderboard-card {
  width: min(520px, 92vw);
  padding: 20px;
  background: white;
  border: 5px solid #2d2200;
  border-radius: 24px;
  box-shadow: 8px 8px 0 #2d2200;
}

.leaderboard-card h2 {
  margin: 0 0 8px;
  font-size: 34px;
  text-align: center;
}

.week-text {
  margin: -4px 0 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #7a6a2a;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 50px 1fr 90px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 2px solid #f0aa5a;
  font-size: 22px;
  font-weight: 900;
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.rank {
  text-align: center;
}

.leaderboard-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  text-align: right;
}