/* Visual baseado nas telas de prototipo/ */
:root {
  --bg: #ffffff;
  --soft: #f4f6f3;
  --ink: #1c2321;
  --muted: #5b6661;
  --line: #c9d0cb;
  --line-soft: #dde2de;
  --dash: #9aa59f;
  --red: #b03227;
  --red-dark: #8e2a20;
  --red-soft: #fdecea;
  --green: #1e6b4f;
  --green-dark: #174f3b;
  --green-deep: #17583f;
  --green-soft: #e6eee9;
  --warn-bg: #fff4e5;
  --warn-ink: #6b4100;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-text-size-adjust: 100%; min-height: 100vh;
}
body.tema-soft { background: var(--soft); }
body.tema-verde { background: var(--green); }
body.tema-vermelho { background: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app {
  max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; z-index: 0; overflow: hidden;
  padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 14px;
}
.app.pad-top { padding-top: 40px; }
.app.tight { padding: 20px 20px 24px; gap: 12px; }
.app.center-col { align-items: center; text-align: center; padding-top: 48px; gap: 22px; }

/* enfeites em contorno ao fundo */
.deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.deco svg { position: absolute; }

/* ---------- textos ---------- */
h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 800; }
h1.big { font-size: 30px; }
p { margin: 0; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--green); letter-spacing: .08em; text-transform: uppercase; }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--muted); }
.center { text-align: center; }
.on-color, .on-color .tiny, .on-color .eyebrow { color: #fff; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-6 { display: flex; flex-direction: column; gap: 6px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.push { margin-top: auto; }

/* ---------- botões ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 54px; padding: 0 20px; border-radius: 16px; border: 0; background: var(--red); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { color: #fff; background: var(--red-dark); }
.btn.green { background: var(--green); }
.btn.green:hover { background: var(--green-dark); }
.btn.dark { background: var(--ink); min-height: 44px; border-radius: 12px; font-size: 15px; }
.btn.outline { background: #fff; color: var(--ink); border: 1px solid var(--line); min-height: 48px; font-size: 15px; }
.btn.outline:hover { background: var(--soft); color: var(--ink); }
.btn.white { background: #fff; color: var(--green); }
.btn.white.red-text { color: var(--red); }
.btn.white:hover { background: #f0f0f0; }
.btn.ghost-white { background: transparent; border: 1px solid #fff; color: #fff; min-height: 48px; font-size: 15px; }
.btn.ghost-white:hover { background: rgba(255,255,255,.1); }
.btn.dashed { background: #fff; border: 1px dashed var(--dash); color: var(--green); min-height: 44px; border-radius: 12px; font-size: 14px; }
.btn.dashed:hover { background: var(--soft); color: var(--green); }
.btn.sm { min-height: 40px; width: auto; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.line-green { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.line-green:hover { background: var(--green-soft); color: var(--green); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.nav-row { display: flex; gap: 12px; }
.nav-row .btn.outline { width: auto; min-height: 54px; font-size: 16px; }
.link { background: none; border: 0; padding: 12px 0; font-size: 14px; font-weight: 700; color: var(--red); cursor: pointer; text-decoration: underline; }
.link.white { color: #fff; }

.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: var(--ink);
}
.icon-btn.round { border-radius: 50%; background: var(--green-soft); }

/* ---------- topo dos passos ---------- */
.step-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.step-head .step { flex: 1; font-size: 13px; font-weight: 700; color: var(--green); }
.step-head .note { font-size: 13px; color: var(--muted); text-align: right; }
.bar { height: 6px; border-radius: 3px; background: var(--green-soft); }
.bar > div { height: 100%; border-radius: 3px; background: var(--green); transition: width .3s; }
.bar.thick { height: 8px; border-radius: 4px; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 14px; font-weight: 700; }
.lbl .opt, .field .opt { font-weight: 400; color: var(--muted); }
.input {
  width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px;
  font-size: 15px; background: #fff; outline: none;
}
.input.h44 { height: 44px; }
.input.dashed { border-style: dashed; border-color: var(--dash); }
select.input { padding: 0 10px; }
textarea.input { height: auto; min-height: 80px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 107, 79, .15); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.error { color: var(--red); font-weight: 700; font-size: 14px; }
.error:empty { display: none; }

.phone-row { display: flex; gap: 8px; }
.phone-row .ddi {
  height: 52px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center;
  font-weight: 600; background: var(--soft);
}
.phone-row select.ddi { font-size: 15px; cursor: pointer; padding: 0 8px; flex: none; }
.phone-row .input { height: 52px; border-radius: 14px; font-size: 17px; flex: 1; min-width: 0; }

/* etiquetas */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.chip.on { border: 2px solid var(--green); background: var(--green-soft); color: var(--green-dark); }
.chip.on-red { border: 2px solid var(--red); background: var(--red-soft); color: var(--red-dark); }
.chip.add { border-style: dashed; border-color: var(--dash); color: var(--muted); }
.chip.sm { min-height: 36px; padding: 0 10px; border-radius: 18px; font-size: 13px; }
.tag { padding: 6px 12px; border-radius: 14px; background: var(--green-soft); font-size: 13px; font-weight: 600; color: var(--green-dark); }
.tag.red { background: var(--red-soft); color: var(--red-dark); }
.tag.lg { padding: 8px 12px; border-radius: 16px; font-weight: 700; }

/* escolha sim/não */
.toggle {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.toggle.on { border: 2px solid var(--red); background: var(--red-soft); color: var(--red-dark); font-weight: 700; }

/* faixas de valor (radio) */
.radio {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); font-size: 15px; cursor: pointer;
}
.radio input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; }
.radio.on { border: 2px solid var(--red); background: var(--red-soft); font-weight: 600; }

/* lista de nomes */
.names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.names button { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.names button:hover { border-color: var(--red); }

/* ---------- caixinhas ---------- */
.tile { background: var(--soft); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-size: 17px; font-weight: 700; }
.box { background: #fff; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.box.bordered { border: 1px solid var(--line-soft); }
.box .t { font-size: 14px; font-weight: 700; color: var(--green); }
.box .t.red { color: var(--red); }
.box .t.ink { color: var(--ink); font-size: 15px; }
.soft-box { background: var(--soft); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.warn { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13px; line-height: 1.4; }
.alert { background: var(--red-soft); border: 1px solid #f3c6c1; color: var(--red-dark); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.ok-box { background: var(--green-soft); color: var(--green-dark); border-radius: 14px; padding: 12px 14px; font-size: 14px; }

.initial {
  width: 88px; height: 88px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; flex: none; overflow: hidden;
}
.initial.md { width: 64px; height: 64px; font-size: 26px; }
.initial.sm { width: 40px; height: 40px; font-size: 15px; background: var(--green-soft); color: var(--green); font-weight: 700; }
.initial img, .avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; background: var(--green-soft); font-size: 56px; }
.avatar.md { width: 64px; height: 64px; font-size: 34px; }
.avatar.pick { width: 52px; height: 52px; font-size: 28px; background: var(--soft); border: 1px dashed var(--dash); }

.icon-box { width: 60px; height: 60px; border-radius: 20px; background: var(--red-soft); display: flex; align-items: center; justify-content: center; }

/* ---------- PIN ---------- */
.pin-boxes { display: flex; justify-content: center; gap: 12px; }
.pin-boxes div {
  width: 56px; height: 64px; border-radius: 14px; border: 2px solid var(--line-soft); background: var(--soft);
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800;
}
.pin-boxes div.cur { border-color: var(--red); }
.pin-boxes.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
.keypad button {
  min-height: 56px; border-radius: 16px; border: 1px solid var(--line-soft); background: #fff; font-size: 22px; font-weight: 700; cursor: pointer;
}
.keypad button:active { background: var(--green-soft); }
.keypad .blank { border-color: transparent; background: transparent; pointer-events: none; }
.keypad .del { background: var(--soft); }

/* ---------- dicas de presente ---------- */
.wish-item { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--soft); min-height: 44px; }
.wish-item .n { font-size: 13px; font-weight: 700; color: var(--green); }
.wish-item .tx { flex: 1; font-size: 15px; overflow-wrap: anywhere; }
.wish-item .wish-open {
  flex: 1; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; font-size: 15px; color: var(--ink);
}
.wish-item .pen { color: var(--muted); font-size: 14px; margin-left: auto; }
.wish-item { padding-left: 12px; }
.wish-item .x { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; border-radius: 10px; }

/* ---------- perguntas ---------- */
.q-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--soft); }
.q-card .q-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.q-card label { font-size: 15px; font-weight: 700; line-height: 1.35; }
.q-card .input { height: 46px; }

/* ---------- filhos ---------- */
.kid-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.kid-row .info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.kid-row .info b { font-size: 15px; }
.kid-row a, .kid-row button.link { font-size: 14px; font-weight: 700; padding: 12px 0; }

/* ---------- contagem ---------- */
.countdown { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.countdown div { background: #fff; border-radius: 16px; padding: 16px 0 12px; display: flex; flex-direction: column; gap: 2px; }
.countdown b { font-size: 34px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown div:first-child b { color: var(--red); }
.countdown small { font-size: 12px; font-weight: 600; color: var(--muted); }
.info-box { width: 100%; background: var(--green-deep); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.info-box > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.info-box span { color: #d5e6dc; }
.info-box b { color: #fff; }

/* ---------- revelação ---------- */
.reveal-card { width: 100%; background: #fff; border-radius: 24px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--ink); }
.reveal-name { display: flex; align-items: center; gap: 10px; }
.reveal-name .nm { font-size: 30px; font-weight: 800; }
.reveal-name .dots { font-size: 30px; font-weight: 800; letter-spacing: .12em; color: var(--dash); }
.top-row { width: 100%; display: flex; justify-content: space-between; align-items: center; }

/* ---------- painel ---------- */
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.people li:last-child { border-bottom: 0; }
.people .who { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; align-self: flex-start; }
.badge.ok { background: var(--green-soft); color: var(--green-dark); }
.badge.no { background: var(--red-soft); color: var(--red-dark); }
.big-value { font-size: 34px; font-weight: 800; color: var(--red); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(28, 35, 33, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 480px; border-radius: 24px 24px 0 0; padding: 22px 20px 28px; max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 600px) { .modal-bg { align-items: center; } .modal { border-radius: 24px; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-weight: 700; z-index: 60; max-width: 90vw; text-align: center;
}

/* ---------- animações de Natal (do protótipo) ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
@keyframes cair { 0% { transform: translateY(-60px) rotate(0deg); opacity: 0; } 10% { opacity: .35; } 90% { opacity: .35; } 100% { transform: translateY(110vh) rotate(200deg); opacity: 0; } }
.neve { position: absolute; top: 0; font-size: 18px; animation: cair linear infinite; }
@keyframes chuva { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(105vh) scale(1.1) rotate(160deg); opacity: .9; } }
.chuva { position: absolute; top: 0; font-size: 30px; animation: chuva 1.8s ease-in forwards; }
@media (prefers-reduced-motion: reduce) {
  .neve, .chuva { animation: none; display: none; }
  .pin-boxes.shake { animation: none; }
}

/* progresso dos perfis (tela de espera do sorteio) */
.progress-card { width: 100%; background: #fff; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.progress-card > div:first-child { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.progress-card b { font-size: 40px; font-weight: 800; color: var(--red); line-height: 1; }
.progress-card span { font-size: 15px; font-weight: 600; color: var(--muted); }
