/* =====================================================================
   Corrida Eleitoral: O Jogo
   VOICE  noticiário de apuração + painel de gabinete: sério, vivo, legível
   IDEA   o telão do TSE e o Diário Oficial, com prédios brancos de Brasília
   PICTURE mapas por microrregião e cenas 3D brancas (Planalto, Congresso)
   COLOUR branco/cinza-concreto, azul Planalto, verde e ouro só como acento
   TYPE   Archivo (títulos, números) + Inter (texto)
   ===================================================================== */
:root {
  color-scheme: light;
  --bg: #eef1f4; --panel: #ffffff; --panel2: #f6f8fa; --ink: #13202b; --muted: #5d6c78; --line: #dde3e8;
  --accent: #0b5cab; --accent-ink: #fff; --green: #009c3b; --gold: #f2c200;
  --good: #2b8a3e; --bad: #d6336c; --warn: #e8a317;
  --map-empty: #e4e8ec; --map-stroke: #ffffff; --map-uf: #51606c;
  --shadow: 0 1px 2px rgba(16, 30, 44, .06), 0 6px 22px rgba(16, 30, 44, .06);
  --r: 14px; --nav: 92px; --top: 62px;
  --f-head: 'Archivo', system-ui, sans-serif; --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0e1418; --panel: #151e25; --panel2: #1a252d; --ink: #e8edf1; --muted: #93a3af; --line: #26333d;
  --accent: #4d9bf0; --accent-ink: #06121d; --good: #51cf66; --bad: #ff6b9a; --warn: #fcc419;
  --map-empty: #26323c; --map-stroke: #0e1418; --map-uf: #aab7c1;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; margin-top: 1.1em; color: var(--muted); }
h4 { font-size: 13px; margin: 1em 0 .4em; }
p { margin: 0 0 .7em; }
small { font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; }
.flag { width: 26px; height: 18px; border-radius: 4px; background: var(--green); display: inline-grid; place-items: center; flex: none; }
.flag i { width: 14px; height: 9px; background: var(--gold); transform: rotate(45deg) scale(.9, .62); }

/* ---------------- botões ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; transition: transform .12s, background .15s, border-color .15s; text-align: left; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn small { font-weight: 500; color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary small { color: inherit; opacity: .8; }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.lg { min-height: 52px; padding: 12px 22px; font-size: 16px; border-radius: 12px; }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn.xs { min-height: 30px; padding: 3px 10px; font-size: 12px; border-radius: 8px; }
.btn.on { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border-color: var(--accent); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btnrow.col { flex-direction: column; align-items: stretch; }
.btnrow.col .btn { justify-content: space-between; }
.lnk { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 600; }
.lnk:hover { color: var(--accent); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--c) 16%, var(--panel)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); white-space: nowrap; vertical-align: middle; }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line); margin: 2px 4px 2px 0; }
.tag.gov { background: var(--green); color: #fff; border-color: transparent; }
.tag.opp { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.tag.gold { background: var(--gold); color: #3b2f00; border-color: transparent; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------------- segmentado ---------------- */
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); min-height: 36px; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.seg.sm button { padding: 4px 9px; font-size: 12px; min-height: 30px; }
.seg.xs { margin: 0; padding: 2px; } .seg.xs button { padding: 3px 9px; font-size: 12px; min-height: 28px; }
.seg.big { max-width: 560px; } .seg.big button { flex: 1; font-size: 14px; }

/* ---------------- shell ---------------- */
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 16px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-size: 17px; white-space: nowrap; }
.tstats { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.ts { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); white-space: nowrap; font-size: 13px; flex: none; }
.ts small { color: var(--muted); }
.ts.date { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; } .ts.date b { text-transform: capitalize; }
.ts.party { border-left: 4px solid var(--c); flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
.next { flex: none; }
.nav { position: fixed; z-index: 15; left: 0; top: var(--top); bottom: 0; width: var(--nav); display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; background: var(--panel); border-right: 1px solid var(--line); }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.nav button:hover { color: var(--ink); background: var(--panel2); }
.nav button.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav button.hot { color: var(--bad); }
.nav button.hot .ic { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.main { margin-left: var(--nav); padding: 18px clamp(12px, 2vw, 26px) 40px; max-width: calc(1320px + var(--nav)); animation: fadeIn .28s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------------- grid e cards ---------------- */
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card.empty { max-width: 720px; }
.hero-card { position: relative; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--r); margin-bottom: 16px; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 92%, #000) 0%, color-mix(in srgb, var(--c) 70%, #0b1620) 100%); }
.hero-card::after { content: ''; position: absolute; right: -60px; top: -80px; width: 340px; height: 340px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .07); }
.hero-card small { opacity: .8; } .hero-card .chip { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero-card .tag { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: #fff; }
.hero-card .tag.gold { background: var(--gold); color: #3b2f00; }
.hero-stats { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; position: relative; z-index: 1; }
.hero-stats div { display: flex; flex-direction: column; } .hero-stats b { font: 800 30px/1 var(--f-head); } .hero-stats small { opacity: .8; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 8px; }
.kpi small { grid-column: 1 / -1; color: var(--muted); }
.kpi b { font: 800 24px/1.1 var(--f-head); }
.kpi .delta { font-size: 12px; font-weight: 700; color: var(--muted); } .delta.g { color: var(--good); } .delta.r { color: var(--bad); }
.kpi .spark { grid-column: 1 / -1; width: 100%; color: var(--accent); }
.hints { padding-left: 18px; margin: 0; } .hints li { margin-bottom: 8px; }
.cal { list-style: none; padding: 0; margin: 0; } .cal li { display: flex; flex-direction: column; padding: 7px 0; border-bottom: 1px dashed var(--line); } .cal b { text-transform: capitalize; font-size: 13px; } .cal span { color: var(--muted); font-size: 13px; }
.newslist { list-style: none; padding: 0; margin: 0 0 10px; }
.news { padding: 9px 0; border-bottom: 1px solid var(--line); } .news small { color: var(--muted); } .news p { margin: 2px 0 0; font-weight: 600; }
.news.pf p, .news.imp p { color: var(--bad); } .news.eleicao p { color: var(--accent); } .news.morte p { font-style: italic; }
.newslist.big .news p { font: 700 17px/1.3 var(--f-head); }

/* ---------------- medidores ---------------- */
.meter { height: 8px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; flex: 1; }
.meter span { display: block; height: 100%; border-radius: inherit; transition: width .5s ease; }
.hbar { display: flex; height: 18px; border-radius: 6px; overflow: hidden; gap: 1px; margin: 10px 0; background: var(--line); }
.hbar span { min-width: 2px; }
.bars { list-style: none; padding: 0; margin: 0; } .bars li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 54px; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.bars li b { text-align: right; font-variant-numeric: tabular-nums; }
.thresh { position: relative; } .thresh span { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); opacity: .55; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; align-items: center; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.legend .grad { width: 120px; height: 10px; border-radius: 4px; background: linear-gradient(90deg, #fff, var(--c)); border: 1px solid var(--line); }
.chart svg { display: block; height: auto; } .chart .grid { stroke: var(--line); stroke-width: 1; } .chart .axis { fill: var(--muted); font-size: 11px; }
.spark { display: block; }

/* ---------------- mapa ---------------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.mapbox { width: 100%; aspect-ratio: 1 / .98; max-height: 72vh; }
.map-svg { width: 100%; height: 100%; display: block; }
.map-svg path { stroke: var(--map-stroke); stroke-width: .5; fill: var(--map-empty); transition: fill .45s ease; cursor: pointer; }
.map-svg path.m-micro { stroke-width: .35; }
.map-svg path.m-uf { stroke-width: 1.2; }
.map-svg path.m-ufb { fill: none !important; stroke: var(--map-uf); stroke-width: .9; pointer-events: none; opacity: .75; }
.map-svg path:hover { stroke: var(--ink); stroke-width: 1.4; }
.map-svg path.sel { stroke: var(--accent); stroke-width: 2; }
.map-svg .m-lab { font: 700 13px var(--f-head); fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; text-anchor: middle; pointer-events: none; opacity: .8; }
.map-svg .m-lab.sm { font-size: 10px; }
.map-side { position: sticky; top: calc(var(--top) + 14px); max-height: calc(100vh - var(--top) - 30px); overflow: auto; }

/* ---------------- congresso ---------------- */
.cv-wrap { position: relative; height: 380px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); touch-action: none; }
.cv-wrap.tall { height: 420px; }
.cv-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.cv-hint { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--muted); background: var(--panel); padding: 2px 8px; border-radius: 6px; opacity: .85; pointer-events: none; }
.comp { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.comp li { display: flex; align-items: center; gap: 5px; } .comp i { width: 10px; height: 10px; border-radius: 3px; } .comp li.me { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.agenda { list-style: none; padding: 0; margin: 0 0 10px; }
.agenda li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ag-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .ag-h b { font-size: 15px; }
.ag-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; } .ag-a .lbl { font-size: 12px; color: var(--muted); }
.tipo { font: 800 11px var(--f-head); padding: 2px 7px; border-radius: 5px; background: var(--panel2); border: 1px solid var(--line); letter-spacing: .02em; }
.t-PEC { background: #fff3bf; color: #5c4400; border-color: #ffe066; } .t-IMP { background: var(--bad); color: #fff; border-color: transparent; }
:root[data-theme=dark] .t-PEC { background: #4d3d00; color: #ffe066; border-color: #7a6200; }
.votes { list-style: none; padding: 0; margin: 0; } .votes li { display: flex; flex-direction: column; padding: 7px 0; border-bottom: 1px solid var(--line); } .votes small { color: var(--muted); }
.vr { font-size: 11px; font-weight: 800; text-transform: uppercase; } .vr.ok { color: var(--good); } .vr.no { color: var(--bad); }
.bills { list-style: none; padding: 0; margin: 0; } .bills li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bills p { margin: 3px 0 6px; color: var(--muted); font-size: 13px; }
.gfx { display: flex; flex-wrap: wrap; gap: 4px; } .gfx em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.gfx em.p { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); } .gfx em.n { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.ideo { position: relative; display: block; height: 6px; border-radius: 4px; background: linear-gradient(90deg, #d61f26, #e9ecef 50%, #1f3c88); margin: 6px 0; }
.ideo i { position: absolute; top: -4px; width: 4px; height: 14px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
.ideo.sm { width: 160px; }
.art { list-style: none; padding: 0; margin: 0 0 14px; } .art li { display: grid; grid-template-columns: 110px 70px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.or-now { font-weight: 700; text-transform: capitalize; }
.art li .btn { justify-self: end; }

/* ---------------- governo ---------------- */
.pres-card { border-top: 5px solid var(--c); } .pres-card h1 { font-size: 26px; }
.big-num { display: flex; align-items: baseline; gap: 8px; margin: 10px 0; } .big-num b { font: 800 44px/1 var(--f-head); }
.mins { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.mins li { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mins li .lnk { flex: 1; } .mins li.sel { background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 6px; }

/* ---------------- partido ---------------- */
.party-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; } .party-head h1 { margin: 0; }
.pnum.big { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font: 800 26px var(--f-head); flex: none; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; } .dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 600; text-align: right; }
.groups { list-style: none; padding: 0; margin: 0; } .groups li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 40px auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.gname { display: flex; gap: 8px; align-items: center; } .gname i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pm { position: relative; height: 10px; background: var(--panel2); border-radius: 5px; border: 1px solid var(--line); }
.pm::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); }
.pm-bar { position: absolute; top: 0; bottom: 0; border-radius: 5px; } .pm-bar.p { left: 50%; background: var(--good); } .pm-bar.n { right: 50%; background: var(--bad); }
.groups b { text-align: right; font-variant-numeric: tabular-nums; }
.rels { list-style: none; padding: 0; margin: 0; } .rels li { display: grid; grid-template-columns: 100px 54px minmax(60px, 1fr) 32px auto auto auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.schemes { list-style: none; padding: 0; margin: 10px 0; } .schemes li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.schemes small { display: block; color: var(--muted); }
.heat { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.pols { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pols li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); display: flex; flex-direction: column; }
.pols li small { color: var(--muted); } .pols li.dead { opacity: .5; } .car { color: var(--gold); letter-spacing: 1px; }

/* ---------------- campanha ---------------- */
.cand-cards { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.cand-cards li { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); border-left: 5px solid var(--c); background: var(--panel2); display: flex; flex-direction: column; }
.cand-cards li.me { outline: 2px solid var(--accent); }
.cand-cards small { color: var(--muted); } .cand-cards .pv { font: 800 26px var(--f-head); margin-top: 4px; }
.energy { display: flex; gap: 4px; margin: 8px 0; } .energy i { flex: 1; height: 12px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line); } .energy i.on { background: var(--warn); border-color: transparent; }
.sel { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
select, input[type=text], input:not([type]), input[type=number], textarea { min-height: 42px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 16px; }
textarea.code { width: 100%; font: 12px/1.4 ui-monospace, monospace; margin-bottom: 10px; }
.debate-q { font: 700 20px/1.3 var(--f-head); }

/* ---------------- mídia ---------------- */
.posts { list-style: none; padding: 0; margin: 0; } .posts li { padding: 12px 0; border-bottom: 1px solid var(--line); } .posts li b { margin-right: 8px; } .posts li small { color: var(--muted); } .posts p { margin: 4px 0; }

/* ---------------- modal ---------------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 15, 22, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.modal-wrap.in { opacity: 1; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); transform: translateY(12px) scale(.98); transition: transform .22s; }
.modal-wrap.in .modal { transform: none; }
.modal-wrap.wide .modal { width: min(920px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 0; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-h h2 { margin: 0; font-size: 21px; }
.modal-b { padding: 14px 20px 20px; }
.opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.opt { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 48px; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt small { color: var(--muted); } .opt.primary { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.opt.danger { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.opt.ghost { background: transparent; }
.alert { padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.win { font: 700 18px/1.35 var(--f-head); color: var(--good); }
.final { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; } .final div { text-align: center; padding: 12px 6px; border-radius: 12px; background: var(--panel2); } .final b { display: block; font: 800 28px var(--f-head); }
.prose ul { padding-left: 20px; } .prose li { margin-bottom: 6px; }

/* novo jogo */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.pcard { position: relative; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; display: flex; flex-direction: column; gap: 2px; border-top: 5px solid var(--c, var(--accent)); transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard b { font: 800 20px var(--f-head); } .pcard small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.pcard .pnum { position: absolute; right: 10px; top: 8px; font: 800 13px var(--f-head); color: var(--muted); }
.pstats { display: flex; gap: 8px; font-size: 12px; font-weight: 700; margin-top: 4px; }
.pcard .lid { margin-top: 2px; }
.pcard.new { border-style: dashed; border-top-style: dashed; justify-content: center; }
.wiz-foot { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.wiz-foot label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.diff { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; } .diff legend { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.diff label { flex: 1; min-width: 160px; cursor: pointer; } .diff input { position: absolute; opacity: 0; }
.diff span { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); }
.diff input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.diff input:focus-visible + span { outline: 3px solid var(--accent); }
.form { display: flex; flex-direction: column; gap: 12px; } .form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; } .swatches label { cursor: pointer; } .swatches input { position: absolute; opacity: 0; }
.swatches i { display: block; width: 34px; height: 34px; border-radius: 10px; border: 3px solid transparent; } .swatches input:checked + i { border-color: var(--ink); }
.scale { display: flex; justify-content: space-between; font-size: 11px; }
input[type=range] { accent-color: var(--accent); }
.bases { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; } .bases legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.bases label { cursor: pointer; } .bases input { position: absolute; opacity: 0; }
.bases span { display: inline-block; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.bases input:checked + span { background: var(--c); color: #fff; border-color: transparent; }
.toggle { display: flex; gap: 10px; align-items: center; cursor: pointer; } .toggle input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------------- toast ---------------- */
#toasts { position: fixed; z-index: 300; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(460px, calc(100% - 24px)); pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--panel); font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: tin .25s ease; font-size: 14px; }
.toast.ok { background: var(--good); color: #fff; } .toast.err { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .35s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* ---------------- tela inicial ---------------- */
.start { position: relative; min-height: 100vh; display: grid; align-items: end; overflow: hidden; }
.start-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.start::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 70%, transparent) 42%, transparent 75%); pointer-events: none; }
.start-in { position: relative; z-index: 1; padding: clamp(20px, 5vw, 64px); max-width: 860px; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.start h1 { font-size: clamp(44px, 8vw, 96px); line-height: .92; letter-spacing: -.03em; margin: 0 0 16px; }
.start h1 small { display: block; font-size: .42em; color: var(--accent); letter-spacing: 0; margin-top: 8px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 640px; color: var(--ink); }
.start-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 14px; align-items: center; }
.geo-status { font-size: 13px; color: var(--muted); }

/* ---------------- cinemáticas ---------------- */
.cine { position: fixed; inset: 0; z-index: 200; background: var(--bg); opacity: 0; transition: opacity .35s; }
.cine.in { opacity: 1; }
.cine-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.cine-ui { position: absolute; inset: 0; pointer-events: none; }
.cine-ui > * { pointer-events: auto; }
.cine-title { position: absolute; left: clamp(16px, 4vw, 48px); bottom: clamp(20px, 6vh, 60px); pointer-events: none; animation: rise .7s ease both .15s; }
.cine-title small { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 8px; }
.cine-title h1 { font-size: clamp(32px, 6vw, 68px); margin: 0; text-shadow: 0 2px 20px var(--bg); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.cine-card { position: absolute; right: clamp(16px, 4vw, 48px); bottom: clamp(20px, 6vh, 60px); width: min(360px, calc(100% - 32px)); background: var(--panel); border-radius: 16px; padding: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); animation: rise .5s ease both; }
.cine.vote { background: var(--bg); }
.vote-top { position: absolute; left: 16px; right: 16px; top: 14px; text-align: center; }
.vote-top small { color: var(--muted); font-weight: 700; } .vote-top h2 { font-size: clamp(18px, 2.6vw, 28px); margin: 4px auto 0; max-width: 760px; }
.vote-board { position: absolute; left: 50%; transform: translateX(-50%); top: clamp(80px, 12vh, 110px); display: flex; gap: 8px; }
.vb { min-width: 86px; padding: 8px 12px; border-radius: 12px; text-align: center; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.vb b { display: block; font: 800 30px/1 var(--f-head); font-variant-numeric: tabular-nums; } .vb span { font-size: 11px; font-weight: 800; color: var(--muted); }
.vb.sim b { color: #2fb344; } .vb.nao b { color: #e03131; } .vb.abs b { color: var(--muted); }
.vote-orients { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 3px; max-height: 60vh; overflow: auto; }
.or { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
.or i { width: 9px; height: 9px; border-radius: 50%; } .or.y { color: #2b8a3e; } .or.n { color: #c92a2a; } .or.l { color: var(--muted); } .or.me { outline: 2px solid var(--accent); }
.vote-res { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); padding: 14px 26px; border-radius: 16px; text-align: center; color: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.vote-res b { display: block; font: 900 clamp(26px, 5vw, 44px)/1 var(--f-head); letter-spacing: .02em; } .vote-res span { font-size: 13px; opacity: .9; }
.vote-res.ok { background: #2b8a3e; } .vote-res.no { background: #c92a2a; }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) scale(.7); } }
.vote-act { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); }

/* ---------------- noite de apuração ---------------- */
.night { position: fixed; inset: 0; z-index: 180; background: var(--bg); display: grid; grid-template-rows: auto auto 1fr; opacity: 0; transition: opacity .3s; }
.night.in { opacity: 1; }
.n-h { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px clamp(12px, 3vw, 28px); background: #0b2540; color: #fff; }
.n-h small { opacity: .75; font-weight: 600; } .n-h h1 { font-size: clamp(22px, 3vw, 32px); margin: 0; }
.n-prog { flex: 1; min-width: 220px; } .n-bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.n-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ffe066); width: 0; transition: width .2s linear; }
.n-prog > span { font-size: 13px; opacity: .85; font-variant-numeric: tabular-nums; }
.n-speed { display: flex; gap: 6px; } .n-speed .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; } .n-speed .btn.on { background: var(--gold); color: #3b2f00; border-color: transparent; }
.n-tabs { display: flex; gap: 2px; padding: 0 clamp(12px, 3vw, 28px); background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; }
.n-tabs button { border: 0; background: none; padding: 12px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.n-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.n-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; padding: 14px clamp(12px, 3vw, 28px); overflow: hidden; min-height: 0; }
.n-map { min-height: 0; display: flex; flex-direction: column; } .n-map .mapbox { flex: 1; aspect-ratio: auto; max-height: none; min-height: 0; } .hint { font-size: 12px; color: var(--muted); text-align: center; margin: 4px 0 0; }
.n-side { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.cands { list-style: none; padding: 0; margin: 0; } .cands li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cands li.me .cn b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.cands .dot { width: 14px; height: 14px; } .cn { display: flex; flex-direction: column; gap: 3px; } .cn small { color: var(--muted); } .cn em { color: var(--good); font-style: normal; font-weight: 800; }
.cv { text-align: right; display: flex; flex-direction: column; } .cv b { font: 800 22px var(--f-head); font-variant-numeric: tabular-nums; } .cv small { color: var(--muted); }
.cands.sm .cv b { font-size: 16px; }
.govlist { list-style: none; padding: 0; margin: 0; } .govlist li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .govlist li > b { width: 26px; } .govlist span { display: flex; flex-direction: column; } .govlist small { color: var(--muted); }
.seatlist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; } .seatlist li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .seatlist li span { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; } .seatlist em { width: 36px; text-align: right; font-style: normal; font-size: 12px; font-weight: 700; } .seatlist em.up { color: var(--good); } .seatlist em.dn { color: var(--bad); }
.seatlist li.me { font-weight: 800; }
.n-banner { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2; width: min(760px, calc(100% - 24px)); display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); animation: rise .5s ease both; }
.n-banner h2 { margin: 0; font-size: clamp(17px, 2.2vw, 22px); } .n-banner small { color: var(--muted); font-weight: 700; }

/* ---------------- responsivo ---------------- */
@media (max-width: 1100px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span2 { grid-column: 1 / -1; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  :root { --nav: 0px; }
  .nav { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 64px; flex-direction: row; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; justify-content: space-between; }
  .nav button { flex: 1; min-width: 0; font-size: 9.5px; padding: 6px 0; letter-spacing: -.01em; }
  .nav button .ic { width: 19px; height: 19px; }
  .main { margin-left: 0; padding-bottom: 96px; }
  .logo b { display: none; }
  .hide-sm { display: none !important; }
  .next span { display: none; } .next { padding: 8px 12px; }
  .map-layout { grid-template-columns: 1fr; } .map-side { position: static; max-height: none; }
  .n-body { grid-template-columns: 1fr; grid-template-rows: minmax(260px, 46vh) auto; overflow: auto; }
  .n-side { overflow: visible; }
  .night { overflow: auto; display: block; }
  .vote-orients { display: none; }
  .vote-board { top: auto; bottom: 150px; }
  .mins { grid-template-columns: 1fr; }
  .rels li { grid-template-columns: 90px 44px minmax(40px, 1fr) 28px; } .rels li .btn { grid-column: span 2; }
  .art li { grid-template-columns: 1fr auto; } .art li > span:not(.or-now) { display: none; }
  .wiz-foot { grid-template-columns: 1fr; }
  .final { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .g3 { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  .cv-wrap { height: 300px; } .cv-wrap.tall { height: 320px; }
  .groups li { grid-template-columns: minmax(0, 1fr) 70px 34px auto; }
  .ts small { display: none; }
  .party-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seatlist { grid-template-columns: 1fr; }
  .n-banner { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.n-banner[hidden], .vote-res[hidden] { display: none; }
