/* === #2 Final Standings (Klasyfikacja koncowa TV) === */
.tv-fs-wrapper {
            width: 100%; height: 100%; padding: calc(15px + 25px * var(--tv-row-scale, 1)) 40px; box-sizing: border-box; display: flex; flex-direction: column; color: #fff; font-family: 'Chakra Petch', sans-serif;
        }
        .tv-fs-header { text-align: center; margin-bottom: calc(15px + 25px * var(--tv-row-scale, 1)); }
        .tv-fs-title { font-size: calc(2.4rem + 1.1rem * var(--tv-row-scale, 1)); font-weight: 800; color: #06b6d4; text-transform: uppercase; letter-spacing: 4px; margin: 0 0 8px 0; text-shadow: 0 0 20px rgba(6, 182, 212, 0.4); }
        .tv-fs-subtitle { font-size: calc(1.5rem + 0.7rem * var(--tv-row-scale, 1)); color: #f8fafc; text-transform: uppercase; font-weight: 700; letter-spacing: 2px; margin: 0; }
        
        .tv-fs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: calc(16px + 24px * var(--tv-row-scale, 1)) 50px; width: 100%; flex: 1; align-content: start; justify-content: center; }
        .tv-fs-group { display: flex; flex-direction: column; gap: calc(4px + 4px * var(--tv-row-scale, 1)); }
        .tv-fs-group-title { font-size: calc(1.6rem + 0.6rem * var(--tv-row-scale, 1)); font-weight: 800; text-transform: uppercase; border-bottom: 2px solid rgba(255,255,255,0.1); padding-bottom: calc(4px + 6px * var(--tv-row-scale, 1)); margin-bottom: calc(6px + 9px * var(--tv-row-scale, 1)); letter-spacing: 1px; }
        
        .tv-fs-row { display: flex; align-items: center; font-size: calc(1.15rem + 0.35rem * var(--tv-row-scale, 1)); font-weight: 600; font-family: 'Inter', sans-serif; letter-spacing: 0.5px; background: rgba(255,255,255,0.03); padding: calc(2px + 4px * var(--tv-row-scale, 1)) 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); }
        .tv-fs-pos { width: 45px; text-align: right; margin-right: 15px; color: #cbd5e1; font-weight: 800; }
        .tv-fs-logo { width: calc(24px + 11px * var(--tv-row-scale, 1)); height: calc(24px + 11px * var(--tv-row-scale, 1)); object-fit: contain; margin-right: 15px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
        .tv-fs-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f8fafc; text-transform: uppercase; }
        .tv-fs-medal { font-size: calc(1.2rem + 0.4rem * var(--tv-row-scale, 1)); margin-left: 10px; filter: drop-shadow(0 0 10px rgba(255,215,0,0.5)); }

/* === #3 Glowne style TV Mode (statyczne) === */
/* 🔥 RIVALLY FIX: ODKRYCIE NATYWNYCH KARNYCH W TV MODE 🔥 */
            .tv-overlay .sp-event-list td.data-result span.penalty-info,
            .tv-overlay .sp-event-list td.data-results span.penalty-info,
            .tv-overlay .sp-event-list td.data-time span.penalty-info {
                display: block !important;
                font-size: 0.35em !important;
                color: #fbbf24 !important;
                font-weight: 900 !important;
                margin-top: 5px !important;
                letter-spacing: 2px !important;
                text-transform: uppercase !important;
                text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
                line-height: 1 !important;
                white-space: nowrap !important;
            }
			
            /* --- RESET & BASE --- */
            html, body { margin: 0; padding: 0; overflow: hidden; height: 100%; color: #fff; font-family: 'Inter', sans-serif; }
            #wpadminbar { display: none !important; }
            html { margin-top: 0 !important; }
            
            /* 🔥 UKRYWANIE WSZYSTKICH NAGŁÓWKÓW WEWNĘTRZNYCH SPORTSPRESS 🔥 */
            .sp-table-caption, .sp-league-table caption, .sp-event-list caption, .sp-player-list caption { display: none !important; }
            h3, h4, h5 { margin-top: 0; }

           /* --- LAYOUT FIX DLA TV (RESPONSYWNY OD HD READY 720p PO 4K 2160p) --- */
.tv-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    
    /* 🔥 FIX: Tło bazowe to Twój kolor, a na to narzucamy uniwersalny, neutralny gradient "studyjny" (jasny środek, ciemne rogi) 🔥 */
    background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
    
    display: flex; 
    flex-direction: column;
    z-index: 2147483647; 
    padding-bottom: 0 !important; 
    box-sizing: border-box;
}
			
			/* ========================================= */
/* TARCZA ANTY-TV: UKRYWANIE DOCKA CASTOWANIA*/
/* ========================================= */
/* Na sztywno ukrywamy dock na ekranach szerszych niz 1024px (czyli PC i Telewizory) */
@media (min-width: 1025px) {
    #riv-cast-dock { 
        display: none !important; 
    }
}

/* --- FIX NAGŁÓWKA: BROADCAST GLASS DESIGN (SKALOWANY PROPORCJONALNIE DO EKRANU TV) --- */
.tv-header {
    height: clamp(50px, 6.8vh, 145px) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    justify-content: space-between !important; /* To rozpycha logo na lewo, a RIVALLY na prawo */
    align-items: center !important;
    padding: 0 clamp(24px, 2.5vw, 90px) !important; /* Oddech od bocznych krawędzi */
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.tv-brand-left {
    display: flex !important;
    align-items: center !important;
    gap: clamp(12px, 1.2vw, 40px) !important;
    min-width: 0 !important;
}

.tv-brand-right {
    display: flex !important;
    align-items: center !important;
    gap: clamp(14px, 1.4vw, 45px) !important;
    margin-left: auto !important; /* Dodatkowe upewnienie się, że jest po prawej */
    flex-shrink: 0 !important;
}
.tv-tour-logo {
    height: clamp(34px, 4.6vh, 100px) !important; /* Proporcjonalne logo turnieju od 720p do 4K */
    width: auto !important;
    object-fit: contain !important;
}
/* Nazwa turnieju z czcionką Chakra Petch */
.tv-title {
    font-family: 'Chakra Petch', sans-serif !important; 
    font-size: clamp(1.2rem, 2.5vh, 3.6rem) !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
			/* --- MAGIA KONTRASTÓW TV (SKANER PIKSELI) --- */
            
			
            .tv-rivally-logo { height: clamp(24px, 3.2vh, 70px) !important; width: auto; }
            .tv-rivally-text { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: clamp(0.85rem, 1.7vh, 2.4rem) !important; color: #fff; letter-spacing: 2px; }

            /* --- CONTENT FIX --- */
.tv-content { 
    flex: 1; 
    position: relative; 
    overflow: hidden; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: clamp(6px, 1vh, 20px); 
}
            
            /* --- FIX STOPKI: BROADCAST GLASS DESIGN (SKALOWANY PROPORCJONALNIE DO EKRANU TV) --- */
            .tv-footer {
                height: clamp(58px, 8.2vh, 175px) !important; 
                flex-shrink: 0 !important;
                display: flex !important;
                flex-direction: row !important; /* Układ poziomy */
                justify-content: center !important; 
                align-items: center !important; /* 🔥 TO CENTRUJE LOGA W PIONIE WZGLĘDEM SIEBIE */
                gap: clamp(24px, 2.8vw, 90px) !important; 
                padding: 0 clamp(24px, 2.5vw, 90px) !important;
                background: rgba(15, 23, 42, 0.35) !important;
                backdrop-filter: blur(10px) !important;
                border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
                overflow: hidden !important;
            }

            .tv-sponsor-label {
                font-size: clamp(0.85rem, 1.7vh, 2.4rem) !important;
                font-weight: 800 !important;
                margin: 0 !important; /* Usuwamy marginesy, które psują pion */
                white-space: nowrap !important;
            }

            .tv-sponsor-img {
                max-height: clamp(38px, 5.5vh, 120px) !important; /* 🔥 Proporcjonalna wysokość na 720p, 1080p i 4K */
                width: auto !important;
                object-fit: contain !important; /* Zachowuje proporcje */
            }

            

            /* --- SLIDES --- */
            .tv-slide { display: none; width: 100%; max-width: 96vw; flex-direction: column; align-items: center; justify-content: center; transform-origin: center center; }
            .tv-slide.active { display: flex; animation: fadeEffect 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
            @keyframes fadeEffect { from {opacity: 0; transform: scale(0.95) translateY(20px);} to {opacity: 1; transform: scale(1) translateY(0);} }

            /* --- TYTUŁY GŁÓWNE SLAJDÓW: SPORTOWY AKCENT BROADCAST (ELASTYCZNY W PIONIE) --- */
            .tv-scale-wrapper {
                --tv-row-scale: 1;
            }
            .tv-overlay .slide-title {
                text-align: center !important; 
                font-family: 'Chakra Petch', sans-serif !important; 
                margin-bottom: calc(8px + 12px * var(--tv-row-scale, 1)) !important; 
                font-size: calc(2.4rem + 1.2rem * var(--tv-row-scale, 1)) !important; 
                width: 100% !important; 
                text-transform: uppercase !important;
                font-weight: 800 !important;
                letter-spacing: 3px !important;
                position: relative !important;
            }
            .tv-overlay .slide-title::after {
                content: '' !important;
                display: block !important;
                width: 140px !important;
                height: 4px !important;
                background: linear-gradient(90deg, transparent, #3b82f6, transparent) !important;
                margin: calc(4px + 6px * var(--tv-row-scale, 1)) auto 0 auto !important;
                border-radius: 2px !important;
            }
           /* --- TABLES & LISTS --- */
            
            /* Tryb Towarzyski (TV) */
            .tv-friendly-list-mode { width: 100% !important; margin: 0 auto !important; }
            .tv-friendly-list-mode .data-rank { display: none !important; }
            .tv-friendly-list-mode th.data-name { text-align: center !important; }
            .tv-friendly-list-mode td.data-name { display: flex !important; justify-content: center !important; align-items: center !important; width: 100% !important; padding: calc(2px + 10px * var(--tv-row-scale, 1)) 10px !important; font-size: calc(1.4rem + 1.4rem * var(--tv-row-scale, 1)) !important; }

            /* 🔥 KARTY TV: NOWOCZESNY SHADOW & ZAOKRĄGLENIA 20px (SPÓJNE DLA TABEL, RANKINGÓW I KALENDARZY) 🔥 */
            .sp-table-wrapper, .sp-template-player-list, .sp-player-list, .calendar-col { 
                border-radius: 20px !important; 
                overflow: hidden !important; 
                width: 100% !important; 
                box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12) !important; 
                border: none !important;
                background: #ffffff !important;
            }
            table.sp-league-table, table.sp-player-list, .sp-player-list table, .sp-event-list table { width: 100% !important; border-collapse: collapse !important; background: #ffffff !important; }
            
            /* 🔥 NAGŁÓWKI TABEL I RANKINGÓW: SPORTOWY GRADIENT I ŚNIEŻNOBIAŁY TEKST (WYSOKA SPECYFICZNOŚĆ PRZECIWKO FUNCTIONS.PHP) 🔥 */
            table.sp-league-table thead th, 
            table.sp-league-table thead th a, 
            table.sp-league-table thead th:first-child, 
            table.sp-league-table thead th:last-child, 
            table.sp-league-table thead th.data-rank, 
            table.sp-league-table thead th.data-pts, 
            table.sp-league-table thead th.data-pkt, 
            table.sp-league-table thead th.data-points, 
            table.sp-player-list thead th, 
            table.sp-player-list thead th a,
            table.sp-player-list thead th:first-child,
            table.sp-player-list thead th:last-child,
            table.sp-player-list thead th.data-rank,
            table.sp-player-list thead th.data-number,
            table.sp-player-list thead th.data-name,
            .sp-player-list thead th, 
            .sp-player-list thead th a { 
                background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%) !important; 
                color: #ffffff !important; 
                padding: calc(6px + 6px * var(--tv-row-scale, 1)) 14px !important; 
                text-transform: uppercase !important; 
                font-family: 'Chakra Petch', sans-serif !important;
                font-size: calc(1.35rem + 0.45rem * var(--tv-row-scale, 1)) !important; 
                letter-spacing: 1.5px !important;
                border: none !important; 
                border-bottom: 3px solid rgba(255, 255, 255, 0.25) !important;
                white-space: nowrap !important; 
                text-decoration: none !important;
            }
            td { padding: calc(2px + 10px * var(--tv-row-scale, 1)) 14px !important; border-bottom: 1px solid #f1f5f9; font-size: calc(1.4rem + 0.8rem * var(--tv-row-scale, 1)) !important; text-align: center; color: #0f172a !important; font-weight: 600; }
            tr:nth-child(even) { background-color: #f8fafc; }
            
            /* Komórka pozycji w wierszach tabeli (szara), nagłówek thead th pozostaje w 100% biały */
            table.sp-league-table tbody td:first-child, 
            table.sp-league-table tbody td.data-rank { 
                width: 65px !important; 
                font-weight: 900; 
                color: #64748b !important; 
                font-size: calc(1.3rem + 0.9rem * var(--tv-row-scale, 1)) !important; 
            }
            table.sp-league-table thead th:first-child, 
            table.sp-league-table thead th.data-rank { 
                width: 65px !important; 
            }
            
            /* Nazwy druzyn i graczy w tabelach - PANCERNY GRID TV (ADAPTACYJNA WYSOKOŚĆ WIERSZY) */
            table.sp-league-table tbody td.data-name, .sp-player-list tbody td.data-name { 
                text-align: left !important; 
                display: grid !important; 
                grid-template-columns: calc(45px + 45px * var(--tv-row-scale, 1)) 1fr !important; /* Klatka na logo skalowana z wysokością wiersza */
                align-items: center !important; 
                gap: 20px !important; 
                font-weight: 900; 
                color: #1e293b !important; 
                font-size: calc(1.4rem + 1.4rem * var(--tv-row-scale, 1)) !important; 
            }

            table.sp-league-table tbody td.data-name a, 
            .sp-player-list tbody td.data-name a {
                display: contents !important; /* Tarcza: zapobiega psuciu grida przez linki */
            }
			
			/* 🔥 RIVALLY FIX: Wywalamy autorską ikonkę 'i' (H2H) przy remisach w trybie TV 🔥 */
.tv-overlay .riv-h2h-icon {
    display: none !important;
}
            
            /* ========================================= */
            /* GIGANTYCZNE HERBY (ADAPTACYJNA WYSOKOŚĆ)  */
            /* ========================================= */
            
            .tv-overlay table.sp-league-table img, 
            .tv-overlay .sp-event-list img, 
            .tv-overlay .sp-player-list img,
            .tv-overlay img.attachment-sportspress-fit-mini,
            .tv-overlay img.wp-post-image { 
                height: calc(24px + 51px * var(--tv-row-scale, 1)) !important; 
                width: auto !important; 
                max-width: calc(45px + 45px * var(--tv-row-scale, 1)) !important; 
                object-fit: contain !important; 
                flex-shrink: 0 !important; 
                display: block !important;
                margin: 0 auto !important; /* 🔥 TO CENTRUJE LOGO W KLATCE 🔥 */
            }

            /* Odblokowujemy linki, żeby trzymały się równiutko w rzędzie z tekstem */
            .tv-overlay .sp-event-list td.data-home a, 
            .tv-overlay .sp-event-list td.data-away a,
            .tv-overlay table.sp-league-table td.data-name a {
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                flex-shrink: 0 !important;
                text-decoration: none !important;
                background: transparent !important;
                padding: 0 !important;
                margin: 0 !important;
            } 
			
            /* ========================================= */
            /* CALENDARS FIX (FLEXBOX - IDEALNY SRODEK)  */
            /* ========================================= */
            .calendar-split { display: flex; gap: 24px; width: 95vw; align-items: flex-start; margin: 0 auto; }
            .calendar-col { 
                flex: 1; 
                background: #ffffff !important; 
                padding: 0; 
                display: flex; 
                flex-direction: column; 
                min-width: 0; 
                border-radius: 20px !important; 
                overflow: hidden !important; 
                box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12) !important; 
                border: none !important; 
            }
            .calendar-full { width: 100%; }

            .calendar-col h3 { 
                text-align: center; 
                color: #ffffff; 
                background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important; 
                text-transform: uppercase; 
                padding: 18px !important; 
                margin: 0; 
                font-family: 'Chakra Petch', sans-serif !important;
                font-size: 2.2rem !important; 
                letter-spacing: 2px; 
                border-bottom: 3px solid #3b82f6 !important;
            }

            .sp-event-list { margin: 0 !important; width: 100% !important; }
            .sp-event-list table { width: 100% !important; border-collapse: collapse; }
            
            /* Wywalamy naglowki tabeli terminarza - na TV sa zbedne i psuja flexboxa */
            .sp-event-list thead { display: none !important; }

            /* MAGIA FLEXBOXA DLA WIERSZY (ADAPTACYJNA WYSOKOŚĆ WIERSZA ZAMIAST ZWĘŻANIA KONTENERA) */
            .sp-event-list tbody tr { 
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                position: relative !important;
                /* 🔥 FIX: Elastyczny padding góra/dół z gwarantowanym miejscem (min 28px) na badge boiska na dole 🔥 */
                padding: calc(4px + 24px * var(--tv-row-scale, 1)) 20px calc(22px + 30px * var(--tv-row-scale, 1)) 20px !important; 
                border-bottom: 2px solid #f1f5f9 !important;
                background: #ffffff;
                transition: background 0.2s ease !important;
            }
            .sp-event-list tbody tr:nth-child(even) {
                background: #fbfcfe !important;
            }
            
            .sp-event-list tbody td { 
                border: none !important; 
                padding: 0 !important; 
            }

            /* Gospodarz (Lewa strona) */
            .sp-event-list td.data-home { 
                flex: 1 !important; 
                min-width: 0 !important; /* 🔥 Tarcza Flexboxa przed rozpychaniem tabeli poza 1600px */
                display: flex !important;
                justify-content: flex-start !important; /* Zaczynamy układać od lewej krawędzi */
                align-items: center !important;
                text-align: left !important; /* Nazwa z lewej, więc równamy do lewej */
                font-size: calc(1.6rem + 1.9rem * var(--tv-row-scale, 1)) !important; 
                font-weight: 800 !important;
                color: #0f172a !important;
                padding-left: 40px !important; /* Oddech od lewej krawędzi ekranu */
                padding-right: 15px !important; /* Dystans od wyniku */
                white-space: normal !important; 
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
                line-height: 1.1 !important;
            }
            /* 🔥 MAGIA: Odpychamy herb gospodarza maksymalnie do prawej (do wyniku) */
            .sp-event-list td.data-home img {
                margin-left: auto !important; 
            }

            /* Gosc (Prawa strona) */
            .sp-event-list td.data-away { 
                flex: 1 !important; 
                min-width: 0 !important; /* 🔥 Tarcza Flexboxa przed rozpychaniem tabeli poza 1600px */
                display: flex !important;
                justify-content: flex-end !important; /* Zaczynamy układać od prawej krawędzi */
                align-items: center !important;
                text-align: right !important; /* Nazwa z prawej, więc równamy do prawej */
                font-size: calc(1.6rem + 1.9rem * var(--tv-row-scale, 1)) !important; 
                font-weight: 800 !important;
                color: #0f172a !important;
                padding-right: 40px !important; /* Oddech od prawej krawędzi ekranu */
                padding-left: 15px !important; /* Dystans od wyniku */
                white-space: normal !important;
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
                line-height: 1.1 !important;
            }
            /* 🔥 MAGIA: Odpychamy herb gościa maksymalnie do lewej (do wyniku) */
            .sp-event-list td.data-away img {
                margin-right: auto !important; 
            }

            /* Srodek (Godzina / Wynik) - SZTYWNE MIEJSCE */
            .sp-event-list td.data-time, 
            .sp-event-list td.data-result { 
                width: 300px !important; /* Twarda rezerwacja przestrzeni! Zero ucinania */
                flex-shrink: 0 !important;
                display: flex !important;
                justify-content: center !important;
                align-items: center !important;
                flex-direction: column !important; /* 🔥 FIX DLA KARNYCH: Stosujemy układ pionowy */
            }

			/* 🔥 RIVALLY FIX: PANCERNY WYGLĄD NATYWNYCH KARNYCH W TV MODE 🔥 */
            .sp-event-list .data-result span.penalty-info {
                font-size: calc(0.9rem + 0.6rem * var(--tv-row-scale, 1)) !important;
                color: #fbbf24 !important; /* Złoty neon dla rzutów karnych */
                font-weight: 800 !important;
                margin-top: calc(3px + 5px * var(--tv-row-scale, 1)) !important;
                letter-spacing: 2px !important;
                text-transform: uppercase !important;
                text-shadow: 0 2px 5px rgba(0,0,0,0.5) !important;
                display: block !important;
                line-height: 1 !important;
                white-space: nowrap !important;
            }

            /* Wygląd godziny (przed meczem) - Nowoczesna sportowa pastylka czasowa */
            .sp-event-list .data-date, .sp-event-list .data-time { 
                font-size: calc(1.5rem + 1.7rem * var(--tv-row-scale, 1)) !important; 
                font-weight: 900 !important; 
                color: #2563eb !important; 
                background: #eff6ff !important;
                border: 2px solid #bfdbfe !important;
                border-radius: 14px !important;
                padding: calc(2px + 4px * var(--tv-row-scale, 1)) calc(12px + 12px * var(--tv-row-scale, 1)) !important;
                box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
                white-space: nowrap !important;
                letter-spacing: 1px !important;
            }

            /* Wygląd wyniku (po meczu) - Sportowa pastylka z poświatą neonową */
            .sp-event-list .data-result { 
                font-size: calc(1.9rem + 2.6rem * var(--tv-row-scale, 1)) !important; 
                font-weight: 900 !important; 
                padding: calc(2px + 4px * var(--tv-row-scale, 1)) calc(18px + 18px * var(--tv-row-scale, 1)) !important; 
                background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important; 
                color: #38bdf8 !important; 
                border: 2px solid #3b82f6 !important;
                border-radius: 16px !important; 
                box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important; 
                line-height: 1 !important; 
                white-space: nowrap !important;
                letter-spacing: 3px !important;
            }

            /* Ochrona tekstu wewnatrz wyniku przed wplywem motywu */
            .sp-event-list .data-result a, 
            .sp-event-list .data-result span {
                color: inherit !important;
                text-decoration: none !important;
                white-space: nowrap !important;
                display: inline-block !important;
            }

            /* Boisko - Elegancki badge w pigułce z obwódką */
            .sp-event-list td.data-venue {
                position: absolute !important;
                bottom: calc(3px + 9px * var(--tv-row-scale, 1)) !important;
                left: 50% !important;
                transform: translateX(-50%) !important;
                font-size: calc(0.9rem + 0.6rem * var(--tv-row-scale, 1)) !important;
                color: #475569 !important;
                background: #f1f5f9 !important;
                border: 1px solid #cbd5e1 !important;
                border-radius: 20px !important;
                padding: calc(1px + 2px * var(--tv-row-scale, 1)) calc(10px + 10px * var(--tv-row-scale, 1)) !important;
                text-transform: uppercase !important;
                font-weight: 800 !important;
                letter-spacing: 2px !important;
                white-space: nowrap !important;
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
            }

            /* Ukrywamy smieci z DataTables */
            .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { display: none !important; }
            
            /* 🔥 NEONOWY BROADCAST PASEK POSTĘPU SLAJDU (RESPONSYWNA GRUBOŚĆ DO 4K) 🔥 */
            .progress-bar { 
                position: absolute; 
                bottom: 0; 
                left: 0; 
                height: clamp(5px, 0.65vh, 14px) !important; 
                background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 50%, #6366f1 100%) !important; 
                box-shadow: 0 0 16px rgba(6, 182, 212, 0.8), 0 0 6px rgba(59, 130, 246, 0.5) !important;
                width: 0%; 
                z-index: 100; 
                transition: width linear; 
            }
			
			/* ========================================= */
            /* 🔢 GIGANTYCZNE STATYSTYKI W TABELACH (HIERARCHIA V2 + ADAPTACYJNY ROZMIAR) */
            /* ========================================= */
            
            /* 1. BAZA: Wszystkie komórki są duże, ale elastycznie dopasowują wysokość */
            .tv-overlay table.sp-league-table td, 
            .tv-overlay .sp-player-list td {
                font-size: calc(1.5rem + 1.7rem * var(--tv-row-scale, 1)) !important; 
                font-weight: 500 !important; 
            }
            
            /* 2. NAZWA: Nazwa drużyny / zawodnika - potężna (900) */
            .tv-overlay table.sp-league-table td.data-name, 
            .tv-overlay .sp-player-list td.data-name {
                font-size: calc(1.4rem + 1.4rem * var(--tv-row-scale, 1)) !important;
                font-weight: 900 !important; 
            }

            /* 3. PUNKTY / WYNIKI GŁÓWNE: Ostatnia kolumna + Punkty - potężne (900) */
            .tv-overlay table.sp-league-table td.data-pts,
            .tv-overlay table.sp-league-table td.data-pkt,
            .tv-overlay table.sp-league-table td.data-points,
            .tv-overlay table.sp-league-table td:last-child,
            .tv-overlay .sp-player-list td:last-child {
                font-weight: 900 !important; 
            }

            /* 4. POZYCJA (Lp.): Mniejsza i szara, żeby nie myliła się z punktami */
            .tv-overlay table.sp-league-table td.data-rank, 
            .tv-overlay table.sp-league-table td:first-child,
            .tv-overlay .sp-player-list td.data-rank,
            .tv-overlay .sp-player-list td:first-child {
                font-size: calc(1.3rem + 1.3rem * var(--tv-row-scale, 1)) !important;
                font-weight: 900 !important;
                color: #64748b !important;
            }
			
			/* ========================================= */
            /* 🔥 RIVALLY FIX: MORDERCA IKONEK "i" W TV 🔥 */
            /* ========================================= */
            .tv-overlay .riv-h2h-icon,
            .tv-overlay .sp-tie-breaker,
            .tv-overlay .sp-tie-breaker-info {
                display: none !important;
                opacity: 0 !important;
                visibility: hidden !important;
                width: 0 !important;
                height: 0 !important;
                font-size: 0 !important;
            }
			
			/* ========================================= */
            /* 🛡️ GIGANTYCZNE HERBY W KALENDARZACH (ADAPTACYJNA WYSOKOŚĆ) */
            /* ========================================= */
            
            /* 1. Sztywny środek na wynik/godzinę */
            .tv-overlay .sp-event-list td.data-time, 
            .tv-overlay .sp-event-list td.data-result { 
                width: 220px !important; 
                min-width: 220px !important;
                flex-shrink: 0 !important;
            }

            /* 2. Kontrola szerokości komórek z długimi nazwami drużyn (bez rozpychania ponad 1600px) */
            .tv-overlay .sp-event-list td.data-home,
            .tv-overlay .sp-event-list td.data-away {
                white-space: normal !important; 
                min-width: 0 !important;
            }

            /* 3. TARCZA ANTY-ZGNIECEŃ: Wyparowujemy linki <a> z układanki Flexboxa! */
            .tv-overlay .sp-event-list td.data-home a,
            .tv-overlay .sp-event-list td.data-away a {
                display: contents !important; 
            }

            /* 4. HERBY: Skalują wysokość wraz z wierszem (od 110px do min ~43px) */
            .tv-overlay .sp-event-list td.data-home img {
                width: calc(26px + 84px * var(--tv-row-scale, 1)) !important;
                height: calc(26px + 84px * var(--tv-row-scale, 1)) !important;
                min-width: calc(26px + 84px * var(--tv-row-scale, 1)) !important;
                flex-shrink: 0 !important;
                margin-left: 35px !important; /* Odsunięcie tekstu Gospodarza w lewo */
            }
            
            .tv-overlay .sp-event-list td.data-away img {
                width: calc(26px + 84px * var(--tv-row-scale, 1)) !important;
                height: calc(26px + 84px * var(--tv-row-scale, 1)) !important;
                min-width: calc(26px + 84px * var(--tv-row-scale, 1)) !important;
                flex-shrink: 0 !important;
                margin-right: 35px !important; /* Odsunięcie tekstu Gościa w prawo */
            }
			
            /* ========================================= */
            /* 📱 KOD QR W PRAWYM DOLNYM ROGU (RESPONSYWNY 720p -> 4K, PANCERNY FIXED Z-INDEX) */
            /* ========================================= */
            .tv-qr-container {
                position: fixed !important;
                bottom: clamp(14px, 2vh, 42px) !important;
                right: clamp(14px, 1.6vw, 42px) !important;
                background: #ffffff !important;
                padding: clamp(6px, 0.8vh, 18px) !important;
                border-radius: clamp(10px, 1.1vh, 22px) !important;
                box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 0 3px rgba(59, 130, 246, 0.45) !important;
                display: flex;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
                z-index: 2147483647 !important;
                pointer-events: none !important;
                opacity: 1 !important;
                visibility: visible;
            }
            .tv-qr-container img {
                width: clamp(58px, 7.5vh, 160px) !important;
                height: clamp(58px, 7.5vh, 160px) !important;
                min-width: clamp(58px, 7.5vh, 160px) !important;
                min-height: clamp(58px, 7.5vh, 160px) !important;
                display: block !important;
                border-radius: 4px !important;
                object-fit: contain !important;
                background: #ffffff !important;
                opacity: 1 !important;
                visibility: visible !important;
            }
            .tv-qr-text {
                font-family: 'Chakra Petch', sans-serif !important;
                color: #0f172a !important;
                font-size: clamp(0.6rem, 1vh, 1.45rem) !important;
                font-weight: 800 !important;
                margin-top: clamp(4px, 0.55vh, 10px) !important;
                text-transform: uppercase !important;
                letter-spacing: 1px !important;
                line-height: 1 !important;
                white-space: nowrap !important;
            }
			
			/* ========================================= */
            /* 🔥 RIVALLY FIX: RANKINGI ZAWODNIKÓW TV (100% SZEROKOŚCI KANWY + SPÓJNY WYGLĄD Z TABELAMI) 🔥 */
            /* ========================================= */
            
            /* 1. Rozpychamy wszystkie zewnętrzne wrappery SportsPressa do pełnych 100% szerokości kanwy 1600px */
            .tv-overlay .sp-table-tv-container,
            .tv-overlay .sp-template-player-list,
            .tv-overlay .sp-scrollable-table-wrapper {
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 auto !important;
                padding: 0 !important;
                display: block !important;
            }

            /* UWAGA: W SportsPress element .sp-player-list TO SAMA TABELA (<table class="sp-player-list">) - musi mieć display: table! */
            .tv-overlay table.sp-player-list,
            .tv-overlay .sp-player-list table {
                display: table !important;
                table-layout: fixed !important; 
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 !important;
                border-collapse: collapse !important;
                background: #ffffff !important;
                border: none !important;
                box-shadow: none !important;
            }

            /* Spójne wiersze (zebra + obramowanie + adaptacyjny padding jak w tabelach ligowych) */
            .tv-overlay table.sp-player-list tbody tr {
                border-bottom: 1px solid #f1f5f9 !important;
            }
            .tv-overlay table.sp-player-list tbody tr:nth-child(odd) {
                background-color: #ffffff !important;
            }
            .tv-overlay table.sp-player-list tbody tr:nth-child(even) {
                background-color: #f8fafc !important;
            }
            .tv-overlay table.sp-player-list tbody td {
                padding: calc(2px + 10px * var(--tv-row-scale, 1)) 14px !important;
                border-bottom: 1px solid #f1f5f9 !important;
                color: #0f172a !important;
                vertical-align: middle !important;
            }

            /* 2. CAŁKOWICIE UKRYWAMY KOLUMNĘ "TEAM" ORAZ JAKIEKOLWIEK PLACEHOLDERY BRAKU ZDJĘCIA */
            .tv-overlay table.sp-player-list th.data-team, 
            .tv-overlay table.sp-player-list td.data-team,
            .tv-overlay table.sp-player-list .player-photo,
            .tv-overlay table.sp-player-list .avatar,
            .tv-overlay table.sp-player-list img[src*="no-pic"],
            .tv-overlay table.sp-player-list img[src*="placeholder"],
            .tv-overlay table.sp-player-list img[src*="gravatar"] { 
                display: none !important; 
            }

            /* 3. Proporcjonalne szerokości kolumn (Lp./Nr | Zawodnik + Klub | Statystyka) */
            .tv-overlay table.sp-player-list th:first-child, 
            .tv-overlay table.sp-player-list td:first-child,
            .tv-overlay table.sp-player-list th.data-rank, 
            .tv-overlay table.sp-player-list td.data-rank,
            .tv-overlay table.sp-player-list th.data-number, 
            .tv-overlay table.sp-player-list td.data-number {
                width: 110px !important;
                text-align: center !important;
            }
            
            .tv-overlay table.sp-player-list th.data-name, 
            .tv-overlay table.sp-player-list td.data-name {
                width: auto !important;
                text-align: left !important;
                padding-left: 24px !important;
            }
            
            .tv-overlay .tv-slide[data-slide-type="ranking"] table.sp-player-list th:last-child, 
            .tv-overlay .tv-slide[data-slide-type="ranking"] table.sp-player-list td:last-child {
                width: 190px !important;
                text-align: center !important;
            }

            /* Podświetlenie głównej kolumny statystyki w rankingach (spójne z kolumną PKT w tabelach ligowych) */
            .tv-overlay .tv-slide[data-slide-type="ranking"] table.sp-player-list tbody td:last-child {
                background-color: #eff6ff !important;
                color: #1d4ed8 !important;
                font-weight: 900 !important;
                font-size: calc(1.6rem + 1.8rem * var(--tv-row-scale, 1)) !important;
            }

            /* 4. PANCERNY GRID TV W KOMÓRCE ZAWODNIKA (SPÓJNY Z TABELĄ LIGOWĄ: HERB PO LEWEJ -> NAZWISKO I KLUB PO PRAWEJ) */
            .tv-overlay table.sp-player-list tbody td.data-name {
                display: grid !important;
                grid-template-columns: calc(45px + 45px * var(--tv-row-scale, 1)) 1fr !important;
                align-items: center !important;
                gap: 20px !important;
                padding-top: calc(4px + 10px * var(--tv-row-scale, 1)) !important;
                padding-bottom: calc(4px + 10px * var(--tv-row-scale, 1)) !important;
                padding-right: 20px !important;
            }

            /* Gdy drużyna NIE ma herbu lub jesteśmy w slajdzie kadry -> 1 kolumna, zero pustej dziury po lewej! */
            .tv-overlay table.sp-player-list tbody td.data-name.no-team-logo {
                grid-template-columns: 1fr !important;
            }

            .tv-overlay .player-text-wrapper {
                display: flex !important;
                flex-direction: row !important;
                flex-wrap: wrap !important;
                align-items: baseline !important;
                gap: 14px !important;
                white-space: normal !important;
                word-wrap: break-word !important;
                min-width: 0 !important;
            }

            /* Formatujemy imię i nazwisko (identyczna waga i skala jak nazwa drużyny w tabeli ligowej) */
            .tv-overlay table.sp-player-list tbody td.data-name .player-name-text {
                font-size: calc(1.4rem + 1.4rem * var(--tv-row-scale, 1)) !important;
                font-weight: 900 !important;
                line-height: 1.15 !important;
                color: #1e293b !important; 
                white-space: normal !important;
            }

            /* Subtelny badge z nazwą drużyny przy nazwisku zawodnika */
            .tv-overlay table.sp-player-list tbody td.data-name .player-team-subtext {
                font-size: calc(0.95rem + 0.65rem * var(--tv-row-scale, 1)) !important;
                font-weight: 800 !important;
                color: #64748b !important;
                text-transform: uppercase !important;
                letter-spacing: 1px !important;
                line-height: 1.1 !important;
                background: #f1f5f9 !important;
                border: 1px solid #e2e8f0 !important;
                padding: calc(2px + 2px * var(--tv-row-scale, 1)) calc(8px + 6px * var(--tv-row-scale, 1)) !important;
                border-radius: 8px !important;
                white-space: nowrap !important;
            }

            /* 5. HERB DRUŻYNY W RANKINGU (IDENTYCZNY ROZMIAR I CENTROWANIE JAK W TABELI LIGOWEJ) */
            .tv-overlay table.sp-player-list img.player-team-logo {
                width: auto !important;
                max-width: calc(45px + 45px * var(--tv-row-scale, 1)) !important;
                height: calc(24px + 51px * var(--tv-row-scale, 1)) !important;
                object-fit: contain !important;
                margin: 0 auto !important;
                filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15));
                display: block !important;
            }
			
			/* 🔥 GIGACHAD LOGO ZWYCIĘZCY (TV - SPÓJNE Z KANWĄ 1600px DLA KAŻDEJ ROZDZIELCZOŚCI) 🔥 */
            .tv-gigachad-winner-logo {
                height: 440px !important; /* Skalowane proporcjonalnie przez fitSlide od 720p do 4K */
                width: auto !important;
                max-width: 1200px !important;
                object-fit: contain !important;
                margin: 15px auto 25px auto !important;
                display: block !important;
                filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.8)) !important;
                animation: winnerLogoEntrance 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, winnerPulse 3s infinite alternate ease-in-out 1s;
            }

            @keyframes winnerLogoEntrance {
                from { transform: scale(0.3) translateY(100px); opacity: 0; }
                to { transform: scale(1) translateY(0); opacity: 1; }
            }

            @keyframes winnerPulse {
                from { transform: scale(1); filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.8)); }
                to { transform: scale(1.05); filter: drop-shadow(0 30px 70px rgba(59, 130, 246, 0.6)); }
            }

/* === #4 TV sponsors wrapper slide === */
.tv-slide[data-slide-type="sponsors"] .tv-scale-wrapper { justify-content: center; height: 760px; }

/* === #41 TV Mode powiekszone logo druzyn (functions.php L16143-16202) === */
/* 1. Reset komórki i równy lewy margines (odległość od numeru pozycji) */
        table.sp-league-table td.data-name {
            vertical-align: middle !important;
            padding-left: 25px !important; /* Twardy bufor z lewej */
        }

        /* 2. Zmieniamy <a> (link) w kontener flex */
        table.sp-league-table td.data-name > a {
            display: flex !important;
            align-items: center !important;
            width: 100% !important; 
            text-decoration: none !important;
            color: inherit !important;
            white-space: nowrap !important;
            overflow: hidden !important; 
        }
        
        /* 3. Twardy kontener na LOGO - Szeroki i idealnie wyśrodkowany */
        table.sp-league-table td.data-name .sp-team-logo {
            flex: 0 0 70px !important; /* Szeroki blok 70px */
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important; /* Centrujemy herb wewnątrz bloku */
            width: 70px !important;
            height: 60px !important;
            margin: 0 25px 0 0 !important; /* Twardy bufor z prawej (do nazwy) - taki sam jak z lewej! */
            padding: 0 !important;
            overflow: visible !important;
        }

        /* 4. Sam obrazek wewnątrz twardego kontenera (POWIĘKSZONY DO 50px) */
        table.sp-league-table td.data-name img {
            width: 50px !important;
            height: 50px !important;
            max-width: 50px !important;
            max-height: 50px !important;
            object-fit: contain !important;
            display: block !important;
            border-radius: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        
        /* Fallback: gdyby obrazek wyjątkowo leciał luzem bez span'a */
        table.sp-league-table td.data-name > a > img {
            flex: 0 0 50px !important;
            margin: 0 25px 0 0 !important;
        }

        /* 5. Nazwa drużyny - zajmuje resztę i jest ucinana z kropkami */
        table.sp-league-table td.data-name .sp-team-name {
            flex: 1 1 auto !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
            min-width: 0 !important;
            font-size: 1.15em !important; /* Lekko podbite, żeby pasowało do większego logo */
        }
