:root {
  --bg: #fff7f2;
  --card: #ffffff;
  --ink: #3b3355;
  --muted: #7a7191;
  --line: #efe6ee;
  --pink: #ff8fab;
  --pink-dark: #f0628a;
  --accent-light: #ffd1dc;
  --accent-soft: #fff0f4;
  --accent-track: #f3e8ef;
  --accent-shadow: #d94f78;
  --accent-glow: rgba(240, 98, 138, .3);
  --blue: #8ecae6;
  --yellow: #ffe28a;
  --mint: #a8e6cf;
  --lilac: #cdb4db;
  --shadow: 0 8px 24px rgba(59, 51, 85, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 520px; width: 100%; margin: 0 auto; padding: 14px 16px 6px;
}
.brand { font-weight: 900; font-size: 18px; letter-spacing: -.2px; }
.brand-dot { margin-right: 4px; }
.mute {
  border: 0; background: var(--card); border-radius: 999px; width: 40px; height: 40px;
  font-size: 18px; box-shadow: var(--shadow); cursor: pointer;
}

.progress { max-width: 520px; width: 100%; margin: 0 auto; padding: 4px 16px 0; }
.progress-bar { height: 10px; background: var(--accent-track); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--accent-light));
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}
.progress-label { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 700; }

.app { flex: 1; max-width: 520px; width: 100%; margin: 0 auto; padding: 12px 16px 32px; }

.screen { animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 12px; font-weight: 900; letter-spacing: -.4px; }
h2 { font-size: 22px; line-height: 1.25; margin: 6px 0 8px; font-weight: 900; }
h3 { font-size: 18px; margin: 0 0 8px; font-weight: 800; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.highlight { background: linear-gradient(transparent 60%, var(--yellow) 60%); }

.hero-emoji { font-size: 72px; text-align: center; margin: 16px 0 4px; animation: pop .6s ease both; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 20px; }
.pill {
  background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow);
}
.center { text-align: center; }

.btn {
  display: block; width: 100%; border: 0; cursor: pointer; text-align: center; text-decoration: none;
  font: inherit; font-weight: 900; font-size: 18px; color: #fff;
  background: linear-gradient(180deg, var(--pink), var(--pink-dark));
  padding: 18px 20px; border-radius: 999px;
  box-shadow: 0 8px 0 var(--accent-shadow), 0 14px 24px var(--accent-glow);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: translateY(4px); box-shadow: 0 4px 0 var(--accent-shadow), 0 8px 16px var(--accent-glow); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-ghost {
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700;
  text-decoration: underline; cursor: pointer; padding: 10px; display: block; margin: 8px auto 0;
}
.btn-pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

.question-title { margin-top: 10px; }
.options { display: grid; gap: 10px; margin-top: 16px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink);
  background: var(--card); border: 2px solid transparent; border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.option:hover { border-color: var(--accent-light); }
.option:active { transform: scale(.98); }
.option.selected { border-color: var(--pink); background: var(--accent-soft); }
.option-emoji { font-size: 26px; width: 34px; text-align: center; flex-shrink: 0; }
.option-check {
  margin-left: auto; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 14px; flex-shrink: 0;
}
.option.selected .option-check { background: var(--pink); border-color: var(--pink); color: #fff; }

.input {
  width: 100%; font: inherit; font-size: 18px; font-weight: 700; color: var(--ink);
  border: 2px solid var(--line); border-radius: 16px; padding: 16px; margin: 16px 0; background: var(--card);
}
.input:focus { outline: none; border-color: var(--pink); }

.toast {
  margin-top: 14px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; font-weight: 700;
  font-size: 15px; animation: fadeUp .3s ease both;
}

.card {
  background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 16px 0;
}

.slider-block { margin: 18px 0; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.slider-value { font-size: 22px; color: var(--pink-dark); font-weight: 900; }
input[type="range"] { width: 100%; accent-color: var(--pink); height: 32px; }
.calc-status { font-weight: 800; text-align: center; margin: 0 0 12px; min-height: 24px; color: var(--muted); }
.calc-status.done { color: var(--ink); animation: pop .4s ease both; }
.calc-chart { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; }
.calc-col { background: var(--bg); border-radius: 14px; padding: 10px 6px 12px; text-align: center; }
.calc-col strong { display: block; font-size: 19px; font-weight: 900; margin-top: 8px; font-variant-numeric: tabular-nums; }
.calc-col span { font-size: 12px; color: var(--muted); font-weight: 700; }
.calc-bar-wrap { height: 110px; display: flex; align-items: flex-end; justify-content: center; }
.calc-bar {
  width: 56%; height: 0; border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--accent-light), var(--pink));
  transition: height 2.2s cubic-bezier(.2, .8, .2, 1);
}
.calc-bar-max { background: linear-gradient(180deg, var(--pink), var(--pink-dark)); }
.calc-result { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.calc-cell { background: var(--bg); border-radius: 14px; padding: 12px 6px; text-align: center; }
.calc-cell strong { display: block; font-size: 19px; font-weight: 900; }
.calc-cell span { font-size: 12px; color: var(--muted); font-weight: 700; }

.loading-list { list-style: none; padding: 0; margin: 24px 0; }
.loading-list li {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; font-weight: 700; color: var(--muted);
  transition: color .3s ease;
}
.loading-list li.done { color: var(--ink); }
.loading-dot {
  width: 26px; height: 26px; border-radius: 999px; background: var(--line);
  display: grid; place-items: center; font-size: 14px; color: #fff; flex-shrink: 0; transition: background .3s ease;
}
.loading-list li.done .loading-dot { background: var(--mint); }
.loading-list li.active .loading-dot { animation: pulse 0.8s ease-in-out infinite; background: var(--yellow); }

.result-hero { text-align: center; border-radius: var(--radius); padding: 24px 16px; margin-top: 8px; }
.result-emoji { font-size: 84px; animation: pop .7s ease both; }
.hero-img {
  display: block; width: 100%; height: auto; border-radius: 24px; margin: 8px 0 4px;
  box-shadow: var(--shadow); animation: pop .6s ease both;
}
.result-img {
  display: block; width: 76%; max-width: 300px; height: auto; margin: 0 auto 6px;
  border-radius: 28px; box-shadow: 0 10px 28px rgba(59, 51, 85, .12); animation: pop .7s ease both;
}
.result-kicker { font-weight: 800; color: var(--muted); margin: 6px 0 0; }
.result-title { font-size: 32px; margin: 4px 0 8px; }
.badge {
  display: inline-block; background: var(--card); border-radius: 999px; padding: 6px 14px;
  font-weight: 800; font-size: 14px; box-shadow: var(--shadow);
}
.list { padding-left: 0; list-style: none; margin: 8px 0 0; }
.list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.list li::before { content: attr(data-icon); position: absolute; left: 0; top: 0; }
.alert { background: #fff6d9; border-left: 5px solid #f4c542; border-radius: 12px; padding: 12px 14px; font-weight: 700; }

.offer { border: 3px solid var(--pink); }
.offer-tag {
  display: inline-block; background: var(--pink); color: #fff; font-weight: 900; font-size: 13px;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.peek { margin: 18px -20px 4px; padding: 16px 20px 6px; background: var(--accent-soft); }
.peek h3 { margin-bottom: 10px; }
.peek-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.peek-stats span { background: var(--card); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.peek-stats strong { color: var(--pink-dark); font-weight: 900; }
.peek-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; }
.peek-strip figure { flex: 0 0 62%; margin: 0; scroll-snap-align: start; }
.peek-strip img { display: block; width: 100%; height: auto; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(59, 51, 85, .14); }
.peek-strip figcaption { font-size: 13px; font-weight: 800; margin-top: 8px; line-height: 1.3; }
.peek-hint { font-size: 12px; color: var(--muted); font-weight: 700; text-align: center; margin: 0 0 6px; }
.price { font-size: 44px; font-weight: 900; color: var(--pink-dark); line-height: 1; margin: 12px 0 4px; }
.price small { font-size: 16px; color: var(--muted); font-weight: 700; }
.guarantee { display: flex; gap: 12px; align-items: center; }
.guarantee-seal { font-size: 44px; }

.faq details { background: var(--card); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { font-weight: 800; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.sticky-cta {
  position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%);
}

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

.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 20px 16px 28px; }
.footer p { margin: 4px 0; }
.footer a { color: var(--muted); }

/* upsell e downsell */
.order-ok {
  display: flex; gap: 10px; align-items: center; background: #e4f7ee; border-radius: 14px;
  padding: 12px 14px; font-size: 15px; margin-top: 4px;
}
.order-ok-icon { font-size: 24px; }
.kid-name { color: var(--pink-dark); font-weight: 900; }
.funnel-steps { display: flex; gap: 6px; margin: 14px 0 4px; }
.funnel-steps span { flex: 1; height: 8px; border-radius: 999px; background: var(--accent-track); }
.funnel-steps span.on { background: var(--pink); }
.down-cover { display: block; width: 56%; max-width: 220px; height: auto; margin: 4px auto 14px; border-radius: 12px; box-shadow: 0 6px 18px rgba(59, 51, 85, .14); }
.cakto-box { margin-top: 16px; min-height: 64px; }
cakto-upsell-buttons { display: block; }
cakto-upsell-accept::part(button) {
  display: block; width: 100%; border: 0; cursor: pointer;
  font-family: "Nunito", system-ui, sans-serif; font-weight: 900; font-size: 18px; color: #fff;
  background: linear-gradient(180deg, var(--pink), var(--pink-dark));
  padding: 18px 20px; border-radius: 999px;
  box-shadow: 0 8px 0 var(--accent-shadow), 0 14px 24px var(--accent-glow);
}
cakto-upsell-reject::part(button) {
  display: block; margin: 14px auto 0; border: 0; background: none; cursor: pointer;
  font-family: "Nunito", system-ui, sans-serif; font-weight: 700; font-size: 15px; color: var(--muted);
  text-decoration: underline;
}

/* páginas legais */
.legal h1 { font-size: 26px; }
.legal h2 { font-size: 18px; margin-top: 24px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--pink-dark); }

/* cores por perfil */
.p-AN { background: linear-gradient(180deg, #e8f6fb, #fff); }
.p-ME { background: linear-gradient(180deg, #f1e8f7, #fff); }
.p-CO { background: linear-gradient(180deg, #fff1d6, #fff); }
.p-DI { background: linear-gradient(180deg, #e4f7ee, #fff); }

/* tema azul quando a resposta é "menino" (--pink passa a ser a cor de destaque do tema) */
body.theme-boy {
  --pink: #6cb4e8;
  --pink-dark: #3f8fd2;
  --accent-light: #c9e4f8;
  --accent-soft: #eef7fe;
  --accent-track: #e3eef7;
  --accent-shadow: #2f78b8;
  --accent-glow: rgba(63, 143, 210, .3);
  --bg: #f4f9fd;
}
body { transition: background .4s ease; }
