/* ============================================================
   APURA BRASIL — Estilos
   Visual de transmissão eleitoral: fundo escuro, azul-marinho,
   números grandes, alto contraste.
   ============================================================ */
:root {
  --bg: #060b16;
  --bg2: #0a1222;
  --painel: #0e1a30;
  --painel2: #0b1526;
  --borda: #1c2c4a;
  --marinho: #13294b;
  --ink: #f2f6fc;
  --ink2: #9fb2cf;
  --ink3: #64789a;
  --sem-dados: #4b5563;
  --ok: #2fd27a;
  --alerta: #f4b740;
  --erro: #ff5a5f;
  --sombra: 0 10px 30px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(31,95,255,.10), transparent),
    linear-gradient(180deg, #081021, var(--bg));
  background-color: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Cabeçalho ---------------- */
.cabecalho {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 22px; border-bottom: 1px solid var(--borda);
  background: linear-gradient(180deg, #0b1831, #081021);
  position: sticky; top: 0; z-index: 30;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo .marca {
  font-size: 22px; font-weight: 900; letter-spacing: .5px;
  background: linear-gradient(90deg, #ffd34d, #ff6a6a, #4da3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo .quadro { font-size: 11px; color: var(--ink3); line-height: 1; }
.cab-eleicao { font-size: 14px; color: var(--ink2); }
.cab-eleicao b { color: var(--ink); }
.cab-dir { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.selo-conexao {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--borda); background: #0a1529;
}
.selo-conexao .ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--ink3); }
.selo-conexao.demo { color: var(--alerta); border-color: #5a4410; background: #231a05; }
.selo-conexao.demo .ponto { background: var(--alerta); }
.selo-conexao.ok .ponto { background: var(--ok); }
.selo-conexao.ok { color: var(--ok); }
.selo-conexao.desatualizado { color: var(--alerta); } .selo-conexao.desatualizado .ponto { background: var(--alerta); }
.selo-conexao.erro { color: var(--erro); } .selo-conexao.erro .ponto { background: var(--erro); }

.audiencia {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--borda); background: #0a1529; color: var(--ink);
}
.audiencia .olho { filter: grayscale(.2); }
.audiencia b { color: #4da3ff; font-variant-numeric: tabular-nums; }
.audiencia .lbl { color: var(--ink2); }
body.tv .audiencia { font-size: 17px; }

.atualizado { font-size: 12px; color: var(--ink2); text-align: right; line-height: 1.3; }
.atualizado b { color: var(--ink); font-variant-numeric: tabular-nums; }

.btn {
  background: #16294a; color: var(--ink); border: 1px solid var(--borda);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 600;
}
.btn:hover { background: #1d3764; }
.btn.primario { background: #1f5fff; border-color: #2f6bff; }
.btn.primario:hover { background: #3a74ff; }

/* ---------------- Faixa de OFERECIMENTO (patrocinador) ---------------- */
.oferecimento {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 22px; border-bottom: 1px solid var(--borda);
  background: linear-gradient(90deg, #0a1526, #0f1f3c 50%, #0a1526);
}
.oferecimento.oculto { display: none; } /* sem patrocinador => some por completo */
.oferecimento .rot {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: #ffd34d; font-weight: 800; white-space: nowrap;
}
.oferecimento .sep { width: 1px; height: 20px; background: var(--borda); }
.oferecimento { min-height: 47px; } /* altura fixa: a faixa não "pula" quando o patrocinador troca */
.oferecimento .patro-vez { display: inline-flex; align-items: center; transition: opacity .35s ease; }
.oferecimento .patro-vez.saindo { opacity: 0; }
.oferecimento .patro { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.oferecimento a.patro:hover { opacity: .85; }
.oferecimento .logo-patro { height: 30px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.oferecimento .nome { font-weight: 600; font-size: 20px; letter-spacing: .3px; }
.oferecimento .texto { font-size: 12px; color: var(--ink2); }
/* Modo TV: legível de longe, slim e sem rolagem (flex:0 0 auto no fluxo da coluna) */
body.tv .oferecimento { flex: 0 0 auto; padding: 6px 30px; gap: 20px; }
body.tv .oferecimento .rot { font-size: 13px; }
body.tv .oferecimento .logo-patro { height: 38px; max-width: 240px; }
body.tv .oferecimento .nome { font-size: 24px; }
body.tv .oferecimento .texto { font-size: 14px; }
@media (max-width: 620px) { .oferecimento .texto { display: none; } }

/* ---------------- Placar de destaque (head-to-head) ---------------- */
.hero { max-width: 1500px; margin: 16px auto 0; padding: 0 22px; }
.hero-ctx {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink2);
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 8px;
}
.ao-vivo { width: 9px; height: 9px; border-radius: 50%; background: var(--erro); box-shadow: 0 0 0 0 rgba(255,90,95,.7); animation: pulso 1.6s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(255,90,95,.6); } 70% { box-shadow: 0 0 0 9px rgba(255,90,95,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,95,0); } }

.hero-grid {
  display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 18px; align-items: center;
  background: linear-gradient(180deg, #0d1d3a, #0a1526);
  border: 1px solid var(--borda); border-radius: 18px; padding: 18px 22px; box-shadow: var(--sombra);
}
.hero-cand { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; grid-gap: 2px 14px; gap: 2px 14px; align-items: center; } /* grid-gap: navegadores de TV antigos */
.hero-cand.lado22 { grid-template-columns: 1fr auto; text-align: right; }
.hero-cand.lado22 .hero-simbolo { order: 2; }
.hero-cand.lado22 .hero-meta { order: 1; }
.hero-cand.lado22 .hero-pct, .hero-cand.lado22 .hero-votos { grid-column: 1 / -1; }
.hero-cand.lado13 .hero-pct, .hero-cand.lado13 .hero-votos { grid-column: 1 / -1; }
.hero-simbolo { width: 62px; height: 72px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; object-fit: cover; object-position: 50% 15%; }
.hero-nome { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.hero-part { font-size: 12px; color: var(--ink2); }
.hero-pct { font-size: 46px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: 6px; }
.hero-votos { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.hero-cand.lider .hero-pct { text-shadow: 0 0 22px currentColor; }
/* brilho e coroa no líder */
.hero-cand.lider .hero-simbolo { box-shadow: 0 0 0 3px #ffd34d, 0 0 20px #ffd34d88; position: relative; }
.hero-cand.lider .hero-simbolo::after {
  content: '👑'; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 18px; filter: drop-shadow(0 2px 3px #0008);
}
.hero-badge { font-size: 11px; font-weight: 800; letter-spacing: .5px; margin-top: 3px; min-height: 14px; }
.hero-badge.liderando { color: var(--ok); }
.hero-badge.eleito {
  color: #1a1200; background: linear-gradient(90deg, #ffd34d, #ffb000);
  padding: 2px 10px; border-radius: 999px; display: inline-block; font-size: 12px;
  box-shadow: 0 0 18px #ffd34d99;
}

/* Flash de evento no placar */
.hero.flash-virada .hero-grid { animation: flashVirada 1.4s ease; }
.hero.flash-eleito .hero-grid { animation: flashEleito 1.4s ease; }
@keyframes flashVirada {
  0%, 100% { box-shadow: var(--sombra); }
  20%, 60% { box-shadow: 0 0 0 2px #4da3ff inset, 0 0 32px #4da3ff66; }
}
@keyframes flashEleito {
  0%, 100% { box-shadow: var(--sombra); }
  25%, 70% { box-shadow: 0 0 0 2px #ffd34d inset, 0 0 42px #ffd34d88; }
}

.hero-mid { text-align: center; }
.hero-bar { height: 16px; border-radius: 10px; overflow: hidden; display: flex; background: #0a1427; border: 1px solid var(--borda); }
.hero-bar > span { height: 100%; transition: width .5s ease; }
.hero-bar .b13 { background: #e01030; }
.hero-bar .b22 { background: #f2c200; }
.hero-50 { font-size: 11px; color: var(--ink3); margin-top: 5px; position: relative; }
.hero-50::before { content: ''; position: absolute; left: 50%; top: -22px; width: 2px; height: 16px; background: #ffffff55; }
.hero-apur { font-size: 13px; color: var(--ink2); margin-top: 6px; } .hero-apur b { color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 14px; }
  .hero-cand, .hero-cand.lado22 { grid-template-columns: auto 1fr; text-align: left; }
  .hero-cand.lado22 .hero-simbolo { order: 0; } .hero-cand.lado22 .hero-meta { order: 0; }
  .hero-pct { font-size: 38px; }
  /* No celular os candidatos ficam um embaixo do outro: quem tem mais votos vem primeiro */
  .hero-cand.lado13 { order: 1; } .hero-mid { order: 2; } .hero-cand.lado22 { order: 3; }
  .hero-grid.lidera-22 .hero-cand.lado22 { order: 1; } .hero-grid.lidera-22 .hero-cand.lado13 { order: 3; }
}
body.tv .hero { max-width: 1920px; padding: 0 30px; }
body.tv .hero-grid { padding: 12px 20px; }
body.tv .hero-simbolo { width: 64px; height: 76px; font-size: 30px; }
body.tv .hero-nome { font-size: 22px; }
/* nome um pouco mais afastado da foto, igual nos dois lados */
body.tv .hero-cand.lado13 .hero-meta { margin-left: 10px; }
body.tv .hero-cand.lado22 .hero-meta { margin-right: 10px; }
body.tv .hero-part { font-size: 14px; }
body.tv .hero-pct { font-size: 46px; }
body.tv .hero-votos { font-size: 14px; }
body.tv .hero-bar { height: 18px; }

/* ---------------- Layout principal ---------------- */
.conteudo { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; padding: 18px 22px; max-width: 1500px; margin: 0 auto; }
/* minmax(0,1fr): a coluna nunca passa da largura da tela (com 1fr, o conteúdo esticava a página no celular) */
@media (max-width: 1000px) { .conteudo { grid-template-columns: minmax(0, 1fr); } }

.painel { background: var(--painel); border: 1px solid var(--borda); border-radius: 16px; padding: 18px; box-shadow: var(--sombra); }
.painel > h2 { margin: 0 0 12px; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink3); }

/* Mapa */
.mapa-painel { position: relative; }
.mapa-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mapa-topo .voltar { display: none; }
.mapa-topo.estado .voltar {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; padding: 12px 20px;
  background: #16294a; border: 1px solid #2f6bff; border-radius: 12px;
}
.mapa-topo.estado .voltar:hover { background: #1d3764; }
.voltar .seta { font-size: 20px; }
.voltar .flag-br { width: 30px; height: 21px; border-radius: 3px; box-shadow: 0 1px 3px #0006; flex: 0 0 auto; }
body.tv .mapa-topo.estado .voltar { font-size: 20px; padding: 14px 24px; }
body.tv .voltar .flag-br { width: 36px; height: 25px; }
svg.mapa { width: 100%; height: auto; display: block; }
.uf-path { stroke: #081021; stroke-width: 1; cursor: pointer; transition: fill .35s ease, opacity .2s; }
.uf-path:hover { opacity: .82; }
.uf-path.selecionado { stroke: #fff; stroke-width: 2.4; }
/* Siglas dentro dos estados (minimalista, com contorno para contraste) */
.uf-sigla {
  fill: #fff; font-size: 15px; font-weight: 800; text-anchor: middle;
  pointer-events: none; letter-spacing: .3px;
  paint-order: stroke; stroke: rgba(0,0,0,.55); stroke-width: 2.6px; stroke-linejoin: round;
}
body.tv .uf-sigla { font-size: 17px; }
/* Pontinhos de voto dentro dos estados */
.uf-dot { pointer-events: none; transition: fill .45s ease; }

.legenda { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--ink2); }
.legenda .item { display: flex; align-items: center; gap: 7px; }
.legenda .cor { width: 16px; height: 16px; border-radius: 4px; }

/* Cartões de candidatos */
.cand-card {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border: 1px solid var(--borda); border-radius: 14px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--painel2), transparent);
  position: relative; overflow: hidden;
}
.cand-card .faixa { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.cand-card .numero {
  width: 60px; height: 60px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; color: #fff;
}
.cand-card .foto { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; object-position: 50% 16%; flex: 0 0 auto; }
.cand-card .info { flex: 1; min-width: 0; }
.cand-card .nome { font-size: 17px; font-weight: 700; }
.cand-card .partido { font-size: 12px; color: var(--ink2); }
.cand-card .dir { text-align: right; }
.cand-card .pct { font-size: 32px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.cand-card .votos { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.cand-card.lider { box-shadow: inset 0 0 0 1px #ffd34d66, 0 0 18px #ffd34d22; }
.cand-card .tag-lider { display: none; font-size: 11px; font-weight: 800; color: var(--ok); }
.cand-card.lider .tag-lider { display: inline; }
/* Brancos e nulos: linha compacta e discreta, para não parecer candidato */
.cand-card.extra { padding: 8px 14px; gap: 10px; background: none; }
.cand-card.extra .pastilha { width: 12px; height: 12px; flex: 0 0 auto; }
.cand-card.extra .nome { font-size: 14px; font-weight: 600; color: var(--ink2); }
.cand-card.extra .votos { font-size: 13px; }

/* Barra de apuração */
.apuracao-barra { height: 12px; border-radius: 8px; background: #0a1427; overflow: hidden; margin: 6px 0 4px; }
.apuracao-barra > span { display: block; height: 100%; background: linear-gradient(90deg, #2f6bff, #4da3ff); transition: width .4s ease; }
.apuracao-rot { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); }
.apuracao-rot b { color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; }

/* Grade de números (válidos, brancos, nulos, abstenção) */
.numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.num-box { background: var(--painel2); border: 1px solid var(--borda); border-radius: 12px; padding: 12px; }
.num-box .rot { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink3); display: flex; align-items: center; gap: 6px; }
.num-box .val { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.num-box .val.indisp { font-size: 14px; color: var(--ink3); font-weight: 600; }
.pastilha { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* Painel por região */
.regiao { margin-bottom: 12px; }
.regiao-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink2); margin-bottom: 5px; }
.regiao-top b { color: var(--ink); }
.regiao-bar { height: 12px; border-radius: 6px; overflow: hidden; display: flex; background: #0a1427; }
.regiao-bar > span { height: 100%; transition: width .4s ease; }

/* Resultado da capital (detalhe do estado) */
.muni-aviso { font-size: 13px; color: var(--ink2); background: var(--painel2); border: 1px dashed var(--borda); border-radius: 12px; padding: 12px; margin-top: 12px; }
.capital-box { background: var(--painel2); border: 1px solid var(--borda); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.capital-top { font-size: 14px; color: var(--ink2); } .capital-top b { color: var(--ink); }
.capital-linha { display: flex; gap: 24px; margin-top: 8px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
body.tv .capital-linha { font-size: 24px; }

/* Resultado por cidade (busca + placar da cidade, no detalhe do estado) */
.cidade-box { background: var(--painel2); border: 1px solid var(--borda); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.cidade-rotulo { display: block; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink3); font-weight: 700; margin-bottom: 8px; }
/* Atalho no topo do mapa, visível só com um estado aberto */
.btn-cidades {
  display: none; width: 100%; margin: 0 0 10px; padding: 12px 14px; font-size: 16px; font-weight: 800;
  color: #fff; background: #1f5fff; border: 1px solid #2f6bff; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center; gap: 8px;
}
.btn-cidades.visivel { display: flex; }
.btn-cidades:hover { background: #3a74ff; }
body.tv .btn-cidades { display: none; }
.cidade-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cidade-atual { font-size: 18px; font-weight: 800; color: var(--ink); }
.cidade-trocar { flex: 0 0 auto; padding: 9px 14px; font-size: 15px; font-weight: 800; }
.cidade-busca { position: relative; margin-top: 10px; }
.cidade-busca input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 16px; /* 16px: iPhone não dá zoom */
  color: var(--ink); background: var(--painel); border: 1px solid var(--borda); border-radius: 10px; outline: none;
}
.cidade-busca input:focus { border-color: #2f6bff; }
.cidade-sugestoes { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--painel); border-radius: 10px; box-shadow: var(--sombra); overflow: hidden; }
.cidade-sugestoes:empty { display: none; }
.cidade-sugestoes button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: 15px; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--borda); cursor: pointer;
}
.cidade-sugestoes button:hover, .cidade-sugestoes button:focus { background: var(--painel2); }
.cidade-sugestoes .vazio { padding: 10px 12px; font-size: 13px; color: var(--ink2); }
.cidade-res { margin-top: 12px; }
.cidade-top { font-size: 14px; color: var(--ink2); margin-bottom: 8px; } .cidade-top b { color: var(--ink); }
.cidade-cand { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--borda); font-variant-numeric: tabular-nums; }
.cidade-cand .pastilha { width: 12px; height: 12px; flex: 0 0 auto; }
.cidade-cand .nome { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
.cidade-cand .dir { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; }
.cidade-cand .pct { font-size: 20px; font-weight: 900; line-height: 1.1; }
.cidade-cand .votos { font-size: 12px; color: var(--ink2); text-align: right; }
.cidade-cand.extra .nome { font-size: 13px; font-weight: 600; color: var(--ink2); padding-left: 22px; }
.cidade-rodape { font-size: 11px; color: var(--ink3); margin-top: 8px; }

/* Publicidade */
.ad-slot { border: 1px dashed var(--borda); border-radius: 12px; padding: 14px; text-align: center; color: var(--ink3); font-size: 12px; background: var(--painel2); }
.ad-slot.vazio { display: none; } /* some quando não há anúncio configurado */
.ad-rodape { max-width: 1500px; margin: 0 auto; padding: 0 22px 8px; }

/* Rodapé */
.rodape { max-width: 1500px; margin: 0 auto; padding: 14px 22px 30px; color: var(--ink3); font-size: 12px; text-align: center; }
.rodape b { color: var(--ink2); }
.rodape .indep { color: var(--alerta); margin-top: 6px; }

/* Tooltip do mapa */
.tooltip {
  position: fixed; pointer-events: none; z-index: 60; display: none;
  background: #050a14; border: 1px solid var(--borda); border-radius: 10px; padding: 9px 11px;
  font-size: 13px; min-width: 150px; box-shadow: var(--sombra);
}
.tooltip h4 { margin: 0 0 5px; font-size: 13px; }
.tooltip .lin { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }

/* ================= MODO TV — tudo em UMA tela, sem rolagem ================= */
body.tv { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.tv .cabecalho { padding: 8px 30px; flex: 0 0 auto; }
body.tv .cab-eleicao, body.tv .logo .quadro { display: none; }
/* na TV o turno aparece acima do placar (no cabeçalho não cabe em telas de 1280) */
.hero-turno { display: none; }
body.tv .hero-turno { display: inline; color: var(--ink); }
body.tv .ad-slot, body.tv .ad-rodape, body.tv .rodape { display: none !important; }
body.tv .logo .marca { font-size: 26px; }
body.tv .hero { flex: 0 0 auto; margin: 8px auto 0; }

/* Área principal ocupa o resto da altura e NÃO rola */
body.tv .conteudo {
  flex: 1 1 auto; min-height: 0; width: 100%; max-width: 1920px;
  margin: 8px auto 0; padding: 0 30px 14px;
  grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: stretch;
}
body.tv .conteudo > section { min-height: 0; }

/* Mapa escala para caber na altura disponível */
body.tv .mapa-painel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
body.tv .mapa-painel .mapa-topo, body.tv .mapa-painel .legenda { flex: 0 0 auto; }
body.tv svg.mapa { flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; }
body.tv #capital { display: none; } /* detalhe de capital fica para PC/telefone */
body.tv .uf-path { transition: fill .5s ease; } /* animação estável na TV */

/* Coluna de resultados: empilha e não rola */
body.tv .conteudo > section:last-child { display: flex; flex-direction: column; min-height: 0; overflow: hidden; gap: 12px; }
body.tv .conteudo > section:last-child .painel { overflow: hidden; margin: 0; }
body.tv .conteudo > section:last-child .ad-slot { display: none; }

/* Tamanhos compactos para tudo caber */
body.tv .cand-card { margin-bottom: 8px; padding: 10px; }
body.tv .cand-card .numero, body.tv .cand-card .foto { width: 58px; height: 58px; font-size: 26px; }
body.tv .cand-card .nome { font-size: 18px; }
body.tv .cand-card .partido { font-size: 14px; }
body.tv .cand-card.extra { padding: 6px 10px; }
body.tv .cand-card.extra .nome { font-size: 15px; }
body.tv .cand-card .pct { font-size: 34px; }
body.tv .cand-card .votos { font-size: 14px; }
body.tv .apuracao-rot b { font-size: 22px; }
body.tv .num-box { padding: 9px; }
body.tv .num-box .val { font-size: 22px; }
body.tv .painel > h2 { font-size: 12px; margin-bottom: 8px; }
body.tv .regiao { margin-bottom: 7px; }

@media (max-width: 620px) {
  .numeros { grid-template-columns: 1fr 1fr; }
  .cab-dir { gap: 8px; }
  .atualizado { display: none; }
}
/* Celulares estreitos: cartões mais compactos para o nome não encostar na porcentagem */
@media (max-width: 440px) {
  .cand-card { gap: 10px; padding: 12px; }
  .cand-card .numero, .cand-card .foto { width: 48px; height: 48px; font-size: 22px; }
  .cand-card .nome { font-size: 15px; }
  .cand-card .pct { font-size: 26px; }
}
@media (max-width: 380px) {
  .cand-card .numero, .cand-card .foto { width: 42px; height: 42px; font-size: 20px; }
  .cand-card .nome { font-size: 14px; }
  .cand-card .pct { font-size: 23px; }
  .cand-card .tag-lider { display: none !important; } /* o "1º lugar" já aparece na linha de baixo */
}
