:root {
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --line: #e1e0d9;
  --good: #006300;
  --good-bg: #e3f3e3;
  --warn-bg: #fdf0d2;
  --other: #b4b2aa;
  /* cores categóricas: atribuídas por candidato, nunca por posição */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --header-h: 52px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #2c2c2a;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --line: #2c2c2a;
    --good: #0ca30c;
    --good-bg: #12301a;
    --warn-bg: #3a2f10;
    --other: #5c5b56;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
h2 { font-size: 17px; margin: 0; }
.hint { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }

/* Cabeçalho */
.top {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand strong { font-size: 17px; }
.brand .sub { color: var(--muted); font-size: 12px; margin-left: 8px; }
.status { margin-left: auto; color: var(--ink-2); font-size: 12px; text-align: right; white-space: nowrap; }
.status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; }
.status.err .dot { background: var(--s8); }
.turnos { display: flex; gap: 4px; }
.turnos button, .tabs button {
  font: inherit; font-size: 13px; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
}
.turnos button[aria-pressed="true"], .tabs button[aria-selected="true"] {
  background: var(--ink); color: var(--surface); border-color: var(--ink);
}

/* Barra compacta do presidencial */
.mini {
  position: sticky; top: var(--header-h); z-index: 25;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px; font-size: 13px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
}
.mini[hidden] { display: none; }
.mini .k { color: var(--muted); }
.mini .c { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }

/* Layout */
.layout {
  display: grid; grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 16px; padding: 16px; max-width: 1400px; margin: 0 auto; align-items: start;
}
.explore { display: grid; gap: 16px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.card-h { margin-bottom: 12px; }
.pres {
  position: sticky; top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .pres { position: static; max-height: none; }
  .brand .sub { display: none; }
}
@media (min-width: 961px) { .mini { display: none !important; } }

/* Painel presidencial */
.kicker { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.pres h1 { font-size: 22px; margin: 2px 0 10px; }
.prog { margin-bottom: 12px; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.prog-top b { font-size: 26px; }
.prog-top span { color: var(--ink-2); font-size: 12px; text-align: right; }
.track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.track i { display: block; height: 100%; border-radius: 4px; background: var(--ink); transition: width .6s; }
.banner { border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; background: var(--warn-bg); }
.banner.ok { background: var(--good-bg); }

/* Lista de candidatos */
.cands { list-style: none; margin: 0; padding: 0; }
.cand { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.cand:first-child { border-top: 0; }
.ph { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 12px; font-weight: 600; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs { color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 0 3px 3px 0; min-width: 0; transition: width .6s; }
.cv { text-align: right; }
.cv b { display: block; font-size: 16px; }
.cv span { color: var(--ink-2); font-size: 12px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); margin-left: 6px; vertical-align: 1px; }
.badge.ok { background: var(--good-bg); color: var(--good); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.stat { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.stat span { display: block; color: var(--ink-2); font-size: 11px; }
.stat b { font-size: 15px; }
.stat small { color: var(--ink-2); font-weight: 400; margin-left: 4px; }

/* Mapa em blocos */
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 620px; }
.tile {
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  background: var(--surface-2); border: 0; border-top: 6px solid var(--other);
  border-radius: 6px; padding: 4px 6px 6px; min-height: 58px; min-width: 0;
}
.tile:hover, .tile.sel { outline: 2px solid var(--ink); }
.tile b { display: block; font-size: 13px; }
.tile span { display: block; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 520px) { .tile { padding: 3px 4px 4px; min-height: 50px; } .tile .nm { display: none; } }

/* Filtros e abas */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.filters label { display: grid; gap: 3px; font-size: 12px; color: var(--ink-2); min-width: 150px; }
.filters .grow { flex: 1; }
select, input[type="search"] {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%;
}
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sum { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-2); font-size: 13px; margin-bottom: 6px; }
.sum b { color: var(--ink); }
.more { font: inherit; cursor: pointer; margin-top: 10px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.skeleton, .empty { color: var(--muted); padding: 18px 0; }
.foot { color: var(--muted); font-size: 12px; padding: 0 4px 24px; }

/* Ajustes para telas estreitas */
.brand { white-space: nowrap; }
.status { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 520px) {
  .top { gap: 8px; padding: 0 12px; }
  .status { font-size: 11px; }
  .tile span { font-size: 10px; }
  .tiles { gap: 3px; }
}

/* Voto no exterior */
.ext-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1180px) { .ext-grid { grid-template-columns: 1fr; } }
.ext-grid h3 { font-size: 13px; margin: 0 0 6px; color: var(--ink-2); font-weight: 600; }
.cities { display: grid; max-height: 520px; overflow-y: auto; }
.city {
  font: inherit; font-size: 12px; color: var(--ink-2); text-align: left; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px;
  padding: 7px 6px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0;
}
.city:first-child { border-top: 0; }
.city:hover { background: var(--surface-2); }
.city > b { color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city .ld { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.city span:nth-of-type(1) { grid-column: 1; }

/* Explorador como área principal; mapa por estado compacto ao lado */
.layout { max-width: 1760px; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1280px) { .duo { grid-template-columns: 1fr; } }
.mapa .tiles { gap: 3px; max-width: 330px; }
.mapa .tile { min-height: 0; padding: 2px 4px 4px; border-top-width: 5px; border-radius: 5px; text-align: center; }
.mapa .tile b { font-size: 12px; }
.mapa .tile span { font-size: 10px; }
.mapa .legend { margin-top: 10px; }

/* ---------- Identidade Simples Internet ---------- */
:root {
  --accent: #42b4b8;        /* teal da marca */
  --accent-strong: #126c70; /* teal escuro */
  --on-accent: #ffffff;
  --page: #f3f9f9;
  --surface: #ffffff;
  --surface-2: #edf8f8;
  --ink: #293c40;
  --ink-2: #65777a;
  --muted: #7d8f92;
  --line: #dce7e7;
  --warn-bg: #fdeee7;       /* laranja da marca, bem claro */
  --header-bg: #126c70;
  --wm-opacity: .07;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent-strong: #42b4b8;
    --on-accent: #0c2022;
    --page: #0c1b1d;
    --surface: #13282b;
    --surface-2: #1c383b;
    --ink: #f2fbfb;
    --ink-2: #a9c2c4;
    --muted: #7d9a9d;
    --line: #23444a;
    --warn-bg: #3d2a22;
    --header-bg: #0e3336;
    --wm-opacity: .09;
  }
}
.top { background: var(--header-bg); border-bottom-color: transparent; color: #fff; }
.top .brand .sub, .top .status { color: rgba(255, 255, 255, .8); }
.top .status .dot { background: #7be0a0; }
.top .status.err .dot { background: #fa946e; }
.turnos button { border-color: rgba(255, 255, 255, .4); color: #fff; }
.turnos button[aria-pressed="true"] { background: #fff; color: #126c70; border-color: #fff; }
.tabs button[aria-selected="true"] { background: var(--accent-strong); color: var(--on-accent); border-color: var(--accent-strong); }
.track i { background: var(--accent); }
.tile:hover, .tile.sel { outline-color: var(--accent-strong); }
.kicker { color: var(--accent-strong); }
select:focus, input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.foot a { color: var(--accent-strong); }

/* Marca d'água: logo ao fundo, sem interferir nos cliques */
body::after {
  content: ""; position: fixed; inset: var(--header-h) 0 0 0; z-index: 20; pointer-events: none;
  background: url("logo-simples.png") center / min(62vw, 980px) auto no-repeat;
  opacity: var(--wm-opacity);
}

div.city { cursor: default; }
div.city:hover { background: transparent; }

/* ---------- Barras de rolagem, acessibilidade e celular ---------- */
:root { color-scheme: light dark; --ink-2: #52666a; --muted: #65777a; }
@media (prefers-color-scheme: dark) { :root { --ink-2: #a9c2c4; --muted: #8fabae; } }
html { scrollbar-width: thin; scrollbar-color: var(--line) transparent; overflow-x: hidden; }
.pres, .cities, .tabs, .mini { scrollbar-width: none; }
.pres::-webkit-scrollbar, .cities::-webkit-scrollbar, .tabs::-webkit-scrollbar, .mini::-webkit-scrollbar { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: #fff; color: #126c70; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.presmore { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 960px) {
  .presmore { display: block; width: 100%; }
  .pres-list:not(.all) .extra { display: none; }
  .card { padding: 14px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -14px; padding-inline: 14px; }
  .tabs button { flex: none; min-height: 44px; padding: 8px 16px; }
  .turnos button, .more { min-height: 44px; }
  .filters label { min-width: 0; flex: 1 1 140px; }
  select, input[type="search"] { min-height: 44px; font-size: 16px; } /* 16px evita o zoom automático do iOS */
  .mapa .tiles { max-width: 440px; margin: 0 auto; gap: 4px; }
  .mapa .tile { min-height: 44px; }
  .mapa .tile b { font-size: 13px; }
  .mapa .tile span { font-size: 11px; }
  .mini { overflow-x: auto; }
  .city { padding: 10px 6px; }
}
@media (max-width: 520px) {
  .status .prox { display: none; }
  .cand { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; }
  .ph { width: 36px; height: 36px; }
  .cn { white-space: normal; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog-top b { font-size: 22px; }
  body::after { background-size: 86vw auto; }
}

/* Exterior no explorador: cidades em grade */
.sub-h { font-size: 13px; color: var(--ink-2); margin: 18px 0 6px; font-weight: 600; }
.cities.grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 20px; max-height: none; }
.cities.grid .city:first-child { border-top: 1px solid var(--line); }
button.city { width: 100%; }
#voltar { margin-bottom: 4px; }

/* Seletor Total / Oficial / Exterior e alerta de indisponibilidade */
.seg { display: flex; gap: 4px; margin: 0 0 12px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.seg button { flex: 1; font: inherit; font-size: 12px; cursor: pointer; padding: 7px 6px; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--accent-strong); color: var(--on-accent); font-weight: 600; }
.alerta { background: #fa946e; color: #2b1408; padding: 10px 16px; font-size: 14px; font-weight: 600; text-align: center; }
@media (max-width: 960px) { .seg button { min-height: 44px; } }

/* Exterior por país: trilha, bandeiras */
.trilha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; color: var(--ink-2); }
.trilha button { font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; min-height: 32px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.trilha button:hover { background: var(--surface-2); }
.trilha b { color: var(--ink); }
.flag { width: 28px; height: 19px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); flex: none; vertical-align: -3px; margin-right: 8px; }
.trilha .flag { margin-right: 0; width: 22px; height: 15px; }
.city.pais > b { font-size: 14px; }
@media (max-width: 960px) { .trilha button { min-height: 44px; } }

/* Visitantes online */
.online { position: fixed; right: 12px; bottom: 12px; z-index: 40; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.online .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; display: inline-block; }
.foot { padding-bottom: 56px; }

/* Redes sociais no cabeçalho */
.social { display: flex; gap: 6px; margin-left: auto; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .12); }
.social a:hover { background: rgba(255, 255, 255, .26); }
.social a:focus-visible { outline-color: #fff; }
.top .status { margin-left: 0; }
@media (max-width: 960px) { .social a { width: 40px; height: 40px; } }
@media (max-width: 420px) { .top .status { display: none; } }

/* Mapa por estado: o percentual (uma casa decimal) sempre inteiro dentro do bloco */
.mapa .tile { padding-left: 1px; padding-right: 1px; }
.mapa .tile span { overflow: visible; text-overflow: clip; letter-spacing: -.2px; }

/* Botão dentro dos avisos (ver só os eleitos) */
.chip { font: inherit; font-size: 12px; cursor: pointer; margin-left: 8px; padding: 5px 12px; min-height: 32px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; }
@media (max-width: 960px) { .chip { min-height: 44px; margin: 8px 0 0; display: block; } }

/* Nota informativa do total somado (discreta, sem cara de alerta) */
.nota-soma { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 12px; color: var(--ink-2); }
.nota-soma b { color: var(--ink); }

/* Destaque de eleitos e de classificados ao 2º turno nas listas */
.cand.eleito, .cand.turno2 { border-radius: 10px; padding: 10px; margin: 4px 0; border-top-color: transparent; }
.cand.eleito + .cand, .cand.turno2 + .cand { border-top-color: transparent; }
.cand.eleito { background: var(--good-bg); box-shadow: inset 5px 0 0 var(--good); }
.cand.turno2 { background: var(--surface-2); box-shadow: inset 5px 0 0 var(--accent); }
.cand.eleito .cn, .cand.turno2 .cn { font-size: 16px; }
.badge.ok { background: var(--good); color: #fff; font-size: 12px; padding: 2px 9px; }
.badge.t2 { background: var(--accent-strong); color: var(--on-accent); font-size: 12px; padding: 2px 9px; }

/* Abas do site (página inicial e páginas de resultado) */
.abas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.abas::-webkit-scrollbar { display: none; }
.abas a { flex: none; padding: 8px 16px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 14px; white-space: nowrap; background: var(--surface); }
.abas a:hover { color: var(--ink); }
.abas a[aria-current="page"] { background: var(--accent-strong); color: var(--on-accent); border-color: var(--accent-strong); font-weight: 600; }
.abas.site { max-width: 1760px; margin: 0 auto; padding: 12px 16px 0; }
@media (max-width: 960px) { .abas.site { padding: 10px 12px 0; } .abas a { min-height: 44px; } }

/* Nada pode alargar a página no celular: itens de grade encolhem e o conteúdo largo rola dentro do cartão */
.rel-main, .res-main { grid-template-columns: minmax(0, 1fr); }
.rel-main > *, .res-main > *, .layout > *, .duo > *, .explore > *, .card { min-width: 0; }
@media (max-width: 1280px) { .duo { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); } }
html, body { max-width: 100%; }
.filters label { grid-template-columns: minmax(0, 1fr); }
.filters label > * { min-width: 0; max-width: 100%; }
@media (max-width: 960px) {
  .tabs { margin-inline: 0; padding-inline: 0; }
  .layout { overflow-x: clip; }
}
@media (max-width: 720px) { .filters .grow { flex: 1 1 100%; } }

/* =====================================================================
   2º turno — tema cibernético (só a página principal: body.cyber)
   Flávio Bolsonaro (22) = verde, Lula (13) = vermelho
   ===================================================================== */
body.cyber {
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --page: #03060b;
  --surface: rgba(8, 17, 27, .82);
  --surface-2: rgba(0, 229, 255, .055);
  --ink: #e8fbff;
  --ink-2: #94b8c4;
  --muted: #6c8d98;
  --line: rgba(0, 229, 255, .16);
  --accent: #00e5ff;
  --accent-strong: #00e5ff;
  --on-accent: #00151b;
  --good: #19f28c;
  --good-bg: rgba(25, 242, 140, .09);
  --warn-bg: rgba(255, 196, 0, .08);
  --other: #3b4a55;
  --header-bg: rgba(3, 6, 11, .84);
  --wm-opacity: .03;
  --s1: #3d8bff; --s2: #ff8a3d; --s3: #b26bff; --s4: #ffc400;
  --s5: #ff6bd5; --s6: #19f28c; --s7: #8f9bff; --s8: #ff2e55;
  color-scheme: dark;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 72% -12%, rgba(0, 229, 255, .11), transparent 62%),
    radial-gradient(900px 520px at -12% 112%, rgba(255, 46, 85, .08), transparent 60%),
    radial-gradient(900px 520px at 112% 112%, rgba(25, 242, 140, .07), transparent 60%),
    linear-gradient(rgba(0, 229, 255, .03) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(0, 229, 255, .03) 1px, transparent 1px) 0 0 / 44px 44px,
    #03060b;
  background-attachment: fixed;
}
/* marca d'água atrás dos cartões (no tema escuro ela atravessava o mapa) */
body.cyber::after { z-index: -1; }
/* linhas de varredura bem discretas por cima de tudo */
body.cyber::before {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
}
body.cyber .tag {
  display: inline-block; font: 700 10px/1 var(--mono); letter-spacing: .16em; color: var(--accent);
  border: 1px solid rgba(0, 229, 255, .45); padding: 4px 6px; border-radius: 4px; margin-right: 8px; vertical-align: 2px;
  text-shadow: 0 0 8px rgba(0, 229, 255, .7);
}
body.cyber h2 { font-size: 15px; letter-spacing: .02em; }
body.cyber .hint { color: var(--ink-2); }
body.cyber select, body.cyber input[type="search"] { background: rgba(0, 0, 0, .35); border-color: var(--line); color: var(--ink); }

/* Cabeçalho */
body.cyber .top {
  background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0, 229, 255, .3), 0 10px 30px rgba(0, 0, 0, .45);
}
body.cyber .brand strong { font: 800 17px var(--mono); letter-spacing: .12em; color: #fff; }
body.cyber .brand strong i { font-style: normal; color: var(--accent); margin: 0 4px; text-shadow: 0 0 10px var(--accent); }
body.cyber .brand .sub { font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.glitch { position: relative; text-shadow: 1px 0 rgba(255, 46, 85, .7), -1px 0 rgba(0, 229, 255, .7); }
.glitch::after {
  content: attr(data-t); position: absolute; left: 0; top: 0; color: var(--accent); opacity: 0;
  clip-path: inset(40% 0 45% 0); animation: glitch 7s infinite steps(1);
}
@keyframes glitch { 0%, 94%, 100% { opacity: 0; transform: none; } 95% { opacity: .8; transform: translateX(2px); } 97% { opacity: .6; transform: translateX(-2px); clip-path: inset(10% 0 70% 0); } }
body.cyber .turnos button { font: 600 12px var(--mono); border-color: var(--line); color: var(--ink-2); }
body.cyber .turnos button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(0, 229, 255, .45); }
body.cyber .status { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
body.cyber .status .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
body.cyber .social a { background: rgba(0, 229, 255, .08); color: var(--ink); }
body.cyber .mini { background: var(--header-bg); border-bottom-color: var(--line); backdrop-filter: blur(8px); }

/* Cartões */
body.cyber .card {
  position: relative;
  background: linear-gradient(180deg, rgba(10, 22, 34, .88), rgba(5, 12, 20, .88));
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .03), 0 12px 40px rgba(0, 0, 0, .45);
}
body.cyber .card::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 24px; height: 24px; pointer-events: none;
  border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: 14px;
  filter: drop-shadow(0 0 4px var(--accent)); opacity: .85;
}

/* Layout: Presidente | mapa, enquete e explorador | chat */
body.cyber .layout {
  max-width: 1920px;
  grid-template-columns: minmax(330px, 380px) minmax(0, 1fr) minmax(300px, 360px);
  grid-template-areas: "pres centro chat" "pres enq chat" "pres detalhe chat" "pres foot chat";
}
body.cyber .layout > .enquete { grid-area: enq; }
body.cyber .layout > .pres { grid-area: pres; position: sticky; } /* o cartão genérico é relative; este continua grudado ao rolar */
@media (max-width: 960px) { body.cyber .layout > .pres { position: relative; top: auto; } }
body.tv .layout > .pres { position: relative; top: 0; }
/* (só dentro do .layout da página principal: nas páginas de resultado o .foot não pode ganhar grid-area) */
body.cyber .layout > .centro { grid-area: centro; display: grid; gap: 16px; min-width: 0; }
body.cyber .layout > .chat { grid-area: chat; }
body.cyber .layout > .explorer { grid-area: detalhe; }
body.cyber .layout > .foot { grid-area: foot; }
body.cyber .chat {
  position: sticky; top: calc(var(--header-h) + 16px); align-self: start;
  height: calc(100vh - var(--header-h) - 32px); min-height: 420px;
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
}
/* chat escondido: o mapa fica no centro, entre a parcial (esquerda) e a enquete (direita, centralizada na altura do mapa) */
body.cyber.chat-off .layout {
  grid-template-columns: minmax(330px, 380px) minmax(0, 1fr) minmax(300px, 380px);
  grid-template-areas: "pres centro enq" "pres detalhe detalhe" "pres foot foot";
}
body.cyber.chat-off .chat { display: none; }
@media (min-width: 1400px) {
  body.cyber.chat-off .enquete { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
  body.cyber.chat-off .enquete .enq-ops { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1399px) {
  body.cyber .layout {
    grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
    grid-template-areas: "pres centro" "pres enq" "pres chat" "pres detalhe" "pres foot";
  }
  body.cyber.chat-off .layout { grid-template-columns: minmax(320px, 370px) minmax(0, 1fr); grid-template-areas: "pres centro" "pres enq" "pres detalhe" "pres foot"; }
  body.cyber .chat { position: relative; top: auto; height: 480px; min-height: 0; }
}
@media (max-width: 960px) {
  body.cyber .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pres" "centro" "enq" "chat" "detalhe" "foot"; }
  body.cyber.chat-off .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pres" "centro" "enq" "detalhe" "foot"; }
  body.cyber .chat { height: 440px; }
  .so-desk { display: none; }
}

/* Painel presidencial */
body.cyber .pres h1 { font: 800 20px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
body.cyber .kicker { color: var(--accent); font-family: var(--mono); letter-spacing: .14em; }
body.cyber .prog-top b { font-family: var(--mono); color: #fff; text-shadow: 0 0 12px rgba(0, 229, 255, .5); }
body.cyber .track { background: rgba(255, 255, 255, .06); }
body.cyber .track i { background: linear-gradient(90deg, var(--accent), #7cf4ff); box-shadow: 0 0 12px var(--accent); }
body.cyber .seg { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
body.cyber .seg button { font-family: var(--mono); font-size: 11px; letter-spacing: .03em; }
body.cyber .seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 12px rgba(0, 229, 255, .45); }
body.cyber .banner { background: rgba(255, 196, 0, .07); border: 1px solid rgba(255, 196, 0, .25); }
body.cyber .banner.ok { background: rgba(25, 242, 140, .07); border-color: rgba(25, 242, 140, .3); }
body.cyber .cv b, body.cyber .stat b { font-family: var(--mono); }
body.cyber .stat { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
body.cyber .bar { background: rgba(255, 255, 255, .06); }
body.cyber .bar i { box-shadow: 0 0 10px currentColor; }
body.cyber .ph { background: #0b1620; }
body.cyber .tabs button { font-family: var(--mono); font-size: 12px; border-color: var(--line); color: var(--ink-2); }
body.cyber .tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 0 12px rgba(0, 229, 255, .45); }
body.cyber .more, body.cyber .trilha button, body.cyber .chip { border-color: var(--line); color: var(--ink); }
body.cyber .city:hover, body.cyber .trilha button:hover { background: rgba(0, 229, 255, .06); }

/* Placar do 2º turno */
.duelo { margin: 4px 0 14px; padding: 14px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .3); }
.duelo-lados { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.duelo-c { display: grid; justify-items: center; text-align: center; gap: 3px; min-width: 0; }
.duelo-ph {
  position: relative; width: 66px; height: 66px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  border: 2px solid var(--cor); box-shadow: 0 0 20px var(--cor); background: #0b1620; color: var(--ink-2); font-weight: 700;
}
.duelo-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.duelo-n { font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duelo-p { font: 800 30px/1.05 var(--mono); color: var(--cor); text-shadow: 0 0 16px var(--cor); }
.duelo-v { font: 11px var(--mono); color: var(--ink-2); }
.duelo-x { font: 800 13px var(--mono); color: var(--muted); letter-spacing: .12em; }
.duelo-bar { position: relative; display: flex; height: 14px; margin-top: 12px; border-radius: 7px; overflow: hidden; background: #0b1620; box-shadow: inset 0 0 0 1px var(--line); }
.duelo-bar i { height: 100%; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.duelo-bar.vazio i { opacity: .28; }
.duelo-bar em { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; opacity: .75; box-shadow: 0 0 6px #fff; }
.duelo-dif { margin-top: 8px; text-align: center; font: 12px var(--mono); color: var(--ink-2); }
.duelo-dif b { color: #fff; }

/* Mapa */
.mapa-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.map-ctrl { display: flex; gap: 4px; }
.map-ctrl button {
  font: 600 12px var(--mono); min-width: 40px; min-height: 36px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0, 229, 255, .05); color: var(--ink);
}
.map-ctrl button:hover { border-color: var(--accent); }
.map-ctrl button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 14px rgba(0, 229, 255, .5); }
.map-wrap {
  position: relative; height: clamp(340px, 58vh, 660px); border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 42% 58%, rgba(0, 229, 255, .09), transparent 62%), #02070d;
  border: 1px solid var(--line);
}
#mapaSvg { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
#mapaSvg.movendo { cursor: grabbing; }
#mapaSvg .grade { fill: none; stroke: rgba(0, 229, 255, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
#mapaSvg .pais { fill: #112331; stroke: rgba(0, 229, 255, .28); stroke-width: .6; vector-effect: non-scaling-stroke; transition: fill .6s, fill-opacity .6s; }
#mapaSvg .pais.tem { cursor: pointer; stroke: rgba(0, 229, 255, .55); }
#mapaSvg .uf { fill: #0f2232; stroke: rgba(0, 229, 255, .8); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .6s, fill-opacity .6s; }
#mapaSvg .ufs { filter: drop-shadow(0 0 5px rgba(0, 229, 255, .35)); }
#mapaSvg .uf:hover, #mapaSvg .pais.tem:hover { stroke: #fff; stroke-width: 2; }
#mapaSvg .uf.sel, #mapaSvg .pais.sel { stroke: #fff; stroke-width: 2.6; }
#mapaSvg .rot {
  font: 700 5.6px var(--mono); letter-spacing: .05em; fill: rgba(240, 253, 255, .92); text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; paint-order: stroke; stroke: rgba(0, 0, 0, .8); stroke-width: 1.3px;
}
#mapaSvg.perto .rot { font-size: 3.4px; stroke-width: .8px; }
#mapaSvg.longe .rot { display: none; }
.map-wrap .scan {
  position: absolute; left: 0; right: 0; top: 0; height: 28%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 229, 255, .07) 55%, rgba(0, 229, 255, .16) 98%, transparent);
  animation: varre 7s linear infinite;
}
@keyframes varre { from { transform: translateY(-100%); } to { transform: translateY(360%); } }
.map-tip {
  position: absolute; z-index: 6; pointer-events: none; width: 230px; display: grid; gap: 4px; padding: 10px 12px;
  border-radius: 10px; font-size: 12px; background: rgba(2, 8, 14, .95); border: 1px solid rgba(0, 229, 255, .5);
  box-shadow: 0 0 22px rgba(0, 229, 255, .25);
}
.map-tip b { font-size: 13px; }
.map-tip span { display: flex; align-items: center; gap: 6px; }
.map-tip small { color: var(--ink-2); font-family: var(--mono); font-size: 11px; }
body.cyber .legend { color: var(--ink-2); }
.legend .grad { display: inline-block; width: 34px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .85)); }
.sw.vazio { background: #0f2232; box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .7); }

/* Enquete */
.enq-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.enq-op {
  position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 6px 12px;
  padding: 14px; border-radius: 12px; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--cor) 50%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--cor) 14%, transparent), rgba(0, 0, 0, .25));
  transition: transform .15s, box-shadow .2s;
}
.enq-op:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 0 24px color-mix(in srgb, var(--cor) 50%, transparent); }
.enq-op:disabled { cursor: default; }
.enq-op.meu { box-shadow: 0 0 0 2px var(--cor), 0 0 26px color-mix(in srgb, var(--cor) 45%, transparent); }
.enq-ph {
  grid-row: 1 / span 2; position: relative; width: 50px; height: 50px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; border: 2px solid var(--cor); background: #0b1620; color: var(--ink-2); font-weight: 700;
}
.enq-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.enq-nome { display: grid; font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; min-width: 0; }
.enq-nome small { font: 11px var(--mono); color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.enq-p { font: 800 22px var(--mono); color: var(--cor); text-shadow: 0 0 12px var(--cor); }
.enq-bar { grid-column: 2 / span 2; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.enq-bar i { display: block; height: 100%; background: var(--cor); box-shadow: 0 0 10px var(--cor); transition: width .8s; }
.enq-meu {
  position: absolute; top: -9px; right: 12px; padding: 2px 8px; border-radius: 999px;
  font: 700 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--cor); color: #02070d;
}
.enq-pe { margin: 12px 0 0; font-size: 11px; color: var(--muted); }
@media (max-width: 560px) { .enq-ops { grid-template-columns: minmax(0, 1fr); } }

/* Chat ao vivo */
.chat-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font: 700 12px var(--mono); letter-spacing: .14em; }
.live { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff2e55; box-shadow: 0 0 10px #ff2e55; animation: pulsa 1.4s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .35; } }
.chat-on { margin-left: auto; font-weight: 400; letter-spacing: 0; color: var(--ink-2); white-space: nowrap; }
.chat-x { font: 600 11px var(--mono); padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
.chat-x:hover { color: var(--ink); border-color: var(--accent); }
.chat-msgs { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 10px 12px; overflow-y: auto; display: grid; align-content: start; gap: 5px; scrollbar-width: thin; scrollbar-color: rgba(0, 229, 255, .25) transparent; }
.chat-msgs li { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; padding: 6px 9px; border-radius: 8px; background: rgba(255, 255, 255, .03); border-left: 2px solid rgba(0, 229, 255, .18); animation: entra .25s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(4px); } }
.ch-h { font: 10px var(--mono); color: var(--muted); margin-right: 6px; }
.ch-n { margin-right: 6px; }
.ch-n::after { content: ":"; color: var(--muted); }
.chat-msgs li.ch-vazio { background: none; border: 0; text-align: center; color: var(--muted); padding: 30px 0; }
.chat-form { display: grid; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.chat-nome { display: flex; align-items: center; gap: 8px; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.chat-nome input { flex: 1; min-width: 0; }
.chat-row { display: flex; gap: 6px; }
.chat-row input { flex: 1; min-width: 0; }
.chat-form input { font: inherit; font-size: 14px; color: var(--ink); background: rgba(0, 0, 0, .4); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.chat-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 229, 255, .15); }
.chat-row button {
  font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 0 14px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); cursor: pointer; box-shadow: 0 0 14px rgba(0, 229, 255, .4);
}
.chat-row button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.chat-err { margin: 0; padding: 6px 9px; font-size: 12px; border-radius: 8px; color: #ffc2cc; background: rgba(255, 46, 85, .12); border: 1px solid rgba(255, 46, 85, .35); }
.chat-regras { margin: 0; font-size: 10.5px; color: var(--muted); }
.chat-abrir {
  position: fixed; right: 16px; bottom: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 999px; cursor: pointer; font: 700 12px var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: rgba(3, 8, 14, .94); border: 1px solid rgba(0, 229, 255, .55); box-shadow: 0 0 24px rgba(0, 229, 255, .3);
}
.chat-abrir b { padding: 1px 7px; border-radius: 999px; font-size: 11px; background: #ff2e55; color: #fff; }
@media (max-width: 960px) { .chat-form input { font-size: 16px; } .chat-x, .chat-row button { min-height: 44px; } }

/* Cabeçalho no celular: tudo numa linha, sem estourar a largura */
@media (max-width: 560px) {
  body.cyber .brand .sub { display: none; }
  body.cyber .brand strong { font-size: 14px; letter-spacing: .06em; }
  body.cyber .brand strong i { margin: 0 2px; }
  body.cyber .turnos button { white-space: nowrap; padding: 4px 9px; font-size: 11px; min-height: 36px; }
}
@media (max-width: 440px) { body.cyber .social { display: none; } }
/* no celular o número de pessoas online já aparece no cabeçalho do chat */
@media (max-width: 960px) { body.cyber:not(.chat-off) .online { display: none !important; } }

/* Visitantes online: canto esquerdo (o direito é do botão do chat) */
body.cyber .online { left: 12px; right: auto; font-family: var(--mono); color: var(--ink); background: rgba(3, 8, 14, .92); border-color: var(--line); }
body.cyber .online .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
body.cyber .foot { color: var(--muted); }
body.cyber .foot a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .glitch::after, .map-wrap .scan, .live, .chat-msgs li { animation: none !important; }
}

/* Moderação do chat (relatório interno) */
.mod-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mod-f { display: inline; margin: 0; }
.mod-b { font: 600 12px ui-monospace, Consolas, monospace; padding: 6px 10px; margin: 2px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }
.mod-b.perigo { border-color: #e34948; color: #e34948; }
.mod-tab { overflow-x: auto; }
.mod-tab table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mod-tab th, .mod-tab td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mod-tab td.txt { min-width: 260px; overflow-wrap: anywhere; }
.mod-tab tr.oculta { opacity: .45; }
.placar { font-size: 13px !important; font-weight: 400; }

/* ---------- Contador de visitantes no cabeçalho ---------- */
.online-top {
  display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px; font: 600 13px var(--mono, monospace); color: var(--ink);
  border: 1px solid rgba(25, 242, 140, .55); background: rgba(25, 242, 140, .09); box-shadow: 0 0 16px rgba(25, 242, 140, .22);
}
.online-top b { font-size: 19px; color: #19f28c; text-shadow: 0 0 10px rgba(25, 242, 140, .7); }
.online-top .dot { width: 9px; height: 9px; border-radius: 50%; background: #19f28c; box-shadow: 0 0 10px #19f28c; animation: pulsa 1.6s ease-in-out infinite; }
body.cyber .online { display: none !important; } /* o contador agora fica no topo */
.tv-bt {
  display: inline-flex; align-items: center; gap: 6px; flex: none; cursor: pointer;
  padding: 7px 12px; border-radius: 8px; font: 600 12px var(--mono, monospace); color: var(--ink);
  border: 1px solid var(--line); background: rgba(0, 229, 255, .06);
}
.tv-bt:hover { border-color: var(--accent); box-shadow: 0 0 12px rgba(0, 229, 255, .35); }
@media (max-width: 1100px) { body.cyber .top .status { display: none; } }
@media (max-width: 720px) { .tv-bt { display: none; } }
@media (max-width: 560px) { .online-top { padding: 4px 10px; gap: 6px; } .online-top span { display: none; } .online-top b { font-size: 16px; } }

/* ---------- Chat: identificação e moderadores ---------- */
.chat-tit { margin: 0; font: 700 12px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.chat-entrar input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--accent); }
.chat-aceite { display: flex; gap: 8px; align-items: flex-start; font-size: 11px; line-height: 1.4; color: var(--ink-2); cursor: pointer; }
#entBt {
  font: 700 12px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); cursor: pointer; box-shadow: 0 0 14px rgba(0, 229, 255, .4);
}
#entBt:disabled { opacity: .5; }
.chat-eu { margin: 0; font-size: 12px; color: var(--ink-2); }
.chat-eu b { color: var(--ink); }
.ch-selo { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 4px; font: 700 9px/15px var(--mono, monospace); letter-spacing: .08em; color: #02070d; background: var(--accent); vertical-align: 1px; }
.chat-msgs li.de-mod { border-left-color: var(--accent); background: rgba(0, 229, 255, .06); }
.ch-mod { display: none; }
.chat.sou-mod .ch-mod { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.ch-mod button { font: 600 10px var(--mono, monospace); padding: 1px 6px; border-radius: 5px; cursor: pointer; border: 1px solid rgba(255, 46, 85, .5); background: transparent; color: #ff8fa3; }
.ch-mod button:hover { background: rgba(255, 46, 85, .15); }

/* ---------- Modo TV (telão): parcial à esquerda, mapa inteiro, tela cheia ---------- */
body.tv { overflow: hidden; font-size: clamp(15px, 1vw, 22px); }
body.tv .layout { max-width: none; height: calc(100vh - var(--header-h)); padding: 16px; gap: 16px;
  grid-template-columns: minmax(380px, 30vw) minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) !important; grid-template-areas: "pres centro" !important; }
body.tv #enquete, body.tv #chat, body.tv #detalhe, body.tv .foot, body.tv .chat-abrir, body.tv .mini, body.tv .social, body.tv .tv-bt,
body.tv .turnos, body.tv .mapa-h .hint, body.tv .seg, body.tv .pres-list, body.tv .presmore, body.tv .skip, body.tv .alerta:empty { display: none !important; }
body.tv .pres { position: relative; top: 0; max-height: none; height: 100%; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
body.tv .centro { height: 100%; grid-template-rows: minmax(0, 1fr); }
body.tv .mapa-card { height: 100%; display: flex; flex-direction: column; min-height: 0; }
body.tv .map-wrap { flex: 1; height: auto; min-height: 0; }
body.tv .pres h1 { font-size: clamp(22px, 1.8vw, 40px); }
body.tv .kicker { font-size: clamp(12px, .9vw, 18px); }
body.tv .duelo { padding: clamp(14px, 1.4vw, 28px); }
body.tv .duelo-ph { width: clamp(80px, 7vw, 150px); height: clamp(80px, 7vw, 150px); }
body.tv .duelo-n { font-size: clamp(13px, 1.05vw, 22px); }
body.tv .duelo-p { font-size: clamp(36px, 3.6vw, 80px); }
body.tv .duelo-v, body.tv .duelo-dif { font-size: clamp(12px, .95vw, 20px); }
body.tv .duelo-bar { height: clamp(14px, 1.2vw, 26px); border-radius: 13px; }
body.tv .prog-top b { font-size: clamp(26px, 2.4vw, 52px); }
body.tv .stat b { font-size: clamp(15px, 1.2vw, 26px); }
body.tv .mapa-h h2 { font-size: clamp(15px, 1.2vw, 26px); }
body.tv .legend { font-size: clamp(12px, .95vw, 20px); }
body.tv #mapaSvg .rot { font-size: 7px; }
body.tv .online-top { font-size: clamp(13px, 1vw, 20px); }
body.tv .online-top b { font-size: clamp(19px, 1.5vw, 32px); }
.tv-sair {
  position: fixed; right: 14px; bottom: 14px; z-index: 80; cursor: pointer; opacity: .25; transition: opacity .2s;
  padding: 8px 14px; border-radius: 999px; font: 600 12px var(--mono, monospace); color: var(--ink);
  border: 1px solid var(--line); background: rgba(3, 8, 14, .9);
}
.tv-sair:hover, .tv-sair:focus-visible { opacity: 1; }

/* ---------- Painel interno: participantes ---------- */
.adm-h { margin: 24px 0 8px; font-size: 16px; }
.adm-mapa { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.adm-mapa svg { display: block; width: 100%; height: auto; max-height: 560px; }
.adm-p { fill: var(--surface); stroke: var(--line); stroke-width: .6; vector-effect: non-scaling-stroke; }
.adm-p:hover { stroke: #00c8e0; stroke-width: 2; }
.adm-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.adm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; }
.adm-chip .flag, .mod-tab .flag { margin-right: 6px; width: 22px; height: 15px; }
.selo-mod, .selo-ban { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; font: 700 10px/16px ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.selo-mod { background: #00c8e0; color: #02181c; }
.selo-ban { background: #e34948; color: #fff; }
.cpf summary { cursor: pointer; list-style: none; font-family: ui-monospace, Consolas, monospace; filter: blur(4px); user-select: none; transition: filter .2s; }
.cpf summary::-webkit-details-marker { display: none; }
.cpf summary:hover { filter: blur(2px); }
.cpf[open] summary { display: none; }
.cpf span { font-family: ui-monospace, Consolas, monospace; }

/* Moderador principal */
.ch-selo.principal { background: #ffc400; color: #1a1200; }
.ch-mod button.ok { border-color: rgba(0, 229, 255, .55); color: #7cf4ff; }
.ch-mod button.ok:hover { background: rgba(0, 229, 255, .15); }
.chat-err.ok { color: #b9ffd9; background: rgba(25, 242, 140, .12); border-color: rgba(25, 242, 140, .4); }
.selo-mod.principal { background: #ffc400; color: #1a1200; }
.mod-b.forte { border-color: #00c8e0; color: #00a4b8; font-weight: 700; }

/* ---------- Compartilhar a parcial ---------- */
.comp-abrir {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: -4px 0 14px; padding: 11px 14px;
  border-radius: 10px; cursor: pointer; font: 700 13px var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-accent, #00151b); background: linear-gradient(90deg, #00e5ff, #7cf4ff); border: 0; box-shadow: 0 0 18px rgba(0, 229, 255, .45);
}
.comp-abrir:hover { filter: brightness(1.08); }
body.tv .comp-abrir { display: none; }
dialog.comp {
  width: min(880px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow: auto;
  color: var(--ink); background: linear-gradient(180deg, #0a1622, #050c14); border: 1px solid rgba(0, 229, 255, .35);
  border-radius: 16px; box-shadow: 0 0 40px rgba(0, 229, 255, .25);
}
dialog.comp::backdrop { background: rgba(0, 4, 8, .75); backdrop-filter: blur(4px); }
.comp-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.comp-h h2 { margin: 0; font-size: 15px; }
.comp-x { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 16px; cursor: pointer; }
.comp-corpo { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; padding: 16px; align-items: start; }
.comp-prev { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #03060b; border: 1px solid var(--line); }
.comp-prev img, .comp-prev video { display: block; width: 100%; height: 100%; object-fit: contain; }
.comp-gerando {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  font: 700 13px var(--mono, monospace); color: var(--accent, #00e5ff); background: rgba(3, 6, 11, .82);
}
.comp-acoes { display: grid; gap: 10px; align-content: start; }
.comp-seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.comp-seg button { flex: 1; min-height: 40px; border: 0; border-radius: 8px; cursor: pointer; font: 600 12px var(--mono, monospace); background: transparent; color: var(--ink-2); }
.comp-seg button[aria-pressed="true"] { background: var(--accent, #00e5ff); color: var(--on-accent, #00151b); }
.comp-bt {
  display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 14px; border-radius: 10px; cursor: pointer;
  font: 700 13px var(--mono, monospace); text-decoration: none; color: var(--ink); background: rgba(0, 229, 255, .06); border: 1px solid var(--line);
}
.comp-bt:hover { border-color: var(--accent, #00e5ff); }
.comp-bt:disabled { opacity: .5; cursor: wait; }
.comp-bt.pri { color: #fff; border: 0; background: linear-gradient(90deg, #833ab4, #fd1d1d 55%, #fcb045); box-shadow: 0 0 18px rgba(253, 29, 29, .35); }
.comp-bt.wpp { color: #fff; border: 0; background: #1fa855; }
.comp-dica { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-2); white-space: pre-line; }
@media (max-width: 640px) {
  .comp-corpo { grid-template-columns: minmax(0, 1fr); }
  .comp-prev { width: min(100%, 260px); margin: 0 auto; }
}

/* ---------- Modo TV, 2ª versão: tudo na coluna da parcial é medido pela própria coluna (cqi),
   então nada estoura em TV pequena nem fica miúdo em TV grande ---------- */
.tv-rodape { display: none; }
body.tv .layout { height: calc(100vh - var(--header-h) - 64px); grid-template-columns: minmax(400px, 33vw) minmax(0, 1fr) !important; }
body.tv .pres { container-type: inline-size; justify-content: space-evenly; gap: 0; padding: clamp(16px, 3cqi, 32px); }
body.tv .pres > * { margin-top: 0; margin-bottom: 0; }
body.tv .kicker { font-size: clamp(11px, 3.4cqi, 22px); }
body.tv .pres h1 { font-size: clamp(20px, 6.5cqi, 48px); margin: 0; }
body.tv .duelo { padding: 4cqi 3cqi 3cqi; }
body.tv .duelo-lados { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 2cqi; align-items: start; }
body.tv .duelo-x { align-self: center; margin-top: -8cqi; font-size: clamp(12px, 3.6cqi, 26px); }
body.tv .duelo-ph { width: 25cqi; height: 25cqi; }
body.tv .duelo-n { font-size: clamp(12px, 3.9cqi, 28px); white-space: normal; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; }
body.tv .duelo-p { font-size: clamp(26px, 10.5cqi, 88px); letter-spacing: -.02em; }
body.tv .duelo-v { font-size: clamp(11px, 3.4cqi, 24px); }
body.tv .duelo-bar { height: clamp(14px, 3.6cqi, 30px); margin-top: 3cqi; }
body.tv .duelo-dif { font-size: clamp(12px, 3.6cqi, 26px); margin-top: 2cqi; }
body.tv .prog { margin: 0; }
body.tv .prog-top b { font-size: clamp(26px, 10cqi, 80px); }
body.tv .prog-top div { font-size: clamp(13px, 3.8cqi, 28px); }
body.tv .prog-top span { font-size: clamp(11px, 3cqi, 20px); }
body.tv .track { height: clamp(8px, 2cqi, 16px); }
body.tv .banner { font-size: clamp(12px, 3.1cqi, 22px); padding: 2cqi 3cqi; }
body.tv .nota-soma { font-size: clamp(11px, 3cqi, 20px); }
body.tv .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2cqi; margin: 0; }
body.tv .stat { padding: 2cqi 3cqi; min-width: 0; }
body.tv .stat span { font-size: clamp(11px, 3cqi, 20px); }
body.tv .stat b { font-size: clamp(14px, 5.2cqi, 40px); white-space: nowrap; }
body.tv .stat small { display: none; }

/* faixa inferior do telão */
body.tv .tv-rodape {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 64px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font: 700 clamp(14px, 1.3vw, 26px) var(--mono, monospace); color: var(--ink);
  background: linear-gradient(90deg, rgba(0, 229, 255, .14), rgba(3, 6, 11, .96) 30%, rgba(3, 6, 11, .96) 70%, rgba(0, 229, 255, .14));
  border-top: 1px solid rgba(0, 229, 255, .45); box-shadow: 0 -6px 30px rgba(0, 229, 255, .18);
}
.tv-ao-vivo { display: inline-flex; align-items: center; gap: 10px; color: #ff6b85; letter-spacing: .12em; }
.tv-ao-vivo .live { width: 12px; height: 12px; }
.tv-link { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-link b { color: #00e5ff; text-shadow: 0 0 12px rgba(0, 229, 255, .7); }
.tv-hora { color: var(--ink-2); white-space: nowrap; }
.tv-hora b { color: #fff; font-size: 1.25em; }
body.tv .tv-sair { bottom: 76px; }
@media (max-width: 900px) { body.tv .tv-ao-vivo, body.tv .tv-hora { display: none; } }

/* ---------- Páginas de análise e resultados no tema futurista ---------- */
body.cyber.rel .rel-main, body.cyber.res .res-main { position: relative; z-index: 1; }
body.cyber .rel-main.largo { max-width: 1240px; }
body.cyber .rel-main table th, body.cyber .res table th { color: var(--ink-2); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
body.cyber .rel-main table td, body.cyber .res table td { border-bottom-color: rgba(0, 229, 255, .1); }
body.cyber .rel-main tbody tr:hover, body.cyber .res tbody tr:hover { background: rgba(0, 229, 255, .04); }
body.cyber .stat small { display: block; margin: 2px 0 0; font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
body.cyber .cor-f { color: var(--s6); text-shadow: 0 0 12px rgba(25, 242, 140, .45); }
body.cyber .cor-l { color: var(--s8); text-shadow: 0 0 12px rgba(255, 46, 85, .45); }
body.cyber .abas a { font-family: var(--mono); font-size: 12px; background: rgba(0, 0, 0, .3); border-color: var(--line); color: var(--ink-2); }
body.cyber .abas a[aria-current="page"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(0, 229, 255, .45); }
body.cyber .voltar { font-family: var(--mono); border-color: var(--line) !important; color: var(--ink) !important; background: rgba(0, 229, 255, .06) !important; }

/* gráfico do comparativo: Flávio verde, Lula vermelho; 2022 em tons claros */
body.cyber .grafico .grade { stroke: rgba(0, 229, 255, .1); }
body.cyber .grafico .meio { stroke: rgba(255, 255, 255, .45); stroke-dasharray: 6 4; }
body.cyber .grafico .l22.dir { stroke: #8fe6bd; opacity: .75; } body.cyber .grafico .l22.esq { stroke: #f7a0ae; opacity: .75; }
body.cyber .grafico .l26.dir { stroke: var(--s6); filter: drop-shadow(0 0 4px rgba(25, 242, 140, .6)); }
body.cyber .grafico .l26.esq { stroke: var(--s8); filter: drop-shadow(0 0 4px rgba(255, 46, 85, .6)); }
body.cyber .grafico .p26.dir { fill: var(--s6); } body.cyber .grafico .p26.esq { fill: var(--s8); }
body.cyber .grafico .p26 { stroke: #03060b; }
body.cyber .grafico .agora { stroke: #ffc400; filter: drop-shadow(0 0 4px rgba(255, 196, 0, .7)); }
body.cyber .legenda .dir26 { border-color: var(--s6); } body.cyber .legenda .esq26 { border-color: var(--s8); }
body.cyber .legenda .dir22 { border-color: #8fe6bd; } body.cyber .legenda .esq22 { border-color: #f7a0ae; }

/* 2º turno: estado a estado */
.dupla { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
@media (max-width: 860px) { .dupla { grid-template-columns: minmax(0, 1fr); } }
.mapa-box { position: sticky; top: calc(var(--header-h) + 12px); }
.mapa-var { display: block; width: 100%; height: auto; }
.mapa-var .mv { fill: #0f2232; stroke: rgba(0, 229, 255, .7); stroke-width: .5; transition: fill-opacity .4s; }
.mapa-var .mv:hover { stroke: #fff; stroke-width: 1.2; }
.mapa-var .mv-rot { font: 700 5px ui-monospace, Consolas, monospace; fill: #e8fbff; text-anchor: middle; dominant-baseline: middle; pointer-events: none; paint-order: stroke; stroke: rgba(0, 0, 0, .75); stroke-width: 1.1px; }
.sw-v { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw-v.l { background: var(--s8); } .sw-v.f { background: var(--s6); }
.mapa-box .legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
tr.virou td { background: rgba(255, 196, 0, .06); }
.virada-tag { color: #ffc400; }
.sobe-l { color: var(--s8); } .sobe-f { color: var(--s6); }

/* ---------- Plenário (sala em semicírculo com cadeiras) ---------- */
.plenario { margin: 6px auto 16px; max-width: 760px; }
.plenario svg { display: block; width: 100%; height: auto; overflow: visible; }
.ple-piso { fill: none; stroke: rgba(0, 229, 255, .35); stroke-width: .006; filter: drop-shadow(0 0 .02px #00e5ff); }
.ple-p circle { transition: opacity .2s; }
.ple-p:hover circle { filter: drop-shadow(0 0 .025px var(--c)); }
.plenario svg:hover .ple-p:not(:hover) circle { opacity: .35; }
.ple-vazia circle { fill: rgba(0, 229, 255, .07); stroke: rgba(0, 229, 255, .28); stroke-width: .003; }
.ple-n { font: 800 .2px ui-monospace, Consolas, monospace; fill: #fff; text-anchor: middle; }
.ple-de { font: 600 .055px ui-monospace, Consolas, monospace; fill: var(--ink-2); text-anchor: middle; letter-spacing: .002px; }
.ple-leg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.ple-leg span { display: inline-flex; align-items: center; gap: 6px; }
.ple-leg b { color: var(--ink); font-family: ui-monospace, Consolas, monospace; }
.ple-leg i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: 0 0 6px currentColor; }
.ple-leg i.vz { background: rgba(0, 229, 255, .1); box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .4); }
.ple-leg .mais { font-style: italic; }
.sw-p { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
body.cyber .res table.bancada .barra i { box-shadow: 0 0 8px rgba(255, 255, 255, .15); }

/* Resumo das bancadas: os quatro plenários lado a lado */
.ple-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 12px 0 16px; }
.ple-mini { display: block; padding: 12px 12px 6px; border-radius: 12px; text-decoration: none; color: inherit; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.ple-mini:hover { border-color: var(--accent); box-shadow: 0 0 18px rgba(0, 229, 255, .25); }
.ple-mini h3 { margin: 0 0 4px; font: 700 11px var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ple-mini .plenario { margin: 0; }

/* =====================================================================
   Celular: correções da varredura
   ===================================================================== */

/* Barra compacta do Presidente flutua por cima (antes ela ocupava espaço, empurrava a página e o
   aparece/some ficava em ciclo, fazendo a tela tremer no iPhone) */
body.cyber .mini { position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 29; margin: 0; }

/* Mapa no toque: um dedo rola a página, dois dedos são do mapa; aviso e cartão com "Ver detalhes" */
#mapaSvg { touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.map-aviso {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none;
  padding: 10px 14px; border-radius: 10px; font: 600 13px var(--mono, monospace); text-align: center; color: #fff;
  background: rgba(2, 8, 14, .88); border: 1px solid rgba(0, 229, 255, .5); opacity: 0; transition: opacity .25s;
}
.map-aviso.ver { opacity: 1; }
.map-tip.toque {
  left: 12px !important; right: 12px; width: auto; transform: translateY(-100%); pointer-events: auto;
  padding: 12px 44px 12px 14px; font-size: 13px;
}
.map-tip .tip-x {
  position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 14px;
}
.map-tip .tip-ver {
  margin-top: 6px; justify-self: start; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 0; cursor: pointer;
  font: 700 12px var(--mono, monospace); letter-spacing: .04em; color: var(--on-accent, #00151b); background: var(--accent, #00e5ff);
}

/* Janela de compartilhar em tela cheia no celular: título fixo, prévia menor, botões sempre à vista */
html:has(dialog.comp[open]) { overflow: hidden; }
@media (max-width: 640px) {
  dialog.comp { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; overscroll-behavior: contain; }
  .comp-h { position: sticky; top: 0; z-index: 3; padding: 10px 12px; background: #0a1622; }
  .comp-h h2 { font-size: 13px; }
  .comp-corpo { gap: 12px; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }
  .comp-prev { width: auto; height: min(46dvh, 440px); aspect-ratio: 9 / 16; margin: 0 auto; }
  .comp-acoes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .comp-acoes .comp-seg, .comp-acoes .comp-bt.pri, .comp-acoes .comp-bt.wpp, .comp-acoes .comp-dica { grid-column: 1 / -1; }
  .comp-bt { min-height: 46px; padding: 8px 10px; font-size: 12px; text-align: center; }
  .comp-seg button { min-height: 42px; }
}

/* Telas bem estreitas (Android de 360 px e menores) */
@media (max-width: 380px) {
  body.cyber .brand strong { font-size: 13px; letter-spacing: .03em; }
  body.cyber .turnos button { padding: 4px 7px; }
  .duelo-p { font-size: 26px; }
  .duelo-ph { width: 56px; height: 56px; }
  .duelo-n { font-size: 11px; }
  body.cyber .seg button { font-size: 10px; padding: 6px 3px; }
  .enq-op { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 12px; }
  .enq-ph { width: 42px; height: 42px; }
  .enq-p { font-size: 19px; }
}

/* Visão "Brasil": países vizinhos neutros e sem interação (as cores do exterior ficam para a visão "Mundo") */
#mapaSvg.so-br .pais { fill: #112331 !important; fill-opacity: 1 !important; stroke: rgba(0, 229, 255, .22); pointer-events: none; cursor: default; }

/* =====================================================================
   Versão de parceiro (/netprime): só 2º turno, sem chat e sem enquete,
   logos dos parceiros se alternando no topo
   ===================================================================== */
body.parceiro #chat, body.parceiro #chatShow, body.parceiro #enquete, body.parceiro #turnos { display: none !important; }
body.parceiro.cyber .layout,
body.parceiro.cyber.chat-off .layout {
  grid-template-columns: minmax(330px, 380px) minmax(0, 1fr);
  grid-template-areas: "pres centro" "pres detalhe" "pres foot";
}
@media (max-width: 960px) {
  body.parceiro.cyber .layout,
  body.parceiro.cyber.chat-off .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pres" "centro" "detalhe" "foot"; }
}

.parc-logos { position: relative; flex: 0 0 auto; width: 170px; height: 46px; margin: 0 6px; }
.parc-logos img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center;
  opacity: 0; animation: parc-roda calc(var(--n-logos, 3) * 4s) linear infinite; animation-delay: calc(var(--i) * 4s);
}
/* cada logo aparece 4 s (um terço do ciclo de 12 s), com transição suave */
@keyframes parc-roda { 0% { opacity: 0; } 3% { opacity: 1; } 30% { opacity: 1; } 33.4% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .parc-logos img { animation-duration: calc(var(--n-logos, 3) * 6s); } }
@media (max-width: 960px) { .parc-logos { width: 120px; height: 36px; margin: 0 2px; } }
@media (max-width: 380px) { .parc-logos { width: 96px; height: 30px; } }
body.tv .parc-logos { width: 220px; height: 56px; }

/* Governador de um estado na versão de parceiro (card acima do mapa) */
.gov .gov-tit { margin: 2px 0 12px; font: 800 clamp(22px, 2.2vw, 30px) var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; }
.gov .gov-corpo { display: grid; gap: 16px; }
.gov .gov-lado { display: grid; gap: 10px; align-content: center; }
@media (min-width: 1100px) {
  .gov .gov-corpo { grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); align-items: center; }
}
/* Modo TV com governador: Presidente | Governador | mapa, os dois placares no mesmo tamanho */
body.tv.parceiro .layout { grid-template-columns: minmax(360px, 30vw) minmax(0, 1fr) !important; }
body.tv #gov.aberto {
  container-type: inline-size; height: 100%; min-height: 0; overflow: hidden; margin: 0;
  display: flex; flex-direction: column; justify-content: space-evenly; padding: clamp(16px, 3cqi, 32px);
}
body.tv #gov > * { margin-top: 0; margin-bottom: 0; }
body.tv #gov .gov-tit { font-size: clamp(20px, 6.5cqi, 48px); margin: 0; }
body.tv #gov .gov-corpo { grid-template-columns: minmax(0, 1fr); gap: 3cqi; }
body.tv #gov .gov-lado { gap: 2cqi; }
.gov .duelo-n { white-space: normal; overflow: visible; text-overflow: clip; text-align: center; line-height: 1.2; }

/* Logo da Simples Internet no cabeçalho da página principal (nos parceiros ela entra no rodízio de logos) */
.marca-simples { display: flex; align-items: center; flex: 0 0 auto; height: 46px; margin: 0 6px; }
.marca-simples img { display: block; height: 38px; width: auto; max-width: 170px; object-fit: contain; }
body.parceiro .marca-simples { display: none; }
body.tv .marca-simples { height: 56px; }
body.tv .marca-simples img { height: 48px; max-width: 220px; }
@media (max-width: 960px) { .marca-simples { height: 36px; margin: 0 2px; } .marca-simples img { height: 28px; max-width: 120px; } }
@media (max-width: 380px) { .marca-simples img { height: 24px; max-width: 96px; } }
/* celular: "1º" e "2º" no seletor de turno, para a logo da Simples caber no cabeçalho */
@media (max-width: 600px) { .turnos .t-txt { display: none; } body.cyber .turnos button { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 380px) {
  body.cyber header.top { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .marca-simples { flex: 0 1 auto; min-width: 0; margin: 0; }
  .marca-simples img { max-width: 100%; height: auto; max-height: 24px; }
}

/* Governador na página principal: faixa de estados (fechado) e placar (aberto) */
.gov .gov-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.gov .gov-barra-t { display: flex; align-items: center; gap: 10px; font: 700 14px var(--mono, monospace); letter-spacing: .04em; }
.gov .gov-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gov .gov-chips button {
  min-width: 46px; min-height: 36px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  font: 700 13px var(--mono, monospace); letter-spacing: .06em; color: var(--ink);
  background: rgba(0, 229, 255, .06); border: 1px solid rgba(0, 229, 255, .35);
}
.gov .gov-chips button:hover { background: rgba(0, 229, 255, .16); }
.gov .gov-chips button[aria-pressed="true"] { color: var(--on-accent, #00151b); background: var(--accent, #00e5ff); border-color: transparent; }
.gov:not(.aberto) { padding-top: 12px; padding-bottom: 12px; }
.gov .gov-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gov.aberto .gov-chips { margin: 0 0 14px; }
.gov .gov-x { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 15px; }
.map-tip .tip-bts { display: flex; flex-wrap: wrap; gap: 8px; }

/* Modo TV: na página principal o governador só aparece se um estado estiver aberto (sem a faixa de escolha) */
body.tv #gov:not(.aberto), body.tv #gov .gov-x { display: none !important; }
/* no telão as siglas viram o indicador do rodízio (estado da vez em destaque) */
body.tv #gov .gov-chips { gap: 1.2cqi; margin: 0; flex-wrap: nowrap; }
body.tv #gov .gov-chips button { min-width: 0; min-height: 0; flex: 1; padding: 1cqi 0; font-size: clamp(10px, 3.2cqi, 20px); }
@keyframes gov-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#gov.troca .gov-h, #gov.troca .gov-corpo { animation: gov-entra .55s ease-out; }
@media (prefers-reduced-motion: reduce) { #gov.troca .gov-h, #gov.troca .gov-corpo { animation: none; } }
body.tv .centro:has(> #gov.aberto) { grid-template-columns: minmax(360px, 30vw) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#gov, #detalhe { scroll-margin-top: calc(var(--header-h) + 52px); }

/* Assinatura do projeto (rodapé de todas as páginas; no telão vai na faixa de baixo) */
.assinatura {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
  font: 600 12px var(--mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted, #7d98a3);
}
.assinatura a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent, #00e5ff); text-decoration: none; text-transform: none; letter-spacing: .04em; }
.assinatura a b { font-size: 14px; }
.assinatura a:hover, .assinatura a:focus-visible { text-decoration: underline; }
body.tv .assinatura { display: none; }
.tv-assin { font: 600 clamp(11px, .8vw, 16px) var(--mono, monospace); letter-spacing: .06em; color: var(--muted, #7d98a3); }
.tv-assin b { color: var(--accent, #00e5ff); }
@media (max-width: 1200px) { .tv-assin { display: none; } }

/* Gestão do chat na página (moderador principal) */
.chat-gerir { border-color: rgba(255, 200, 0, .55) !important; color: #ffd84d !important; }
.chat-gerir.on { background: rgba(255, 200, 0, .14) !important; }
.chat-painel {
  display: grid; gap: 8px; padding: 10px 12px; max-height: 45%; overflow: auto;
  border-bottom: 1px solid var(--line); background: rgba(255, 200, 0, .05);
  font-size: 13px;
}
.chat-painel[hidden] { display: none; }
.chat-painel .cp-linha { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-painel button {
  font: 700 11px var(--mono, monospace); letter-spacing: .04em; padding: 6px 10px; min-height: 32px; border-radius: 7px; cursor: pointer;
  border: 1px solid rgba(255, 46, 85, .55); background: transparent; color: #ff8aa0;
}
.chat-painel button.ok { border-color: rgba(0, 229, 255, .55); color: #7cf4ff; }
.chat-painel button:hover { filter: brightness(1.3); }
.chat-painel .cp-pausado { color: #ff8aa0; }
.chat-painel .cp-aberto { color: #19f28c; }
.chat-painel .cp-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chat-painel .cp-lista li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.chat-painel .cp-lista small { display: block; color: var(--muted, #7d98a3); font-size: 11px; }
.chat-painel .cp-vazio, .chat-painel .cp-dica { margin: 0; color: var(--muted, #7d98a3); font-size: 12px; }

/* =====================================================================
   Enquete compacta: botão flutuante + painel; a coluna dela vai para o mapa
   ===================================================================== */
.dock { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 10px; flex-wrap: wrap-reverse; justify-content: flex-end; max-width: calc(100vw - 32px); }
.dock .chat-abrir { position: static; }
.dock .chat-abrir[hidden] { display: none; }
.enq-abrir { border-color: rgba(255, 200, 0, .6); box-shadow: 0 0 22px rgba(255, 200, 0, .22); }
.enq-abrir svg { color: #ffd84d; }
.enq-abrir.pulsa { animation: enq-pulsa 2.4s ease-in-out infinite; }
@keyframes enq-pulsa { 0%, 100% { box-shadow: 0 0 10px rgba(255, 200, 0, .2); } 50% { box-shadow: 0 0 30px rgba(255, 200, 0, .6); } }
@media (prefers-reduced-motion: reduce) { .enq-abrir.pulsa { animation: none; } }
body.enq-aberta .enq-abrir { background: rgba(255, 200, 0, .16); }

/* o card da enquete só aparece como painel flutuante, ao abrir pelo botão */
body.cyber #enquete { display: none !important; }
body.cyber.enq-aberta #enquete:not([hidden]) {
  display: block !important; position: fixed; z-index: 46; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - var(--header-h) - 110px); overflow: auto; margin: 0;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 200, 0, .25);
}
body.cyber.enq-aberta #enquete .enq-ops { grid-template-columns: minmax(0, 1fr); }
#enquete .enq-x {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; z-index: 2;
  border: 1px solid var(--line); background: rgba(3, 8, 14, .8); color: var(--ink); font-size: 14px;
}
#enquete .card-h { padding-right: 44px; }
body.tv .dock, body.parceiro #enqBt { display: none !important; }

/* sem a coluna da enquete: o mapa ocupa o espaço */
body.cyber .layout { grid-template-areas: "pres centro chat" "pres detalhe chat" "pres foot chat"; }
body.cyber.chat-off .layout { grid-template-columns: minmax(330px, 380px) minmax(0, 1fr); grid-template-areas: "pres centro" "pres detalhe" "pres foot"; }
@media (max-width: 1399px) {
  body.cyber .layout { grid-template-areas: "pres centro" "pres chat" "pres detalhe" "pres foot"; }
  body.cyber.chat-off .layout { grid-template-areas: "pres centro" "pres detalhe" "pres foot"; }
}
@media (max-width: 960px) {
  body.cyber .layout { grid-template-areas: "pres" "centro" "chat" "detalhe" "foot"; }
  body.cyber.chat-off .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pres" "centro" "detalhe" "foot"; }
}
body.cyber.enq-aberta #enquete:not([hidden]) { background: linear-gradient(180deg, #0b1a28, #060f18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* =====================================================================
   Rádio ao vivo (Você FM Santana do Araguaia): botão no canto + painel
   ===================================================================== */
.radio-abrir { border-color: rgba(25, 242, 140, .55); box-shadow: 0 0 22px rgba(25, 242, 140, .2); }
.radio-abrir svg { color: #19f28c; }
body.radio-on .radio-abrir { background: rgba(25, 242, 140, .14); animation: radio-brilho 2.6s ease-in-out infinite; }
@keyframes radio-brilho { 0%, 100% { box-shadow: 0 0 10px rgba(25, 242, 140, .2); } 50% { box-shadow: 0 0 28px rgba(25, 242, 140, .55); } }
body.cyber .radio-painel, .radio-painel {
  position: fixed; z-index: 46; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 32px)); margin: 0; padding: 16px;
  background: linear-gradient(180deg, #0b1a28, #060f18) !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(25, 242, 140, .25);
}
.radio-painel[hidden] { display: none; }
.radio-painel .card-h { padding-right: 44px; margin-bottom: 12px; }
.radio-est { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.radio-play {
  width: 58px; height: 58px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  border: 0; color: #00151b; background: #19f28c; box-shadow: 0 0 24px rgba(25, 242, 140, .45);
}
.radio-play .i-pausa, body.radio-on .radio-play .i-play { display: none; }
body.radio-on .radio-play .i-pausa { display: block; }
.radio-info { display: grid; gap: 2px; min-width: 0; }
.radio-info b { font: 800 18px var(--mono, monospace); letter-spacing: .04em; }
.radio-info span { color: var(--ink-2, #b8ccd4); font-size: 14px; }
.radio-info small { color: var(--muted, #7d98a3); font-size: 12px; }
.radio-ondas { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; opacity: .25; }
.radio-ondas i { width: 4px; height: 30%; border-radius: 2px; background: #19f28c; }
body.radio-on .radio-ondas { opacity: 1; }
body.radio-on .radio-ondas i { animation: radio-onda 1s ease-in-out infinite; }
.radio-ondas i:nth-child(2) { animation-delay: -.3s !important; }
.radio-ondas i:nth-child(3) { animation-delay: -.6s !important; }
.radio-ondas i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes radio-onda { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { body.radio-on .radio-ondas i, body.radio-on .radio-abrir { animation: none; } }
.radio-vol { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--ink-2, #b8ccd4); }
.radio-vol input { flex: 1; accent-color: #19f28c; }
.radio-cred { margin: 12px 0 0; font-size: 12px; color: var(--muted, #7d98a3); }
.radio-cred a { color: var(--accent, #00e5ff); }
body.tv .radio-painel, body.parceiro #radioBt, body.parceiro #radio { display: none !important; }
/* celular: rótulos curtos nos botões do canto ("Rádio", "Enquete", "Chat"), todos numa linha */
@media (max-width: 560px) {
  .dock .txt-lg { display: none; }
  .dock { gap: 8px; flex-wrap: nowrap; }
  .dock .chat-abrir { padding: 10px 13px; gap: 6px; letter-spacing: .06em; }
}
