:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: transparent; }
body { display: flex; align-items: flex-end; padding: 8px; }
.overlay {
  width: min(920px, calc(100vw - 16px));
  overflow: hidden;
  color: #0c1118;
  background: rgba(248, 250, 252, .97);
  border: 2px solid #101820;
  border-top: 4px solid #e31b2d;
  border-bottom: 4px solid #f5a800;
  border-radius: 4px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
}
.overlay-header { min-height: 34px; display: grid; grid-template-columns: 1fr 270px; align-items: center; padding: 4px 10px; color: #fff; background: #13283e; }
.overlay-header > div:first-child { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.overlay-header strong { overflow: hidden; font-size: 15px; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.overlay-header span { color: #d6e3f0; font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.column-headings { display: grid; grid-template-columns: 90px 72px 108px; text-align: center; }
.column-headings span { color: #fff; font-size: 12px; font-weight: 900; }
.players { display: grid; }
.player { min-height: 58px; display: grid; grid-template-columns: minmax(220px, 1fr) 90px 72px 108px; align-items: center; border-top: 1px solid #bfc8d2; }
.player:first-child { border-top: 0; }
.player > *:not(:first-child) { height: 100%; display: grid; place-items: center; border-left: 1px solid #c5ccd5; font-variant-numeric: tabular-nums; }
.player-name { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.player-name i { width: 11px; height: 11px; flex: 0 0 auto; background: #aeb7c1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.22); }
.player.active .player-name i { background: #0dac5f; box-shadow: 0 0 9px rgba(13,172,95,.7); }
.player-name strong { overflow: hidden; font-size: clamp(18px, 3.3vw, 29px); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.average { color: #44505d; font-size: 18px; font-weight: 800; }
.legs { color: #111820; font-size: 29px; }
.score { color: #0b1016; background: #eef1f5; font-size: 34px; }
.player.active .score { color: #fff; background: #e31b2d; }
.overlay-footer { min-height: 28px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 4px 10px; color: #fff; background: #13283e; }
.overlay-footer > span:first-child { overflow: hidden; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
#statusLabel { color: #b9c9d8; font-size: 10px; font-weight: 800; }
#statusLabel.live { color: #63e6a1; }
#statusLabel.stale { color: #ffd166; }
.overlay-footer strong { font-size: 14px; letter-spacing: .08em; white-space: nowrap; }
.overlay-footer strong i { color: #ff4052; font-style: normal; }
.overlay.waiting { opacity: .9; }
.overlay.stale .player-name i { background: #f3a712; box-shadow: none; }
@media (max-width: 620px) {
  .overlay-header { grid-template-columns: 1fr 189px; }
  .column-headings, .player { grid-template-columns: minmax(155px, 1fr) 63px 50px 76px; }
  .player-name { gap: 7px; padding-inline: 8px; }
  .player-name strong { font-size: 17px; }
  .average { font-size: 13px; }
  .legs { font-size: 23px; }
  .score { font-size: 26px; }
}
