/* Dedicated broadcast view. Compact standings, three persistent podium players. */
html:has(.tv-shell){background:#092e24;scrollbar-gutter:auto}
.tv-shell{min-height:100svh;padding:0;color:#f2f1dd;background:#092e24}
.tv-shell #main{max-width:none;padding:0;outline:none}
.tv-board{--tv-muted:#b4cbbc;position:relative;isolation:isolate;min-height:100svh;padding:20px 32px;display:flex;flex-direction:column;gap:16px;overflow:hidden;background:radial-gradient(ellipse at 8% 30%,#216748 0,transparent 55%),linear-gradient(125deg,#103f30,#082d24 75%)}
.tv-atmosphere{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.tv-atmosphere:before{content:"";position:absolute;width:70vw;height:70vw;border:1px solid #9fca8d14;border-radius:50%;left:-40vw;top:-20vw;box-shadow:0 0 0 90px #ffffff02,0 0 0 180px #ffffff02}
.tv-atmosphere span{position:absolute;font-family:Georgia,serif;font-size:180px;color:#a1ccad07;right:3%;bottom:8%;transform:rotate(-12deg)}
.tv-atmosphere span:nth-child(2){right:19%;top:2%;font-size:100px}
.tv-atmosphere span:nth-child(3){left:1%;bottom:0;font-size:160px}
.tv-atmosphere span:nth-child(4){left:34%;top:3%;font-size:100px}
.tv-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-shrink:0}
.tv-kicker{display:block;color:#d4dca9;font-size:16px;line-height:1.3;letter-spacing:.1em;margin-bottom:5px}
.tv-heading h1{margin:0;color:#f4f3e5;font-size:32px;font-weight:600;line-height:1.1;letter-spacing:-.04em}
.tv-context{display:flex;gap:16px;align-items:center;color:var(--tv-muted);font-size:16px;white-space:nowrap}
.tv-context>span{color:#e8edce}
.tv-context time{border-left:1px solid #ffffff26;padding-left:16px;font-variant-numeric:tabular-nums}
.tv-stage{flex:1;min-height:0;display:grid;grid-template-columns:minmax(260px,.32fr) minmax(0,1fr);gap:32px}
.tv-podium{min-width:0;display:flex;flex-direction:column;position:relative;padding-right:28px;border-right:1px solid #c0d3ae22}
.tv-podium-heading{padding:0 0 18px}
.tv-eyebrow{font-size:16px;letter-spacing:.16em;color:#c8d9a6}
.tv-podium-heading h2{font-size:24px;line-height:1.2;margin:4px 0 0;font-weight:500}
.tv-podium-players{display:grid;grid-auto-rows:1fr;gap:12px;flex:1;min-height:0}
.tv-podium-player{--metal:#edcf79;position:relative;display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px 16px;align-content:center;padding:18px 20px;border-radius:16px;background:linear-gradient(120deg,#c1b7751c,#c1b77506);min-width:0;box-shadow:inset 3px 0 var(--metal)}
.tv-podium-player[data-medal=silver]{--metal:#d4e0e6;background:linear-gradient(120deg,#cbdde317,#cbdde303)}
.tv-podium-player[data-medal=bronze]{--metal:#dba077;background:linear-gradient(120deg,#dba07719,#dba07703)}
.tv-trophy{grid-row:1 / 3;align-self:center;color:var(--metal);filter:drop-shadow(0 4px 9px #0002)}
.tv-trophy svg{display:block;width:56px;height:64px}
.tv-podium-info{min-width:0}
.tv-medal-label{display:block;color:var(--metal);font-size:16px;line-height:1.3;letter-spacing:.08em}
.tv-podium-info h3{font-size:22px;line-height:1.2;letter-spacing:-.02em;margin:6px 0 3px;color:#f3f0dd;overflow-wrap:anywhere;font-weight:600}
.tv-podium-info p{font-size:16px;line-height:1.3;margin:0;color:var(--tv-muted)}
.tv-podium-score{grid-column:2;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;min-width:0}
.tv-podium-score strong{font-size:34px;line-height:1.1;font-weight:600;letter-spacing:-.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--metal)}
.tv-podium-score span{font-size:16px;color:var(--tv-muted)}
.tv-podium-stats{grid-column:1 / -1;font-size:16px;line-height:1.3;color:var(--tv-muted);padding-top:4px}
.tv-podium-caption{font-size:16px;color:var(--tv-muted);margin:16px 0 0}
.tv-podium-player.is-vacant{opacity:.55}
.tv-standings{min-width:0;min-height:0;display:flex;flex-direction:column}
.tv-list-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 0 8px;flex-shrink:0}
.tv-list-heading h2{margin:0;font-size:22px;line-height:1.2;font-weight:500}
.tv-list-heading>span{color:var(--tv-muted);font-size:16px}
.tv-columns,.tv-row{display:grid;grid-template-columns:34px minmax(0,1fr) 92px 64px minmax(110px,.28fr);align-items:center;gap:14px}
.tv-columns{color:var(--tv-muted);font-size:16px;line-height:1.3;padding:0 16px 8px;flex-shrink:0}
.tv-columns>span:nth-last-child(-n+2){text-align:right}
.tv-rows{display:grid;gap:4px;flex:1;min-height:0;grid-auto-rows:minmax(42px,1fr);align-content:start}
.tv-row{position:relative;min-width:0;padding:6px 16px;border-radius:6px;background:#ffffff07}
.tv-row:nth-child(even){background:#ffffff0c}
.tv-row.is-leader{background:#d8e7a2;color:#143d2c}
.tv-position{font-size:18px;font-weight:500;font-variant-numeric:tabular-nums;color:#b3c8b7}
.tv-row.is-leader .tv-position{color:#426037}
.tv-player{min-width:0}
.tv-player strong{display:block;font-size:18px;line-height:1.2;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}
.tv-player>span{display:none}
.tv-table{color:var(--tv-muted);font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-row.is-leader .tv-table{color:#45613a}
.tv-wins{text-align:right;font-size:18px;color:#c8d7c4;font-variant-numeric:tabular-nums}
.tv-row.is-leader .tv-wins{color:#45613a}
.tv-points{text-align:right;position:relative;min-width:0;padding-left:36px}
.tv-points>strong{display:block;font-size:24px;line-height:1.1;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.035em;overflow-wrap:anywhere}
.tv-delta{position:absolute;left:0;top:50%;margin-top:-8px;font-size:16px;line-height:1;color:#c6eaa6;pointer-events:none}
.tv-row.is-leader .tv-delta{color:#275925}
.tv-delta.is-negative{color:#ffc0a4}
.tv-row.is-leader .tv-delta.is-negative{color:#793321}
.tv-pagination{display:flex;justify-content:space-between;align-items:center;padding-top:6px;color:var(--tv-muted);font-size:16px;flex-shrink:0}
.tv-pagination>div{display:flex;gap:8px}
.tv-board button,.tv-tools>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;width:44px;height:44px;border:1px solid #c2dab12b;border-radius:8px;padding:10px;background:#ffffff06;color:#d8e8ca}
.tv-board button:hover,.tv-tools>a:hover{background:#ffffff19}
.tv-board :focus-visible{outline:2px solid #e5d383;outline-offset:3px}
.tv-bottom{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:8px;border-top:1px solid #bad1ae22;flex-shrink:0}
.tv-live{display:flex;align-items:center;gap:16px;min-width:0;color:var(--tv-muted);font-size:16px}
.tv-live .connection{display:flex;font-size:16px;color:#daeccf;gap:8px;white-space:nowrap}
.tv-live .connection i{background:#a3db87}
.tv-live .connection.offline i{background:#e4b77b}
.tv-live [data-update]{overflow-wrap:anywhere}
.tv-tools{display:flex;gap:8px;flex-shrink:0}
.tv-empty{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:32px}
.tv-empty>span{display:grid;place-items:center;width:64px;height:64px;border:1px solid #a7c9a74a;border-radius:50%;margin-bottom:20px;color:#bed8a5}
.tv-empty .icon{width:28px;height:28px}
.tv-empty h2{font-size:28px;line-height:1.2;letter-spacing:-.04em;margin:0 0 16px;font-weight:500}
.tv-empty p{color:var(--tv-muted);font-size:16px;max-width:440px;margin:0}
.tv-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}
.tv-board [hidden]{display:none!important}
@media(min-width:1000px) and (min-height:700px){
 .tv-board{height:100svh;min-height:700px}
}
@media(min-width:1600px) and (min-height:900px){
 .tv-board{padding:28px 40px;gap:24px}
 .tv-stage{grid-template-columns:minmax(300px,.3fr) minmax(0,1fr);gap:40px}
 .tv-heading h1{font-size:36px}
 .tv-player strong{font-size:20px}
 .tv-points>strong{font-size:28px}
 .tv-podium-info h3{font-size:25px}
 .tv-podium-score strong{font-size:40px}
}
@media(max-width:1199px){
 .tv-board{padding:20px 24px}
 .tv-stage{gap:20px;grid-template-columns:260px minmax(0,1fr)}
 .tv-podium{padding-right:18px}
 .tv-podium-player{padding:14px;grid-template-columns:44px minmax(0,1fr);gap:8px 12px}
 .tv-trophy svg{width:44px;height:52px}
 .tv-podium-info h3{font-size:20px}
 .tv-podium-score strong{font-size:30px}
 .tv-columns,.tv-row{grid-template-columns:28px minmax(0,1fr) 74px 56px 116px;gap:10px;padding-inline:12px}
}
@media(max-width:999px){
 .tv-stage{display:flex;flex-direction:column;gap:24px}
 .tv-podium{padding:0;border:0}
 .tv-podium-heading{padding-bottom:12px}
 .tv-podium-heading .tv-eyebrow{display:none}
 .tv-podium-players{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto}
 .tv-podium-player{grid-template-columns:40px minmax(0,1fr);padding:16px}
 .tv-trophy svg{width:40px;height:48px}
 .tv-podium-info h3{font-size:20px}
 .tv-podium-score{grid-column:1 / -1}
 .tv-podium-caption{display:none}
 .tv-rows{grid-auto-rows:minmax(48px,auto);flex:initial}
 .tv-context{flex-direction:column;align-items:flex-end;gap:4px}
 .tv-context time{border:0;padding:0}
 .tv-live{flex-wrap:wrap;gap:4px 12px}
}
@media(max-width:699px){
 .tv-board{padding:20px 16px;gap:20px}
 .tv-heading{align-items:flex-start;gap:14px;flex-wrap:wrap}
 .tv-kicker{letter-spacing:.06em}
 .tv-heading h1{font-size:28px}
 .tv-context{flex-direction:row;flex-wrap:wrap;gap:12px}
 .tv-context time{border-left:1px solid #ffffff26;padding-left:12px}
 .tv-podium-players{grid-template-columns:1fr;gap:8px}
 .tv-podium-player{grid-template-columns:40px minmax(0,1fr) 90px;padding:14px;gap:8px 12px}
 .tv-trophy{grid-row:1}
 .tv-podium-info h3{font-size:18px;margin:3px 0}
 .tv-medal-label{letter-spacing:.03em}
 .tv-podium-score{grid-column:3;align-self:center;align-items:flex-end;flex-direction:column;gap:2px}
 .tv-podium-score strong{font-size:28px}
 .tv-podium-score span{font-size:16px}
 .tv-podium-stats{display:none}
 .tv-columns,.tv-row{grid-template-columns:26px minmax(0,1fr) 100px;gap:8px;padding-inline:10px}
 .tv-columns>span:nth-child(4),.tv-wins,.tv-table-column{display:none}
 .tv-row{min-height:62px;padding-block:9px}
 .tv-player strong{font-size:17px}
 .tv-player>span{display:block;font-size:16px;line-height:1.3;margin-top:3px;color:var(--tv-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .tv-row.is-leader .tv-player>span{color:#45613a}
 .tv-points{padding-left:28px}
 .tv-points>strong{font-size:24px}
 .tv-delta{font-size:16px}
 .tv-bottom{align-items:flex-start;flex-direction:column}
 .tv-tools{align-self:flex-end}
 .tv-empty{padding:30px 12px;min-height:260px}
}
@media(max-height:699px) and (min-width:1000px){
 .tv-board{min-height:740px}
}

/* Constrain the grid track itself, not just its flex parent. */
.tv-stage{grid-template-rows:minmax(0,1fr)}
.tv-podium{min-height:0}
.tv-podium-players{grid-auto-rows:minmax(0,1fr)}
@media(min-width:1000px) and (max-height:849px){
 .tv-podium-heading{padding-bottom:12px}
 .tv-podium-heading .tv-eyebrow,.tv-podium-stats,.tv-podium-caption{display:none}
 .tv-podium-player{padding:12px 16px;gap:6px 12px;grid-template-columns:44px minmax(0,1fr)}
 .tv-trophy svg{width:44px;height:52px}
 .tv-podium-info h3{font-size:20px}
 .tv-podium-score strong{font-size:30px}
}
@media(max-width:999px){
 .tv-podium-players{grid-auto-rows:auto}
}

/* Paging belongs to the control strip so ten rows retain their full height. */
.tv-bottom>.tv-pagination{padding:0;gap:12px;white-space:nowrap;margin-left:auto}
@media(min-width:1000px) and (max-height:849px){
 .tv-board{padding-block:16px}
 .tv-live{gap:8px}
 .tv-live [data-update]{max-width:360px}
 .tv-bottom{gap:12px}
}
@media(max-width:1199px) and (min-width:700px){
 .tv-live .connection{display:none}
}
@media(max-width:699px){
 .tv-bottom>.tv-pagination{margin:0;align-self:stretch}
}

/* Medal finishes follow the actual rank, including tied scores. */
.tv-row:is([data-rank="1"],[data-rank="2"],[data-rank="3"]){
 isolation:isolate;overflow:hidden;color:#182d24;
 background:linear-gradient(112deg,#dfba62 0%,#fae9b4 38%,#e3bf6c 66%,#f1d58e 100%);
 box-shadow:inset 0 1px #fff7,inset 0 -1px #6a4f2426;
}
.tv-row[data-rank="2"]{background:linear-gradient(112deg,#b6c3cd 0%,#edf2f5 38%,#c3cdd5 66%,#e0e7ec 100%)}
.tv-row[data-rank="3"]{background:linear-gradient(112deg,#cb946b 0%,#f0caa8 38%,#d6a27d 66%,#e9b992 100%)}
.tv-row:is([data-rank="1"],[data-rank="2"],[data-rank="3"])> *{position:relative;z-index:1}
.tv-row:is([data-rank="1"],[data-rank="2"],[data-rank="3"]) :is(.tv-position,.tv-table,.tv-wins,.tv-player>span){color:#334334}
.tv-row:is([data-rank="1"],[data-rank="2"],[data-rank="3"]) .tv-delta{color:#204c25}
.tv-row:is([data-rank="1"],[data-rank="2"],[data-rank="3"]) .tv-delta.is-negative{color:#702716}
.tv-row:is([data-rank="1"],[data-rank="2"],[data-rank="3"])::before{
 content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
 background:linear-gradient(110deg,transparent 30%,#fff0 36%,#fff8 47%,#fffb 50%,#fff4 56%,transparent 66%);
 transform:translateX(-120%);animation:tv-medal-shine 8s cubic-bezier(.4,0,.2,1) infinite;
}
.tv-row[data-rank="2"]::before{animation-delay:-2.6s}
.tv-row[data-rank="3"]::before{animation-delay:-5.2s}
@keyframes tv-medal-shine{
 0%{transform:translateX(-120%)}
 32%,100%{transform:translateX(120%)}
}
.motion-paused .tv-row::before{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.tv-row::before{animation:none!important;content:none!important}}

/* Scoring-system identity is separate from the shared gold/silver/bronze ranks. */
.tv-board[data-ruleset="hk_classic"]{--rule-accent:#a6dfad;--rule-soft:#8bd39b16;--rule-surface:#0c382a;--tv-muted:#bfd4c4;background:radial-gradient(ellipse at 8% 20%,#216748,transparent 65%),#0b3025}
.tv-board[data-ruleset="hk_new18"]{--rule-accent:#8cddd7;--rule-soft:#78d5d51a;--rule-surface:#0c3337;--tv-muted:#bfd6d5;background:radial-gradient(ellipse at 8% 20%,#205b59,transparent 65%),#0b3034}
.tv-board[data-ruleset="mcr"]{--rule-accent:#b9c8ff;--rule-soft:#a9bcff18;--rule-surface:#1b2a46;--tv-muted:#c4cede;background:radial-gradient(ellipse at 8% 20%,#35466a,transparent 65%),#17253d}
.tv-rule-badge{display:inline-flex;gap:12px;align-items:center;color:var(--rule-accent);font-weight:600;line-height:1.2;white-space:nowrap}
.tv-rule-badge svg{width:26px;height:26px;fill:currentColor;flex-shrink:0}
.tv-context .tv-rule-badge{padding:9px 12px;border-radius:8px;background:var(--rule-soft)}
.tv-board[data-ruleset] .tv-eyebrow{color:var(--rule-accent)}
.tv-board[data-ruleset] .tv-row:not([data-rank="1"]):not([data-rank="2"]):not([data-rank="3"]){background:var(--rule-soft)}
.tv-multi{background:radial-gradient(ellipse at 40% 0%,#174a38,transparent 70%),#09281f;padding:20px 24px}
.tv-multi-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.tv-board-mount{min-width:0;min-height:0;display:flex}
.tv-board.tv-embedded{width:100%;height:100%;min-height:0;padding:14px;gap:12px;border-radius:12px;border-top:3px solid var(--rule-accent);overflow:hidden}
.tv-embedded>.tv-heading{min-height:30px;padding-bottom:10px;border-bottom:1px solid #ffffff1c}
.tv-embedded .tv-heading .tv-rule-badge{font-size:22px}
.tv-embedded .tv-stage{display:flex;min-height:0;flex:1}
.tv-embedded .tv-podium{display:none}
.tv-embedded .tv-standings{flex:1;min-width:0}
.tv-embedded .tv-list-heading{padding:0 0 6px}
.tv-embedded .tv-list-heading h2{font-size:16px;color:var(--tv-muted)}
.tv-embedded .tv-columns,.tv-embedded .tv-row{grid-template-columns:26px minmax(0,1fr) 76px 98px;gap:8px;padding-inline:10px}
.tv-embedded .tv-columns>span:nth-child(4),.tv-embedded .tv-wins{display:none}
.tv-embedded .tv-columns{font-size:16px;padding-bottom:6px}
.tv-embedded .tv-rows{grid-auto-rows:minmax(38px,1fr);gap:4px;flex:1}
.tv-embedded .tv-row{padding-block:5px;min-height:38px}
.tv-embedded .tv-position{font-size:16px}
.tv-embedded .tv-player strong{font-size:17px}
.tv-embedded .tv-player>span{display:none}
.tv-embedded .tv-table{font-size:16px}
.tv-embedded .tv-points{padding-left:24px}
.tv-embedded .tv-points>strong{font-size:22px}
.tv-embedded .tv-bottom{flex-wrap:wrap;gap:6px;padding-top:6px;flex-shrink:0}
.tv-embedded .tv-bottom>.tv-pagination{margin:0;width:100%;gap:8px;order:-1}
.tv-embedded .tv-live{width:100%;display:flex;gap:8px;flex-wrap:nowrap;min-height:22px}
.tv-embedded .tv-live .connection{display:flex}
.tv-embedded .tv-live .connection>span{display:none}
.tv-embedded .tv-live [data-update]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;max-width:none}
.tv-embedded .tv-empty{padding:20px 8px;min-height:220px}
.tv-embedded .tv-empty h2{font-size:22px}
.tv-embedded .tv-empty p{font-size:16px}
.tv-multi-bottom{flex-shrink:0}
@media(min-width:1100px) and (min-height:700px){
 .tv-multi{height:100svh;min-height:700px}
}
@media(min-width:1100px) and (max-height:849px){
 .tv-multi{padding:14px 20px;gap:12px}
 .tv-embedded .tv-heading{padding-bottom:6px}
 .tv-board.tv-embedded{padding:10px;gap:8px}
 .tv-embedded .tv-list-heading{display:none}
 .tv-embedded .tv-live{display:none}
 .tv-embedded[data-load-state="error"] .tv-live{display:flex}
 .tv-embedded .tv-columns,.tv-embedded .tv-row{grid-template-columns:24px minmax(0,1fr) 76px 92px;gap:6px;padding-inline:8px}
}
@media(max-width:1099px){
 .tv-board.tv-multi{height:auto;min-height:100svh}
 .tv-multi-grid{grid-template-columns:1fr;flex:initial}
 .tv-board.tv-embedded{height:auto;min-height:0;padding:18px}
 .tv-embedded .tv-rows{grid-auto-rows:minmax(48px,auto);flex:initial}
 .tv-embedded .tv-stage{flex:initial}
 .tv-embedded .tv-bottom{align-items:center;flex-direction:row}
}
@media(max-width:699px){
 .tv-multi{padding:20px 12px}
 .tv-board.tv-embedded{padding:12px}
 .tv-embedded .tv-columns,.tv-embedded .tv-row{grid-template-columns:24px minmax(0,1fr) 92px;gap:8px;padding-inline:8px}
 .tv-embedded .tv-table-column{display:none}
 .tv-embedded .tv-player>span{display:block}
 .tv-embedded .tv-row{min-height:62px}
 .tv-embedded .tv-bottom .tv-pagination{align-self:stretch}
 .tv-embedded .tv-heading .tv-rule-badge{font-size:22px}
}

.tv-panel-error{font-size:16px;color:#ffcb9b;white-space:nowrap}
@media(min-width:1100px) and (max-height:849px){
 .tv-embedded .tv-rows{grid-auto-rows:minmax(35px,1fr)}
 .tv-embedded .tv-row{min-height:35px;padding-block:4px}
 .tv-embedded[data-load-state="error"] .tv-live{display:none}
}
