/* ==========================================================
   Sorteio Grow+  |  tokens, layout e componentes
   ========================================================== */

:root,
[data-tema="escuro"] {
  --fundo: #060708;
  --superficie: #0d0f11;
  --superficie-2: #14171a;
  --superficie-3: #1c2024;
  --borda: #22262b;
  --borda-forte: #30353b;
  --texto: #f3f4f5;
  --texto-2: #a6acb3;
  --texto-3: #7d838b;

  --lima: #ccff00;
  --lima-tinta: #0b0f00;
  --lima-texto: #ccff00;
  --lima-suave: rgba(204, 255, 0, 0.10);
  --lima-borda: rgba(204, 255, 0, 0.28);
  --lima-brilho: rgba(204, 255, 0, 0.42);

  --azul: #4aa3ff;
  --azul-suave: rgba(74, 163, 255, 0.12);
  --vermelho: #ff6363;
  --vermelho-suave: rgba(255, 99, 99, 0.12);
  --ambar: #ffb547;
  --ambar-suave: rgba(255, 181, 71, 0.12);

  --sombra: 0 24px 64px -24px rgba(0, 0, 0, 0.7);
  --sombra-leve: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --brilho-palco: rgba(204, 255, 0, 0.07);
  color-scheme: dark;
}

[data-tema="claro"] {
  --fundo: #ffffff;
  --superficie: #fafafa;
  --superficie-2: #ffffff;
  --superficie-3: #f4f4f4;
  --borda: #ebebeb;
  --borda-forte: #dedede;
  --texto: #0c0d0f;
  --texto-2: #50565d;
  --texto-3: #686e75;

  --lima: #ccff00;
  --lima-tinta: #0b0f00;
  --lima-texto: #3d6600;
  --lima-suave: rgba(120, 180, 0, 0.12);
  --lima-borda: rgba(90, 140, 0, 0.30);
  --lima-brilho: rgba(150, 210, 0, 0.45);

  --azul: #0767d8;
  --azul-suave: rgba(7, 103, 216, 0.08);
  --vermelho: #d33434;
  --vermelho-suave: rgba(211, 52, 52, 0.08);
  --ambar: #a86400;
  --ambar-suave: rgba(168, 100, 0, 0.10);

  --sombra: 0 24px 64px -28px rgba(15, 20, 30, 0.22);
  --sombra-leve: 0 8px 24px -14px rgba(15, 20, 30, 0.2);
  --brilho-palco: rgba(160, 220, 0, 0.10);
  color-scheme: light;
}

:root {
  --fonte-titulo: "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif;
  --fonte-texto: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --fonte-visor: "Bebas Neue", "Helvetica Neue", Arial, sans-serif;
  --raio: 14px;
  --raio-g: 20px;
  --painel-largura: 400px;
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte-texto);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background-color .3s, color .3s;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; flex: none; }
.oculto-svg { position: absolute; width: 0; height: 0; overflow: hidden; }
.leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--lima-texto); outline-offset: 2px; }
kbd {
  font-family: var(--fonte-texto);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--borda-forte);
  background: var(--superficie-3);
  color: var(--texto-2);
}

/* ---------- Layout ---------- */
.app {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "topo topo" "palco painel" "rodape painel";
}

/* ---------- Topo ---------- */
.topo {
  grid-area: topo;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--borda);
  position: relative;
  z-index: 5;
}
.marca {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--texto);
  text-decoration: none;
  justify-self: start;
}
.marca-simbolo { width: 52px; height: 28px; color: var(--texto); }
.marca-texto {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  padding-left: 12px;
  border-left: 1px solid var(--borda-forte);
}

.modos {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--superficie);
  border: 1px solid var(--borda);
}
.modo {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--texto-2);
  font-weight: 600;
  font-size: 14px;
  transition: color .25s;
}
.modo:hover { color: var(--texto); }
.modo.ativo { color: var(--lima-tinta); }
.modos-indicador {
  position: absolute;
  top: 4px; bottom: 4px; left: 0;
  border-radius: 999px;
  background: var(--lima);
  box-shadow: 0 6px 20px -6px var(--lima-brilho);
  transition: transform .45s var(--curva), width .45s var(--curva);
}

.acoes-topo { justify-self: end; display: inline-flex; gap: 8px; }
.botao-icone {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--borda);
  background: transparent;
  color: var(--texto-2);
  transition: background-color .2s, color .2s, border-color .2s;
}
.botao-icone:hover { background: var(--superficie-3); color: var(--texto); }
.botao-icone.ligado { color: var(--lima-texto); border-color: var(--lima-borda); background: var(--lima-suave); }
.botao-icone.pequeno { width: 34px; height: 34px; border-radius: 10px; }

/* ---------- Palco ---------- */
.palco {
  grid-area: palco;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  overflow-x: hidden;
  overflow-y: auto;
  gap: clamp(14px, 2.4vh, 28px);
  padding: clamp(16px, 3vh, 40px) 24px;
  min-width: 0;
}
.palco::before {
  content: "";
  position: absolute;
  inset: 10% 15%;
  background: radial-gradient(closest-side, var(--brilho-palco), transparent);
  pointer-events: none;
  opacity: .8;
  transition: opacity .6s;
}
.palco.girando::before { opacity: 1.4; }
.palco > * { position: relative; flex-shrink: 0; }

.palco-cabecalho { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.evento {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--texto-2);
}
.premio {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--azul-suave);
  color: var(--azul);
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 17px);
  max-width: min(640px, 90vw);
}
.premio span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.visor-bloco { width: 100%; display: flex; flex-direction: column; align-items: center; }
.rotulo-resultado {
  margin: 0 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--lima-texto);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s, transform .5s var(--curva);
}
.rotulo-resultado svg.lucide { width: 16px; height: 16px; }
.visor-bloco.revelado .rotulo-resultado { opacity: 1; transform: none; }

/* ---------- Visor e rolos ---------- */
.visor {
  --lh: 1;
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  font-family: var(--fonte-visor);
  font-weight: 400;
  color: var(--lima-texto);
  line-height: 1;
  height: calc(var(--lh) * 2.35em);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
  user-select: none;
}
.visor-numeros { font-size: clamp(4rem, min(24vw, calc((100dvh - 480px) / 2.4)), 21rem); gap: 0.02em; }
.visor-nomes { --lh: 1.2; font-size: clamp(2.4rem, min(10.5vw, calc((100dvh - 480px) / 2.7)), 10rem); }
.visor-vazio { -webkit-mask-image: none; mask-image: none; height: auto; font-size: 16px; }

.rolo { position: relative; height: 100%; }
.rolo.digito { width: 0.5em; }
.rolo.nome { width: 100%; }
.trilho { position: absolute; inset: 0; transform-origin: 50% 50%; }
.palco.girando .trilho { will-change: filter, transform; }
.palco.girando .linha { will-change: transform, opacity; }
.linha {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: calc(var(--lh) * 1em);
  margin-top: calc(var(--lh) * -0.5em);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.linha span { display: block; padding-top: 0.06em; transform-origin: 50% 55%; }
.visor.ocioso .linha span { opacity: .28; }
.visor-nomes .linha span { letter-spacing: 0.01em; }

.visor.vencedor .linha.centro span {
  text-shadow: 0 0 0.18em var(--lima-brilho), 0 0 0.6em var(--lima-suave);
  animation: pulso 1.1s var(--curva) both;
}
@keyframes pulso {
  0% { scale: 1; }
  30% { scale: 1.08; }
  100% { scale: 1; }
}

.vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 24px;
  text-align: center;
  font-family: var(--fonte-texto);
  color: var(--texto-2);
}
.vazio-icone {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: var(--lima-suave);
  color: var(--lima-texto);
}
.vazio-icone svg.lucide { width: 28px; height: 28px; }
.vazio h2 { margin: 0; font-family: var(--fonte-titulo); font-weight: 700; font-size: 24px; color: var(--texto); letter-spacing: -0.01em; }
.vazio p { margin: 0; max-width: 380px; }

.status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--texto-2);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.status .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--lima-texto); box-shadow: 0 0 0 4px var(--lima-suave); }
.status.alerta { color: var(--ambar); }
.status.alerta .ponto { background: var(--ambar); box-shadow: 0 0 0 4px var(--ambar-suave); }

/* ---------- Botão SORTEAR ---------- */
.botao-sortear {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: min(480px, 100%);
  height: clamp(76px, 11vh, 104px);
  padding: 0 48px;
  border: 0;
  border-radius: 999px;
  background: var(--lima);
  color: var(--lima-tinta);
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px var(--lima-borda), 0 24px 70px -18px var(--lima-brilho), inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  transition: transform .2s var(--curva), box-shadow .3s, filter .3s;
}
.botao-sortear svg.lucide { width: clamp(40px, 4vw, 52px); height: clamp(40px, 4vw, 52px); stroke-width: 2; }
.botao-sortear-texto {
  font-family: var(--fonte-visor);
  font-weight: 400;
  font-size: clamp(44px, 4.6vw, 64px);
  letter-spacing: 0.06em;
  line-height: 1;
  padding-top: 0.08em;
}
.botao-sortear kbd {
  background: rgba(11, 15, 0, 0.12);
  border-color: rgba(11, 15, 0, 0.18);
  color: rgba(11, 15, 0, 0.7);
  letter-spacing: 0.04em;
  text-transform: none;
}
.botao-sortear::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg) translateX(-120%);
  pointer-events: none;
}
.botao-sortear:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--lima-borda), 0 30px 80px -16px var(--lima-brilho), inset 0 -4px 0 rgba(0, 0, 0, 0.12); }
.botao-sortear:hover::after { animation: brilho 1s var(--curva); }
.botao-sortear:active { transform: translateY(0) scale(0.97); }
.botao-sortear:disabled { cursor: not-allowed; filter: saturate(.4) brightness(.75); transform: none; box-shadow: 0 0 0 1px var(--lima-borda); }
.botao-sortear.girando { filter: none; cursor: progress; }
.botao-sortear.girando svg.lucide { animation: girar .7s linear infinite; }

/* Tremor de chamada: o botão parado pede o clique a cada poucos segundos */
.botao-sortear:not(:disabled):not(:hover) { animation: tremer 3.4s ease-in-out infinite; }
.botao-sortear:not(:disabled):not(:hover) svg.lucide { animation: chacoalhar 3.4s ease-in-out infinite; }
@keyframes tremer {
  0%, 74%, 100% { translate: 0 0; rotate: 0deg; }
  76% { translate: -6px 0; rotate: -1.6deg; }
  79% { translate: 6px 0; rotate: 1.6deg; }
  82% { translate: -5px 0; rotate: -1.2deg; }
  85% { translate: 5px 0; rotate: 1.2deg; }
  88% { translate: -3px 0; rotate: -0.6deg; }
  91% { translate: 2px 0; rotate: 0.4deg; }
  94% { translate: 0 0; rotate: 0deg; }
}
@keyframes chacoalhar {
  0%, 74%, 100% { rotate: 0deg; scale: 1; }
  77% { rotate: -22deg; scale: 1.12; }
  81% { rotate: 18deg; scale: 1.12; }
  85% { rotate: -14deg; scale: 1.08; }
  89% { rotate: 8deg; scale: 1.04; }
  93% { rotate: 0deg; scale: 1; }
}
@keyframes brilho { to { transform: skewX(-18deg) translateX(560%); } }
@keyframes girar { to { rotate: 360deg; } }

.ultimos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 34px; max-width: 760px; }
.ultimos-rotulo { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-3); align-self: center; margin-right: 4px; }
.ficha {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--borda);
  background: var(--superficie);
  font-family: var(--fonte-visor);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--texto-2);
  padding-top: 2px;
  animation: entrar .5s var(--curva) both;
}
.ficha.atual { color: var(--lima-texto); border-color: var(--lima-borda); background: var(--lima-suave); }

/* ---------- Painel ---------- */
.painel {
  grid-area: painel;
  width: 0;
  overflow: hidden;
  border-left: 1px solid transparent;
  background: var(--superficie);
  transition: width .45s var(--curva), border-color .3s;
  position: relative;
  z-index: 4;
}
.app.painel-aberto .painel { width: var(--painel-largura); border-left-color: var(--borda); }
.painel-interno { width: var(--painel-largura); height: 100%; display: flex; flex-direction: column; }
.painel-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 14px 14px;
  border-bottom: 1px solid var(--borda);
}
.abas { display: flex; gap: 2px; }
.aba {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--texto-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color .2s, color .2s;
}
.aba svg.lucide { width: 16px; height: 16px; }
.aba:hover { color: var(--texto); background: var(--superficie-3); }
.aba.ativa { color: var(--texto); background: var(--superficie-3); }
.aba.ativa svg.lucide { color: var(--lima-texto); }
.aba-contador {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--lima-suave);
  color: var(--lima-texto);
  font-size: 11px;
  font-weight: 700;
}
.painel-rolagem { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.aba-conteudo { display: none; flex-direction: column; gap: 18px; padding: 20px 18px 28px; }
.aba-conteudo.ativa { display: flex; animation: entrar .35s var(--curva); }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } }

.grupo { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--borda); }
.grupo-titulo { margin: 0; font-family: var(--fonte-titulo); font-weight: 700; font-size: 15px; letter-spacing: -0.005em; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.campo { display: flex; flex-direction: column; gap: 7px; }
.campo-rotulo { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.campo-rotulo em { font-style: normal; font-weight: 500; color: var(--texto-3); margin-left: 4px; }
.campo input, .adicionar input, .area-colar textarea, .busca input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--borda);
  background: var(--superficie-2);
  color: var(--texto);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.campo input[type="number"] { font-variant-numeric: tabular-nums; font-weight: 600; }
.campo input:focus, .adicionar input:focus, .area-colar textarea:focus, .busca input:focus {
  border-color: var(--lima-borda);
  box-shadow: 0 0 0 4px var(--lima-suave);
}
.campo input.invalido { border-color: var(--vermelho); box-shadow: 0 0 0 4px var(--vermelho-suave); }
.campo-erro { margin: -4px 0 0; font-size: 13px; color: var(--vermelho); font-weight: 500; }
.campo-com-icone { position: relative; display: block; }
.campo-com-icone svg.lucide { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--azul); width: 17px; height: 17px; }
.campo-com-icone input { padding-left: 42px; }
.area-colar textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 120px; line-height: 1.5; }

.chave { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; font-weight: 500; }
.chave input { position: absolute; opacity: 0; pointer-events: none; }
.chave-trilho {
  position: relative;
  flex: none;
  width: 40px; height: 24px;
  border-radius: 999px;
  background: var(--superficie-3);
  border: 1px solid var(--borda-forte);
  transition: background-color .25s, border-color .25s;
}
.chave-trilho::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--texto-3);
  transition: transform .3s var(--curva), background-color .25s;
}
.chave input:checked + .chave-trilho { background: var(--lima); border-color: var(--lima); }
.chave input:checked + .chave-trilho::after { transform: translateX(16px); background: var(--lima-tinta); }
.chave input:focus-visible + .chave-trilho { outline: 2px solid var(--lima-texto); outline-offset: 2px; }

.linha-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.linha-info-acoes { display: flex; gap: 4px; }
.selo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.selo-lima { background: var(--lima-suave); color: var(--lima-texto); }
.selo-ambar { background: var(--ambar-suave); color: var(--ambar); }

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.botao:active { transform: scale(.97); }
.botao svg.lucide { width: 17px; height: 17px; }
.botao-primario { background: var(--lima); color: var(--lima-tinta); }
.botao-primario:hover { filter: brightness(1.06); }
.botao-secundario { background: var(--superficie-2); border-color: var(--borda); color: var(--texto); }
.botao-secundario:hover { border-color: var(--borda-forte); background: var(--superficie-3); }
.botao-secundario svg.lucide { color: var(--azul); }
.botao-fantasma { background: transparent; color: var(--texto-2); border-color: var(--borda); }
.botao-fantasma:hover { color: var(--texto); background: var(--superficie-3); }
.botao-perigo { background: var(--vermelho-suave); color: var(--vermelho); border-color: transparent; }
.botao-perigo:hover { background: var(--vermelho); color: #fff; }
.botao.largo { width: 100%; margin-top: 6px; }

.botao-texto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--texto-2);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .2s, color .2s;
}
.botao-texto svg.lucide { width: 15px; height: 15px; }
.botao-texto:hover { background: var(--superficie-3); color: var(--texto); }
.botao-texto.perigo:hover { background: var(--vermelho-suave); color: var(--vermelho); }
.botao-texto:disabled { opacity: .4; pointer-events: none; }

.adicionar { display: flex; gap: 8px; }
.adicionar input { flex: 1; min-width: 0; }
.acoes-lista { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acoes-lista .botao { height: 40px; font-size: 13px; }
.area-colar { display: flex; flex-direction: column; gap: 10px; animation: entrar .3s var(--curva); }
.area-colar-acoes { display: flex; justify-content: flex-end; gap: 8px; }

.lista-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.busca { position: relative; flex: 0 1 170px; }
.busca svg.lucide { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 15px; height: 15px; color: var(--texto-3); }
.busca input { height: 36px; padding-left: 34px; font-size: 13.5px; border-radius: 10px; }

.lista-nomes, .lista-historico { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lista-nomes { max-height: 42vh; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.lista-nomes li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 6px 4px 12px;
  border-radius: 10px;
  transition: background-color .2s;
  animation: entrar .3s var(--curva) both;
}
.lista-nomes li:hover { background: var(--superficie-3); }
.lista-nomes .numero { width: 26px; flex: none; font-size: 12px; font-weight: 600; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.lista-nomes .nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lista-nomes li.ganhou .nome { color: var(--texto-2); }
.lista-nomes .selo { height: 22px; font-size: 11px; padding: 0 8px; }
.lista-nomes .selo svg.lucide { width: 12px; height: 12px; }
.lista-nomes .remover {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--texto-3);
  opacity: 0;
  transition: opacity .2s, background-color .2s, color .2s;
}
.lista-nomes .remover svg.lucide { width: 15px; height: 15px; }
.lista-nomes li:hover .remover, .lista-nomes .remover:focus-visible { opacity: 1; }
.lista-nomes .remover:hover { background: var(--vermelho-suave); color: var(--vermelho); }
.lista-vazia { padding: 22px 12px; text-align: center; color: var(--texto-3); font-size: 13.5px; border: 1px dashed var(--borda-forte); border-radius: 12px; }
.lista-rodape { display: flex; justify-content: space-between; gap: 8px; }

.lista-historico li.lista-vazia { display: block; }
.lista-historico li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--borda);
  background: var(--superficie-2);
  animation: entrar .35s var(--curva) both;
}
.historico-tipo {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
}
.historico-tipo.numero { background: var(--lima-suave); color: var(--lima-texto); }
.historico-tipo.nome { background: var(--azul-suave); color: var(--azul); }
.historico-tipo svg.lucide { width: 16px; height: 16px; }
.historico-corpo { min-width: 0; }
.historico-valor { font-family: var(--fonte-visor); font-size: 26px; line-height: 1.05; letter-spacing: .02em; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 2px; }
.historico-premio { font-size: 12.5px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.historico-meta { text-align: right; font-size: 12px; color: var(--texto-3); font-variant-numeric: tabular-nums; line-height: 1.4; }
.historico-meta strong { display: block; color: var(--texto-2); font-weight: 700; }

.segmentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--borda); background: var(--superficie-2); }
.segmentos button { height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--texto-2); font-weight: 600; font-size: 13.5px; transition: background-color .2s, color .2s; }
.segmentos button:hover { color: var(--texto); }
.segmentos button.ativo { background: var(--lima-suave); color: var(--lima-texto); box-shadow: inset 0 0 0 1px var(--lima-borda); }

.nota { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--superficie-2); border: 1px solid var(--borda); }
.nota svg.lucide { color: var(--azul); margin-top: 2px; }
.nota p { margin: 0; font-size: 13px; color: var(--texto-2); line-height: 1.55; }
.nota strong { color: var(--texto); font-weight: 600; }
.atalhos { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.atalhos div { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--texto-2); }
.atalhos dt { width: 64px; }
.atalhos dd { margin: 0; }

.painel-fundo { display: none; }

/* ---------- Rodapé ---------- */
.rodape { grid-area: rodape; display: flex; justify-content: center; padding: 12px 24px 18px; }
.rodape-marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--texto-3);
  text-decoration: none;
  font-family: var(--fonte-titulo);
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.rodape-marca:hover { color: var(--texto); background: var(--superficie); }
.rodape-marca .marca-simbolo { width: 34px; height: 18px; color: currentColor; }
.rodape-marca strong { font-weight: 700; color: var(--texto); }

/* ---------- Avisos ---------- */
.avisos { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.aviso {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px 12px 14px;
  border-radius: 14px;
  background: var(--superficie-3);
  border: 1px solid var(--borda-forte);
  box-shadow: var(--sombra);
  font-size: 14px;
  font-weight: 500;
  animation: aviso-entra .4s var(--curva) both;
}
.aviso.saindo { animation: aviso-sai .3s ease both; }
.aviso svg.lucide { color: var(--lima-texto); }
.aviso.alerta svg.lucide { color: var(--ambar); }
.aviso.erro svg.lucide { color: var(--vermelho); }
@keyframes aviso-entra { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes aviso-sai { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); animation: entrar .25s ease; }
.modal-caixa { width: min(420px, 100%); padding: 26px; border-radius: var(--raio-g); background: var(--superficie); border: 1px solid var(--borda); box-shadow: var(--sombra); }
.modal-icone { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--vermelho-suave); color: var(--vermelho); margin-bottom: 14px; }
.modal h2 { margin: 0 0 6px; font-family: var(--fonte-titulo); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.modal p { margin: 0 0 22px; color: var(--texto-2); font-size: 14px; }
.modal-acoes { display: flex; justify-content: flex-end; gap: 8px; }

.confete { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------- Tela cheia: palco limpo ---------- */
.app.tela-cheia .topo { border-bottom-color: transparent; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "topo" "palco" "rodape"; }
  .painel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(var(--painel-largura), 100vw) !important;
    border-left: 1px solid var(--borda);
    transform: translateX(100%);
    transition: transform .45s var(--curva);
    z-index: 30;
    box-shadow: var(--sombra);
  }
  .painel-interno { width: 100%; }
  .app.painel-aberto .painel { transform: none; }
  .painel-fundo { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .app.painel-aberto .painel-fundo { opacity: 1; pointer-events: auto; }
}
@media (max-width: 640px) {
  .topo { grid-template-columns: auto 1fr; padding: 12px 16px; }
  .modos { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .marca-texto { display: none; }
  .botao-icone { width: 38px; height: 38px; }
  #bt-tema { display: none; }
  .palco { padding: 16px; }
  .botao-sortear { padding: 0 24px; min-width: 100%; font-size: 20px; letter-spacing: 0.08em; gap: 12px; white-space: nowrap; }
  .botao-sortear svg.lucide { width: 34px; height: 34px; }
  .botao-sortear-texto { font-size: 34px; }
  .visor-nomes { font-size: clamp(2.2rem, 12.5vw, 4.5rem); }
  .botao-sortear kbd { display: none; }
}
@media (max-height: 640px) {
  .ultimos { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}