/* ===========================================================================
   Confere.la · ARENA
   Sistema visual dos mockups "Desktop - 1 (Light).svg" / "Desktop - 1.svg",
   agora no arranjo de QUATRO ZONAS pedido no layout de 21/ago/2026:

     esquerda-topo   · o player da transmissão
     esquerda-baixo  · o box de conferência (a última afirmação analisada)
     direita-topo    · seis cards de candidato, um por raia
     direita-baixo   · espaço livre de anúncio

   O que continua valendo do sistema antigo:
   · toda etiqueta é monoespaçada, caixa-alta, com entrelinha larga;
   · toda voz humana (nome, número, veredito, corpo) é grotesca;
   · profundidade vem de régua e moldura, nunca de sombra difusa;
   · uma cor por estado: verde acerta, neutro morno, vermelho erra.
   O que mudou: o canto deixou de ser reto. O layout de referência desenha
   card, box e player com raio, que vive todo em --radius: um token
   devolve a tela ao canto vivo se for o caso.
   =========================================================================== */

@import url('/fonts/fonts.css');
@import url('https://fonts.googleapis.com/css2?family=Ramabhadra&display=swap');

/* ---------------------------------------------------------------- tokens */

:root {
  /* geometria */
  --mast-h: clamp(48px, 5.93vh, 64px);
  --foot-h: 48px;
  --pad-x: clamp(16px, 2.2vw, 44px);
  --pad-y: clamp(12px, 1.7vh, 20px);
  --gutter: clamp(16px, 1.9vw, 34px);
  --rail-w: clamp(300px, 41vw, 800px);   /* a coluna dos cards + anúncio */
  --card-h: clamp(96px, 14.5vh, 172px);  /* a altura de uma raia de candidato */
  --ad-h: clamp(150px, 24vh, 460px);     /* o PISO do anúncio: ele cresce além disso */
  --radius: 14px;
  --radius-sm: 10px;
  --rule: 1px;

  /* tipografia */
  --sans: 'Satoshi', 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JBMono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* voz de cartaz: nome do candidato e número do placar. Bebas primeiro, Anton de reserva */
  --display: 'Bebas', 'Anton', 'Archivo', ui-sans-serif, system-ui, sans-serif;

  /* curvas */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --slam: cubic-bezier(.2, 1.6, .4, 1);

  /* o fundo enviado pronto, uma proporção para cada orientação de tela */
  --bg-art-h: none;
  --bg-art-v: none;
  --bg-art-dim: .34;
}

/* tema claro: gray-50/100/200 + emerald-800 + red-800 (paleta do mockup) */
:root,
[data-theme='light'] {
  --bg-1: #f9fafb;
  --bg-2: #f3f4f6;
  --bg-3: #e5e7eb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --screen: #e5e7eb;

  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #4b5563;
  --muted: #6b7280;
  --faint: #9ca3af;

  --line: #d1d5db;
  --line-soft: #e5e7eb;
  --line-hard: #111827;

  --ok: #059669;
  --ok-mark: #a7f3d0;
  --ok-wash: #d1fae5;
  --ok-solid: #22c55e;
  --ok-on: #052e16;

  --bad: #b91c1c;
  --bad-mark: #fecaca;
  --bad-wash: #fee2e2;
  --bad-solid: #ef4444;
  --bad-on: #fff5f5;

  --mid: #4b5563;
  --mid-mark: #d1d5db;
  --mid-wash: #e5e7eb;
  --mid-solid: #e5e7eb;
  --mid-on: #374151;

  --chip-bg: #111827;
  --chip-ink: #f9fafb;

  --grain: .035;
  --scan: 0;
  --glow: 0;
  --dot: #cbd0d6;

  /* o card do candidato é escuro NOS DOIS TEMAS: é o objeto de marca da tela */
  --card-bg: #0b0b0a;
  --card-bg-2: #17171a;
  --card-ink: #ffffff;
  --card-line: transparent;
  --card-shadow: 0 10px 24px -18px rgba(17, 24, 39, .75);
  --card-ok: #22c55e;
  --card-mid: #9ca3af;
  --card-bad: #ef4444;
  /* blocos do placar: gradiente do preto até a cor oficial do estado, número branco */
  --slot-ok-bg: #22c55e;   --slot-ok-ink: #ffffff;
  --slot-mid-bg: #9ca3af;  --slot-mid-ink: #ffffff;
  --slot-bad-bg: #ef4444;  --slot-bad-ink: #ffffff;

  --veil: #f3f4f6;
}

/* tema escuro: pretos quentes + green-500 (paleta do mockup dark) */
[data-theme='dark'] {
  --bg-1: #000000;
  --bg-2: #000000;
  --bg-3: #000000;
  --surface: #000000;
  --surface-2: #000000;
  --screen: #000000;

  --ink: #e4e4e4;
  --ink-2: #acacac;
  --ink-3: #8a8a8a;
  --muted: #686868;
  --faint: #505050;

  --line: #292929;
  --line-soft: #232323;
  --line-hard: #393939;

  --ok: #22c55e;
  --ok-mark: #22c55e;
  --ok-wash: #082d05;
  --ok-solid: #22c55e;
  --ok-on: #04150a;

  --bad: #ef4444;
  --bad-mark: #ef4444;
  --bad-wash: #320808;
  --bad-solid: #ef4444;
  --bad-on: #1a0505;

  --mid: #a0a0a0;
  --mid-mark: #5e5e5e;
  --mid-wash: #1c1c18;
  --mid-solid: #393939;
  --mid-on: #e4e4e4;

  --chip-bg: #e4e4e4;
  --chip-ink: #0a0a08;

  --grain: .05;
  --scan: 1;
  --glow: 1;
  --dot: #232320;

  --card-bg: #000000;
  --card-bg-2: #000000;
  --card-ink: #f4f4f4;
  --card-line: #35352f;
  --card-shadow: none;
  --card-ok: #22c55e;
  --card-mid: #8a8a8a;
  --card-bad: #ef4444;
  --slot-ok-bg: #22c55e;   --slot-ok-ink: #ffffff;
  --slot-mid-bg: #8a8a8a;  --slot-mid-ink: #ffffff;
  --slot-bad-bg: #ef4444;  --slot-bad-ink: #ffffff;

  --veil: #000;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg-1: #000000; --bg-2: #000000; --bg-3: #000000;
    --surface: #000000; --surface-2: #000000; --screen: #000000;
    --ink: #e4e4e4; --ink-2: #acacac; --ink-3: #8a8a8a;
    --muted: #686868; --faint: #505050;
    --line: #292929; --line-soft: #232323; --line-hard: #393939;
    --ok: #22c55e; --ok-mark: #22c55e; --ok-wash: #082d05; --ok-solid: #22c55e; --ok-on: #04150a;
    --bad: #ef4444; --bad-mark: #ef4444; --bad-wash: #320808; --bad-solid: #ef4444; --bad-on: #1a0505;
    --mid: #a0a0a0; --mid-mark: #5e5e5e; --mid-wash: #1c1c18; --mid-solid: #393939; --mid-on: #e4e4e4;
    --chip-bg: #e4e4e4; --chip-ink: #0a0a08;
    --grain: .05; --scan: 1; --glow: 1; --dot: #232320;
    --card-bg: #000000; --card-bg-2: #000000; --card-ink: #f4f4f4; --card-line: #35352f;
    --card-shadow: none; --card-ok: #22c55e; --card-mid: #8a8a8a; --card-bad: #ef4444;
    --slot-ok-bg: #22c55e; --slot-ok-ink: #ffffff;
    --slot-mid-bg: #8a8a8a; --slot-mid-ink: #ffffff;
    --slot-bad-bg: #ef4444; --slot-bad-ink: #ffffff;
    --veil: #000;
  }
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; }

/* `hidden` precisa ganhar de flex/grid: vários blocos aqui alternam por ele. */
[hidden] { display: none !important; }

html, body { height: 100%; background: #000000 !important; }

body {
  margin: 0;
  background: #000000 !important;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}

/* A tela inteira é o layout: masthead / arena / rodapé, sem rolagem de página. */
body {
  display: grid;
  grid-template-rows: var(--mast-h) minmax(0, 1fr) var(--foot-h);
}

/* --------------------------------------------------------- fundo da tela */
.stage-bg, .grain, .dot-grid {
  display: none !important;
}

/* ------------------------------------------------------------- tipografia */

.lab {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.lab--tight { letter-spacing: .14em; }
.lab--wide { letter-spacing: .32em; }
.lab--ink { color: var(--ink-2); }

.tick {
  display: inline-block; width: 24px; height: 2px;
  background: var(--line); flex: none;
}
.tick--sm { width: 20px; }

.rule { border: 0; height: 1px; background: var(--line-soft); margin: 0; width: 100%; flex: none; }
.rule--v { width: 1px; height: 28px; background: var(--line); flex: none; }
.rule--seg { height: 1px; background: var(--line); flex: 1; min-width: 20px; }

/* ------------------------------------------------------------- masthead */

.masthead {
  position: relative; z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px var(--pad-x);
  border: none !important;
  background: #000000 !important;
  box-shadow: none !important;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.logo-img {
  height: clamp(20px, 3.5vh, 28px);
  max-width: 100%;
  object-fit: contain;
}

.mh-side { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mh-side--end { justify-content: flex-end; }

.wordmark {
  font-family: var(--sans);
  font-size: clamp(19px, 1.4vw, 26px);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark i { font-style: normal; color: var(--muted); font-weight: 500; }

.mh-center { display: flex; align-items: center; gap: 18px; }
.mh-center .rule--seg { width: 40px; flex: none; }

.chip-mode {
  display: inline-flex; align-items: center; justify-content: center;
  width: 160px; height: 25px; flex: none;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  background: var(--chip-bg); color: var(--chip-ink);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.theme-btn {
  appearance: none; background: transparent; cursor: pointer;
  border: 1px solid var(--line); color: var(--muted);
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--radius-sm);
  transition: color .2s, border-color .2s, background .2s;
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-btn svg { width: 15px; height: 15px; }
.theme-btn .i-sun { display: none; }
[data-theme='dark'] .theme-btn .i-sun { display: block; }
[data-theme='dark'] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-btn .i-sun { display: block; }
  :root:not([data-theme='light']) .theme-btn .i-moon { display: none; }
}

/* ============================================================== ARENA ====
   Duas colunas. À esquerda o que se assiste; à direita quem está sendo
   verificado e, embaixo, o espaço que se vende. Nada rola.
   ======================================================================== */

.arena {
  position: relative; z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: var(--gutter);
  padding: var(--pad-y) var(--pad-x);
  min-height: 0;
}

/* cabeça de zona: o rótulo que nomeia cada quadrante */
.zone-head {
  display: flex; align-items: center; gap: 12px;
  flex: none; min-width: 0;
  padding-bottom: 2px;
}
.zone-head .lab--tight { color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.zone-head .rule--seg,
.zone-head .tick {
  display: none !important;
}

/* ------------------------------------------------- coluna esquerda (deck) */

.deck {
  display: flex; flex-direction: column;
  gap: clamp(10px, 1.5vh, 18px);
  min-width: 0; min-height: 0;
}

/* 1 · O PLAYER --------------------------------------------------------- */
/* Mantém a proporção do vídeo e nunca empurra o box de conferência para
   fora da tela: o teto em % é o que segura a divisão da coluna. */
.screen {
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62%;
  min-height: 0;
  display: flex; flex-direction: column;
  border: 2px solid var(--line-hard);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.screen-body {
  position: relative; flex: 1; min-height: 0;
  background: var(--screen); overflow: hidden;
}
.screen-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-body #ytplayer,
.screen-body #ytplayer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Embed barrado por terceiro: a tela assume o lugar em vez de exibir erro alheio. */
.player-off {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--screen); text-align: center; padding: 20px;
}
.player-off p {
  margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.player-off a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--chip-ink); background: var(--chip-bg); text-decoration: none;
  padding: 9px 16px; border-radius: var(--radius-sm);
}
.player-off span {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
}

/* Som: o autoplay do YouTube só roda no mudo, então o som fica a um clique. */
.sound-btn {
  position: absolute; right: 16px; top: 16px; z-index: 10;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(11, 15, 25, 0.6); border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; color: var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background .2s, transform .2s, color .2s var(--ease);
}
.sound-btn:hover { background: rgba(11, 15, 25, 0.8); color: var(--ok); transform: scale(1.05); }
.sound-btn svg { width: 14px; height: 14px; }
.sound-btn .i-on { display: none; }
.sound-btn[data-on='true'] .i-on { display: block; }
.sound-btn[data-on='true'] .i-off { display: none; }

/* legenda de transcrição sobreposta na base do player */
.ticker {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 16px 16px 12px;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--surface) 96%, transparent) 0%,
    color-mix(in srgb, var(--surface) 92%, transparent) 62%,
    transparent 100%);
  backdrop-filter: blur(3px);
  font-family: var(--mono); font-size: clamp(10px, .72vw, 12.5px);
  letter-spacing: .02em; line-height: 1.5; color: var(--ink-2);
  display: flex; gap: 9px; align-items: flex-start;
  opacity: 0; transition: opacity .4s var(--ease);
  pointer-events: none;
}
.ticker[data-on='true'] { opacity: 1; }
.ticker .who {
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); flex: none; font-size: .85em; padding-top: .18em;
}
.ticker .txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticker .caret {
  display: inline-block; width: .5em; height: 1em; background: var(--ink-3);
  vertical-align: -.12em; margin-left: 2px;
}

/* entrada de link, quando ainda não há transmissão */
.gate {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center;
  background: var(--screen);
}
.gate-title {
  font-family: var(--sans); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(22px, 2vw, 38px); text-transform: uppercase; color: var(--ink);
}
.gate .lab { max-width: 62ch; white-space: normal; line-height: 2; margin: 0; }
.gate-form { display: flex; gap: 8px; width: min(100%, 520px); }
.gate-form input {
  flex: 1; min-width: 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
}
.gate-form input::placeholder { color: var(--faint); }
.gate-form input:focus { outline: 1px solid var(--ink); outline-offset: -1px; }
.gate-form button {
  appearance: none; cursor: pointer; border: 0;
  padding: 12px 22px; background: var(--chip-bg); color: var(--chip-ink);
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  transition: transform .2s var(--slam), opacity .2s;
}
.gate-form button:hover { transform: translateY(-1px); }
.gate-form button:active { transform: translateY(1px); }

/* 2 · O BOX DE CONFERÊNCIA -------------------------------------------- */
/* Mora sob o player e carrega a checagem mais recente do debate inteiro:
   quem afirmou, o que afirmou, o veredito e a prova. */
.confer {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  gap: clamp(10px, 1.5vh, 20px);
  padding: clamp(14px, 2vh, 24px) clamp(18px, 1.8vw, 28px);
  border: 2px solid var(--line-hard);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .2s var(--ease);
}

.confer-head { 
  display: none !important; 
}
.confer-head .bar { 
  width: 3px; height: 14px; background: var(--line-hard); flex: none; border-radius: 2px; 
}
.confer-who {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ok);
  background: var(--ok-wash); border: 1px solid var(--ok);
  border-radius: 999px; padding: 4px 10px; flex: none;
}
.badge svg { width: 12px; height: 12px; fill: currentColor; }

.confer-empty {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--muted); line-height: 2; text-transform: uppercase;
  margin-block: auto; text-align: center; border-left: none; padding-left: 0;
}

.confer-body {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0;
  gap: clamp(10px, 1.6vh, 20px);
  overflow-y: auto;
  padding-right: 6px;
}
.confer-body::-webkit-scrollbar { width: 4px; }
.confer-body::-webkit-scrollbar-track { background: transparent; }
.confer-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--radius-sm); }

/* a afirmação: a linha que o espectador lê primeiro */
.confer-claim {
  margin: 0; flex: none;
  font-family: var(--font-sans);
  font-size: clamp(12px, .85vw, 15px);
  font-weight: 400; line-height: 1.5; color: var(--ink-3);
  text-align: center;
}
.confer-claim b { 
  font-weight: 700; color: var(--ink-3); font-family: var(--mono); 
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; 
  display: block; margin-bottom: 6px; 
}
.confer-claim span { 
  font-style: italic; font-family: 'Fraunces', Georgia, serif; 
  color: var(--ink-2); font-size: clamp(13px, 1vw, 16px); 
}

/* o banner: a manchete do veredito */
.verdict {
  position: relative; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  height: clamp(40px, 5vh, 52px); padding: 0 24px;
  border-radius: var(--radius-sm);
  transition: all .3s;
}
.verdict svg { width: clamp(18px, 1.3vw, 22px); height: clamp(18px, 1.3vw, 22px); flex: none; }
.verdict span {
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(14px, 1.1vw, 20px); letter-spacing: .08em; text-transform: uppercase;
}
.verdict[data-v='verdadeiro'] { 
  background: var(--ok-wash); color: var(--ok); 
  border: 1px solid var(--ok); 
}
.verdict[data-v='falso'] { 
  background: var(--bad-wash); color: var(--bad); 
  border: 1px solid var(--bad); 
}
.verdict[data-v='impreciso'] { 
  background: var(--mid-wash); color: var(--ink); 
  border: 1px solid var(--line); 
}
.verdict[data-v='sem_base'] { 
  background: transparent; color: var(--muted); 
  border: 1px dashed var(--line); 
}
.verdict[data-v='checking'] { 
  background: var(--line-soft); color: var(--muted); 
  border: 1px dashed var(--line); 
}

.explain {
  margin: 0; flex: none;
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.1vw, 18px); line-height: 1.7; color: var(--ink);
  font-weight: 500;
  text-align: center;
}
@media (min-height: 1150px) { .explain { -webkit-line-clamp: 3; } }
@media (max-width: 1080px), (max-aspect-ratio: 1 / 1) { .explain { -webkit-line-clamp: 4; } }
.explain b { color: var(--ink); font-weight: 700; }

.sources { 
  display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; 
  padding-top: 14px; border-top: 1px solid var(--line-soft); flex: none; width: 100%;
}
.sources .lab { font-size: 8.5px; font-weight: 700; letter-spacing: .18em; width: 100%; margin-bottom: 3px; text-align: center; }
.src {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
  color: #111827; text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: color .2s, background-color .2s, transform .2s var(--ease);
}
.src:hover { color: #ffffff; background: var(--ink); border-color: var(--ink); transform: translateY(-1px); }

/* -------------------------------------------------- coluna direita (rail) */

.rail {
  display: flex; flex-direction: column;
  gap: clamp(10px, 1.5vh, 18px);
  min-width: 0; min-height: 0;
}

/* 3 · OS TRÊS CARDS ---------------------------------------------------- */
/* Três raias fixas: quem entra no debate ocupa uma, e a que sobra fica de
   vaga. O layout não dança quando chega ou sai participante.
   A raia tem altura própria (--card-h) em vez de dividir a coluna: assim o
   card não incha quando há poucos participantes, e o que sobra da coluna vai
   inteiro para o anúncio, que é o único elemento elástico daqui. */
.cards {
  flex: none; min-height: 0;
  display: grid;
  grid-template-rows: repeat(3, auto);
  gap: clamp(10px, 1.3vh, 18px);
}

.card {
  position: relative; overflow: hidden;
  display: flex; justify-content: flex-end; align-items: center;
  width: 100%;
  aspect-ratio: 2128 / 354; /* Proporção exata da imagem, sem deformações */
  height: auto; min-height: auto;
  border: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: var(--card-ink);
  transition: transform .35s var(--ease-out);

  /* Imagem de fundo completa, distorção zero */
  background-size: 100% 100% !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.card[data-slot="0"] { background-image: url("/portraits/cand0_web.png") !important; }
.card[data-slot="1"] { background-image: url("/portraits/cand1_web.png") !important; }
.card[data-slot="2"] { background-image: url("/portraits/cand2_web.png") !important; }

.card .card-photo,
.card .card-id {
  display: none !important;
}

/* quem está com a palavra acende pela aresta esquerda com uma luz neon da cor D0FF00 */
.card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #D0FF00 !important; z-index: 3;
  transform: scaleY(0); transform-origin: center;
  transition: transform .4s var(--ease-out);
  box-shadow: 0 0 16px #D0FF00, 0 0 6px #D0FF00;
}
.card[data-live='true']::before { transform: scaleY(1); }

/* a foto vem pronta e sangra na esquerda: o degradê é o que costura a
   imagem ao preto do card, então qualquer recorte funciona. */
.card-photo {
  position: relative; align-self: stretch;
  height: 100%; min-width: 0;
  background: var(--card-bg-2) 50% 18% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent 100%);
  mask-image: linear-gradient(to right, #000 55%, transparent 100%);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.card-photo .initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--sans); font-weight: 900; color: var(--faint);
  font-size: clamp(16px, 1.5vw, 26px); letter-spacing: -.03em;
}
.card[data-empty='true'] .card-photo { -webkit-mask-image: none; mask-image: none; background: transparent; }

.card-id { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(21px, 2.6vw, 56px);
  font-weight: 400; letter-spacing: .015em; line-height: 1.18;
  text-transform: uppercase;
  color: currentColor;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-name.is-unnamed { cursor: pointer; opacity: .72; }
.card-name.is-unnamed:hover { opacity: 1; }
.card-party {
  font-family: var(--mono); font-size: 8.5px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: currentColor;
  opacity: .55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* A raia sem dono não grita */

/* O marcador do wireframe: três blocos lado a lado, colados na borda direita,
   com a altura inteira do card. Cada bloco é uma faixa da cor do seu estado e
   o número mora no meio dela, no mesmo peso do nome. Ordem fixa: correto,
   impreciso, errado. O raio do card corta o último bloco sozinho, porque o
   card esconde o que passa da moldura. */
.card-score {
  display: flex;
  align-self: stretch; height: 100%; flex: none;
  width: 35%; /* Afunila o contêiner de notas para os 35% da direita, garantindo sobreposição zero com o nome */
  background: transparent !important;
  border: none !important;
  margin-left: auto;
}
.card-score .n {
  flex: 1; height: 100%;
  display: grid; place-items: center;
  font-family: 'Ramabhadra', var(--display) !important; /* Fonte Ramabhadra solicitada */
  font-size: clamp(20px, 2.5vw, 44px); /* Proporção ideal de escala sem vazar da arte */
  font-weight: 700; line-height: 1; letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  background: transparent !important; /* Preserva a arte de fundo intacta */
  border: none !important;
}
.card-score .n[data-tone='ok'] { color: #22c55e !important; }
.card-score .n[data-tone='mid'] { color: #8a8a8a !important; }
.card-score .n[data-tone='bad'] { color: #ef4444 !important; }

/* 4 · O ESPAÇO DE ANÚNCIO ---------------------------------------------- */
/* Fica livre por padrão. Quem ocupa injeta a peça em #adslot e liga o
   data-on: aí a moldura de espera some e o espaço é só do anunciante. */
/* O anúncio é o elemento elástico da coluna: ele toma toda a altura que as
   três raias não usam, com --ad-h de piso para telas curtas. */
.ad {
  flex: 1 1 auto;
  min-height: var(--ad-h);
  position: relative;
  display: grid; place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  overflow: hidden;
}
.ad-slot { width: 100%; height: 100%; display: none; }
.ad-slot > * { width: 100%; height: 100%; object-fit: contain; display: block; border: 0; }
.ad-lab { color: var(--faint); letter-spacing: .3em; }
.ad[data-on='true'] { border-style: solid; border-color: var(--line-soft); background: var(--surface); }
.ad[data-on='true'] .ad-slot { display: block; }
.ad[data-on='true'] .ad-lab { display: none; }

/* --------------------------------------------------------------- rodapé */

.footer {
  position: relative; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--pad-x);
  border-top: 1px solid var(--line);
}
.footer .lab { font-size: 9px; letter-spacing: .14em; }
.footer .right { display: flex; align-items: center; gap: 9px; }
.live-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--faint);
  flex: none; position: relative;
  transition: background-color 0.3s var(--ease);
}
.live-dot[data-on='true'] { background: var(--ok); }

/* ----------------------------------------------------------- responsivo */

/* Tela em pé (o 9:16 do fundo): as quatro zonas viram quatro faixas, na
   mesma ordem de leitura: vídeo, conferência, cards, anúncio. */
@media (max-width: 1080px), (max-aspect-ratio: 1 / 1) {
  html, body { height: auto; }
  body { overflow: auto; min-height: 100%; grid-template-rows: auto 1fr auto; }
  .masthead { position: sticky; top: 0; }
  .footer { min-height: var(--foot-h); padding-block: 10px; }

  /* display contents flat-out is grid-items for order */
  .deck, .rail { display: contents; }

  .arena {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 3vh, 28px);
    padding-bottom: 24px;
  }
  .screen { order: 2; max-height: none; }
  .confer { order: 3; flex: none; }
  .ad { order: 4; flex: none; height: clamp(200px, 34vh, 380px); min-height: 0; }

  /* Em pé, cards ficam no topo como os stories e fluem na horizontal */
  .cards { 
    order: 1;
    display: flex; flex-direction: row;
    gap: 12px; width: 100%;
    overflow-x: auto;
    margin-bottom: 8px;
    grid-template-rows: none;
    height: auto;
  }
  .cards::-webkit-scrollbar { display: none; }

  .card { 
    flex: 1;
    aspect-ratio: 758 / 818;
    min-height: auto; height: auto;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch;
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    
    /* Imagem completa móvel, distorção zero */
    background-size: 100% 100% !important; 
    background-position: center !important;
    background-repeat: no-repeat !important;
  }

  .card[data-slot="0"] { background-image: url("/portraits/cand0_mobile.png") !important; }
  .card[data-slot="1"] { background-image: url("/portraits/cand1_mobile.png") !important; }
  .card[data-slot="2"] { background-image: url("/portraits/cand2_mobile.png") !important; }

  .card-score {
    display: flex; width: 100%; height: 30%; flex: none;
    background: transparent !important;
    border: none !important;
  }
  .card-score .n {
    flex: 1; height: 100%;
    font-size: clamp(15px, 3.5vw, 28px) !important;
    min-width: 0;
    background: transparent !important;
    border: none !important;
  }
}

@media (max-width: 700px) {
  .mh-center { display: none; }
  .mh-side > .lab, .mh-side > .rule--v { display: none; }
  .zone-head .lab--tight { display: none; }
  .dot-grid { background-size: 30px 30px; }
  .footer .lab { font-size: 8px; letter-spacing: .1em; }
}
