:root {
  --bg: #fff6ee;
  --bg2: #ffe9d6;
  --card: #ffffff;
  --ink: #3b2a24;
  --muted: #9b8579;
  --primary: #e7503a;   /* vermelho pata */
  --primary-d: #c73c28;
  --accent: #f4a63b;    /* dourado */
  --line: #f0dccb;
  --ok: #58b368;
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg2), transparent 60%),
    var(--bg);
  min-height: 100dvh;
}

.app { max-width: 520px; margin: 0 auto; padding: 20px 18px 32px; display: flex; flex-direction: column; min-height: 100dvh; }

.topo { text-align: center; margin: 8px 0 14px; }
.topo h1 { font-family: "Baloo 2", cursive; font-weight: 800; font-size: 40px; margin: 0; color: var(--primary); letter-spacing: .5px; }
.topo .sub { margin: 2px 0 0; color: var(--muted); font-weight: 700; font-size: 16px; }

.abas { display: flex; gap: 8px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 5px; margin-bottom: 22px; box-shadow: 0 6px 18px #e7503a14; }
.aba { flex: 1; border: none; background: none; font-family: "Baloo 2", cursive; font-weight: 600; font-size: 15px; color: var(--muted); padding: 11px 8px; border-radius: 999px; cursor: pointer; transition: .15s; }
.aba.ativa { background: var(--primary); color: #fff; box-shadow: 0 6px 14px #e7503a55; }

.palco { flex: 1; display: flex; flex-direction: column; align-items: center; }

.candidatos { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.chip { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 800; color: var(--ink); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; transition: .2s; }
.chip.on { border-color: var(--accent); background: #fff8ee; transform: translateY(-1px); }
.chip.win { border-color: var(--primary); background: var(--primary); color: #fff; transform: scale(1.06); box-shadow: 0 8px 20px #e7503a55; }

/* botão gigante */
.botao-sortear {
  position: relative; width: 190px; height: 190px; border-radius: 50%;
  border: none; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 50% 35%, #ff6a52, var(--primary) 65%, var(--primary-d));
  box-shadow: 0 14px 0 var(--primary-d), 0 22px 40px #e7503a55;
  display: grid; place-items: center; gap: 2px;
  transition: transform .08s, box-shadow .08s;
  font-family: "Baloo 2", cursive;
}
.botao-sortear .bs-emoji { font-size: 46px; line-height: 1; filter: drop-shadow(0 2px 2px #0002); }
.botao-sortear .bs-txt { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.botao-sortear:active { transform: translateY(10px); box-shadow: 0 4px 0 var(--primary-d), 0 10px 20px #e7503a55; }
.botao-sortear:disabled { filter: saturate(.7) brightness(1.02); cursor: default; }
.botao-sortear.rolando { animation: tremer .25s linear infinite; }
@keyframes tremer { 0%,100%{transform:rotate(-2deg)} 50%{transform:rotate(2deg)} }

/* resultado */
.resultado { width: 100%; margin-top: 26px; display: flex; flex-direction: column; align-items: center; }
.reveal { text-align: center; min-height: 10px; }
.nome { font-family: "Baloo 2", cursive; font-weight: 800; font-size: 30px; color: var(--ink); line-height: 1.1; }
.nome.pop { animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { 0%{transform:scale(.3);opacity:0} 100%{transform:scale(1);opacity:1} }
.tarefa { color: var(--muted); font-weight: 700; margin-top: 2px; font-size: 15px; }

.foto-wrap { margin-top: 16px; width: 100%; max-width: 340px; aspect-ratio: 1/1; border-radius: 26px; overflow: hidden; background: var(--bg2); border: 3px solid #fff; box-shadow: 0 16px 36px #c73c2822; display: none; }
.foto-wrap.show { display: block; animation: subir .5s cubic-bezier(.2,1,.3,1); }
@keyframes subir { from{transform:translateY(16px) scale(.96);opacity:0} to{transform:none;opacity:1} }
.foto-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.botao-reset { margin-top: 18px; background: #fff; border: 2px solid var(--line); color: var(--muted); font-family: "Baloo 2", cursive; font-weight: 700; font-size: 15px; padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: .15s; }
.botao-reset:hover { border-color: var(--primary); color: var(--primary); }
.botao-reset:active { transform: scale(.96); }
.hidden { display: none !important; }

.rodape { text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; margin-top: 22px; }

/* confete */
.confete { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confete i { position: absolute; top: -14px; width: 10px; height: 14px; border-radius: 2px; will-change: transform; }
@keyframes cair { to { transform: translateY(105dvh) rotate(720deg); } }

@media (max-width: 380px) {
  .botao-sortear { width: 168px; height: 168px; }
  .topo h1 { font-size: 34px; }
}
