/* ---------- tokens: claro ----------
   marrom vintage (topo, títulos) com roxo claro (destaques, botões ativos, mapas); contraste do texto >= 4,5:1 */
:root {
  color-scheme: light;
  --bg: #f4eee4; --surface: #fffcf7; --surface-2: #fbf7f0; --surface-3: #efe6d8;
  --ink: #2a1d15; --ink2: #5b4a3e; --muted: #75665b; --line: #e7dccb; --line-2: #d5c6b0;
  --brand: #5a3825; --brand-2: #7a5aa8; --brand-2-ink: #ffffff; --brand-ink: #ffffff; --brand-soft: #eee6f6;
  --tinta-pagina: #f4eee4;
  --gold: #c9a227; --gold-ink: #7a5b00; --gold-soft: #fbf3d9;
  --cla: #6a2a86; --cla-soft: #f3e8f8; --pre: #2d5f8a; --pre-soft: #e6eef6; --con: #1f6b45; --con-soft: #e3f1e8;
  --parc: #8a6d3b; --parc-soft: #f6eedd;
  /* séries: paleta de referência validada (ordem fixa); na ficha e na comparação, viram as cores dos clubes (clube.js) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s-neutro: #a9aaa3;
  --h2h-a: #2a78d6; --h2h-b: #eb6834;   /* barra dos clássicos: fixa, não veste as cores do clube */
  /* sequencial roxo */
  --q1: #ece6f6; --q2: #d6c9ee; --q3: #bba7e2; --q4: #9d83d2; --q5: #7f62bd; --q6: #63479f; --q7: #4a3180;
  --mapa-vazio: #e8e0d3; --mapa-borda: #fffcf7; --mapa-outro: #d8c9ec; --mapa-rank: #8d6cc0; --mapa-hover: #c9a227;
  --dica-bg: #2a1d15; --dica-ink: #f6efe6;
  --sombra: 0 1px 2px rgba(42, 29, 21, .07), 0 4px 14px rgba(42, 29, 21, .07);
  --raio: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15100d; --surface: #1f1814; --surface-2: #1f1814; --surface-3: #29201b;
    --ink: #f3ebe2; --ink2: #cdbfb1; --muted: #a29384; --line: #382c25; --line-2: #4a3b31;
    --brand: #3a2417; --brand-2: #b9a0e6; --brand-2-ink: #1f1814; --brand-ink: #ffffff; --brand-soft: #2d2538;
    --tinta-pagina: #15100d;
    --gold: #e0b737; --gold-ink: #f0cf62; --gold-soft: #33301f;
    --cla: #c99ae0; --cla-soft: #34243d; --pre: #8ab6e0; --pre-soft: #1f2c3a; --con: #7fd1a3; --con-soft: #1d3327;
    --parc: #d9b97a; --parc-soft: #3a3220;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s-neutro: #6d6e66; --h2h-a: #3987e5; --h2h-b: #d95926;
    --q1: #3a2a5c; --q2: #4a3576; --q3: #5c4490; --q4: #7257ab; --q5: #8d74c3; --q6: #ad9ad8; --q7: #d6cbee;
    --mapa-vazio: #2a221d; --mapa-borda: #1f1814; --mapa-outro: #4a3d5e; --mapa-rank: #a68bd4;
    --dica-bg: #f3ebe2; --dica-ink: #2a1d15;
    --sombra: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15100d; --surface: #1f1814; --surface-2: #1f1814; --surface-3: #29201b;
  --ink: #f3ebe2; --ink2: #cdbfb1; --muted: #a29384; --line: #382c25; --line-2: #4a3b31;
  --brand: #3a2417; --brand-2: #b9a0e6; --brand-2-ink: #1f1814; --brand-ink: #ffffff; --brand-soft: #2d2538;
  --tinta-pagina: #15100d;
  --gold: #e0b737; --gold-ink: #f0cf62; --gold-soft: #33301f;
  --cla: #c99ae0; --cla-soft: #34243d; --pre: #8ab6e0; --pre-soft: #1f2c3a; --con: #7fd1a3; --con-soft: #1d3327;
  --parc: #d9b97a; --parc-soft: #3a3220;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s-neutro: #6d6e66; --h2h-a: #3987e5; --h2h-b: #d95926;
  --q1: #3a2a5c; --q2: #4a3576; --q3: #5c4490; --q4: #7257ab; --q5: #8d74c3; --q6: #ad9ad8; --q7: #d6cbee;
  --mapa-vazio: #2a221d; --mapa-borda: #1f1814; --mapa-outro: #4a3d5e; --mapa-rank: #a68bd4;
  --dica-bg: #f3ebe2; --dica-ink: #2a1d15;
  --sombra: 0 1px 2px rgba(0, 0, 0, .4);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Inter", sans-serif; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
button, select, input { font: inherit; color: inherit; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- topo ---------- */
.topo { position: sticky; top: 0; z-index: 30; background: var(--brand); color: var(--topo-ink, var(--brand-ink)); box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  transition: background-color .35s; }
.topo-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.marca { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; white-space: nowrap; }
.marca b { font-weight: 800; }
.marca-coroa { width: 26px; height: 18px; fill: var(--gold); flex: none; }
.busca { position: relative; flex: 1; max-width: 360px; margin-left: auto; }
.busca input { width: 100%; padding: 8px 12px; border-radius: 999px; border: 0; background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; }
.busca input::placeholder { color: inherit; opacity: .72; }
.busca input:focus { outline: 2px solid var(--gold); background: color-mix(in srgb, currentColor 22%, transparent); }
.busca-res { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); color: var(--ink); border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2); overflow: hidden; max-height: 60vh; overflow-y: auto; }
.busca-res a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; text-decoration: none; border-bottom: 1px solid var(--line); }
.busca-res a:hover, .busca-res a:focus { background: var(--surface-3); outline: none; }
.busca-res small { display: block; color: var(--muted); font-size: .78rem; }
.icone { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; border: 0; border-radius: 999px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; flex: none; }
.icone svg { width: 18px; height: 18px; fill: currentColor; }
.abas { max-width: 1240px; margin: 0 auto; padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.abas a { padding: 9px 12px 11px; text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .92rem; opacity: .78; border-bottom: 3px solid transparent; }
.abas a:hover { opacity: 1; }
.abas a.ativa { opacity: 1; border-bottom-color: var(--gold); }

main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; min-height: 70vh; outline: none; }
.carregando { padding: 60px 0; text-align: center; color: var(--muted); }
.rodape { max-width: 1240px; margin: 0 auto; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }

/* ---------- blocos ---------- */
.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px; }
.cartao + .cartao, .secao + .secao { margin-top: 16px; }
.grade > .cartao { margin-top: 0; }   /* na grade, o espaço é o gap: a margem desalinhava o primeiro cartão da linha */
.secao { margin-top: 26px; }
.secao > h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.secao > h2 small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.lead { color: var(--ink2); max-width: 70ch; }
.cab { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; justify-content: space-between; margin-bottom: 14px; }
.kick { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--brand-2); }
.grade { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.voltar { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--ink2); font-size: .9rem; margin-bottom: 8px; }
.voltar:hover { color: var(--ink); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kpi span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpi small { display: block; color: var(--ink2); font-size: .8rem; }

/* controles */
.controles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--ink2); }
.chip:hover { border-color: var(--brand-2); color: var(--ink); }
.chip.on { background: var(--brand-2); border-color: var(--brand-2); color: var(--brand-2-ink); }
select, .campo { border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 6px 10px; }
label.chk { display: inline-flex; gap: 6px; align-items: center; font-size: .86rem; color: var(--ink2); cursor: pointer; }

/* abas internas */
.subabas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 14px; overflow-x: auto; scrollbar-width: none; }
.subabas button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.subabas button.on { color: var(--ink); border-bottom-color: var(--brand-2); }

/* ---------- escudos ---------- */
.esc { width: 32px; height: 32px; object-fit: contain; flex: none; }
.esc.p { width: 22px; height: 22px; }
.esc.g { width: 64px; height: 64px; }
.esc.xg { width: 96px; height: 96px; }
.ini { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--ink2); font-weight: 700; font-size: .7rem; border: 1px solid var(--line-2); }

/* ---------- mapas ---------- */
.mapa-wrap { position: relative; background: var(--surface-2); border-radius: var(--raio); border: 1px solid var(--line); overflow: hidden; touch-action: none; }
.mapa-wrap svg { display: block; width: 100%; height: auto; }
.mapa-wrap path.pais { stroke: var(--mapa-borda); stroke-width: .5; vector-effect: non-scaling-stroke; transition: fill .2s; }
.mapa-wrap path.clicavel { cursor: pointer; }
.mapa-wrap path.clicavel:hover, .mapa-wrap path.sel { fill: var(--mapa-hover) !important; }
.mapa-wrap path.uf { stroke: var(--mapa-borda); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s; }
.mapa-wrap path.uf:hover, .mapa-wrap path.uf.sel { fill: var(--mapa-hover) !important; }
.mapa-wrap image.marcador { cursor: pointer; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45)); }
.mapa-wrap text.rot { font-size: 9px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; pointer-events: none; }
.zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; cursor: pointer; box-shadow: var(--sombra); }
.atalhos { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; max-width: 70%; }
.atalhos .chip { box-shadow: var(--sombra); padding: 4px 10px; font-size: .8rem; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .8rem; color: var(--ink2); margin-top: 8px; }
.legenda i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; border: 1px solid var(--line-2); }
.escala { display: inline-flex; align-items: center; gap: 6px; }
.escala .barra { display: flex; height: 12px; width: 160px; border-radius: 3px; overflow: hidden; }
.escala .barra span { flex: 1; }
.dicamapa { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* layout mapa + painel */
.mapa-painel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .mapa-painel { grid-template-columns: 1fr; } }
.painel { position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow-y: auto; }
@media (max-width: 900px) { .painel { position: static; max-height: none; } }

/* cartões de país */
.pais-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pais-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16, 32, 24, .12); }
.pais-card .tp { display: flex; justify-content: space-between; align-items: baseline; }
.pais-card .tp b { font-size: 1.05rem; }
.pais-card .tp small { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.mini3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; font-size: .78rem; }
.mini3 div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mini3 em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- ranking ---------- */
.rk { display: flex; flex-direction: column; gap: 8px; }
.linha { display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) minmax(200px, 300px) 64px; gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.linha:hover { border-color: var(--brand-2); }
.linha.top1 { border-color: var(--gold); background: linear-gradient(90deg, var(--gold-soft), var(--surface) 40%); }
.linha .pos { font-weight: 800; font-size: 1.15rem; color: var(--ink2); text-align: center; font-variant-numeric: tabular-nums; }
.linha.top1 .pos, .linha.top2 .pos, .linha.top3 .pos { color: var(--gold-ink); }
.linha .nm b { display: block; font-size: 1rem; }
.linha .nm small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.linha .nota { text-align: right; font-weight: 800; font-size: 1.45rem; color: var(--brand-2); font-variant-numeric: tabular-nums; line-height: 1; }
.linha .nota small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); margin-top: 3px; }
.crit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.crit div { font-size: .68rem; color: var(--muted); }
.crit div b { display: block; font-size: .85rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.crit .bar { display: block; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.crit .bar i { display: block; height: 100%; border-radius: 3px; }
.cmp-box { display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .linha { grid-template-columns: 28px 34px minmax(0, 1fr) 54px; }
  .linha .crit { grid-column: 3 / 5; grid-row: 2; }
  .linha .nota { grid-column: 4; grid-row: 1; }
}

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tag { font-size: .7rem; font-weight: 700; border-radius: 6px; padding: 2px 7px; cursor: help; border: 1px solid transparent; white-space: nowrap; }
.tag.rei { background: var(--gold-soft); color: var(--gold-ink); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.tag.consistente { background: var(--con-soft); color: var(--con); }
.tag.presente { background: var(--pre-soft); color: var(--pre); }
.tag.classico { background: var(--cla-soft); color: var(--cla); }
.tag:focus { outline: 2px solid var(--brand-2); }

/* tooltip */
.dica { position: fixed; z-index: 100; max-width: min(340px, calc(100vw - 24px)); background: var(--dica-bg); color: var(--dica-ink); border-radius: 10px; padding: 10px 12px;
  font-size: .84rem; line-height: 1.45; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); pointer-events: none; }
.dica b { display: block; margin-bottom: 3px; font-size: .9rem; }
.dica .bn { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--gold); }
.dica .esc { width: 26px; height: 26px; vertical-align: middle; margin-right: 6px; }
.dica table { border-collapse: collapse; margin-top: 4px; }
.dica td { padding: 1px 8px 1px 0; }

/* destaques */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.dcard { border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.dcard .rot { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.dcard.rei { background: var(--gold-soft); } .dcard.rei .rot { color: var(--gold-ink); }
.dcard.consistente { background: var(--con-soft); } .dcard.consistente .rot { color: var(--con); }
.dcard.presente { background: var(--pre-soft); } .dcard.presente .rot { color: var(--pre); }
.dcard .cl { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.dcard p { font-size: .8rem; color: var(--ink2); margin: 0; }
.dcard .bn { font-size: .72rem; font-weight: 700; color: var(--muted); }

/* clássicos */
.clas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.cl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cl-card.n1 { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 55%); }
.cl-card .t { font-weight: 800; text-align: center; font-size: .95rem; }
.cl-card .t small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
.cl-m { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: end; text-align: center; }
.cl-x { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.cl-x b { font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1; }
.cl-x span { font-size: .75rem; color: var(--ink2); line-height: 1.2; }
.coroa { width: 30px; height: 20px; }
.coroa-vazia { height: 20px; }
.cl-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 6px; font-size: .72rem; color: var(--muted); }
.cl-c .bal { width: 32px; height: 26px; }
.cl-c .sit { font-weight: 700; font-size: .72rem; }
.cl-c .sit.parcial { color: var(--parc); background: var(--parc-soft); border-radius: 6px; padding: 1px 6px; }
.h2h { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface); }
.h2h i { display: block; height: 100%; }
.cl-card .rod { font-size: .72rem; color: var(--muted); text-align: center; line-height: 1.35; }

/* campeões */
.camp ol { list-style: none; margin: 0; padding: 0; }
.camp li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: .9rem; cursor: pointer; }
.camp li:last-child { border: 0; }
.camp li span { flex: 1; }
.camp li em { font-style: normal; font-weight: 800; color: var(--brand-2); font-variant-numeric: tabular-nums; }

/* gráficos */
.graf { position: relative; width: 100%; }
.graf.h300 { height: 300px; } .graf.h420 { height: 420px; } .graf.h520 { height: 520px; } .graf.h260 { height: 260px; }
@media (max-width: 600px) { .graf.h520 { height: 640px; } .graf.h420 { height: 460px; } }
.nota-graf { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* pódio */
.podio { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; max-width: 760px; margin: 10px auto 0; }
.pd { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 6px 6px; padding: 14px 8px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px; animation: sobe .7s ease-out both; }
.pd.p1 { min-height: 230px; background: linear-gradient(180deg, var(--gold-soft), var(--surface)); border-color: var(--gold); animation-delay: .25s; }
.pd.p2 { min-height: 190px; animation-delay: .1s; } .pd.p3 { min-height: 170px; animation-delay: .4s; }
.pd .lugar { font-weight: 800; font-size: 1.6rem; color: var(--gold-ink); line-height: 1; }
.pd b { font-size: 1rem; } .pd em { font-style: normal; color: var(--brand-2); font-weight: 800; font-size: 1.2rem; }
@keyframes sobe { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pd { animation: none; } }

/* clube */
.clube-cab { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.clube-cab .info { flex: 1; min-width: 220px; }
.rk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rk-chip { border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; font-size: .8rem; text-decoration: none; background: var(--surface); }
.rk-chip b { color: var(--brand-2); }
table.tab { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.tab th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
table.tab td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tab td.n { text-align: right; font-variant-numeric: tabular-nums; }
.lista-tags { display: flex; flex-direction: column; gap: 8px; }
.lista-tags div { display: flex; gap: 10px; align-items: baseline; }
.lista-tags p { margin: 0; font-size: .86rem; color: var(--ink2); }
.fato { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.fato b { width: 44px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.fato b.neg { color: #c43d3d; } .fato b.pos { color: var(--brand-2); }

/* comparar */
.cmp-esc { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.cmp-esc .x { font-weight: 800; color: var(--muted); }
.seletor { position: relative; }
.seletor .esc-sel { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px dashed var(--line-2); border-radius: 10px; min-height: 60px; }
.seletor input { width: 100%; }
@media (max-width: 600px) { .cmp-esc { grid-template-columns: 1fr; } .cmp-esc .x { text-align: center; } }

.aviso { background: var(--parc-soft); color: var(--ink2); border-radius: 8px; padding: 8px 12px; font-size: .84rem; }
.vazio { color: var(--muted); padding: 20px; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* painel lateral estreito: critérios embaixo do nome, como no celular */
.painel .linha { grid-template-columns: 28px 34px minmax(0, 1fr) 54px; }
.painel .linha .crit { grid-column: 3 / 5; grid-row: 2; }
.painel .linha .nota { grid-column: 4; grid-row: 1; }

/* celular: busca numa linha própria; tabelas com rolagem lateral */
@media (max-width: 640px) {
  .topo-in { flex-wrap: wrap; row-gap: 8px; }
  .busca { order: 3; flex-basis: 100%; max-width: none; }
  .marca { font-size: .98rem; }
}
.cartao:has(> table.tab) { overflow-x: auto; }
.mais { display: block; margin: 14px auto 0; }

/* trajetória */
:root { --tr-b1: #ece5f5; --tr-b2: #f3e9d9; --tr-b3: #f2e2dc; --tr-b4: #e3e9da; --tr-fora: #ebe5dc; --tr-fora-pt: #a89c90; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tr-b1: #2a2338; --tr-b2: #30271b; --tr-b3: #34241f; --tr-b4: #242a1f; --tr-fora: #27211c; --tr-fora-pt: #7a6d61; } }
:root[data-theme="dark"] { --tr-b1: #2a2338; --tr-b2: #30271b; --tr-b3: #34241f; --tr-b4: #242a1f; --tr-fora: #27211c; --tr-fora-pt: #7a6d61; }
.tr-wrap { width: 100%; overflow: hidden; touch-action: pan-y; }
.tr-wrap svg { display: block; width: 100%; height: auto; cursor: grab; }
.tr-rot { font-size: 11px; fill: var(--ink2); font-weight: 600; }
.tr-eixo text { font-size: 11px; fill: var(--muted); }
.tr-ctl .legenda { margin: 0 0 0 auto; }
/* clássico: o nome e o placar abrem a ficha do clássico */
.cl-card [data-classico] { cursor: pointer; border-radius: 8px; transition: background .15s; }
.cl-card [data-classico]:hover, .cl-card [data-classico]:focus-visible { background: var(--gold-soft); outline: none; }
.cl-card .t[data-classico]:hover { text-decoration: underline; text-underline-offset: 3px; }
.cl-cmp { display: block; margin-top: 2px; font-weight: 700; color: var(--ink2); text-decoration: none; }
.cl-cmp:hover { text-decoration: underline; }
/* trajetória: foco numa faixa, ano sob o mouse, bordas da faixa */
.tr-rot { cursor: pointer; }
.tr-rot:hover, .tr-rot.on { fill: var(--ink); text-decoration: underline; }
.tr-borda { font-size: 10px; fill: var(--muted); }
.tr-faixas rect { cursor: pointer; }
.tr-grade line { stroke: var(--line); stroke-width: 1; opacity: .7; }
.tr-cruz { stroke: var(--ink2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.tr-alvo { fill: none; stroke-width: 2; }
.legenda i.ouro { background: var(--gold); border-radius: 50%; }
.tr-sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }

/* ---------- cores dos clubes (js/clube.js) ---------- */
/* ficha: faixa com as duas cores do clube embaixo do topo e o cabeçalho do clube com a cor principal */
.vestido .topo::after, .dividido .topo::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; }
.vestido .topo::after { background: linear-gradient(90deg, var(--clube-a) 0 50%, var(--clube-b) 50% 100%); }
.vestido .abas a.ativa, .dividido .abas a.ativa { border-bottom-color: currentColor; }
body { transition: background-color .35s; }
.clube-topo { border-top: 6px solid var(--brand); background: linear-gradient(135deg, var(--brand-soft), var(--surface) 65%); }
.vestido .clube-topo h1 { color: var(--brand-2); }
/* comparação: metade da tela de cada clube */
.dividido body { background: linear-gradient(90deg, var(--cmp-a-tinta, var(--bg)) 0 50%, var(--cmp-b-tinta, var(--bg)) 50% 100%) fixed; }
.dividido .topo { background: linear-gradient(90deg, var(--cmp-a, var(--brand)) 0 50%, var(--cmp-b, var(--brand)) 50% 100%); }
.dividido .topo::after { background: linear-gradient(90deg, var(--cmp-a, var(--brand)) 0 50%, var(--cmp-b, var(--brand)) 50% 100%); filter: brightness(.8); }
.dividido .cmp-esc { padding: 0; overflow: hidden; gap: 0; border: 0; }
.dividido .cmp-esc .seletor { padding: 14px; }
.dividido #sa { background: var(--cmp-a, var(--surface)); color: var(--cmp-a-ink, var(--ink)); }
.dividido #sb { background: var(--cmp-b, var(--surface)); color: var(--cmp-b-ink, var(--ink)); }
.dividido .cmp-esc .x { align-self: stretch; display: grid; place-items: center; padding: 0 12px; color: #fff; font-size: 1.4rem;
  background: linear-gradient(90deg, var(--cmp-a, var(--brand)) 0 50%, var(--cmp-b, var(--brand)) 50% 100%); text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.dividido .seletor .esc-sel { border: 0; background: color-mix(in srgb, currentColor 10%, transparent); }
.dividido .seletor .esc-sel .dicamapa { color: inherit; opacity: .8; }
.dividido .seletor input { background: var(--surface); color: var(--ink); border-color: transparent; }
.cmp-tab th.a { color: var(--s1); } .cmp-tab th.b { color: var(--s2); }
.cmp-tab td.a { box-shadow: inset 3px 0 0 var(--s1); } .cmp-tab td.b { box-shadow: inset -3px 0 0 var(--s2); }
@media (max-width: 600px) {
  .dividido .cmp-esc .x { background: linear-gradient(180deg, var(--cmp-a, var(--brand)) 0 50%, var(--cmp-b, var(--brand)) 50% 100%); padding: 6px 0; }
}

/* ---------- fixar e comparar até 6 clubes (js/fixados.js) ---------- */
/* séries 5 e 6 da paleta validada (6 cores: daltonismo e separação ok nos dois temas; no claro, 3 cores abaixo de 3:1 no fundo,
   por isso a comparação sempre tem legenda com os nomes e a tabela); queda e acesso: sempre com o triângulo, nunca só a cor */
:root { --s5: #e87ba4; --s6: #008300; --queda: #b8372f; --acesso: #1f6b45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s5: #d55181; --s6: #008300; --queda: #ec7a72; --acesso: #7fd1a3; } }
:root[data-theme="dark"] { --s5: #d55181; --s6: #008300; --queda: #ec7a72; --acesso: #7fd1a3; }
[data-fixar] { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.linha.fixo, .dcard.fixo { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.pd.fixo, .cl-x.fixo, .camp li.fixo, .mq-top li.fixo, .qv-lista li.fixo, .mq-tab td.fixo { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.pino-i { width: 14px; height: 14px; fill: currentColor; vertical-align: -2px; }
.chip.pino, .img-bt { display: inline-flex; align-items: center; gap: 6px; }
.img-bt svg { width: 15px; height: 15px; fill: currentColor; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.clube-cab .acoes { flex-basis: 100%; margin-top: 0; }
.fixados { position: fixed; z-index: 40; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--brand-2);
  border-radius: 14px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
.fx-cab { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
.fx-cab b { color: var(--ink); display: flex; align-items: center; gap: 5px; }
.fx-limpar { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .8rem; text-decoration: underline; }
.fx-aviso { font-size: .8rem; color: var(--gold-ink); margin: 6px 0 0; }
.fx-itens { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 8px; max-height: 132px; overflow-y: auto; padding-top: 6px; }
.fx-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 9px;
  padding: 4px 10px 4px 6px; font-weight: 700; font-size: .82rem; max-width: 170px; }
.fx-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink2); font-size: 12px; line-height: 15px; padding: 0; cursor: pointer; }
.fx-x:hover { color: var(--ink); border-color: var(--queda); }
.fx-ir { display: block; text-align: center; text-decoration: none; }
.fx-ir-mini { margin-left: auto; padding: 4px 12px; text-decoration: none; }
.fx-min { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink2); cursor: pointer; width: 30px; height: 26px; padding: 0; font-size: .8rem; }
.fixados:not(.recolhido) .fx-min { margin-left: 6px; }
body.com-fixados main { padding-bottom: 190px; }
body.com-fixados:has(.fixados.recolhido) main { padding-bottom: 80px; }
@media (max-width: 640px) {
  .fixados { left: 0; right: 0; bottom: 0; width: auto; border-radius: 14px 14px 0 0; border-width: 1px 0 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .fx-itens { flex-wrap: nowrap; overflow-x: auto; overflow-y: visible; max-height: none; padding: 6px 8px 2px 2px; margin: 6px 0; }
  .fx-chip { flex: none; max-width: 140px; }
  body.com-fixados main { padding-bottom: 170px; }
}

/* comparação de 3 a 6: topo em listras com a cor de cada clube */
.listrado .topo { background: var(--listras); }
.listrado .topo::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; background: var(--listras); filter: brightness(.8); }
.listrado .topo .marca, .listrado .topo .abas a, .dividido .topo .marca, .dividido .topo .abas a { text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.listrado .abas a.ativa { border-bottom-color: currentColor; }
.cmp-sel { display: flex; flex-direction: column; gap: 10px; }
.cmp-chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cmp-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--line-2); border-left: 6px solid var(--cor); font-weight: 700; }
.cmp-chip a { text-decoration: none; }
.cmp-add { flex: 1; min-width: 200px; max-width: 320px; }
.cmp-add .busca-res { position: absolute; z-index: 20; left: 0; right: 0; }
.tabwrap { overflow-x: auto; }
.cmp-tab th[style] { box-shadow: inset 0 4px 0 var(--cor); vertical-align: bottom; padding-top: 10px; }
.cmp-th { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--ink); line-height: 1.2; }
.cmp-tab td.melhor { font-weight: 800; color: var(--gold-ink); background: var(--gold-soft); }
.cmp-tab td:first-child { color: var(--ink2); }
@media (max-width: 640px) { .cmp-tab.n4, .cmp-tab.n5, .cmp-tab.n6 { font-size: .8rem; } .cmp-tab td, .cmp-tab th { padding: 6px 5px; } }

/* trajetória: quedas e acessos (na dica, que tem o fundo invertido, os tons do outro tema) */
.tr-m.queda { fill: var(--queda); } .tr-m.acesso { fill: var(--acesso); }
.tr-mq { color: var(--queda); } .tr-ma { color: var(--acesso); }
.dica b.tr-mq, .dica b.tr-ma { display: inline; margin: 0; font-size: inherit; }
.dica .tr-mq { color: #ec7a72; } .dica .tr-ma { color: #7fd1a3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dica .tr-mq { color: #b8372f; } :root:not([data-theme="light"]) .dica .tr-ma { color: #1f6b45; } }
:root[data-theme="dark"] .dica .tr-mq { color: #b8372f; } :root[data-theme="dark"] .dica .tr-ma { color: #1f6b45; }
.legenda b.tr-mq, .legenda b.tr-ma { margin-right: 4px; }
.tr-resumo { font-size: .9rem; color: var(--ink2); margin: 0 0 6px; }
.tr-resumo a { color: var(--brand-2); font-weight: 600; text-decoration: none; }

/* ---------- épocas (js/epocas.js) ---------- */
.mq-tit { margin: 6px 0 12px; }
.mq-dec { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; max-width: 100%; }
.mq-dec .chip { flex: none; }
.mq-card { display: flex; flex-direction: column; gap: 8px; }
.mq-card .tp { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mq-card .tp small { color: var(--muted); font-size: .75rem; font-weight: 600; }
.mq-card.poucas .tp small { color: var(--parc); }
.mq-card.vazio-d { opacity: .7; }
.mq-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mq-top li { display: grid; grid-template-columns: 26px auto minmax(0, 1fr) auto; gap: 8px; align-items: center; cursor: pointer; padding: 2px; }
.mq-top li:first-child { padding: 4px 2px 8px; border-bottom: 1px solid var(--line); }
.mq-pos { font-weight: 800; color: var(--gold-ink); text-align: center; }
.mq-nm b { display: block; } .mq-nm small { display: block; color: var(--muted); font-size: .75rem; }
.mq-top em { font-style: normal; font-weight: 800; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.mq-top li:first-child em { font-size: 1.3rem; }
.mq-ver { align-self: flex-start; margin-top: auto; }
.mq-tab td { vertical-align: middle; }
.mq-tab td small { display: block; color: var(--muted); font-size: .72rem; }
.mq-tab tr.poucas td:first-child small { color: var(--parc); }
.mq-tab td[data-clube] { cursor: pointer; }
.mq-cel { display: flex; align-items: center; gap: 6px; line-height: 1.2; }
.lnk { background: none; border: 0; padding: 0; font-weight: 700; color: var(--brand-2); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.notas { margin-top: 18px; font-size: .86rem; color: var(--ink2); }
.notas summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.notas ul { margin: 8px 0 0; padding-left: 18px; } .notas li { margin: 4px 0; }
.qv-grade { margin-top: 12px; }
.qv-bloco h3 { margin-bottom: 2px; }
.qv-lista { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: qv; }
.qv-lista li { counter-increment: qv; display: grid; grid-template-columns: 24px 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.qv-lista li::before { content: counter(qv); font-weight: 800; color: var(--muted); text-align: center; font-size: .85rem; }
.qv-lista li:last-child { border: 0; }
.qv-nm b { display: block; } .qv-nm small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.35; }
.qv-lista em { font-style: normal; font-weight: 800; color: var(--brand-2); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .9rem; }

/* ---------- ficha do clássico (js/classico.js) ---------- */
.ccl-topo { text-align: center; }
.ccl-topo h1 { margin-top: 4px; }
.ccl-m { display: grid; grid-template-columns: 1fr minmax(150px, auto) 1fr; gap: 12px; align-items: center; margin: 10px 0 12px; }
.ccl-lado { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; }
.ccl-lado b { font-size: 1.1rem; }
.ccl-lado .coroa { width: 40px; height: 27px; } .ccl-lado .coroa-vazia { height: 27px; }
.ccl-c { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink2); font-size: .85rem; }
.ccl-c .bal { width: 36px; height: 30px; color: var(--muted); }
.ccl-c .sit { font-weight: 700; }
.ccl-c .sit.parcial { color: var(--parc); background: var(--parc-soft); border-radius: 6px; padding: 1px 8px; }
.ccl-placar { display: flex; align-items: baseline; gap: 14px; font-variant-numeric: tabular-nums; }
.ccl-placar b { font-size: clamp(2rem, 7vw, 3.2rem); color: var(--ink); line-height: 1; }
.ccl-placar span { color: var(--muted); font-weight: 700; font-size: 1.6rem; }
.cc-corpo .grade { align-items: start; }
.ccl-barra { height: 14px; border-radius: 7px; max-width: 720px; margin: 0 auto; }
.ccl-rod { color: var(--ink2); font-size: .88rem; margin: 10px auto 0; max-width: 70ch; }
.ccl-topo .acoes { justify-content: center; }
.ccl-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ccl-tags b { margin-right: 4px; }
.cl-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 560px) { .ccl-m { grid-template-columns: 1fr 1fr; } .ccl-c { grid-column: 1 / 3; grid-row: 2; } .ccl-lado .esc.xg { width: 76px; height: 76px; } }

/* ---------- imagem para compartilhar (js/compartilhar.js) ---------- */
.img-modal { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.img-caixa { background: var(--surface); color: var(--ink); border-radius: 14px; padding: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.img-cab { display: flex; justify-content: space-between; align-items: center; }
.img-x { font-size: 1.3rem; }
.img-prev { overflow: auto; min-height: 120px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: start center; gap: 10px; }
.img-prev img { display: block; width: 100%; height: auto; }
.img-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.img-acoes .chip { text-decoration: none; }

/* ---------- simulador (js/simulador.js) e campanhas ---------- */
.sim-passos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.sim-passos .seletor { position: relative; } .sim-passos .busca-res, .sim-duelo .busca-res { position: absolute; z-index: 20; left: 0; right: 0; }
.sim-passos input[type=search], .sim-duelo input[type=search] { width: 100%; }
.sim-passos input[type=range] { width: 100%; accent-color: var(--brand-2); }
.sim-time { margin-top: 10px; }
.sim-esc { display: flex; gap: 12px; align-items: flex-start; }
.sim-esc b { display: block; font-size: 1.05rem; } .sim-esc small { display: block; color: var(--ink2); font-size: .8rem; line-height: 1.4; }
.sim-res { margin-top: 16px; } .sim-res h3 { margin-top: 10px; }
.sim-tab tr.eu td { background: var(--gold-soft); font-weight: 700; }
.sim-tab td { white-space: nowrap; }
.sim-placar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; text-align: center; align-items: end; }
.sim-placar b { display: block; font-size: .9rem; } .sim-placar span { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sim-barra { height: 12px; margin: 10px 0; }
.camp-tab td small { display: block; color: var(--muted); font-size: .72rem; }
.camp-tab tr[data-clube] { cursor: pointer; }
.cartao h4 { margin: 6px 0 4px; font-size: .9rem; color: var(--ink2); }

/* ---------- estatística (js/estatistica.js) ---------- */
.bom { color: var(--acesso); } .ruim { color: var(--queda); }
em.bom, em.ruim { font-style: normal; }
.arq-graf { height: 560px; } @media (max-width: 600px) { .arq-graf { height: 460px; } }
.arq-card { border-top: 5px solid var(--cor); } .arq-card h3 small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.arq-perfil { display: flex; gap: 6px; align-items: center; height: 64px; margin: 8px 0; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.arq-perfil span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.arq-perfil i { display: block; width: 70%; border-radius: 3px 3px 0 0; }
.arq-perfil small { font-size: .6rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.arq-esc { display: flex; flex-wrap: wrap; gap: 6px; } .arq-esc span { cursor: pointer; }
#r-svg { display: block; width: 100%; height: auto; } #r-svg .rb-n { font-size: 12px; font-weight: 600; fill: var(--ink); } #r-svg .rb-v { font-size: 12px; font-weight: 800; fill: var(--ink2); }
#r-rot { font-size: 1.4rem; font-variant-numeric: tabular-nums; min-width: 80px; }

/* ---------- comparação e ficha: extras (comparar_extra.js, ficha_extra.js, baixar.js) ---------- */
.bx-bt { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.bx-bt:hover { color: var(--ink); border-color: var(--brand-2); } .bx-bt svg { width: 15px; height: 15px; }
.cartao:has(> .bx-bt) > h3 { padding-right: 38px; }
.c1-faixa { display: flex; height: 34px; border-radius: 6px; overflow: hidden; gap: 1px; background: var(--line); }
.c1-faixa i { flex: 1; min-width: 2px; }
.c1-eixo { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin: 4px 0 10px; }
.c1-cont { display: flex; flex-wrap: wrap; gap: 8px 18px; } .c1-cont div { display: flex; align-items: center; gap: 6px; font-size: .88rem; }
.c1-cont i { width: 12px; height: 12px; border-radius: 3px; } .c1-cont span { color: var(--ink2); }
.c7-barras { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.c7-barras > div { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 56px; gap: 10px; align-items: center; }
.c7-barras small { color: var(--muted); font-size: .72rem; display: block; } .c7-barras em { font-style: normal; font-weight: 800; text-align: right; }
.c7-b { height: 14px; background: var(--surface-3); border-radius: 7px; overflow: hidden; } .c7-b i { display: block; height: 100%; border-radius: 7px; }
@media (max-width: 600px) { .c7-barras > div { grid-template-columns: 1fr 52px; } .c7-b { grid-column: 1 / 3; grid-row: 2; } }
.c1-graf { height: 56px; margin: 6px 0 10px; }
label.chk { flex-wrap: wrap; max-width: 100%; } label.chk select { max-width: 100%; }

/* ---------- linha do tempo (js/periodo.js): faixa logo abaixo do topo, nas cores do topo ---------- */
.linha-tempo { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #000) 0%, color-mix(in srgb, var(--brand) 70%, var(--bg)) 100%);
  color: var(--topo-ink, var(--brand-ink)); border-bottom: 1px solid color-mix(in srgb, var(--brand) 60%, var(--line)); }
.lt-in { max-width: 1240px; margin: 0 auto; padding: 8px 28px 6px; }
.lt-cab { display: flex; align-items: baseline; gap: 10px; min-height: 26px; }
.lt-kick { text-transform: uppercase; letter-spacing: .14em; font-size: .66rem; font-weight: 700; opacity: .75; }
.lt-rot { font-size: .95rem; font-variant-numeric: tabular-nums; }
.linha-tempo.lt-ativo .lt-rot { color: var(--gold); }
.lt-reset { margin-left: auto; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); background: transparent; border-radius: 999px;
  padding: 2px 10px; font-size: .76rem; font-weight: 600; cursor: pointer; }
.lt-reset:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.lt-trilho { position: relative; height: 58px; margin: 0 4px; touch-action: none; cursor: pointer; }
.lt-eras { position: absolute; left: 0; right: 0; top: 30px; height: 8px; border-radius: 4px; overflow: hidden; display: block; }
.lt-era { position: absolute; top: 0; bottom: 0; opacity: .55; }
.lt-era + .lt-era { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--brand) 70%, #000); }
.lt-faixa { position: absolute; top: 26px; height: 16px; border-radius: 8px; background: color-mix(in srgb, var(--gold) 30%, transparent); border: 2px solid var(--gold); box-sizing: border-box; pointer-events: none; }
.lt-marca { position: absolute; top: 40px; transform: translateX(-50%); pointer-events: none; font-size: .64rem; opacity: .72; text-align: center; }
.lt-marca i { display: block; width: 1px; height: 5px; margin: 0 auto 1px; background: currentColor; }
.lt-marca.menor i { height: 3px; opacity: .6; }
.lt-marca em { font-style: normal; font-variant-numeric: tabular-nums; }
.lt-bola { position: absolute; top: 17px; width: 34px; height: 34px; margin-left: -17px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none;
  border-radius: 50%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); transition: transform .12s; z-index: 2; }
.lt-bola:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lt-bola.arrasta { cursor: grabbing; transform: scale(1.12); z-index: 3; }
.lt-bola .lt-svg { display: block; width: 34px; height: 34px; }
.lt-bola .bola-svg { width: 100%; height: 100%; display: block; }
.lt-bola .lt-svg.troca { animation: lt-gira .45s ease-out; }
@keyframes lt-gira { from { transform: rotate(-200deg) scale(.6); opacity: .3; } to { transform: none; opacity: 1; } }
.lt-ano { position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%); font-size: .72rem; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums; padding: 0 5px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 82%, #000); }
.lt-bola[data-k="de"] .lt-ano { transform: translateX(-70%); }
.lt-bola[data-k="ate"] .lt-ano { transform: translateX(-30%); }
@media (prefers-reduced-motion: reduce) { .lt-bola .lt-svg.troca { animation: none; } .lt-bola { transition: none; } }
@media (max-width: 640px) {
  .lt-in { padding: 6px 22px 4px; }
  .lt-marca:not(.menor) em { font-size: .6rem; }
}
/* aviso do período nas telas que mudam com ele */
.periodo-aviso { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 12px 0 0; padding: 10px 14px; border-radius: 10px;
  background: var(--gold-soft); color: var(--gold-ink); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); font-size: .9rem; }
.periodo-aviso b { font-variant-numeric: tabular-nums; }
.periodo-aviso small { color: var(--ink2); }
/* confronto direto jogo a jogo (comparação) */
.cf-placar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 4px 0 6px; }
.cf-placar b { font-size: 2rem; font-variant-numeric: tabular-nums; }
.cf-placar span { color: var(--muted); font-size: .88rem; }
.cf-barra { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin-bottom: 8px; }
.cf-barra i { display: block; height: 100%; }

/* ---------- década a década (mapas) ---------- */
.decadas { margin: 0 0 10px; }
.dec-barra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.dec-rot { color: var(--ink2); font-size: .9rem; }
.dec-rot b { color: var(--ink); font-size: 1.05rem; }
.dec-chips { flex-wrap: wrap; gap: 4px; }
.dec-chips .chip { padding: 3px 8px; font-size: .78rem; }

.porque { margin: 12px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--gold); color: var(--ink2); line-height: 1.5; }
.porque b { color: var(--ink); }

/* escudo ao longo do tempo; épocas na comparação */
.esc-linha { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; }
.esc-linha figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 74px; }
.esc-linha figcaption { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.cmp-epoca { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: .9rem; color: var(--ink2); }
.cmp-epoca select, .cmp-epoca input { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.cmp-epoca input { width: 76px; }
.fx-per { display: block; font-size: .7rem; color: var(--muted); }

/* linha do tempo dos títulos (ficha e comparação) */
.lt-cab-sec { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lt-cab-sec h2 { margin: 0; }
.lt-cartao { margin-top: 10px; }
.lt-rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lt-canvas, .lt-legenda { display: block; }
.lt-legenda { margin-top: 6px; }

/* ---------- Títulos: contador, corrida e rei de cada ano ---------- */
.tt-tipos { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 14px; }
.tt-tipos .chk { font-size: .88rem; }
.tt-tab { padding: 0; overflow-x: auto; }
.tt-tab table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tt-tab th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tt-tab td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tt-tab tr[data-clube] { cursor: pointer; }
.tt-tab tr[data-clube]:hover { background: var(--surface-2, rgba(127,127,127,.08)); }
.tt-tab .n { text-align: center; font-variant-numeric: tabular-nums; }
.tt-tab .tot { font-weight: 800; font-size: 1.02rem; }
.tt-tab .zero { color: var(--muted); opacity: .5; }
.tt-tab .pos { color: var(--muted); font-weight: 700; width: 36px; }
.tt-tab .nm { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.tt-tab .nm small { color: var(--muted); }
.tt-tab .esc { width: 26px; height: 26px; }
.tt-bar { width: 26%; min-width: 90px; }
.tt-bar span { display: block; height: 10px; border-radius: 99px; background: var(--brand-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.tt-corrida { position: relative; }
.tt-cr-cab { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.tt-cr-cab .tt-ano { flex: 1; }
.tt-palco { position: relative; }
.tt-ano-grande { position: absolute; right: 8px; bottom: 4px; font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 900; opacity: .13; pointer-events: none; font-variant-numeric: tabular-nums; }
.tt-barras { position: relative; }
.tt-b { position: absolute; left: 0; right: 0; height: 30px; display: flex; align-items: center; gap: 8px; transition: transform .55s ease, opacity .4s; cursor: pointer; }
.tt-b-esc .esc { width: 28px; height: 28px; }
.tt-b-barra { height: 26px; border-radius: 6px; display: flex; align-items: center; transition: width .55s ease; min-width: 40px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.tt-b-nm { color: #fff; font-weight: 700; font-size: .84rem; padding: 0 8px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.75); overflow: visible; }
.tt-b-v { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 28px; }
.rei-grade { display: grid; gap: 6px; overflow-x: auto; }
.rei-dec { display: grid; grid-template-columns: 52px repeat(10, minmax(40px, 1fr)); gap: 5px; align-items: center; }
.rei-dec > b { font-size: .82rem; color: var(--muted); }
.rei-t { position: relative; aspect-ratio: 1; border-radius: 8px; background: color-mix(in srgb, var(--cor) 28%, var(--surface)); border-bottom: 4px solid var(--cor); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s; }
.rei-t:hover { transform: scale(1.12); z-index: 2; }
.rei-t .esc { width: 62%; height: 62%; object-fit: contain; }
.rei-t small { font-size: .62rem; color: var(--muted); line-height: 1; }
.rei-t .rei-int { position: absolute; top: 1px; right: 3px; font-size: .62rem; color: #d4a017; font-style: normal; }
.rei-t.vazio-t { background: none; border: 1px dashed var(--line); cursor: default; }
.rei-t.vazio-t:hover { transform: none; }

/* ---------- hoje na história ---------- */
.hj-nav { float: right; display: inline-flex; gap: 6px; }
.hj-nav .chip { padding: 3px 10px; }
.hj-jogo { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.hj-jogo.cl { border-color: color-mix(in srgb, #d4a017 55%, var(--line)); }
.hj-topo { display: flex; justify-content: space-between; align-items: baseline; }
.hj-topo b { font-size: 1.15rem; }
.hj-topo small { color: var(--muted); }
.hj-placar { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 6px; text-align: center; }
.hj-placar span { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; min-width: 0; }
.hj-placar span .esc { width: 38px; height: 38px; }
.hj-placar em { font-style: normal; font-size: .76rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.hj-placar strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.hj-placar strong.v { color: var(--ink); }
.hj-placar i { color: var(--muted); font-style: normal; }
.hj-comp { font-size: .78rem; color: var(--muted); margin: 0; text-align: center; }

/* ---------- tapete da história e quem passou quem ---------- */
.tp-wrap, .bp-wrap { overflow-x: auto; padding: 10px; }
svg.tp .tp-ano, svg.bp .bp-ano { font-size: 11px; fill: var(--muted); }
svg.tp .tp-dec, svg.bp .bp-dec { stroke: var(--line); stroke-width: 1; }
svg.tp .tp-nome { font-size: 12px; font-weight: 600; fill: var(--ink); }
svg.tp a:hover .tp-nome { text-decoration: underline; }
svg.tp rect:hover { stroke: #fff; stroke-width: 1.5; }
.tp-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--muted); margin: 8px 0; }
.tp-leg i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tp-leg i.vz { border: 1px dashed var(--line-2); }
svg.bp .bp-pos { font-size: 11px; fill: var(--muted); font-weight: 700; }
svg.bp .bp-l { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; opacity: .85; transition: opacity .2s, stroke-width .2s; }
svg.bp .bp-n { font-size: 10px; font-weight: 800; text-anchor: middle; pointer-events: none; }
svg.bp .bp-nome { font-size: 12px; font-weight: 700; }
svg.bp .bp-clube { cursor: pointer; transition: opacity .2s; }
svg.bp.foco .bp-clube { opacity: .15; }
svg.bp.foco .bp-clube.on { opacity: 1; }
svg.bp .bp-clube.on .bp-l { stroke-width: 6; opacity: 1; }
svg.bp .bp-ano { text-anchor: middle; font-weight: 700; }

/* ---------- rede de rivalidades ---------- */
.rede { margin-top: 16px; }
.rede-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rede-svg { margin-top: 8px; }
svg.rede-g .rede-a { stroke-linecap: round; opacity: .78; transition: opacity .2s; cursor: pointer; }
svg.rede-g .rede-a.eq { stroke-dasharray: 5 5; opacity: .5; }
svg.rede-g .rede-a:hover { opacity: 1; }
svg.rede-g .rede-t { font-size: 10.5px; font-weight: 600; fill: var(--ink2); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--bg, #151110); stroke-width: 3px; }
svg.rede-g .rede-n { cursor: pointer; transition: opacity .2s; }
svg.rede-g.foco .rede-n { opacity: .25; }
svg.rede-g.foco .rede-n.on { opacity: 1; }
svg.rede-g.foco .rede-a { opacity: .08; }
svg.rede-g.foco .rede-a.on { opacity: 1; }

/* ---------- linha da vida (F2) e gráficos novos da comparação (F1, V1, F3, V2) ---------- */
.vd-card { margin-top: 0; }
.vd-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.vd-cab h2, .vd-cab h3 { margin: 0; }
.vd-abas { display: flex; gap: 6px; flex-wrap: wrap; }
.vd-aba { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: .85rem; cursor: pointer; }
.vd-aba:hover { border-color: var(--line-2); color: var(--ink); }
.vd-aba.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.vd-aba:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.vd-graf { overflow-x: auto; }
svg.vd { display: block; width: 100%; height: auto; min-width: 620px; font-family: inherit; }
svg.vd text { fill: var(--ink); }
svg.vd .vd-t { fill: var(--ink); } svg.vd .vd-mu { fill: var(--muted); } svg.vd .vd-gd { fill: var(--gold-ink); } svg.vd .vd-sobre { fill: #fff; }
svg.vd .b { font-weight: 700; } svg.vd .n { font-variant-numeric: tabular-nums; }
svg.vd .vd-gr { stroke: var(--line); }
svg.vd .vd-sf { fill: var(--surface-2); stroke: var(--line); }
svg.vd .vd-linha { stroke: var(--ink); opacity: .85; }
svg.vd .vd-ouro { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
svg.vd .vd-trofeu { fill: var(--gold); }
svg.vd .vd-toco { fill: var(--muted); opacity: .28; }
svg.vd .vd-ponto { fill: var(--muted); opacity: .45; }
svg.vd .vd-cinza { fill: var(--muted); }
svg.vd .vd-faixa { fill: #b89a74; opacity: .12; }
svg.vd .vd-lis-a { fill: #dccdb0; } svg.vd .vd-lis-b { stroke: #b89a74; }
svg.vd .vd-prateleira { fill: #b89a74; opacity: .45; }
svg.vd .vd-vazio { fill: var(--line); opacity: .55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) svg.vd .vd-lis-a { fill: #4a3f2e; } :root:not([data-theme="light"]) svg.vd .vd-lis-b { stroke: #7d6a4c; } }
:root[data-theme="dark"] svg.vd .vd-lis-a { fill: #4a3f2e; } :root[data-theme="dark"] svg.vd .vd-lis-b { stroke: #7d6a4c; }
#vida-cmp .grade.g1 { display: grid; gap: 16px; }

/* ---------- gerar imagem ---------- */
.gi-bt { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
  background: var(--brand-2, var(--acento, var(--gold))); color: var(--brand-2-ink, #fff); }
.gi-bt svg { width: 16px; height: 16px; }
.gi-bt:focus-visible { outline: 2px solid var(--gold, #e2b23c); outline-offset: 2px; }
.gi-modal { position: fixed; inset: 0; z-index: 130; background: rgba(0, 0, 0, .62); display: grid; place-items: center; padding: 14px; }
.gi-caixa { background: var(--surface, var(--painel)); color: var(--ink, var(--texto)); border-radius: 14px; width: min(980px, 100%); max-height: calc(100vh - 28px); overflow: auto; padding: 14px 16px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.gi-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 1.05rem; }
.gi-x { border: 0; background: none; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.gi-corpo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, 1fr); gap: 18px; }
@media (max-width: 760px) { .gi-corpo { grid-template-columns: 1fr; } }
.gi-prev { background: var(--surface-3, var(--painel2, #0003)); border-radius: 10px; padding: 10px; display: grid; place-items: center; min-height: 220px; }
.gi-prev img { display: block; max-width: 100%; max-height: 68vh; height: auto; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.gi-car { color: var(--muted, var(--suave)); }
.gi-op { display: flex; flex-direction: column; gap: 14px; }
.gi-grupo > span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, var(--suave)); margin-bottom: 6px; }
.gi-fmt { display: flex; gap: 6px; flex-wrap: wrap; }
.gi-fmt button { border: 1px solid var(--line, var(--linha)); background: none; color: inherit; border-radius: 8px; padding: 7px 10px; font: inherit; font-size: .88rem; cursor: pointer; }
.gi-fmt button small { color: var(--muted, var(--suave)); }
.gi-fmt button.on { border-color: var(--brand-2, var(--acento, var(--gold))); box-shadow: inset 0 0 0 1px var(--brand-2, var(--acento, var(--gold))); font-weight: 700; }
.gi-chk { display: flex; gap: 8px; align-items: center; margin: 4px 0; cursor: pointer; }
.gi-chk input { accent-color: var(--brand-2, var(--acento, var(--gold))); width: 16px; height: 16px; }
.gi-bts { display: flex; gap: 8px; flex-wrap: wrap; }
.gi-bts > * { border: 1px solid var(--line, var(--linha)); background: none; color: inherit; border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.gi-bts .gi-pri { background: var(--brand-2, var(--acento, var(--gold))); border-color: transparent; color: var(--brand-2-ink, #fff); }
.gi-nota { font-size: .8rem; color: var(--muted, var(--suave)); margin: 0; }

/* ---------- competições do país ---------- */
.cp-nivel { margin-top: 18px; }
.cp-nivel-t { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.cp-nivel-t i { font-style: normal; font-weight: 800; font-size: .72rem; color: var(--brand-ink); background: var(--brand); border-radius: 6px; padding: 2px 8px; }
.cp-nivel-t b { font-size: 1.02rem; } .cp-nivel-t small { color: var(--muted); }
.cp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.cp-card { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; text-decoration: none; color: inherit; box-shadow: var(--sombra); transition: border-color .15s, transform .15s; }
.cp-card:hover, .cp-card:focus-visible { border-color: var(--gold); transform: translateY(-1px); outline: none; }
.cp-card b { font-size: .95rem; } .cp-card small { grid-column: 1; color: var(--muted); font-size: .76rem; } .cp-card em { grid-column: 1; font-style: normal; font-size: .8rem; }
.cp-card > .esc, .cp-card > img, .cp-card > span:not(.x) { grid-row: 1 / span 3; grid-column: 2; }
.cp-card.ext { border-style: dashed; opacity: .82; }

/* ---------- nova história (comparação clube × país) ---------- */
.nh-glob { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 15px; }

/* ---------- início: o tutorial em rolagem ---------- */
.tut { display: grid; grid-template-columns: minmax(280px, 38%) 1fr; gap: 28px; align-items: start; }
.tut-passos { grid-column: 1; grid-row: 1; }
.tut-palco { grid-column: 2; grid-row: 1; position: sticky; top: 92px; height: calc(100vh - 120px); min-height: 420px; border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 90% at 70% 10%, var(--surface) 0%, var(--surface-3) 100%); border: 1px solid var(--line); box-shadow: var(--sombra); }
.tut-passo { min-height: 105vh; display: flex; align-items: center; }
.tut-passo:first-child { min-height: 90vh; align-items: flex-start; padding-top: 12vh; }
.tut-texto { padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra); max-width: 440px;
  opacity: .35; transform: translateY(16px) scale(.98); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.tut-passo.on .tut-texto { opacity: 1; transform: none; }
.tut-texto h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 4px 0 10px; text-wrap: balance; }
.tut-texto p { color: var(--ink2); line-height: 1.55; }
.tut-passo:first-child h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.tut-desca { color: var(--muted); animation: tut-pula 1.6s ease-in-out infinite; }
@keyframes tut-pula { 50% { transform: translateY(6px); } }
.tut-fim { min-height: 60vh; padding: 40px 0 80px; }
.tut-fim h2 { font-size: 2rem; }
.tut-barra { position: absolute; left: 18px; right: 18px; bottom: 14px; height: 4px; border-radius: 2px; background: var(--line); }
.tut-barra i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--gold); transition: width .15s linear; }
.tut-cena { position: absolute; inset: 0; padding: 22px 22px 34px; opacity: 0; transform: scale(.97); pointer-events: none;
  transition: opacity .55s ease, transform .7s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.tut-cena.on { opacity: 1; transform: none; }
/* 0: intro */
.ti-campo { position: relative; flex: 1; }
.ti-esc { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; white-space: nowrap; will-change: left, top; }
.ti-esc .esc { width: calc(38px + 18px * (1 - var(--k, 0))); height: calc(38px + 18px * (1 - var(--k, 0))); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .18)); }
.ti-esc span { opacity: var(--k, 0); font-size: .9rem; } .ti-esc span em { font-style: normal; color: var(--gold-ink); font-weight: 800; margin-left: 6px; }
.ti-titulo { position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; opacity: 0; } .ti-titulo b { display: block; font-size: 1.4rem; } .ti-titulo small { color: var(--muted); }
/* 1: mapa */
.tm-svg { width: 100%; height: 100%; flex: 1; }
.tm-esfera { fill: var(--surface-2); stroke: var(--line); }
.tm-p { fill: var(--mapa-vazio); stroke: var(--mapa-borda); stroke-width: .5; transition: fill .5s ease; }
.tm-p.aceso { fill: var(--mapa-rank); }
.tm-m circle { fill: var(--surface); stroke: var(--gold); stroke-width: 2; } .tm-m { opacity: 0; transform-box: fill-box; }
.tm-dedo path { fill: var(--ink); stroke: var(--surface); stroke-width: 2; } .tm-onda { fill: none; stroke: var(--gold); stroke-width: 3; }
.tm-leg { text-align: center; color: var(--muted); font-size: .9rem; }
/* 2: ranking */
.tr-cab { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tr-cab b { font-size: 1.2rem; } .tr-cab span { display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); }
.tr-cab span i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -6px; }
.tr-lista { display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }
.tr-l { display: grid; grid-template-columns: 34px 28px 130px 1fr 48px; align-items: center; gap: 8px; opacity: 0; }
.tr-pos { font-weight: 800; color: var(--muted); } .tr-l b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-barra { display: flex; height: 18px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.tr-barra i { display: block; height: 100%; width: 0; }
.tr-l em { font-style: normal; font-weight: 800; text-align: right; color: var(--gold-ink); }
/* 3: ficha */
.tf-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; } .tf-cab b { font-size: 1.3rem; display: block; } .tf-cab small { color: var(--muted); }
.tf-graf { flex: 1; overflow: hidden; } .tf-graf .cartao { box-shadow: none; } .tf-graf h2 { display: none; }
.tf-graf svg.vd circle { transition: opacity .3s ease; } .tf-graf svg.vd { min-width: 0; }
/* 4: comparar */
.tc-lista { display: flex; flex-direction: column; gap: 6px; }
.tc-l { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.tc-l.fantasma { opacity: .45; }
.tc-l.tocado .tc-toque { position: absolute; right: 18px; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--gold); animation: tc-toque .5s ease-out infinite; }
@keyframes tc-toque { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.tc-l.fixado { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); } .tc-l.fixado::after { content: "★"; position: absolute; right: 18px; color: var(--gold); }
.tc-bandeja { display: flex; gap: 8px; align-items: center; margin: 12px 0; padding: 8px 12px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); font-weight: 700; flex-wrap: wrap; }
.tc-fix { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--surface); color: var(--ink); opacity: 0; }
.tc-duelo { opacity: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.tc-placar { text-align: center; font-size: 1.9rem; font-weight: 800; } .tc-placar small { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.tc-dec { display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; gap: 6px; }
.tc-dec b { text-align: center; font-size: .82rem; color: var(--muted); }
.tc-dec i { display: block; height: 16px; border-radius: 4px; width: 0; } .tc-dec i.a { justify-self: end; background: var(--s1); } .tc-dec i.b { background: var(--s2); }
/* 5: a linha do tempo */
.tp-linha { margin: 6px 4px 14px; }
.tp-trilho { position: relative; height: 10px; border-radius: 5px; background: var(--line); margin: 12px 0; }
.tp-faixa { position: absolute; top: 0; height: 100%; border-radius: 5px; background: var(--gold); }
.tp-bola { position: absolute; top: 50%; width: 24px; height: 24px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--surface);
  border: 3px solid var(--gold); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.tp-rot { display: flex; justify-content: center; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; }
.tp-rot b { font-size: 1.5rem; } .tp-rot span { color: var(--muted); }
.tp-cab { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; } .tp-cab b { font-size: 1.2rem; } .tp-cab small { color: var(--muted); }
.tp-lista { position: relative; flex: 1; }
.tp-l { position: absolute; left: 0; right: 0; top: 0; height: 34px; display: grid; grid-template-columns: 34px 28px 1fr 56px; align-items: center; gap: 8px;
  padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); will-change: transform; }
.tp-pos { font-weight: 800; color: var(--muted); } .tp-l em { font-style: normal; font-weight: 800; text-align: right; color: var(--gold-ink); }
/* 6: campeonatos */
.tcp-cab small { display: block; color: var(--muted); } .tcp-cab b { font-size: 1.35rem; }
.tcp-faixa { display: flex; gap: 2px; margin-top: 12px; height: 26px; }
.tcp-faixa i { flex: 1; border-radius: 3px; transform: scale(0); transition: transform .25s cubic-bezier(.2, .8, .2, 1.4); }
.tcp-rot { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.tcp-h { margin: 14px 0 6px; }
.tcp-lista { display: flex; flex-direction: column; gap: 6px; }
.tcp-l { display: grid; grid-template-columns: 28px 120px 1fr 48px; gap: 8px; align-items: center; opacity: 0; }
.tcp-l b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tcp-l em { font-style: normal; font-weight: 800; text-align: right; }
.tcp-b { display: flex; height: 16px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.tcp-b i { display: block; height: 100%; width: 0; } .tcp-b i.t { background: var(--gold); } .tcp-b i.p { background: #5c9a76; }
/* 7: ataque × defesa */
.td-graf { flex: 1; min-height: 0; overflow: hidden !important; } .td-graf svg { width: 100%; height: 100%; max-height: 100%; min-width: 0 !important; }
.td-graf circle { transition: opacity .25s ease; }
.td-leg { display: flex; gap: 14px; justify-content: center; font-size: .82rem; color: var(--muted); }
.td-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
/* 8: nova história */
.tn-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; } .tn-cab b { display: block; font-size: 1.2rem; } .tn-cab small { color: var(--muted); }
.tn-seta { font-size: 1.6rem; color: var(--gold); font-weight: 800; }
.tn-lista { flex: 1; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 26px; grid-auto-flow: column; grid-template-rows: repeat(10, 26px); gap: 3px 12px; }
.tn-l { display: grid; grid-template-columns: 30px 22px 1fr; gap: 6px; align-items: center; font-size: .85rem; padding: 0 6px; border-radius: 7px; background: var(--surface); }
.tn-l b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; } .tn-l .n { color: var(--muted); font-weight: 700; }
.tn-l.eu { background: var(--gold); color: #2a1d15; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); z-index: 2; position: relative; } .tn-l.eu .n { color: #2a1d15; }
.tn-res { text-align: center; opacity: 0; margin-top: 6px; } .tn-res b { font-size: 2.2rem; color: var(--gold-ink); display: block; line-height: 1; } .tn-res small { color: var(--muted); }
/* 9: gerar imagem */
.tg-palco { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px; }
.tg-cartao { max-width: 100%; max-height: 100%; aspect-ratio: 1 / 1; height: 100%; border-radius: 14px; padding: 5%; background: linear-gradient(160deg, #1d3b2f, #0f241c); color: #f6efe2;
  display: flex; flex-direction: column; gap: 6%; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); opacity: 0; overflow: hidden; }
.tg-marca { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; } .tg-tit { font-size: 1.15rem; }
.tg-esc { display: flex; gap: 6px; flex-wrap: wrap; } .tg-esc .esc { width: 30px; height: 30px; }
.tg-barras { display: flex; flex-direction: column; gap: 5px; flex: 1; justify-content: center; }
.tg-barras div { position: relative; height: 18px; border-radius: 5px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.tg-barras i { position: absolute; inset: 0 auto 0 0; background: #d4a017; } .tg-barras span { position: relative; font-size: .72rem; padding-left: 6px; font-weight: 700; color: #2a1d15; }
.tg-cartao.largo { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-rows: auto auto 1fr; column-gap: 5%; } .tg-cartao.largo .tg-barras { grid-column: 2; grid-row: 1 / 4; }
.tg-fmt, .tg-acoes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.tg-fmt span, .tg-acoes span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .82rem; transition: all .3s ease; }
.tg-fmt span.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); } .tg-acoes span.on { background: var(--gold); color: #2a1d15; border-color: var(--gold); }
@media (max-width: 860px) { .tn-lista { grid-template-rows: repeat(10, 22px); grid-auto-rows: 22px; font-size: .78rem; } .tcp-l { grid-template-columns: 24px 90px 1fr 40px; font-size: .85rem; } }
@media (max-width: 860px) {
  .tut { grid-template-columns: 1fr; gap: 0; }
  .tut-palco { grid-column: 1; position: sticky; top: 64px; height: 52vh; min-height: 300px; z-index: 1; }
  .tut-passos { grid-column: 1; grid-row: 2; position: relative; z-index: 2; margin-top: -10vh; }
  .tut-passo, .tut-passo:first-child { min-height: 90vh; padding-top: 0; align-items: flex-end; }
  .tut-texto { max-width: none; }
  .tr-l { grid-template-columns: 28px 24px 96px 1fr 40px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { .tut-cena, .tut-texto, .tut-barra i, .tm-p { transition: none; } .tut-desca, .tc-toque { animation: none !important; } }

/* ---------- tutorial: telas muito altas (o "modo desktop" do celular tem ~2.000 px de altura) e celular ---------- */
.tut-palco { height: min(calc(100vh - 130px), 620px); top: max(92px, calc(50vh - 290px)); }
.tut-passo { min-height: min(100vh, 720px); }
/* as listas das cenas preenchem o palco em vez de ficarem pequenas no meio */
.tr-lista, .tl-lista, .tj-lista, .tcp-lista, .tg2-lista, .tk-lista { justify-content: space-evenly; }
.tr-l, .tl-l, .tn-l, .tj-l, .tg2-l, .tcp-l { font-size: 1rem; } .tr-barra, .tl-b, .tcp-b, .tg2-b { height: 22px; }
.tut-passo:first-child { min-height: max(min(90vh, 760px), 64vh); padding-top: min(12vh, 90px); }   /* em telas muito altas, o 1º passo tem de passar da linha de leitura (55% da altura) */
@media (max-width: 860px) {
  /* o palco fica logo abaixo do cabeçalho (a altura dele vem do JS em --topo) e os textos passam embaixo, na parte de baixo da tela */
  .tut-palco { top: var(--topo, 64px); height: min(50vh, 420px); min-height: 280px; z-index: 3; }
  .tut-passos { margin-top: 12px; z-index: 1; }
  .tut-passo, .tut-passo:first-child { min-height: 62vh; align-items: center; padding-top: 0; }
  .tut-texto { padding: 16px 18px; } .tut-texto h2 { font-size: 1.35rem; } .tut-passo:first-child h2 { font-size: 1.7rem; }
  .tut-cena { padding: 14px 14px 26px; }
  .ti-esc .esc { width: calc(26px + 12px * (1 - var(--k, 0))) !important; height: auto; }
  .ti-esc span { font-size: .72rem; max-width: 118px; overflow: hidden; text-overflow: ellipsis; } .ti-esc { gap: 6px; }
  .tut-fim { padding: 30px 0 60px; min-height: 0; }
  body.tutorial #fixados { display: none !important; }
  .tr-l, .tl-l, .tn-l, .tj-l, .tg2-l, .tcp-l { font-size: .8rem; } .tr-barra, .tl-b, .tcp-b, .tg2-b { height: 13px; }
  .tr-lista, .tl-lista, .tj-lista, .tcp-lista, .tg2-lista, .tk-lista { justify-content: center; gap: 4px; }
  .tr-cab b, .tl-cab b, .tj-cab b, .tcp-cab b, .tn-cab b { font-size: 1rem; } .tr-cab span, .tl-cab small { font-size: .7rem; }
  .tut-cena .esc.p, .tut-cena .ico { width: 20px; height: 20px; }
  .tc-lista { gap: 3px; } .tc-l { padding: 4px 10px; font-size: .85rem; } .tc-l.fantasma { display: none; }
  .tc-bandeja { margin: 6px 0; padding: 4px 8px; font-size: .78rem; gap: 5px; } .tc-placar { font-size: 1.3rem; } .tc-duelo { gap: 2px; }
  .tc-dec { font-size: .72rem; grid-template-columns: 1fr 40px 1fr; } .tc-dec i { height: 10px; }
  .tp-linha { margin: 0 4px 6px; } .tp-trilho { margin: 8px 0; } .tp-rot b { font-size: 1.1rem; } .tp-cab { margin-bottom: 4px; }
  .tp-l { height: 26px; font-size: .8rem; grid-template-columns: 28px 22px 1fr 44px; }
}

/* escolha do estilo da imagem-resumo (país e melhores do Brasil) */
.ge-caixa { width: min(980px, 100%); overflow: auto; }
.ge-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.ge-op { display: grid; gap: 4px; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-3); color: var(--ink); cursor: pointer; font: inherit; }
.ge-op:hover, .ge-op:focus-visible { border-color: var(--gold); outline: 2px solid var(--gold); }
.ge-op img { width: 100%; aspect-ratio: 1; border-radius: 8px; display: block; }
.ge-op span { font-size: .85rem; color: var(--ink2); }

/* ---------- rivalidades da época (js/rivais.js) ---------- */
.rivs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.riv { display: flex; flex-direction: column; gap: 8px; }
.riv-cab { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.riv-nome { text-align: center; min-width: 0; }
.riv-nome b { display: block; line-height: 1.2; }
.riv-nome small { color: var(--muted); }
.riv-forca { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: .85rem; }
.riv-forca span { color: var(--muted); }
.riv-barra, .riv-mini { background: var(--surface-3, var(--line)); border-radius: 6px; overflow: hidden; }
.riv-barra { height: 10px; }
.riv-mini { height: 6px; margin-top: 3px; }
.riv-barra i, .riv-mini i { display: block; height: 100%; background: var(--gold); border-radius: 6px; }
.riv-med { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: .78rem; color: var(--ink2); }
.riv-placar { margin: 0; font-size: .88rem; }
.riv details summary { cursor: pointer; font-size: .85rem; color: var(--brand); font-weight: 600; }
.riv details ul { margin: 6px 0 0 18px; padding: 0; font-size: .85rem; }
.lista-tags .confrontos { margin: 4px 0 0 0; padding-left: 18px; font-size: .85rem; }

/* escolha da imagem na ficha do clube */
.esc-ops { display: grid; gap: 10px; margin: 8px 0; }
.esc-ops .chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; }
.esc-ops small { font-weight: 500; opacity: .8; }

.riv-parcial { display: block; color: var(--muted); font-size: .78rem; }
.esc-img .ge-op img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }

/* a prévia do card da época (alto) mostra o topo, sem distorcer */
.ge-op img { object-fit: cover; object-position: top; }
