/* Apuração 2026 · Mapa das Eleições — folha de estilo única */

:root {
  --bg: #0b0b0c;
  --bg-2: #101012;
  --panel: #121214;
  --panel-2: #1a1a1d;
  --panel-3: #232327;
  --border: #242428;
  --border-2: #303036;
  --text: #f4f4f2;
  --text-2: #c9c9cc;
  --muted: #9a9aa0;
  --muted-2: #6a6a71;
  --red: #e5484d;
  --red-2: #ff6b6f;
  --blue: #3e63dd;
  --blue-2: #6d8cf0;
  --ok: #30a46c;
  --warn: #f5a524;
  --map-empty: #27272b;
  --map-stroke: #0b0b0c;
  --map-uf-stroke: #4a4a52;
  --shadow: 0 10px 40px rgba(0, 0, 0, .55);
  --radius: 14px;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --topo-h: 60px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f3ef;
  --bg-2: #ecebe6;
  --panel: #ffffff;
  --panel-2: #f3f2ee;
  --panel-3: #e9e8e3;
  --border: #e3e1da;
  --border-2: #d2d0c8;
  --text: #15151a;
  --text-2: #33333a;
  --muted: #5f5f67;
  --muted-2: #8b8b93;
  --red: #d9363e;
  --red-2: #c12a32;
  --blue: #2f55d4;
  --blue-2: #2446b8;
  --map-empty: #dcdad2;
  --map-stroke: #ffffff;
  --map-uf-stroke: #8b8b93;
  --shadow: 0 10px 40px rgba(20, 20, 30, .15);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; border-radius: 6px; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
ul { list-style: none; margin: 0; padding: 0; }
kbd { font-family: var(--sans); font-size: 11px; color: var(--muted); background: var(--panel-3); border: 1px solid var(--border-2); border-radius: 5px; padding: 1px 6px; }
svg { display: block; }
.pular { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.pular:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- cabeçalho ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  height: var(--topo-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topo > * { min-width: 0; }
.topo__marca { display: flex; align-items: center; gap: 14px; min-width: 0; }
.marca { display: flex; align-items: baseline; gap: 8px; text-decoration: none; white-space: nowrap; }
.marca__titulo { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -.01em; }
.marca__sub { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.topo__centro { display: flex; align-items: center; gap: 10px; justify-content: center; }
.topo__direita { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }

.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; }
.seg > button, .seg__select > button {
  padding: 6px 13px; border-radius: 999px; color: var(--muted); font-weight: 500; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s;
}
.seg > button:hover, .seg__select > button:hover { color: var(--text); }
.seg > button[aria-selected="true"], .seg__select > button[aria-selected="true"] { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.seg > button:disabled { opacity: .35; cursor: not-allowed; }
.seg > button:disabled:hover { color: var(--muted); }
.seg--turno > button { padding: 5px 11px; font-size: 12px; }
.seg__select { position: relative; }
.seg__select svg { width: 12px; height: 12px; }

.busca {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-weight: 500;
}
.busca:hover { color: var(--text); border-color: var(--border-2); }
.busca svg { width: 16px; height: 16px; }

.online { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); font-weight: 500; white-space: nowrap; }
.online svg { width: 15px; height: 15px; color: var(--ok); }
.online[hidden] { display: none; } /* sem servidor de presença (host estático) o contador some */
.online b { color: var(--text); font-weight: 700; display: inline-block; }
.online--sobe b { animation: onlineSobe .7s ease-out; }
.online--desce b { animation: onlineDesce .7s ease-out; }
@keyframes onlineSobe { 0% { transform: translateY(6px); opacity: 0; color: var(--ok); } 100% { transform: none; opacity: 1; } }
@keyframes onlineDesce { 0% { transform: translateY(-6px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (max-width: 1500px) { .online span { display: none; } .online { padding: 0 10px; } }

.pill, .icone {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--panel-2); color: var(--text-2); font-weight: 500; white-space: nowrap;
}
.pill:hover, .icone:hover { border-color: var(--border-2); color: var(--text); }
.pill[aria-pressed="true"] { background: var(--panel-3); color: var(--text); border-color: var(--border-2); }
.pill svg, .icone svg { width: 16px; height: 16px; }
.icone { width: 34px; padding: 0; justify-content: center; }

.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; margin-right: 6px; min-width: 0; }
.status__texto { overflow: hidden; text-overflow: ellipsis; }
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 0 transparent; }
.status--live .status__dot { background: var(--ok); animation: pulso 2s infinite; }
.status--stale .status__dot { background: var(--warn); }
.status--erro .status__dot { background: var(--red); }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- layout ---------- */
.app {
  display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; gap: 14px;
  padding: 14px 18px; height: calc(100vh - var(--topo-h)); min-height: 560px;
}
.col { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; flex: 0 0 auto; }
.card__titulo { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.card__sub { color: var(--muted); font-size: 12px; }
.carregando { color: var(--muted); padding: 20px 0; }

/* ---------- painel de resumo ---------- */
.migalha { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.migalha button { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.migalha button:hover { color: var(--text); }
.migalha .sep { color: var(--muted-2); }
.manchete { font-family: var(--serif); font-size: 27px; line-height: 1.12; letter-spacing: -.012em; font-weight: 500; margin: 2px 0 14px; }
.manchete b { font-weight: 500; }
.manchete--espera { color: var(--text-2); }

.duelo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.cand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.cand--dir { flex-direction: row-reverse; text-align: right; }
.cand__foto { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; background: var(--panel-3); border: 2px solid var(--c, var(--border-2)); flex: 0 0 auto; }
.cand__nome { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.cand__partido { font-size: 11.5px; font-weight: 600; color: var(--c, var(--muted)); margin-top: 2px; }
.duelo__pct { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pctg { font-family: var(--serif); font-size: 44px; line-height: 1; letter-spacing: -.02em; font-weight: 500; white-space: nowrap; }
.pctg sup { font-size: 16px; vertical-align: top; margin-left: 1px; color: var(--c, var(--muted)); font-family: var(--sans); font-weight: 600; top: .35em; position: relative; }
.pctg--dir { text-align: right; }
.votos { color: var(--muted); font-size: 12px; margin-top: 5px; }
.votos--dir { text-align: right; }

.barra { position: relative; height: 7px; border-radius: 999px; background: var(--panel-3); margin: 20px 0 6px; overflow: visible; }
.barra__a, .barra__b { position: absolute; top: 0; bottom: 0; border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.barra__a { left: 0; background: var(--ca, var(--red)); }
.barra__b { right: 0; background: var(--cb, var(--blue)); }
.barra__meio { position: absolute; left: 50%; top: -5px; width: 2px; height: 17px; background: var(--text); transform: translateX(-50%); border-radius: 2px; }
.barra__meio::before { content: "50%"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); font-weight: 600; }
.faltam { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; }

.kv { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.kv:first-of-type { margin-top: 12px; }
.kv span:first-child { color: var(--muted); }
.kv b { font-weight: 600; }

.outros { margin-top: 6px; }
.outro { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.outro__foto { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--panel-3); border: 1.5px solid var(--c, var(--border-2)); flex: 0 0 auto; }
.outro__nome { font-weight: 600; font-size: 12.5px; line-height: 1.2; }
.outro__partido { font-size: 11px; color: var(--c, var(--muted)); font-weight: 600; }
.outro__pct { margin-left: auto; font-weight: 600; font-size: 13px; }
.outro__votos { color: var(--muted); font-size: 11px; }
.outros__mais { color: var(--muted); font-size: 11.5px; padding-top: 8px; border-top: 1px solid var(--border); }
.outro--eleito .outro__nome::after { content: "eleito"; margin-left: 6px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ok); font-weight: 700; }

.lista-ufs { margin-top: 4px; }
.lista-ufs button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); text-align: left; }
.lista-ufs button:hover .lista-ufs__nome { text-decoration: underline; }
.lista-ufs__uf { width: 28px; flex: 0 0 auto; font-weight: 700; color: var(--muted); font-size: 11.5px; }
.lista-ufs__nome { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-ufs__apur { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
.lista-ufs__lider { display: flex; align-items: center; gap: 6px; font-weight: 600; flex: 0 1 auto; min-width: 0; max-width: 58%; }
.lista-ufs__lider > span:not(.lista-ufs__pct) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-ufs__lider .chip { white-space: nowrap; }
.lista-ufs__lider .mini-foto { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--c, var(--border-2)); background: var(--panel-3); }
.lista-ufs__pct { color: var(--c, var(--text)); }
/* 2º turno antes das urnas: os dois nomes em disputa, numa linha própria abaixo do estado */
.lista-ufs button:has(.lista-ufs__disputa) { flex-wrap: wrap; row-gap: 6px; }
.lista-ufs__disputa { flex-basis: 100%; display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 38px; }
.disputa__cand { display: inline-flex; align-items: center; gap: 7px; flex: 1 1 0; min-width: 0; }
.disputa__cand:last-child { flex-direction: row-reverse; text-align: right; }
.disputa__cand .mini-foto { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--c, var(--border-2)); background: var(--panel-3); flex: 0 0 auto; }
.disputa__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.disputa__txt b { font-size: 12.5px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.15; }
.disputa__txt small { font-size: 10.5px; font-weight: 700; color: var(--c, var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disputa__x { font-style: normal; color: var(--muted); font-size: 12px; flex: 0 0 auto; padding: 0 2px; }
.regiao__disputa { gap: 5px; }

/* curva */
.curva { height: 190px; position: relative; }
.curva__vazia { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 0 12px; }
.curva svg text { font-family: var(--sans); font-size: 10.5px; fill: var(--muted); }
.curva .grade line { stroke: var(--border); }
.curva .linha { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.curva .area { opacity: .12; }
.curva .meio { stroke: var(--muted-2); stroke-dasharray: 3 3; }

/* ---------- mapa ---------- */
.mapa { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.mapa__barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; flex-wrap: wrap; z-index: 3; }
.legenda { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; font-weight: 500; flex-wrap: wrap; justify-content: flex-end; }
.legenda__item { display: inline-flex; align-items: center; gap: 6px; }
.legenda__item b { color: var(--text); font-weight: 600; }
.legenda__sw { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.legenda__escala { display: inline-flex; gap: 2px; }
.legenda__escala i { width: 12px; height: 10px; border-radius: 2px; background: var(--c); display: block; }
.legenda__sep { color: var(--muted-2); }

.mapa__viewport { position: relative; flex: 1; min-height: 0; }
#svgMapa { width: 100%; height: 100%; touch-action: none; cursor: grab; }
#svgMapa:active { cursor: grabbing; }
#svgMapa .mun path { stroke: var(--map-stroke); stroke-width: .25; vector-effect: non-scaling-stroke; transition: fill .35s; }
#svgMapa .ufs path { fill: none; stroke: var(--map-uf-stroke); stroke-width: .9; vector-effect: non-scaling-stroke; pointer-events: none; }
#svgMapa .ufs-fill path { stroke: var(--map-stroke); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .35s; }
#svgMapa .mun path:hover, #svgMapa .ufs-fill path:hover { stroke: var(--text); stroke-width: 1.2; }
#svgMapa .mun path.sel { stroke: var(--text); stroke-width: 1.4; }
#svgMapa .ufs path.sel { stroke: var(--text); stroke-width: 2; }
#svgMapa .rotulos text { font-family: var(--sans); font-weight: 700; fill: var(--text); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
#svgMapa .rotulos .uf { font-size: 11px; }
#svgMapa .rotulos .pct { font-size: 10px; font-weight: 600; fill: var(--text-2); }
#svgMapa .rotulos .compacto .uf { font-size: 8px; }
#svgMapa .rotulos .dot { stroke: none; }
#svgMapa .chamadas rect { fill: var(--c); rx: 4; }
#svgMapa .chamadas text { font-family: var(--sans); font-size: 10.5px; font-weight: 700; fill: #fff; pointer-events: none; }
#svgMapa .chamadas text.pct { font-weight: 600; }
#svgMapa .chamadas line { stroke: var(--muted-2); stroke-width: 1; }
#svgMapa .chamadas .vazio rect { fill: var(--map-empty); }
#svgMapa .chamadas .vazio text { fill: var(--muted); }
#svgMapa .chamadas g { cursor: pointer; }
#svgMapa .dim { opacity: .45; }

/* efeitos de apuração no mapa */
#svgMapa .fx-flash { opacity: 0; animation: fxFlash 1.3s ease-out forwards; }
#svgMapa .fx--forte .fx-flash { animation-duration: 2s; }
@keyframes fxFlash { 0% { opacity: 0; } 12% { opacity: .62; } 100% { opacity: 0; } }
#svgMapa .fx-onda { stroke-width: 2.2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; opacity: 0; animation: fxOnda 1.5s cubic-bezier(.2, .7, .2, 1) forwards; }
#svgMapa .fx--forte .fx-onda { stroke-width: 3; animation-duration: 2.2s; }
@keyframes fxOnda { 0% { transform: scale(1); opacity: .95; } 100% { transform: scale(16); opacity: 0; } }
#svgMapa .fx-contorno { stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; animation: fxContorno 1.7s ease-in-out forwards; filter: drop-shadow(0 0 3px currentColor); }
#svgMapa .fx--forte .fx-contorno { stroke-width: 3.2; animation-duration: 2.4s; }
@keyframes fxContorno { 0% { opacity: 1; } 65% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
#svgMapa .fx-brilho { stroke-width: 2; vector-effect: non-scaling-stroke; animation: fxBrilho 1.4s ease-out forwards; }
@keyframes fxBrilho { 0% { opacity: 0; stroke-width: 1; } 30% { opacity: 1; stroke-width: 3; } 100% { opacity: 0; stroke-width: 1; } }

/* brilho ambiente na cor de quem lidera o Brasil */
.mapa { --ambient: transparent; isolation: isolate; }
.mapa::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1; opacity: .9; transition: background 1.2s ease;
  background: radial-gradient(ellipse 70% 55% at 50% 48%, color-mix(in srgb, var(--ambient) 13%, transparent), transparent 70%); }
.mapa--virada::before { animation: ambientePulso 1.6s ease-out; }
@keyframes ambientePulso { 0% { opacity: .9; } 30% { opacity: 1.6; } 100% { opacity: .9; } }

/* números que contam, manchete que entra, feed que desliza */
.manchete--nova { animation: mancheteEntra .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes mancheteEntra { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }
.feed li.feed--novo { animation: feedEntra .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes feedEntra { 0% { opacity: 0; transform: translateX(10px); background: var(--panel-3); } 100% { opacity: 1; transform: none; } }
.regiao--mudou, .lista-ufs button.linha--mudou { animation: linhaFlash 1.4s ease-out; }
@keyframes linhaFlash { 0% { background: color-mix(in srgb, var(--c, var(--text)) 22%, transparent); } 100% { background: transparent; } }
.status--novo .status__dot { animation: dotNovo .9s ease-out; }
@keyframes dotNovo { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 80%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.contagem { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.cand__foto.cand--lidera { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent), 0 0 18px -2px var(--c); }
.pctg--lidera sup { display: inline-block; animation: supPulso 1.2s ease-out; }
@keyframes supPulso { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.demo-faixa { position: fixed; left: 18px; bottom: 14px; z-index: 55; background: color-mix(in srgb, var(--warn) 18%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent); color: var(--text); padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); white-space: nowrap; }
.demo-faixa b { color: var(--warn); }
.demo-faixa button { color: var(--muted); text-decoration: underline; }

.mapa__aviso { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--border-2); color: var(--text-2); padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; backdrop-filter: blur(8px); z-index: 4; white-space: nowrap; }

.mapa__zoom { position: absolute; left: 12px; bottom: 44px; display: flex; flex-direction: column; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; z-index: 3; }
.mapa__zoom button { width: 34px; height: 32px; display: grid; place-items: center; font-size: 17px; color: var(--text-2); }
.mapa__zoom button + button { border-top: 1px solid var(--border); }
.mapa__zoom button:hover { background: var(--panel-3); color: var(--text); }
.mapa__zoom svg { width: 15px; height: 15px; }

.mapa__progresso { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.progresso__barra { flex: 1; height: 4px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.progresso__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--blue)); transition: width .8s ease; }
.progresso__texto { white-space: nowrap; font-weight: 500; }

.tooltip { position: absolute; z-index: 5; pointer-events: none; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--border-2); border-radius: 10px; padding: 9px 11px; min-width: 190px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.tooltip__nome { font-weight: 700; font-size: 13px; }
.tooltip__sub { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.tooltip__linha { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 2px 0; }
.tooltip__linha i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 6px; }
.tooltip__linha b { font-weight: 600; }
.tooltip__barra { height: 4px; border-radius: 999px; background: var(--panel-3); margin-top: 6px; overflow: hidden; }
.tooltip__barra i { display: block; height: 100%; background: var(--c); }

.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 6px; box-shadow: var(--shadow); z-index: 10; }
.menu button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; text-align: left; color: var(--text-2); }
.menu button:hover, .menu button[aria-checked="true"] { background: var(--panel-3); color: var(--text); }
.menu i { width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.menu small { margin-left: auto; color: var(--muted); }

/* ---------- regiões e feed ---------- */
.regioes__cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.regiao { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; align-items: center; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--border); cursor: pointer; }
.regiao:hover .regiao__nome { text-decoration: underline; text-underline-offset: 3px; }
.regiao__nome { font-weight: 600; font-size: 13px; grid-column: 1; grid-row: 1; }
.regiao__sub { color: var(--muted); font-size: 11px; grid-column: 1; grid-row: 2; }
.regiao__lider { display: flex; align-items: center; gap: 7px; grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.regiao__foto { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--c, var(--border-2)); background: var(--panel-3); }
.regiao__partido { font-size: 11px; font-weight: 700; color: var(--c, var(--muted)); }
.regiao__pct { font-weight: 700; font-size: 13.5px; }
.regiao__mini { grid-column: 2; grid-row: 3; height: 3px; border-radius: 999px; background: var(--panel-3); position: relative; overflow: hidden; width: 70px; justify-self: end; }
.regiao__mini i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--c); }
.regiao__mini i + i { left: auto; right: 0; }

.feed li { display: grid; grid-template-columns: 44px 30px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); align-items: start; }
.feed__hora { color: var(--muted); font-size: 11.5px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.feed__foto { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--c, var(--border-2)); background: var(--panel-3); }
.feed__ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); }
.feed__ico svg { width: 14px; height: 14px; }
.feed__texto { font-size: 12.5px; color: var(--text-2); }
.feed__texto b { color: var(--text); font-weight: 600; }
.feed__vazio { color: var(--muted); font-size: 12px; padding: 6px 0 2px; }
.feed li.virada .feed__texto { color: var(--text); }

/* ---------- busca ---------- */
.dlg { border: 1px solid var(--border-2); border-radius: 14px; background: var(--panel); color: var(--text); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); margin-top: 12vh; }
.dlg::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
.dlg__form { margin: 0; }
.dlg__campo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dlg__campo svg { width: 18px; height: 18px; color: var(--muted); }
.dlg__campo input { flex: 1; background: none; border: 0; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.dlg__lista { max-height: 50vh; overflow: auto; padding: 6px; }
.dlg__lista li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.dlg__lista li[aria-selected="true"], .dlg__lista li:hover { background: var(--panel-3); }
.dlg__tipo { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 64px; flex: 0 0 auto; }
.dlg__nome { font-weight: 600; }
.dlg__sub { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.dlg__dica { padding: 8px 14px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 11px; }
.dlg__vazio { padding: 16px; color: var(--muted); text-align: center; }

/* ---------- diversos ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text); padding: 9px 14px; border-radius: 999px; font-weight: 500; box-shadow: var(--shadow); z-index: 60; }
.rodape { padding: 10px 18px 16px; color: var(--muted-2); font-size: 11px; display: flex; gap: 18px; flex-wrap: wrap; }
.rodape p { margin: 0; }
.rodape a { color: var(--muted); }
.erro-box { padding: 14px; border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); border-radius: 10px; color: var(--text-2); font-size: 12.5px; }
.erro-box b { color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--panel-3); color: var(--muted); font-size: 11px; font-weight: 600; }
.chip--ok { color: var(--ok); }

:fullscreen body, body:fullscreen { background: var(--bg); }
.app--cheia { height: 100vh; }

/* ---------- responsivo ---------- */
@media (max-width: 1700px) {
  #btnTelaCheia span, #btnExterior span, .online span { display: none; }
  #btnTelaCheia, #btnExterior { width: 34px; padding: 0; justify-content: center; }
  .online { padding: 0 10px; }
  .status { flex: 1 1 auto; justify-content: flex-end; }
  .status__texto { min-width: 0; }
}
@media (max-width: 1240px) {
  .app { grid-template-columns: 300px minmax(0, 1fr) 270px; }
  .marca__sub { display: none; }
  .status__texto { max-width: 160px; }
}
@media (max-width: 1080px) {
  .app { grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; height: auto; min-height: calc(100vh - var(--topo-h)); }
  .col--esq { max-height: calc(100vh - var(--topo-h) - 28px); position: sticky; top: calc(var(--topo-h) + 14px); }
  .mapa { min-height: 560px; }
  .col--dir { grid-column: 1 / -1; flex-direction: row; overflow: visible; }
  .col--dir .card { flex: 1 1 0; min-width: 0; }
  .topo { grid-template-columns: auto 1fr auto; }
  .pill span { display: none; }
  .pill { width: 34px; padding: 0; justify-content: center; }
}
@media (max-width: 760px) {
  :root { --topo-h: auto; }
  .topo { position: static; height: auto; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 14px; }
  .topo__marca { justify-content: space-between; }
  .marca__titulo { font-size: 21px; }
  .topo__centro { justify-content: space-between; }
  .topo__centro .seg { overflow-x: auto; max-width: calc(100vw - 80px); scrollbar-width: none; }
  .busca span, .busca kbd { display: none; }
  .busca { padding: 7px 9px; }
  .topo__direita { justify-content: space-between; }
  .status { flex: 1 1 auto; margin-right: 0; }
  .status__texto { max-width: none; }
  .mapa__aviso { white-space: normal; text-align: center; max-width: calc(100% - 24px); }
  .app { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 10px 12px; gap: 10px; }
  .col { overflow: visible; }
  /* no celular, o placar vem primeiro, depois o mapa, depois a curva e as regiões */
  .col--esq { display: contents; }
  #painelResumo { order: 1; }
  .mapa { order: 2; height: min(66svh, 560px); min-height: 400px; }
  #painelCurva { order: 3; }
  .col--dir { order: 4; flex-direction: column; }
  .seg > button, .pill, .busca { min-height: 36px; }
  .lista-ufs__disputa { padding-left: 0; }
  .topo__marca { flex-wrap: wrap; row-gap: 6px; }
  .mapa__barra { padding: 8px; }
  .mapa__barra .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
  .mapa__barra .seg::-webkit-scrollbar { display: none; }
  .legenda { font-size: 11px; gap: 8px; justify-content: flex-start; width: 100%; }
  .manchete { font-size: 24px; }
  .pctg { font-size: 38px; }
  .seg > button { padding: 6px 10px; }
  .dlg { margin-top: 6vh; }
}
@media (hover: none) {
  button, .seg > button { touch-action: manipulation; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
