
/* =========================================================
   TennisFinalsPro — Ligi + Turnieje
   CZYSTY CSS OD ZERA: bez starych nadpisek, mobile + desktop.
   Logika JS/PHP zostaje w tych samych klasach i ID.
   ========================================================= */

body[data-page='leagues-list'],
body[data-page='tournaments-list'] {
    --tfp-bg: #f5f8ff;
    --tfp-white: #ffffff;
    --tfp-ink: #07122d;
    --tfp-text: #152341;
    --tfp-muted: #64748b;
    --tfp-soft: #eef5ff;
    --tfp-line: #dfe8f6;
    --tfp-blue: #2563eb;
    --tfp-blue-2: #0ea5e9;
    --tfp-cyan: #22d3ee;
    --tfp-green: #10b981;
    --tfp-shadow: 0 18px 42px rgba(15, 23, 42, .08);
    --tfp-shadow-soft: 0 10px 24px rgba(15, 23, 42, .055);
    color: var(--tfp-text);
    background: var(--tfp-bg);
}

body[data-page='leagues-list'] .leagues-page,
body[data-page='tournaments-list'] .leagues-page {
    min-height: 100vh;
    padding: 6px 0 28px;
    overflow-x: clip;
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 99, 235, .08), transparent 18rem),
        radial-gradient(circle at 90% 8%, rgba(34, 211, 238, .12), transparent 19rem),
        linear-gradient(180deg, #fbfdff 0%, #f3f7ff 70%, #fbfdff 100%);
}

body[data-page='leagues-list'] .leagues-shell,
body[data-page='tournaments-list'] .leagues-shell {
    width: min(100% - 12px, 390px);
    max-width: 390px;
    margin: 0 auto;
    padding: 0;
}

body[data-page='leagues-list'] .leagues-section,
body[data-page='tournaments-list'] .leagues-section {
    display: grid;
    gap: 8px;
}

/* ===================== HERO ===================== */
body[data-page='leagues-list'] .leagues-hero,
body[data-page='tournaments-list'] .leagues-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0 0 7px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 17px;
    color: #fff;
    background:
        radial-gradient(circle at 97% 5%, rgba(34, 211, 238, .24), transparent 9rem),
        radial-gradient(circle at 0% 0%, rgba(124, 58, 237, .20), transparent 11rem),
        linear-gradient(135deg, #09103f 0%, #123aa7 58%, #12b8dc 100%);
    box-shadow: 0 13px 28px rgba(19, 60, 160, .14), inset 0 1px 0 rgba(255,255,255,.12);
}

body[data-page='tournaments-list'] .tournaments-hero {
    background:
        radial-gradient(circle at 97% 5%, rgba(34, 211, 238, .24), transparent 9rem),
        radial-gradient(circle at 0% 0%, rgba(124, 58, 237, .23), transparent 11rem),
        linear-gradient(135deg, #09103f 0%, #153aa7 56%, #13b8d8 100%);
}

body[data-page='leagues-list'] .leagues-hero::before,
body[data-page='tournaments-list'] .leagues-hero::before {
    content: "";
    position: absolute;
    width: 116px;
    height: 116px;
    right: -52px;
    top: -48px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

body[data-page='leagues-list'] .leagues-hero::after,
body[data-page='tournaments-list'] .leagues-hero::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    left: -68px;
    bottom: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,.13), transparent 68%);
    pointer-events: none;
    z-index: -1;
}

body[data-page='leagues-list'] .leagues-hero__content,
body[data-page='tournaments-list'] .leagues-hero__content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

body[data-page='leagues-list'] .leagues-hero__text,
body[data-page='tournaments-list'] .leagues-hero__text {
    min-width: 0;
    padding-right: 50px;
}

body[data-page='leagues-list'] .leagues-hero__badge,
body[data-page='tournaments-list'] .leagues-hero__badge {
    display: inline-flex;
    align-items: center;
    height: 19px;
    max-width: 100%;
    padding: 0 8px;
    margin: 0 0 5px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: #b9dcff;
    background: rgba(255,255,255,.08);
    font-size: 7px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .075em;
    text-transform: uppercase;
    white-space: nowrap;
}

body[data-page='leagues-list'] .leagues-hero h1,
body[data-page='tournaments-list'] .leagues-hero h1 {
    margin: 0;
    max-width: none;
    color: #fff;
    font-family: var(--tfp-font-sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    font-size: 24px;
    line-height: .96;
    font-weight: 950;
    letter-spacing: -0.046em;
    text-wrap: balance;
}

body[data-page='leagues-list'] .leagues-hero p,
body[data-page='tournaments-list'] .leagues-hero p {
    max-width: 238px;
    margin: 5px 0 0;
    color: rgba(233, 242, 255, .92);
    font-size: 9.4px;
    line-height: 1.24;
    font-weight: 720;
    letter-spacing: -0.01em;
}

body[data-page='leagues-list'] .leagues-hero__actions,
body[data-page='tournaments-list'] .leagues-hero__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

body[data-page='leagues-list'] .leagues-create-btn,
body[data-page='tournaments-list'] .leagues-create-btn,
body[data-page='leagues-list'] .leagues-join-btn,
body[data-page='tournaments-list'] .leagues-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

body[data-page='leagues-list'] .leagues-create-btn,
body[data-page='tournaments-list'] .leagues-create-btn {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #2563eb 0%, #12c7e8 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .20);
}

body[data-page='leagues-list'] .leagues-join-btn,
body[data-page='tournaments-list'] .leagues-join-btn {
    color: #fff;
    border: 1px solid rgba(255,255,255,.34);
    background: rgba(255,255,255,.06);
}

body[data-page='leagues-list'] .leagues-hero__visual,
body[data-page='tournaments-list'] .leagues-hero__visual {
    position: absolute;
    right: -16px;
    top: 32px;
    width: 74px;
    height: 54px;
    opacity: .78;
    pointer-events: none;
}

body[data-page='leagues-list'] .leagues-orbit,
body[data-page='tournaments-list'] .leagues-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 63% 50%, rgba(34,211,238,.15), transparent 60%);
}

body[data-page='leagues-list'] .leagues-orbit::before,
body[data-page='tournaments-list'] .leagues-orbit::before {
    content: "";
    position: absolute;
    left: 7px;
    right: 4px;
    top: 23px;
    height: 16px;
    border: 1.5px solid rgba(91, 209, 255, .72);
    border-left-color: transparent;
    border-radius: 50%;
    transform: rotate(-8deg);
    filter: drop-shadow(0 0 6px rgba(34,211,238,.44));
}

body[data-page='leagues-list'] .leagues-ball,
body[data-page='tournaments-list'] .leagues-ball {
    position: absolute;
    right: 17px;
    top: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 23%, rgba(255,255,255,.74), transparent 25%),
        radial-gradient(circle at 42% 38%, #f3ff78 0 18%, #cfe83d 52%, #86bd16 100%);
    box-shadow: 0 8px 12px rgba(0, 0, 0, .20), 0 0 14px rgba(186, 255, 65, .26);
    overflow: hidden;
}

body[data-page='leagues-list'] .leagues-ball::before,
body[data-page='tournaments-list'] .leagues-ball::before,
body[data-page='leagues-list'] .leagues-ball::after,
body[data-page='tournaments-list'] .leagues-ball::after {
    content: "";
    position: absolute;
    top: -12%;
    width: 62%;
    height: 124%;
    border-radius: 50%;
}
body[data-page='leagues-list'] .leagues-ball::before,
body[data-page='tournaments-list'] .leagues-ball::before { left: -30%; border-right: 3px solid rgba(255,255,245,.96); transform: rotate(8deg); }
body[data-page='leagues-list'] .leagues-ball::after,
body[data-page='tournaments-list'] .leagues-ball::after { right: -30%; border-left: 3px solid rgba(255,255,245,.96); transform: rotate(8deg); }

body[data-page='leagues-list'] .leagues-hero__stats,
body[data-page='tournaments-list'] .leagues-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    margin: 1px 0 0;
}

body[data-page='leagues-list'] .leagues-hero-stat,
body[data-page='tournaments-list'] .leagues-hero-stat {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 5px;
    align-items: center;
    min-width: 0;
    height: 31px;
    min-height: 31px;
    padding: 4px 5px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 9px;
    background: rgba(255,255,255,.105);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

body[data-page='leagues-list'] .leagues-hero-stat::before,
body[data-page='tournaments-list'] .leagues-hero-stat::before {
    display: grid;
    place-items: center;
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 14px;
    height: 14px;
    margin: 0;
    border-radius: 5px;
    background: rgba(255,255,255,.10);
    font-size: 7.5px;
    line-height: 1;
}

body[data-page='leagues-list'] .leagues-hero-stat--players::before,
body[data-page='leagues-list'] .leagues-hero-stat--leagues::before { content: "👥"; }
body[data-page='leagues-list'] .leagues-hero-stat--favorites::before { content: "★"; color: #ffd166; }
body[data-page='tournaments-list'] .leagues-hero-stat--active::before { content: "🏆"; }
body[data-page='tournaments-list'] .leagues-hero-stat--open::before { content: "🎾"; }
body[data-page='tournaments-list'] .leagues-hero-stat--finished::before { content: "✓"; color: #8ef0c1; }

body[data-page='leagues-list'] .leagues-hero-stat span,
body[data-page='tournaments-list'] .leagues-hero-stat span {
    grid-column: 2;
    grid-row: 1;
    display: block;
    margin: 0;
    color: rgba(233,242,255,.78);
    font-size: 5.5px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-page='leagues-list'] .leagues-hero-stat strong,
body[data-page='tournaments-list'] .leagues-hero-stat strong {
    grid-column: 2;
    grid-row: 2;
    display: block;
    margin: 1px 0 0;
    color: #fff;
    font-size: 13px;
    line-height: .95;
    font-weight: 950;
    letter-spacing: -0.025em;
}

/* ===================== TOOLBAR ===================== */
body[data-page='leagues-list'] .leagues-toolbar,
body[data-page='tournaments-list'] .leagues-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0;
    padding: 9px;
    border: 1px solid var(--tfp-line);
    border-radius: 16px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 8px 18px rgba(15,23,42,.045);
}

body[data-page='leagues-list'] .leagues-toolbar__head,
body[data-page='tournaments-list'] .leagues-toolbar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-width: 0;
}

body[data-page='leagues-list'] .leagues-toolbar__head h2,
body[data-page='tournaments-list'] .leagues-toolbar__head h2 {
    margin: 0;
    color: var(--tfp-ink);
    font-size: 16px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
}
body[data-page='leagues-list'] .leagues-toolbar__head p,
body[data-page='tournaments-list'] .leagues-toolbar__head p { display: none; }

body[data-page='leagues-list'] .leagues-clear-btn,
body[data-page='tournaments-list'] .leagues-clear-btn {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #dbe7ff;
    border-radius: 999px;
    background: #fff;
    color: var(--tfp-blue);
    font: inherit;
    font-size: 10px;
    line-height: 1;
    font-weight: 950;
    cursor: pointer;
}

body[data-page='leagues-list'] .leagues-search,
body[data-page='tournaments-list'] .leagues-search {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #dbe7ff;
    border-radius: 11px;
    background: #fff;
}

body[data-page='leagues-list'] .leagues-search__icon,
body[data-page='tournaments-list'] .leagues-search__icon {
    color: var(--tfp-blue);
    font-size: 12px;
    line-height: 1;
}

body[data-page='leagues-list'] .leagues-search input,
body[data-page='tournaments-list'] .leagues-search input {
    width: 100%;
    min-width: 0;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--tfp-ink);
    font: inherit;
    font-size: 10.5px;
    font-weight: 850;
}
body[data-page='leagues-list'] .leagues-search input::placeholder,
body[data-page='tournaments-list'] .leagues-search input::placeholder { color: #94a3b8; }

body[data-page='leagues-list'] .leagues-search:focus-within,
body[data-page='tournaments-list'] .leagues-search:focus-within,
body[data-page='leagues-list'] .leagues-filter select:focus,
body[data-page='tournaments-list'] .leagues-filter select:focus {
    border-color: rgba(37, 99, 235, .55);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

body[data-page='leagues-list'] .leagues-filters,
body[data-page='tournaments-list'] .leagues-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}
body[data-page='leagues-list'] .leagues-filter:nth-child(3) { grid-column: 1 / -1; }
body[data-page='tournaments-list'] .leagues-filter:nth-child(5) { grid-column: 1 / -1; }

body[data-page='leagues-list'] .leagues-filter,
body[data-page='tournaments-list'] .leagues-filter {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body[data-page='leagues-list'] .leagues-filter label,
body[data-page='tournaments-list'] .leagues-filter label {
    margin: 0;
    color: var(--tfp-muted);
    font-size: 6.8px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .09em;
    text-transform: uppercase;
}

body[data-page='leagues-list'] .leagues-filter select,
body[data-page='tournaments-list'] .leagues-filter select {
    width: 100%;
    height: 31px;
    min-height: 31px;
    max-height: 31px;
    padding: 0 24px 0 8px;
    border: 1px solid #dbe7ff;
    border-radius: 10px;
    outline: none;
    background-color: #fff;
    color: var(--tfp-ink);
    font: inherit;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 900;
}

body[data-page='leagues-list'] .leagues-chips,
body[data-page='tournaments-list'] .leagues-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    padding: 0 0 1px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
body[data-page='leagues-list'] .leagues-chips::-webkit-scrollbar,
body[data-page='tournaments-list'] .leagues-chips::-webkit-scrollbar { display: none; }

body[data-page='leagues-list'] .leagues-chip,
body[data-page='tournaments-list'] .leagues-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 25px;
    min-height: 25px;
    padding: 0 8px;
    border: 1px solid #e2ebff;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 9px;
    line-height: 1;
    font-weight: 950;
    cursor: pointer;
}
body[data-page='leagues-list'] .leagues-chip.is-active,
body[data-page='tournaments-list'] .leagues-chip.is-active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
}
body[data-page='tournaments-list'] .leagues-chip--accent { color: #047857; background: #dcfce7; border-color: #bbf7d0; }
body[data-page='tournaments-list'] .leagues-chip--finished { color: #475569; background: #f8fafc; }

/* ===================== LIST HEADER ===================== */
body[data-page='leagues-list'] .leagues-list-section,
body[data-page='tournaments-list'] .leagues-list-section {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

body[data-page='leagues-list'] .leagues-list-head,
body[data-page='tournaments-list'] .leagues-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 7px;
    padding: 9px 11px;
    border: 1px solid var(--tfp-line);
    border-radius: 16px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 8px 18px rgba(15,23,42,.045);
}

body[data-page='leagues-list'] .leagues-list-head__title,
body[data-page='tournaments-list'] .leagues-list-head__title {
    color: var(--tfp-ink);
    font-size: 16px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
}
body[data-page='leagues-list'] .leagues-list-head__right,
body[data-page='tournaments-list'] .leagues-list-head__right { display: flex; align-items: center; gap: 6px; min-width: 0; }
body[data-page='leagues-list'] .leagues-list-head__meta,
body[data-page='tournaments-list'] .leagues-list-head__meta {
    color: var(--tfp-muted);
    font-size: 9.5px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}
body[data-page='leagues-list'] .leagues-view-toggle,
body[data-page='tournaments-list'] .leagues-view-toggle { display: none; }

/* ===================== CARDS ===================== */
body[data-page='leagues-list'] .leagues-list,
body[data-page='tournaments-list'] .leagues-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
}

body[data-page='leagues-list'] .league-row,
body[data-page='tournaments-list'] .league-row {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 72px;
    padding: 10px 38px 10px 10px;
    border: 1px solid var(--tfp-line);
    border-radius: 17px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 10px 22px rgba(15,23,42,.055);
    overflow: hidden;
}

body[data-page='leagues-list'] .league-row::before,
body[data-page='tournaments-list'] .league-row::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--tfp-blue), var(--tfp-cyan));
}
body[data-page='tournaments-list'] .league-row.is-open-tournament { border-color: rgba(16,185,129,.30); }
body[data-page='tournaments-list'] .league-row.is-finished-tournament { opacity: .94; }

body[data-page='leagues-list'] .league-row__favorite,
body[data-page='tournaments-list'] .league-row__favorite {
    position: absolute;
    right: 9px;
    top: 9px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 17px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
}
body[data-page='leagues-list'] .league-row__favorite.is-active,
body[data-page='tournaments-list'] .league-row__favorite.is-active { color: #f59e0b; }

body[data-page='leagues-list'] .league-row__visual,
body[data-page='tournaments-list'] .league-row__visual {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.44), transparent 28%), linear-gradient(135deg, #2563eb, #0ea5e9);
    box-shadow: 0 10px 18px rgba(37,99,235,.18);
}
body[data-page='tournaments-list'] .league-row:nth-child(2n) .league-row__visual { background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.44), transparent 28%), linear-gradient(135deg, #16a34a, #22c55e); }
body[data-page='tournaments-list'] .league-row:nth-child(3n) .league-row__visual { background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.44), transparent 28%), linear-gradient(135deg, #7c3aed, #0ea5e9); }
body[data-page='leagues-list'] .league-row:nth-child(2n) .league-row__visual { background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.44), transparent 28%), linear-gradient(135deg, #16a34a, #84cc16); }
body[data-page='leagues-list'] .league-row:nth-child(3n) .league-row__visual { background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.44), transparent 28%), linear-gradient(135deg, #7c3aed, #0ea5e9); }

body[data-page='leagues-list'] .league-row__visual span,
body[data-page='tournaments-list'] .league-row__visual span {
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.02em;
}

body[data-page='leagues-list'] .league-row__main,
body[data-page='tournaments-list'] .league-row__main {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 8px;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

body[data-page='leagues-list'] .league-row__content,
body[data-page='tournaments-list'] .league-row__content {
    min-width: 0;
    padding-right: 2px;
}

body[data-page='leagues-list'] .league-row__headline,
body[data-page='tournaments-list'] .league-row__headline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
    margin: 0 0 4px;
}

body[data-page='leagues-list'] .league-row__title,
body[data-page='tournaments-list'] .league-row__title {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 4px;
    color: var(--tfp-ink);
    font-family: var(--tfp-font-sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    font-size: 15.5px;
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.028em;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: anywhere;
}
body[data-page='tournaments-list'] .league-row__headline .league-row__title {
    width: auto;
    flex: 1 1 100%;
    min-width: 0;
    margin-bottom: 0;
}
body[data-page='tournaments-list'] .league-row__title--open::after { display: none; }

body[data-page='leagues-list'] .league-row__meta,
body[data-page='tournaments-list'] .league-row__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    color: var(--tfp-muted);
    font-size: 10.5px;
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -0.01em;
}

body[data-page='leagues-list'] .league-row__dot,
body[data-page='tournaments-list'] .league-row__dot { opacity: .48; }

body[data-page='tournaments-list'] .league-row__submeta {
    margin-top: 4px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.22;
    font-weight: 760;
    overflow-wrap: anywhere;
}
body[data-page='tournaments-list'] .league-row__submeta--open { color: #047857; }
body[data-page='tournaments-list'] .league-row__submeta--finished { color: #64748b; }

body[data-page='leagues-list'] .league-row__side,
body[data-page='tournaments-list'] .league-row__side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}
/* Important: boczne tagi nie zabierają miejsca tytułom. Tytuły mają być całe. */
body[data-page='leagues-list'] .league-row__side .league-tag,
body[data-page='tournaments-list'] .league-row__side .league-tag { display: none; }

body[data-page='leagues-list'] .league-tag,
body[data-page='tournaments-list'] .league-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 19px;
    padding: 0 7px;
    border-radius: 999px;
    color: #175cd3;
    background: #eef5ff;
    font-size: 8px;
    line-height: 1;
    font-weight: 950;
    white-space: nowrap;
}
body[data-page='tournaments-list'] .league-tag--open,
body[data-page='tournaments-list'] .league-tag--status-open,
body[data-page='tournaments-list'] .league-tag--open-soft { color: #047857; background: #dcfce7; }
body[data-page='tournaments-list'] .league-tag--finished,
body[data-page='tournaments-list'] .league-tag--status-finished { color: #475569; background: #f1f5f9; }

body[data-page='leagues-list'] .league-row__arrow,
body[data-page='tournaments-list'] .league-row__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border: 1px solid #dbe7ff;
    border-radius: 999px;
    color: var(--tfp-ink);
    background: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

body[data-page='leagues-list'] .league-row.is-filter-hidden,
body[data-page='tournaments-list'] .league-row.is-filter-hidden { display: none; }

/* ===================== EMPTY + TRUST ===================== */
body[data-page='leagues-list'] .leagues-empty-search,
body[data-page='tournaments-list'] .leagues-empty-search,
body[data-page='leagues-list'] .leagues-empty-state,
body[data-page='tournaments-list'] .leagues-empty-state {
    padding: 18px;
    border: 1px solid var(--tfp-line);
    border-radius: 18px;
    background: #fff;
    text-align: center;
    box-shadow: var(--tfp-shadow-soft);
}
body[data-page='leagues-list'] .leagues-empty-search[hidden],
body[data-page='tournaments-list'] .leagues-empty-search[hidden] { display: none; }

body[data-page='leagues-list'] .leagues-trust-strip,
body[data-page='tournaments-list'] .leagues-trust-strip {
    display: none;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--tfp-line);
    border-radius: 20px;
    background: rgba(255,255,255,.97);
    box-shadow: var(--tfp-shadow-soft);
}
body[data-page='leagues-list'] .leagues-trust-strip div,
body[data-page='tournaments-list'] .leagues-trust-strip div { display: flex; align-items: center; gap: 8px; min-width: 0; }
body[data-page='leagues-list'] .leagues-trust-strip span,
body[data-page='tournaments-list'] .leagues-trust-strip span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 12px; background: #eef5ff; }
body[data-page='leagues-list'] .leagues-trust-strip strong,
body[data-page='tournaments-list'] .leagues-trust-strip strong { display: block; color: var(--tfp-ink); font-size: 12px; font-weight: 950; }
body[data-page='leagues-list'] .leagues-trust-strip small,
body[data-page='tournaments-list'] .leagues-trust-strip small { display: block; color: var(--tfp-muted); font-size: 10px; font-weight: 750; }

/* ===================== VERY SMALL PHONES ===================== */
@media (max-width: 360px) {
    body[data-page='leagues-list'] .leagues-shell,
    body[data-page='tournaments-list'] .leagues-shell { width: min(100% - 8px, 360px); }
    body[data-page='leagues-list'] .leagues-hero h1,
    body[data-page='tournaments-list'] .leagues-hero h1 { font-size: 22px; }
    body[data-page='leagues-list'] .leagues-hero p,
    body[data-page='tournaments-list'] .leagues-hero p { max-width: 220px; font-size: 8.8px; }
    body[data-page='leagues-list'] .leagues-hero__visual,
    body[data-page='tournaments-list'] .leagues-hero__visual { opacity: .58; right: -24px; }
    body[data-page='leagues-list'] .leagues-hero-stat,
    body[data-page='tournaments-list'] .leagues-hero-stat { grid-template-columns: 12px minmax(0, 1fr); gap: 4px; padding: 4px; }
    body[data-page='leagues-list'] .leagues-hero-stat::before,
    body[data-page='tournaments-list'] .leagues-hero-stat::before { width: 12px; height: 12px; font-size: 6.5px; }
    body[data-page='leagues-list'] .leagues-hero-stat span,
    body[data-page='tournaments-list'] .leagues-hero-stat span { font-size: 5px; }
    body[data-page='leagues-list'] .leagues-hero-stat strong,
    body[data-page='tournaments-list'] .leagues-hero-stat strong { font-size: 12px; }
}

/* ===================== TABLET ===================== */
@media (min-width: 700px) {
    body[data-page='leagues-list'] .leagues-page,
    body[data-page='tournaments-list'] .leagues-page { padding: 18px 0 54px; }
    body[data-page='leagues-list'] .leagues-shell,
    body[data-page='tournaments-list'] .leagues-shell { width: min(100% - 32px, 780px); max-width: 780px; }

    body[data-page='leagues-list'] .leagues-hero,
    body[data-page='tournaments-list'] .leagues-hero { padding: 24px; border-radius: 30px; margin-bottom: 12px; }
    body[data-page='leagues-list'] .leagues-hero__content,
    body[data-page='tournaments-list'] .leagues-hero__content { gap: 14px; }
    body[data-page='leagues-list'] .leagues-hero__text,
    body[data-page='tournaments-list'] .leagues-hero__text { padding-right: 210px; }
    body[data-page='leagues-list'] .leagues-hero__badge,
    body[data-page='tournaments-list'] .leagues-hero__badge { height: 25px; padding: 0 11px; margin-bottom: 10px; font-size: 10px; }
    body[data-page='leagues-list'] .leagues-hero h1,
    body[data-page='tournaments-list'] .leagues-hero h1 { font-size: 50px; line-height: .94; }
    body[data-page='leagues-list'] .leagues-hero p,
    body[data-page='tournaments-list'] .leagues-hero p { max-width: 430px; font-size: 14px; line-height: 1.45; }
    body[data-page='leagues-list'] .leagues-create-btn,
    body[data-page='tournaments-list'] .leagues-create-btn,
    body[data-page='leagues-list'] .leagues-join-btn,
    body[data-page='tournaments-list'] .leagues-join-btn { min-height: 40px; padding: 0 16px; border-radius: 14px; font-size: 13px; }
    body[data-page='leagues-list'] .leagues-hero__visual,
    body[data-page='tournaments-list'] .leagues-hero__visual { width: 210px; height: 150px; right: 20px; top: 28px; opacity: .9; }
    body[data-page='leagues-list'] .leagues-orbit::before,
    body[data-page='tournaments-list'] .leagues-orbit::before { left: 8px; right: 2px; top: 58px; height: 42px; border-width: 3px; }
    body[data-page='leagues-list'] .leagues-ball,
    body[data-page='tournaments-list'] .leagues-ball { width: 76px; height: 76px; right: 52px; top: 28px; }

    body[data-page='leagues-list'] .leagues-hero__stats,
    body[data-page='tournaments-list'] .leagues-hero__stats { gap: 10px; }
    body[data-page='leagues-list'] .leagues-hero-stat,
    body[data-page='tournaments-list'] .leagues-hero-stat { height: 64px; min-height: 64px; grid-template-columns: 22px 1fr; padding: 10px; border-radius: 16px; }
    body[data-page='leagues-list'] .leagues-hero-stat::before,
    body[data-page='tournaments-list'] .leagues-hero-stat::before { width: 22px; height: 22px; border-radius: 9px; font-size: 12px; }
    body[data-page='leagues-list'] .leagues-hero-stat span,
    body[data-page='tournaments-list'] .leagues-hero-stat span { font-size: 8px; }
    body[data-page='leagues-list'] .leagues-hero-stat strong,
    body[data-page='tournaments-list'] .leagues-hero-stat strong { font-size: 24px; }

    body[data-page='leagues-list'] .leagues-toolbar,
    body[data-page='tournaments-list'] .leagues-toolbar { padding: 14px; border-radius: 22px; gap: 10px; }
    body[data-page='leagues-list'] .leagues-toolbar__head h2,
    body[data-page='tournaments-list'] .leagues-toolbar__head h2 { font-size: 22px; }
    body[data-page='leagues-list'] .leagues-toolbar__head p,
    body[data-page='tournaments-list'] .leagues-toolbar__head p { display: block; margin: 3px 0 0; color: var(--tfp-muted); font-size: 11px; font-weight: 750; }
    body[data-page='leagues-list'] .leagues-search,
    body[data-page='tournaments-list'] .leagues-search { height: 42px; min-height: 42px; border-radius: 15px; }
    body[data-page='leagues-list'] .leagues-search input,
    body[data-page='tournaments-list'] .leagues-search input { height: 40px; font-size: 13px; }
    body[data-page='leagues-list'] .leagues-filters { grid-template-columns: repeat(3, minmax(0,1fr)); }
    body[data-page='leagues-list'] .leagues-filter:nth-child(3) { grid-column: auto; }
    body[data-page='tournaments-list'] .leagues-filters { grid-template-columns: repeat(3, minmax(0,1fr)); }
    body[data-page='tournaments-list'] .leagues-filter:nth-child(5) { grid-column: 2 / span 2; }
    body[data-page='leagues-list'] .leagues-filter label,
    body[data-page='tournaments-list'] .leagues-filter label { font-size: 8px; }
    body[data-page='leagues-list'] .leagues-filter select,
    body[data-page='tournaments-list'] .leagues-filter select { height: 40px; min-height: 40px; max-height: 40px; border-radius: 14px; font-size: 12px; }
    body[data-page='leagues-list'] .leagues-chip,
    body[data-page='tournaments-list'] .leagues-chip { height: 32px; min-height: 32px; padding: 0 13px; font-size: 11px; }

    body[data-page='leagues-list'] .leagues-list,
    body[data-page='tournaments-list'] .leagues-list { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    body[data-page='leagues-list'] .league-row,
    body[data-page='tournaments-list'] .league-row { grid-template-columns: 58px minmax(0,1fr); min-height: 106px; padding: 16px 44px 16px 16px; border-radius: 22px; gap: 14px; }
    body[data-page='leagues-list'] .league-row__visual,
    body[data-page='tournaments-list'] .league-row__visual { width: 56px; height: 56px; }
    body[data-page='leagues-list'] .league-row__visual span,
    body[data-page='tournaments-list'] .league-row__visual span { font-size: 15px; }
    body[data-page='leagues-list'] .league-row__favorite,
    body[data-page='tournaments-list'] .league-row__favorite { right: 13px; top: 13px; width: 28px; height: 28px; }
    body[data-page='leagues-list'] .league-row__main,
    body[data-page='tournaments-list'] .league-row__main { grid-template-columns: minmax(0,1fr) 34px; gap: 12px; }
    body[data-page='leagues-list'] .league-row__title,
    body[data-page='tournaments-list'] .league-row__title { font-size: 18px; line-height: 1.13; margin-bottom: 6px; }
    body[data-page='leagues-list'] .league-row__meta,
    body[data-page='tournaments-list'] .league-row__meta { font-size: 12px; gap: 6px; }
    body[data-page='tournaments-list'] .league-row__submeta { font-size: 11px; }
    body[data-page='leagues-list'] .league-tag,
    body[data-page='tournaments-list'] .league-tag { min-height: 22px; padding: 0 8px; font-size: 9px; }
    body[data-page='leagues-list'] .league-row__arrow,
    body[data-page='tournaments-list'] .league-row__arrow { width: 34px; height: 34px; min-width: 34px; font-size: 16px; }
    body[data-page='leagues-list'] .leagues-trust-strip,
    body[data-page='tournaments-list'] .leagues-trust-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
}

/* ===================== DESKTOP ===================== */
@media (min-width: 1024px) {
    body[data-page='leagues-list'] .leagues-page,
    body[data-page='tournaments-list'] .leagues-page { padding: 24px 0 72px; }
    body[data-page='leagues-list'] .leagues-shell,
    body[data-page='tournaments-list'] .leagues-shell { width: min(1120px, calc(100% - 56px)); max-width: 1120px; }

    body[data-page='leagues-list'] .leagues-hero,
    body[data-page='tournaments-list'] .leagues-hero { min-height: 236px; padding: 34px 36px; border-radius: 32px; margin-bottom: 0; }
    body[data-page='leagues-list'] .leagues-hero__content,
    body[data-page='tournaments-list'] .leagues-hero__content { grid-template-columns: minmax(0,1fr) 360px 260px; align-items: center; gap: 28px; }
    body[data-page='leagues-list'] .leagues-hero__text,
    body[data-page='tournaments-list'] .leagues-hero__text { padding-right: 0; }
    body[data-page='leagues-list'] .leagues-hero h1,
    body[data-page='tournaments-list'] .leagues-hero h1 { font-size: clamp(54px, 4.4vw, 70px); }
    body[data-page='leagues-list'] .leagues-hero p,
    body[data-page='tournaments-list'] .leagues-hero p { max-width: 520px; font-size: 15.5px; line-height: 1.5; }
    body[data-page='leagues-list'] .leagues-hero__stats,
    body[data-page='tournaments-list'] .leagues-hero__stats { grid-template-columns: repeat(3,minmax(0,1fr)); grid-column: 2; align-self: center; }
    body[data-page='leagues-list'] .leagues-hero-stat,
    body[data-page='tournaments-list'] .leagues-hero-stat { height: 92px; min-height: 92px; grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 16px; border-radius: 20px; }
    body[data-page='leagues-list'] .leagues-hero-stat::before,
    body[data-page='tournaments-list'] .leagues-hero-stat::before { grid-column: 1; grid-row: 1; width: 26px; height: 26px; margin-bottom: 8px; font-size: 14px; }
    body[data-page='leagues-list'] .leagues-hero-stat span,
    body[data-page='tournaments-list'] .leagues-hero-stat span { grid-column: 1; grid-row: 2; font-size: 9px; margin-bottom: 4px; }
    body[data-page='leagues-list'] .leagues-hero-stat strong,
    body[data-page='tournaments-list'] .leagues-hero-stat strong { grid-column: 1; grid-row: 3; font-size: 31px; }
    body[data-page='leagues-list'] .leagues-hero__visual,
    body[data-page='tournaments-list'] .leagues-hero__visual { position: relative; grid-column: 3; top: auto; right: auto; width: 260px; height: 160px; opacity: .96; }
    body[data-page='leagues-list'] .leagues-orbit::before,
    body[data-page='tournaments-list'] .leagues-orbit::before { top: 62px; height: 46px; border-width: 4px; }
    body[data-page='leagues-list'] .leagues-ball,
    body[data-page='tournaments-list'] .leagues-ball { width: 88px; height: 88px; right: 74px; top: 32px; }

    body[data-page='leagues-list'] .leagues-toolbar,
    body[data-page='tournaments-list'] .leagues-toolbar {
        transform: translateY(-12px);
        margin: 0 auto -4px;
        width: min(100% - 80px, 980px);
        grid-template-columns: minmax(260px,1.15fr) repeat(3,minmax(140px,.8fr)) auto;
        align-items: end;
        gap: 12px;
        padding: 18px;
        border-radius: 24px;
        box-shadow: 0 20px 46px rgba(15,23,42,.10);
    }
    body[data-page='tournaments-list'] .leagues-toolbar { grid-template-columns: minmax(230px,1fr) repeat(5,minmax(110px,.72fr)) auto; width: min(100% - 70px, 1040px); }
    body[data-page='leagues-list'] .leagues-toolbar__head,
    body[data-page='tournaments-list'] .leagues-toolbar__head { grid-column: 1 / -1; }
    body[data-page='leagues-list'] .leagues-search,
    body[data-page='tournaments-list'] .leagues-search { height: 46px; min-height: 46px; border-radius: 16px; }
    body[data-page='leagues-list'] .leagues-search input,
    body[data-page='tournaments-list'] .leagues-search input { height: 44px; font-size: 14px; }
    body[data-page='leagues-list'] .leagues-filters,
    body[data-page='tournaments-list'] .leagues-filters { display: contents; }
    body[data-page='leagues-list'] .leagues-filter:nth-child(3),
    body[data-page='tournaments-list'] .leagues-filter:nth-child(5) { grid-column: auto; }
    body[data-page='leagues-list'] .leagues-filter select,
    body[data-page='tournaments-list'] .leagues-filter select { height: 46px; min-height: 46px; max-height: 46px; border-radius: 16px; font-size: 13px; }
    body[data-page='leagues-list'] .leagues-chips,
    body[data-page='tournaments-list'] .leagues-chips { grid-column: 1 / -1; flex-wrap: wrap; overflow: visible; gap: 8px; }
    body[data-page='leagues-list'] .leagues-chip,
    body[data-page='tournaments-list'] .leagues-chip { height: 34px; min-height: 34px; padding: 0 14px; font-size: 11.5px; }

    body[data-page='leagues-list'] .leagues-list-head,
    body[data-page='tournaments-list'] .leagues-list-head { padding: 14px 16px; border-radius: 20px; }
    body[data-page='leagues-list'] .leagues-list-head__title,
    body[data-page='tournaments-list'] .leagues-list-head__title { font-size: 21px; }
    body[data-page='leagues-list'] .leagues-view-toggle,
    body[data-page='tournaments-list'] .leagues-view-toggle { display: inline-flex; }

    body[data-page='leagues-list'] .leagues-list,
    body[data-page='tournaments-list'] .leagues-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
    body[data-page='leagues-list'] .league-row,
    body[data-page='tournaments-list'] .league-row { grid-template-columns: 66px minmax(0,1fr); min-height: 128px; padding: 20px 48px 20px 20px; border-radius: 24px; gap: 16px; }
    body[data-page='leagues-list'] .league-row__visual,
    body[data-page='tournaments-list'] .league-row__visual { width: 64px; height: 64px; }
    body[data-page='leagues-list'] .league-row__visual span,
    body[data-page='tournaments-list'] .league-row__visual span { font-size: 17px; }
    body[data-page='leagues-list'] .league-row__main,
    body[data-page='tournaments-list'] .league-row__main { grid-template-columns: minmax(0,1fr) 36px; gap: 14px; }
    body[data-page='leagues-list'] .league-row__title,
    body[data-page='tournaments-list'] .league-row__title { font-size: 20px; line-height: 1.15; margin-bottom: 7px; letter-spacing: -0.035em; }
    body[data-page='leagues-list'] .league-row__meta,
    body[data-page='tournaments-list'] .league-row__meta { font-size: 13px; line-height: 1.28; gap: 7px; }
    body[data-page='tournaments-list'] .league-row__submeta { font-size: 12px; line-height: 1.32; }
    body[data-page='leagues-list'] .league-row__arrow,
    body[data-page='tournaments-list'] .league-row__arrow { width: 36px; height: 36px; min-width: 36px; font-size: 17px; }
    body[data-page='leagues-list'] .leagues-trust-strip,
    body[data-page='tournaments-list'] .leagues-trust-strip { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (min-width: 1280px) {
    body[data-page='leagues-list'] .leagues-shell,
    body[data-page='tournaments-list'] .leagues-shell { width: min(1160px, calc(100% - 64px)); max-width: 1160px; }
}

/* =========================================================
   CARD TITLE SIZE FIX — Ligi + Turnieje
   Mniejsze nazwy w kartach, żeby długie tytuły mieściły się lepiej.
   ========================================================= */

body[data-page='leagues-list'] .league-row__title,
body[data-page='tournaments-list'] .league-row__title {
    font-size: 13.5px !important;
    line-height: 1.14 !important;
    letter-spacing: -0.018em !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

body[data-page='tournaments-list'] .league-row__headline .league-row__title {
    flex-basis: 100% !important;
    min-width: 0 !important;
}

@media (min-width: 700px) {
    body[data-page='leagues-list'] .league-row__title,
    body[data-page='tournaments-list'] .league-row__title {
        font-size: 16px !important;
        line-height: 1.12 !important;
        letter-spacing: -0.022em !important;
    }
}

@media (min-width: 1024px) {
    body[data-page='leagues-list'] .league-row__title,
    body[data-page='tournaments-list'] .league-row__title {
        font-size: 17px !important;
        line-height: 1.10 !important;
        letter-spacing: -0.024em !important;
    }
}

@media (max-width: 420px) {
    body[data-page='leagues-list'] .league-row__title,
    body[data-page='tournaments-list'] .league-row__title {
        font-size: 12.8px !important;
        line-height: 1.13 !important;
        letter-spacing: -0.012em !important;
    }
}

/* =========================================================
   LEAGUES LIST — CLEAN REFRESH 2026
   Wyłącznie /leagues. Turnieje zachowują dotychczasowy wygląd.
   ========================================================= */
body[data-page='leagues-list'] {
    --leagues-bg: #f4f7fb;
    --leagues-card: #ffffff;
    --leagues-ink: #0b1730;
    --leagues-text: #334155;
    --leagues-muted: #718096;
    --leagues-line: #e2e8f0;
    --leagues-line-strong: #d5dfec;
    --leagues-primary: #1769e0;
    --leagues-primary-dark: #0e4fae;
    --leagues-primary-soft: #edf5ff;
    --leagues-green: #16a34a;
    --leagues-shadow: 0 14px 38px rgba(15, 23, 42, .07);
    --leagues-shadow-soft: 0 8px 24px rgba(15, 23, 42, .05);
    background: var(--leagues-bg) !important;
}

body[data-page='leagues-list'] .leagues-page {
    min-height: calc(100vh - var(--tfp-header-fixed-height, 64px));
    padding: 24px 0 52px !important;
    overflow-x: clip;
    background:
        radial-gradient(circle at 8% 0%, rgba(23, 105, 224, .055), transparent 25rem),
        linear-gradient(180deg, #fbfcfe 0%, var(--leagues-bg) 38%, #f8fafc 100%) !important;
}

body[data-page='leagues-list'] .leagues-shell {
    width: min(1120px, calc(100% - 40px)) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

body[data-page='leagues-list'] .leagues-section {
    display: grid !important;
    gap: 18px !important;
}

/* Zamiast dużego banera: lekki nagłówek strony */
body[data-page='leagues-list'] .leagues-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 0 0 20px;
    padding: 4px 2px 18px;
    border-bottom: 1px solid var(--leagues-line);
}

body[data-page='leagues-list'] .leagues-page-head__copy {
    min-width: 0;
}

body[data-page='leagues-list'] .leagues-page-head__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--leagues-primary);
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

body[data-page='leagues-list'] .leagues-page-head h1 {
    margin: 0;
    color: var(--leagues-ink);
    font-family: var(--tfp-font-sans, Inter, system-ui, sans-serif);
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.05em;
}

body[data-page='leagues-list'] .leagues-page-head p {
    max-width: 610px;
    margin: 9px 0 0;
    color: var(--leagues-muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

body[data-page='leagues-list'] .leagues-page-head__aside {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

body[data-page='leagues-list'] .leagues-page-head__stats {
    display: flex;
    align-items: stretch;
    gap: 7px;
}

body[data-page='leagues-list'] .leagues-page-stat {
    display: grid;
    align-content: center;
    min-width: 82px;
    min-height: 52px;
    padding: 8px 12px;
    border: 1px solid var(--leagues-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}

body[data-page='leagues-list'] .leagues-page-stat span {
    color: var(--leagues-muted);
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body[data-page='leagues-list'] .leagues-page-stat strong {
    margin-top: 5px;
    color: var(--leagues-ink);
    font-size: 20px;
    line-height: 1;
    font-weight: 950;
}

body[data-page='leagues-list'] .leagues-page-stat--favorite strong {
    color: #d97706;
}

body[data-page='leagues-list'] .leagues-page-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--leagues-primary-dark), var(--leagues-primary));
    box-shadow: 0 10px 24px rgba(23, 105, 224, .22);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

body[data-page='leagues-list'] .leagues-page-create span {
    font-size: 18px;
    line-height: 1;
}

body[data-page='leagues-list'] .leagues-page-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(23, 105, 224, .28);
}

/* Filtry */
body[data-page='leagues-list'] .leagues-toolbar {
    display: grid !important;
    grid-template-columns: minmax(260px, 1.45fr) repeat(3, minmax(150px, .8fr)) !important;
    align-items: end !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 18px !important;
    transform: none !important;
    border: 1px solid var(--leagues-line) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: var(--leagues-shadow-soft) !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head h2 {
    margin: 0 !important;
    color: var(--leagues-ink) !important;
    font-size: 21px !important;
    line-height: 1.05 !important;
    font-weight: 950 !important;
    letter-spacing: -.035em !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head p {
    display: block !important;
    margin: 4px 0 0 !important;
    color: var(--leagues-muted) !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    font-weight: 650 !important;
}

body[data-page='leagues-list'] .leagues-clear-btn {
    min-height: 34px !important;
    padding: 0 13px !important;
    border: 1px solid var(--leagues-line) !important;
    border-radius: 10px !important;
    color: var(--leagues-text) !important;
    background: #fff !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

body[data-page='leagues-list'] .leagues-clear-btn:hover {
    border-color: #b8cff2 !important;
    color: var(--leagues-primary) !important;
    background: var(--leagues-primary-soft) !important;
}

body[data-page='leagues-list'] .leagues-search {
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 13px !important;
    border: 1px solid var(--leagues-line-strong) !important;
    border-radius: 13px !important;
    background: #fff !important;
}

body[data-page='leagues-list'] .leagues-search__icon {
    color: var(--leagues-primary) !important;
    font-size: 14px !important;
}

body[data-page='leagues-list'] .leagues-search input {
    height: 44px !important;
    min-height: 44px !important;
    color: var(--leagues-ink) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
}

body[data-page='leagues-list'] .leagues-filters {
    display: contents !important;
}

body[data-page='leagues-list'] .leagues-filter,
body[data-page='leagues-list'] .leagues-filter:nth-child(3) {
    display: grid !important;
    grid-column: auto !important;
    gap: 6px !important;
}

body[data-page='leagues-list'] .leagues-filter label {
    color: var(--leagues-muted) !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
}

body[data-page='leagues-list'] .leagues-filter select {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 34px 0 12px !important;
    border: 1px solid var(--leagues-line-strong) !important;
    border-radius: 13px !important;
    color: var(--leagues-ink) !important;
    background-color: #fff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

body[data-page='leagues-list'] .leagues-search:focus-within,
body[data-page='leagues-list'] .leagues-filter select:focus {
    border-color: rgba(23, 105, 224, .55) !important;
    box-shadow: 0 0 0 3px rgba(23, 105, 224, .09) !important;
}

body[data-page='leagues-list'] .leagues-chips {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    padding: 1px 0 0 !important;
    overflow: visible !important;
}

body[data-page='leagues-list'] .leagues-chip {
    height: 31px !important;
    min-height: 31px !important;
    padding: 0 12px !important;
    border: 1px solid var(--leagues-line) !important;
    border-radius: 10px !important;
    color: #475569 !important;
    background: #fff !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

body[data-page='leagues-list'] .leagues-chip:hover {
    border-color: #bdd1ee !important;
    color: var(--leagues-primary) !important;
    background: #f8fbff !important;
}

body[data-page='leagues-list'] .leagues-chip.is-active {
    border-color: var(--leagues-primary) !important;
    color: #fff !important;
    background: var(--leagues-primary) !important;
    box-shadow: 0 5px 13px rgba(23, 105, 224, .16) !important;
}

/* Nagłówek listy */
body[data-page='leagues-list'] .leagues-list-head {
    margin: 0 0 10px !important;
    padding: 0 2px 10px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--leagues-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .leagues-list-head__title {
    color: var(--leagues-ink) !important;
    font-size: 21px !important;
    font-weight: 950 !important;
    letter-spacing: -.035em !important;
}

body[data-page='leagues-list'] .leagues-list-head__meta {
    color: var(--leagues-muted) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

body[data-page='leagues-list'] .leagues-view-toggle {
    display: none !important;
}

/* Karty lig */
body[data-page='leagues-list'] .leagues-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 13px !important;
}

body[data-page='leagues-list'] .league-row {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 104px !important;
    padding: 16px 46px 16px 16px !important;
    border: 1px solid var(--leagues-line) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045) !important;
    overflow: hidden !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

body[data-page='leagues-list'] .league-row::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    width: 3px !important;
    background: linear-gradient(180deg, var(--leagues-primary), #38bdf8) !important;
}

body[data-page='leagues-list'] .league-row:hover {
    transform: translateY(-2px) !important;
    border-color: #bdd1ee !important;
    box-shadow: var(--leagues-shadow) !important;
}

body[data-page='leagues-list'] .league-row.is-favorite {
    border-color: #f5d18b !important;
    background: linear-gradient(135deg, #fffdf7, #fff) !important;
}

body[data-page='leagues-list'] .league-row__favorite {
    right: 11px !important;
    top: 10px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    color: #94a3b8 !important;
    background: transparent !important;
    font-size: 18px !important;
    transition: color .16s ease, background .16s ease, border-color .16s ease !important;
}

body[data-page='leagues-list'] .league-row__favorite:hover {
    border-color: #f2dfb6 !important;
    color: #d97706 !important;
    background: #fff8e8 !important;
}

body[data-page='leagues-list'] .league-row__favorite.is-active {
    color: #d97706 !important;
}

body[data-page='leagues-list'] .league-row__visual {
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
    color: #fff !important;
    background:
        radial-gradient(circle at 24% 18%, rgba(255,255,255,.42), transparent 28%),
        linear-gradient(135deg, #1769e0, #38bdf8) !important;
    box-shadow: 0 9px 18px rgba(23, 105, 224, .17) !important;
}

body[data-page='leagues-list'] .league-row:nth-child(2n) .league-row__visual {
    background:
        radial-gradient(circle at 24% 18%, rgba(255,255,255,.42), transparent 28%),
        linear-gradient(135deg, #16a34a, #65c94b) !important;
}

body[data-page='leagues-list'] .league-row:nth-child(3n) .league-row__visual {
    background:
        radial-gradient(circle at 24% 18%, rgba(255,255,255,.42), transparent 28%),
        linear-gradient(135deg, #7c3aed, #3b82f6) !important;
}

body[data-page='leagues-list'] .league-row__visual span {
    font-size: 14px !important;
    font-weight: 950 !important;
}

body[data-page='leagues-list'] .league-row__main {
    grid-template-columns: minmax(0, 1fr) 34px !important;
    gap: 10px !important;
}

body[data-page='leagues-list'] .league-row__title {
    margin: 0 0 6px !important;
    color: var(--leagues-ink) !important;
    font-size: 16px !important;
    line-height: 1.16 !important;
    font-weight: 950 !important;
    letter-spacing: -.025em !important;
}

body[data-page='leagues-list'] .league-row__meta {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    color: var(--leagues-muted) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    font-weight: 750 !important;
}

body[data-page='leagues-list'] .league-row__dot {
    color: #c3cedc !important;
}

body[data-page='leagues-list'] .league-row__side {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

body[data-page='leagues-list'] .league-row__side .league-tag {
    display: none !important;
}

body[data-page='leagues-list'] .league-row__arrow {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border: 1px solid #dce7f5 !important;
    border-radius: 10px !important;
    color: var(--leagues-primary) !important;
    background: #f8fbff !important;
    font-size: 15px !important;
    transition: transform .18s ease, color .18s ease, background .18s ease !important;
}

body[data-page='leagues-list'] .league-row:hover .league-row__arrow {
    transform: translateX(2px) !important;
    color: #fff !important;
    background: var(--leagues-primary) !important;
}

/* Pusty stan, komunikat i dolny pasek */
body[data-page='leagues-list'] .leagues-alert,
body[data-page='leagues-list'] .leagues-empty,
body[data-page='leagues-list'] .leagues-empty-search {
    border: 1px solid var(--leagues-line) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: var(--leagues-shadow-soft) !important;
}

body[data-page='leagues-list'] .leagues-trust-strip {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 2px !important;
    padding: 12px 14px !important;
    border: 1px solid var(--leagues-line) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .8) !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .leagues-trust-strip div {
    gap: 8px !important;
}

body[data-page='leagues-list'] .leagues-trust-strip span {
    width: 28px !important;
    height: 28px !important;
    border-radius: 9px !important;
    background: var(--leagues-primary-soft) !important;
    font-size: 13px !important;
}

body[data-page='leagues-list'] .leagues-trust-strip strong {
    font-size: 10px !important;
}

body[data-page='leagues-list'] .leagues-trust-strip small {
    font-size: 8px !important;
}

@media (max-width: 980px) {
    body[data-page='leagues-list'] .leagues-page-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    body[data-page='leagues-list'] .leagues-page-head__aside {
        width: 100%;
        justify-content: space-between;
    }

    body[data-page='leagues-list'] .leagues-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body[data-page='leagues-list'] .leagues-search,
    body[data-page='leagues-list'] .leagues-toolbar__head,
    body[data-page='leagues-list'] .leagues-chips {
        grid-column: 1 / -1 !important;
    }

    body[data-page='leagues-list'] .leagues-filter:nth-child(3) {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 700px) {
    body[data-page='leagues-list'] .leagues-page {
        padding: 14px 0 34px !important;
    }

    body[data-page='leagues-list'] .leagues-shell {
        width: min(100% - 20px, 560px) !important;
        max-width: 560px !important;
    }

    body[data-page='leagues-list'] .leagues-section {
        gap: 13px !important;
    }

    body[data-page='leagues-list'] .leagues-page-head {
        margin-bottom: 14px;
        padding: 1px 1px 14px;
        gap: 12px;
    }

    body[data-page='leagues-list'] .leagues-page-head__eyebrow {
        margin-bottom: 6px;
        font-size: 9px;
    }

    body[data-page='leagues-list'] .leagues-page-head h1 {
        font-size: 29px;
        line-height: 1.02;
    }

    body[data-page='leagues-list'] .leagues-page-head p {
        margin-top: 7px;
        font-size: 12px;
        line-height: 1.42;
    }

    body[data-page='leagues-list'] .leagues-page-head__aside {
        align-items: stretch;
        gap: 8px;
    }

    body[data-page='leagues-list'] .leagues-page-head__stats {
        flex: 1 1 auto;
        gap: 5px;
    }

    body[data-page='leagues-list'] .leagues-page-stat {
        flex: 1 1 0;
        min-width: 0;
        min-height: 45px;
        padding: 7px 8px;
        border-radius: 11px;
    }

    body[data-page='leagues-list'] .leagues-page-stat span {
        font-size: 7px;
    }

    body[data-page='leagues-list'] .leagues-page-stat strong {
        margin-top: 4px;
        font-size: 17px;
    }

    body[data-page='leagues-list'] .leagues-page-create {
        min-height: 45px;
        padding: 0 12px;
        border-radius: 11px;
        font-size: 11px;
    }

    body[data-page='leagues-list'] .leagues-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
        padding: 13px !important;
        border-radius: 16px !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head {
        gap: 10px !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head h2 {
        font-size: 18px !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head p {
        display: none !important;
    }

    body[data-page='leagues-list'] .leagues-clear-btn {
        min-height: 30px !important;
        padding: 0 10px !important;
        border-radius: 9px !important;
        font-size: 9px !important;
    }

    body[data-page='leagues-list'] .leagues-search {
        height: 42px !important;
        min-height: 42px !important;
        border-radius: 11px !important;
    }

    body[data-page='leagues-list'] .leagues-search input {
        height: 40px !important;
        min-height: 40px !important;
        font-size: 11px !important;
    }

    body[data-page='leagues-list'] .leagues-filter {
        gap: 5px !important;
    }

    body[data-page='leagues-list'] .leagues-filter label {
        font-size: 7px !important;
    }

    body[data-page='leagues-list'] .leagues-filter select {
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        border-radius: 11px !important;
        font-size: 10px !important;
    }

    body[data-page='leagues-list'] .leagues-chips {
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin: 0 -2px !important;
        padding: 1px 2px 2px !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
    }

    body[data-page='leagues-list'] .leagues-chips::-webkit-scrollbar {
        display: none !important;
    }

    body[data-page='leagues-list'] .leagues-chip {
        flex: 0 0 auto !important;
        height: 29px !important;
        min-height: 29px !important;
        padding: 0 10px !important;
        border-radius: 9px !important;
        font-size: 9px !important;
    }

    body[data-page='leagues-list'] .leagues-list-head {
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
    }

    body[data-page='leagues-list'] .leagues-list-head__title {
        font-size: 18px !important;
    }

    body[data-page='leagues-list'] .leagues-list-head__meta {
        font-size: 9px !important;
    }

    body[data-page='leagues-list'] .leagues-list {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    body[data-page='leagues-list'] .league-row {
        grid-template-columns: 46px minmax(0, 1fr) !important;
        gap: 11px !important;
        min-height: 78px !important;
        padding: 11px 39px 11px 11px !important;
        border-radius: 14px !important;
    }

    body[data-page='leagues-list'] .league-row__visual {
        width: 44px !important;
        height: 44px !important;
        border-radius: 13px !important;
    }

    body[data-page='leagues-list'] .league-row__visual span {
        font-size: 11px !important;
    }

    body[data-page='leagues-list'] .league-row__favorite {
        right: 7px !important;
        top: 7px !important;
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 16px !important;
    }

    body[data-page='leagues-list'] .league-row__main {
        grid-template-columns: minmax(0, 1fr) 29px !important;
        gap: 7px !important;
    }

    body[data-page='leagues-list'] .league-row__title {
        margin-bottom: 4px !important;
        font-size: 13px !important;
        line-height: 1.15 !important;
    }

    body[data-page='leagues-list'] .league-row__meta {
        gap: 4px !important;
        font-size: 9px !important;
    }

    body[data-page='leagues-list'] .league-row__arrow {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        border-radius: 9px !important;
        font-size: 13px !important;
    }

    body[data-page='leagues-list'] .leagues-trust-strip {
        display: none !important;
    }
}

@media (max-width: 430px) {
    body[data-page='leagues-list'] .leagues-shell {
        width: calc(100% - 14px) !important;
    }

    body[data-page='leagues-list'] .leagues-page-head__aside {
        flex-direction: column;
    }

    body[data-page='leagues-list'] .leagues-page-create {
        width: 100%;
    }

    body[data-page='leagues-list'] .leagues-page-head__stats {
        width: 100%;
    }
}

/* =========================================================
   LIGI — NAVY REFINEMENT 2026
   Finalny wygląd tylko dla /leagues. Turnieje pozostają bez zmian.
   ========================================================= */
body[data-page='leagues-list'] {
    --league-navy-950: #071a3d;
    --league-navy-900: #0b2b63;
    --league-navy-800: #123f85;
    --league-blue-600: #1479e8;
    --league-blue-500: #1da1f2;
    --league-ice: #eff6ff;
    --league-card: rgba(255, 255, 255, .96);
    --league-border: #d8e5f5;
    --league-border-strong: #bfd4ed;
    --league-muted: #61728e;
    --league-shadow: 0 18px 50px rgba(7, 26, 61, .085);
    --league-shadow-soft: 0 10px 28px rgba(7, 26, 61, .055);
}

body[data-page='leagues-list'] .leagues-page {
    padding-top: 22px !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(20, 121, 232, .09), transparent 24rem),
        radial-gradient(circle at 95% 16%, rgba(29, 161, 242, .06), transparent 22rem),
        linear-gradient(180deg, #f8fbff 0%, #f2f7fd 46%, #f8fbff 100%) !important;
}

body[data-page='leagues-list'] .leagues-shell {
    width: min(1160px, calc(100% - 40px)) !important;
    max-width: 1160px !important;
}

/* Kompaktowy nagłówek: granat jako akcent, nie wielki baner */
body[data-page='leagues-list'] .leagues-page-head {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-items: center !important;
    margin: 0 0 18px !important;
    padding: 24px 26px !important;
    border: 1px solid var(--league-border) !important;
    border-radius: 22px !important;
    background:
        linear-gradient(100deg, rgba(255,255,255,.98) 0%, rgba(247,251,255,.97) 72%, rgba(230,242,255,.92) 100%) !important;
    box-shadow: var(--league-shadow-soft) !important;
}

body[data-page='leagues-list'] .leagues-page-head::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--league-navy-900), var(--league-blue-500));
}

body[data-page='leagues-list'] .leagues-page-head::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 190px;
    height: 190px;
    right: -82px;
    top: -108px;
    border: 24px solid rgba(20, 121, 232, .055);
    border-radius: 50%;
}

body[data-page='leagues-list'] .leagues-page-head__eyebrow {
    display: inline-flex !important;
    align-items: center;
    min-height: 24px;
    margin: 0 0 8px !important;
    padding: 0 10px;
    border: 1px solid #c8dcf4;
    border-radius: 999px;
    color: var(--league-navy-800) !important;
    background: #edf5ff;
    font-size: 9px !important;
    letter-spacing: .105em !important;
}

body[data-page='leagues-list'] .leagues-page-head h1 {
    color: var(--league-navy-950) !important;
    font-size: clamp(34px, 4vw, 48px) !important;
    letter-spacing: -.055em !important;
}

body[data-page='leagues-list'] .leagues-page-head p {
    max-width: 670px !important;
    color: var(--league-muted) !important;
    font-size: 13px !important;
}

body[data-page='leagues-list'] .leagues-page-head__actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex: 0 0 auto;
}

body[data-page='leagues-list'] .leagues-page-browse,
body[data-page='leagues-list'] .leagues-page-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

body[data-page='leagues-list'] .leagues-page-browse {
    border: 1px solid #c8d9ee;
    color: var(--league-navy-900);
    background: rgba(255,255,255,.88);
}

body[data-page='leagues-list'] .leagues-page-browse:hover {
    transform: translateY(-1px);
    border-color: #9ebde0;
    background: #fff;
    box-shadow: 0 8px 18px rgba(7, 26, 61, .07);
}

body[data-page='leagues-list'] .leagues-page-create {
    min-height: 44px !important;
    padding: 0 17px !important;
    border-radius: 12px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--league-navy-900), var(--league-blue-600)) !important;
    box-shadow: 0 10px 22px rgba(11, 43, 99, .20) !important;
}

/* Panel filtrów z granatowym, ligowym nagłówkiem */
body[data-page='leagues-list'] .leagues-toolbar {
    overflow: hidden !important;
    padding: 0 18px 18px !important;
    border-color: var(--league-border) !important;
    border-radius: 21px !important;
    background: var(--league-card) !important;
    box-shadow: var(--league-shadow) !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head {
    margin: 0 -18px 2px !important;
    padding: 14px 18px !important;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(100deg, var(--league-navy-950) 0%, var(--league-navy-800) 72%, #155cb0 100%);
}

body[data-page='leagues-list'] .leagues-toolbar__head h2 {
    color: #fff !important;
    font-size: 20px !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head p {
    color: rgba(226, 238, 255, .84) !important;
}

body[data-page='leagues-list'] .leagues-clear-btn {
    border-color: rgba(255,255,255,.24) !important;
    color: #fff !important;
    background: rgba(255,255,255,.10) !important;
}

body[data-page='leagues-list'] .leagues-clear-btn:hover {
    border-color: rgba(255,255,255,.45) !important;
    color: #fff !important;
    background: rgba(255,255,255,.17) !important;
}

body[data-page='leagues-list'] .leagues-search,
body[data-page='leagues-list'] .leagues-filter select {
    border-color: var(--league-border-strong) !important;
    background-color: #fbfdff !important;
}

body[data-page='leagues-list'] .leagues-search:hover,
body[data-page='leagues-list'] .leagues-filter select:hover {
    border-color: #9bbde3 !important;
}

body[data-page='leagues-list'] .leagues-search:focus-within,
body[data-page='leagues-list'] .leagues-filter select:focus {
    border-color: var(--league-blue-600) !important;
    box-shadow: 0 0 0 4px rgba(20,121,232,.10) !important;
}

body[data-page='leagues-list'] .leagues-chip {
    color: #385173 !important;
    border-color: #cfdeef !important;
    background: #f9fbfe !important;
}

body[data-page='leagues-list'] .leagues-chip:hover {
    color: var(--league-navy-800) !important;
    border-color: #9fbee1 !important;
    background: #eff6ff !important;
}

body[data-page='leagues-list'] .leagues-chip.is-active {
    border-color: var(--league-navy-800) !important;
    background: linear-gradient(135deg, var(--league-navy-900), var(--league-blue-600)) !important;
    box-shadow: 0 7px 18px rgba(11,43,99,.17) !important;
}

/* Lista w stylu tabeli ligi */
body[data-page='leagues-list'] .leagues-list-head {
    min-height: 48px;
    margin: 0 0 10px !important;
    padding: 0 15px !important;
    border: 1px solid #cbdcf0 !important;
    border-radius: 15px !important;
    background: linear-gradient(100deg, #f8fbff 0%, #eef6ff 100%) !important;
}

body[data-page='leagues-list'] .leagues-list-head__title {
    color: var(--league-navy-950) !important;
    font-size: 19px !important;
}

body[data-page='leagues-list'] .leagues-list-head__meta {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--league-navy-800) !important;
    background: #e7f2ff;
}

body[data-page='leagues-list'] .leagues-list {
    gap: 12px !important;
}

body[data-page='leagues-list'] .league-row {
    overflow: hidden !important;
    border: 1px solid #cbdcf0 !important;
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 9px 24px rgba(7,26,61,.055) !important;
}

body[data-page='leagues-list'] .league-row::before {
    width: 5px !important;
    background: linear-gradient(180deg, var(--league-navy-900), var(--league-blue-500)) !important;
}

body[data-page='leagues-list'] .league-row:hover {
    transform: translateY(-2px) !important;
    border-color: #8fb6df !important;
    box-shadow: 0 17px 34px rgba(7,26,61,.11) !important;
}

body[data-page='leagues-list'] .league-row.is-favorite {
    border-color: #e3b54d !important;
    box-shadow: 0 14px 30px rgba(146, 95, 0, .10) !important;
}

body[data-page='leagues-list'] .league-row__visual,
body[data-page='leagues-list'] .league-row:nth-child(2n) .league-row__visual,
body[data-page='leagues-list'] .league-row:nth-child(3n) .league-row__visual {
    color: #fff !important;
    background: linear-gradient(145deg, var(--league-navy-800), var(--league-blue-500)) !important;
    box-shadow: 0 8px 18px rgba(11,43,99,.20) !important;
}

body[data-page='leagues-list'] .league-row__title {
    color: var(--league-navy-950) !important;
}

body[data-page='leagues-list'] .league-row__meta {
    color: var(--league-muted) !important;
}

body[data-page='leagues-list'] .league-row__arrow {
    border-color: #c9dcee !important;
    color: var(--league-navy-800) !important;
    background: #edf6ff !important;
}

body[data-page='leagues-list'] .league-row:hover .league-row__arrow {
    background: linear-gradient(135deg, var(--league-navy-900), var(--league-blue-600)) !important;
}

body[data-page='leagues-list'] .league-row__favorite {
    color: #7890af !important;
    border-color: #d5e1ef !important;
    background: #f8fbff !important;
}

body[data-page='leagues-list'] .league-row__favorite.is-active {
    color: #d38a00 !important;
    border-color: #f2cf79 !important;
    background: #fff8df !important;
}

/* Gdy użytkownik jest wylogowany, nie ma pustego miejsca po gwiazdce */
body[data-page='leagues-list'][data-favorites-enabled='0'] .league-row {
    padding-right: 16px !important;
}

body[data-page='leagues-list'] .leagues-trust-strip {
    border-color: #cfdeef !important;
    background: rgba(249,252,255,.92) !important;
}

body[data-page='leagues-list'] .leagues-trust-strip span {
    color: var(--league-navy-800);
    background: #e9f3ff !important;
}

@media (max-width: 980px) {
    body[data-page='leagues-list'] .leagues-page-head {
        align-items: center !important;
        flex-direction: row !important;
    }
}

@media (max-width: 700px) {
    body[data-page='leagues-list'] .leagues-page {
        padding-top: 10px !important;
    }

    body[data-page='leagues-list'] .leagues-shell {
        width: calc(100% - 16px) !important;
    }

    body[data-page='leagues-list'] .leagues-page-head {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
        padding: 17px 17px 16px 20px !important;
        border-radius: 17px !important;
    }

    body[data-page='leagues-list'] .leagues-page-head::before {
        width: 5px;
    }

    body[data-page='leagues-list'] .leagues-page-head__eyebrow {
        min-height: 21px;
        margin-bottom: 6px !important;
        padding: 0 8px;
        font-size: 7px !important;
    }

    body[data-page='leagues-list'] .leagues-page-head h1 {
        font-size: 29px !important;
    }

    body[data-page='leagues-list'] .leagues-page-head p {
        margin-top: 6px !important;
        font-size: 11px !important;
        line-height: 1.38 !important;
    }

    body[data-page='leagues-list'] .leagues-page-head__actions {
        width: 100%;
        justify-content: flex-start;
    }

    body[data-page='leagues-list'] .leagues-page-browse,
    body[data-page='leagues-list'] .leagues-page-create {
        min-height: 38px !important;
        padding: 0 12px !important;
        border-radius: 10px !important;
        font-size: 9px !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar {
        padding: 0 12px 13px !important;
        border-radius: 17px !important;
        gap: 8px !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head {
        margin: 0 -12px 1px !important;
        padding: 12px !important;
        border-radius: 16px 16px 0 0;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head h2 {
        font-size: 17px !important;
    }

    body[data-page='leagues-list'] .leagues-search {
        grid-column: 1 / -1 !important;
    }

    body[data-page='leagues-list'] .leagues-filter:nth-child(3) {
        grid-column: 1 / -1 !important;
    }

    body[data-page='leagues-list'] .leagues-list-head {
        min-height: 42px;
        padding: 0 11px !important;
        border-radius: 13px !important;
    }

    body[data-page='leagues-list'] .leagues-list-head__title {
        font-size: 17px !important;
    }

    body[data-page='leagues-list'] .leagues-list-head__meta {
        min-height: 21px;
        padding: 0 7px;
        font-size: 8px !important;
    }

    body[data-page='leagues-list'][data-favorites-enabled='0'] .league-row {
        padding-right: 11px !important;
    }
}

@media (max-width: 430px) {
    body[data-page='leagues-list'] .leagues-page-head__actions {
        flex-direction: row !important;
    }

    body[data-page='leagues-list'] .leagues-page-browse,
    body[data-page='leagues-list'] .leagues-page-create {
        width: auto !important;
        flex: 1 1 auto;
    }
}

/* =========================================================
   TFP 2026 — PLAYER ZONE / LEAGUES
   Professional minimal, wide desktop, mobile-first polish.
   Visual-only override. No application logic is changed.
   ========================================================= */
body[data-page='leagues-list'] {
    --pz-bg: #f6f8fc;
    --pz-surface: rgba(255, 255, 255, .94);
    --pz-surface-solid: #ffffff;
    --pz-ink: #0b1830;
    --pz-text: #263750;
    --pz-muted: #6a7890;
    --pz-line: #dfe6f0;
    --pz-line-strong: #ccd8e7;
    --pz-blue: #1769df;
    --pz-blue-dark: #0d3978;
    --pz-cyan: #20a9d8;
    --pz-soft-blue: #eef5ff;
    --pz-shadow: 0 18px 46px rgba(16, 36, 68, .075);
    --pz-shadow-soft: 0 8px 24px rgba(16, 36, 68, .055);
    background: linear-gradient(180deg, #fafcff 0%, #f5f8fc 46%, #f8fafc 100%) !important;
    color: var(--pz-text) !important;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    letter-spacing: .004em !important;
}

body[data-page='leagues-list'] .leagues-page {
    min-height: 100vh !important;
    padding: 22px 0 64px !important;
    background:
        radial-gradient(circle at 8% -5%, rgba(23, 105, 223, .075), transparent 25rem),
        radial-gradient(circle at 94% 2%, rgba(32, 169, 216, .065), transparent 24rem),
        transparent !important;
}

body[data-page='leagues-list'] .leagues-shell {
    width: min(1480px, calc(100% - 48px)) !important;
    max-width: 1480px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

body[data-page='leagues-list'] .leagues-section {
    gap: 16px !important;
}

/* Unified low hero */
body[data-page='leagues-list'] .leagues-page-head {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 28px !important;
    min-height: 112px !important;
    margin: 0 0 16px !important;
    padding: 22px 26px !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 22px !important;
    color: #fff !important;
    background:
        radial-gradient(circle at 90% -20%, rgba(47, 196, 232, .26), transparent 18rem),
        linear-gradient(135deg, #0b2349 0%, #123d77 62%, #0e789f 100%) !important;
    box-shadow: 0 18px 42px rgba(15, 44, 88, .14) !important;
}

body[data-page='leagues-list'] .leagues-page-head::before {
    content: "" !important;
    position: absolute !important;
    width: 240px !important;
    height: 240px !important;
    right: -110px !important;
    top: -145px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 36px rgba(255,255,255,.035) !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

body[data-page='leagues-list'] .leagues-page-head__copy {
    min-width: 0 !important;
}

body[data-page='leagues-list'] .leagues-page-head__eyebrow {
    display: block !important;
    margin: 0 0 7px !important;
    color: #bfe9ff !important;
    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    letter-spacing: .13em !important;
    text-transform: uppercase !important;
}

body[data-page='leagues-list'] .leagues-page-head h1 {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(31px, 2.7vw, 40px) !important;
    line-height: 1.02 !important;
    font-weight: 700 !important;
    letter-spacing: -.025em !important;
}

body[data-page='leagues-list'] .leagues-page-head p {
    max-width: 620px !important;
    margin: 7px 0 0 !important;
    color: rgba(234, 243, 255, .82) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    letter-spacing: .006em !important;
}

body[data-page='leagues-list'] .leagues-page-head__actions,
body[data-page='leagues-list'] .leagues-page-head__aside {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 9px !important;
    flex: 0 0 auto !important;
}

body[data-page='leagues-list'] .leagues-page-browse,
body[data-page='leagues-list'] .leagues-page-create {
    min-height: 42px !important;
    padding: 0 15px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    letter-spacing: .01em !important;
    text-decoration: none !important;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}

body[data-page='leagues-list'] .leagues-page-browse {
    color: #f5fbff !important;
    border: 1px solid rgba(255,255,255,.25) !important;
    background: rgba(255,255,255,.09) !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .leagues-page-create {
    color: #0f3b73 !important;
    border: 1px solid rgba(255,255,255,.65) !important;
    background: #fff !important;
    box-shadow: 0 9px 22px rgba(3, 20, 46, .15) !important;
}

body[data-page='leagues-list'] .leagues-page-browse:hover,
body[data-page='leagues-list'] .leagues-page-create:hover {
    transform: translateY(-1px) !important;
}

/* Search / filters */
body[data-page='leagues-list'] .leagues-toolbar {
    display: grid !important;
    grid-template-columns: minmax(310px, 1.5fr) repeat(3, minmax(160px, .75fr)) !important;
    align-items: end !important;
    gap: 11px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px !important;
    border: 1px solid var(--pz-line) !important;
    border-radius: 18px !important;
    background: var(--pz-surface) !important;
    box-shadow: var(--pz-shadow-soft) !important;
    backdrop-filter: blur(14px) !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding-bottom: 2px !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head h2 {
    margin: 0 !important;
    color: var(--pz-ink) !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    letter-spacing: -.018em !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head p {
    display: block !important;
    margin: 3px 0 0 !important;
    color: var(--pz-muted) !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
}

body[data-page='leagues-list'] .leagues-clear-btn,
body[data-page='leagues-list'] .leagues-chip {
    font-weight: 600 !important;
    letter-spacing: .01em !important;
}

body[data-page='leagues-list'] .leagues-clear-btn {
    min-height: 32px !important;
    padding: 0 12px !important;
    border: 1px solid var(--pz-line) !important;
    border-radius: 10px !important;
    color: #42536b !important;
    background: #fff !important;
    font-size: 10.5px !important;
}

body[data-page='leagues-list'] .leagues-search,
body[data-page='leagues-list'] .leagues-filter select {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border: 1px solid var(--pz-line-strong) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .leagues-search {
    padding: 0 13px !important;
}

body[data-page='leagues-list'] .leagues-search input,
body[data-page='leagues-list'] .leagues-filter select {
    color: var(--pz-ink) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: .006em !important;
}

body[data-page='leagues-list'] .leagues-filter label {
    color: #75839a !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    letter-spacing: .10em !important;
    text-transform: uppercase !important;
}

body[data-page='leagues-list'] .leagues-chips {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 1px 0 0 !important;
}

body[data-page='leagues-list'] .leagues-chip {
    height: 29px !important;
    min-height: 29px !important;
    padding: 0 11px !important;
    border: 1px solid var(--pz-line) !important;
    border-radius: 9px !important;
    color: #536177 !important;
    background: #fff !important;
    font-size: 9.5px !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .leagues-chip.is-active {
    color: #fff !important;
    border-color: var(--pz-blue) !important;
    background: var(--pz-blue) !important;
    box-shadow: 0 5px 12px rgba(23,105,223,.14) !important;
}

/* Results */
body[data-page='leagues-list'] .leagues-list-head {
    margin: 0 0 8px !important;
    padding: 0 1px 9px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--pz-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .leagues-list-head__title {
    color: var(--pz-ink) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: -.014em !important;
}

body[data-page='leagues-list'] .leagues-list-head__meta {
    color: var(--pz-muted) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
}

body[data-page='leagues-list'] .leagues-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body[data-page='leagues-list'] .league-row {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 88px !important;
    padding: 13px 42px 13px 13px !important;
    overflow: hidden !important;
    border: 1px solid var(--pz-line) !important;
    border-radius: 17px !important;
    background: #fff !important;
    box-shadow: 0 7px 20px rgba(17, 39, 75, .045) !important;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}

body[data-page='leagues-list'] .league-row::before {
    width: 2px !important;
    background: linear-gradient(180deg, var(--pz-blue), var(--pz-cyan)) !important;
}

body[data-page='leagues-list'] .league-row:hover {
    transform: translateY(-1px) !important;
    border-color: #bfd0e6 !important;
    box-shadow: 0 12px 28px rgba(17, 39, 75, .075) !important;
}

body[data-page='leagues-list'] .league-row__visual {
    width: 50px !important;
    height: 50px !important;
    border-radius: 14px !important;
    box-shadow: 0 7px 16px rgba(23,105,223,.13) !important;
}

body[data-page='leagues-list'] .league-row__visual span {
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .03em !important;
}

body[data-page='leagues-list'] .league-row__title {
    margin: 0 0 5px !important;
    color: var(--pz-ink) !important;
    font-size: 14px !important;
    line-height: 1.24 !important;
    font-weight: 650 !important;
    letter-spacing: -.006em !important;
}

body[data-page='leagues-list'] .league-row__meta {
    gap: 5px !important;
    color: var(--pz-muted) !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    letter-spacing: .005em !important;
}

body[data-page='leagues-list'] .league-row__arrow {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border: 1px solid var(--pz-line) !important;
    border-radius: 9px !important;
    color: var(--pz-blue) !important;
    background: #f7faff !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .league-row__favorite {
    top: 9px !important;
    right: 9px !important;
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    border-radius: 8px !important;
    font-size: 17px !important;
}

body[data-page='leagues-list'] .leagues-trust-strip {
    margin-top: 2px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--pz-line) !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,.72) !important;
    box-shadow: none !important;
}

body[data-page='leagues-list'] .leagues-trust-strip strong {
    color: var(--pz-ink) !important;
    font-size: 9.5px !important;
    font-weight: 650 !important;
}
body[data-page='leagues-list'] .leagues-trust-strip small {
    color: var(--pz-muted) !important;
    font-size: 8px !important;
    font-weight: 500 !important;
}

@media (max-width: 1180px) {
    body[data-page='leagues-list'] .leagues-shell { width: min(1120px, calc(100% - 36px)) !important; }
    body[data-page='leagues-list'] .leagues-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    body[data-page='leagues-list'] .leagues-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    body[data-page='leagues-list'] .leagues-search,
    body[data-page='leagues-list'] .leagues-toolbar__head,
    body[data-page='leagues-list'] .leagues-chips { grid-column: 1 / -1 !important; }
}

@media (max-width: 720px) {
    body[data-page='leagues-list'] .leagues-page { padding: 12px 0 38px !important; }
    body[data-page='leagues-list'] .leagues-shell { width: calc(100% - 20px) !important; max-width: none !important; }
    body[data-page='leagues-list'] .leagues-page-head {
        min-height: 0 !important;
        padding: 17px !important;
        margin-bottom: 12px !important;
        border-radius: 18px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
    }
    body[data-page='leagues-list'] .leagues-page-head h1 { font-size: 28px !important; letter-spacing: -.018em !important; }
    body[data-page='leagues-list'] .leagues-page-head__eyebrow { font-size: 8.5px !important; }
    body[data-page='leagues-list'] .leagues-page-head__actions,
    body[data-page='leagues-list'] .leagues-page-head__aside { width: 100% !important; justify-content: stretch !important; }
    body[data-page='leagues-list'] .leagues-page-browse,
    body[data-page='leagues-list'] .leagues-page-create { flex: 1 1 0 !important; min-height: 40px !important; }
    body[data-page='leagues-list'] .leagues-toolbar {
        grid-template-columns: 1fr !important;
        gap: 9px !important;
        padding: 13px !important;
        border-radius: 16px !important;
    }
    body[data-page='leagues-list'] .leagues-search,
    body[data-page='leagues-list'] .leagues-toolbar__head,
    body[data-page='leagues-list'] .leagues-chips,
    body[data-page='leagues-list'] .leagues-filter,
    body[data-page='leagues-list'] .leagues-filter:nth-child(3) { grid-column: 1 / -1 !important; }
    body[data-page='leagues-list'] .leagues-toolbar__head h2 { font-size: 16px !important; }
    body[data-page='leagues-list'] .leagues-list { grid-template-columns: 1fr !important; gap: 9px !important; }
    body[data-page='leagues-list'] .league-row { min-height: 78px !important; padding: 11px 39px 11px 11px !important; grid-template-columns: 44px minmax(0,1fr) !important; gap: 10px !important; border-radius: 15px !important; }
    body[data-page='leagues-list'] .league-row__visual { width: 43px !important; height: 43px !important; border-radius: 12px !important; }
    body[data-page='leagues-list'] .league-row__title { font-size: 13px !important; }
    body[data-page='leagues-list'] .league-row__meta { font-size: 9.5px !important; }
    body[data-page='leagues-list'] .leagues-trust-strip { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 8px !important; }
}

/* =========================================================
   TFP 2026 — mobile polish for leagues filters
   Keeps desktop redesign intact; fixes toolbar contrast and
   places Type / City / Sort in one compact row on phones.
   ========================================================= */

/* The toolbar uses a navy header in the base skin, so keep its copy readable
   after the player-zone typography overrides. */
body[data-page='leagues-list'] .leagues-toolbar__head h2 {
    color: #fff !important;
}

body[data-page='leagues-list'] .leagues-toolbar__head p {
    color: rgba(231, 241, 255, .86) !important;
}

@media (max-width: 720px) {
    body[data-page='leagues-list'] .leagues-toolbar {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px 6px !important;
        padding: 0 10px 10px !important;
        border-radius: 16px !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head {
        grid-column: 1 / -1 !important;
        margin: 0 -10px 2px !important;
        padding: 10px 11px !important;
        gap: 8px !important;
        border-radius: 15px 15px 0 0 !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head h2 {
        color: #fff !important;
        font-size: 14px !important;
        line-height: 1.1 !important;
        font-weight: 700 !important;
        letter-spacing: -.012em !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head p {
        display: block !important;
        margin-top: 2px !important;
        color: rgba(231, 241, 255, .82) !important;
        font-size: 8.5px !important;
        line-height: 1.25 !important;
        font-weight: 500 !important;
        letter-spacing: .006em !important;
    }

    body[data-page='leagues-list'] .leagues-clear-btn {
        min-height: 28px !important;
        padding: 0 9px !important;
        border-color: rgba(255,255,255,.28) !important;
        color: #fff !important;
        background: rgba(255,255,255,.11) !important;
        font-size: 8.5px !important;
    }

    body[data-page='leagues-list'] .leagues-search {
        grid-column: 1 / -1 !important;
        height: 39px !important;
        min-height: 39px !important;
        max-height: 39px !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
    }

    body[data-page='leagues-list'] .leagues-search input {
        height: 37px !important;
        min-height: 37px !important;
        font-size: 10.5px !important;
        font-weight: 500 !important;
        letter-spacing: .004em !important;
    }

    body[data-page='leagues-list'] .leagues-filters {
        display: contents !important;
    }

    body[data-page='leagues-list'] .leagues-filter,
    body[data-page='leagues-list'] .leagues-filter:nth-child(3) {
        grid-column: auto !important;
        min-width: 0 !important;
        gap: 3px !important;
    }

    body[data-page='leagues-list'] .leagues-filter label {
        min-width: 0 !important;
        overflow: hidden !important;
        color: #718096 !important;
        font-size: 6.5px !important;
        line-height: 1.1 !important;
        font-weight: 700 !important;
        letter-spacing: .055em !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    body[data-page='leagues-list'] .leagues-filter select {
        width: 100% !important;
        min-width: 0 !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 0 20px 0 7px !important;
        border-radius: 9px !important;
        font-size: 8.5px !important;
        line-height: 1 !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
    }

    body[data-page='leagues-list'] .leagues-chips {
        grid-column: 1 / -1 !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        overflow-x: auto !important;
        padding: 1px 0 0 !important;
        scrollbar-width: none !important;
    }

    body[data-page='leagues-list'] .leagues-chips::-webkit-scrollbar {
        display: none !important;
    }

    body[data-page='leagues-list'] .leagues-chip {
        flex: 0 0 auto !important;
        height: 26px !important;
        min-height: 26px !important;
        padding: 0 8px !important;
        border-radius: 8px !important;
        font-size: 8px !important;
        font-weight: 600 !important;
    }
}

@media (max-width: 390px) {
    body[data-page='leagues-list'] .leagues-toolbar {
        gap: 6px 5px !important;
        padding-left: 9px !important;
        padding-right: 9px !important;
    }

    body[data-page='leagues-list'] .leagues-toolbar__head {
        margin-left: -9px !important;
        margin-right: -9px !important;
    }

    body[data-page='leagues-list'] .leagues-filter label {
        font-size: 6.1px !important;
        letter-spacing: .035em !important;
    }

    body[data-page='leagues-list'] .leagues-filter select {
        padding-left: 6px !important;
        padding-right: 18px !important;
        font-size: 8px !important;
    }
}

/* =========================================================
   TFP 2026 — league eyebrow identical to tournaments + no row arrow
   ========================================================= */
body[data-page='leagues-list'] .leagues-page-head__copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-width: 0 !important;
}

body[data-page='leagues-list'] .leagues-page-head__eyebrow {
    width: auto !important;
    min-width: 0 !important;
    min-height: 22px !important;
    margin: 0 0 7px !important;
    padding: 0 10px !important;
    border: 1px solid rgba(255,255,255,.15) !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-start !important;
    color: #d7f3ff !important;
    background: rgba(255,255,255,.10) !important;
    box-shadow: none !important;
    font-size: 8px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    letter-spacing: .11em !important;
    text-align: center !important;
    white-space: nowrap !important;
}

body[data-page='leagues-list'] .league-row__arrow {
    display: none !important;
}

body[data-page='leagues-list'] .league-row__main {
    grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width:720px) {
    body[data-page='leagues-list'] .leagues-page-head__eyebrow {
        min-height: 20px !important;
        padding: 0 8px !important;
        margin-bottom: 6px !important;
        font-size: 6.8px !important;
        letter-spacing: .085em !important;
    }
}
