/* Crowndoku result: award points on the player's own leaderboard plate.
   The score cell counts from the prior total to the new total, then the existing
   rank-motion starts only after counting completes. */
.crowndoku-rank-board.rank-counting .contest-board-scroll,
.crowndoku-rank-board.rank-counting .contest-podium {
  opacity: 1;
  filter: none;
}

/* A rank step matches the rendered row pitch (row height + gap), rather than
   the older 42px placeholder. This keeps the travelling row on the same track
   as the competitors it passes. */
.crowndoku-rank-board {
  --crowndoku-rank-row-step: 65px;
}

.crowndoku-rank-board.rank-counting .contest-board-scroll,
.crowndoku-rank-board.rank-climbing .contest-board-scroll,
.crowndoku-rank-board.rank-pulsing .contest-board-scroll {
  max-height: 332px;
  overflow-y: auto;
  scroll-behavior: auto;
}

.crowndoku-rank-board.rank-climbing .rank-motion-player,
.crowndoku-rank-board.rank-pulsing .rank-motion-player {
  z-index: 4;
}

.crowndoku-rank-board.rank-counting .contest-board-row:not(.me),
.crowndoku-rank-board.rank-counting .contest-podium-place:not(.me) {
  opacity: .6;
  filter: saturate(.7);
}

.crowndoku-rank-board .contest-row-score.is-counting,
.crowndoku-rank-board .contest-podium-score.is-counting {
  color: #fff5bd;
  text-shadow: 0 0 12px #ffcd5b85;
  animation: inline-leaderboard-score-pulse .34s cubic-bezier(.18,.88,.22,1.08) both;
}

.crowndoku-rank-board .contest-row-score em,
.crowndoku-rank-board .contest-podium-score em {
  color: #a8ffd0;
  display: block;
  margin-top: 2px;
  font-size: .58em;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 9px #44e69c9c;
  animation: inline-leaderboard-award-in .38s cubic-bezier(.18,.88,.22,1.12) both;
}

.crowndoku-rank-board .contest-podium-score em {
  margin-top: 3px;
}

@keyframes inline-leaderboard-score-pulse {
  0% { color: #ffe4a1; filter: brightness(1); transform: scale(1); }
  48% { color: #fff7d4; filter: brightness(1.35); transform: scale(1.16); }
  100% { color: #fff5bd; filter: brightness(1); transform: scale(1); }
}

@keyframes inline-leaderboard-award-in {
  0% { opacity: 0; transform: translateY(5px) scale(.65); }
  65% { opacity: 1; transform: translateY(-1px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .crowndoku-rank-board .contest-row-score.is-counting,
  .crowndoku-rank-board .contest-podium-score.is-counting,
  .crowndoku-rank-board .contest-row-score em,
  .crowndoku-rank-board .contest-podium-score em {
    animation: none;
  }
}

@media (width <= 430px) {
  .crowndoku-rank-board {
    --crowndoku-rank-row-step: 64px;
  }
}
