/* Mapa da apuração — mesmo universo visual do painel principal */
:root {
  --bg: #090d12; --bg-2: #0d1319; --surface: #111922; --surface-2: #17212c; --surface-3: #1e2b38;
  --line: #243242; --line-soft: #1a2530;
  --text: #eef0ea; --text-2: #a9b4bf; --text-3: #75828f;
  --gold: #f5c542; --green: #35d489; --red: #ff6b5e; --warn: #f0a93a;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --top: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(900px 500px at 85% -10%, rgba(245,197,66,.06), transparent 60%), radial-gradient(700px 500px at -10% 20%, rgba(74,168,255,.05), transparent 60%), var(--bg); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- topo ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: rgba(9,13,18,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 18px var(--font-display); white-space: nowrap; }
.brand b { font-weight: 800; color: var(--gold); }
.brand__mark { width: 28px; height: 28px; border-radius: 8px; background: var(--gold); color: #1a1405; display: grid; place-items: center; flex: none; }
.brand__mark svg { width: 18px; height: 18px; }
.back { text-decoration: none; color: var(--text-2); font-size: 13px; padding: 6px 10px; border-radius: 99px; white-space: nowrap; }
.back:hover { background: var(--surface-2); color: var(--text); }
.tabs { display: flex; gap: 4px; margin-left: 4px; }
.tab { border: 0; background: transparent; color: var(--text-2); padding: 6px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 500; }
.tab.is-on { background: var(--surface-3); color: var(--text); }
.search { position: relative; display: flex; align-items: center; gap: 8px; margin-left: auto; width: min(320px, 34vw); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 12px; transition: border-color .15s var(--ease); }
.search:focus-within { border-color: var(--gold); }
.search svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; padding: 9px 0; outline: none; }
.search kbd { font: 500 10.5px var(--font-mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.search__res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 24px 60px -20px rgba(0,0,0,.8); max-height: 340px; overflow: auto; z-index: 40; }
.search__res li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.search__res li:hover, .search__res li[aria-selected="true"] { background: var(--surface-3); }
.search__res small { color: var(--text-3); font-family: var(--font-mono); }
.status { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; white-space: nowrap; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); position: relative; flex: none; }
.status[data-s="live"] { color: var(--green); border-color: rgba(53,212,137,.3); }
.status[data-s="live"] .dot { background: var(--green); }
.status[data-s="live"] .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); animation: pulse 1.8s var(--ease) infinite; }
.status[data-s="wait"] { color: var(--gold); border-color: rgba(245,197,66,.3); }
.status[data-s="wait"] .dot { background: var(--gold); }
@keyframes pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn svg { width: 16px; height: 16px; }

/* ---------- grade ---------- */
.grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; gap: 12px; padding: 12px; height: calc(100dvh - var(--top)); }
.col { min-width: 0; min-height: 0; }
.col--l, .col--r { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; display: flex; flex-direction: column; gap: 12px; }
.col--m { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 16px; }
.eyebrow { font: 600 11px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.card h2 { font: 700 20px/1.15 var(--font-display); letter-spacing: -.02em; }
.card .sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }

/* candidatos */
.cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px; margin: 16px 0; }
.cc { text-align: center; min-width: 0; --c: var(--gold); }
.cc__ph { width: 58px; height: 58px; border-radius: 50%; margin: 0 auto; border: 3px solid var(--c); padding: 2px; background: var(--bg-2); position: relative; overflow: hidden; }
.cc__ph img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top; position: relative; }
.cc__ph b { position: absolute; inset: 2px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font: 700 15px var(--font-display); }
.cc__l { margin-top: 6px; font: 600 10.5px var(--font-mono); letter-spacing: .02em; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc__l i { font-style: normal; color: var(--c); }
.cc__n { font-size: 11.5px; color: var(--text-3); line-height: 1.2; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc__p { font: 600 12px var(--font-mono); margin-top: 2px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 13px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.kv span { color: var(--text-2); }
.kv b { font: 600 13px var(--font-mono); letter-spacing: -.03em; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); transform-origin: left; transition: transform .8s var(--ease); border-radius: 99px; }

/* regiões */
.reg { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); --c: var(--text-3); }
.reg:first-of-type { border-top: 0; }
.reg__ph { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--c); background: var(--bg-2); overflow: hidden; grid-row: span 2; position: relative; }
.reg__ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: relative; }
.reg__ph b { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface-3); font: 700 13px var(--font-display); color: var(--text-2); }
.reg__n { font: 700 14px var(--font-display); }
.reg__lead { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg__pct { font: 700 20px var(--font-mono); letter-spacing: -.05em; color: var(--c); text-align: right; grid-row: span 2; }
.reg__ap { grid-column: 1 / -1; margin-top: 8px; }
.reg__ap .bar { height: 4px; }
.reg__ap p { font-size: 11.5px; color: var(--text-3); margin-top: 4px; font-family: var(--font-mono); }

/* detalhe do município */
.dback { background: none; border: 0; padding: 0; color: var(--gold); font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dhead h2 { font-size: 24px; }
.chip { font: 600 11px var(--font-mono); padding: 4px 10px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip--on { background: rgba(53,212,137,.15); color: var(--green); }
.chip--wait { background: rgba(245,197,66,.15); color: var(--gold); }
.chip--end { background: rgba(74,168,255,.15); color: #4aa8ff; }
.dprog { margin: 14px 0; font-size: 13px; color: var(--text-2); }
.dprog .bar { margin-top: 8px; }
.drow { --c: var(--gold); display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 0; }
.drow .ph { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--c); overflow: hidden; background: var(--surface-3); grid-row: span 2; position: relative; }
.drow .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: relative; }
.drow .ph b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 11px var(--font-display); color: #fff; background: var(--c); }
.drow__n { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow__n small { color: var(--text-3); font-weight: 500; margin-left: 6px; font-family: var(--font-mono); font-size: 11px; }
.drow__p { font: 700 15px var(--font-mono); letter-spacing: -.04em; color: var(--c); text-align: right; }
.drow .bar { grid-column: 2 / 4; height: 7px; }
.drow .bar > i { background: var(--c); }
.drow__v { grid-column: 2 / 4; font: 500 11.5px var(--font-mono); color: var(--text-3); margin-top: 2px; }
.d22 { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--text-2); }
.d22 b { font-weight: 600; }
.cta { display: block; margin-top: 14px; text-align: center; text-decoration: none; padding: 10px; border-radius: 99px; background: var(--gold); color: #1a1405; font-weight: 600; font-size: 13.5px; }
.cta:hover { filter: brightness(1.08); }
.empty { color: var(--text-2); font-size: 13px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r-md); text-align: center; }

/* ---------- mapa ---------- */
.mbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 99px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 99px; color: var(--text-2); font-weight: 500; font-size: 13px; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--text-3); }
.crumbs button { background: var(--surface); border: 1px solid var(--line-soft); color: var(--text-2); border-radius: 99px; padding: 4px 11px; font-size: 12.5px; }
.crumbs button:hover { background: var(--surface-3); color: var(--text); }
.crumbs button[aria-current="true"] { color: var(--text); border-color: var(--line); cursor: default; }
.map { position: relative; flex: 1; min-height: 0; border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: radial-gradient(circle at 50% 40%, #101821, var(--bg-2)); overflow: hidden; }
.map canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.map canvas.is-drag { cursor: grabbing; }
.map canvas.is-hot { cursor: pointer; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 4px; padding: 1px 5px; border-radius: 6px; background: rgba(9,13,18,.72); border: 1px solid rgba(255,255,255,.08); font: 600 10.5px var(--font-mono); letter-spacing: -.02em; white-space: nowrap; will-change: transform; transform-origin: 0 0; }
.lbl i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.lbl em { font-style: normal; color: var(--text-2); font-weight: 500; }
.zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: rgba(17,25,34,.9); color: var(--text); font-size: 20px; line-height: 1; display: grid; place-items: center; padding: 0; }
.zoom button:hover { background: var(--surface-3); }
.zoom svg { width: 17px; height: 17px; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 190px; max-width: 280px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(13,19,25,.96); border: 1px solid var(--line); box-shadow: 0 18px 40px -16px rgba(0,0,0,.8); font-size: 12.5px; }
.tip__h { font: 700 14px var(--font-display); }
.tip__h small { font: 500 11px var(--font-mono); color: var(--text-3); margin-left: 6px; }
.tip__s { color: var(--text-3); font: 500 11.5px var(--font-mono); margin-top: 2px; }
.tip__l { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-weight: 600; }
.tip__l i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.tip__l span { margin-left: auto; font-family: var(--font-mono); }
.tip__y { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 11.5px; }
.tip__w { margin-top: 6px; color: var(--text-2); }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); font-size: 13px; background: var(--bg-2); transition: opacity .3s var(--ease); }
.loading.is-off { opacity: 0; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12.5px; color: var(--text-2); padding: 2px 4px; min-height: 22px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend b { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.legend .ramp { width: 160px; height: 8px; border-radius: 99px; }
.legend .live { margin-left: auto; color: var(--green); }
.legend .live i { border-radius: 50%; background: var(--green); width: 8px; height: 8px; }

/* ---------- responsivo ---------- */
@media (max-width: 1099px) {
  .grid { grid-template-columns: minmax(0, 1fr); height: auto; }
  .col--m { order: 1; }
  .col--l { order: 2; overflow: visible; }
  .col--r { order: 3; overflow: visible; }
  .map { flex: none; height: min(62vh, 560px); }
  .col--r.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; max-height: 62dvh; overflow-y: auto; background: var(--bg-2); border-top: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -24px 60px -20px rgba(0,0,0,.85); padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); animation: sheet .24s var(--ease); }
  .col--r.is-sheet::before { content: ""; width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 4px; flex: none; }
  .col--r.is-sheet .card { border: 0; padding: 0; background: none; }
  @keyframes sheet { from { transform: translateY(100%); } }
}
@media (max-width: 760px) {
  .top { gap: 8px; padding: 0 10px; flex-wrap: wrap; height: auto; min-height: var(--top); padding-top: 8px; padding-bottom: 8px; }
  .brand__t, .btn span, .search kbd, .status #statusTxt { display: none; }
  .status { padding: 8px; }
  .search { order: 9; width: 100%; margin: 0; flex: 1 1 100%; }
  .btn { width: 34px; padding: 0; justify-content: center; }
  .grid { padding: 8px; }
  .map { height: 58vh; }
  .cgrid { grid-template-columns: repeat(4, 1fr); }
  .zoom button { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media (max-width: 760px) { .lbl em { display: none; } .lbl { padding: 1px 4px; font-size: 10px; } }

/* ---------- governadores ---------- */
.tab { cursor: pointer; }
.tab:hover { color: var(--text); }
.gsvg, .gmarks, .glegend { display: none; }
body[data-view="governadores"] .gsvg, body[data-view="governadores"] .gmarks, body[data-view="senado"] .gsvg, body[data-view="senado"] .gmarks, body[data-view="deputados"] .gsvg, body[data-view="deputados"] .gmarks { display: block; }
body[data-view="governadores"] .glegend, body[data-view="senado"] .glegend, body[data-view="deputados"] .glegend { display: flex; }
body[data-view="governadores"] #modes, body[data-view="governadores"] .labels, body[data-view="senado"] #modes, body[data-view="senado"] .labels, body[data-view="deputados"] #modes, body[data-view="deputados"] .labels { display: none; }
.gsvg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gmarks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glegend { position: absolute; left: 10px; top: 10px; right: 56px; z-index: 3; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 6px 12px; border-radius: 12px; background: rgba(13,19,25,.82); border: 1px solid var(--line-soft); backdrop-filter: blur(6px); font-size: 12px; color: var(--text-2); pointer-events: none; }
.glegend span { display: inline-flex; align-items: center; gap: 6px; }
.glegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.glegend b { color: var(--text); font-weight: 600; }
.glegend .gl-key { color: var(--text-3); margin-left: auto; }
.gm { --pc: #6b7685; --ink: #fff; --ps: 32px; position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; will-change: transform; pointer-events: none; }
.gm__ph { width: var(--ps); height: var(--ps); border-radius: 50%; border: 2.5px solid var(--pc); background: var(--bg-2); overflow: hidden; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.55); }
.gm.is-def .gm__ph { box-shadow: 0 0 0 2px rgba(9,13,18,.9), 0 0 0 4px var(--pc), 0 2px 8px rgba(0,0,0,.55); }
.gm__ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: relative; }
.gm__ph b { position: absolute; inset: 0; display: grid; place-items: center; background: var(--pc); color: var(--ink); font: 700 11px var(--font-display); }
.gm__t { display: inline-flex; gap: 4px; align-items: baseline; padding: 1px 6px; border-radius: 6px; background: rgba(9,13,18,.8); border: 1px solid rgba(255,255,255,.08); font: 600 10.5px var(--font-mono); letter-spacing: -.02em; color: #fff; white-space: nowrap; }
.gm__t span { color: var(--text-2); font-weight: 500; }
.gm--empty .gm__ph { display: none; }
.gm--empty .gm__t { opacity: .55; }
.gm--nophoto .gm__ph { display: none; }
.gm--co { flex-direction: row; gap: 6px; align-items: center; height: 30px; padding: 2px 9px 2px 3px; border-radius: 99px; background: var(--pc); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.gm--co .gm__ph { --ps: 24px; width: 24px; height: 24px; border: 2px solid rgba(255,255,255,.85); box-shadow: none; }
.gm--co .gm__t { background: none; border: 0; padding: 0; color: var(--ink); font-size: 11px; }
.gm--co .gm__t span { color: var(--ink); }
.gm--co.gm--nophoto { height: 22px; padding: 1px 7px; }
.mph { border-radius: 50%; border: 2px solid var(--pc, var(--line)); overflow: hidden; position: relative; flex: none; background: var(--surface-3); }
.mph b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 10px var(--font-display); background: var(--pc); color: #fff; }
.mph img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: relative; }
.tip__g { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.tip__gn { min-width: 0; flex: 1; overflow: hidden; }
.tip__gn b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip__gn small { color: var(--text-3); font-family: var(--font-mono); font-size: 10.5px; }
.ugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 5px; margin-top: 14px; }
.uchip { border: 1px solid transparent; border-radius: 8px; background: var(--surface-3); color: var(--text-3); font: 700 12px var(--font-mono); padding: 7px 0; letter-spacing: .02em; transition: transform .12s var(--ease), border-color .12s var(--ease); }
.uchip:hover { transform: translateY(-1px); border-color: var(--text-2); }
.uchip.is-sel { border-color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.races { display: grid; gap: 8px; margin-top: 14px; }
.race { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 6px 10px; text-align: left; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px; }
.race:hover { border-color: var(--line); background: var(--surface-2); }
.race__uf { grid-row: span 3; align-self: start; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font: 700 13px var(--font-mono); }
.race__cs { display: grid; gap: 4px; min-width: 0; }
.race__c { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.race__n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.race__c b { font-size: 13px; }
.race .bar { height: 4px; }
.race__m { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.pager button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0; }
.pager button:disabled { opacity: .35; cursor: not-allowed; }
.pty { display: grid; gap: 10px; margin-top: 14px; }
.pty__r { display: grid; grid-template-columns: 12px auto 1fr; gap: 4px 10px; align-items: center; font-size: 13px; }
.pty__r i { width: 12px; height: 12px; border-radius: 4px; }
.pty__r span { color: var(--text-2); text-align: right; font-size: 12px; }
.pty__r .bar { grid-column: 1 / -1; height: 5px; }
.evs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.evs li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; font-size: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.evs time { color: var(--text-3); font-size: 12px; }
.tag { margin-left: 6px; font-size: 10px; padding: 2px 8px; vertical-align: middle; }
@media (max-width: 760px) {
  .glegend { right: 10px; top: 8px; padding: 5px 9px; font-size: 11px; gap: 3px 9px; }
  .glegend .gl-key { display: none; }
  .zoom { top: auto; bottom: 12px; }
  .gm__t { font-size: 10px; padding: 0 4px; }
}

/* celular: abas Presidente/Governadores sempre visíveis numa linha própria; zoom no canto esquerdo (as caixinhas ficam à direita) */
@media (max-width: 760px) {
  .back { order: 2; padding: 6px 8px; font-size: 12px; }
  .tabs { order: 8; flex: 1 1 100%; margin: 0; padding: 3px; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
  .tabs .tab { flex: 1; justify-content: center; text-align: center; padding: 9px 6px; font-size: 14px; }
  .zoom { top: auto !important; bottom: 12px; right: auto; left: 12px; }
}

/* gaveta do detalhe (celular): barra com puxador e Fechar; no desktop a barra some */
.sheetbar { display: none; }
@media (max-width: 1099px) {
  .col--r.is-sheet { max-height: 50dvh; padding-top: 0; }
  .col--r.is-sheet::before { display: none; }
  .sheetbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2;
    margin: 0 -14px 6px; padding: 10px 14px 8px; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); touch-action: none; }
  .sheetbar__grip { width: 44px; height: 5px; border-radius: 99px; background: var(--line); position: absolute; left: 50%; top: 6px; transform: translateX(-50%); }
  .sheetbar__x { margin-left: auto; margin-top: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 600 14px var(--font-body);
    padding: 8px 14px; border-radius: 999px; min-height: 40px; cursor: pointer; }
  .sheetbar__x:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
}

/* ---------- senado ---------- */
.gm__pp { display: flex; align-items: center; }
.gm__ph--2 { display: none; margin-left: calc(var(--ps) * -.3); border-color: var(--pc2, var(--line)); }
body[data-view="senado"] .gm__ph--2 { display: block; }
.gm--empty .gm__pp, .gm--nophoto .gm__pp { display: none; }
.gm--co .gm__ph--2 { margin-left: -8px; }
.glegend .gl-title b { color: var(--gold); }
.hemi { width: 100%; max-width: 360px; display: block; margin: 14px auto 2px; }
.hemi .empty-dot { fill: var(--surface-3); stroke: var(--line); stroke-width: .6; }
.seatnote { text-align: center; margin-top: 2px; }
.seatlg { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.seatlg span { display: inline-flex; align-items: center; gap: 5px; }
.seatlg i { width: 9px; height: 9px; border-radius: 3px; }
.seatlg b { color: var(--text); }
.drow.is-seat { background: linear-gradient(90deg, rgba(245,197,66,.06), transparent 70%); border-radius: 10px; margin: 0 -6px; padding-left: 6px; padding-right: 6px; }

.race__m { gap: 8px; }
.race__m span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.race__m span:last-child { white-space: nowrap; flex: none; }

/* ---------- deputados ---------- */
.gm__bar { display: none; width: 46px; height: 4px; border-radius: 99px; overflow: hidden; background: #3a4757; gap: 1px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.gm__bar i { display: block; height: 100%; }
.gm--dep .gm__bar { display: flex; }
.gm--dep .gm__pp { display: none; }
.gm--dep.gm--empty .gm__bar { display: none; }
.gm--dep.gm--co { position: absolute; }
.gm--dep.gm--co .gm__bar { position: absolute; left: 12px; right: 12px; bottom: 3px; width: auto; height: 3px; }
.gm--dep.gm--co { padding: 2px 12px 7px; height: 32px; }
.gm--dep.gm--co.gm--nophoto { height: 24px; padding: 1px 8px 5px; }
.seatnote.small { font-size: 11.5px; color: var(--text-3); }
.bar--maj { position: relative; overflow: visible; }
.bar--maj u { position: absolute; left: 50.1%; top: -3px; bottom: -3px; width: 1.5px; background: var(--text-2); opacity: .7; }
.sub-h { font: 700 15px var(--font-display); margin: 18px 0 8px; }
.stab { display: grid; gap: 2px; margin-top: 10px; font-size: 13px; }
.stab__h, .stab__r { display: grid; grid-template-columns: 1fr 52px 62px; gap: 8px; padding: 5px 0; align-items: center; }
.stab__h { font: 600 10.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line-soft); }
.stab__h span:nth-child(n+2), .stab__r > :nth-child(n+2) { text-align: right; }
.stab__r { border-bottom: 1px solid var(--line-soft); }
.stab__n { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stab__n i, .ocup__g i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.stab__r b { font: 600 13px var(--font-mono); }
.stab__r span.num { color: var(--text-2); font-size: 12px; }
.osearch { display: block; margin-bottom: 8px; }
.osearch input { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; color: var(--text); font: inherit; outline: none; }
.osearch input:focus { border-color: var(--gold); }
.ocup { display: grid; gap: 2px; max-height: 420px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.ocup__g { display: flex; align-items: center; gap: 8px; padding: 10px 0 4px; position: sticky; top: 0; background: var(--bg-2); font-size: 12.5px; z-index: 1; }
.ocup__g span { margin-left: auto; color: var(--text-3); font-size: 11.5px; }
.ocup__r { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.ocup__n { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.ocup__n b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ocup__n small { color: var(--text-3); font-family: var(--font-mono); font-size: 10.5px; }
.ocup__r > span.num { font-size: 12px; color: var(--text-2); }
.race--one { grid-template-columns: 38px minmax(0, 1fr); }
.race--one .race__uf { grid-row: auto; }
.col--r.is-sheet .card .ocup { max-height: 260px; }

/* o preenchimento da barra também é um <i>: não pode herdar o tamanho do quadradinho do partido (12px) */
.pty__r .bar > i { width: 100%; height: 100%; border-radius: 99px; }

/* ---------- definição matemática ---------- */
.chip--mat { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); }
.gm__ck { display: none; position: absolute; top: -5px; left: 50%; margin-left: calc(var(--ps) / 2 - 7px); width: 15px; height: 15px; border-radius: 50%; background: var(--gold); color: #1a1405; font: 800 10px/1 var(--font-body); align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.6); z-index: 2; }
.gm.is-def .gm__ck { display: flex; }
.gm--co .gm__ck { left: auto; right: -4px; margin-left: 0; top: -6px; }
.gm--nophoto .gm__ck, .gm--dep .gm__ck, .gm--empty .gm__ck { display: none !important; }
.gm--nophoto.is-def .gm__t b::after { content: " ✓"; color: var(--gold); }
.tag.chip--mat { white-space: nowrap; }
.drow__n { white-space: normal; overflow: visible; text-overflow: clip; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.drow__n small { margin-left: 0; }
.drow__n .tag { margin-left: 0; }

/* selos (Eleito / Matematicamente eleito / Vaga) descem para a linha de baixo em vez de serem cortados */
.drow__n { white-space: normal; overflow: visible; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.drow__n small { margin-left: 0; }
.drow__n .tag { margin-left: 0; }
