/* ==========================================================================
   Apuração · Vex Painel
   Mobile primeiro. Ciano é interface; as cores quentes são dos dados.
   ========================================================================== */

:root {
  --bg: #0d131f;
  --surface: #15202b;
  --surface-2: #1b2937;
  --ink: #f3f6f9;
  --muted: #8fa1b3;
  --dim: #7688a0; /* 5:1 sobre o fundo: ainda legível em texto pequeno */
  --accent: #00bfff;
  --accent-2: #0095d9;
  --line: rgba(0, 191, 255, .16);
  --hair: rgba(160, 185, 205, .12);
  --vazio: #2a3a4b;

  --r: 16px;
  --bar-h: 52px;
  --col: 430px;
  --gut: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);

  --sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* números: condensada de placar, com algarismos de largura fixa */
  --mono: 'Barlow Semi Condensed', 'Roboto Condensed', 'Arial Narrow', system-ui, sans-serif;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + var(--sat) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 38% at 88% 0%, rgba(0, 191, 255, .14), transparent 70%),
    radial-gradient(60% 34% at 0% 46%, rgba(0, 149, 217, .08), transparent 70%);
}

h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
[hidden] { display: none !important; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.num, [data-n] { font-family: var(--mono); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .005em; }

.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #04222e;
  font-weight: 600;
}
.skip:focus { top: calc(var(--sat) + 8px); }

.card {
  background: linear-gradient(180deg, rgba(27, 41, 55, .78), rgba(21, 32, 43, .78));
  border: 1px solid var(--hair);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* ---------- Barra superior ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  padding-top: var(--sat);
  background: rgba(13, 19, 31, .78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.bar__in {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--bar-h);
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.bar__brand { flex: none; padding: 9px 0; }
.bar__brand img { height: 26px; width: auto; }

.bar__title {
  padding-left: 10px;
  border-left: 1px solid var(--hair);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #d6e0ea;
  white-space: nowrap;
}

.live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 6px 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(0, 191, 255, .32);
  background: rgba(0, 191, 255, .09);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  white-space: nowrap;
}

.live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 191, 255, .6);
  animation: pulso 1.8s ease-out infinite;
}

.live__ring { width: 20px; height: 20px; transform: rotate(-90deg); }
.live__ring circle { stroke: rgba(0, 191, 255, .2); stroke-width: 2; }
.live__ring .live__prog { stroke: var(--accent); stroke-dasharray: 47.2; stroke-dashoffset: 47.2; }
.live__ring .live__prog.is-run { animation: anel var(--ttl, 30s) linear forwards; }
.live.is-busy .live__ring { animation: gira .8s linear infinite; }

.live.is-final,
.live.is-off { color: var(--muted); border-color: var(--hair); background: rgba(160, 185, 205, .06); padding-right: 11px; }
.live.is-final .live__dot,
.live.is-off .live__dot { background: var(--muted); animation: none; }
.live.is-final .live__ring { display: none; }

@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(0, 191, 255, .55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(0, 191, 255, 0); }
}
@keyframes anel { from { stroke-dashoffset: 47.2; } to { stroke-dashoffset: 0; } }
@keyframes gira { to { transform: rotate(270deg); } }

/* ---------- Estrutura ---------- */

.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: calc(var(--bar-h) + var(--sat) + 18px) var(--gut) calc(104px + var(--sab));
}

.wrap > * { animation: sobe .6s var(--ease) both; }
.wrap > *:nth-child(2) { animation-delay: .05s; }
.wrap > *:nth-child(3) { animation-delay: .1s; }
.wrap > *:nth-child(4) { animation-delay: .15s; }
.wrap > *:nth-child(5) { animation-delay: .2s; }
.wrap > *:nth-child(n+6) { animation-delay: .25s; }

@keyframes sobe { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Abertura ---------- */

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin-top: 6px;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.02em;
}

.grad {
  display: block;
  background: linear-gradient(92deg, #fff 0%, #9be4ff 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prog { margin-top: 18px; padding: 16px 16px 18px; }

.prog__big { display: flex; align-items: flex-end; gap: 12px; }

.prog__num { font-size: 52px; line-height: .86; font-weight: 700; letter-spacing: -.01em; }
.prog__lbl { padding-bottom: 2px; font-size: 12px; line-height: 1.3; color: var(--muted); }

.prog__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}
.prog__meta .num { color: #c5d2de; font-size: 13px; font-weight: 500; }

.meter {
  position: relative;
  height: 8px;
  margin-top: 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.meter i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px rgba(0, 191, 255, .55);
  transition: width 1s var(--ease);
}
.meter i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%);
  animation: brilho 2.6s ease-in-out infinite;
}
@keyframes brilho { 55%, 100% { transform: translateX(100%); } }

.alert {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 200, 61, .35);
  background: rgba(255, 200, 61, .08);
  color: #ffe1a0;
  font-size: 12.5px;
  line-height: 1.4;
}

/* ---------- Controles ---------- */

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(21, 32, 43, .9);
  border: 1px solid var(--hair);
}
.seg button {
  position: relative;
  z-index: 1;
  height: 40px;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color .25s;
}
.seg button[aria-selected="true"] { color: #fff; }
.seg__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0, 191, 255, .24), rgba(0, 149, 217, .16));
  border: 1px solid rgba(0, 191, 255, .5);
  box-shadow: 0 6px 18px -8px rgba(0, 191, 255, .7);
  transition: transform .34s var(--ease);
}
.seg[data-i="1"] .seg__thumb { transform: translateX(100%); }
.seg--sm { margin-top: 12px; }
.seg--sm button { height: 36px; font-size: 13px; }

.chips { display: flex; gap: 6px; }
.chips--scroll {
  overflow-x: auto;
  margin: 0 calc(var(--gut) * -1);
  padding: 2px var(--gut);
  scrollbar-width: none;
}
.chips--scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(13, 19, 31, .6);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s, background .2s, border-color .2s;
}
.chip.is-on { color: #fff; border-color: rgba(0, 191, 255, .55); background: rgba(0, 191, 255, .16); }

.iconbtn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: rgba(13, 19, 31, .6);
  color: #c5d2de;
}
.iconbtn svg { width: 17px; height: 17px; }
.iconbtn:active { transform: scale(.94); }

/* ---------- Mapa ---------- */

.stage {
  position: relative;
  height: clamp(320px, 46vh, 430px);
  height: clamp(320px, 46dvh, 430px);
  margin: 12px -4px 0;
  border-radius: 22px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(72% 56% at 50% 64%, rgba(0, 191, 255, .13), transparent 72%),
    linear-gradient(180deg, #111c2a, #0b121c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 44px -26px rgba(0, 0, 0, .8);
}

.stage__canvas { position: absolute; inset: 0; touch-action: pan-y; cursor: grab; }
.stage__canvas.is-drag { cursor: grabbing; }
.stage__canvas canvas { display: block; width: 100%; height: 100%; outline: none; }

.stage__top {
  position: absolute;
  inset: 10px 10px auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.stage__top > * { pointer-events: auto; }
.stage .chip, .stage .iconbtn { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* a dica de gesto ocupa o rodapé do mapa até o primeiro toque; depois entra a legenda */
.stage__key,
.stage__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 11px;
  text-align: center;
  font-size: 11px;
  pointer-events: none;
  transition: opacity .5s;
}
.stage__hint { color: #b7c6d4; animation: some 0s 7s forwards; }
.stage__hint.is-gone { opacity: 0; animation: none; }
.stage__key { color: var(--dim); opacity: 0; animation: surge 0s 7s forwards; }
.stage__hint.is-gone + .stage__key { opacity: 1; animation: none; }
@keyframes some { to { opacity: 0; } }
@keyframes surge { to { opacity: 1; } }

.stage__tag {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--c, var(--accent));
  background: rgba(10, 16, 26, .92);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .9);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
  will-change: left, top;
}
.stage__tag b {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--c, var(--accent));
  color: #0b121c;
  font: 700 12px var(--mono);
}

/* mapa plano de reserva (sem WebGL) */
.mapa-svg {
  width: 100%;
  height: 100%;
  padding: 44px 12px 26px;
  transform: perspective(820px) rotateX(30deg);
  transform-origin: 50% 62%;
  overflow: visible;
}
.mapa-svg path {
  stroke: #0b121c;
  stroke-width: .035;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill .5s, opacity .3s;
}
.mapa-svg.tem-sel path { opacity: .38; }
.mapa-svg.tem-sel path.is-on { opacity: 1; stroke: #fff; stroke-width: .07; }

/* ---------- Liderança por estado ---------- */

.tally { margin-top: 14px; }
.tally__bar { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.tally__bar i { flex: var(--n) 1 0; min-width: 3px; background: var(--c); transition: flex-grow .6s var(--ease); }
.tally__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; font-size: 12px; color: #c5d2de; }
.tally__cap { flex: 0 0 100%; font-size: 11px; color: var(--dim); }
.tally__item { display: inline-flex; align-items: center; gap: 6px; }
.tally__item::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.tally__item b { font: 700 14px var(--mono); color: #fff; }

.ufstrip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 14px calc(var(--gut) * -1) 0;
  padding: 3px var(--gut) 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.ufstrip::-webkit-scrollbar { display: none; }

.ufchip {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 50px;
  padding-bottom: 3px;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: var(--surface);
  overflow: hidden;
  scroll-snap-align: start;
  transition: border-color .2s, background .2s, transform .2s;
}
.ufchip b { font: 700 15px/1.15 var(--mono); letter-spacing: .03em; }
.ufchip small { font: 500 11px/1.1 var(--mono); color: var(--muted); }
.ufchip::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c) var(--p, 0%), rgba(255, 255, 255, .07) 0);
}
.ufchip.is-on { border-color: var(--accent); background: rgba(0, 191, 255, .14); transform: translateY(-2px); }

/* ---------- Seções ---------- */

.sec { margin-top: 30px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec__head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.sec__head h2 span { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.sec__note { font-size: 11px; color: var(--dim); white-space: nowrap; }

/* ---------- Foto e número de urna ---------- */

.pic {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--s, 44px);
  height: var(--s, 44px);
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c, var(--hair));
  overflow: hidden;
  font: 700 calc(var(--s, 44px) * .38) var(--mono);
  color: var(--muted);
}
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }

.urna { display: inline-flex; gap: 2px; vertical-align: middle; }
.urna i {
  display: grid;
  place-items: center;
  width: 15px;
  height: 19px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: #0a1019;
  color: #e6eef6;
  font: 700 13px var(--mono);
  font-style: normal;
}

.track { display: block; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.track i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--c, var(--accent)); transition: width .9s var(--ease); }

.flag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 191, 255, .14);
  border: 1px solid rgba(0, 191, 255, .4);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Duelo ---------- */

.duel { padding: 18px 14px 14px; }
.duel:empty { display: none; }

.duel__sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; }

.duel__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
  --s: 60px;
}
.duel__nome {
  margin-top: 12px;
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.duel__meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.duel__pct { margin-top: 10px; font-size: 34px; font-weight: 700; line-height: 1; color: var(--c); }
.duel__votos { margin-top: 5px; font-size: 13px; color: var(--muted); }

.duel__vs {
  align-self: center;
  margin-top: -34px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hair);
  color: var(--dim);
  font: 700 12px var(--mono);
}

.duel__bar {
  position: relative;
  height: 12px;
  margin-top: 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
}
.duel__bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--w, 0%);
  transition: width 1s var(--ease);
}
.duel__bar .a { left: 0; border-radius: 99px 0 0 99px; background: var(--ca); }
.duel__bar .b { right: 0; border-radius: 0 99px 99px 0; background: var(--cb); }
.duel__bar::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 2px var(--surface);
}

.duel__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: 13px;
  font-size: 11.5px;
  color: var(--muted);
}
.duel__foot b { color: #e6eef6; font: 700 13.5px var(--mono); }

/* ---------- Lista de candidatos ---------- */

.cands { display: flex; flex-direction: column; margin-top: 8px; }

.cand {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hair);
  --s: 40px;
}
.cand:last-child { border-bottom: 0; }
.cand.is-flash { animation: realce 1.6s ease-out; }
@keyframes realce { 0%, 30% { background: rgba(0, 191, 255, .14); } }

.cand__main { display: block; flex: 1; min-width: 0; }
.cand__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cand__nome { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand__pct { flex: none; font-size: 18px; font-weight: 700; line-height: 1.1; }
.cand__sub { margin-top: 3px; align-items: center; }
.cand__meta { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; color: var(--muted); }
.cand__meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand__votos { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); }
.cand .track { margin-top: 8px; }
.cand .flag { margin-left: 6px; }

.more {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border-radius: 12px;
  border: 1px dashed var(--hair);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Números gerais ---------- */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stat { padding: 14px; --c: var(--accent); }
.stat--wide { grid-column: 1 / -1; }
.stat__lbl { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat__val { display: block; margin-top: 6px; font-size: 30px; font-weight: 700; line-height: 1; }
.stat--wide .stat__val { font-size: 38px; }
.stat__sub { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.stat__sub .num { font-size: 13px; font-weight: 600; color: #c5d2de; }
.stat .track { margin-top: 12px; height: 3px; }
.stat--mute { --c: #6d8194; }

/* ---------- Por estado ---------- */

#ufSort { margin-bottom: 12px; }

.uflist { padding: 2px 12px; }

.ufrow {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}
.ufrow:last-child { border-bottom: 0; }

.ufrow__uf {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  /* as duas primeiras linhas valem para navegadores sem color-mix() */
  background: var(--surface);
  border: 1px solid var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
}
.ufrow__nome { display: flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 600; }
.ufrow__nome span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ufrow__nome small { flex: none; font-size: 11px; font-weight: 500; color: var(--muted); }
.ufrow__main { min-width: 0; }
.ufrow__sub { display: block; margin-top: 1px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ufrow .track { margin-top: 7px; }
.ufrow__num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ufrow__pct { font-size: 18px; font-weight: 700; line-height: 1.1; }
.ufrow__ap { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ufrow__ap .num, .ufrow__sub .num { font-size: 12.5px; font-weight: 600; }
.ufrow--vazio { --c: var(--vazio); }
.ufrow--vazio .ufrow__nome { color: var(--muted); font-weight: 500; }

/* ---------- Rodapé ---------- */

.foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--hair); font-size: 12px; line-height: 1.55; color: var(--dim); }
.foot p + p { margin-top: 8px; }

/* ---------- Busca ---------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--sab));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(calc(var(--col) - 32px), calc(100% - 32px));
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 191, 255, .4);
  background: rgba(21, 32, 43, .86);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .8), 0 0 26px -8px rgba(0, 191, 255, .5);
  color: var(--muted);
  font-size: 13.5px;
  transform: translateX(-50%);
  transition: transform .35s var(--ease), opacity .25s;
}
.dock svg { flex: none; width: 19px; height: 19px; color: var(--accent); }
.dock span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock:active { transform: translateX(-50%) scale(.98); }
.dock.is-away { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }

.search {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-width: var(--col);
  margin: 0 auto;
  padding-top: var(--sat);
  background: var(--bg);
  animation: abre .28s var(--ease);
}
@keyframes abre { from { opacity: 0; transform: translateY(18px); } }

.search__bar { display: flex; align-items: center; gap: 10px; padding: 10px var(--gut) 8px; }

.search__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 191, 255, .45);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(0, 191, 255, .08);
}
.search__field svg { flex: none; width: 18px; height: 18px; color: var(--accent); }
.search__field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 500 16px var(--sans); /* 16px evita o zoom automático do iOS */
  -webkit-appearance: none;
  appearance: none;
}
.search__field input::placeholder { color: var(--dim); }
.search__field input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search__x { height: 44px; padding: 0 4px; color: var(--accent); font-size: 14px; font-weight: 600; }
.search__filtros { flex: none; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }

.search__res {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px var(--gut) calc(24px + var(--sab));
  -webkit-overflow-scrolling: touch;
}

.res__grp {
  margin: 16px 0 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.res {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
  --s: 38px;
}
.res__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--hair);
  color: var(--muted);
  font: 700 14px var(--mono);
  letter-spacing: .03em;
}
.res__ico svg { width: 17px; height: 17px; }
.res__txt { flex: 1; min-width: 0; }
.res__txt b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res__txt small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res__txt mark { background: none; color: var(--accent); }
.res > svg { flex: none; width: 16px; height: 16px; color: var(--dim); }

.res__empty { padding: 36px 8px; text-align: center; font-size: 13.5px; color: var(--muted); }
.res__empty b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }

.ufgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 7px; margin-top: 8px; }
.ufgrid button {
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--hair);
  background: var(--surface);
  text-align: center;
  font: 700 15px var(--mono);
  letter-spacing: .03em;
  box-shadow: inset 0 -3px 0 var(--c, transparent);
}

/* ---------- Painel deslizante ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 9, 15, .62);
  animation: some-in .25s both;
}
@keyframes some-in { from { opacity: 0; } }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(var(--col), 100%);
  height: 92vh;
  height: 92dvh;
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(0, 191, 255, .28);
  border-bottom: 0;
  background: linear-gradient(180deg, #162230, #111a26 180px);
  box-shadow: 0 -24px 60px -12px rgba(0, 0, 0, .85);
  transform: translate(-50%, var(--y, 100%));
  transition: transform .44s cubic-bezier(.2, .9, .25, 1);
  outline: none;
  will-change: transform;
}
.sheet.is-drag { transition: none; }

.sheet__grab { flex: none; padding: 0 var(--gut) 12px; touch-action: none; cursor: grab; }
.sheet__handle { display: block; width: 40px; height: 4px; margin: 9px auto 10px; border-radius: 99px; background: rgba(160, 185, 205, .35); }

.sheet__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--gut) calc(var(--off, 0px) + 28px + var(--sab));
  -webkit-overflow-scrolling: touch;
}

.sh { display: flex; align-items: center; gap: 12px; }
.sh__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--c, var(--accent));
  background: color-mix(in srgb, var(--c, var(--accent)) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--c, var(--accent)) 55%, transparent);
  font: 700 18px var(--mono);
  letter-spacing: .03em;
}
.sh__txt { flex: 1; min-width: 0; }
.sh__ttl { font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh__sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh--cand { --s: 54px; }

.sheet .cands { margin-top: 6px; }
.sheet h3.sub {
  margin: 22px 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mini { padding: 10px 10px 11px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid var(--hair); }
.mini span { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mini b { display: block; margin-top: 3px; font: 700 19px/1.1 var(--mono); }

.hero-num { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 14px; }
.hero-num b { font: 700 44px/.9 var(--mono); color: var(--c); }
.hero-num span { display: block; font-size: 11.5px; color: var(--muted); text-align: right; }
.hero-num span strong { display: block; font: 700 18px var(--mono); color: var(--ink); }

.munbox__field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, .035);
}
.munbox__field:focus-within { border-color: rgba(0, 191, 255, .5); }
.munbox__field svg { flex: none; width: 17px; height: 17px; color: var(--muted); }
.munbox__field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 500 16px var(--sans);
}
.munbox__field input::placeholder { color: var(--dim); font-size: 14px; }
.munbox__field input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* espaço para o campo conseguir rolar até o topo do painel */
.sheet__body.is-mun #munRes { min-height: 64vh; min-height: 64dvh; }
.duel__regua { color: var(--dim); }

.perf {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  font-size: 12.5px;
}
.perf b { font: 700 14.5px var(--mono); letter-spacing: .03em; }
.perf .track { height: 6px; }
.perf__pct { text-align: right; font: 700 15px var(--mono); }
.perf.is-lead b { color: var(--c); }

.empty { padding: 26px 8px; text-align: center; font-size: 13px; color: var(--muted); }

.skel {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .1) 37%, rgba(255, 255, 255, .05) 63%);
  background-size: 300% 100%;
  animation: skel 1.3s linear infinite;
}
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skel--row { height: 54px; margin-top: 10px; }

/* ---------- Avisos ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + var(--sab));
  z-index: 70;
  max-width: min(360px, calc(100% - 40px));
  padding: 10px 16px;
  border-radius: 12px;
  background: #223244;
  border: 1px solid var(--hair);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .8);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .25s, transform .25s var(--ease);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.noscript { max-width: var(--col); margin: 90px auto; padding: 0 var(--gut); text-align: center; color: var(--muted); }

/* ---------- Telas maiores: mantém a coluna de celular ---------- */

@media (min-width: 560px) {
  body::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: var(--col);
    margin-left: calc(var(--col) / -2);
    border-inline: 1px solid var(--hair);
    pointer-events: none;
    z-index: -1;
    background: rgba(13, 19, 31, .55);
  }
  .search { border-inline: 1px solid var(--hair); }
}

@media (max-width: 359px) {
  :root { --gut: 13px; }
  h1 { font-size: 26px; }
  .prog__num { font-size: 36px; }
  .duel__pct { font-size: 23px; }
  .duel__side { --s: 52px; }
}

@media (hover: hover) {
  .chip:hover { color: #fff; }
  .ufrow:hover .ufrow__nome, .res:hover .res__txt b { color: var(--accent); }
  .ufchip:hover { border-color: rgba(0, 191, 255, .5); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .live__ring { display: none; }
  .live { padding-right: 11px; }
}
