/* ShootScoring stage TV: readable from across the bay. Sizes scale with the screen. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05070c; color: #f8fafc; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
#tv { height: 100vh; display: flex; flex-direction: column; }
.tv-loading { flex: 1; display: grid; place-items: center; font-size: 3vw; color: #94a3b8; }
.tv-head { display: flex; align-items: center; gap: 2vw; padding: 1.4vh 2.2vw; background: #0b1220; border-bottom: .4vh solid #dc2626; }
.tv-logo { height: 4.2vh; }
.tv-title { flex: 1; min-width: 0; }
.tv-title h1 { margin: 0; font-size: 4.2vh; font-weight: 900; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-title p { margin: .3vh 0 0; font-size: 2.2vh; color: #94a3b8; }
.tv-clock { text-align: right; display: grid; }
.tv-clock b { font-size: 4vh; font-variant-numeric: tabular-nums; }
.tv-conn { font-size: 1.8vh; }
.tv-conn.on { color: #22c55e; } .tv-conn.off { color: #f59e0b; }

/* One stage */
.tv-stage { flex: 1; display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.6vw; padding: 2vh 2vw; min-height: 0; }
.tv-col { display: grid; grid-template-rows: 1.35fr 1fr .8fr; gap: 1.6vh; min-height: 0; }
.tv-panel { background: #0f172a; border: .25vh solid #1e293b; border-radius: 2vh; padding: 2.2vh 2vw; display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow: hidden; }
.tv-panel.empty { opacity: .45; }
.tv-label { font-size: 2.2vh; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: #94a3b8; margin-bottom: .8vh; }
.tv-name { font-size: 6.4vh; font-weight: 900; line-height: 1.05; }
.tv-meta { font-size: 2.8vh; color: #cbd5e1; margin-top: .8vh; }
.tv-now { background: linear-gradient(160deg, #450a0a, #0f172a 70%); border-color: #dc2626; }
.tv-now .tv-name { font-size: 8vh; }
.tv-now .tv-label { color: #fca5a5; }
.tv-next .tv-label { color: #fcd34d; }
.tv-after .tv-name { font-size: 4.6vh; }
.tv-prev { justify-content: flex-start; }
.tv-prev .tv-name { font-size: 6vh; }
.tv-score { display: flex; align-items: baseline; gap: 1.2vw; margin: 2.5vh 0 1.5vh; }
.tv-hf { font-size: 16vh; font-weight: 900; line-height: .9; color: #fde047; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tv-unit { font-size: 3vh; color: #94a3b8; }
.tv-status { font-size: 12vh; font-weight: 900; color: #f87171; }
.tv-hits { display: flex; flex-wrap: wrap; gap: 1vw; }
.tv-hit { min-width: 7vw; padding: 1.2vh 1vw; border-radius: 1.4vh; background: #1e293b; text-align: center; }
.tv-hit b { display: block; font-size: 5.4vh; font-variant-numeric: tabular-nums; }
.tv-hit span { font-size: 2vh; color: #94a3b8; font-weight: 700; }
.tv-hit.zero { opacity: .45; }
.tv-hit-A b { color: #86efac; } .tv-hit-B b { color: #bef264; } .tv-hit-C b { color: #fde68a; } .tv-hit-D b { color: #fdba74; }
.tv-hit-M b, .tv-hit-NS b, .tv-hit-P b { color: #fca5a5; }
.tv-rank { margin-top: auto; padding-top: 2vh; font-size: 3vh; color: #e2e8f0; }
.tv-prev.flash { animation: flash 1.6s ease-out 1; }
@keyframes flash { 0% { box-shadow: 0 0 0 1vh rgba(250, 204, 21, .8); } 100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); } }

/* All stages: one column per stage, up to 6 across. */
.tv-pagebar { height: .5vh; background: #111827; }
.tv-pagebar span { display: block; height: 100%; background: #dc2626; transition: width 1s linear; }
.tv-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: .9vw; padding: 1.4vh 1vw; }
.tv-c { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 1vh; background: #0b1220; border: .2vh solid #1e293b; border-radius: 1.6vh; padding: 1.2vh .8vw; overflow: hidden; }
.tv-c-head { margin: 0; display: grid; gap: .2vh; padding-bottom: .8vh; border-bottom: .3vh solid #dc2626; }
.tv-c-head b { font-size: min(4.4vh, 2.6vw); font-weight: 900; line-height: 1; }
.tv-c-head span { font-size: min(2.2vh, 1.3vw); color: #94a3b8; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-c-slot { background: #0f172a; border: .2vh solid #1e293b; border-radius: 1.2vh; padding: 1vh .7vw; min-width: 0; }
.tv-c-slot.empty { opacity: .45; }
.tv-c-label { font-size: min(1.7vh, 1vw); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; margin-bottom: .4vh; }
.tv-c-name { font-size: min(3.2vh, 1.9vw); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.tv-c-meta { font-size: min(1.8vh, 1.05vw); color: #cbd5e1; margin-top: .3vh; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-c-prev { flex: 1.5; display: flex; flex-direction: column; }
.tv-c-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3vw; margin-top: auto; padding-top: .6vh; }
.tv-c-hf { font-size: min(6.4vh, 2.5vw); font-weight: 900; color: #fde047; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-c-unit { font-size: min(1.8vh, 1vw); color: #94a3b8; font-weight: 700; }
.tv-c-status { font-size: min(6vh, 3vw); font-weight: 900; color: #f87171; }
.tv-c-hits { display: flex; flex-wrap: wrap; gap: .3vw; margin-top: .6vh; font-size: min(1.8vh, 1vw); color: #94a3b8; font-weight: 700; }
.tv-c-hits span { background: #1e293b; border-radius: .8vh; padding: .2vh .4vw; }
.tv-c-hits b { margin-right: .2vw; color: #f8fafc; }
.tv-c-hits .tv-hit-A b { color: #86efac; } .tv-c-hits .tv-hit-C b { color: #fde68a; } .tv-c-hits .tv-hit-D b { color: #fdba74; }
.tv-c-hits .tv-hit-M b, .tv-c-hits .tv-hit-NS b, .tv-c-hits .tv-hit-P b { color: #fca5a5; }
.tv-c-now { flex: 1.2; background: linear-gradient(160deg, #450a0a, #0f172a 75%); border-color: #dc2626; }
.tv-c-now .tv-c-label { color: #fca5a5; }
.tv-c-now .tv-c-name { font-size: min(4vh, 2.3vw); }
.tv-c-next { flex: 1; } .tv-c-next .tv-c-label { color: #fcd34d; }
.tv-c-after { flex: .8; } .tv-c-after .tv-c-name { font-size: min(2.6vh, 1.5vw); color: #cbd5e1; }
.tv-c-foot { font-size: min(1.7vh, 1vw); color: #64748b; text-align: center; }
.tv-c-prev.flash { animation: flash 1.6s ease-out 1; }

/* All stages: top 3 per division on the left. */
.tv-allwrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 18vw minmax(0, 1fr); }
.tv-allwrap .tv-cols { padding-left: .6vw; }
.tv-top { min-height: 0; overflow: hidden; margin: 1.4vh 0 1.4vh 1vw; padding: 1.2vh .8vw; background: #0b1220; border: .2vh solid #1e293b; border-radius: 1.6vh; display: flex; flex-direction: column; gap: 1.2vh; }
.tv-top h2 { margin: 0; padding-bottom: .8vh; border-bottom: .3vh solid #fde047; font-size: min(4vh, 2.2vw); font-weight: 900; display: flex; justify-content: space-between; align-items: baseline; }
.tv-top h2 span { font-size: min(1.8vh, 1vw); color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.tv-top-div h3 { margin: 0 0 .5vh; font-size: min(2vh, 1.1vw); color: #fcd34d; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-top-row { display: grid; grid-template-columns: 2.4vh minmax(0, 1fr) auto; gap: .5vw; align-items: baseline; padding: .45vh 0; border-top: .15vh solid #1e293b; font-size: min(2.3vh, 1.2vw); }
.tv-top-row b { font-weight: 900; color: #94a3b8; }
.tv-top-row.p1 b { color: #fde047; } .tv-top-row.p2 b { color: #e2e8f0; } .tv-top-row.p3 b { color: #fdba74; }
.tv-top-row span { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-top-row em { font-style: normal; color: #cbd5e1; font-variant-numeric: tabular-nums; font-size: .9em; }
.tv-top-empty { color: #64748b; font-size: 2vh; margin: 0; }

/* Leaderboard */
.tv-board { flex: 1; padding: 2vh 2vw; overflow: hidden; }
.tv-board table { width: 100%; border-collapse: collapse; font-size: 3.2vh; }
.tv-board th { text-align: left; color: #94a3b8; font-size: 2vh; text-transform: uppercase; letter-spacing: .1em; padding: 1vh; border-bottom: .3vh solid #1e293b; }
.tv-board td { padding: 1vh; border-bottom: .15vh solid #1e293b; font-variant-numeric: tabular-nums; }
.tv-board tr:first-child td { color: #fde047; }
.tv-board .r { text-align: right; } .tv-board .m { color: #94a3b8; font-size: 2.4vh; }

/* Combined TV: one tab per match, the one on screen is lit with a timer bar. */
.tv-combo { display: flex; gap: .6vw; padding: .8vh 1vw 0; background: #070b14; }
.tv-combo span { position: relative; overflow: hidden; flex: 1; min-width: 0; padding: .8vh 1vw 1vh; border-radius: .8vh .8vh 0 0; background: #111827; color: #6b7280; font-size: min(2vh, 1.1vw); white-space: nowrap; text-overflow: ellipsis; }
.tv-combo span b { display: block; font-size: min(1.5vh, .85vw); letter-spacing: .12em; text-transform: uppercase; color: #4b5563; }
.tv-combo span.on { background: #1f2937; color: #fff; }
.tv-combo span.on b { color: #fbbf24; }
.tv-combo span i { position: absolute; left: 0; bottom: 0; height: .5vh; background: #dc2626; transition: width 1s linear; }
