/* Revisão final de contraste: carregada por último para neutralizar regras antigas. */
html[data-theme="dark"]{--contrast-text:#f4faf7;--contrast-muted:#b7c8c0;--contrast-soft:#91a79c;--contrast-line:#3d554b;--contrast-panel:#10231c;--contrast-panel-2:#162d25}
html:not([data-theme="dark"]){--contrast-text:#10251d;--contrast-muted:#52685e;--contrast-soft:#657a70;--contrast-line:#b8c8c0;--contrast-panel:#fff;--contrast-panel-2:#edf3ef}

/* Textos estruturais e informações secundárias. */
html[data-theme="dark"] :is(.quiet,.mp-waiting,.mp-tactics-help,.mp-reveal-hint,.mp-mm-help,.mp-fm-team-head small,.mp-pm-card small,.mp-rh-card small,.mp-cmx-card small,.mp-intel-assistant small,.mp-mm-card small,.mp-v2-pressure header,.mp-v2-pressure footer){color:var(--contrast-muted)!important}
html[data-theme="dark"] :is(.panel-title small,.mp-manager-head small,.mp-fm-commentary small,.mp-mm-timeline small,.mp-rh-events small,.mp-cmx-events small,.mp-mini-player small,.team-coach){color:var(--contrast-soft)!important}
html[data-theme="dark"] :is(.mp-panel,.mp-pm-card,.mp-rh-card,.mp-fm-card,.mp-cmx-card,.mp-cmx-bench,.mp-mm-card){border-color:var(--contrast-line)}
html[data-theme="dark"] :is(.mp-rh-rank,.mp-rh-table,.mp-rh-full-row,.mp-mm-table-row,.mp-mm-timeline p,.mp-cmx-events p,.mp-rh-events p){color:var(--contrast-text)}

/* Verde-limão funciona como destaque no escuro; no claro vira verde profundo. */
html:not([data-theme="dark"]) :is(.mp-rh-card h3,.mp-fm-card>h3,.mp-cmx-card h3,.mp-cmx-post h3,.mp-mm-card h2,.mp-mm-card h3,.mp-mm-bench header b,.mp-manager-reserve-title,.mp-post-highlights h3,.mp-v2-pressure header b){color:#174f39!important}
html:not([data-theme="dark"]) :is(.quiet,.mp-waiting,.mp-tactics-help,.mp-reveal-hint,.mp-mm-help,.mp-fm-team-head small,.mp-pm-card small,.mp-rh-card small,.mp-cmx-card small,.mp-mm-card small,.team-coach){color:var(--contrast-muted)!important}
html:not([data-theme="dark"]) :is(.mp-rh-full-row,.mp-mm-table-row,.mp-rh-rank,.mp-rh-table,.mp-cmx-games p,.mp-rh-games p,.mp-mm-league-list>p){color:var(--contrast-text)}

/* Abas e botões: estado inativo legível e ativo inequívoco. */
html[data-theme="dark"] :is(.mp-cmx-tabs button,.mp-cmx-tactics button,.mp-fm-tactics button,.mp-mm-team>nav button,.mp-mm-data-tabs button,.mp-mm-league>nav button){color:#d1ddd7!important;border-color:#456057!important}
html[data-theme="dark"] :is(.mp-cmx-tabs button.active,.mp-cmx-tactics button.active,.mp-fm-tactics button.active,.mp-mm-team>nav button.active,.mp-mm-data-tabs button.active,.mp-mm-league>nav button.active){color:#071b13!important;background:#c7ff38!important}
html:not([data-theme="dark"]) :is(.mp-cmx-tabs button,.mp-cmx-tactics button,.mp-fm-tactics button,.mp-mm-team>nav button,.mp-mm-data-tabs button,.mp-mm-league>nav button){color:#294a3b!important}
html:not([data-theme="dark"]) :is(.mp-cmx-tabs button.active,.mp-cmx-tactics button.active,.mp-fm-tactics button.active,.mp-mm-team>nav button.active,.mp-mm-data-tabs button.active,.mp-mm-league>nav button.active){color:#fff!important;background:#174b37!important}

/* Placar, eventos e avisos precisam permanecer legíveis em qualquer tema. */
:is(.mp-fm-score,.mp-mm-score,.mp-cmx-score,.mp-rh-result){color:#fff!important}
:is(.mp-fm-score,.mp-mm-score,.mp-cmx-score,.mp-rh-result) small{color:#c4d7ce!important}
:is(.mp-fm-score,.mp-mm-score,.mp-cmx-score,.mp-rh-result) strong,:is(.mp-fm-score,.mp-mm-score,.mp-cmx-score,.mp-rh-result) b{color:#fff}
.mp-big-moment,.mp-halftime,.mp-intel-assistant{color:#f5faf7}
.mp-halftime p,.mp-intel-assistant p{color:#d9e7e0!important}
.mp-halftime strong,.mp-intel-assistant strong{color:#fff!important}
.mp-position-loss,.penalty{color:#d92f29!important;font-weight:800!important}
html[data-theme="dark"] .mp-position-loss,html[data-theme="dark"] .penalty{color:#ff756c!important}

/* Campos: nome, posição e números com sombra suficiente sobre o gramado. */
:is(.mp-fm-formation,.mp-fm-pitch,.mp-manager-pitch,.mp-draft-pitch) :is(.mp-fm-player>b,.mp-fm-player>small,.slot>small){color:#fff!important;text-shadow:0 2px 4px #00170f,0 0 2px #00170f!important}
:is(.mp-fm-formation,.mp-fm-pitch,.mp-manager-pitch,.mp-draft-pitch) :is(.mp-fm-player>span,.slot-node){font-weight:800}

/* Tabelas: cabeçalho e legenda separados visualmente das linhas. */
html[data-theme="dark"] :is(.mp-rh-full-row.header,.mp-mm-table-row.header){background:#20342c!important;color:#dbe7e1!important}
html:not([data-theme="dark"]) :is(.mp-rh-full-row.header,.mp-mm-table-row.header){background:#dfe9e3!important;color:#344f43!important}
.mp-rh-table-legend,.mp-mm-table-legend{font-weight:800!important}
.mp-rh-full-row>strong,.mp-mm-table-row>strong{font-weight:800}

/* Mobile: evita tipos excessivamente pequenos e apagados. */
@media(max-width:980px){.mp-mobile-matchday :is(.mp-mm-card small,.mp-fm-player>small,.mp-mm-timeline small){line-height:1.35}.mp-mm-bottom button{color:var(--contrast-muted)!important}.mp-mm-bottom button.active{color:#c7ff38!important}.mp-v2-speed small{color:#bfd0c8!important}.mp-v2-speed button:not(.active){color:#d5e1db!important;border-color:#50695e!important}.mp-mm-table-row.header{font-weight:800}}

/* Central da Liga no PC: abas leves, sem o bloco escuro desproporcional. */
@media(min-width:981px){#mpSeason.fm-round-hub .mp-rh-ranking{padding-top:8px}#mpSeason.fm-round-hub .mp-rh-ranking>nav{gap:5px;margin:-1px 0 8px;padding:4px;border:1px solid var(--contrast-line);border-radius:8px;background:var(--contrast-panel-2)}#mpSeason.fm-round-hub .mp-rh-ranking>nav button{height:34px;border:1px solid transparent!important;border-radius:5px;background:transparent!important;color:var(--contrast-muted)!important;transition:.18s ease}#mpSeason.fm-round-hub .mp-rh-ranking>nav button:hover{background:color-mix(in srgb,#24714f 9%,transparent)!important;color:var(--contrast-text)!important}#mpSeason.fm-round-hub .mp-rh-ranking>nav button.active{border-color:#4c8c6d!important;background:color-mix(in srgb,#2f805d 15%,var(--contrast-panel))!important;color:#1d6247!important;box-shadow:inset 0 -2px #2e805d}html[data-theme="dark"] #mpSeason.fm-round-hub .mp-rh-ranking>nav button.active{border-color:#7fae42!important;background:#213a2d!important;color:#d8ff78!important;box-shadow:inset 0 -2px #bfff38}#mpSeason.fm-round-hub .mp-rh-table-legend{position:relative;min-height:26px;padding:5px 20px 11px 5px;border-bottom:1px solid var(--contrast-line);background:transparent!important}}

/* Giro editorial da rodada no lugar da repetição das estatísticas. */
.mp-round-editorial{display:grid;gap:10px}.mp-round-editorial>h2{margin-bottom:0}.mp-round-hero{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mp-round-hero>span,.mp-round-grid article,.mp-round-status>span{display:block;padding:11px;border:1px solid var(--contrast-line);border-radius:8px;background:var(--contrast-panel-2)}.mp-round-editorial small{display:block;color:var(--contrast-muted)!important;font:800 6px "DM Sans";letter-spacing:.1em}.mp-round-editorial b{display:block;margin-top:5px;color:var(--contrast-text);font:700 13px Oswald}.mp-round-editorial em{display:block;margin-top:3px;color:var(--contrast-muted);font:600 7px "DM Sans";font-style:normal}.mp-round-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mp-round-grid article strong{display:block;margin-top:6px;color:#36775a;font:800 7px "DM Sans"}.mp-round-grid article.up{border-left:4px solid #42a96c}.mp-round-grid article.down{border-left:4px solid #df6464}.mp-round-grid article.down strong{color:#ba4848}.mp-round-status{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.mp-round-status b{display:flex;align-items:center;gap:5px;font-size:10px}.mp-round-status .team-logo{width:23px;height:23px}.mp-round-star{border-color:#6f9d42!important;background:linear-gradient(145deg,color-mix(in srgb,#bfff38 13%,var(--contrast-panel)),var(--contrast-panel-2))!important;box-shadow:inset 3px 0 #8fcf35}.mp-round-star small{color:#397021!important}html[data-theme="dark"] .mp-round-star small{color:#c7ff38!important}html[data-theme="dark"] .mp-round-grid article strong{color:#8dddab}html[data-theme="dark"] .mp-round-grid article.down strong{color:#ff8b87}@media(max-width:520px){.mp-round-hero,.mp-round-grid{grid-template-columns:1fr}.mp-round-status{grid-template-columns:1fr}.mp-round-hero>span,.mp-round-grid article,.mp-round-status>span{padding:12px}.mp-round-editorial b{font-size:14px}}
.team-logo.team-logo-bot{display:inline-block;padding:1px;border:0;background:transparent;object-fit:contain;box-shadow:0 3px 9px rgba(2,24,17,.34)}
