/* Shared end-of-round ranking: rows stay compact even for two players. */
.leaderboard-list { display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: 0; margin: 0; padding: 4px; overflow: auto; list-style: none; box-sizing: border-box; scrollbar-width: thin; }
.leaderboard-row { display: grid; grid-template-columns: 68px minmax(100px, 1fr) minmax(110px, .6fr) minmax(240px, 1fr); align-items: center; gap: 20px; flex: none; min-width: 0; padding: 22px 24px; background: #ffffff08; border: 1px solid #ffffff1c; border-radius: 20px; }
.leaderboard-row.first { border-color: #ffd66c88; background: linear-gradient(100deg, #ffd66c14, #ffffff06 65%); box-shadow: inset 3px 0 0 var(--color-accent); }
.leaderboard-place { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 2px; line-height: 1; }
.leaderboard-place strong { font-size: 36px; font-weight: 750; font-variant-numeric: tabular-nums; }
.leaderboard-place > span:last-child { font-size: 11px; color: var(--color-muted); }
.leaderboard-medal { font-size: 24px; line-height: 1.2; }
.leaderboard-row.first .leaderboard-place strong, .leaderboard-row.first .leaderboard-score > strong { color: var(--color-accent); }
.leaderboard-identity { min-width: 0; display: flex; align-items: center; justify-content: flex-start; overflow-wrap: anywhere; }
.leaderboard-identity .face-photo { width: 64px; height: 64px; max-width: 100%; flex: none; border-radius: 50%; object-fit: cover; }
.leaderboard-identity .drawn-name { width: 100%; max-width: 280px; height: 64px; object-fit: contain; }
.leaderboard-score { min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.leaderboard-score > strong { display: block; font-size: 42px; font-weight: 750; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: anywhere; }
.leaderboard-score > span { display: block; color: var(--color-muted); font-size: 12px; margin-top: 5px; }
.leaderboard-score .leaderboard-delta { color: var(--color-ok); }
.leaderboard-score .leaderboard-delta.negative { color: var(--color-danger); }
.leaderboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-left: 20px; border-left: 1px solid #ffffff1a; }
.leaderboard-stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.leaderboard-stat > span { color: var(--color-muted); font-size: 12px; }
.leaderboard-stat > strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.leaderboard-stat.correct > strong { color: var(--color-ok); }
.leaderboard-stat.incorrect > strong { color: var(--color-danger); }
.leaderboard-row.long-score .leaderboard-score > strong { font-size: 26px; }
.tv-mode .tv-main > .tv-results { justify-content: center; gap: clamp(12px, 2vh, 32px); }
.tv-mode .tv-results > h1 { font-size: clamp(28px, 3vw, 70px); margin: 0; }
.tv-mode .tv-results-caption { margin: 0; font-size: clamp(14px, 1.3vw, 30px); }
.tv-mode .tv-results .leaderboard-list { flex: 0 1 auto; max-height: 80%; max-width: min(100%, 2400px); align-self: center; gap: clamp(12px, 1.5vh, 28px); }
.tv-mode .leaderboard-row { grid-template-columns: clamp(68px, 7vw, 150px) minmax(80px, 1fr) minmax(140px, .8fr) minmax(260px, 1.3fr); padding: clamp(20px, 2.5vh, 48px); gap: clamp(14px, 2vw, 40px); border-radius: clamp(18px, 2vw, 32px); }
.tv-mode .leaderboard-place strong { font-size: clamp(38px, 4vw, 96px); }
.tv-mode .leaderboard-place > span:last-child { font-size: clamp(12px, 1.2vw, 28px); }
.tv-mode .leaderboard-medal { font-size: clamp(24px, 2.4vw, 56px); }
.tv-mode .leaderboard-identity .face-photo { width: clamp(64px, 7vw, 150px); height: clamp(64px, 7vw, 150px); }
.tv-mode .leaderboard-identity .drawn-name { height: clamp(64px, 7vw, 150px); max-width: 520px; }
.tv-mode .leaderboard-score > strong { font-size: clamp(44px, 5vw, 112px); }
.tv-mode .leaderboard-score > span, .tv-mode .leaderboard-stat > span { font-size: clamp(14px, 1.3vw, 30px); }
.tv-mode .leaderboard-stat > strong { font-size: clamp(28px, 3vw, 64px); }
.tv-mode .leaderboard-row.long-score .leaderboard-score > strong { font-size: clamp(22px, 2.4vw, 52px); }
.host-turn-tools .press.primary { color: #fff; }
.round-summary > .leaderboard-list { flex: 1 1 auto; }
.host-desk .leaderboard-row { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "place identity score" "stats stats stats"; }
.host-desk .leaderboard-place { grid-area: place; }
.host-desk .leaderboard-identity { grid-area: identity; }
.host-desk .leaderboard-score { grid-area: score; }
.host-desk .leaderboard-stats { grid-area: stats; border-left: 0; border-top: 1px solid #ffffff1a; padding: 12px 0 0; }
@media (max-width: 900px) {
  .tv-mode .tv-results .leaderboard-list { max-height: none; flex: 1 1 0; justify-content: flex-start; }
  .leaderboard-row, .tv-mode .leaderboard-row { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "place identity score" "stats stats stats"; gap: 12px; padding: 16px; border-radius: 18px; }
  .leaderboard-place { grid-area: place; }
  .leaderboard-identity { grid-area: identity; }
  .leaderboard-score { grid-area: score; }
  .leaderboard-stats { grid-area: stats; border-left: 0; border-top: 1px solid #ffffff1a; padding: 12px 0 0; }
  .leaderboard-identity .face-photo, .tv-mode .leaderboard-identity .face-photo { width: 56px; height: 56px; }
  .leaderboard-identity .drawn-name, .tv-mode .leaderboard-identity .drawn-name { height: 48px; }
  .leaderboard-place strong, .tv-mode .leaderboard-place strong { font-size: 30px; }
  .leaderboard-place > span:last-child, .tv-mode .leaderboard-place > span:last-child { font-size: 10px; }
  .leaderboard-score > strong, .tv-mode .leaderboard-score > strong { font-size: 34px; }
  .leaderboard-stat > span, .tv-mode .leaderboard-stat > span, .leaderboard-score > span, .tv-mode .leaderboard-score > span { font-size: 12px; }
  .leaderboard-stat > strong, .tv-mode .leaderboard-stat > strong { font-size: 24px; }
  .leaderboard-row.long-score, .tv-mode .leaderboard-row.long-score { grid-template-areas: "place identity identity" "score score score" "stats stats stats"; }
  .leaderboard-row.long-score .leaderboard-score > strong, .tv-mode .leaderboard-row.long-score .leaderboard-score > strong { font-size: 24px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .leaderboard-row, .tv-mode .leaderboard-row { padding: 8px 12px; gap: 10px; }
  .leaderboard-stats { padding-top: 6px; }
  .leaderboard-medal { display: none; }
}
