:root {
    color-scheme: light;
    --brand: #075c3b;
    --brand-strong: #043522;
    --brand-bright: #0a7a4a;
    --brand-soft: #e7f1e9;
    --gold: #c99a3d;
    --blue: #2468a8;
    --red: #b93b36;
    --draw: #6d746f;
    --ink: #10231a;
    --text: #17251d;
    --text-secondary: #617267;
    --text-muted: #7d8a82;
    --bg: #f3f5ef;
    --bg-card: #ffffff;
    --bg-soft: #e9efe8;
    --line: #d9e2d8;
    --line-strong: #bdcabb;
    --shadow: 0 18px 50px rgba(6, 53, 31, 0.10);
    --shadow-tight: 0 10px 28px rgba(6, 53, 31, 0.08);
    --radius-card: 8px;
    --radius-control: 6px;
    --focus: #c99a3d;
    --win: #0a7a4a;
    --loss: #b93b36;
    --live: #d93d37;
    --comp-bsa: #0a7a4a;
    --comp-cli: #c99a3d;
    --comp-copa: #2468a8;
    --comp-paulista: #6b7f32;
    --comp-wc: #8b3f68;
    --comp-other: #858f87;
}

body.dark {
    color-scheme: dark;
    --brand: #48b57a;
    --brand-strong: #06140f;
    --brand-bright: #65d996;
    --brand-soft: #10251a;
    --gold: #d8b560;
    --blue: #6aa7dc;
    --red: #ee6b63;
    --draw: #9ba79e;
    --ink: #eff6f1;
    --text: #eaf2ed;
    --text-secondary: #aec0b5;
    --text-muted: #8c9b91;
    --bg: #07110c;
    --bg-card: #0f1e16;
    --bg-soft: #13261b;
    --line: rgba(222, 236, 226, 0.13);
    --line-strong: rgba(222, 236, 226, 0.24);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    --shadow-tight: 0 10px 24px rgba(0, 0, 0, 0.26);
    --comp-wc: #d077a5;
    background: #07110c;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(7, 92, 59, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(0deg, rgba(7, 92, 59, 0.03) 1px, transparent 1px) 0 0 / 56px 56px,
        var(--bg);
    color: var(--text);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding-bottom: 28px;
    transition: background 0.2s ease, color 0.2s ease;
}

body.dark {
    background:
        linear-gradient(90deg, rgba(101, 217, 150, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(0deg, rgba(101, 217, 150, 0.028) 1px, transparent 1px) 0 0 / 56px 56px,
        var(--bg);
}

button,
select {
    font: inherit;
}

button {
    touch-action: manipulation;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 3000;
    transform: translateY(-160%);
    border-radius: var(--radius-control);
    background: var(--ink);
    color: var(--bg-card);
    padding: 10px 12px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow-tight);
    transition: transform 0.16s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

#main-content:focus {
    outline: none;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transition: transform 0.16s ease, background 0.16s ease;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.22);
}

body.dark .theme-toggle {
    background: rgba(0, 0, 0, 0.34);
    border-color: rgba(255, 255, 255, 0.16);
}

.header {
    position: relative;
    overflow: hidden;
    min-height: 162px;
    padding: 24px 80px 64px;
    background:
        linear-gradient(115deg, rgba(201, 154, 61, 0.18), transparent 34%),
        linear-gradient(135deg, var(--brand-strong) 0%, #064e31 54%, #113726 100%);
    color: white;
}

.header::before,
.header::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.header::before {
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 68px 68px,
        linear-gradient(0deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 68px 68px;
    opacity: 0.42;
}

.header::after {
    width: 520px;
    height: 520px;
    right: -220px;
    top: -280px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.logo {
    width: 62px;
    height: 62px;
    flex: 0 0 auto;
    border-radius: 18px;
    background: transparent;
    color: inherit;
    display: grid;
    place-items: center;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.logo svg,
.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-text h1 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 800;
}

.subtitle {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    font-weight: 600;
}

.product-disclosure {
    margin-top: 5px;
    color: rgba(255, 253, 243, 0.68);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.refresh-btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease;
}

.refresh-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
}

.refresh-btn:hover .refresh-icon {
    animation: spin-once 0.45s ease;
}

.refresh-btn:disabled {
    cursor: wait;
    opacity: 0.78;
}

.refresh-btn:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.12);
}

.refresh-btn.is-refreshing .refresh-icon {
    animation: spin-once 0.76s linear infinite;
}

.refresh-icon {
    display: inline-block;
    font-size: 1.15rem;
    line-height: 1;
}

body.native-shell .header-actions,
body.native-shell .tabs {
    display: none;
}

body.native-shell .header-content {
    padding-right: 0;
}

@keyframes spin-once {
    to { transform: rotate(360deg); }
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: -44px auto 0;
    position: relative;
    z-index: 2;
}

.hero-hub,
.card,
.tabs,
.calendar-hub > .card {
    box-shadow: var(--shadow);
}

.hero-hub {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    min-height: 286px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-card);
    background:
        linear-gradient(120deg, rgba(201, 154, 61, 0.12), transparent 38%),
        linear-gradient(135deg, #064e31 0%, #0a6a42 55%, #10261c 100%);
    color: white;
}

.hero-hub::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px) 0 0 / 86px 86px,
        linear-gradient(0deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 86px 86px;
    opacity: 0.32;
    pointer-events: none;
}

.hero-hub > * {
    position: relative;
    z-index: 1;
}

.hero-card {
    grid-column: 1;
    grid-row: 1;
    padding: 34px 36px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 22px;
}

.hero-card.live {
    box-shadow: inset 0 0 0 3px var(--live);
}

.hero-comp {
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #f1d588;
    padding: 7px 12px;
    font-size: 0.73rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 4px rgba(217, 61, 55, 0.18);
    vertical-align: 1px;
    animation: dotPulse 1.4s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.22); }
}

.hero-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
}

.hero-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-team:last-child {
    flex-direction: row-reverse;
}

.team-marker {
    --team-marker-bg: var(--brand);
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fffdf3;
    background:
        linear-gradient(90deg, transparent 48%, rgba(255, 253, 243, 0.22) 48%, rgba(255, 253, 243, 0.22) 52%, transparent 52%),
        radial-gradient(circle at center, transparent 0 25%, rgba(255, 253, 243, 0.2) 26% 29%, transparent 30%),
        var(--team-marker-bg);
    border: 1px solid rgba(255, 253, 243, 0.72);
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(4, 53, 34, 0.2);
    font-size: 0.55rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: center;
}

.team-marker[data-team-tone="1"] { --team-marker-bg: var(--brand-strong); }
.team-marker[data-team-tone="2"] { --team-marker-bg: var(--ink); }
.team-marker[data-team-tone="3"] {
    --team-marker-bg: var(--gold);
    color: var(--brand-strong);
    border-color: rgba(4, 53, 34, 0.46);
}

.hero-team .team-marker {
    width: 72px;
    height: 72px;
    min-width: 72px;
    flex-basis: 72px;
    border-width: 2px;
    box-shadow: 0 10px 12px rgba(0, 0, 0, 0.22);
    font-size: 1rem;
}

.hero-team-name {
    min-width: 0;
    color: #fff;
    font-size: 1.45rem;
    line-height: 1.05;
    font-weight: 800;
    overflow-wrap: normal;
    word-break: normal;
}

.hero-empty-state {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.08);
    padding: 24px;
}

.hero-empty-state strong,
.hero-empty-state span {
    display: block;
}

.hero-empty-state strong {
    color: #fff;
    font-size: 1.22rem;
    line-height: 1.2;
    font-weight: 800;
}

.hero-empty-state span {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
    line-height: 1.4;
    font-weight: 700;
}

.hero-center-score {
    justify-self: center;
    min-width: 96px;
    display: grid;
    place-items: center;
    gap: 6px;
}

.hero-vs {
    color: rgba(255, 255, 255, 0.82);
    font-size: 3rem;
    line-height: 1;
    font-weight: 800;
}

.hero-score {
    color: #fff;
    font-size: 3.25rem;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hero-score .score-sep {
    color: rgba(255, 255, 255, 0.52);
}

.hero-score.live-score {
    animation: scorePulse 2.8s ease-in-out infinite;
}

@keyframes scorePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.86; }
}

.hero-minute,
.hero-ht {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    padding: 4px 10px;
    color: #f6d889;
    font-size: 0.72rem;
    font-weight: 800;
}

.hero-ht {
    color: rgba(255, 255, 255, 0.72);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    line-height: 1.25;
}

.hero-meta-date {
    color: #fff;
    font-weight: 800;
}

.hero-meta-sep {
    opacity: 0.36;
}

.hero-meta-pill {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 9px;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}

.hero-bottom {
    grid-column: 2;
    grid-row: 1;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(4, 53, 34, 0.34);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    padding: 30px;
}

.hero-context {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-context-loading,
.hero-context-empty {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-record-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-record-title strong {
    color: #f2cf7a;
    font-size: 0.68rem;
    letter-spacing: 0;
    text-transform: none;
}

.hero-record-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
}

.hero-record-stats div {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.08);
    padding: 9px 4px 8px;
    text-align: center;
}

.hero-record-stats strong,
.hero-record-stats span {
    display: block;
}

.hero-record-stats strong {
    color: #fff;
    font-size: 0.92rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.hero-record-stats span {
    margin-top: 5px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.hero-record.is-empty p,
.hero-record.is-loading p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.75rem;
    font-weight: 700;
}

.hero-icon-actions {
    display: flex;
    gap: 9px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-icon-action {
    width: 44px;
    height: 44px;
    display: inline-grid;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.hero-icon-action:hover,
.hero-icon-action:focus-visible {
    border-color: rgba(242, 207, 122, 0.72);
    background: rgba(242, 207, 122, 0.14);
    transform: translateY(-1px);
}

.hero-icon-action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-countdown {
    text-align: left;
}

.countdown-label {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.countdown-digits {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.cd-unit {
    min-width: 54px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 8px 8px;
    display: grid;
    justify-items: center;
    gap: 3px;
}

.cd-val {
    color: #fff;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.cd-lbl {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.58rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.cd-sep {
    display: none;
}

.hero-brazil-next {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-brazil-list {
    display: grid;
    gap: 8px;
}

.hero-brazil-item {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.hero-brazil-summary {
    padding: 9px 76px 9px 10px;
}

.hero-brazil-item span,
.hero-brazil-item strong {
    display: block;
    min-width: 0;
}

.hero-brazil-item span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.66rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-brazil-item strong {
    margin-top: 5px;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.match-card > summary {
    list-style: none;
}

.match-card > summary::-webkit-details-marker {
    display: none;
}

.match-card-summary {
    position: relative;
    cursor: pointer;
    transition: background 0.16s ease;
}

.match-card-summary:hover {
    background: rgba(10, 122, 74, 0.06);
}

.match-card-summary:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.hero-brazil-item .match-card-summary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hero-brazil-item .cal-match-prediction {
    border-top-color: rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.16);
}

.hero-brazil-item .prediction-card.compact {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.hero-brazil-item .prediction-match,
.hero-brazil-item .prob-value {
    color: #fff;
}

.hero-brazil-item .match-details-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.hero-brazil-item .match-detail-title,
.hero-brazil-item .match-detail-score,
.hero-brazil-item .match-detail-stat strong,
.hero-brazil-item .match-detail-meta strong {
    color: #fff;
}

.hero-brazil-item .match-detail-stat,
.hero-brazil-item .match-detail-score {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.palmeiras-home-shell {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.club-home-panel,
.club-match-board {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    box-shadow: var(--shadow-tight);
}

.club-home-panel {
    overflow: hidden;
    padding: 22px;
    background:
        linear-gradient(90deg, rgba(7, 92, 59, 0.08) 1px, transparent 1px) 0 0 / 52px 52px,
        linear-gradient(0deg, rgba(7, 92, 59, 0.06) 1px, transparent 1px) 0 0 / 52px 52px,
        var(--bg-card);
}

.club-match-board {
    padding: 18px;
}

.palmeiras-board-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    margin-bottom: 16px;
}

.palmeiras-board-head.compact {
    align-items: start;
    margin-bottom: 14px;
}

.palmeiras-kicker {
    margin-bottom: 8px;
    color: var(--brand);
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.palmeiras-board-head h2,
.palmeiras-board-head h3 {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.palmeiras-board-head h2 {
    font-size: 1.28rem;
    line-height: 1.12;
}

.palmeiras-board-head h3,
.palmeiras-snapshot-head h3 {
    font-size: 1.04rem;
    line-height: 1.2;
}

.palmeiras-board-head p,
.palmeiras-snapshot-head p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 700;
}

.palmeiras-actions,
.palmeiras-filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.palmeiras-action,
.palmeiras-filter {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text);
    padding: 8px 11px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.palmeiras-action:hover,
.palmeiras-filter:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: var(--brand-soft);
}

.palmeiras-action.primary,
.palmeiras-filter.active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.palmeiras-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.palmeiras-snapshot-head {
    margin-bottom: 10px;
}

.palmeiras-snapshot-head h3 {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.palmeiras-quick-list {
    display: grid;
    gap: 10px;
}

.palmeiras-quick-match {
    min-width: 0;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    overflow: hidden;
}

.palmeiras-quick-summary {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
}

.palmeiras-quick-match.loss {
    border-left-color: var(--loss);
}

.palmeiras-quick-match.draw {
    border-left-color: var(--draw);
}

.palmeiras-quick-match.live {
    border-left-color: var(--live);
    background: rgba(217, 61, 55, 0.06);
}

.palmeiras-quick-date,
.palmeiras-match-date {
    display: grid;
    justify-items: start;
    gap: 4px;
}

.palmeiras-quick-date strong,
.palmeiras-match-date strong {
    color: var(--ink);
    font-size: 0.82rem;
    line-height: 1;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
}

.palmeiras-quick-date span,
.palmeiras-match-date span {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
    font-weight: 800;
}

.palmeiras-quick-main,
.palmeiras-match-body {
    min-width: 0;
}

.palmeiras-quick-teams,
.palmeiras-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.palmeiras-quick-teams span,
.palmeiras-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
}

.palmeiras-quick-teams span:last-child,
.palmeiras-team.away {
    justify-content: flex-end;
    text-align: right;
}

.palmeiras-quick-teams span,
.palmeiras-team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.palmeiras-quick-teams .team-marker,
.palmeiras-team .team-marker {
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex: 0 0 22px;
}

.palmeiras-quick-teams strong,
.club-score {
    justify-self: center;
    min-width: 42px;
    border-radius: var(--radius-control);
    background: var(--bg-soft);
    color: var(--ink);
    padding: 6px 7px;
    text-align: center;
    font-size: 0.88rem;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.palmeiras-match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.25;
    font-weight: 800;
}

.palmeiras-match-meta span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.palmeiras-quick-match .palmeiras-match-meta {
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.palmeiras-quick-match .palmeiras-match-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
}

.palmeiras-quick-match .palmeiras-match-meta .palmeiras-result {
    flex: 0 0 auto;
}

.palmeiras-result {
    color: var(--brand);
}

.palmeiras-result.win {
    color: var(--win);
}

.palmeiras-result.loss {
    color: var(--loss);
}

.palmeiras-result.draw {
    color: var(--draw);
}

.palmeiras-result.live {
    color: var(--live);
}

.palmeiras-game-group + .palmeiras-game-group {
    margin-top: 14px;
}

.palmeiras-game-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: capitalize;
}

.palmeiras-game-heading strong {
    color: var(--brand);
    font-size: 0.7rem;
    white-space: nowrap;
}

.palmeiras-match-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.palmeiras-match {
    border-top: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    background: var(--bg-card);
    overflow: hidden;
}

.palmeiras-match-summary {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.palmeiras-match:first-child {
    border-top: 0;
}

.palmeiras-match.live {
    border-left-color: var(--live);
    background: rgba(217, 61, 55, 0.06);
}

.main-layout {
    min-width: 0;
}

.agenda-content-grid {
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.agenda-content-grid .calendar-hub {
    position: sticky;
    top: 16px;
}

.agenda-feed {
    min-width: 0;
}

.main-content {
    min-width: 0;
}

.card {
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    padding: 22px;
}

.card-title {
    margin-bottom: 16px;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.25;
    font-weight: 800;
}

.competition-hub {
    padding: 20px;
}

.competition-hub .card-title {
    margin-bottom: 0;
}

.competition-hub-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}

.competition-hub-head p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 700;
}

.competition-card-action {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text);
    padding: 8px 11px;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 800;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.competition-card-action:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: var(--brand-soft);
}

.competition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.competition-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-left: 4px solid var(--comp-color, var(--comp-other));
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    padding: 14px;
}

.competition-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.competition-code {
    display: inline-block;
    color: var(--comp-color, var(--brand));
    font-size: 0.66rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.competition-card h3 {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.18;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.competition-status {
    justify-self: end;
    border-radius: 999px;
    background: rgba(10, 122, 74, 0.12);
    color: var(--brand);
    padding: 6px 8px;
    font-size: 0.64rem;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.competition-status.live {
    color: var(--live);
    background: rgba(217, 61, 55, 0.14);
}

.competition-status.finished,
.competition-status.idle {
    color: var(--text-secondary);
    background: var(--bg-card);
}

.competition-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 9px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.69rem;
    line-height: 1.25;
    font-weight: 800;
}

.competition-record {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.competition-record div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    padding: 8px 5px;
    text-align: center;
}

.competition-record strong,
.competition-record span {
    display: block;
}

.competition-record strong {
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1;
    font-weight: 800;
}

.competition-record span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.58rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.competition-match {
    min-width: 0;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    overflow: hidden;
}

.competition-match-summary {
    padding: 10px;
}

.competition-match.empty-line {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
}

.competition-match span,
.competition-match strong,
.competition-match small {
    display: block;
    min-width: 0;
}

.competition-match span,
.competition-match small {
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.competition-match strong {
    margin-top: 6px;
    color: var(--text);
    font-size: 0.83rem;
    line-height: 1.25;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.competition-match strong em {
    color: var(--comp-color, var(--brand));
    font-style: normal;
    white-space: nowrap;
}

.competition-match small {
    margin-top: 7px;
    color: var(--comp-color, var(--brand));
}

.competition-card-action {
    width: 100%;
    margin-top: 12px;
    border-color: color-mix(in srgb, var(--comp-color, var(--brand)) 28%, var(--line));
    color: var(--comp-color, var(--brand));
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.72);
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

body.dark .tabs {
    background: rgba(15, 30, 22, 0.78);
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    min-height: 38px;
    flex: 1 0 max-content;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 800;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tab-icon {
    display: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tab-btn:hover {
    background: var(--brand-soft);
    color: var(--ink);
}

.tab-btn.active {
    background: var(--brand);
    color: #fff;
}

.tab-btn:active {
    transform: scale(0.98);
}

.tab-content[hidden] {
    display: none;
}

.tab-content.active {
    display: block;
}

.comp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.comp-legend-item {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 7px 11px;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 800;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.comp-legend-item:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    color: var(--ink);
}

.comp-legend-item.active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.comp-legend-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.32);
}

.comp-legend-label {
    color: inherit;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.cal-title {
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.2;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-title::before {
    content: "";
    width: 8px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(var(--brand), var(--gold));
}

.cal-title select {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-soft);
    color: var(--text);
    padding: 4px 26px 4px 8px;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
}

.calendar-nav {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.calendar-nav span {
    color: var(--ink);
    text-align: center;
    font-size: 0.98rem;
    font-weight: 800;
}

.cal-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    transition: background 0.16s ease, transform 0.16s ease;
}

.cal-nav-btn:hover {
    background: var(--brand-soft);
}

.cal-nav-btn:active {
    transform: scale(0.94);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
}

.calendar-grid > .empty {
    grid-column: 1 / -1;
}

.cal-head {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cal-day {
    aspect-ratio: 1;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 7px 3px 5px;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
    position: relative;
}

.cal-day:not(.other-month):hover {
    background: var(--brand-soft);
    border-color: var(--line);
}

.cal-day:active {
    transform: scale(0.96);
}

.cal-day.other-month {
    pointer-events: none;
    opacity: 0.2;
}

.cal-day.today {
    border-color: var(--gold);
    background: rgba(201, 154, 61, 0.12);
}

.cal-day.has-match {
    background: var(--bg-soft);
}

.cal-day.selected {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.cal-day.is-live {
    box-shadow: inset 0 0 0 2px rgba(217, 61, 55, 0.7);
}

.cal-day-num {
    font-size: 0.76rem;
    line-height: 1;
    font-weight: 800;
}

.cal-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    min-height: 7px;
}

.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.cal-dot.bsa,
.cal-match.bsa,
.cal-match-comp.bsa {
    --comp-color: var(--comp-bsa);
}

.cal-dot.cli,
.cal-match.cli,
.cal-match-comp.cli {
    --comp-color: var(--comp-cli);
}

.cal-dot.copa,
.cal-match.copa,
.cal-match-comp.copa,
.competition-card.copa {
    --comp-color: var(--comp-copa);
}

.cal-dot.paulista,
.cal-match.paulista,
.cal-match-comp.paulista,
.competition-card.paulista {
    --comp-color: var(--comp-paulista);
}

.cal-dot.wc,
.cal-match.wc,
.cal-match-comp.wc,
.competition-card.wc {
    --comp-color: var(--comp-wc);
}

.cal-dot.other,
.cal-match.other,
.cal-match-comp.other,
.competition-card.other {
    --comp-color: var(--comp-other);
}

.competition-card.bsa {
    --comp-color: var(--comp-bsa);
}

.competition-card.cli {
    --comp-color: var(--comp-cli);
}

.cal-dot {
    background: var(--comp-color, var(--comp-other));
}

.cal-overflow {
    color: var(--text-muted);
    font-size: 0.58rem;
    line-height: 1;
    font-weight: 800;
}

.cal-day.selected .cal-overflow {
    color: rgba(255, 255, 255, 0.76);
}

.cal-score {
    max-width: 100%;
    border-radius: 999px;
    padding: 2px 5px;
    color: var(--brand);
    background: rgba(10, 122, 74, 0.13);
    font-size: 0.58rem;
    line-height: 1.1;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-score.win {
    color: var(--win);
    background: rgba(10, 122, 74, 0.14);
}

.cal-score.loss {
    color: var(--loss);
    background: rgba(185, 59, 54, 0.14);
}

.cal-score.draw {
    color: var(--draw);
    background: rgba(109, 116, 111, 0.14);
}

.cal-score.neutral {
    color: var(--comp-wc);
    background: rgba(139, 63, 104, 0.14);
}

.cal-score.live {
    color: var(--live);
    background: rgba(217, 61, 55, 0.16);
}

.cal-day.selected .cal-score {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.cal-expanded {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    overflow: hidden;
}

.cal-expanded-header {
    padding: 12px 14px 8px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.cal-match {
    border-top: 1px solid var(--line);
    background: var(--bg-card);
    border-left: 4px solid var(--comp-color, var(--comp-other));
}

.cal-match-main {
    display: grid;
    grid-template-columns: 46px 86px minmax(0, 1fr) 68px;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
}

/* The selected-day card lives in the narrow desktop calendar rail. Give its
   metadata and matchup separate rows so team names never collapse to 0px. */
.cal-expanded .cal-match-main {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas:
        "time competition status"
        "teams teams teams";
    row-gap: 10px;
}

.cal-expanded .cal-match-time {
    grid-area: time;
}

.cal-expanded .cal-match-comp {
    grid-area: competition;
}

.cal-expanded .cal-match-teams {
    grid-area: teams;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
}

.cal-expanded .cal-match-status {
    grid-area: status;
    justify-self: end;
}

.cal-match-time {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.cal-match-comp {
    color: var(--comp-color, var(--text-secondary));
    font-size: 0.68rem;
    line-height: 1.1;
    font-weight: 800;
}

.cal-match-teams {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
}

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

.cal-match-team-right {
    justify-content: flex-end;
}

.cal-match-team-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-match-vs {
    color: var(--text-muted);
    flex: 0 0 auto;
}

.cal-match-crest {
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex: 0 0 22px;
}

.cal-match-score {
    min-width: 42px;
    margin: 0;
    padding: 5px 7px;
    text-align: center;
    color: var(--ink);
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand) 12%, transparent);
    border-radius: var(--radius-control);
    font-size: 0.84rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cal-match-status {
    justify-self: end;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--text-secondary);
    padding: 5px 8px;
    font-size: 0.65rem;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.cal-match-status.live {
    color: var(--live);
    background: rgba(217, 61, 55, 0.14);
}

.cal-match-status.finished {
    color: var(--brand);
    background: var(--brand-soft);
}

.cal-match-prediction {
    border-top: 1px solid var(--line);
    padding: 10px 14px 12px;
    background: var(--bg-soft);
}

.position-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(7, 92, 59, 0.18);
}

.section-head,
.standings-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 16px;
}

.section-head .card-title,
.standings-head .card-title {
    margin-bottom: 0;
}

.section-head p,
.standings-head p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 700;
}

.standings-filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.standings-filter {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 7px 10px;
    cursor: pointer;
    font-size: 0.76rem;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.standings-filter:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: var(--brand-soft);
    color: var(--ink);
}

.standings-filter.active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.stat-box {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-soft);
    padding: 12px 8px;
    text-align: center;
}

.stat-value {
    color: var(--brand);
    font-size: 1.12rem;
    line-height: 1.1;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.stat-label {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.15;
    font-weight: 800;
}

.standings-section {
    min-width: 0;
}

.standings-section + .standings-section,
.standings-campaign .standings-section {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.standings-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

.standings-section-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.2;
    font-weight: 800;
}

.standings-section-head p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.35;
    font-weight: 700;
}

.standings-section-head > span:not(.competition-status) {
    align-self: start;
    border-radius: var(--radius-control);
    background: var(--brand-soft);
    color: var(--brand);
    padding: 6px 8px;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.standings-data-note {
    margin-top: 16px;
    border: 1px solid rgba(201, 154, 61, 0.32);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-card);
    background: color-mix(in srgb, var(--gold) 10%, var(--bg-card));
    color: var(--text-secondary);
    padding: 12px;
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 800;
}

.standings-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.standings-focus-grid .competition-match {
    margin-top: 0;
}

.standings-match-group + .standings-match-group {
    margin-top: 14px;
}

.standings-table {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.standings-table .standings-row {
    padding: 10px;
}

.standings-table .standings-row:first-child {
    border-top: 0;
}

.standings-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto 34px;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding: 10px 0;
}

.standings-row.palmeiras {
    margin: 6px -10px;
    border: 1px solid rgba(10, 122, 74, 0.28);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-card);
    background: var(--brand-soft);
    padding: 10px;
}

.standings-row .pos {
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 800;
}

.standings-row .team {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.standings-row .stats {
    display: flex;
    gap: 9px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.standings-row .pts {
    color: var(--brand);
    text-align: right;
    font-size: 0.92rem;
    font-weight: 800;
}

.stats-summary {
    margin-bottom: 16px;
}

.stats-summary .stats-grid {
    grid-auto-rows: 1fr;
    gap: 10px;
    margin-top: 0;
}

.stats-summary .stat-box {
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 10px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.stats-col {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    padding: 14px;
}

.stats-col-title {
    margin-bottom: 10px;
    color: var(--brand);
    font-size: 0.8rem;
    line-height: 1.2;
    font-weight: 800;
}

.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.chart-container {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    padding: 14px;
}

.chart-container canvas {
    max-height: 300px;
}

.news-item {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    padding: 14px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.news-item + .news-item {
    margin-top: 10px;
}

.news-item:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: var(--brand-soft);
}

.news-title {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.35;
    font-weight: 800;
}

.news-meta {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.news-source {
    color: var(--brand);
}

.prediction-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    padding: 18px;
}

.prediction-card.compact {
    border-radius: 6px;
    background: var(--bg-card);
    padding: 12px;
}

.prediction-card.compact.result {
    background: transparent;
}

.match-details-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-card);
    padding: 12px;
}

.match-detail-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.match-detail-title {
    color: var(--ink);
    font-size: 0.88rem;
    line-height: 1.25;
    font-weight: 800;
}

.match-detail-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.3;
    font-weight: 800;
}

.match-detail-score {
    border-radius: var(--radius-control);
    background: var(--brand-soft);
    color: var(--brand);
    padding: 7px 9px;
    font-size: 0.9rem;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.match-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.match-detail-stat {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-soft);
    padding: 9px 8px;
}

.match-detail-stat span,
.match-detail-meta span {
    display: block;
    color: var(--text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
}

.match-detail-stat strong,
.match-detail-meta strong {
    display: block;
    min-width: 0;
    margin-top: 5px;
    color: var(--text);
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.match-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.prediction-match {
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.3;
    font-weight: 800;
}

.prediction-card.compact .prediction-match {
    font-size: 0.88rem;
}

.prediction-badge {
    width: fit-content;
    margin-top: 12px;
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--brand);
    background: rgba(10, 122, 74, 0.14);
    font-size: 0.76rem;
    font-weight: 800;
}

.prediction-badge.likely {
    color: var(--win);
    background: rgba(10, 122, 74, 0.14);
}

.prediction-badge.maybe {
    color: var(--gold);
    background: rgba(201, 154, 61, 0.16);
}

.prediction-badge.risky {
    color: var(--loss);
    background: rgba(185, 59, 54, 0.14);
}

.prediction-card.compact .prediction-badge {
    margin-top: 8px;
    padding: 5px 8px;
    font-size: 0.68rem;
}

.prediction-probs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.prediction-card.compact .prediction-probs {
    gap: 8px;
    margin-top: 10px;
}

.prob-box {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    padding: 14px 10px;
    text-align: center;
}

.prediction-card.compact .prob-box {
    border-radius: 6px;
    padding: 10px 6px;
}

.prob-box.primary {
    border-color: rgba(10, 122, 74, 0.32);
    background: var(--brand-soft);
}

.prob-value {
    color: var(--brand);
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 800;
}

.prediction-card.compact .prob-value {
    font-size: 1rem;
}

.prob-label {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.prediction-card.compact .prob-label {
    font-size: 0.66rem;
}

.prediction-factors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.prediction-card.compact .prediction-factors {
    gap: 6px;
    margin-top: 10px;
}

.prediction-factor {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 7px 10px;
    font-size: 0.75rem;
    font-weight: 800;
}

.prediction-card.compact .prediction-factor {
    padding: 5px 7px;
    font-size: 0.66rem;
}

.prediction-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.prediction-card.compact .prediction-note {
    margin-top: 9px;
    font-size: 0.68rem;
}

.worldcup-shell {
    display: grid;
    gap: 16px;
}

.worldcup-hero-panel {
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background:
        linear-gradient(90deg, rgba(139, 63, 104, 0.1) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(0deg, rgba(139, 63, 104, 0.08) 1px, transparent 1px) 0 0 / 48px 48px,
        var(--bg-card);
    padding: 22px;
    box-shadow: var(--shadow-tight);
}

.worldcup-kicker {
    margin-bottom: 8px;
    color: var(--comp-wc);
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.worldcup-hero-panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.28rem;
    line-height: 1.12;
    font-weight: 800;
}

.worldcup-hero-panel p {
    max-width: 62ch;
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 600;
}

.worldcup-champion-hero {
    position: relative;
    align-items: center;
    border-color: rgba(139, 63, 104, 0.34);
    background:
        radial-gradient(circle at 86% 18%, rgba(201, 154, 61, 0.18), transparent 30%),
        linear-gradient(90deg, rgba(139, 63, 104, 0.1) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(0deg, rgba(139, 63, 104, 0.08) 1px, transparent 1px) 0 0 / 48px 48px,
        var(--bg-card);
}

.worldcup-champion-copy {
    min-width: 0;
}

.worldcup-champion-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.worldcup-champion-heading > img {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    object-fit: contain;
}

.worldcup-final-result {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.worldcup-final-result strong {
    color: var(--ink);
    font-size: 0.9rem;
    text-transform: none;
}

.worldcup-final-result b {
    display: inline-block;
    margin: 0 5px;
    color: var(--comp-wc);
    font-size: 1.08rem;
}

.worldcup-champion-side {
    min-width: 132px;
    display: grid;
    justify-items: center;
    gap: 8px;
    color: var(--gold);
}

.worldcup-champion-side > strong {
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.worldcup-trophy {
    width: 58px;
    height: 58px;
    overflow: visible;
    fill: rgba(201, 154, 61, 0.18);
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.worldcup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.worldcup-action,
.worldcup-filter {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text);
    padding: 8px 11px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.worldcup-action:hover,
.worldcup-filter:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: var(--brand-soft);
}

.worldcup-action.primary,
.worldcup-filter.active {
    border-color: var(--comp-wc);
    background: var(--comp-wc);
    color: #fff;
}

.worldcup-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.worldcup-info-item {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    padding: 14px;
}

.worldcup-info-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.worldcup-info-item strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 0.96rem;
    line-height: 1.18;
    font-weight: 800;
}

.worldcup-board {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    padding: 18px;
}

.worldcup-brazil-panel {
    border: 1px solid rgba(139, 63, 104, 0.26);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    padding: 18px;
}

.worldcup-brazil-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.worldcup-brazil-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-left: 4px solid var(--comp-wc);
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    overflow: hidden;
}

.worldcup-brazil-summary {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
}

.worldcup-brazil-date {
    display: grid;
    justify-items: start;
    gap: 4px;
}

.worldcup-brazil-date strong {
    color: var(--ink);
    font-size: 0.82rem;
    line-height: 1;
    font-weight: 800;
    text-transform: capitalize;
}

.worldcup-brazil-date span {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
    font-weight: 800;
}

.worldcup-brazil-main {
    min-width: 0;
}

.worldcup-brazil-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
}

.worldcup-brazil-teams span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.worldcup-brazil-teams span:last-child {
    text-align: right;
}

.worldcup-brazil-teams strong {
    justify-self: center;
    color: var(--comp-wc);
    font-size: 0.9rem;
    line-height: 1;
    font-weight: 800;
}

.worldcup-board-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}

.worldcup-board-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.04rem;
    line-height: 1.2;
    font-weight: 800;
}

.worldcup-board-head p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 700;
}

.worldcup-filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.worldcup-day-group + .worldcup-day-group {
    margin-top: 14px;
}

.worldcup-day-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: capitalize;
}

.worldcup-day-heading strong {
    color: var(--comp-wc);
    font-size: 0.7rem;
    white-space: nowrap;
}

.worldcup-match-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.worldcup-match {
    border-top: 1px solid var(--line);
    border-left: 4px solid var(--comp-wc);
    background: var(--bg-card);
    overflow: hidden;
}

.worldcup-match-summary {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.worldcup-match:first-child {
    border-top: 0;
}

.worldcup-match.live {
    border-left-color: var(--live);
    background: rgba(217, 61, 55, 0.06);
}

.worldcup-match-time {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.worldcup-match-body {
    min-width: 0;
}

.worldcup-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.worldcup-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 800;
}

.worldcup-team.away {
    justify-content: flex-end;
    text-align: right;
}

.worldcup-team span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.worldcup-team .team-marker {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex: 0 0 24px;
}

.worldcup-score {
    justify-self: center;
    min-width: 46px;
    border-radius: var(--radius-control);
    background: var(--bg-soft);
    color: var(--ink);
    padding: 6px 8px;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.worldcup-match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.25;
    font-weight: 800;
}

.worldcup-match-meta span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.skeleton-card,
.empty,
.error-state {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-soft);
    padding: 18px;
    color: var(--text-muted);
    text-align: center;
    font-weight: 700;
}

.skeleton-card + .skeleton-card {
    margin-top: 10px;
}

.skeleton-line {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--line), var(--bg-card), var(--line));
    background-size: 220% 100%;
    animation: shimmer 1.25s ease-in-out infinite;
}

.skeleton-line.short { width: 38%; }
.skeleton-line.medium { width: 68%; margin-top: 10px; }

@keyframes shimmer {
    from { background-position: 160% 0; }
    to { background-position: -60% 0; }
}

.error-icon {
    width: 34px;
    height: 34px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: rgba(185, 59, 54, 0.14);
    color: var(--loss);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.error-message {
    color: var(--text);
    margin-bottom: 12px;
}

.toast-region {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 3200;
    width: min(420px, calc(100% - 24px));
    display: grid;
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--ink);
    color: var(--bg-card);
    padding: 12px 14px;
    box-shadow: var(--shadow-tight);
    font-size: 0.86rem;
    line-height: 1.35;
    font-weight: 800;
    text-align: center;
    pointer-events: auto;
    animation: toastIn 0.18s ease;
}

.toast.error {
    background: var(--loss);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.toast.warning {
    background: #6b5b22;
    color: #fff6d8;
    border-color: rgba(255, 255, 255, 0.18);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.retry-btn {
    min-height: 36px;
    border: 0;
    border-radius: var(--radius-control);
    background: var(--brand);
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 800;
}

.footer {
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto 0;
    border-top: 1px solid var(--line);
    padding: 22px 0 0;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.footer p {
    margin: 4px 0;
}

.footer-updated {
    color: var(--text-secondary);
}

.footer-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.footer-btn {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 800;
    transition: background 0.16s ease, transform 0.16s ease;
}

.footer-btn:hover {
    transform: translateY(-1px);
    background: var(--brand-soft);
}

@media (max-width: 1080px) {
    .header {
        padding-left: 40px;
        padding-right: 40px;
    }

    .hero-hub,
    .agenda-content-grid {
        grid-template-columns: 1fr;
    }

    .agenda-content-grid .calendar-hub {
        position: static;
    }

    .hero-bottom {
        grid-column: 1;
        grid-row: 2;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-left: 0;
    }

    .competition-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body:not(.native-shell) {
        padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .header {
        min-height: 154px;
        padding: 22px 18px 58px;
    }

    .header-content {
        gap: 12px;
    }

    .logo {
        width: 52px;
        height: 52px;
    }

    .logo svg,
    .logo img {
        width: 100%;
        height: 100%;
    }

    .header-text h1 {
        font-size: 1.2rem;
        line-height: 1.1;
    }

    .subtitle {
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .product-disclosure {
        font-size: 0.58rem;
        letter-spacing: 0.055em;
    }

    .refresh-btn {
        width: 38px;
        height: 38px;
    }

    .header-actions {
        gap: 8px;
    }

    .container,
    .footer {
        width: min(100% - 20px, 440px);
    }

    .container {
        margin-top: -38px;
    }

    .hero-hub {
        min-height: auto;
        margin-bottom: 12px;
    }

    .hero-card {
        padding: 22px 18px 18px;
        gap: 18px;
    }

    .hero-comp {
        font-size: 0.68rem;
        white-space: normal;
    }

    .hero-teams {
        grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
        gap: 8px;
    }

    .hero-team,
    .hero-team:last-child {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }

    .hero-team .team-marker {
        width: 54px;
        height: 54px;
        min-width: 54px;
        flex-basis: 54px;
    }

    .hero-team-name {
        font-size: 0.92rem;
        line-height: 1.15;
    }

    .hero-empty-state {
        padding: 18px;
    }

    .hero-empty-state strong {
        font-size: 1rem;
    }

    .hero-empty-state span {
        font-size: 0.78rem;
    }

    .hero-center-score {
        min-width: 54px;
    }

    .hero-vs {
        font-size: 2rem;
    }

    .hero-score {
        font-size: 2rem;
    }

    .hero-meta {
        gap: 6px;
        font-size: 0.72rem;
    }

    .hero-meta-sep {
        display: none;
    }

    .hero-meta-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-bottom {
        padding: 18px;
        gap: 18px;
    }

    .hero-brazil-next {
        padding-top: 16px;
    }

    .hero-brazil-summary {
        padding: 8px;
    }

    .hero-brazil-item strong {
        font-size: 0.76rem;
    }

    .palmeiras-home-shell {
        gap: 12px;
        margin-bottom: 12px;
    }

    .club-home-panel,
    .club-match-board {
        padding: 16px;
    }

    .palmeiras-board-head,
    .palmeiras-board-head.compact {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .palmeiras-board-head h2 {
        font-size: 1.08rem;
    }

    .palmeiras-board-head h3,
    .palmeiras-snapshot-head h3 {
        font-size: 0.94rem;
    }

    .palmeiras-actions,
    .palmeiras-filter-group {
        justify-content: stretch;
    }

    .palmeiras-action,
    .palmeiras-filter {
        flex: 1 1 auto;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 0.72rem;
    }

    .palmeiras-snapshot-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .palmeiras-quick-summary,
    .palmeiras-match-summary {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .palmeiras-quick-teams,
    .palmeiras-teams {
        grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
        gap: 6px;
    }

    .palmeiras-quick-teams span,
    .palmeiras-team {
        gap: 5px;
        font-size: 0.72rem;
    }

    .palmeiras-quick-teams .team-marker,
    .palmeiras-team .team-marker {
        width: 18px;
        height: 18px;
        min-width: 18px;
        flex-basis: 18px;
    }

    .palmeiras-quick-teams strong,
    .club-score {
        min-width: 36px;
        padding: 5px;
        font-size: 0.76rem;
    }

    .palmeiras-match-meta {
        font-size: 0.6rem;
    }

    .countdown-digits {
        gap: 6px;
    }

    .cd-unit {
        min-width: 0;
        flex: 1;
        padding: 8px 4px 7px;
    }

    .cd-val {
        font-size: 1.1rem;
    }

    .cd-lbl {
        font-size: 0.52rem;
    }

    .card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .competition-hub {
        padding: 16px;
    }

    .competition-hub-head {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .competition-card-top {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .competition-status {
        justify-self: start;
    }

    .competition-record {
        gap: 5px;
    }

    .competition-record div {
        padding: 7px 3px;
    }

    .competition-record strong {
        font-size: 0.78rem;
    }

    .competition-record span {
        font-size: 0.52rem;
    }

    body:not(.native-shell) .tabs {
        position: fixed;
        z-index: 50;
        right: max(10px, env(safe-area-inset-right, 0px));
        bottom: max(8px, env(safe-area-inset-bottom, 0px));
        left: max(10px, env(safe-area-inset-left, 0px));
        width: min(calc(100% - 20px), 420px);
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        border-color: var(--line-strong);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.96);
        padding: 5px;
        overflow: hidden;
        box-shadow: 0 12px 36px rgba(4, 53, 34, 0.22);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    body.dark:not(.native-shell) .tabs {
        background: rgba(15, 30, 22, 0.96);
    }

    body:not(.native-shell) .tab-btn {
        min-width: 0;
        min-height: 54px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border-radius: 8px;
        padding: 5px 2px;
        font-size: 0.6rem;
        line-height: 1;
        white-space: nowrap;
    }

    body:not(.native-shell) .tab-btn::after {
        content: attr(data-mobile-label);
    }

    body:not(.native-shell) .tab-btn.active {
        background: var(--brand-soft);
        color: var(--brand);
    }

    body:not(.native-shell) .tab-label {
        display: none;
    }

    body:not(.native-shell) .tab-icon {
        width: 21px;
        height: 21px;
        display: block;
        flex: 0 0 21px;
    }

    .comp-legend {
        gap: 6px;
    }

    .comp-legend-item {
        font-size: 0.72rem;
        padding: 7px 9px;
    }

    .calendar-grid {
        gap: 3px;
    }

    .cal-head {
        font-size: 0.58rem;
    }

    .cal-day {
        min-height: 43px;
        padding: 5px 1px 3px;
        gap: 2px;
    }

    .cal-day-num {
        font-size: 0.68rem;
    }

    .cal-dot {
        width: 5px;
        height: 5px;
    }

    .cal-score {
        max-width: 34px;
        font-size: 0.48rem;
        padding: 1px 3px;
    }

    .cal-match-main {
        grid-template-columns: 40px minmax(0, 1fr) 54px;
        gap: 6px;
        padding: 10px;
    }

    .cal-match-comp {
        display: none;
    }

    .cal-match-teams {
        font-size: 0.72rem;
    }

    .cal-match-crest {
        width: 18px;
        height: 18px;
        min-width: 18px;
        flex-basis: 18px;
    }

    .cal-match-status {
        font-size: 0.56rem;
        padding: 5px 6px;
    }

    .cal-match-prediction {
        padding: 9px 10px 10px;
    }

    .prediction-card.compact .prediction-probs {
        grid-template-columns: 1fr;
    }

    .match-detail-head,
    .match-detail-meta {
        grid-template-columns: 1fr;
    }

    .match-detail-score {
        justify-self: start;
    }

    .match-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .standings-row {
        grid-template-columns: 24px minmax(0, 1fr) 32px;
        gap: 8px;
    }

    .section-head,
    .standings-head {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .standings-filter-group {
        justify-content: stretch;
    }

    .standings-filter {
        flex: 1 1 auto;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 0.72rem;
    }

    .standings-section-head,
    .standings-focus-grid {
        grid-template-columns: 1fr;
    }

    .standings-section-head > span:not(.competition-status),
    .standings-section-head .competition-status {
        justify-self: start;
    }

    .standings-row .stats {
        display: none;
    }

    .stats-grid {
        gap: 6px;
    }

    .stats-summary .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .stat-box {
        padding: 10px 5px;
    }

    .stats-summary .stat-box {
        min-height: 64px;
        padding: 12px 8px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stats-summary .stat-label {
        font-size: 0.66rem;
        white-space: nowrap;
    }

    .stats-row,
    .prediction-probs {
        grid-template-columns: 1fr;
    }

    .news-item {
        padding: 12px;
    }

    .worldcup-hero-panel,
    .worldcup-board-head {
        grid-template-columns: 1fr;
    }

    .worldcup-champion-heading {
        align-items: flex-start;
        gap: 11px;
    }

    .worldcup-champion-heading > img {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .worldcup-champion-side {
        min-width: 0;
        grid-template-columns: auto 1fr;
        justify-items: start;
        border-top: 1px solid var(--line);
        padding-top: 14px;
    }

    .worldcup-trophy {
        width: 38px;
        height: 38px;
    }

    .worldcup-hero-panel,
    .worldcup-board {
        padding: 16px;
    }

    .worldcup-actions,
    .worldcup-filter-group {
        justify-content: stretch;
    }

    .worldcup-action,
    .worldcup-filter {
        flex: 1 1 auto;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 0.72rem;
    }

    .worldcup-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .worldcup-info-item {
        padding: 12px;
    }

    .worldcup-info-item strong {
        font-size: 0.82rem;
    }

    .worldcup-brazil-panel {
        padding: 16px;
    }

    .worldcup-brazil-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .worldcup-brazil-summary {
        grid-template-columns: 46px minmax(0, 1fr);
        padding: 10px;
    }

    .worldcup-brazil-teams {
        grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
        font-size: 0.72rem;
    }

    .worldcup-match-summary {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .worldcup-teams {
        grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
        gap: 6px;
    }

    .worldcup-team {
        gap: 5px;
        font-size: 0.72rem;
    }

    .worldcup-team .team-marker {
        width: 18px;
        height: 18px;
        min-width: 18px;
        flex-basis: 18px;
    }

    .worldcup-score {
        min-width: 36px;
        padding: 5px;
        font-size: 0.76rem;
    }

    .worldcup-match-meta {
        font-size: 0.6rem;
    }

    .footer-actions {
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Feature expansion: shared team scope, next-match banner, history and preferences. */
.experience-toolbar {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    padding: 8px 10px;
}

.team-scope-control {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-soft);
    padding: 3px;
}

.team-scope-control button {
    min-height: 38px;
    border: 0;
    border-radius: calc(var(--radius-control) - 2px);
    background: transparent;
    color: var(--text-secondary);
    padding: 7px 12px;
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
}

.team-scope-control button.active {
    background: var(--brand);
    color: #fff;
}

.quick-preference-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.utility-icon-action {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--bg-soft);
    color: var(--text-secondary);
    padding: 0;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.utility-icon-action:hover,
.utility-icon-action:focus-visible,
.utility-icon-action:focus-within {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

.utility-icon-action.active,
.notification-toggle[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--brand) 46%, var(--line));
    background: var(--brand-soft);
    color: var(--brand);
}

.utility-icon-action:disabled {
    cursor: not-allowed;
    opacity: .48;
    transform: none;
}

.utility-icon-action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-scores-hidden,
.icon-alerts-on,
.spoiler-toggle.active .icon-scores-visible,
.notification-toggle[aria-pressed="true"] .icon-alerts-off {
    display: none;
}

.spoiler-toggle.active .icon-scores-hidden,
.notification-toggle[aria-pressed="true"] .icon-alerts-on {
    display: block;
}

.settings-section input {
    accent-color: var(--brand);
}

.toolbar-status {
    margin: 0;
}

body[data-team-scope="women"] .comp-legend-item:not([data-comp="all"]):not([data-comp="BFA1"]),
body[data-team-scope="men"] .women-competition {
    display: none;
}

.settings-section h3 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: .92rem;
}

.history-record {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 7px;
    margin-top: 10px;
}

.history-record div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    padding: 8px 4px;
    text-align: center;
}

.history-record strong,
.history-record span {
    display: block;
}

.history-record strong { color: var(--ink); font-size: .9rem; }
.history-record span { margin-top: 3px; color: var(--text-muted); font-size: .57rem; font-weight: 800; text-transform: uppercase; }

.history-filters {
    display: grid;
    grid-template-columns: 1fr 1fr .7fr auto;
    gap: 10px;
    margin-bottom: 16px;
}

.history-filters label {
    display: grid;
    gap: 5px;
    color: var(--text-muted);
    font-size: .66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.history-filters select,
.history-filters button {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--bg-soft);
    color: var(--text);
    padding: 8px 10px;
    font: inherit;
    font-size: .76rem;
    font-weight: 700;
}

.history-filters button { align-self: end; cursor: pointer; color: var(--brand); font-weight: 800; }
.history-record { margin: 0 0 14px; }

.history-match {
    border: 1px solid var(--line);
    border-top: 0;
    background: var(--bg-card);
}

.history-match:first-child { border-top: 1px solid var(--line); border-radius: var(--radius-control) var(--radius-control) 0 0; }
.history-match:last-child { border-radius: 0 0 var(--radius-control) var(--radius-control); }
.history-match summary { display: grid; grid-template-columns: 145px minmax(0,1fr) 130px; gap: 12px; align-items: center; padding: 12px; cursor: pointer; }
.history-match summary time,
.history-match summary small { color: var(--text-muted); font-size: .67rem; font-weight: 700; }
.history-match summary > div { display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); gap: 8px; align-items: center; }
.history-match summary > div span:last-child { text-align: right; }
.history-match summary strong { color: var(--ink); text-align: center; }
.history-match > div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 10px 12px; color: var(--text-muted); font-size: .7rem; }
.history-match a { color: var(--brand); font-weight: 800; }

.settings-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.settings-section { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--bg-soft); padding: 18px; }
.settings-section > p { color: var(--text-muted); font-size: .75rem; line-height: 1.45; }
.settings-section > label { min-height: 38px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); color: var(--text); font-size: .78rem; font-weight: 700; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.settings-status { min-height: 18px; margin-bottom: 0; }
.settings-link { width: 100%; min-height: 42px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--bg-card); color: var(--brand); padding: 9px 11px; cursor: pointer; text-decoration: none; font: inherit; font-size: .76rem; font-weight: 800; }
.settings-link + .settings-link { margin-top: 8px; }

body.spoiler-free [data-spoiler-score="true"] {
    position: relative;
    color: transparent !important;
    user-select: none;
}

body.spoiler-free [data-spoiler-score="true"] > * { visibility: hidden; }
body.spoiler-free [data-spoiler-score="true"]::after {
    content: "Oculto";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cal-dot.bfa1,
.cal-match.bfa1,
.cal-match-comp.bfa1,
.competition-card.bfa1 { --comp-color: #8b3f68; }

@media (max-width: 720px) {
    body:not(.native-shell) .tabs .tab-secondary { display: none !important; }
    .agenda-content-grid { gap: 12px; }
    .experience-toolbar { margin: 10px 0; padding: 7px 8px; }
    .team-scope-control { flex: 1 1 auto; }
    .team-scope-control button { flex: 1; }
    .quick-preference-actions { flex: 0 0 auto; gap: 6px; }
    .hero-context { gap: 14px; padding-top: 16px; }
    .hero-record-stats { gap: 5px; }
    .hero-record-stats div { padding-inline: 2px; }
    .hero-icon-actions { padding-top: 14px; }
    .history-filters { grid-template-columns: 1fr 1fr; }
    .history-record { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .history-match summary { grid-template-columns: 1fr; gap: 7px; }
    .history-match summary small { text-align: left; }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .team-scope-control button { padding-inline: 8px; font-size: .72rem; }
    .experience-toolbar { gap: 6px; }
    .history-filters { grid-template-columns: 1fr; }
}

/* Club flags are supplied by the API or the local fallback map. */
.hero-team img {
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.22));
}

.palmeiras-quick-teams img,
.palmeiras-team img,
.worldcup-team img {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex: 0 0 24px;
    object-fit: contain;
}

.cal-match-crest {
    object-fit: contain;
}
