/* Public league views for football, basketball and handball. */
.fb-page {
    --fb-accent: #08766f;
    --fb-tint: #e8f5f3;
    --fb-warning: #815400;
    --fb-warning-bg: #fff4d9;
    --fb-danger: #a42c3c;
    --fb-danger-bg: #fff0f1;
    --fb-sticky-top: calc(var(--header-top-gap, 6px) + var(--header-shell-height, 68px) + 6px);
    width: 100%;
    max-width: 1120px;
    min-width: 0;
    margin: 0 auto;
    color: var(--ui-text);
}
:root[data-theme="dark"] .fb-page {
    --fb-accent: #a4f4ec;
    --fb-tint: #123b40;
    --fb-warning: #ffda8b;
    --fb-warning-bg: #3e321d;
    --fb-danger: #ffb4be;
    --fb-danger-bg: #42242e;
}
.fb-page *, .fb-page *::before, .fb-page *::after { box-sizing: border-box; }
.fb-page h1, .fb-page h2, .fb-page h3 { color: var(--ui-title); }
.fb-page h1 { margin: 4px 0 12px; font-size: clamp(22px, 2.7vw, 32px); line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.fb-page h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.fb-page a { color: inherit; text-decoration: none; }
.fb-page :is(a, button, summary, select, [tabindex]):focus-visible { outline: 3px solid var(--fb-accent); outline-offset: 3px; }
.fb-page :is(a, button, summary, select) { -webkit-tap-highlight-color: transparent; }
.fb-page summary { cursor: pointer; min-height: 44px; }
.fb-page .fb-header { padding: 0 0 6px; }
.fb-page .fb-header__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fb-page .fb-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--fb-accent); }
.fb-page .fb-eyebrow > span { margin-inline: 5px; color: var(--ui-muted); }
.fb-page .fb-season { position: relative; flex-shrink: 0; }
.fb-page .fb-season > summary { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 12px; color: var(--ui-muted); list-style: none; }
.fb-page .fb-season nav { position: absolute; z-index: 110; right: 0; top: 100%; padding: 6px; min-width: 160px; border: var(--ui-border); border-radius: 12px; background: var(--ui-surface); box-shadow: var(--ui-shadow-card); }
.fb-page .fb-season a { display: flex; align-items: center; padding: 10px 12px; min-height: 44px; border-radius: 8px; font-size: 13px; }
.fb-page .fb-season > summary::-webkit-details-marker { display: none; }
.fb-page .fb-chevron { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 3px 0; }
.fb-page details[open] > summary .fb-chevron { transform: rotate(225deg); margin-top: 4px; }
.fb-page .fb-count { display: inline-flex; align-items: center; justify-content: center; padding: 4px 9px; min-width: 26px; border-radius: 999px; background: var(--fb-tint); color: var(--fb-accent); font-size: 11px; font-weight: 800; white-space: nowrap; }
.fb-page .fb-season a[aria-current] { background: var(--fb-tint); color: var(--fb-accent); font-weight: 800; box-shadow: inset 0 0 0 1px var(--fb-accent); }
.fb-page .fb-season a:hover { background: var(--fb-tint); }

.fb-page .fb-back-leagues { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; color: var(--fb-accent); font-size: 12px; font-weight: 800; }
.fb-page .fb-back-leagues:hover { text-decoration: underline; }

.fb-page .fb-tabs { position: sticky; top: var(--fb-sticky-top); z-index: 100; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0 0 16px; border: var(--ui-border); border-radius: 12px; background: var(--ui-surface); box-shadow: 0 4px 12px rgb(0 0 0 / 5%); }
.fb-page .fb-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.fb-page .fb-tabs a[aria-current="page"] { color: var(--fb-accent); background: var(--fb-tint); box-shadow: inset 0 -3px var(--fb-accent); }
.fb-page .fb-tabs a:hover { background: var(--fb-tint); }
.fb-page .fb-content { scroll-margin-top: calc(var(--fb-sticky-top) + 70px); min-width: 0; }
.fb-page .fb-round-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding-bottom: 18px; }
.fb-page .fb-round-arrow { display: flex; align-items: center; justify-content: center; min-height: 44px; border: var(--ui-border); border-radius: 10px; background: var(--ui-surface); color: var(--fb-accent); font-size: 21px; }
.fb-page .fb-round-arrow[aria-disabled] { opacity: .35; }
.fb-page .fb-round-form { display: flex; gap: 8px; min-width: 0; justify-content: center; }
.fb-page .fb-round-form select { min-width: 0; width: 100%; min-height: 44px; padding: 8px; border: var(--ui-border); border-radius: 10px; color: var(--ui-title); background: var(--ui-surface); font: inherit; font-size: 14px; font-weight: 800; text-align: center; }
.fb-page .fb-round-form button { min-width: 44px; min-height: 44px; border: var(--ui-border); border-radius: 8px; background: var(--fb-tint); color: var(--fb-accent); font: inherit; font-size: 12px; cursor: pointer; }
.fb-page .fb-round-form.is-enhanced button { display: none; }
.fb-page .fb-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fb-page .fb-date { margin: 20px 0 8px; font-size: 12px; font-weight: 700; line-height: 1.5; color: var(--ui-muted); }
.fb-page .fb-match-grid { display: grid; gap: 10px; }
.fb-page .fb-match { min-width: 0; padding: 0 12px 8px; border: var(--ui-border); border-radius: 12px; background: var(--ui-surface); }
.fb-page .fb-match__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-page .fb-match__state { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fb-page .fb-match__kickoff { color: var(--ui-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.fb-page .fb-match__meta > a { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 60px; min-height: 44px; font-size: 12px; font-weight: 700; color: var(--fb-accent); }
.fb-page .fb-status { padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; line-height: 1.35; background: var(--ui-surface-soft); color: var(--ui-muted); }
.fb-page .fb-status--finalizado { background: var(--fb-tint); color: var(--fb-accent); }
.fb-page :is(.fb-status--directo, .fb-status--descanso, .fb-status--aplazado) { background: var(--fb-warning-bg); color: var(--fb-warning); }
.fb-page .fb-status--suspendido { background: var(--fb-danger-bg); color: var(--fb-danger); }
.fb-page .fb-match__teams { display: grid; grid-template-columns: minmax(0, 1fr) 66px; align-items: stretch; }
.fb-page .fb-match__team { grid-column: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; padding-block: 5px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.fb-page .fb-match__team > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.fb-page .fb-match__team:hover, .fb-page .fb-table__team:hover { color: var(--fb-accent); text-decoration: underline; }
.fb-page .team-shield-wrap { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; overflow: hidden; background: #fff; }
.fb-page .team-shield { width: 100%; height: 100%; object-fit: contain; }
.fb-page .team-shield-fallback { display: none; font-size: 10px; font-weight: 800; color: #08766f; }
.fb-page .team-shield-wrap:is(.is-fallback, .is-fallback-only) .team-shield-fallback { display: inline-flex; }
.fb-page .fb-match__score { grid-column: 2; display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--ui-title); }
.fb-page .fb-match__time { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 5px; padding-left: 6px; text-align: center; }
.fb-page .fb-match__time strong { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ui-title); }
.fb-page .fb-match__time > span { font-size: 10px; line-height: 1.3; color: var(--ui-muted); }
.fb-page .fb-match__preview { margin-top: 8px; border-top: var(--ui-border); font-size: 12px; }
.fb-page .fb-match__preview summary { padding-block: 12px; font-weight: 700; }
.fb-page .fb-match__preview p { line-height: 1.65; overflow-wrap: anywhere; }

.fb-page .fb-table-options { margin-bottom: 8px; font-size: 12px; }
.fb-page .fb-table-options summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border: var(--ui-border); border-radius: 10px; background: var(--ui-surface); color: var(--fb-accent); font-weight: 700; list-style: none; }
.fb-page .fb-table-options summary::-webkit-details-marker { display: none; }
.fb-page .fb-table-wrap, .fb-page .fb-scorers .tercera-table-wrap { max-width: 100%; overflow-x: auto; border: var(--ui-border); border-radius: 12px; background: var(--ui-surface); }
.fb-page .fb-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.fb-page .fb-table :is(th, td) { padding: 6px 4px; border-bottom: var(--ui-border); text-align: center; }
.fb-page .fb-table thead th { height: 42px; color: var(--ui-muted); background: var(--ui-surface-soft); font-size: 10px; }
.fb-page .fb-table th:nth-child(2) { text-align: left; width: 100%; }
.fb-page .fb-table abbr { text-decoration: none; }
.fb-page .fb-table tbody tr:last-child :is(td, th) { border-bottom: 0; }
.fb-page .fb-table tbody tr:hover, .fb-page .fb-table tbody tr:target { background: var(--fb-tint); }
.fb-page .fb-table tbody tr:target { outline: 2px solid var(--fb-accent); outline-offset: -2px; }
.fb-page .fb-table tbody tr { scroll-margin-top: calc(var(--fb-sticky-top) + 70px); }
.fb-page .fb-table__team { display: flex; align-items: center; gap: 7px; min-height: 44px; line-height: 1.35; }
.fb-page .fb-table__team > span:last-child { overflow-wrap: anywhere; min-width: 0; }
.fb-page .fb-table .team-shield-wrap { width: 24px; height: 24px; flex-basis: 24px; }
.fb-page .fb-table .fb-extra { display: none; }
.fb-page .fb-position { color: var(--ui-muted); }
.fb-page .fb-points { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 3px; background: var(--fb-tint); border-radius: 7px; color: var(--fb-accent); font-size: 13px; font-weight: 800; }
.fb-page .fb-table-options[open] ~ .fb-table-wrap .fb-extra { display: table-cell; }
.fb-page .fb-table-options[open] ~ .fb-table-wrap .fb-table { min-width: 730px; }
.fb-page .fb-form { display: inline-flex; gap: 4px; white-space: nowrap; }
.fb-page .fb-form__result { display: inline-flex; justify-content: center; align-items: center; width: 22px; height: 22px; border-radius: 5px; font-size: 10px; background: var(--ui-surface-soft); }
.fb-page .fb-form__result--g { color: var(--fb-accent); background: var(--fb-tint); }
.fb-page .fb-form__result--p { color: var(--fb-danger); background: var(--fb-danger-bg); }
.fb-page .fb-table-legend { margin: 12px 0; color: var(--ui-muted); font-size: 11px; line-height: 1.7; }
.fb-page .fb-table-legend > span { display: block; }

.fb-page .fb-team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fb-page .fb-team-card { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 16px 10px; border: var(--ui-border); border-radius: 12px; background: var(--ui-surface); text-align: center; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.fb-page .fb-team-card:hover { border-color: var(--fb-accent); background: var(--fb-tint); }
.fb-page .fb-team-card .team-shield-wrap { width: 48px; height: 48px; flex-basis: 48px; }
.fb-page .fb-team-card__action { margin-top: auto; color: var(--fb-accent); font-size: 11px; }
.fb-page .fb-secondary-content { margin-top: 24px; }
.fb-page .fb-secondary { padding-block: 6px; border-top: var(--ui-border); font-size: 13px; }
.fb-page .fb-secondary > summary { padding: 12px 4px; font-weight: 700; }
.fb-page .fb-secondary p { line-height: 1.7; }
.fb-page .fb-editorial { margin-top: 20px; }
.fb-page .fb-facts { display: grid; gap: 16px; margin: 8px 4px 16px; }
.fb-page .fb-facts dt { font-size: 11px; color: var(--ui-muted); margin-bottom: 5px; }
.fb-page .fb-facts dd { margin: 0; font-size: 13px; font-weight: 700; }
.fb-page .fb-secondary-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; margin-bottom: 8px; padding: 8px 12px; border: var(--ui-border); border-radius: 10px; background: var(--ui-surface); color: var(--fb-accent); font-size: 12px; font-weight: 700; }
.fb-page .fb-muted { color: var(--ui-muted); font-size: 12px; line-height: 1.6; }
.fb-page .fb-empty { padding: 24px 16px; border: var(--ui-border); border-radius: 12px; background: var(--ui-surface); font-size: 14px; line-height: 1.6; color: var(--ui-muted); }
.fb-page .fb-disclaimer { margin: 16px 0; color: var(--ui-muted); font-size: 11px; line-height: 1.65; }
.fb-page .fb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fb-page .fb-scorers .tercera-card-head { margin-bottom: 14px; }
.fb-page .fb-scorers .tercera-card-kicker { color: var(--ui-muted); font-size: 11px; margin-bottom: 6px; }
.fb-page .fb-scorers .tercera-card-badge { display: block; margin-top: 8px; font-size: 12px; color: var(--ui-muted); }
.fb-page .fb-scorers table { width: 100%; min-width: 450px; border-collapse: collapse; font-size: 13px; }
.fb-page .fb-scorers :is(td, th) { padding: 12px; text-align: left; border-bottom: var(--ui-border); }
.fb-page .fb-scorers .tercera-card-foot { color: var(--ui-muted); font-size: 12px; line-height: 1.6; }

@media (min-width: 641px) {
    .fb-page .fb-team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fb-page .fb-tabs a { font-size: 14px; }
    .fb-page .fb-round-form select { max-width: 280px; }
    .fb-page .fb-round-nav { grid-template-columns: 44px minmax(0, 300px) 44px; justify-content: center; }
    .fb-page .fb-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fb-page .fb-table { font-size: 13px; }
    .fb-page .fb-table :is(td, th) { padding: 8px; }
}
@media (min-width: 900px) {
    .fb-page .fb-match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fb-page .fb-team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .fb-page .fb-table .fb-extra { display: table-cell; }
    .fb-page .fb-table-options { display: none; }
    .fb-page .fb-table th:nth-child(2) { width: 40%; }
    .fb-page .fb-table thead th { font-size: 11px; }
}
