/* pumpkinsquash.space — play screen: scoreboard */

.scoreboard {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: 4.5rem;
  z-index: 2;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: rgba(32, 19, 42, 0.72);
  color: #fbeeda;
  font: 600 0.85rem/1.3 system-ui, sans-serif;
  pointer-events: none;
}

.scoreboard__title {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.scoreboard__list {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scoreboard__list li {
  display: grid;
  grid-template-columns: 0.7rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  border-radius: 6px;
}

.scoreboard__num {
  min-width: 1.6ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; }
.dot--pumpkin    { background: #f2792a; }
.dot--squash     { background: #f4b731; }
.dot--apple      { background: #c8324b; }
.dot--pecanpie    { background: #6b3a1c; box-shadow: 0 0 0 2px #d9a15a; }
.dot--greenapple  { background: #8fc23a; }
.dot--cranberry   { background: #b3122f; }
.dot--sweetpotato { background: #a8513a; }
.dot--sweetonion  { background: #e8c98a; }
.dot--corn        { background: #f2c531; box-shadow: 0 0 0 2px #5f8f36; }
.dot--mallard     { background: #2f7d4a; box-shadow: 0 0 0 2px #e8c22a; }
.dot--goose       { background: #1c1a1a; box-shadow: 0 0 0 2px #b09a78; }
.dot--pig         { background: #f4b6c2; box-shadow: 0 0 0 2px #e88ba0; }
.dot--pumpkinpie { background: #e8892f; box-shadow: 0 0 0 2px #e0a15a; }
.dot--applepie   { background: #f3cd88; box-shadow: 0 0 0 2px #b97f33; }
.dot--turkey     { background: #7a4a2b; box-shadow: 0 0 0 2px #d98b2b; }

.scoreboard__list li.is-hit { animation: sb-pop 0.35s ease-out; }

@keyframes sb-pop {
  0%   { background: rgba(255, 207, 142, 0.55); transform: scale(1.06); }
  100% { background: transparent; transform: scale(1); }
}

/* fifteen rows: split into two columns when the screen is short */
@media (max-height: 640px) {
  .scoreboard__list { grid-template-columns: 1fr 1fr; column-gap: 0.9rem; }
}

/* ---------- mobile layout ---------- */

@media (max-width: 640px) {
  /* scoreboard at a third of its normal size, anchored to the same corner
     it already sits in so it doesn't drift when it shrinks */
  .scoreboard {
    transform: scale(0.3334);
    transform-origin: top left;
  }

  /* the footer (its nav links, and the screen-reader-only smash button)
     sits a third of a screen-height further down than the game itself, so
     it's out from underfoot while playing — reaching it takes an extra
     ~33% scroll rather than it being right at the bottom edge already */
  .frame { min-height: calc(100dvh + 33dvh); }
}

@media (prefers-reduced-motion: reduce) {
  .scoreboard__list li.is-hit { animation: none; }
}
