/* ==========================================================================
   BP nas Eleições 2026 — painel de apuração
   Paleta e tratamento tipográfico seguem as artes de abertura fornecidas:
   fundo azul profundo com textura de grade, serifada de alto contraste no
   título, faixas navy escuras sobre painel claro, barras navy em trilha cinza.
   ========================================================================== */

:root {
  --azul-abissal: #071A38;
  --azul-noite:   #0C2A5C;
  --azul-medio:   #164E9E;
  --azul-vivo:    #2C74D6;
  --azul-claro:   #7FB2F0;
  --papel:        #DCE3EE;
  --tinta:        #12305E;
  --tinta-fraca:  #43608C;
  --trilha:       #A9AEB0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--azul-abissal);
  color: #fff;
}

button {
  font: inherit; color: inherit; border: none; background: none;
  padding: 0; cursor: pointer;
}
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--azul-claro); outline-offset: 3px;
}
[hidden] { display: none !important; }

.bp-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  letter-spacing: .01em;
}

/* textura de grade das artes */
.bp-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* marca ------------------------------------------------------------------ */
.bp-marca, .bp-marca-rodape { display: flex; align-items: center; gap: .5rem; color: #fff; }
.bp-marca svg, .bp-marca-rodape svg { width: 36px; height: 24px; flex: 0 0 auto; }
.bp-marca span, .bp-marca-rodape span { display: block; line-height: 1; }
.bp-marca b, .bp-marca-rodape b { display: block; font-size: 9px; letter-spacing: .42em; font-weight: 600; }
.bp-marca b.forte, .bp-marca-rodape b.forte { font-size: 13px; letter-spacing: .02em; font-weight: 900; margin-top: 1px; }

/* ==========================  abertura  =================================== */
.bp-abertura {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(120% 85% at 22% 8%,
    #2E6FCB 0%, #164E9E 32%, #0C2A5C 62%, #071A38 100%);
}
.bp-abertura-cenario {
  position: absolute; inset: 0; opacity: .2;
  background:
    linear-gradient(74deg, transparent 46%, rgba(160,200,255,.5) 46.4%, transparent 47%),
    linear-gradient(106deg, transparent 52%, rgba(160,200,255,.4) 52.4%, transparent 53%),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(180,215,255,.16) 46px 47px);
  mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 72%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 72%);
}
.bp-abertura-conteudo {
  position: relative; z-index: 2; text-align: center; padding: 0 1.5rem; max-width: 44rem;
}
.bp-abertura h1 {
  margin: 0; font-weight: 500; line-height: .95;
  font-size: clamp(2.4rem, 8.5vw, 6rem);
}
.bp-regua { display: flex; align-items: center; gap: 1rem; margin-top: .6rem; }
.bp-regua span { flex: 1; height: 1px; background: rgba(255,255,255,.7); }
.bp-regua em { font-style: normal; font-size: clamp(1.3rem, 4vw, 2.4rem); }
.bp-abertura p {
  margin: 2rem auto 0; max-width: 34rem; font-size: .875rem; line-height: 1.65;
  color: rgba(219,234,254,.8);
}
.bp-abertura code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82em; background: rgba(255,255,255,.1); padding: .05em .35em; border-radius: 2px;
}
.bp-nota { font-size: .75rem !important; color: rgba(180,210,250,.6) !important; }
.bp-erro-carregamento {
  margin: 2rem auto 0; max-width: 30rem; text-align: left; padding: 1rem 1.2rem;
  background: rgba(120,20,20,.35); border: 1px solid rgba(255,140,140,.5);
  border-radius: 3px; font-size: .8rem; line-height: 1.6; color: #FFE2E2;
}
.bp-erro-carregamento strong { display: block; margin-bottom: .5rem; font-size: .85rem; }
.bp-erro-carregamento span { display: block; margin-top: .4rem; color: #FFD0D0; }
.bp-erro-carregamento code {
  display: inline-block; margin-top: .2rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(0,0,0,.35); padding: .15rem .5rem; border-radius: 2px; color: #FFF3D6;
}
.bp-cta {
  margin-top: 2rem; padding: .72rem 2.1rem; border-radius: 2px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.42);
  font-size: .78rem; letter-spacing: .18em; font-weight: 700;
  transition: background .25s, border-color .25s;
}
.bp-cta:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.bp-cta:disabled { opacity: .5; cursor: progress; }
.bp-cta:disabled:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.42); }
.bp-marca-rodape { position: absolute; bottom: 2rem; z-index: 2; opacity: .85; }

/* ============================  casca  ==================================== */
.bp-app {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(130% 90% at 12% 0%,
    #2A67C0 0%, #154C99 28%, #0C2A5C 60%, #071A38 100%);
}
.bp-topo {
  position: relative; z-index: 5; display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.1rem;
  background: linear-gradient(180deg, rgba(6,20,44,.94), rgba(6,20,44,.82));
  border-bottom: 1px solid rgba(140,180,240,.22);
}
.bp-cargos { flex: 1; display: flex; justify-content: center; gap: 2.2rem; }
.bp-aba {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; padding: .35rem 0 .45rem;
  color: rgba(190,214,245,.55); border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.bp-aba:hover { color: #fff; }
.bp-aba-on { color: #fff; border-color: #4C9AF0; }
/* deputados: presentes, mas em segundo plano */
.bp-aba-sec { font-size: .66rem; font-weight: 600; letter-spacing: .05em; text-transform: none; color: rgba(190,214,245,.45); }
.bp-aba-sec.bp-aba-on { color: rgba(255,255,255,.9); }
.bp-cargos-sep { width: 1px; align-self: stretch; margin: .3rem .2rem; background: rgba(140,180,240,.25); }
.bp-link-ext { color: #C6DBF8; font-size: .72rem; font-weight: 600; padding: .34rem .8rem; border-radius: 3px; background: rgba(70,125,205,.24); text-decoration: none; }
.bp-link-ext:hover { background: rgba(96,158,235,.42); color: #fff; }

.bp-subtopo {
  position: relative; z-index: 5; display: flex; align-items: center; gap: .6rem;
  padding: .45rem 1.1rem; border-bottom: 1px solid rgba(140,180,240,.14);
  background: rgba(6,20,44,.5);
}
.bp-ctx { font-size: .72rem; color: rgba(190,214,245,.75); }
.bp-urnas { text-align: right; min-width: 8rem; }
.bp-urnas span { display: block; font-size: .625rem; color: rgba(190,214,245,.7); }
.bp-urnas strong { display: block; font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.bp-urnas em { font-style: normal; font-size: .6rem; color: rgba(160,200,250,.65); }

/* A lateral de estados fica à DIREITA e o painel de resultados à ESQUERDA.
   `row-reverse` inverte a ordem visual sem mexer na ordem do HTML, que
   continua a ordem de leitura e de tabulação. */
.bp-corpo { position: relative; z-index: 5; display: flex; flex-direction: row-reverse; flex: 1; min-height: 0; }

/* ===========================  lateral  =================================== */
.bp-lateral {
  width: 250px; flex-shrink: 0; padding: .9rem .8rem 1.4rem; overflow-y: auto;
  background: linear-gradient(180deg, rgba(6,20,44,.78), rgba(6,20,44,.55));
  border-left: 1px solid rgba(140,180,240,.22);
}
.bp-bloco-regiao { margin-bottom: .8rem; }
.bp-regiao {
  font-size: .62rem; letter-spacing: .34em; font-weight: 700; text-transform: uppercase;
  color: #C9DCF7; margin: 0 0 .4rem .15rem;
}
.bp-grade-uf { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.bp-uf-btn {
  background: rgba(70,125,205,.3); color: #E7F0FD; border: 1px solid transparent;
  font-size: .665rem; font-weight: 600; line-height: 1.15;
  padding: .34rem .3rem; border-radius: 3px;
  transition: background .18s, border-color .18s;
}
.bp-uf-btn:hover { background: rgba(96,158,235,.5); }
.bp-uf-btn-on { background: #E9F1FD; color: var(--azul-noite); border-color: #fff; font-weight: 800; }
.bp-divisor { height: 1px; background: rgba(160,200,250,.28); margin: .9rem 0; }
.bp-home {
  margin-top: 1rem; width: 100%; padding: .55rem; border-radius: 3px;
  background: rgba(70,125,205,.42); color: #fff;
  font-weight: 800; letter-spacing: .2em; font-size: .68rem; text-transform: uppercase;
}
.bp-home:hover { background: rgba(96,158,235,.62); }

/* ==========================  principal  ================================== */
.bp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: .85rem 1rem 1rem; gap: .7rem; }
.bp-vistas { display: flex; align-items: center; gap: .3rem; }
.bp-espaco { flex: 1; }
.bp-vista-btn {
  background: rgba(70,125,205,.24); color: #C6DBF8;
  font-size: .72rem; font-weight: 600; padding: .34rem .8rem; border-radius: 3px;
  transition: background .18s;
}
.bp-vista-btn:hover { background: rgba(96,158,235,.42); }
.bp-vista-btn-on { background: #E9F1FD; color: var(--azul-noite); font-weight: 800; }
.bp-turnos { display: flex; gap: .3rem; }
.bp-turno-btn {
  background: rgba(70,125,205,.24); color: #C6DBF8;
  font-size: .68rem; font-weight: 600; padding: .3rem .7rem; border-radius: 3px;
}
.bp-turno-btn-on { background: #9FC6F5; color: #0A2450; font-weight: 800; }
.bp-palco { flex: 1; min-height: 0; }
.bp-painel { height: 100%; }

/* =====================  vista: mapa + ranking  =========================== */
/* O mapa ocupa toda a área; o painel de resultados é sobreposto à direita com
   um fade em gradiente, como na arte 3. O enquadramento do mapa desloca o alvo
   para a esquerda quando o painel está aberto, então nada fica escondido. */
.bp-mapa-wrap { position: relative; min-height: 520px; }
.bp-mapa-area {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.bp-mapa-svg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.bp-mapa {
  width: 100%; max-height: 100%;
}
/* com o painel aberto, a borda leste do mapa some sob o gradiente */
body:not(.bp-modo-home) .bp-app .bp-mapa {
  -webkit-mask-image: linear-gradient(270deg, #000 46%, rgba(0,0,0,.55) 64%, transparent 84%);
  mask-image: linear-gradient(270deg, #000 46%, rgba(0,0,0,.55) 64%, transparent 84%);
}

.bp-uf { transition: fill .45s ease, fill-opacity .45s ease, opacity .3s ease; }
.bp-uf:hover { fill-opacity: 1; }
/* rótulos das UFs: +25% (19px), brancos, negrito, sombra — pedido para TV */
.bp-uf-label {
  fill: #fff; font-weight: 800; font-family: "Inter", sans-serif; letter-spacing: .02em;
  paint-order: normal; stroke: none;
  filter: drop-shadow(0 1px 1.5px rgba(3,12,30,.85)) drop-shadow(0 0 6px rgba(3,12,30,.55));
}
.bp-cam-bordas path { transition: opacity .4s ease; }
.bp-cam-luzes { transition: opacity .5s ease; }
.bp-rotulo { transition: opacity .35s ease, transform .52s cubic-bezier(.22,.9,.28,1); }
.bp-rotulo line { transition: opacity .3s ease; }

/* relevo da UF selecionada */
.bp-cam-relevo { transition: opacity .35s ease; }
.bp-relevo-topo, .bp-relevo-lado {
  transition: transform .52s cubic-bezier(.22,.9,.28,1), fill .4s ease;
}

/* arte 2: marca + título no canto superior direito, só no modo home */
.bp-titulo-mapa {
  position: absolute; top: .4rem; right: 1.2rem; text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: .35rem;
  pointer-events: none; animation: bp-surgir .6s ease both;
}
.bp-titulo-mapa .bp-marca { opacity: .9; }
.bp-titulo-mapa-txt { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; color: #fff; }
.bp-regua-mini { width: 100%; gap: .6rem; margin-top: 0; }
.bp-regua-mini em { font-size: 1rem; }

/* arte 3: painel sobreposto com fade em gradiente para o mapa */
.bp-paineis-dir {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: min(720px, 56%); padding: .4rem 5rem .4rem 0;   /* dados maiores: painel mais largo (era 600px/52%) */
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem;
  /* o gradiente acompanha o lado: opaco à esquerda, dissolvendo para o mapa */
  background: linear-gradient(270deg,
    rgba(7,26,56,0) 0%, rgba(7,26,56,.72) 18%, rgba(7,26,56,.93) 40%, rgba(7,26,56,.96) 100%);
  animation: bp-surgir .5s ease both;
}
.bp-painel-dir { min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.bp-painel-comparacao { border-right: 1px solid rgba(159,198,245,.35); padding-right: .75rem; }
.bp-faixa-ano {
  color: #9FC6F5; font-size: .62rem; font-weight: 900; letter-spacing: .15em;
  text-transform: uppercase; margin-bottom: .35rem;
}
.bp-faixa-ano-atual { display: none; }
body.bp-comparando .bp-faixa-ano-atual { display: block; }
body.bp-comparando .bp-paineis-dir {
  width: min(1280px, 88%); align-items: start;   /* colunas iguais e alinhadas pelo topo: linhas casam */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "anterior atual";
  padding-left: 3rem;
  background: linear-gradient(90deg,
    rgba(7,26,56,0) 0%, rgba(7,26,56,.9) 10%, rgba(7,26,56,.98) 24%, #071a38 100%);
}
body.bp-comparando #painel-dir {
  grid-area: atual; position: relative; z-index: 2;
  padding: .35rem; border-radius: 5px; background: rgba(7,26,56,.34);
  box-shadow: -10px 12px 28px rgba(2,10,26,.42), 0 0 0 1px rgba(159,198,245,.13);
}
body.bp-comparando #painel-comparacao {
  grid-area: anterior; align-self: start; position: relative; z-index: 1;
  transform-origin: right center; border: 1px solid rgba(159,198,245,.22);
  border-radius: 5px; padding: .35rem; background: rgba(18,55,103,.28);
  animation: bp-comparacao-subir .48s cubic-bezier(.22,.9,.28,1) both;
}
body.bp-comparando #painel-comparacao .bp-faixa {
  background: linear-gradient(90deg, rgba(5,18,42,.72), rgba(25,65,118,.52));
  box-shadow: 0 8px 22px rgba(3,12,30,.24);
}
body.bp-comparando #painel-comparacao .bp-resumo2 { background: rgba(5,18,42,.38); }
@keyframes bp-comparacao-subir {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: .94; transform: none; }   /* sem escala: as linhas de 2022 casam com as atuais */
}
body.bp-comparando .bp-mapa-area { opacity: .16; transition: opacity .35s ease; }
body:not(.bp-comparando) .bp-mapa-area { opacity: 1; transition: opacity .35s ease; }
body.bp-comparando #btn-comparar { background: #E9F1FD; color: var(--azul-noite); font-weight: 800; }
.bp-faixa {
  background: linear-gradient(90deg, rgba(5,18,42,.98), rgba(9,32,70,.78));
  padding: .95rem 1.1rem; border-left: 4px solid var(--azul-claro);
  box-shadow: 0 10px 30px rgba(3,12,30,.45);
}
.bp-faixa-cargo { font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: -.01em; }
.bp-faixa-sub { font-size: .84rem; color: rgba(219,234,254,.82); margin-top: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.bp-faixa-sub b { font-weight: 800; color: #fff; }
.bp-resumo {
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .9rem;
  background: rgba(5,18,42,.55); padding: .7rem .9rem; margin-right: .4rem;
  font-size: .72rem; color: #B9D2F3;
}
.bp-resumo div { display: flex; justify-content: space-between; gap: .6rem; }
.bp-resumo b { color: #fff; font-variant-numeric: tabular-nums; }

/* =====================  lista de candidatos  ============================= */
.bp-lista { position: relative; margin-right: .4rem; }
.bp-linha {
  position: absolute; left: 0; right: 0; display: flex; align-items: center;
  gap: .75rem; padding: .35rem .2rem;
  transition: transform .55s cubic-bezier(.22,.9,.28,1), opacity .42s ease;
}
/* estado inicial de uma linha/card recém-criado: invisível e barra em zero.
   O JS remove a classe um quadro depois, e a transição faz o resto. */
.bp-entrando { opacity: 0; }
@keyframes bp-surgir {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.bp-linha-meio { flex: 1; min-width: 0; }
.bp-foto {
  width: 56px; height: 56px; flex: 0 0 auto; border-radius: 9999px;
  background: #0D1F3D; border: 2px solid var(--azul-claro);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.55); font-weight: 800; font-size: .85rem;
}
.bp-foto-lg { width: 64px; height: 64px; }
.bp-nome { font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-partido { display: flex; align-items: center; gap: .4rem; line-height: 1.2; color: rgba(190,214,245,.8); }
.bp-partido-sg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-sit {
  flex: 0 0 auto; font-size: .55rem; letter-spacing: .12em; font-weight: 800;
  text-transform: uppercase; background: var(--azul-claro); color: #08203F;
  padding: .08rem .35rem; border-radius: 2px; white-space: nowrap;
}
.bp-trilha { background: var(--trilha); border-radius: 1px; overflow: hidden; width: 100%; }
.bp-barra { height: 100%; border-radius: 1px; transition: width .62s cubic-bezier(.22,.9,.28,1); }
.bp-votos { margin-top: .25rem; color: rgba(190,214,245,.7); font-variant-numeric: tabular-nums; }
.bp-pct { flex: 0 0 auto; text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }

.bp-linha-clara .bp-nome, .bp-linha-clara .bp-pct { color: var(--tinta); }
.bp-linha-clara .bp-partido, .bp-linha-clara .bp-votos { color: var(--tinta-fraca); }

/* ========================  placar de TV  ================================= */
.bp-tv {
  display: flex; flex-direction: column; border-radius: 2px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(3,12,30,.5);
}
.bp-tv-topo { display: flex; align-items: center; gap: 1.2rem; background: #0B1F3E; padding: .75rem 1.4rem; }
.bp-tv-topo-abas { padding-bottom: .6rem; }
.bp-tv-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.28); }
.bp-tv-centro { flex: 1; text-align: center; }
.bp-tv-titulo { font-size: 1.3rem; font-weight: 900; line-height: 1; }
.bp-tv-titulo em { font-style: normal; font-size: .85rem; font-weight: 600; color: rgba(190,214,245,.7); margin-left: .6rem; }
.bp-tv-sub { font-size: .78rem; color: rgba(190,214,245,.8); margin-top: .3rem; }
.bp-tv-urnas { text-align: right; min-width: 7rem; }
.bp-tv-urnas span { display: block; font-size: .625rem; color: rgba(190,214,245,.7); }
.bp-tv-urnas strong { font-size: 1.1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.bp-tv-corpo {
  flex: 1; min-height: 0; overflow: auto; padding: 1.6rem 2rem;
  background: linear-gradient(180deg, #E3E9F2, #CDD7E6);
}
.bp-tv-base { height: 34px; background: linear-gradient(90deg, var(--azul-noite), #1E63C4, var(--azul-noite)); }

.bp-grade-cards {
  display: grid; align-content: start; gap: 1.4rem 2.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.bp-card { display: flex; align-items: center; gap: .9rem; transition: opacity .55s ease; }
.bp-card-nome { color: var(--tinta); font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-card-partido { display: flex; align-items: center; gap: .4rem; color: var(--tinta-fraca); font-size: .75rem; }
.bp-card-partido .bp-sit { font-style: normal; }
.bp-card-votos { color: var(--tinta-fraca); font-size: .75rem; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.bp-card-pct { flex: 0 0 6rem; text-align: right; color: var(--tinta); font-weight: 900; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.bp-rodape-votos {
  margin-top: 1.4rem; padding-top: .6rem; font-size: .72rem; color: var(--tinta-fraca);
  border-top: 1px solid rgba(18,48,94,.18);
}

/* ==========================  controles  ================================== */
.bp-controles {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: rgba(5,18,42,.6); border: 1px solid rgba(140,180,240,.2);
  padding: .55rem .8rem; border-radius: 3px;
}
.bp-play {
  background: #E9F1FD; color: var(--azul-noite);
  font-weight: 800; font-size: .72rem; letter-spacing: .05em;
  padding: .48rem 1.1rem; border-radius: 3px;
}
.bp-play:hover { background: #fff; }
.bp-btn-sec {
  background: rgba(70,125,205,.32); color: #DCE9FB;
  font-size: .7rem; font-weight: 600; padding: .45rem .85rem; border-radius: 3px;
}
.bp-btn-sec:hover { background: rgba(96,158,235,.5); }
.bp-slider { flex: 1; min-width: 140px; accent-color: var(--azul-claro); height: 4px; }
.bp-vel { display: flex; gap: .25rem; }
.bp-vel-btn {
  background: rgba(70,125,205,.3); color: #DCE9FB;
  font-size: .68rem; font-weight: 700; padding: .4rem .6rem; border-radius: 3px;
}
.bp-vel-btn-on { background: #9FC6F5; color: #0A2450; }
.bp-diag {
  flex-basis: 100%; font-size: .66rem; color: rgba(160,200,250,.6);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bp-erro {
  margin: 0; padding: 1rem 1.2rem; background: #3B1414; color: #FFD9D9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem;
  white-space: pre-wrap;
}

/* ==========================  responsivo  ================================= */
@media (max-width: 1024px) {
  .bp-topo { flex-wrap: wrap; }
  .bp-cargos { order: 3; flex-basis: 100%; gap: 1.4rem; justify-content: flex-start; }
  .bp-subtopo { flex-wrap: wrap; }
  .bp-titulo-mapa { position: static; align-items: flex-start; text-align: left; margin-bottom: .6rem; }
  .bp-mapa-area { flex-direction: column; }
  .bp-corpo { flex-direction: column; }
  .bp-corpo { flex-direction: column; }
  .bp-lateral { width: 100%; max-height: 220px; border-left: none; border-bottom: 1px solid rgba(140,180,240,.22); }
  .bp-mapa-wrap { min-height: 0; display: flex; flex-direction: column; }
  .bp-mapa-area { position: static; height: 44vh; }
  .bp-paineis-dir, body.bp-comparando .bp-paineis-dir {
    position: static; width: 100%; padding-left: 0; background: none; grid-template-columns: 1fr;
  }
  body.bp-comparando .bp-paineis-dir { grid-template-areas: "anterior" "atual"; }
  body.bp-comparando #painel-comparacao { transform-origin: center center; }
  body:not(.bp-modo-home) .bp-app .bp-mapa { -webkit-mask-image: none; mask-image: none; }
  .bp-card-pct { flex-basis: 4.5rem; font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bp-linha, .bp-barra, .bp-uf { transition: none !important; }
}

/* ==================  modo overlay (vMix Web Browser input)  ==============
   Ativado por ?overlay=placar|votos|mapa. Tira toda a interface de operação
   e deixa só o gráfico, ocupando a janela inteira — é o que o vMix captura.
   Com &transparente=1 o fundo some, e o vMix compõe o gráfico sobre o vídeo
   (o Web Browser input do vMix respeita alfa da página). */
body.bp-overlay .bp-topo,
body.bp-overlay .bp-subtopo,
body.bp-overlay .bp-lateral,
body.bp-overlay .bp-controles,
body.bp-overlay .bp-titulo-mapa { display: none !important; }

body.bp-overlay .bp-main { padding: 0; gap: 0; }
body.bp-overlay .bp-corpo { min-height: 100vh; }
body.bp-overlay .bp-palco { display: flex; flex-direction: column; justify-content: flex-end; }
/* altura do conteúdo e ancorado embaixo: é assim que entra como lower third
   num canal de Overlay do vMix, sem faixa vazia ocupando o quadro */
body.bp-overlay .bp-tv { height: auto; border-radius: 0; box-shadow: none; }
body.bp-overlay .bp-tv-corpo { flex: none; overflow: visible; }
/* ?ancora=cheio volta ao quadro inteiro, para telão e tela de estúdio */
body.bp-overlay.bp-ancora-cheio .bp-palco { justify-content: stretch; height: 100vh; }
body.bp-overlay.bp-ancora-cheio .bp-tv { height: 100vh; }
body.bp-overlay.bp-ancora-cheio .bp-tv-corpo { flex: 1; }

/* ===================================================================
   TRANSPARÊNCIA PARA vMix / NDI
   ===================================================================
   O browser source do vMix compõe a página sobre o vídeo usando o canal
   alfa. Qualquer elemento com fundo opaco vira um retângulo sólido no ar.
   Estas regras zeram o fundo em TODA a cadeia — html, body, e os
   contêineres que herdam cor do painel — e não só no body, que era a falha
   anterior. `!important` aqui é proposital: nenhuma regra posterior pode
   reintroduzir fundo numa página destinada ao ar. */
html.bp-transparente,
body.bp-transparente,
body.bp-transparente .bp-app,
body.bp-transparente .bp-comp-body,
body.bp-transparente .bp-palco-comp,
body.bp-transparente .bp-host,
body.bp-transparente .bp-corpo,
body.bp-transparente .bp-main,
body.bp-transparente .bp-palco,
body.bp-transparente .bp-painel { background: transparent !important; background-image: none !important; }
body.bp-transparente .bp-grid,
body.bp-transparente .bp-abertura-cenario { display: none !important; }
/* sombras projetadas sobre o vídeo continuam válidas: elas têm alfa */
/* o placar mantém seu próprio fundo claro; o que some é a moldura da página */
body.bp-transparente .bp-mapa-wrap { background: transparent; }

/* ---------------- etiquetas de % apurado sobre o mapa ------------------ */
/* Mesmo estilo do rótulo da UF (branco, negrito, sombra), só texto. A cor
   diz a posição em relação à média nacional de apuração:
   acima = verde-água · na média = branco · abaixo = âmbar · 100% = azul-gelo */
.bp-etiq-valor {
  font-family: "Inter", system-ui, sans-serif; font-weight: 800; font-size: 14px;
  letter-spacing: .01em; fill: #fff;
  filter: drop-shadow(0 1px 1.5px rgba(3,12,30,.9)) drop-shadow(0 0 6px rgba(3,12,30,.6));
  transition: fill .5s ease;
}
.bp-etiq[data-tom="acima"]  .bp-etiq-valor { fill: #8FE3B0; }
.bp-etiq[data-tom="abaixo"] .bp-etiq-valor { fill: #FFC46B; }
.bp-etiq[data-tom="final"]  .bp-etiq-valor { fill: #B9DCFF; }

/* foto do candidato: a imagem cobre o círculo; o número só aparece se a
   imagem falhar (servidor fora), para o círculo nunca ficar vazio */
.bp-foto { position: relative; overflow: hidden; }
.bp-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.bp-foto span { position: relative; z-index: 1; opacity: 0; }
.bp-foto-sem img { display: none; }
.bp-foto-sem span { opacity: 1; }

/* =========================  bottom line ao vivo  ========================= */
.bp-bl { display: flex; width: 100%; font-family: "Inter", system-ui, sans-serif; filter: drop-shadow(0 6px 22px rgba(3,12,30,.45)); }
.bp-bl-marca { flex: 0 0 200px; display: flex; flex-direction: column; }
.bp-bl-aovivo {
  background: #E11D1D; color: #fff; text-align: center; font-weight: 900;
  font-size: 1.05rem; letter-spacing: .14em; padding: .42rem 0;
}
.bp-bl-logo { flex: 1; background: #0A0E17; color: #fff; text-align: center; padding: .55rem .6rem .5rem; display: flex; flex-direction: column; justify-content: center; }
.bp-bl-logo-txt { font-size: 1.55rem; line-height: .95; }
.bp-bl-logo-ano { display: flex; align-items: center; gap: .4rem; margin: .3rem .5rem 0; }
.bp-bl-logo-ano span { flex: 1; height: 1px; background: rgba(255,255,255,.7); }
.bp-bl-logo-ano em { font-style: normal; font-size: .75rem; letter-spacing: .12em; }
.bp-bl-hora { display: flex; justify-content: space-between; margin-top: .45rem; padding: 0 .3rem; font-weight: 900; font-size: .95rem; letter-spacing: .06em; }
.bp-bl-corpo { flex: 1; display: flex; flex-direction: column; }
.bp-bl-topo {
  display: flex; align-items: center; gap: 1.2rem; padding: .45rem 1.2rem;
  background: #1B2F63; color: #fff; font-weight: 800; letter-spacing: .06em; font-size: 1.05rem;
}
.bp-bl-titulo { white-space: nowrap; }
.bp-bl-trilha { flex: 1; height: 14px; background: rgba(255,255,255,.22); border-radius: 2px; overflow: hidden; }
.bp-bl-barra { display: block; height: 100%; width: 0; background: #F2F4F8; transition: width .9s cubic-bezier(.22,.9,.28,1); }
.bp-bl-pct { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 6.2rem; text-align: right; }
.bp-bl-cands { flex: 1; display: flex; background: #E8E4DB; padding: .55rem 1rem; gap: 0; }
.bp-bl-cand { flex: 1; display: flex; align-items: center; gap: .8rem; padding: .2rem 1rem; border-left: 1px solid rgba(18,48,94,.22); transition: opacity .55s ease; }
.bp-bl-cand:first-child { border-left: none; }
.bp-bl-foto { width: 88px; height: 88px; border-width: 3px; }
.bp-bl-meio { min-width: 0; }
.bp-bl-nome { color: #12305E; font-weight: 700; font-size: 1.15rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-bl-partido { color: #3C5A8A; font-size: .78rem; margin-top: .1rem; }
.bp-bl-valor { color: #12305E; font-weight: 900; font-size: 2.4rem; line-height: 1; margin-top: .15rem; font-variant-numeric: tabular-nums; }

/* =========================  apuração por estado  ========================= */
/* Barra = tamanho do colégio eleitoral; % e ritmo de apuração ficam nas
   colunas numéricas. Assim peso eleitoral e andamento não se confundem. */
.bp-est { padding: 1.2rem 1.4rem 1rem 1rem; color: #fff; font-family: "Inter", system-ui, sans-serif; width: 100%; }
.bp-est-titulo { text-align: center; font-size: 2.4rem; font-weight: 800; margin: 0 0 1rem; color: #E9F1FD; }
.bp-est-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 30%); gap: 1.5rem; align-items: start; justify-content: stretch; }
.bp-est-barras { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; align-content: start; }
.bp-est-linha { min-width: 0; display: grid; grid-template-columns: 1rem minmax(86px, 112px) minmax(44px,1fr) 3.6rem minmax(0,4.8rem); align-items: center; gap: .28rem; transition: opacity .4s ease; }
.bp-est-nome { text-align: right; color: #DCE9FB; white-space: nowrap; line-height: 1.05; }
.bp-est-nome b { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 750; font-size: .78rem; }
.bp-est-nome small { display: block; overflow: hidden; text-overflow: ellipsis; margin-top: .08rem; font-size: .59rem; font-weight: 650; color: #B9DCFF; font-variant-numeric: tabular-nums; }
.bp-est-trilha { position: relative; height: 11px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.bp-est-apurado { position: absolute; left: 0; top: 0; height: 100%; border-radius: 3px; transition: width .62s cubic-bezier(.22,.9,.28,1); }
.bp-est-pct { font-weight: 900; font-variant-numeric: tabular-nums; font-size: .88rem; text-align: right; color: #fff; }
.bp-est-ritmo { overflow: hidden; text-overflow: ellipsis; font-size: .54rem; color: rgba(190,214,245,.82); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-est-final .bp-est-pct { color: #B9DCFF; }
.bp-raio { font-style: normal; font-size: 1.05rem; opacity: 0; transition: opacity .3s; color: #fff; text-align: center; }
.bp-raio-on { opacity: 1; animation: bp-piscar 1.1s ease-in-out infinite; filter: brightness(1.6) drop-shadow(0 0 5px #fff); }
@keyframes bp-piscar { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.bp-est-lado { display: flex; flex-direction: column; gap: 1.2rem; }
.bp-est-regioes { display: flex; flex-direction: column; gap: .95rem; padding-bottom: 1.1rem; border-bottom: 1px solid rgba(160,200,250,.35); }
.bp-est-reg-cab { display: flex; justify-content: space-between; align-items: baseline; }
.bp-est-reg-nome { font-size: 1.35rem; font-weight: 700; }
.bp-est-reg-pct { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.bp-est-reg-rod { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem; margin-top: .25rem; }
.bp-est-reg-trilha { display: block; width: 100%; height: 9px; }
.bp-est-reg-barra { display: block; height: 100%; border-radius: 3px; transition: width .62s ease; }
.bp-est-reg-num { font-size: .82rem; font-weight: 650; color: #C9DDF7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-est-total { text-align: right; padding-top: .3rem; }
.bp-est-total strong { display: block; font-size: 3.4rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.bp-est-total span { font-size: 1.15rem; font-weight: 700; }
.bp-est-total em { display: block; font-style: normal; font-size: .85rem; color: rgba(190,214,245,.8); margin-top: .3rem; }
.bp-est-legenda { display: flex; gap: 2.2rem; justify-content: center; margin-top: 1rem; font-size: .9rem; color: rgba(190,214,245,.85); }
.bp-est-legenda i { display: inline-block; vertical-align: middle; margin-right: .4rem; }
.bp-est-leg-solido { width: 26px; height: 12px; border-radius: 2px; background: #7FB2F0; }

/* ---------------- etiquetas de % apurado sobre o mapa ------------------ */
/* Mesmo estilo do rótulo da UF (branco, negrito, sombra), só texto. A cor
   diz a posição em relação à média nacional de apuração:
   acima = verde-água · na média = branco · abaixo = âmbar · 100% = azul-gelo */
.bp-etiq-valor {
  font-family: "Inter", system-ui, sans-serif; font-weight: 800; font-size: 14px;
  letter-spacing: .01em; fill: #fff;
  filter: drop-shadow(0 1px 1.5px rgba(3,12,30,.9)) drop-shadow(0 0 6px rgba(3,12,30,.6));
  transition: fill .5s ease;
}
.bp-etiq[data-tom="acima"]  .bp-etiq-valor { fill: #8FE3B0; }
.bp-etiq[data-tom="abaixo"] .bp-etiq-valor { fill: #FFC46B; }
.bp-etiq[data-tom="final"]  .bp-etiq-valor { fill: #B9DCFF; }

/* foto do candidato: a imagem cobre o círculo; o número só aparece se a
   imagem falhar (servidor fora), para o círculo nunca ficar vazio */
.bp-foto { position: relative; overflow: hidden; }
.bp-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.bp-foto span { position: relative; z-index: 1; opacity: 0; }
.bp-foto-sem img { display: none; }
.bp-foto-sem span { opacity: 1; }

/* =========================  bottom line ao vivo  ========================= */
.bp-bl { display: flex; width: 100%; font-family: "Inter", system-ui, sans-serif; filter: drop-shadow(0 6px 22px rgba(3,12,30,.45)); }
.bp-bl-marca { flex: 0 0 200px; display: flex; flex-direction: column; }
.bp-bl-aovivo {
  background: #E11D1D; color: #fff; text-align: center; font-weight: 900;
  font-size: 1.05rem; letter-spacing: .14em; padding: .42rem 0;
}
.bp-bl-logo { flex: 1; background: #0A0E17; color: #fff; text-align: center; padding: .55rem .6rem .5rem; display: flex; flex-direction: column; justify-content: center; }
.bp-bl-logo-txt { font-size: 1.55rem; line-height: .95; }
.bp-bl-logo-ano { display: flex; align-items: center; gap: .4rem; margin: .3rem .5rem 0; }
.bp-bl-logo-ano span { flex: 1; height: 1px; background: rgba(255,255,255,.7); }
.bp-bl-logo-ano em { font-style: normal; font-size: .75rem; letter-spacing: .12em; }
.bp-bl-hora { display: flex; justify-content: space-between; margin-top: .45rem; padding: 0 .3rem; font-weight: 900; font-size: .95rem; letter-spacing: .06em; }
.bp-bl-corpo { flex: 1; display: flex; flex-direction: column; }
.bp-bl-topo {
  display: flex; align-items: center; gap: 1.2rem; padding: .45rem 1.2rem;
  background: #1B2F63; color: #fff; font-weight: 800; letter-spacing: .06em; font-size: 1.05rem;
}
.bp-bl-titulo { white-space: nowrap; }
.bp-bl-trilha { flex: 1; height: 14px; background: rgba(255,255,255,.22); border-radius: 2px; overflow: hidden; }
.bp-bl-barra { display: block; height: 100%; width: 0; background: #F2F4F8; transition: width .9s cubic-bezier(.22,.9,.28,1); }
.bp-bl-pct { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 6.2rem; text-align: right; }
.bp-bl-cands { flex: 1; display: flex; background: #E8E4DB; padding: .55rem 1rem; gap: 0; }
.bp-bl-cand { flex: 1; display: flex; align-items: center; gap: .8rem; padding: .2rem 1rem; border-left: 1px solid rgba(18,48,94,.22); transition: opacity .55s ease; }
.bp-bl-cand:first-child { border-left: none; }
.bp-bl-foto { width: 88px; height: 88px; border-width: 3px; }
.bp-bl-meio { min-width: 0; }
.bp-bl-nome { color: #12305E; font-weight: 700; font-size: 1.15rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-bl-partido { color: #3C5A8A; font-size: .78rem; margin-top: .1rem; }
.bp-bl-valor { color: #12305E; font-weight: 900; font-size: 2.4rem; line-height: 1; margin-top: .15rem; font-variant-numeric: tabular-nums; }


/* ==============================  logos  ================================== */
.bp-logo { display: block; height: auto; object-fit: contain; }
.bp-logo-topo { height: 34px; width: auto; }
.bp-logo-abertura { position: absolute; bottom: 2rem; z-index: 2; height: 36px; width: auto; opacity: .95; }
.bp-logo-mapa { height: 30px; width: auto; opacity: .95; }
.bp-logo-tv { height: 30px; width: auto; }

/* ===================  faixa: ritmo + resumo em barras  =================== */
.bp-faixa-ritmo { font-size: .78rem; color: #9FC6F5; margin-top: .3rem; font-variant-numeric: tabular-nums; min-height: 1em; }
.bp-resumo2 { display: flex; flex-direction: column; gap: .5rem; background: rgba(5,18,42,.55); padding: .8rem 1rem; margin-right: .4rem; }
.bp-res-linha { display: grid; grid-template-columns: 6.2rem 1fr 4.2rem; align-items: center; gap: .8rem; }
.bp-res-rotulo { font-size: .86rem; font-weight: 700; color: #DCE9FB; }
.bp-res-trilha { height: 8px; background: rgba(255,255,255,.14); border-radius: 2px; overflow: hidden; }
.bp-res-barra { display: block; height: 100%; width: 0; background: #7FB2F0; transition: width .8s cubic-bezier(.22,.9,.28,1); }
.bp-res-pct { text-align: right; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }

/* =====================  etiquetas de situação  =========================== */
.bp-sit { font-style: normal; }
.bp-sit-eleito { background: #8FE3B0; color: #063A22; }
.bp-sit-turno  { background: #7FB2F0; color: #08203F; }
.bp-sit-prov   { background: rgba(143,227,176,.35); color: #DFF7E8; border: 1px solid rgba(143,227,176,.6); }
.bp-sit-proj   { background: transparent; color: #FFC46B; border: 1px dashed rgba(255,196,107,.7); }
.bp-linha-clara .bp-sit-prov { color: #0E5A32; background: rgba(143,227,176,.45); }
.bp-linha-clara .bp-sit-proj { color: #9A5B00; border-color: rgba(154,91,0,.6); }
/* eleito: a linha inteira ganha um brilho suave */
.bp-linha-eleita .bp-foto { box-shadow: 0 0 0 3px rgba(143,227,176,.55), 0 0 18px rgba(143,227,176,.45); }
.bp-linha-eleita .bp-nome, .bp-linha-eleita .bp-card-nome, .bp-linha-eleita .bp-bl-nome { text-shadow: 0 0 12px rgba(143,227,176,.35); }

/* ==========================  placar de TV  =============================== */
.bp-tv-centro-esq { display: flex; align-items: center; gap: 1rem; text-align: left; }
.bp-tv-bandeira { flex: 0 0 auto; }
.bp-bandeira { height: 42px; width: auto; border-radius: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.45); display: block; }
.bp-tv-titulo-grande { font-size: 1.85rem; font-weight: 900; letter-spacing: .02em; line-height: 1; }
.bp-tv-sub { font-size: .8rem; color: rgba(190,214,245,.75); margin-top: .35rem; }
.bp-tv-ritmo { display: block; font-style: normal; font-size: .72rem; color: #9FC6F5; margin-top: .15rem; font-variant-numeric: tabular-nums; }
/* lista mais afastada do título; silhueta do estado como marca-d'água */
.bp-tv-corpo-placar { position: relative; padding-top: 2.4rem; overflow: hidden; }
.bp-tv-corpo-placar .bp-lista-host { position: relative; z-index: 1; }
.bp-silhueta-host { position: absolute; right: -2%; bottom: -8%; width: 34%; pointer-events: none; z-index: 0; }
.bp-silhueta { width: 100%; height: auto; fill: #12305E; opacity: .07; }
/* switcher inferior: replica o do topo, adaptado ao fundo claro */
.bp-tv-switcher { display: flex; justify-content: center; gap: 2rem; padding: .55rem 1rem .65rem; background: #D3DAE6; border-top: 1px solid rgba(18,48,94,.15); }
.bp-tv-aba { font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: rgba(18,48,94,.5); padding: .25rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.bp-tv-aba:hover { color: #12305E; }
.bp-tv-aba-on { color: #12305E; border-color: #12305E; }
.bp-tv-aba-sec { font-size: .66rem; font-weight: 700; }

/* ============================  bottom line  ============================== */
.bp-bl-ritmo { font-style: normal; font-size: .78rem; color: #B9DCFF; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp-bl-partido .bp-sit { margin-left: .4rem; font-size: .55rem; letter-spacing: .1em; padding: .08rem .35rem; border-radius: 2px; text-transform: uppercase; font-weight: 800; }

/* botão secundário na lateral */
.bp-lateral-rodape { display: flex; flex-direction: column; gap: .45rem; margin-top: 1rem; }
.bp-lateral-rodape .bp-home { margin-top: 0; font-size: .64rem; letter-spacing: .16em; }
.bp-apuracao-btn { background: rgba(70,125,205,.22); color: rgba(220,233,251,.72); }
.bp-apuracao-btn-on {
  background: rgba(70,125,205,.5); color: #fff;
  box-shadow: inset 3px 0 0 #6FB1F7, 0 3px 9px rgba(3,12,30,.25);
}

/* a vista "estados" dentro do painel: compacta e com rolagem, sem estourar o palco */
.bp-painel[data-painel="estados"] { height: 100%; overflow: auto; }
.bp-painel[data-painel="estados"] .bp-est { padding-top: .6rem; }
.bp-painel[data-painel="estados"] .bp-est-titulo { font-size: 1.8rem; margin-bottom: .6rem; }
.bp-painel[data-painel="estados"] .bp-est-total strong { font-size: 3.2rem; }

/* no painel do operador o placar ocupa o palco inteiro; como browser source
   (componente.html) ele tem altura do conteúdo e ancora embaixo */
.bp-painel[data-painel="placar"], .bp-painel[data-painel="votos"] { height: 100%; }
.bp-painel[data-painel="placar"] > .bp-tv, .bp-painel[data-painel="votos"] > .bp-tv { height: 100%; }
.bp-painel[data-painel="placar"] .bp-tv-corpo-placar { flex: 1; }

/* com textura de vidro externa presente, as faces e luzes procedurais recuam */
.bp-com-textura .bp-cam-faces .bp-uf[fill^="url(#bp-vidro"] { fill-opacity: .35 !important; }
.bp-com-textura .bp-cam-luzes, .bp-com-textura .bp-cam-sombras { opacity: .35 !important; }

/* placar: título com bandeira centralizado de verdade (colunas laterais iguais) */
.bp-tv-topo-3col { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.bp-tv-topo-3col .bp-logo-tv { justify-self: start; }
.bp-tv-topo-3col .bp-tv-urnas { justify-self: end; }
.bp-tv-topo-3col .bp-tv-centro-esq { justify-self: center; }
/* alternância lista / grade no topo do placar */
.bp-tv-modos { display: flex; justify-content: flex-end; gap: .3rem; padding: .4rem 1.2rem 0; background: linear-gradient(180deg, #E3E9F2, #E3E9F2); }
.bp-tv-modo { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(18,48,94,.55); padding: .3rem .8rem; border-radius: 3px; background: rgba(18,48,94,.08); }
.bp-tv-modo-on { color: #fff; background: #12305E; }
/* brancos / nulos / abstenção no placar, entre a lista e o switcher */
.bp-tv-resumo { position: relative; z-index: 1; margin-top: 1.4rem; }
.bp-tv-resumo .bp-resumo2 { background: rgba(18,48,94,.08); margin-right: 0; padding: .7rem 1rem; }
.bp-tv-resumo .bp-res-rotulo { color: #12305E; }
.bp-tv-resumo .bp-res-trilha { background: rgba(18,48,94,.15); }
.bp-tv-resumo .bp-res-barra { background: #1B2F63; }
.bp-tv-resumo .bp-res-pct { color: #12305E; }
.bp-tv-corpo-placar .bp-grade-host { position: relative; z-index: 1; }
/* linha do tempo com horários */
.bp-linha-wrap { position: relative; flex: 1; min-width: 200px; padding-bottom: 1.05rem; }
.bp-linha-wrap .bp-slider { width: 100%; min-width: 0; }
.bp-linha-eixo { position: absolute; left: 0; right: 0; bottom: 0; height: 1rem; font-size: .6rem; color: rgba(160,200,250,.7); font-variant-numeric: tabular-nums; }
.bp-linha-eixo span { position: absolute; transform: translateX(-50%); }
.bp-linha-eixo span:first-child { transform: none; }
.bp-linha-eixo span:last-child { transform: translateX(-100%); }
.bp-linha-agora { position: absolute; top: -1.05rem; transform: translateX(-50%); font-size: .64rem; font-weight: 800; color: #fff; background: rgba(76,154,240,.9); padding: .05rem .4rem; border-radius: 2px; font-variant-numeric: tabular-nums; pointer-events: none; }
.bp-controles { padding-top: 1.2rem; }

/* vidro: faixa especular e grão */
.bp-cam-especular { mix-blend-mode: screen; }
.bp-cam-grao { mix-blend-mode: overlay; opacity: .55; }
.bp-com-textura .bp-cam-especular, .bp-com-textura .bp-cam-grao { opacity: .4 !important; }

/* ============================  progressão  ============================== */
.bp-prog { display: flex; flex-direction: column; height: 100%; padding: .8rem 1.4rem 1rem; color: #fff; font-family: "Inter", system-ui, sans-serif; }
.bp-prog-cab { text-align: center; margin-bottom: .4rem; }
.bp-prog-titulo { font-size: 1.7rem; font-weight: 800; margin: 0; color: #E9F1FD; }
.bp-prog-sub { font-size: .82rem; color: rgba(190,214,245,.8); margin-top: .2rem; }
.bp-prog-palco { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.bp-prog-svg { width: 100%; height: 100%; max-height: 100%; }
.bp-prog-vazio { font-size: .9rem; color: rgba(190,214,245,.6); }
.bp-prog-grade { stroke: rgba(160,200,250,.16); stroke-width: 1; }
.bp-prog-eixo { fill: rgba(190,214,245,.75); font-size: 15px; font-family: "Inter", sans-serif; font-variant-numeric: tabular-nums; }
.bp-prog-eixo-rotulo { fill: rgba(190,214,245,.55); font-size: 14px; font-family: "Inter", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.bp-prog-curva { fill: none; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 6px rgba(3,12,30,.5)); transition: d .6s ease; }
.bp-prog-ponta { filter: drop-shadow(0 0 6px currentColor); }
.bp-prog-rotulo { font-size: 17px; font-weight: 800; font-family: "Inter", sans-serif; paint-order: stroke; stroke: rgba(7,26,56,.75); stroke-width: 3px; }
.bp-prog-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin-top: .5rem; font-size: .76rem; color: rgba(190,214,245,.85); }
.bp-prog-legenda span { display: inline-flex; align-items: center; gap: .4rem; }
.bp-prog-legenda i { width: 16px; height: 4px; border-radius: 2px; }
.bp-prog-legenda b { color: rgba(160,200,250,.7); font-weight: 600; }
.bp-painel[data-painel="progressao"] { height: 100%; }

/* ================= composição partidária da Câmara ====================== */
.bp-painel[data-painel="congresso"] { height: 100%; overflow: hidden; }
.bp-congresso {
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 5px; box-shadow: 0 18px 48px rgba(2,12,30,.34);
  font-family: "Inter", system-ui, sans-serif;
}

/* A placa clara é a única camada: sem barra superior azul. Ela se comporta
   como vidro sobre o mapa — daí o desfoque de fundo, o brilho no canto e a
   textura de ruído em opacidade muito baixa, que dá materialidade sem
   competir com os números. */
.bp-cong-vidro {
  position: relative; isolation: isolate; flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: stretch;
  padding: 1.1rem 2.2rem .7rem;
  color: #102A50;
  /* translucidez de verdade: o fundo da página (gradiente e grade) aparece
     através da placa. É isso que faz o olho ler "vidro sobre o mapa" em vez
     de "retângulo claro colado por cima". */
  background: linear-gradient(145deg, rgba(236,244,253,.80), rgba(198,218,240,.74));
  backdrop-filter: blur(10px) saturate(118%); -webkit-backdrop-filter: blur(10px) saturate(118%);
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(18,48,94,.08);
}
.bp-cong-vidro::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 20% 8%, rgba(255,255,255,.7), transparent 42%),
              linear-gradient(118deg, rgba(100,156,220,.14), transparent 52%);
  mix-blend-mode: soft-light;
}
/* textura: ruído fino em opacidade baixíssima, para a placa não parecer
   um retângulo chapado */
.bp-cong-vidro::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* cabeçalho dentro da placa: marca, identificação, switcher central, % à direita */
.bp-cong-cabecalho {
  flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1.2rem; margin-bottom: .5rem;
}
.bp-cong-logo { width: 116px; height: auto; justify-self: start; grid-column: 1; grid-row: 1; }
.bp-cong-id { grid-column: 1; grid-row: 1; justify-self: start; margin-left: 9rem; line-height: 1.1; }
.bp-cong-id strong { display: block; font-size: 1.4rem; font-weight: 900; letter-spacing: .02em; color: #0C2A5C; }
.bp-cong-id span { font-size: .74rem; font-weight: 500; color: rgba(16,42,80,.62); }

/* switcher centralizado na área clara */
.bp-cong-casas {
  grid-column: 2; justify-self: center;
  display: flex; gap: .25rem; padding: .28rem; border-radius: 999px;
  background: rgba(18,48,94,.1); border: 1px solid rgba(18,48,94,.16);
}
.bp-cong-casa {
  padding: .46rem 1.7rem; border-radius: 999px; font-size: .82rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(16,42,80,.55);
  transition: background .2s, color .2s;
}
.bp-cong-casa:hover { color: #0C2A5C; }
.bp-cong-casa-on, .bp-cong-casa-on:hover { background: #0C2A5C; color: #fff; }

/* % de urnas apuradas: topo direito, com margem */
.bp-cong-apuracao { grid-column: 3; justify-self: end; text-align: right; line-height: 1.05; }
.bp-cong-apuracao span {
  display: block; font-size: .56rem; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(16,42,80,.55);
}
.bp-cong-apuracao strong {
  font-size: 1.85rem; font-weight: 900; font-variant-numeric: tabular-nums; color: #0C2A5C;
}

/* palco */
.bp-cong-palco { position: relative; flex: 1; min-height: 0; width: 100%;
  display: flex; align-items: stretch; gap: .8rem; }
/* o top 5 ocupa a coluna da esquerda; o gráfico ocupa todo o resto */
.bp-cong-area { position: relative; flex: 1; min-width: 0; margin-left: 392px; container-type: size;
  display: flex; align-items: center; justify-content: center; }
/* a figura tem a proporção do viewBox (--prop) e o maior tamanho que cabe:
   as plaquinhas, posicionadas em %, caem exatamente sobre os pontos */
/* camada própria e estável: (1) as plaquinhas de vidro têm sempre a mesma raiz de desfoque — antes ela trocava no
   fim do fade de entrada da área e o vidro "pulava"; (2) os 594 pontos animados redesenham só esta camada, não a
   placa de tela inteira com os overlays de mistura (soft-light/multiply) */
.bp-cong-figura { position: relative; --prop: 1.923; will-change: opacity;
  width: min(100cqw, 100cqh * var(--prop)); aspect-ratio: var(--prop); }
.bp-cong-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }

/* pontos 2D vistos de cima */
.bp-cong-dot { stroke: rgba(255,255,255,.55); stroke-width: 1; transition: fill .38s ease; }
.bp-cong-dot-vago { fill: rgba(255,255,255,.5); stroke: rgba(16,42,80,.2); stroke-width: 1.4; }
/* Senado, "Nesta eleição": cadeira fora de disputa (eleita em 2022) */
.bp-cong-dot-fora { fill: #3b4658; stroke: rgba(255,255,255,.35); }

/* total: encaixado na concavidade do hemiciclo */
.bp-cong-total {
  position: absolute; left: 50%; top: 79%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  padding: .55rem 1.8rem .6rem; border-radius: 8px; pointer-events: none;
  background: rgba(12,42,92,.92); color: #fff; box-shadow: 0 8px 22px rgba(2,12,30,.35);
}
.bp-cong-total[hidden] { display: none; }
.bp-cong-total span { font-size: .66rem; font-weight: 800; letter-spacing: .22em; color: rgba(190,214,245,.85); }
.bp-cong-total strong { font-size: 2.9rem; font-weight: 900; font-variant-numeric: tabular-nums; margin: .1rem 0; }
.bp-cong-total em { font-style: normal; font-size: .64rem; font-weight: 700; letter-spacing: .18em; color: rgba(190,214,245,.8); }

/* ---- plaquinhas de vidro líquido sobre as bancadas (legíveis na TV) ---- */
.bp-cong-placas { position: absolute; inset: 0; pointer-events: none; }
.bp-cong-placa {
  position: absolute; transform: translate(-50%, -50%); isolation: isolate;
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  padding: .38rem .9rem .38rem .65rem; border-radius: 999px;
  font-size: 25px; line-height: 1; color: #0C2A5C;
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(255,255,255,.72), rgba(255,255,255,0) 58%),
    linear-gradient(160deg, rgba(255,255,255,.62), rgba(232,242,255,.38) 55%, rgba(255,255,255,.55));
  backdrop-filter: blur(9px) saturate(170%); -webkit-backdrop-filter: blur(9px) saturate(170%);
  box-shadow: 0 6px 18px rgba(8,30,70,.22), 0 1px 0 rgba(8,30,70,.12), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -2px 6px rgba(80,130,200,.14);
}
/* borda iridescente, como nos recipientes da Apuração por Estado */
.bp-cong-placa::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; z-index: -1; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(197,230,255,.5) 30%, rgba(137,191,255,.25) 55%, rgba(208,199,255,.55) 80%, rgba(255,255,255,.95));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.bp-cong-placa i { width: 14px; height: 14px; border-radius: 50%; background: var(--cor); box-shadow: 0 0 0 2px rgba(255,255,255,.85); flex: 0 0 auto; }
.bp-cong-placa b { font-weight: 800; letter-spacing: -.01em; }
.bp-cong-placa strong { font-weight: 900; font-variant-numeric: tabular-nums; }
.bp-cong-placa[hidden] { display: none; }

/* ---- 2º seletor: Nesta eleição × Total da Casa ---- */
.bp-cong-seletores { grid-column: 2; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.bp-cong-modos { display: flex; gap: .2rem; padding: .22rem; border-radius: 999px;
  background: rgba(255,255,255,.42); border: 1px solid rgba(18,48,94,.14); transition: opacity .25s; }
.bp-cong-modos-off { visibility: hidden; opacity: 0; }
.bp-cong-modo { padding: .3rem 1.1rem; border-radius: 999px; font-size: .72rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: rgba(16,42,80,.55); transition: background .2s, color .2s; }
.bp-cong-modo:hover { color: #0C2A5C; }
.bp-cong-modo-on, .bp-cong-modo-on:hover { background: rgba(255,255,255,.95); color: #0C2A5C; box-shadow: 0 2px 8px rgba(12,42,92,.14); }

/* ---- Congresso (círculo completo): tabela à esquerda, chaves à direita ---- */
.bp-congresso[data-casa="congresso"] .bp-cong-area { margin-left: 468px; }
.bp-congresso[data-casa="congresso"] .bp-cong-top5 { width: 452px; top: 0; bottom: 0; margin: auto 0; height: fit-content; gap: .3rem; }
.bp-congresso[data-casa="congresso"] .bp-cong-legenda { display: none; }
.bp-cong-tab-cab, .bp-cong-tab-linha { display: grid; grid-template-columns: 9px minmax(0,1fr) 4.4rem 4.4rem 4.6rem; gap: .5rem; align-items: center; }
.bp-cong-tab-cab { padding: 0 .7rem .15rem; font-size: .66rem; font-weight: 800; letter-spacing: .12em; color: rgba(16,42,80,.55); }
.bp-cong-tab-cab span:nth-child(n+3) { text-align: right; }
.bp-cong-tab-cab span:nth-child(2) { grid-column: 2; }
.bp-cong-tab-linha { height: 46px; padding: 0 .7rem; border-radius: 5px;
  background: rgba(255,255,255,.66); border: 1px solid rgba(38,72,118,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
  font-variant-numeric: tabular-nums; }
.bp-cong-tab-linha i { width: 7px; height: 28px; border-radius: 1.5px; background: var(--cor); }
.bp-cong-tab-linha .bp-cong-sigla { font-size: 1.02rem; }
.bp-cong-tab-linha span:nth-child(n+3) { text-align: right; font-size: 1.08rem; font-weight: 700; color: rgba(16,42,80,.7); }
.bp-cong-tab-linha strong { text-align: right; font-size: 1.4rem; font-weight: 900; color: #0C2A5C; }
.bp-cong-tab-outros, .bp-cong-tab-vago { height: 36px; background: rgba(255,255,255,.4); }
.bp-cong-tab-outros .bp-cong-sigla, .bp-cong-tab-vago .bp-cong-sigla { font-size: .86rem; font-weight: 700; color: rgba(16,42,80,.62); }
.bp-cong-tab-outros strong, .bp-cong-tab-vago strong { font-size: 1.1rem; color: rgba(16,42,80,.7); }
.bp-cong-tab-vago i { background: rgba(16,42,80,.16); }
.bp-cong-chave line { stroke: rgba(16,42,80,.38); stroke-width: 2; }
.bp-cong-eixo { stroke: rgba(16,42,80,.38); stroke-width: 2; }
.bp-cong-chave-t { font: 900 46px Inter, system-ui, sans-serif; fill: #0C2A5C; letter-spacing: .04em; }
.bp-cong-chave-s { font: 700 22px Inter, system-ui, sans-serif; fill: rgba(16,42,80,.6); letter-spacing: .16em; }
.bp-cong-chave-n { font: 900 96px Inter, system-ui, sans-serif; fill: #0C2A5C; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* em tela cheia o botão Brasil ocupa o canto inferior direito: o hemiciclo deixa a mesma folga dos dois lados */
body.bp-congresso-cheio .bp-congresso:not([data-casa="congresso"]) .bp-cong-figura { width: min(100cqw - 200px, 100cqh * var(--prop)); }
.bp-congresso[data-casa="congresso"] .bp-cong-area { padding-block: 1.1rem .4rem; }

/* ---- plenário (vMix): só o hemiciclo de uma Casa ---- */
.bp-cong-plenario .bp-cong-seletores, .bp-cong-plenario .bp-cong-top5, .bp-cong-plenario .bp-cong-legenda { display: none; }
.bp-cong-plenario .bp-cong-cabecalho { grid-template-columns: 1fr auto; margin-bottom: .2rem; }
.bp-cong-plenario .bp-cong-apuracao { grid-column: 2; }
.bp-cong-plenario .bp-cong-area { margin-left: 0; }
.bp-cong-plenario .bp-cong-nota { margin-top: .5rem; font-size: .7rem; }

/* nota: chave do anel (remanescentes) */
.bp-cong-nota-anel { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: rgba(16,42,80,.7); }
.bp-cong-nota-anel svg { width: 13px; height: 13px; }
.bp-cong-nota-anel circle { fill: #3b4658; }

/* ---- tela cheia no painel (mesma linguagem do Prumo) ---- */
body.bp-congresso-cheio .bp-painel[data-painel="congresso"] { position: absolute; inset: 0; }
body.bp-congresso-cheio .bp-congresso { border-radius: 0; box-shadow: none;
  background: radial-gradient(110% 80% at 50% 0%, #1d4f9c 0%, #0e2f66 55%, #071a3d 100%); }
body.bp-congresso-cheio .bp-cong-vidro { margin: 1.1rem 1.2rem; border-radius: 14px;
  /* pé de 2,7rem: faixa própria para "Ocultar barra" e "Light/Dark" — antes eles encostavam na fileira de fichas */
  padding: 1.3rem 2.4rem 2.7rem;
  /* em tela cheia, atrás da placa só há o degradê liso do .bp-congresso: desfocá-lo dá o mesmo degradê. O vidro
     (backdrop-filter) aqui custava um desfoque de tela inteira por quadro — 3840×2160 em 4K — sem efeito visível. */
  backdrop-filter: none; -webkit-backdrop-filter: none; }
/* a margem só anima no instante em que a barra é mostrada/ocultada (barra.js), nunca na entrada da tela cheia */
body.bp-barra-animando.bp-congresso-cheio .bp-cong-vidro { transition: margin-bottom .4s; }
body.bp-congresso-cheio:not(.bp-sem-barra) .bp-cong-vidro { margin-bottom: calc(92px + .6rem); }
body.bp-congresso-cheio.bp-tela-cheia #btn-brasil { right: 2.2rem; bottom: calc(1.9rem + var(--barra-cheia, 0px)); top: auto; left: auto; }
body.bp-congresso-cheio #controles { left: 0; right: 0; bottom: 0; width: auto; transform: none; border-radius: 0; padding: .45rem 1.2rem .4rem; background: rgba(10,22,46,.86); }
body.bp-congresso-cheio:not(.bp-sem-barra) { --barra-cheia: 92px; }
body.bp-congresso-cheio.bp-sem-barra #controles { transform: translateY(110%); }
body.bp-congresso-cheio .bp-cong-legenda { padding-right: 100px; }   /* o botão Brasil fica no canto */
.bp-cong-barra-btn { position: absolute; left: 1rem; bottom: .7rem; z-index: 6; font: inherit; font-size: .72rem; font-weight: 600; color: #4a6391;
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.9); border-radius: 999px; padding: .32rem .75rem; cursor: pointer; }
.bp-cong-isolado .bp-cong-barra-btn { display: none; }

/* entrada e saída */
.bp-cong-entrando .bp-cong-anim { animation: bp-cong-sobe .7s calc(var(--i) * 90ms) both cubic-bezier(.2,.8,.2,1); }
.bp-cong-entrando .bp-cong-cabecalho { animation-name: bp-cong-desce; }
.bp-cong-entrando .bp-cong-dot { animation: bp-cong-ponto .45s calc(.25s + var(--d)) both cubic-bezier(.2,.8,.2,1); transform-box: fill-box; transform-origin: center; }
.bp-cong-entrando .bp-cong-placa { animation: bp-cong-placa .5s calc(1.1s + var(--k) * 60ms) both cubic-bezier(.22,1,.36,1); }
@keyframes bp-cong-sobe { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes bp-cong-desce { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes bp-cong-ponto { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes bp-cong-placa { from { opacity: 0; transform: translate(-50%, -30%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%); } }
.bp-cong-saindo { animation: bp-cong-sai .5s both cubic-bezier(.4,0,.2,1); }
@keyframes bp-cong-sai { to { opacity: 0; transform: scale(.985); } }

/* ---- top 5: mais abaixo, maior, com tipografia reequilibrada ---------- */
.bp-cong-top5 {
  position: absolute; left: 0; top: 12%; z-index: 2; width: 382px;
  display: flex; flex-direction: column; gap: .34rem;
}
/* colunas iguais no cabeçalho e nas linhas: os títulos ficam alinhados
   com os números que rotulam */
.bp-cong-cab,
.bp-cong-part { grid-template-columns: 9px minmax(0,1fr) 3.2rem 4.2rem 2.2rem; gap: .5rem; }
.bp-cong-cab {
  display: grid; padding: 0 .7rem .1rem; font-size: .68rem; font-weight: 800;
  letter-spacing: .12em; color: rgba(16,42,80,.55);
}
.bp-cong-cab span:nth-child(2) { grid-column: 3; text-align: right; }
.bp-cong-cab span:nth-child(3) { grid-column: 4; text-align: right; color: rgba(16,42,80,.8); }

.bp-cong-part {
  min-width: 0; display: grid; align-items: center; padding: 0 .7rem; border-radius: 5px;
  background: rgba(255,255,255,.66); border: 1px solid rgba(38,72,118,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.bp-cong-part i { width: 7px; border-radius: 1.5px; background: var(--cor); }
.bp-cong-sigla { min-width: 0; white-space: nowrap; font-weight: 800; overflow: hidden; }
.bp-cong-antes { text-align: right; font-variant-numeric: tabular-nums; color: rgba(16,42,80,.52); }
.bp-cong-agora { text-align: right; font-variant-numeric: tabular-nums; font-weight: 900; color: #0C2A5C; }
.bp-cong-var { font-style: normal; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.bp-var-sobe { color: #1B8A4C; }
.bp-var-desce { color: #C0392B; }
.bp-var-igual { color: rgba(16,42,80,.35); }

/* Escala do top 5: o AGORA lidera, mas sem esmagar o resto. A razão entre
   AGORA e ANTES era de quase 2x; agora é ~1,4x, que dá hierarquia sem
   desequilíbrio. */
.bp-cong-part-top { height: 50px; }
.bp-cong-part-top i { height: 32px; }
.bp-cong-part-top .bp-cong-sigla { font-size: clamp(.78rem, 1.2vw, 1.06rem); letter-spacing: -.01em; }
.bp-cong-part-top .bp-cong-antes { font-size: 1.02rem; }
.bp-cong-part-top .bp-cong-agora { font-size: 1.46rem; }
.bp-cong-part-top .bp-cong-var { font-size: .74rem; }

/* demais partidos */
.bp-cong-legenda {
  flex: 0 0 auto; width: 100%; max-height: 118px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: .3rem .5rem;
  padding: .5rem .2rem .25rem;
}
.bp-cong-legenda .bp-cong-part {
  height: 27px; grid-template-columns: 6px minmax(0,1fr) 1.9rem 2.5rem; gap: .35rem; padding: 0 .45rem;
}
.bp-cong-legenda .bp-cong-var { display: none; }
.bp-cong-legenda .bp-cong-part i { height: 17px; }
/* A coluna da grade compacta tem ~61px. Siglas longas encolhem por faixa de
   comprimento em vez de serem cortadas — "REPUBLICANOS" e "SOLIDARIEDADE"
   são os casos limite. */
.bp-cong-legenda .bp-cong-sigla { font-size: .68rem; }
.bp-cong-legenda .bp-cong-sigla[data-longa="1"] { font-size: .5rem; letter-spacing: -.03em; }
.bp-cong-legenda .bp-cong-sigla[data-longa="2"] { font-size: .44rem; letter-spacing: -.04em; }
.bp-cong-legenda .bp-cong-antes { font-size: .66rem; }
.bp-cong-legenda .bp-cong-agora { font-size: .94rem; }
.bp-cong-pendente i { background: rgba(64,85,113,.22); }
.bp-cong-pendente { color: rgba(16,42,80,.58); }
.bp-cong-nota {
  flex: 0 0 auto; margin-top: .2rem; text-align: center;
  font-size: .58rem; color: rgba(16,42,80,.5); letter-spacing: .03em;
}

/* =================  placar: caber na tela, sem rolagem  =================
   O palco tem altura fixa; o placar precisa caber nele COM a barra inferior
   de progressão visível. Como as linhas da lista têm altura fixada em JS,
   a folga vem de reduzir paddings e a moldura. */
.bp-painel[data-painel="placar"] { overflow: hidden; }
.bp-painel[data-painel="placar"] > .bp-tv { display: flex; flex-direction: column; }
.bp-painel[data-painel="placar"] .bp-tv-corpo-placar {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
  padding: .8rem 1.6rem .6rem;
}
/* a lista tem altura própria (linhas absolutas); não pode ser esticada nem
   comprimida por flex, senão o bloco de brancos/nulos sobe por cima dela */
.bp-painel[data-painel="placar"] .bp-lista-host { flex: 0 0 auto; }
.bp-painel[data-painel="placar"] .bp-tv-corpo-placar { justify-content: flex-start; }
.bp-painel[data-painel="placar"] .bp-tv-resumo { margin-top: .6rem; flex: 0 0 auto; }
.bp-painel[data-painel="placar"] .bp-tv-resumo .bp-resumo2 { gap: .3rem; padding: .5rem .9rem; }
.bp-painel[data-painel="placar"] .bp-tv-switcher { flex: 0 0 auto; padding: .4rem 1rem .45rem; }
.bp-painel[data-painel="placar"] .bp-tv-base { flex: 0 0 auto; height: 16px; }
.bp-painel[data-painel="placar"] .bp-tv-topo { padding-top: .45rem; padding-bottom: .45rem; }
.bp-painel[data-painel="placar"] .bp-tv-modos { padding-top: .25rem; }
.bp-painel[data-painel="placar"] .bp-tv-titulo-grande { font-size: 1.58rem; }
.bp-painel[data-painel="placar"] .bp-tv-urnas strong { font-size: 1rem; }
.bp-painel[data-painel="placar"] .bp-bandeira { height: 40px; }
.bp-painel[data-painel="placar"] .bp-res-linha { grid-template-columns: 5.6rem 1fr 4rem; }
.bp-painel[data-painel="placar"] .bp-res-rotulo,
.bp-painel[data-painel="placar"] .bp-res-pct { font-size: .72rem; }
/* número grande vira contagem de votos quando a métrica é "Votos" */
.bp-lista-votos .bp-pct { font-variant-numeric: tabular-nums; }

/* O painel inteiro cabe na janela: topo, subtopo, palco e controles dividem
   a altura da viewport. Sem isto o palco cresce e empurra a barra de
   progressão para fora da tela em monitores mais baixos. */
.bp-app { height: 100vh; overflow: hidden; }
.bp-corpo { flex: 1; min-height: 0; }
.bp-lateral { min-height: 0; }
.bp-main { min-height: 0; }
.bp-palco { flex: 1; min-height: 0; }
.bp-controles { flex: 0 0 auto; }
@media (max-width: 1024px) {
  .bp-app { height: auto; overflow: visible; }
}

/* preserva o espaço do conteúdo quando o cargo exige uma UF ainda não escolhida */
.bp-sem-estado {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; text-align: center; padding: 2.5rem 1.5rem; flex: 1;
  font-family: "Inter", system-ui, sans-serif;
}
.bp-sem-estado strong { font-size: 1.35rem; font-weight: 800; color: #E9F1FD; }
.bp-sem-estado span { font-size: .86rem; max-width: 24rem; line-height: 1.55; color: rgba(190,214,245,.75); }
.bp-tv .bp-sem-estado strong { color: #12305E; }
.bp-tv .bp-sem-estado span { color: #43608C; }
.bp-sem-uf .bp-tv-resumo, .bp-sem-uf .bp-resumo2 { display: none; }

/* grade vista ATRAVÉS do vidro: só dentro do contorno do Brasil */
.bp-cam-grade-vidro line { stroke: rgba(255,255,255,.11); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------------- botão flutuante "Brasil / Presidente" ------------------- */
/* UM só visual em todas as telas (mapa, Placar, Prumo, Mapas, Congresso…): círculo de vidro azul líquido, o
   mesmo disco do interruptor da urna, com a borda iridescente dos recipientes de vidro. As telas cheias só
   mudam a POSIÇÃO — nunca forma, cor ou tamanho (o Prumo e o Congresso tinham virado um quadrado branco). */
.bp-btn-brasil {
  /* com o painel de resultados à esquerda, o atalho circular vai para a
     direita, junto da lateral de estados */
  position: absolute; right: 1.1rem; bottom: 1rem; z-index: 6; isolation: isolate;
  width: 84px; height: 84px; border-radius: 50%; padding: 13px;
  background: radial-gradient(circle at 50% 32%, rgba(84,140,220,.62), rgba(18,52,112,.72) 58%, rgba(5,18,42,.82) 100%);
  border: 1px solid rgba(160,205,255,.42);
  backdrop-filter: blur(8px) saturate(140%); -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow: 0 8px 22px rgba(3,12,30,.42), inset 0 1px 0 rgba(255,255,255,.28), inset 0 -6px 14px rgba(3,14,36,.35);
  transition: background .25s, border-color .25s, transform .25s;
}
.bp-btn-brasil::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: -1;
  background: linear-gradient(135deg, rgba(240,251,255,.9), rgba(197,230,255,.3) 30%, rgba(137,191,255,.1) 55%, rgba(208,199,255,.35) 78%, rgba(202,245,255,.8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.bp-btn-brasil svg { width: 100%; height: 100%; fill: rgba(214,232,255,.88); filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.bp-btn-brasil:hover { background: radial-gradient(circle at 50% 32%, rgba(110,165,240,.72), rgba(28,72,150,.78) 58%, rgba(8,26,60,.85) 100%); border-color: #9CC8FF; transform: scale(1.06); }
.bp-btn-brasil:hover svg { fill: #fff; }
.bp-btn-brasil-atual { opacity: .45; }
.bp-btn-brasil-atual:hover { opacity: 1; }
.bp-palco { position: relative; }

/* ---------------- regiões clicáveis na lateral ---------------------------- */
/* A cor é a mesma das barras da visão por Estado. O fundo translúcido e o
   brilho interno mantêm a região legível sem perder o aspecto de vidro. */
.bp-regiao-btn {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden; width: 100%; cursor: pointer; border-radius: 5px;
  padding: .42rem .7rem; margin: .7rem 0 .4rem;
  background: linear-gradient(115deg, var(--cor-regiao-vidro), rgba(13,39,78,.28));
  border: 1px solid var(--cor-regiao-borda);
  color: #DCE9FB; font-size: .66rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 3px 0 0 var(--cor-regiao), inset 0 1px 0 rgba(255,255,255,.18),
              0 4px 11px rgba(3,12,30,.3);
  transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.bp-regiao-btn:hover {
  background: linear-gradient(115deg, var(--cor-regiao-ativo), rgba(20,56,105,.38));
  color: #fff; transform: translateY(-1px);
  box-shadow: inset 3px 0 0 var(--cor-regiao), inset 0 1px 0 rgba(255,255,255,.24),
              0 6px 15px rgba(3,12,30,.38);
}
.bp-regiao-on {
  background: linear-gradient(115deg, var(--cor-regiao-ativo), rgba(22,62,116,.48)) !important;
  border-color: var(--cor-regiao) !important; color: #fff !important;
}
.bp-regiao-on::after { content: "selecionada"; color: #fff; }

/* ao vivo: sem controles de replay, o palco ganha a altura deles */
body.bp-ao-vivo .bp-controles { display: none; }

/* -------- selo de procedência: replay / simulado / oficial ao vivo -------- */
.bp-origem {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, -50%);
  z-index: 8; white-space: nowrap; isolation: isolate;
  font-family: "Inter", system-ui, sans-serif; font-size: .58rem; font-weight: 800;
  line-height: 1; letter-spacing: .18em; min-height: 23px;
  display: inline-flex; align-items: center; padding: .36rem .9rem; border-radius: 999px;
  background: rgba(76,154,240,.9); color: #fff;
}
/* Dado que NÃO é o oficial ao vivo: corpo legível e duas ondas alternadas,
   como um sinal de transmissão. A sombra permanece enquanto as ondas pulsam. */
.bp-origem-aviso {
  background: linear-gradient(180deg, #F2B44F, #DB8C22); color: #291900;
  border: 1px solid rgba(255,220,148,.75);
  box-shadow: 0 5px 13px rgba(0,0,0,.52), 0 1px 2px rgba(255,255,255,.28) inset;
  text-shadow: 0 1px 0 rgba(255,255,255,.28);
}
.bp-origem-aviso::before, .bp-origem-aviso::after {
  content: ""; position: absolute; inset: -2px; z-index: -1;
  border: 2px solid rgba(242,180,79,.72); border-radius: inherit;
  pointer-events: none; animation: bp-selo-onda 2.4s ease-out infinite;
}
.bp-origem-aviso::after { animation-delay: 1.2s; }
@keyframes bp-selo-onda {
  0% { opacity: .85; transform: scale(1, 1); }
  72%, 100% { opacity: 0; transform: scale(1.32, 1.8); }
}
.bp-topo { position: relative; }

/* Placar com mais candidatos que cabem na tela.
   A lista precisa de altura LIMITADA para rolar: sem isto ela cresce, o
   corpo (overflow:hidden) corta o excesso e nada rola. `flex:1` faz ela
   ocupar o espaço que sobra depois do resumo e do switcher. */
/* A lista fixa a própria altura em estilo inline (as linhas são absolutas),
   e estilo inline vence o CSS. Por isso o limite vem de max-height, que
   prevalece sobre height, com especificidade suficiente para passar à frente
   da regra `flex: 0 0 auto` do placar. */
.bp-painel[data-painel="placar"] .bp-tv-rolavel .bp-lista-host,
.bp-tv-rolavel .bp-lista-host {
  flex: 1 1 auto; min-height: 0; max-height: 100%;
  overflow-y: auto; overflow-x: hidden;
}
.bp-tv-rolavel .bp-lista-host::-webkit-scrollbar { width: 6px; }
.bp-tv-rolavel .bp-lista-host::-webkit-scrollbar-thumb {
  background: rgba(18,48,94,.28); border-radius: 3px;
}
/* no modo Votos o resumo também mostra contagens: alinhamento tabular */
.bp-resumo-votos .bp-res-pct { font-variant-numeric: tabular-nums; }

/* ---- mapa em movimento: menos trabalho por quadro, sem perder o efeito ---- */
/* o grão é textura fina: imperceptível durante o zoom e caro de rasterizar */
.bp-mapa-movendo .bp-cam-grao { display: none; }
/* A camada do mapa é PERMANENTE no painel. Ligar e desligar will-change no início e no fim de cada zoom fazia o
   navegador rasterizar (e depois descartar) uma camada do tamanho da tela num único quadro — em 4K, 3840×2043 px
   justamente no instante em que os filtros caros voltam: era a piscada no começo e no fim do zoom. */
body:not(.bp-modo-home) .bp-app .bp-mapa { will-change: transform; }
.bp-mapa-movendo .bp-cam-luzes,
.bp-mapa-movendo .bp-cam-sombras,
.bp-mapa-movendo .bp-cam-especular { will-change: opacity; }
/* ao parar, o detalhe volta suavemente em vez de aparecer de supetão */
.bp-cam-grao, .bp-cam-luzes, .bp-cam-sombras { transition: opacity .28s ease; }

/* tarja de manchete sobre o bottom line — usada pelo feed de atualizações */
.bp-bl-manchete {
  position: absolute; left: 0; right: 0; bottom: 100%;
  display: flex; justify-content: flex-start; pointer-events: none;
}
.bp-bl-manchete span {
  max-width: 78%; padding: .5rem 1.4rem; margin-left: 0;
  background: linear-gradient(90deg, #C8102E 0%, #9E0C24 100%);
  color: #fff; font-family: "Inter", system-ui, sans-serif;
  font-size: 1.32rem; font-weight: 900; letter-spacing: .01em; line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  box-shadow: 0 -2px 12px rgba(2,12,30,.35);
  animation: bp-manchete-entra .5s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes bp-manchete-entra { from { transform: translateX(-16px); opacity: 0; } }

/* ---- AO VIVO: ondas de transmissão ---------------------------------------
   Do próprio texto saem duas ondas em pílula que se expandem e somem; depois,
   pausa longa (ciclo de 4 s, ondas nos primeiros ~1,6 s). Intermitente e
   discreto de propósito: contínuo, leria como alerta; forte, competiria com
   a manchete. As ondas ficam DENTRO da caixa vermelha (overflow: hidden) —
   no vMix nada pode ser pintado fora do componente.
   Vale para a bottom line ao vivo, as rotativas e a de notícias. */
.bp-bl-aovivo, .bp-nt-aovivo { position: relative; overflow: hidden; isolation: isolate; }
.bp-bl-aovivo::before, .bp-bl-aovivo::after,
.bp-nt-aovivo::before, .bp-nt-aovivo::after {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  width: 5.2em; height: 1.35em; margin: -.675em 0 0 -2.6em; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.55);
  opacity: 0; transform: scale(.92);
  animation: bp-onda-vivo 4s cubic-bezier(.2,.6,.3,1) infinite;
}
.bp-bl-aovivo::after, .bp-nt-aovivo::after { animation-delay: .55s; }
@keyframes bp-onda-vivo {
  0%   { opacity: 0;   transform: scale(.92); }
  6%   { opacity: .6; }
  40%  { opacity: 0;   transform: scale(1.55, 1.9); }
  100% { opacity: 0;   transform: scale(1.55, 1.9); }
}
/* o texto "acende" de leve junto com a primeira onda */
.bp-bl-aovivo, .bp-nt-aovivo { animation: bp-texto-vivo 4s ease-in-out infinite; }
@keyframes bp-texto-vivo {
  0%, 30%, 100% { text-shadow: 0 0 0 rgba(255,255,255,0); }
  8% { text-shadow: 0 0 10px rgba(255,255,255,.45); }
}

/* ---- fora da disputa (2º turno) ------------------------------------------
   Turno que não existe e UF que não tem 2º turno ficam cinza e desativados:
   visíveis (o apresentador não procura pelo botão), mas sem ação. */
.bp-turno-btn.bp-turno-btn-off, .bp-turno-btn:disabled {
  opacity: .38; cursor: not-allowed; filter: grayscale(1);
  background: rgba(255,255,255,.06) !important; color: rgba(214,226,244,.7) !important; box-shadow: none !important;
}
.bp-uf-btn.bp-uf-btn-off, .bp-uf-btn:disabled {
  opacity: .32; cursor: not-allowed; filter: grayscale(1); pointer-events: none;
  background: rgba(255,255,255,.04) !important; border-color: rgba(255,255,255,.08) !important;
}
.bp-uf.bp-uf-inativa { transition: fill-opacity .4s ease; }
.bp-rotulo-inativo { opacity: .35; transition: opacity .4s ease; }

/* ---- tela touch (painel): sem a "chamada" do toque longo, sem seleção de texto acidental, sem zoom por toque duplo.
   Campos de texto continuam selecionáveis. Os canvas do mapa e dos Mapas 3D já tratam os próprios gestos. */
/* pan-x pan-y: o navegador rola, mas não amplia a página nem faz zoom por toque duplo — a pinça é do painel (zoom.js) */
body:has(.bp-app) { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-x pan-y; }
body:has(.bp-app) img { -webkit-user-drag: none; }
body:has(.bp-app) input, body:has(.bp-app) textarea, body:has(.bp-app) [contenteditable] { -webkit-user-select: text; user-select: text; }

/* ---- pinça para ampliar (zoom.js): o painel ampliado não deixa nada vazar; botão discreto para voltar a 100% */
.bp-palco:has(.bp-zoom-ativo) { overflow: hidden; }
.bp-zoom-ativo { cursor: grab; }
.bp-zoom-reset { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 60; font: inherit; font-size: .8rem; font-weight: 800;
  letter-spacing: .02em; color: #fff; cursor: pointer; padding: .45rem 1.1rem; border-radius: 999px;
  background: radial-gradient(circle at 50% 30%, rgba(84,140,220,.85), rgba(18,52,112,.92) 70%); border: 1px solid rgba(160,205,255,.5);
  box-shadow: 0 8px 20px rgba(8,26,60,.35), inset 0 1px 0 rgba(255,255,255,.3); }
.bp-zoom-reset[hidden] { display: none; }

/* ==================== mapa principal maximizado (mapamax.js) ====================
   Botões redondos ao lado da urna, no mesmo vidro azul (urna/Brasil). Maximizado: só o logo, o seletor de cargos e o
   box de urnas flutuando no topo, o placar à esquerda e o mapa ocupando a tela. */
.bp-mapa-max-btn { position: absolute; bottom: 1rem; right: calc(1.1rem + 2 * (84px + 12px)); z-index: 6; width: 84px; height: 84px; padding: 0;
  border: 0; background: none; cursor: pointer; overflow: visible; border-radius: 50%; transition: right .3s cubic-bezier(.2,.8,.2,1), transform .25s; }
.bp-mapa-max-btn[hidden] { display: none; }
.bp-mapa-max-btn:hover { transform: scale(1.06); }
.bp-mapa-max-disco { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, rgba(84,140,220,.62), rgba(18,52,112,.72) 58%, rgba(5,18,42,.82) 100%);
  border: 1px solid rgba(160,205,255,.42); box-shadow: 0 8px 22px rgba(3,12,30,.42), inset 0 1px 0 rgba(255,255,255,.28), inset 0 -6px 14px rgba(3,14,36,.35); }
.bp-mapa-max-disco svg { width: 34px; height: 34px; fill: none; stroke: rgba(226,238,253,.95); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bp-mapa-max-btn .bp-urna-badge { color: #DCE9FB; }
.bp-mapa-max-on .bp-mapa-max-disco { border-color: rgba(150,205,255,.95); box-shadow: 0 0 0 3px rgba(150,205,255,.35), 0 8px 22px rgba(3,12,30,.42); }
.bp-mapa-max-on .bp-urna-badge { color: #0B1A33; background: #BFE0FF; border-color: #BFE0FF; }

.bp-mapa-max-camada { display: none; }
body.bp-mapa-maximo .bp-mapa-max-camada { display: block; position: fixed; inset: 0; z-index: 30; pointer-events: none; }
body.bp-mapa-maximo .bp-mapa-max-camada > * { pointer-events: auto; }
.bp-mapa-max-logo { position: absolute; left: 1.6rem; top: 1.3rem; width: 168px; height: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.bp-mapa-max-cargos { position: absolute; top: 1.1rem; left: 50%; transform: translateX(-50%); }
.bp-mapa-max-cargos .bp-cargos { padding: .45rem 1.4rem; border-radius: 999px; background: linear-gradient(160deg, rgba(22,52,104,.62), rgba(8,24,54,.66));
  border: 1px solid rgba(150,190,255,.22); box-shadow: 0 12px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(10px) saturate(130%); -webkit-backdrop-filter: blur(10px) saturate(130%); }
.bp-mapa-max-urnas { position: absolute; top: 1.1rem; right: 1.6rem; }
.bp-mapa-max-urnas .bp-urnas { padding: .7rem 1.1rem; border-radius: 16px; background: linear-gradient(160deg, rgba(22,52,104,.62), rgba(8,24,54,.66));
  border: 1px solid rgba(150,190,255,.22); box-shadow: 0 12px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(10px) saturate(130%); -webkit-backdrop-filter: blur(10px) saturate(130%); }
.bp-mapa-max-entrando > * { animation: bp-mapa-max-desce .55s both cubic-bezier(.2,.8,.2,1); }
.bp-mapa-max-entrando > .bp-mapa-max-cargos { animation-name: bp-mapa-max-desce-centro; }
@keyframes bp-mapa-max-desce { from { opacity: 0; transform: translateY(-14px); } }
@keyframes bp-mapa-max-desce-centro { from { opacity: 0; transform: translate(-50%, -14px); } to { transform: translateX(-50%); } }
/* seletor de cargos: flutua no rodapé, na MESMA linha dos botões redondos — centro vertical alinhado ao dos discos
   (84 px), à esquerda do Comparar, com o mesmo respiro (12 px) que separa os discos entre si */
body.bp-mapa-maximo .bp-mapa-max-cargos { top: auto; left: auto; transform: none;
  right: calc(1.4rem + 4 * (84px + 12px) + 6px); bottom: calc(1.4rem + var(--barra-cheia, 0px) + 42px); translate: 0 50%; }
body.bp-mapa-maximo .bp-mapa-max-cargos .bp-cargos { min-height: 56px; display: flex; align-items: center; padding: 0 1.5rem; }
.bp-mapa-max-entrando > .bp-mapa-max-cargos { animation-name: bp-mapa-max-sobe; }
@keyframes bp-mapa-max-sobe { from { opacity: 0; transform: translateY(14px); } }

/* palco em tela inteira: o placar desce para não ficar sob o logo; os botões do mapa em fila no canto */
body.bp-mapa-maximo .bp-painel[data-painel="mapa"] { position: absolute; inset: 0; }
body.bp-mapa-maximo .bp-paineis-dir { padding-top: 6.6rem; padding-left: 1.6rem; padding-bottom: calc(1.4rem + var(--barra-cheia, 0px)); }   /* o degradê segue na altura toda; o conteúdo desce sob o logo */
/* barra do replay: no pé da tela inteira, como no Prumo; os botões sobem junto */
body.bp-mapa-maximo #controles { left: 0; right: 0; bottom: 0; width: auto; transform: none; border-radius: 0; padding: .45rem 1.2rem .4rem; background: rgba(10,22,46,.86); }
body.bp-mapa-maximo:not(.bp-sem-barra) { --barra-cheia: 92px; }
body.bp-mapa-maximo.bp-sem-barra #controles { transform: translateY(110%); }

/* nome + partido: sem reticências (cortariam o partido) — nomes.js caberNaLinha() reduz a letra quando não cabe */
.bp-nome, .bp-card-nome, .bp-bl-nome { text-overflow: clip; }

/* Congresso: X vermelho sobre o cinza dos assentos fora de disputa (todas as visões) */
.bp-cong-x { fill: none; stroke: #E5484D; stroke-linecap: round; pointer-events: none; }
.bp-cong-entrando .bp-cong-x { animation: bp-cong-ponto .45s calc(.25s + var(--d)) both cubic-bezier(.2,.8,.2,1); transform-box: fill-box; transform-origin: center; }
/* placar ao lado do mapa: título e resumo acompanham os dados maiores */
.bp-painel-dir .bp-faixa-cargo { font-size: 2.1rem; }
.bp-painel-dir .bp-faixa-sub { font-size: 1.02rem; }
.bp-painel-dir .bp-res-rotulo { font-size: 1.02rem; } .bp-painel-dir .bp-res-pct { font-size: 1.22rem; }

/* pinça no mapa principal (zoom.js): o invólucro tem o mesmo encaixe do painel; mapa e placar continuam absolutos */
.bp-zoom-conteudo { position: absolute; inset: 0; }
.bp-painel[data-painel="mapa"]:has(.bp-zoom-ativo) { overflow: hidden; }

/* Comparar: cabeçalhos com a mesma altura nos dois quadros (2022 e atual) → as listas começam na mesma linha */
/* mesma moldura nos dois cartões (borda de 1px na atual também) e cabeçalho/resumo compactos para caber */
body.bp-comparando #painel-dir { align-self: start; border: 1px solid transparent; }
body.bp-comparando .bp-paineis-dir .bp-faixa { height: 7.9rem; box-sizing: border-box; overflow: hidden; }
body.bp-comparando .bp-paineis-dir .bp-faixa-cargo { font-size: 2rem; }
body.bp-comparando .bp-paineis-dir .bp-resumo2 { padding: .45rem .8rem; gap: .25rem; }
body.bp-comparando .bp-paineis-dir .bp-painel-dir { gap: .45rem; }
body.bp-comparando .bp-paineis-dir .bp-faixa-ano { display: block; }

/* Congresso em tela cheia: a tabela ocupa a coluna esquerda inteira, de cima a baixo, com linhas e letras maiores */
body.bp-congresso-cheio .bp-cong-area { margin-left: 500px; }
body.bp-congresso-cheio .bp-cong-top5, body.bp-congresso-cheio .bp-congresso[data-casa="congresso"] .bp-cong-top5 {
  top: 0; bottom: 0; height: auto; margin: 0; width: 476px; justify-content: center; gap: .45rem; padding: 1rem 1.1rem;
  border-radius: 16px; box-sizing: border-box; }
body.bp-congresso-cheio .bp-cong-top5 .bp-cong-part, body.bp-congresso-cheio .bp-cong-tab-linha { height: auto; min-height: 54px; flex: 1 1 0; max-height: 74px; }
body.bp-congresso-cheio .bp-cong-top5 .bp-cong-part i, body.bp-congresso-cheio .bp-cong-tab-linha i { height: 30px; }
body.bp-congresso-cheio .bp-cong-top5 .bp-cong-sigla { font-size: 1.22rem; }
body.bp-congresso-cheio .bp-cong-top5 .bp-cong-antes, body.bp-congresso-cheio .bp-cong-tab-linha span { font-size: 1.12rem; }
body.bp-congresso-cheio .bp-cong-top5 .bp-cong-agora, body.bp-congresso-cheio .bp-cong-tab-linha strong { font-size: 1.7rem; }
body.bp-congresso-cheio .bp-cong-cab, body.bp-congresso-cheio .bp-cong-tab-cab { font-size: .78rem; }
/* só a tabela: as fichas da legenda (rodapé) também são .bp-cong-part e mantêm a grade delas */
body.bp-congresso-cheio .bp-cong-top5 .bp-cong-part, body.bp-congresso-cheio .bp-cong-top5 .bp-cong-cab { grid-template-columns: 10px minmax(0,1fr) 3.8rem 4.8rem 2.8rem; }
body.bp-congresso-cheio .bp-cong-tab-cab, body.bp-congresso-cheio .bp-cong-tab-linha { grid-template-columns: 10px minmax(0,1fr) 4.6rem 4.6rem 4.8rem; }

/* bloco da marca das bottom lines: o retângulo azul com o logo da BP (o mesmo das notícias), não mais o preto com texto */
.bp-bl-logo { background: linear-gradient(180deg, #0F3470, #0C2A5C) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); gap: .5rem; align-items: center; }
.bp-bl-logo-img { width: 74px; height: auto; display: block; }
.bp-bl-logo .bp-bl-hora { align-self: stretch; margin-top: 0; }

/* ======================= home para TV touch (03/10) =======================
   O braço do apresentador não cruza a tela: o seletor de cargos desce para uma doca no pé do palco; os botões do
   mapa ficam em coluna, à direita; o topo só traz o logo e as urnas. */

/* topo mais baixo: logo e % das urnas */
.bp-topo { padding: .38rem 1.1rem; min-height: 0; }
.bp-logo-topo { height: 26px; width: auto; }
.bp-topo .bp-urnas strong { font-size: 1.05rem; }

/* doca do seletor de cargos: o vidro flutuante do modo maximizar, numa FAIXA PRÓPRIA abaixo do palco (js/dock.js) —
   não cobre dado nenhum; no mapa maximizado ela flutua no pé da tela */
.bp-dock-cargos { position: relative; z-index: 6; flex: 0 0 auto; display: flex; justify-content: center; padding: .5rem 0 .65rem; pointer-events: none; transition: opacity .3s; }
body.bp-mapa-maximo .bp-dock-cargos { position: fixed; z-index: 35; left: 0; right: 0; padding: 0; bottom: calc(var(--barra-cheia, 0px) + 1.1rem); }
.bp-dock-cargos .bp-cargos { pointer-events: auto; display: flex; align-items: center; min-height: 58px; padding: 0 1.6rem; border-radius: 999px;
  background: linear-gradient(160deg, rgba(22,52,104,.72), rgba(8,24,54,.78)); border: 1px solid rgba(150,190,255,.24);
  box-shadow: 0 14px 34px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(12px) saturate(130%); -webkit-backdrop-filter: blur(12px) saturate(130%); }
/* fora de uso: abertura (não ocupa espaço) e telas cheias com seletor próprio (Prumo, Congresso…) */
/* sempre disponível com o painel aberto (inclusive na tela inicial do mapa); some só nas telas cheias com seletor próprio */
body.bp-tela-cheia:not(.bp-mapa-maximo) .bp-dock-cargos { display: none; }

/* botões do mapa em COLUNA, à direita: Brasil embaixo, depois urnas, maximizar e (maximizado) Comparar —
   mesmo eixo vertical e o mesmo passo (disco de 84 px + 22 px, que acomoda a etiqueta sob cada disco) */
.bp-palco { --bm-dir: 1.1rem; --bm-base: 1rem; --bm-passo: 124px; }   /* disco 84 + 40 de respiro */
body.bp-mapa-maximo .bp-palco { --bm-dir: 1.4rem; --bm-base: calc(1.4rem + var(--barra-cheia, 0px)); }
/* só no mapa (painel ou maximizado): nas telas cheias (Prumo, Congresso, Mapas…) cada uma posiciona o Brasil */
body:not(.bp-tela-cheia) #btn-brasil, body.bp-mapa-maximo #btn-brasil { right: var(--bm-dir) !important; bottom: var(--bm-base) !important; }
.bp-palco .bp-urna-btn, .bp-palco .bp-urna-btn.bp-urna-no-canto { right: var(--bm-dir); bottom: calc(var(--bm-base) + var(--bm-passo)); transition: bottom .35s cubic-bezier(.2,.8,.2,1), transform .25s; }
.bp-mapa-max-alternar { right: var(--bm-dir) !important; bottom: calc(var(--bm-base) + 2 * var(--bm-passo)); transition: bottom .35s cubic-bezier(.2,.8,.2,1), transform .25s; }
.bp-mapa-max-comparar { right: var(--bm-dir); bottom: calc(var(--bm-base) + 3 * var(--bm-passo)); }
/* sem o botão Brasil (já no destino), a coluna desce um degrau */
.bp-palco .bp-urna-btn.bp-urna-no-canto { bottom: var(--bm-base); }
.bp-painel[data-painel="mapa"]:has(.bp-urna-no-canto) .bp-mapa-max-alternar { bottom: calc(var(--bm-base) + var(--bm-passo)); }
body.bp-mapa-maximo .bp-palco .bp-urna-btn.bp-urna-no-canto { bottom: calc(var(--bm-base) + var(--bm-passo)); }
body.bp-mapa-maximo .bp-painel[data-painel="mapa"]:has(.bp-urna-no-canto) .bp-mapa-max-alternar { bottom: calc(var(--bm-base) + 2 * var(--bm-passo)); }

/* lateral: Comparar como botão do rodapé, aceso quando ligado */
.bp-lateral-rodape #btn-comparar[aria-pressed="true"] { background: linear-gradient(115deg, rgba(127,178,240,.45), rgba(22,62,116,.5)); border-color: #BFE0FF; color: #fff; }

/* seleção na lateral: sem rótulo — o botão escolhido cresce, acende e ganha sombra; os outros recuam */
.bp-regiao-on::after { content: none !important; }
.bp-lateral :is(.bp-regiao-btn, .bp-uf-btn) { transition: transform .3s cubic-bezier(.2,.8,.2,1), filter .3s, opacity .3s, box-shadow .3s; }
.bp-lateral .bp-regiao-on, .bp-lateral .bp-uf-btn-on { position: relative; z-index: 2; transform: scale(1.06); filter: brightness(1.18) saturate(1.1);
  box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 0 22px rgba(127,178,240,.55), 0 10px 22px rgba(0,8,24,.55) !important; }
.bp-lateral:has(.bp-regiao-on, .bp-uf-btn-on) :is(.bp-regiao-btn, .bp-uf-btn):not(.bp-regiao-on):not(.bp-uf-btn-on) { filter: brightness(.72) saturate(.55); opacity: .82; }

/* na doca: tamanho natural (fora dela, .bp-cargos crescia para ocupar o topo) e alvos de toque maiores */
.bp-dock-cargos .bp-cargos { flex: 0 0 auto; gap: 2rem; }
.bp-dock-cargos .bp-aba { font-size: .95rem; padding: .85rem .25rem .7rem; }
.bp-dock-cargos .bp-aba-sec { font-size: .78rem; }

/* no painel, o placar usa a doca de cargos — o seletor próprio dele (bp-tv-switcher) só no vMix */
.bp-painel[data-painel="placar"] .bp-tv-switcher { display: none; }

/* topo: % das urnas na ponta direita, com margem (o seletor de cargos, que empurrava, foi para a doca) */
.bp-topo .bp-urnas { margin-left: auto; margin-right: .6rem; }
/* 2º turno: cinza e sem clique */
.bp-turno-btn:disabled, .bp-turno-btn.bp-turno-btn-off { opacity: .35; filter: grayscale(1); cursor: not-allowed; pointer-events: none; }

/* Partidos em foco (ranking 3D): a doca de cargos e o botão das urnas saem; a lateral recua — o ranking é tudo */
body.bp-partidos-foco .bp-dock-cargos { opacity: 0; pointer-events: none; }
body.bp-partidos-foco .bp-dock-cargos .bp-cargos { pointer-events: none; }
body.bp-partidos-foco .bp-urna-btn, body.bp-partidos-foco .bp-palco > .bp-urna-btn { opacity: 0; pointer-events: none; }
body.bp-partidos-foco .bp-lateral { filter: brightness(.55) saturate(.4); transition: filter .4s; }
.bp-dock-cargos { transition: opacity .3s; }

/* Congresso: sem o painel atrás da tabela — só as linhas, brancas e brilhantes (como o ranking de Partidos, sem 3D),
   cada uma com sombra própria; até 8 partidos na coluna; o resto vai para baixo, centralizado; sem nota de rodapé */
body.bp-congresso-cheio .bp-cong-top5 { background: none !important; border: 0 !important; box-shadow: none !important; padding: .4rem 0; gap: .6rem; }
body .bp-cong-top5 .bp-cong-part, body .bp-cong-top5 .bp-cong-tab-linha {
  background: linear-gradient(180deg, #FFFFFF 0%, #EEF2F8 55%, #E2E8F1 100%) !important; border: 1px solid rgba(255,255,255,.9) !important; border-radius: 12px;
  color: #0C2A5C; box-shadow: 0 10px 22px rgba(0,8,24,.38), 0 2px 4px rgba(0,8,24,.25), inset 0 1px 0 #fff, inset 0 -2px 6px rgba(120,150,200,.25) !important; }
body .bp-cong-top5 .bp-cong-part :is(.bp-cong-sigla, .bp-cong-agora), body .bp-cong-top5 .bp-cong-tab-linha :is(.bp-cong-sigla, strong) { color: #0C2A5C !important; }
body .bp-cong-top5 .bp-cong-part .bp-cong-antes, body .bp-cong-top5 .bp-cong-tab-linha span:not(.bp-cong-sigla) { color: rgba(12,42,92,.62) !important; }
body .bp-cong-top5 .bp-var-sobe { color: #168A47 !important; } body .bp-cong-top5 .bp-var-desce { color: #C0392B !important; } body .bp-cong-top5 .bp-var-igual { color: rgba(12,42,92,.5) !important; }
body .bp-cong-top5 .bp-cong-tab-outros, body .bp-cong-top5 .bp-cong-tab-vago { background: linear-gradient(180deg, #F3F6FA, #E3E9F2) !important; opacity: .9; }
body.bp-congresso-cheio .bp-cong-top5 .bp-cong-part, body.bp-congresso-cheio .bp-cong-top5 .bp-cong-tab-linha { min-height: 52px; max-height: 70px; }
.bp-cong-cab span:last-child, .bp-cong-tab-cab span:last-child { white-space: nowrap; }
body.bp-congresso-cheio .bp-cong-tab-cab, body.bp-congresso-cheio .bp-cong-tab-linha { grid-template-columns: 10px minmax(0,1fr) 4.2rem 4.2rem 4.4rem 4.4rem !important; }
body.bp-congresso-cheio .bp-cong-legenda { display: flex !important; flex-wrap: wrap; justify-content: center; }
.bp-cong-nota { display: none !important; }

/* entrada de cinema do Congresso: a figura viaja por cima de tudo; nada de transição de leiaute no caminho */
.bp-cong-cine .bp-cong-figura { position: relative; z-index: 7; will-change: transform; transition: none !important; }
.bp-cong-cine .bp-cong-area { overflow: visible; }

/* a doca de cargos não serve na Apuração por Estado */
body[data-vista-atual="estados"] .bp-dock-cargos { display: none; }

/* Comparar: o quadro de 2022 sai de TRÁS do placar atual, deslizando para a esquerda */
body.bp-comparando #painel-comparacao { animation: bp-cmp-sai-de-tras .62s cubic-bezier(.22,1,.36,1) both !important; }
@keyframes bp-cmp-sai-de-tras {
  0% { transform: translateX(calc(100% + 1.2rem)) scale(.96); opacity: 0; filter: brightness(.7); }
  35% { opacity: .9; }
  100% { transform: none; opacity: .94; filter: none; } }
body.bp-comparando #painel-dir { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { body.bp-comparando #painel-comparacao { animation: none !important; } }

/* ===== contagem regressiva até as 17h (js/contagem.js): números gigantes sobre o mapa desfocado ===== */
.bp-main { position: relative; }
.bp-contagem { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center;
  background: radial-gradient(80% 70% at 50% 45%, rgba(10,30,66,.5), rgba(4,14,34,.85));
  animation: bp-contagem-entra .8s ease both; }
/* o desfoque vai no CONTEÚDO de trás (o mapa usa camadas próprias, e o backdrop-filter não o alcançava) */
body .bp-main > :is(.bp-palco, .bp-dock-cargos, #controles) { transition: filter 1.1s cubic-bezier(.4,0,.2,1); }
body.bp-em-contagem .bp-main > :is(.bp-palco, .bp-dock-cargos, #controles) { filter: blur(16px) saturate(.85); }
.bp-contagem[hidden] { display: none; }
body.bp-mapa-maximo .bp-contagem { position: fixed; inset: 0; }
@keyframes bp-contagem-entra { from { opacity: 0; } }
.bp-contagem-saindo { animation: bp-contagem-sai 1.1s cubic-bezier(.4,0,.2,1) both; }
@keyframes bp-contagem-sai { to { opacity: 0; } }
.bp-contagem-miolo { display: grid; justify-items: center; text-align: center; padding: 2rem; container-type: inline-size; width: min(1200px, 92%); }
.bp-contagem-logo { height: clamp(26px, 3vw, 40px); width: auto; margin-bottom: clamp(1rem, 2.5vh, 2rem); opacity: .95; }
.bp-contagem-acima { margin: 0 0 .4rem; font-size: clamp(1.1rem, 2.2cqi, 1.9rem); font-weight: 700; color: rgba(214,228,248,.9); }
.bp-contagem-relogio { display: flex; align-items: baseline; justify-content: center; gap: .1em; color: #fff;
  font-size: clamp(5rem, 15.5cqi, 13rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 60px rgba(127,178,240,.25); }
.bp-contagem-relogio span { display: inline-block; min-width: 1.18em; }
.bp-contagem-relogio i { font-style: normal; opacity: .55; transform: translateY(-.06em); animation: bp-contagem-pisca 1s steps(1) infinite; }
@keyframes bp-contagem-pisca { 50% { opacity: .2; } }
/* cada casa que muda cai de leve no lugar */
.bp-contagem-vira { animation: bp-contagem-vira .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes bp-contagem-vira { from { opacity: .25; transform: translateY(-.12em); filter: blur(2px); } }
.bp-contagem-unidades { display: flex; justify-content: center; gap: clamp(2rem, 9cqi, 8.4rem); margin-top: .6rem;
  font-size: clamp(.8rem, 1.3cqi, 1.1rem); font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: rgba(190,214,245,.75); }
.bp-contagem-abaixo { margin: clamp(1.2rem, 3vh, 2.2rem) 0 0; max-width: 46ch; font-size: clamp(1rem, 1.8cqi, 1.35rem); line-height: 1.45; color: rgba(214,228,248,.85); }
@media (prefers-reduced-motion: reduce) { .bp-contagem-relogio i, .bp-contagem-vira { animation: none; } }

