.ballaxy-football-message {
    padding: 12px 14px;
    border: 1px solid var(--border, #e5e7eb);
    background: var(--surface-soft, rgba(0,0,0,.05));
    color: var(--muted, #555);
    border-radius: 8px;
}

.ballaxy-standings-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: var(--bg, #fff);
}

.ballaxy-standings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    color: var(--text, #111);
    font-size: 0.9rem;
}

.ballaxy-standings-table th,
.ballaxy-standings-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    text-align: center;
    white-space: nowrap;
}

.ballaxy-standings-table th {
    color: var(--muted, #555);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--surface-soft, rgba(0,0,0,.04));
}

.ballaxy-standings-table .team {
    text-align: left;
    min-width: 220px;
}

.ballaxy-standings-table .team img {
    display: inline-block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.ballaxy-standings-table .points {
    font-weight: 700;
}

.ballaxy-standings-table tbody tr:last-child td {
    border-bottom: 0;
}

[data-theme="dark"] .ballaxy-standings-wrap {
    background: var(--bg, #0f1115);
}


.ballaxy-teams-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4, 1rem);
}

.ballaxy-team-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--surface-soft, rgba(0,0,0,.05));
}

.ballaxy-team-card-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ballaxy-team-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ballaxy-team-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ballaxy-team-card-title {
    font-weight: 700;
    color: var(--text, #111);
    text-decoration: none;
    line-height: 1.25;
}

.ballaxy-team-card-title:hover {
    color: var(--accent, #237227);
}

.ballaxy-team-card-meta {
    color: var(--muted, #555);
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .ballaxy-teams-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ballaxy-teams-grid {
        grid-template-columns: 1fr;
    }
}


.ballaxy-squad {
    display: flex;
    flex-direction: column;
    gap: var(--space-5, 1.25rem);
}

.ballaxy-squad-group h3 {
    margin: 0 0 var(--space-3, .75rem);
    font-size: 1.15rem;
    color: var(--text, #111);
}

.ballaxy-squad-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3, .75rem);
}

.ballaxy-player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: var(--surface-soft, rgba(0,0,0,.05));
}

.ballaxy-player-number {
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent, #237227);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}

.ballaxy-player-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ballaxy-player-name {
    color: var(--text, #111);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.25;
}

.ballaxy-player-name:hover {
    color: var(--accent, #237227);
}

.ballaxy-player-meta {
    color: var(--muted, #555);
    font-size: .8rem;
}

@media (max-width: 640px) {
    .ballaxy-squad-list {
        grid-template-columns: 1fr;
    }
}


.ballaxy-match-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-5, 1.25rem);
}

.ballaxy-match-day-title {
    margin: 0 0 var(--space-3, .75rem);
    padding-bottom: .45rem;
    border-bottom: 2px solid var(--accent, #237227);
    color: var(--text, #111);
    font-size: 1.15rem;
}

.ballaxy-match-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-2, .5rem);
}

.ballaxy-match-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--bg, #fff);
    overflow: hidden;
}

.ballaxy-match-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: var(--surface-soft, rgba(0,0,0,.05));
    color: var(--muted, #555);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ballaxy-match-card-meta a {
    color: var(--muted, #555);
    text-decoration: none;
}

.ballaxy-match-card-meta a:hover {
    color: var(--accent, #237227);
}

.ballaxy-match-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.ballaxy-match-team {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.ballaxy-match-team.is-away {
    justify-content: flex-end;
    text-align: right;
}

.ballaxy-match-team img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex: 0 0 26px;
}

.ballaxy-match-team a,
.ballaxy-match-team span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text, #111);
    font-weight: 700;
    text-decoration: none;
}

.ballaxy-match-team a:hover {
    color: var(--accent, #237227);
}

.ballaxy-match-score {
    text-align: center;
    font-family: "Encode Sans Condensed", system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text, #111);
}

.ballaxy-match-score a,
.ballaxy-match-score span {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    min-height: 34px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-soft, rgba(0,0,0,.05));
}

.ballaxy-match-score a:hover {
    background: var(--accent, #237227);
    color: #fff;
}

@media (max-width: 640px) {
    .ballaxy-match-card-main {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ballaxy-match-team,
    .ballaxy-match-team.is-away {
        justify-content: center;
        text-align: center;
    }

    .ballaxy-match-team a,
    .ballaxy-match-team span {
        white-space: normal;
    }
}


.ballaxy-ticker {
    position: relative;
    width: 100%;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--bg, #fff);
    overflow: hidden;
}

.ballaxy-ticker-accent {
    height: 4px;
    background: var(--accent, #237227);
}

.ballaxy-ticker-inner {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: stretch;
    gap: 0;
    padding: 8px 4px;
}

.ballaxy-ticker-title {
    grid-column: 1 / -1;
    padding: 0 10px 7px;
    color: var(--text, #111);
    font-family: "Encode Sans Condensed", system-ui, sans-serif;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1.2;
}

.ballaxy-ticker-viewport {
    min-width: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.ballaxy-ticker-viewport::-webkit-scrollbar {
    display: none;
}

.ballaxy-ticker-track {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.ballaxy-ticker-nav {
    width: 28px;
    height: calc(100% - 4px);
    align-self: center;
    border: 0;
    border-radius: 8px;
    background: var(--surface-soft, rgba(0,0,0,.05));
    color: var(--text, #111);
    cursor: pointer;
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 3px;
    padding: 0;
}

.ballaxy-ticker-nav:hover {
    background: var(--accent, #237227);
    color: #fff;
}

.ballaxy-ticker-nav span {
    font-size: 22px;
    line-height: 1;
    transform: translateY(-1px);
}

.ballaxy-ticker-card {
    flex: 0 0 235px;
    min-width: 235px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: var(--surface-soft, rgba(0,0,0,.05));
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ballaxy-ticker-card.is-live {
    border-color: color-mix(in srgb, var(--accent, #237227) 55%, var(--border, #e5e7eb));
}

.ballaxy-ticker-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    color: var(--muted, #555);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.1;
}

.ballaxy-ticker-league {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted, #555);
    text-decoration: none;
}

.ballaxy-ticker-league:hover {
    color: var(--accent, #237227);
}

.ballaxy-ticker-date {
    flex: 0 0 auto;
    color: var(--accent, #237227);
}

.ballaxy-ticker-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.ballaxy-ticker-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ballaxy-ticker-team.is-away {
    justify-content: flex-end;
    text-align: right;
}

.ballaxy-ticker-team img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: 0 0 18px;
}

.ballaxy-ticker-team a,
.ballaxy-ticker-team span {
    color: var(--text, #111);
    font-weight: 800;
    font-size: .8rem;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ballaxy-ticker-team a:hover {
    color: var(--accent, #237227);
}

.ballaxy-ticker-score {
    text-align: center;
    font-family: "Encode Sans Condensed", system-ui, sans-serif;
    font-weight: 900;
    font-size: .95rem;
}

.ballaxy-ticker-score a,
.ballaxy-ticker-score span {
    min-height: 28px;
    min-width: 52px;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    color: var(--text, #111);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ballaxy-ticker-score a:hover {
    background: var(--accent, #237227);
    color: #fff;
    border-color: var(--accent, #237227);
}

[data-theme="dark"] .ballaxy-ticker-score a,
[data-theme="dark"] .ballaxy-ticker-score span {
    background: rgba(255,255,255,.06);
}

@media (max-width: 640px) {
    .ballaxy-ticker-inner {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        padding: 7px 2px;
    }

    .ballaxy-ticker-nav {
        width: 25px;
        margin-inline: 2px;
    }

    .ballaxy-ticker-card {
        flex-basis: 218px;
        min-width: 218px;
    }

    .ballaxy-ticker-match {
        grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    }
}


/* Compact football ticker, based on uploaded ticker styling */
.bilis-fmt {
    --fmt-height: 5.35rem;
    --fmt-arrow-width: 1.15rem;
    --fmt-card-width: 11.75rem;
    --fmt-accent-strip: 4px;
    --fmt-card-gap: 0.25rem;

    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: var(--fmt-height);
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family:
        "Oxygen",
        system-ui,
        -apple-system,
        sans-serif;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
}

.bilis-fmt::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--fmt-accent-strip);
    background: var(--accent);
    z-index: 5;
}

.bilis-fmt-track-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-top: var(--fmt-accent-strip);
}

.bilis-fmt-track {
    display: flex;
    gap: var(--fmt-card-gap);
    height: calc(100% - var(--fmt-accent-strip));
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0.25rem 0;
}

.bilis-fmt-track::-webkit-scrollbar {
    display: none;
}

.bilis-fmt-card {
    flex: 0 0 var(--fmt-card-width);
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr 1fr;
    row-gap: 0.34rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    padding: 0.42rem 0.6rem 0.44rem;
    box-sizing: border-box;
    overflow: hidden;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.bilis-fmt-card:hover {
    background: color-mix(in srgb, var(--accent) 7%, var(--surface-soft));
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.bilis-fmt-card.is-live {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.bilis-fmt-card.is-finished {
    opacity: 0.92;
}

.bilis-fmt-card.is-postponed {
    opacity: 0.75;
}

.bilis-fmt-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    min-height: 0.75rem;
    line-height: 1;
}

.bilis-fmt-league {
    min-width: 0;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bilis-fmt-date {
    color: var(--accent);
    font-family: "Encode Sans Condensed", sans-serif;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.bilis-fmt-team-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.15rem;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.05rem;
    line-height: 1;
}

.bilis-fmt-team {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.4rem;
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
}

.bilis-fmt-team img {
    width: 0.88rem;
    height: 0.88rem;
    object-fit: contain;
    flex: 0 0 0.88rem;
}

.bilis-fmt-team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bilis-fmt-score {
    color: var(--text);
    font-family: "Encode Sans Condensed", sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    min-width: 2.15rem;
    text-align: right;
    white-space: nowrap;
}

.bilis-fmt-card.is-live .bilis-fmt-score,
.bilis-fmt-card.is-live .bilis-fmt-date {
    color: var(--accent);
}

.bilis-fmt-arrow {
    flex: 0 0 var(--fmt-arrow-width);
    width: var(--fmt-arrow-width);
    height: calc(100% - var(--fmt-accent-strip));
    margin-top: var(--fmt-accent-strip);
    border: 0;
    background: var(--bg);
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition:
        background 0.2s ease,
        color 0.2s ease;
    position: relative;
    z-index: 4;
}

.bilis-fmt-arrow:hover {
    background: var(--surface-soft);
    color: var(--accent);
}

.bilis-fmt-message {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: var(--muted);
    font-size: 0.85rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    box-sizing: border-box;
}

/* Dark mode */
[data-theme="dark"] .bilis-fmt-card {
    background: rgb(255 255 255 / 0.06);
    border-color: rgb(255 255 255 / 0.08);
}

[data-theme="dark"] .bilis-fmt-card:hover {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent) 45%, rgb(255 255 255 / 0.08));
}

[data-theme="dark"] .bilis-fmt-arrow {
    background: var(--bg);
    color: var(--muted);
}

[data-theme="dark"] .bilis-fmt-arrow:hover {
    background: rgb(255 255 255 / 0.06);
    color: var(--accent);
}

/* Mobile */
@media (max-width: 768px) {
    .bilis-fmt {
        --fmt-height: 5.15rem;
        --fmt-arrow-width: 1rem;
        --fmt-card-width: 10.25rem;
    }

    .bilis-fmt-card {
        row-gap: 0.32rem;
        padding: 0.4rem 0.5rem 0.42rem;
    }

    .bilis-fmt-league,
    .bilis-fmt-date {
        font-size: 0.56rem;
    }

    .bilis-fmt-team-row {
        grid-template-columns: minmax(0, 1fr) 2rem;
        min-height: 1rem;
    }

    .bilis-fmt-team {
        font-size: 0.68rem;
        gap: 0.34rem;
    }

    .bilis-fmt-team img {
        width: 0.8rem;
        height: 0.8rem;
        flex-basis: 0.8rem;
    }

    .bilis-fmt-score {
        font-size: 0.74rem;
        min-width: 2rem;
    }

    .bilis-fmt-arrow {
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .bilis-fmt {
        --fmt-card-width: 9.75rem;
    }
}

.bilis-fmt-team a,
.bilis-fmt-score a {
    color: inherit;
    text-decoration: none;
}

.bilis-fmt-team a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bilis-fmt-team a:hover,
.bilis-fmt-score a:hover,
.bilis-fmt-league:hover {
    color: var(--accent);
}

.bilis-fmt-score a,
.bilis-fmt-score span {
    display: inline-block;
}


/* Stage 7.2: keep device-local kickoff time compact and unclipped */
.bilis-fmt-team-row {
    grid-template-columns: minmax(0, 1fr) 2.55rem;
}

.bilis-fmt-score {
    min-width: 2.55rem;
    font-size: 0.76rem;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .bilis-fmt-team-row {
        grid-template-columns: minmax(0, 1fr) 2.45rem;
    }

    .bilis-fmt-score {
        min-width: 2.45rem;
        font-size: 0.7rem;
    }
}


/* Stage 7.5: keep chronological order; subtly mark card closest to current time */
.bilis-fmt-card.is-closest-to-now {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}


/* Stage 7.6: draggable ticker track */
.bilis-fmt-track {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.bilis-fmt-track.is-dragging {
    cursor: grabbing;
}

.bilis-fmt-track.is-dragging a {
    pointer-events: none;
}


/* Stage 7.7: mobile starts on next upcoming match */
@media (max-width: 768px) {
    .bilis-fmt-card.is-mobile-focus {
        border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
    }
}


/* Stage 8.1: match, team, and league overview pages */
.ballaxy-match-hero,
.ballaxy-team-profile,
.ballaxy-league-profile {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    background: var(--surface-soft, rgba(0,0,0,.05));
    padding: var(--space-5, 1.25rem);
    margin-bottom: var(--space-5, 1.25rem);
}

.ballaxy-match-hero-meta,
.ballaxy-match-hero-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    color: var(--muted, #555);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ballaxy-match-hero-meta a {
    color: var(--muted, #555);
    text-decoration: none;
}

.ballaxy-match-hero-meta a:hover {
    color: var(--accent, #237227);
}

.ballaxy-match-hero-time {
    margin: 10px 0 16px;
    text-align: center;
    color: var(--muted, #555);
    font-size: .9rem;
}

.ballaxy-match-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-4, 1rem);
}

.ballaxy-match-hero-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ballaxy-match-hero-team img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.ballaxy-match-hero-team a,
.ballaxy-match-hero-team span {
    color: var(--text, #111);
    text-align: center;
    font-family: "Encode Sans Condensed", system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none;
}

.ballaxy-match-hero-team a:hover {
    color: var(--accent, #237227);
}

.ballaxy-match-hero-score {
    text-align: center;
    font-family: "Encode Sans Condensed", system-ui, sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text, #111);
}

.ballaxy-team-profile {
    display: flex;
    gap: var(--space-5, 1.25rem);
    align-items: center;
}

.ballaxy-team-profile-logo {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ballaxy-team-profile-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ballaxy-team-profile-body {
    min-width: 0;
}

.ballaxy-team-profile-body h2,
.ballaxy-league-profile h2 {
    margin: 0 0 var(--space-3, .75rem);
}

.ballaxy-team-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: var(--space-3, .75rem);
}

.ballaxy-team-profile-grid div {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 10px;
    background: var(--bg, #fff);
}

.ballaxy-team-profile-grid strong {
    display: block;
    color: var(--muted, #555);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ballaxy-team-profile-grid span {
    color: var(--text, #111);
    font-weight: 700;
}

.ballaxy-football-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--accent, #237227);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: .9rem;
}

.ballaxy-overview {
    display: flex;
    flex-direction: column;
    gap: var(--space-5, 1.25rem);
}

.ballaxy-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5, 1.25rem);
}

.ballaxy-overview-grid > section,
.ballaxy-overview-section {
    min-width: 0;
}

.ballaxy-overview h3 {
    margin-bottom: var(--space-3, .75rem);
}

.ballaxy-league-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3, .75rem);
}

.ballaxy-league-profile span {
    border-radius: 999px;
    background: var(--accent, #237227);
    color: #fff;
    padding: 6px 10px;
    font-weight: 800;
    font-size: .8rem;
}

@media (max-width: 768px) {
    .ballaxy-match-hero-main {
        grid-template-columns: 1fr;
    }

    .ballaxy-match-hero-score {
        order: -1;
    }

    .ballaxy-team-profile {
        align-items: flex-start;
    }

    .ballaxy-team-profile-grid,
    .ballaxy-overview-grid {
        grid-template-columns: 1fr;
    }

    .ballaxy-match-hero-team img {
        width: 56px;
        height: 56px;
    }
}


/* Stage 8.2: match details, lineups, scorers, cards, substitutions */
.ballaxy-match-deep {
    display: flex;
    flex-direction: column;
    gap: var(--space-5, 1.25rem);
    margin-top: var(--space-5, 1.25rem);
}

.ballaxy-match-deep-section {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    background: var(--bg, #fff);
    padding: var(--space-5, 1.25rem);
}

.ballaxy-match-deep-section h3 {
    margin-bottom: var(--space-4, 1rem);
}

.ballaxy-match-lineups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4, 1rem);
}

.ballaxy-lineup-column,
.ballaxy-match-lineups > div {
    min-width: 0;
}

.ballaxy-lineup-column h4,
.ballaxy-match-lineups h4 {
    margin: 0 0 var(--space-3, .75rem);
    color: var(--muted, #555);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ballaxy-player-list,
.ballaxy-event-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text, #111);
}

.ballaxy-player-list li,
.ballaxy-event-list li {
    padding: .35rem 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.ballaxy-player-list li:last-child,
.ballaxy-event-list li:last-child {
    border-bottom: 0;
}

@media (max-width: 768px) {
    .ballaxy-match-lineups {
        grid-template-columns: 1fr;
    }
}


/* Stage 8.3: ticker cards link only to match pages */
a.bilis-fmt-card,
a.bilis-fmt-card:visited {
    color: var(--text);
    text-decoration: none;
}

a.bilis-fmt-card:hover {
    color: var(--text);
}

a.bilis-fmt-card:hover .bilis-fmt-team span,
a.bilis-fmt-card:hover .bilis-fmt-score span {
    color: var(--text);
}

a.bilis-fmt-card:hover .bilis-fmt-league,
a.bilis-fmt-card:hover .bilis-fmt-date {
    color: var(--accent);
}

.bilis-fmt-card.has-match-link {
    cursor: pointer;
}


/* Stage 8.4: more reliable ticker card clicks */
.bilis-fmt-track {
    cursor: grab;
}

.bilis-fmt-track.is-dragging {
    cursor: grabbing;
}

/* Override older rule that disabled anchor pointer events while dragging. */
.bilis-fmt-track.is-dragging a {
    pointer-events: auto;
}

a.bilis-fmt-card {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}


/* Stage 8.14: initial ticker focus is the closest upcoming/current match */
.bilis-fmt-card.is-current-focus {
    border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}


/* Stage 8.15: prevent visible ticker jump while initial focus position is calculated */
.bilis-fmt.is-positioning .bilis-fmt-track {
    visibility: hidden;
}

.bilis-fmt.is-ready .bilis-fmt-track {
    visibility: visible;
}


/* Stage 8.16: match details notice */
.ballaxy-match-detail-notice {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--surface-soft, rgba(0,0,0,.05));
    color: var(--muted, #555);
    padding: 12px 14px;
    font-size: .9rem;
}


/* Stage 8.17: player pages */
.ballaxy-player-profile {
    display: flex;
    align-items: center;
    gap: var(--space-5, 1.25rem);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    background: var(--surface-soft, rgba(0,0,0,.05));
    padding: var(--space-5, 1.25rem);
    margin-bottom: var(--space-5, 1.25rem);
}

.ballaxy-player-avatar {
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    border-radius: 50%;
    background: var(--accent, #237227);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Encode Sans Condensed", system-ui, sans-serif;
    font-weight: 900;
    font-size: 2.4rem;
}

.ballaxy-player-profile-body {
    min-width: 0;
    flex: 1;
}

.ballaxy-player-kicker {
    color: var(--muted, #555);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .25rem;
}

.ballaxy-player-profile h2 {
    margin: 0 0 var(--space-3, .75rem);
}

.ballaxy-player-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ballaxy-player-profile-grid div,
.ballaxy-player-team-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 10px;
    background: var(--bg, #fff);
}

.ballaxy-player-profile-grid strong {
    display: block;
    color: var(--muted, #555);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ballaxy-player-profile-grid span,
.ballaxy-player-profile-grid a {
    color: var(--text, #111);
    font-weight: 800;
    text-decoration: none;
}

.ballaxy-player-overview {
    display: flex;
    flex-direction: column;
    gap: var(--space-5, 1.25rem);
}

.ballaxy-player-section h3 {
    margin-bottom: var(--space-3, .75rem);
}

.ballaxy-player-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ballaxy-player-team-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ballaxy-player-team-card img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex: 0 0 34px;
}

.ballaxy-player-team-card a,
.ballaxy-player-team-card strong {
    display: block;
    color: var(--text, #111);
    font-weight: 800;
    text-decoration: none;
}

.ballaxy-player-team-card span {
    display: block;
    color: var(--muted, #555);
    font-size: .8rem;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .ballaxy-player-profile {
        align-items: flex-start;
    }

    .ballaxy-player-avatar {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        font-size: 1.6rem;
    }

    .ballaxy-player-profile-grid {
        grid-template-columns: 1fr;
    }
}


/* Stage 8.18: ticker starts at the beginning; no automatic centering/jump */
.bilis-fmt .bilis-fmt-track,
.bilis-fmt.is-positioning .bilis-fmt-track,
.bilis-fmt.is-ready .bilis-fmt-track {
    visibility: visible;
}


/* Stage 8.19: start at recent results while older results remain scrollable to the left */
.bilis-fmt.is-positioning .bilis-fmt-track {
    visibility: hidden !important;
}

.bilis-fmt.is-ready .bilis-fmt-track {
    visibility: visible !important;
}
