:root {
    --bg: #0d1116;
    --panel: rgba(20, 25, 31, .96);
    --panel-2: rgba(28, 34, 41, .98);
    --line: rgba(180, 196, 210, .15);
    --line-strong: rgba(180, 196, 210, .32);
    --text: #f4f7fb;
    --muted: #9aa8b8;
    --muted-2: #758394;
    --cyan: #31e6d0;
    --cyan-soft: rgba(49, 230, 208, .15);
    --blue: #338cff;
    --gold: #f6c85f;
    --danger: #ff4d67;
    --shadow: 0 18px 70px rgba(0,0,0,.42);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body.kiosk-body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 5%, rgba(51,146,255,.13), transparent 28vw),
        radial-gradient(circle at 88% 0%, rgba(49,230,208,.10), transparent 30vw),
        linear-gradient(180deg, #151a20 0%, #0e1318 70%, #070a0e 100%);
}
body.kiosk-body:before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.045) 0 1px, transparent 1.2px);
    background-size: 46px 46px;
    opacity: .35;
    pointer-events: none;
}
body.theme-azul { --cyan: #5bc7ff; --cyan-soft: rgba(91,199,255,.16); --blue: #3b82f6; }
body.theme-rojo { --cyan: #ffb86b; --cyan-soft: rgba(255,184,107,.18); --blue: #ef4444; }
body.theme-claro {
    --bg:#e9eef5; --panel:rgba(255,255,255,.98); --panel-2:rgba(245,248,252,.98);
    --line:rgba(20,33,48,.13); --line-strong:rgba(20,33,48,.25); --text:#0b1220; --muted:#475569; --muted-2:#64748b;
    background: linear-gradient(180deg, #f8fafc, #dbe4ef);
}

/* MODO TV PROFESIONAL: el listado manda. Nada de cabeceras enormes que escondan resultados. */
#kiosk-app {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: 4.7vh 10.8vh 1fr 3.2vh;
    gap: .45vh;
    padding: .55vh .75vw .45vh;
    position: relative;
}
.kiosk-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1vw;
    min-height: 0;
    padding: .25vh .55vw;
    border: 1px solid var(--line);
    border-radius: .45vw;
    background: rgba(0,0,0,.18);
}
.event-block {
    min-width: 0;
    display: block;
    min-width: 0;
}
.event-block:before { display: none; }
.kicker {
    margin: 0;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: .13em;
    font-size: clamp(10px, .86vw, 18px);
    font-weight: 1000;
}
h1 { display: none; }
#event-subtitle { display: none; }
.live-panel {
    display: flex;
    align-items: center;
    gap: .45vw;
    padding: .25vh .55vw;
    border: 1px solid var(--line-strong);
    background: rgba(0,0,0,.22);
    border-radius: .52vw;
}
.live-dot {
    width: clamp(8px, .56vw, 13px);
    height: clamp(8px, .56vw, 13px);
    background: var(--danger);
    border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(255,77,103,.8);
    animation: pulse 1.35s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,77,103,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,103,0); } }
.live-panel strong { display: block; font-size: clamp(8px, .55vw, 12px); letter-spacing: .18em; color: var(--danger); }
.live-panel small { display: block; color: var(--text); font-weight: 1000; font-size: clamp(9px, .62vw, 13px); }

/* Se dejan en el HTML por compatibilidad, pero en esta version no ocupan pantalla. */
.kiosk-stats { display: none !important; }


.podium {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65vw;
    align-items: stretch;
    padding: 0 7.5vw;
}
.podium-empty {
    grid-column: 1 / -1;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px dashed rgba(49,230,208,.28);
    border-radius:.7vw;
    color:var(--muted);
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.08em;
    background:rgba(0,0,0,.14);
}
.podium-box {
    position: relative;
    overflow: hidden;
    display:grid;
    grid-template-columns: auto 1fr auto;
    align-items:center;
    gap:.7vw;
    padding:.68vh .82vw;
    border-radius:.72vw;
    border:1px solid rgba(49,230,208,.25);
    background:linear-gradient(135deg, rgba(255,255,255,.08), rgba(49,230,208,.08), rgba(0,0,0,.18));
    box-shadow:0 12px 32px rgba(0,0,0,.22);
}
.podium-box:before {
    content:"";
    position:absolute;
    inset:0 auto 0 0;
    width:.33vw;
    background:var(--cyan);
    opacity:.95;
}
.podium-1 { border-color:rgba(246,200,95,.60); background:linear-gradient(135deg, rgba(246,200,95,.20), rgba(49,230,208,.07), rgba(0,0,0,.18)); }
.podium-1:before { background:#f6c85f; }
.podium-2 { border-color:rgba(211,217,227,.42); }
.podium-3 { border-color:rgba(214,139,85,.42); }
.podium-place {
    min-width:5.1vw;
    color:var(--cyan);
    font-weight:1000;
    text-transform:uppercase;
    letter-spacing:.09em;
    font-size:clamp(9px,.62vw,14px);
    line-height:1;
    padding-left:.1vw;
}
.podium-1 .podium-place { color:#f6c85f; }
.podium-main { min-width:0; }
.podium-main strong {
    display:block;
    color:var(--text);
    text-transform:uppercase;
    letter-spacing:-.035em;
    font-size:clamp(15px,1.18vw,28px);
    line-height:.98;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.podium-main span {
    display:block;
    margin-top:.18vh;
    color:var(--cyan);
    font-size:clamp(20px,1.75vw,42px);
    font-weight:1000;
    line-height:.92;
    font-variant-numeric:tabular-nums;
}
.podium-1 .podium-main span { color:#f6c85f; }
.podium-detail {
    min-width:7.6vw;
    max-width:11vw;
    text-align:right;
    line-height:1.05;
}
.podium-detail b,
.podium-detail small,
.podium-detail em {
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.podium-detail b { color:var(--cyan); font-size:clamp(9px,.68vw,15px); font-style:normal; }
.podium-detail small { color:var(--text); opacity:.9; font-weight:950; font-size:clamp(8px,.55vw,12px); margin-top:.12vh; }
.podium-detail em { color:var(--muted); font-style:normal; font-weight:850; font-size:clamp(7px,.48vw,11px); margin-top:.12vh; }

.leaderboard-card {
    min-height: 0;
    display:grid;
    grid-template-rows:auto 1fr;
    border-radius: .78vw;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.leaderboard-title {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1vw;
    padding: .32vh .65vw .28vh;
    background: linear-gradient(90deg, rgba(0,0,0,.24), rgba(49,230,208,.08));
    border-bottom: 1px solid var(--line);
}
.leaderboard-title h2 {
    margin: .08vh 0 0;
    font-size: clamp(15px, 1.18vw, 26px);
    letter-spacing:-.04em;
    line-height:.95;
    text-transform: uppercase;
}
.page-indicator {
    padding:.22vh .55vw;
    border-radius:999px;
    background:var(--cyan-soft);
    border:1px solid rgba(49,230,208,.24);
    font-weight:1000;
    color:var(--cyan);
    font-size: clamp(9px, .62vw, 13px);
    white-space: nowrap;
}
.leaderboard-table-wrap { min-height: 0; overflow: hidden; }
.leaderboard-table { width:100%; height:auto; border-collapse: collapse; table-layout: fixed; }
.leaderboard-table th {
    background: rgba(255,255,255,.055);
    color:var(--muted);
    text-align:left;
    padding: .28vh .34vw;
    font-size: clamp(8px, .50vw, 11px);
    letter-spacing:.06em;
    text-transform:uppercase;
    border-bottom: 1px solid var(--line-strong);
    border-right: 1px solid rgba(255,255,255,.055);
    white-space: nowrap;
}
.leaderboard-table th.score-head { text-align:center; color:var(--text); }
.leaderboard-table th.total-head { text-align:right; color:var(--cyan); }
.leaderboard-table th.group-head { text-align:center; color:var(--cyan); background: rgba(49,230,208,.10); }
.leaderboard-table td {
    padding: .22vh .34vw;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid rgba(255,255,255,.04);
    font-weight:900;
    font-size: clamp(10px, .72vw, 17px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3.15vh;
}
.leaderboard-table tbody tr:nth-child(even) { background: rgba(255,255,255,.027); }
.leaderboard-table tbody tr:nth-child(1) { background: rgba(246,200,95,.12); }
.leaderboard-table tbody tr:nth-child(2) { background: rgba(211,217,227,.075); }
.leaderboard-table tbody tr:nth-child(3) { background: rgba(214,139,85,.075); }
.rank { color: var(--muted); font-weight: 1000; text-align:center; }
.bib { color: var(--cyan); font-weight: 1000; text-align:center; }
.athlete-cell strong { display:block; overflow:hidden; text-overflow:ellipsis; color: var(--cyan); text-transform: uppercase; letter-spacing: -.01em; }
.athlete-cell small { display:block; color: var(--text); font-size: .62em; font-weight: 850; overflow:hidden; text-overflow:ellipsis; opacity:.86; margin-top:.1vh; }
.cell-center { text-align:center; }
.series-score { text-align:center; font-variant-numeric: tabular-nums; color: var(--text); }
.tiebreak { text-align:center; color: var(--muted); font-variant-numeric: tabular-nums; }
.total-score { font-size: clamp(14px, 1.05vw, 24px) !important; letter-spacing:-.045em; color: var(--cyan); text-align:right; font-variant-numeric: tabular-nums; }
.status-dot { display:inline-block; width:.52em; height:.52em; border-radius:50%; background:var(--cyan); box-shadow:0 0 12px rgba(49,230,208,.50); margin-right:.32em; }
.search-hit { background: rgba(49,230,208,.18) !important; outline: 2px solid rgba(49,230,208,.45); }

.kiosk-search {
    position: fixed;
    top: 9vh;
    right: 1.2vw;
    z-index: 20;
    min-width: min(520px, 42vw);
    padding: 1.1vh 1vw;
    border-radius: .9vw;
    background: rgba(8, 13, 18, .94);
    border: 1px solid rgba(49,230,208,.45);
    box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 6px rgba(49,230,208,.08);
    display: none;
}
.kiosk-search.visible { display: block; }
.kiosk-search span { display:block; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: clamp(9px, .62vw, 13px); font-weight: 1000; }
.kiosk-search strong { display:block; color: var(--cyan); font-size: clamp(24px, 2.5vw, 52px); line-height:1; margin-top:.25vh; }
.kiosk-search small { display:block; color: var(--text); margin-top:.45vh; font-weight:900; }

.ticker {
    display:flex;
    align-items:center;
    min-height: 0;
    overflow:hidden;
    border-top: 1px solid rgba(49,230,208,.22);
    background: linear-gradient(90deg, rgba(49,230,208,.12), rgba(0,0,0,.10), rgba(51,146,255,.10));
    border-radius: .45vw;
}
#ticker-text {
    white-space: nowrap;
    font-weight: 1000;
    font-size: clamp(10px, .68vw, 15px);
    padding-left: 100%;
    animation: ticker 34s linear infinite;
    color:var(--text);
    letter-spacing:.02em;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.kiosk-error { width:min(760px, calc(100vw - 40px)); margin:18vh auto; padding:40px; border-radius:24px; background:var(--panel); border:1px solid var(--line); text-align:center; }
.kiosk-error h1 { font-size: clamp(38px, 6vw, 82px); }
@media (max-width: 1200px) {
    #kiosk-app { grid-template-rows: auto 1fr auto; }
}

/* v22 - Logo del club en pantalla kiosco */
.kiosk-header {
    grid-template-columns: auto 1fr auto;
}
.kiosk-logo-slot {
    width: clamp(42px, 4.4vw, 86px);
    height: clamp(32px, 3.4vw, 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .2vh .35vw;
    border: 1px solid rgba(49,230,208,.22);
    border-radius: .45vw;
    background: rgba(255,255,255,.06);
    overflow: hidden;
}
.kiosk-logo-slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.kiosk-header.no-logo {
    grid-template-columns: 1fr auto;
}
.kiosk-header.no-logo .kiosk-logo-slot {
    display: none !important;
}


/* v23 - Logo grande lateral: ocupa altura de titulo + Top 3 */
#kiosk-app.has-club-logo {
    position: relative;
}
#kiosk-app.has-club-logo .kiosk-header {
    margin-left: clamp(92px, 8.2vw, 170px);
    width: calc(100% - clamp(92px, 8.2vw, 170px));
    grid-template-columns: 1fr auto;
}
#kiosk-app.has-club-logo .kiosk-logo-slot {
    position: absolute;
    left: .75vw;
    top: .55vh;
    z-index: 12;
    width: clamp(78px, 7.1vw, 150px);
    height: calc(4.7vh + 10.8vh + .45vh);
    min-height: clamp(105px, 15.8vh, 180px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: .65vh .55vw;
    border: 1px solid rgba(49,230,208,.34);
    border-radius: .7vw;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(49,230,208,.08), rgba(0,0,0,.22));
    box-shadow: 0 14px 40px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.04);
    overflow: hidden;
}
#kiosk-app.has-club-logo .kiosk-logo-slot img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
#kiosk-app.has-club-logo .podium {
    padding-left: clamp(100px, 8.7vw, 180px);
    padding-right: 7.5vw;
}
#kiosk-app.has-club-logo .event-block {
    padding-left: 0;
}
#kiosk-app.has-club-logo .kicker#event-type,
#kiosk-app.has-club-logo #event-type {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kiosk-header.no-logo {
    margin-left: 0;
    width: auto;
}
@media (max-width: 1200px) {
    #kiosk-app.has-club-logo .kiosk-header {
        margin-left: clamp(82px, 9vw, 130px);
        width: calc(100% - clamp(82px, 9vw, 130px));
    }
    #kiosk-app.has-club-logo .podium {
        padding-left: clamp(90px, 9.5vw, 140px);
        padding-right: 1vw;
    }
}

/* v24 - Evita que el logo grande pise el bloque de CLASIFICACION en pantallas pequeñas */
#kiosk-app.has-club-logo .leaderboard-title {
    padding-left: clamp(100px, 8.7vw, 180px);
}

#kiosk-app.has-club-logo .kiosk-logo-slot {
    height: min(calc(4.7vh + 10.8vh + .15vh), clamp(96px, 15.0vh, 168px));
    min-height: 0;
    max-height: calc(4.7vh + 10.8vh + .15vh);
}

@media (max-width: 1200px), (max-height: 820px) {
    #kiosk-app.has-club-logo .leaderboard-title {
        padding-left: clamp(92px, 9.5vw, 145px);
    }
    #kiosk-app.has-club-logo .kiosk-logo-slot {
        width: clamp(78px, 8.8vw, 132px);
        height: min(calc(4.7vh + 10.8vh - .15vh), clamp(88px, 14.2vh, 132px));
        max-height: calc(4.7vh + 10.8vh - .15vh);
        padding: .45vh .42vw;
    }
}

@media (max-height: 720px) {
    #kiosk-app.has-club-logo .kiosk-logo-slot {
        height: min(calc(4.7vh + 10.8vh - .55vh), clamp(76px, 13.8vh, 112px));
        max-height: calc(4.7vh + 10.8vh - .55vh);
    }
    #kiosk-app.has-club-logo .leaderboard-title {
        padding-left: clamp(86px, 9vw, 125px);
    }
}

/* v28 - Clasificacion mas legible: columnas compactas, nombre/total grandes, Top 3 fijo y scroll suave del resto */
#kiosk-app {
    grid-template-rows: 4.7vh 10.8vh 1fr 3.2vh;
}
.leaderboard-table-wrap {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden !important;
    min-height: 0;
}
.leaderboard-fixed {
    flex: 0 0 auto;
    overflow: hidden;
    border-bottom: 1px solid rgba(49,230,208,.22);
}
.leaderboard-scroll {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}
.leaderboard-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}
.leaderboard-table {
    table-layout: fixed;
    width: 100%;
}
.leaderboard-table .col-pos { width: 4.2%; }
.leaderboard-table .col-bib { width: 5.3%; }
.leaderboard-table .col-athlete { width: 37.5%; }
.leaderboard-table .col-cat { width: 6.8%; }
.leaderboard-table .col-x { width: 4.9%; }
.leaderboard-table .col-ten { width: 5.1%; }
.leaderboard-table .col-total { width: 6.9%; }
.leaderboard-table th {
    padding: .30vh .36vw;
    font-size: clamp(8px, .50vw, 11px);
}
.leaderboard-table td {
    height: 3.25vh;
    padding: .22vh .34vw;
    font-size: clamp(10px, .72vw, 16px);
}
.leaderboard-table-fixed td {
    height: 3.55vh;
}
.leaderboard-table-scroll td {
    height: 3.25vh;
}
.rank,
.bib,
.category-cell,
.tiebreak,
.series-score {
    text-align: center;
}
.rank {
    font-size: clamp(11px, .82vw, 18px) !important;
}
.bib {
    font-size: clamp(11px, .90vw, 20px) !important;
}
.athlete-cell strong {
    font-size: clamp(14px, 1.05vw, 25px);
    line-height: 1.02;
    letter-spacing: -.025em;
}
.athlete-cell small {
    font-size: clamp(7px, .52vw, 12px);
    line-height: 1.05;
}
.total-score {
    font-size: clamp(18px, 1.45vw, 34px) !important;
    font-weight: 1000 !important;
    text-align: right;
}
.leaderboard-table-fixed .total-score {
    font-size: clamp(20px, 1.62vw, 38px) !important;
}
.leaderboard-table-fixed .athlete-cell strong {
    font-size: clamp(15px, 1.12vw, 27px);
}
.leaderboard-table tbody tr.top-rank-1 {
    background: rgba(246,200,95,.14) !important;
}
.leaderboard-table tbody tr.top-rank-2 {
    background: rgba(211,217,227,.082) !important;
}
.leaderboard-table tbody tr.top-rank-3 {
    background: rgba(214,139,85,.082) !important;
}
.leaderboard-table-scroll tbody tr:nth-child(even) {
    background: rgba(255,255,255,.026);
}
.empty-rest {
    text-align: center;
    color: var(--muted);
    height: 10vh !important;
    font-weight: 1000;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.page-indicator {
    min-width: unset;
}

@media (max-height: 780px) {
    .leaderboard-table td { height: 2.92vh; }
    .leaderboard-table-fixed td { height: 3.1vh; }
    .athlete-cell strong { font-size: clamp(13px, .98vw, 22px); }
    .total-score { font-size: clamp(17px, 1.28vw, 30px) !important; }
}


/* v29 - Ajuste scroll real en kiosco: evita que el ticker tape la última fila y hace el scroll visible */
#kiosk-app {
    grid-template-rows: 4.5vh 10.2vh minmax(0, 1fr) 3.1vh;
    gap: .38vh;
}
#kiosk-app.has-club-logo .leaderboard-card {
    margin-left: 0;
}
.leaderboard-card {
    min-height: 0 !important;
    height: 100% !important;
}
.leaderboard-table-wrap {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
}
.leaderboard-fixed {
    min-height: 0;
    overflow: hidden !important;
}
.leaderboard-scroll {
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 1.1vh;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.leaderboard-table .col-pos { width: 3.2%; }
.leaderboard-table .col-bib { width: 5.0%; }
.leaderboard-table .col-athlete { width: 40.2%; }
.leaderboard-table .col-cat { width: 5.9%; }
.leaderboard-table .col-x { width: 4.2%; }
.leaderboard-table .col-ten { width: 4.6%; }
.leaderboard-table .col-total { width: 5.7%; }
.leaderboard-table th {
    padding: .22vh .28vw !important;
    font-size: clamp(7px, .46vw, 10px) !important;
}
.leaderboard-table td {
    height: 2.82vh !important;
    padding: .13vh .28vw !important;
    font-size: clamp(9px, .66vw, 15px) !important;
}
.leaderboard-table-fixed td {
    height: 3.05vh !important;
}
.athlete-cell strong {
    font-size: clamp(15px, 1.15vw, 28px) !important;
    line-height: .98 !important;
}
.athlete-cell small {
    font-size: clamp(7px, .50vw, 11px) !important;
    line-height: .95 !important;
}
.total-score {
    font-size: clamp(18px, 1.55vw, 36px) !important;
    line-height: .95 !important;
}
.leaderboard-table-scroll .total-score {
    font-size: clamp(17px, 1.36vw, 32px) !important;
}
.leaderboard-title {
    padding-top: .22vh !important;
    padding-bottom: .18vh !important;
}
.leaderboard-title h2 {
    font-size: clamp(14px, 1.03vw, 23px) !important;
}
.kicker {
    font-size: clamp(9px, .78vw, 16px) !important;
}
.page-indicator {
    font-size: clamp(8px, .54vw, 12px) !important;
    padding: .16vh .45vw !important;
}

@media (max-height: 760px) {
    #kiosk-app {
        grid-template-rows: 4.2vh 9.6vh minmax(0, 1fr) 3vh;
        gap: .32vh;
    }
    .podium-box { padding-top: .48vh; padding-bottom: .48vh; }
    .podium-main strong { font-size: clamp(13px, 1.02vw, 22px); }
    .podium-main span { font-size: clamp(18px, 1.48vw, 34px); }
    .leaderboard-table td { height: 2.55vh !important; }
    .leaderboard-table-fixed td { height: 2.75vh !important; }
    .athlete-cell strong { font-size: clamp(13px, 1.02vw, 23px) !important; }
    .total-score { font-size: clamp(16px, 1.32vw, 30px) !important; }
}

/* v31 - Scroll automatico real para TV: el cuerpo no puede quedar debajo del ticker */
.leaderboard-card {
    overflow: hidden !important;
}
.leaderboard-table-wrap {
    overflow: hidden !important;
}
.leaderboard-scroll {
    display: block !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    padding-bottom: 2.2vh !important;
    will-change: scroll-position;
}
.leaderboard-scroll.is-auto-scrolling {
    mask-image: linear-gradient(to bottom, transparent 0, #000 1.0vh, #000 calc(100% - 1.8vh), transparent 100%);
}
.leaderboard-table-scroll {
    margin-bottom: 2.4vh;
}
@media (max-height: 780px) {
    .leaderboard-scroll { padding-bottom: 2.8vh !important; }
    .leaderboard-table td { height: 2.65vh !important; }
    .leaderboard-table-fixed td { height: 2.86vh !important; }
}

/* v32 - Kiosco TV: scroll automatico por transform, mas legible y menos pesado */
.leaderboard-scroll {
    position: relative !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}
.leaderboard-scroll.is-auto-scrolling {
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 1.2vh), transparent 100%);
}
.leaderboard-table-scroll {
    margin-bottom: 0 !important;
    transform: translate3d(0,0,0);
}
.leaderboard-table-scroll.kiosk-auto-scroll-table {
    animation: kioskVerticalReadScroll var(--kiosk-scroll-duration, 32s) ease-in-out infinite;
    will-change: transform;
}
.leaderboard-table-scroll.kiosk-auto-scroll-table.kiosk-auto-scroll-paused {
    animation-play-state: paused;
}
@keyframes kioskVerticalReadScroll {
    0%, 13% { transform: translate3d(0, 0, 0); }
    64%, 76% { transform: translate3d(0, calc(-1 * var(--kiosk-scroll-distance, 0px)), 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Anchos: mas espacio real para nombres, menos para columnas auxiliares */
.leaderboard-table .col-pos { width: 2.8% !important; }
.leaderboard-table .col-bib { width: 4.3% !important; }
.leaderboard-table .col-athlete { width: 43.2% !important; }
.leaderboard-table .col-cat { width: 5.4% !important; }
.leaderboard-table .col-x { width: 3.7% !important; }
.leaderboard-table .col-ten { width: 4.0% !important; }
.leaderboard-table .col-total { width: 5.5% !important; }

/* Menos bold tipo plantilla y mas lectura de marcador profesional */
.leaderboard-table th {
    font-weight: 800 !important;
    letter-spacing: .045em !important;
    font-size: clamp(7px, .44vw, 10px) !important;
}
.leaderboard-table td {
    height: 3.12vh !important;
    padding: .18vh .34vw !important;
    font-weight: 700 !important;
    font-size: clamp(10px, .70vw, 15px) !important;
    line-height: 1.05 !important;
}
.leaderboard-table-fixed td {
    height: 3.28vh !important;
}
.athlete-cell strong {
    font-size: clamp(17px, 1.26vw, 30px) !important;
    line-height: 1.05 !important;
    font-weight: 850 !important;
    letter-spacing: -.035em !important;
}
.athlete-cell small {
    font-size: clamp(7px, .49vw, 11px) !important;
    line-height: 1.03 !important;
    font-weight: 650 !important;
    opacity: .92;
}
.series-score {
    font-size: clamp(12px, .84vw, 19px) !important;
    font-weight: 850 !important;
}
.tiebreak {
    font-size: clamp(11px, .78vw, 17px) !important;
    font-weight: 800 !important;
}
.total-score {
    font-size: clamp(22px, 1.72vw, 40px) !important;
    font-weight: 900 !important;
    line-height: .96 !important;
}
.leaderboard-table-scroll .total-score {
    font-size: clamp(20px, 1.55vw, 36px) !important;
}
.rank,
.bib,
.category-cell {
    font-weight: 800 !important;
}
.category-cell {
    font-size: clamp(10px, .70vw, 15px) !important;
}

/* Mas aire: que no parezca una tabla aplastada */
.leaderboard-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.leaderboard-table td.athlete-cell {
    padding-left: .58vw !important;
}

@media (max-height: 780px) {
    .leaderboard-table td { height: 2.92vh !important; }
    .leaderboard-table-fixed td { height: 3.08vh !important; }
    .athlete-cell strong { font-size: clamp(15px, 1.15vw, 27px) !important; }
    .series-score { font-size: clamp(11px, .78vw, 18px) !important; }
    .total-score { font-size: clamp(20px, 1.55vw, 36px) !important; }
}

/* v33 - Correccion definitiva de scroll TV + tipografia menos pesada */
.leaderboard-table th {
    font-weight: 700 !important;
    letter-spacing: .035em !important;
}
.leaderboard-table td {
    height: 3.36vh !important;
    padding-top: .24vh !important;
    padding-bottom: .24vh !important;
    font-weight: 620 !important;
}
.leaderboard-table-fixed td {
    height: 3.48vh !important;
}
.athlete-cell strong {
    font-weight: 780 !important;
    letter-spacing: -.030em !important;
    font-size: clamp(17px, 1.22vw, 29px) !important;
}
.athlete-cell small {
    font-weight: 560 !important;
    opacity: .88 !important;
}
.series-score {
    font-size: clamp(13px, .90vw, 21px) !important;
    font-weight: 760 !important;
}
.tiebreak {
    font-weight: 680 !important;
}
.category-cell {
    font-weight: 720 !important;
}
.rank,
.bib {
    font-weight: 720 !important;
}
.total-score {
    font-weight: 820 !important;
    font-size: clamp(23px, 1.78vw, 42px) !important;
}
.leaderboard-table-scroll .total-score {
    font-size: clamp(21px, 1.58vw, 38px) !important;
}

/* El cuerpo desplazable queda recortado; el movimiento lo hace la tabla interna por transform. */
.leaderboard-scroll {
    overflow: hidden !important;
    position: relative !important;
}
.leaderboard-table-scroll.kiosk-auto-scroll-table {
    animation-name: kioskVerticalReadScrollV33 !important;
    animation-duration: var(--kiosk-scroll-duration, 42s) !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    will-change: transform;
}
@keyframes kioskVerticalReadScrollV33 {
    0%, 8% { transform: translate3d(0, 0, 0); }
    66%, 78% { transform: translate3d(0, calc(-1 * var(--kiosk-scroll-distance, 0px)), 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@media (max-height: 780px) {
    .leaderboard-table td { height: 3.12vh !important; }
    .leaderboard-table-fixed td { height: 3.28vh !important; }
    .athlete-cell strong { font-size: clamp(16px, 1.15vw, 27px) !important; }
    .series-score { font-size: clamp(12px, .84vw, 20px) !important; }
}

/* Pantalla de espera del club cuando no hay tirada en vivo */
.club-idle-body {
    overflow: hidden;
    background: #030816;
}

.club-idle-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 25% 20%, rgba(54, 128, 255, .35), transparent 36%), #030816;
}

.club-idle-slides,
.club-idle-slide,
.club-idle-overlay {
    position: absolute;
    inset: 0;
}

.club-idle-slide {
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: opacity 900ms ease, transform 6500ms ease;
}

.club-idle-slide.active {
    opacity: 1;
    transform: scale(1);
}

.club-idle-empty .club-idle-slide {
    background: radial-gradient(circle at 20% 15%, rgba(38, 198, 255, .33), transparent 34%),
        linear-gradient(135deg, #08182f 0%, #07101f 52%, #101827 100%);
}

.club-idle-overlay {
    background: linear-gradient(90deg, rgba(2, 8, 22, .92) 0%, rgba(2, 8, 22, .62) 42%, rgba(2, 8, 22, .22) 100%),
        linear-gradient(0deg, rgba(2, 8, 22, .74) 0%, rgba(2, 8, 22, .1) 55%);
    z-index: 2;
}

.club-idle-header {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 6vh 6vw 0;
}

.club-idle-logo {
    width: min(170px, 14vw);
    height: min(170px, 14vw);
    border-radius: 30px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .45);
}

.club-idle-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.club-idle-header h1 {
    font-size: clamp(46px, 6vw, 108px);
    line-height: .95;
    margin: 8px 0 12px;
    letter-spacing: -0.06em;
    color: #ffffff;
}

.club-idle-header p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(18px, 1.6vw, 30px);
}

.club-idle-content {
    position: absolute;
    z-index: 3;
    left: 6vw;
    bottom: 15vh;
    max-width: 960px;
}

.club-idle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(48, 213, 255, .16);
    border: 1px solid rgba(96, 222, 255, .36);
    color: #7ee7ff;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 900;
    font-size: clamp(13px, .95vw, 18px);
}

.club-idle-content h2 {
    font-size: clamp(34px, 4vw, 76px);
    line-height: 1;
    margin: 24px 0 18px;
    max-width: 980px;
    color: #ffffff;
}

.club-idle-content p:not(.club-idle-label) {
    font-size: clamp(19px, 1.7vw, 34px);
    line-height: 1.35;
    color: rgba(255, 255, 255, .82);
    max-width: 850px;
}

.club-idle-footer {
    position: absolute;
    z-index: 3;
    left: 6vw;
    right: 6vw;
    bottom: 5vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 900;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(17px, 1.2vw, 24px);
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding-top: 24px;
}

@media (max-width: 900px) {
    .club-idle-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .club-idle-content {
        right: 6vw;
    }
}
