.live-scoreboard {
  position: absolute; z-index: 5; top: 80px; left: 16px;
  width: 240px; max-width: calc(50% - 146px); max-height: calc(100% - 124px);
  display: flex; flex-direction: column; overflow: hidden;
  border: 2px solid #183e34; border-radius: 4px;
  background: #f5ebd5; box-shadow: 3px 4px 0 #183e34;
  color: #183e34; font-variant-numeric: tabular-nums;
  pointer-events: auto;
}
.live-scoreboard[hidden] { display: none !important; }
.live-scoreboard tr.is-cashing { background: #ecdc9f; }
.live-scoreboard tr.is-cashing .live-scoreboard-gain { color: #624b1e; opacity: 1; transform: none; animation: none; }
.live-scoreboard-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px; background: #183e34; color: #f5ebd5;
  border-bottom: 2px solid #183e34;
}
.live-scoreboard-title { margin: 0; font-size: 15px; line-height: 20px; font-weight: 900; letter-spacing: -.4px; white-space: nowrap; }
.live-scoreboard-count { font-size: 10px; line-height: 16px; font-weight: 750; white-space: nowrap; color: #f5dfa8; }
.live-scoreboard-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #8e9a7a #f5ebd5; touch-action: pan-y; }
.live-scoreboard-scroll:focus-visible { outline: 2px solid #db6645; outline-offset: -3px; }
.live-scoreboard table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.live-scoreboard-rank-col { width: 36px; }
.live-scoreboard-value-col { width: 88px; }
/* Keep useful table semantics without turning the match HUD into a spreadsheet. */
.live-scoreboard thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.live-scoreboard td { position: relative; height: 32px; padding: 2px 4px; border-top: 1px solid #183e3426; font-size: 13px; line-height: 20px; vertical-align: middle; }
.live-scoreboard tbody tr:first-child td { border-top: 0; }
.live-scoreboard-rank { text-align: center; color: #557060; font-size: 17px !important; font-weight: 900; }
.live-scoreboard-rank-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; line-height: 1; }
.live-scoreboard-name { text-align: left; }
.live-scoreboard-value { text-align: right; padding-right: 8px !important; }
.live-scoreboard-name-line, .live-scoreboard-score-line { display: flex; align-items: center; min-width: 0; gap: 4px; }
.live-scoreboard-score-line { justify-content: flex-end; }
.live-scoreboard-player { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #286596; font-weight: 800; letter-spacing: -.2px; }
.live-scoreboard-marker { display: block; flex-shrink: 0; color: #735b40; font-size: 9px; line-height: 12px; font-weight: 700; white-space: nowrap; }
.live-scoreboard-marker:empty { display: none; }
.live-scoreboard-value strong { display: block; flex-shrink: 0; font-size: 17px; font-weight: 900; line-height: 24px; letter-spacing: -.4px; white-space: nowrap; }
.live-scoreboard-gain { display: block; flex-shrink: 0; color: #2e653a; font-size: 10px; font-weight: 900; line-height: 16px; white-space: nowrap; opacity: 0; }
.live-scoreboard-gain:empty { display: none; }
.live-scoreboard tr.is-self { background: #eed89d; }
.live-scoreboard tr.is-self .live-scoreboard-rank::before { content: ''; position: absolute; top: calc(50% - 4px); left: 1px; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid #db6645; }
/* Live positions stay quiet; medals belong to the finished result board. */
.live-scoreboard[data-mode="control"] tr[data-scored="true"][data-rank="1"] .live-scoreboard-rank-badge { color: #986b23; }
.live-scoreboard[data-mode="control"] tr[data-scored="true"][data-rank="2"] .live-scoreboard-rank-badge { color: #687b80; }
.live-scoreboard[data-mode="control"] tr[data-scored="true"][data-rank="3"] .live-scoreboard-rank-badge { color: #9b6543; }
.live-scoreboard tr.is-eliminated .live-scoreboard-rank, .live-scoreboard tr.is-offline .live-scoreboard-rank { color: #797d70; }
.live-scoreboard tr.is-eliminated .live-scoreboard-player { color: #aa4b16; text-decoration: line-through; text-decoration-color: currentColor; }
.live-scoreboard[data-mode="survival"] tr.is-eliminated .live-scoreboard-rank { color: #b1302e; }
.live-scoreboard tr[data-pulse="0"] .live-scoreboard-gain { animation: score-gain-a 1.4s ease-out both; }
.live-scoreboard tr[data-pulse="1"] .live-scoreboard-gain { animation: score-gain-b 1.4s ease-out both; }
.live-scoreboard[data-mode="survival"] .live-scoreboard-gain { display: none; }
.live-scoreboard[data-mode="survival"] .live-scoreboard-rank-col { width: 40px; }
.live-scoreboard[data-mode="survival"] .live-scoreboard-rank { font-size: 10px !important; }
.live-scoreboard[data-mode="survival"] .live-scoreboard-value-col { width: 60px; }
.game-card.has-live-scoreboard .event-feed { display: none; }
.game-card.replaying .live-scoreboard { visibility: hidden; }
.game-card.desktop-looking .live-scoreboard { pointer-events: none; }
@keyframes score-gain-a { 0%, 72% { opacity: 1; } 100% { opacity: 0; } }
@keyframes score-gain-b { 0%, 72% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 1100px) and (pointer: fine) {
  .live-scoreboard { width: 228px; max-width: calc(50% - 132px); }
}
@media (min-width: 1400px) and (min-height: 800px) and (pointer: fine) {
  .live-scoreboard { width: clamp(280px, 15vw, 300px); left: 20px; }
  .live-scoreboard-header { padding: 10px; }
  .live-scoreboard-title { font-size: 17px; line-height: 24px; }
  .live-scoreboard-count { font-size: 12px; }
  .live-scoreboard td { height: 38px; font-size: 15px; line-height: 24px; }
  .live-scoreboard-rank-col { width: 40px; }
  .live-scoreboard-value-col { width: 100px; }
  .live-scoreboard-rank { font-size: 20px !important; }
  .live-scoreboard-value strong { font-size: 20px; line-height: 26px; }
  .live-scoreboard-marker { font-size: 10px; line-height: 14px; }
  .live-scoreboard-gain { font-size: 11px; }
  .live-scoreboard[data-mode="survival"] .live-scoreboard-rank-col { width: 44px; }
  .live-scoreboard[data-mode="survival"] .live-scoreboard-rank { font-size: 12px !important; }
}
@media (max-width: 850px), (pointer: coarse) {
  .live-scoreboard { top: calc(8px + var(--mobile-safe-top, 0px)); left: calc(12px + var(--mobile-safe-left, 0px)); width: 188px; max-width: calc(50% - 112px - var(--mobile-safe-left, 0px)); max-height: calc(100% - 244px - var(--mobile-safe-top, 0px) - var(--mobile-safe-bottom, 0px)); box-shadow: 2px 3px 0 #183e34; }
  .live-scoreboard-header { padding: 4px 8px; gap: 4px; }
  .live-scoreboard-title { font-size: 13px; letter-spacing: -.4px; }
  .live-scoreboard-count { font-size: 9px; line-height: 12px; }
  .live-scoreboard td { height: 28px; padding: 2px 4px; font-size: 11px; line-height: 16px; }
  .live-scoreboard-rank-col { width: 28px; }
  .live-scoreboard-value-col { width: 72px; }
  .live-scoreboard-rank { font-size: 14px !important; }
  .live-scoreboard-value { padding-right: 4px !important; }
  .live-scoreboard-name-line, .live-scoreboard-score-line { gap: 2px; }
  .live-scoreboard-value strong { font-size: 14px; line-height: 20px; }
  .live-scoreboard-marker { font-size: 9px; line-height: 12px; }
  .live-scoreboard-gain { font-size: 9px; line-height: 12px; }
  .live-scoreboard[data-mode="survival"] .live-scoreboard-value-col { width: 44px; }
  .game-card.has-live-scoreboard .self-status { display: none; }
}
@media (max-height: 420px) and (orientation: landscape) and (max-width: 850px), (max-height: 420px) and (orientation: landscape) and (pointer: coarse) {
  .live-scoreboard { max-height: calc(100% - 218px - var(--mobile-safe-top, 0px) - var(--mobile-safe-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .live-scoreboard tr[data-pulse] .live-scoreboard-gain { animation-timing-function: steps(1, end); transform: none; }
}
