:root {
  --bg: #F4EDE1;
  --surface: #FFFFFF;
  --ink: #2B2B2B;
  --muted: #6B6760;
  --line: #E4D8C6;
  --primary: #2F6B4F;
  --primary-dark: #24543E;
  --primary-soft: #E2EDE6;
  --accent: #C96A3F;
  --accent-dark: #AD5630;
  --accent-soft: #F6E2D6;
  --warn: #E8A317;
  --danger: #D9534F;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(30, 42, 50, .07);
  --maxw: 560px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font: inherit; color: inherit; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 237, 225, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto; height: 56px; padding: 0 12px;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
}
.back {
  width: 40px; height: 40px; border: 0; background: transparent; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.back:hover { background: var(--primary-soft); }
.back.is-hidden { visibility: hidden; }
.brand {
  justify-self: center; display: flex; align-items: center; gap: 8px;
  font-weight: 900; font-size: 20px; text-decoration: none; color: var(--ink);
}
.brand b { color: var(--accent); font-weight: 900; }
.step-count { justify-self: end; font-size: 13px; font-weight: 800; color: var(--muted); }
.progress { height: 4px; background: var(--line); }
.progress__bar {
  height: 100%; width: 0; border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, var(--primary), #4A8F6C);
  transition: width .35s ease;
}

/* ---------- Layout ---------- */
.app { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 24px 16px 130px; }
body[data-screen="landing"] .app,
body[data-screen="result"] .app { padding-bottom: 32px; }
.screen { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.footer { text-align: center; font-size: 12.5px; color: var(--muted); padding: 8px 16px 28px; display: none; }
.footer p { margin: 4px 0; }
.footer a { color: var(--muted); }
body[data-screen="landing"] .footer,
body[data-screen="result"] .footer { display: block; }

/* ---------- Titles ---------- */
.q-title { font-size: 25px; font-weight: 900; text-align: center; margin-bottom: 8px; }
.q-sub { text-align: center; color: var(--muted); margin: 0 0 4px; font-size: 16px; }

/* ---------- Landing ---------- */
.hero { text-align: center; }
.hero__img { width: 84px; height: 84px; margin: 0 auto 14px; display: block; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .08em;
  color: var(--primary); background: var(--primary-soft);
  padding: 5px 11px; border-radius: 999px; margin: 0 0 12px;
}
.hero h1 { font-size: 29px; font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: 17px; margin: 12px 0 0; line-height: 1.45; }
.landing-q { margin-top: 28px; font-size: 20px; font-weight: 900; text-align: center; }
.age-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.age-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 18px 10px 16px; background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  cursor: pointer; transition: border-color .15s, transform .1s;
}
.age-card:hover { border-color: var(--primary); }
.age-card:active { transform: scale(.98); }
.age-card.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.age-card__emoji {
  width: 78px; height: 78px; border-radius: 50%; background: var(--accent-soft);
  display: grid; place-items: center; font-size: 42px; line-height: 1; margin-bottom: 8px;
}
.age-card b { font-size: 18px; font-weight: 900; }
.age-card small { color: var(--muted); font-size: 13px; }
.age-card__go {
  margin-top: 10px; background: var(--primary); color: #fff; border-radius: 999px;
  padding: 6px 16px; font-weight: 800; font-size: 14px;
}
.legal { font-size: 12px; color: var(--muted); text-align: center; margin-top: 20px; line-height: 1.5; }

/* ---------- Options ---------- */
.options { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 15px 16px; background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.option:hover { border-color: var(--primary); }
.option:active { transform: scale(.99); }
.option.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.option__emoji { font-size: 28px; width: 40px; text-align: center; flex-shrink: 0; line-height: 1; }
.option__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.option__text b { font-size: 17px; font-weight: 800; }
.option__text small { color: var(--muted); font-size: 14px; margin-top: 2px; }
.option__arrow { color: #B7A99A; flex-shrink: 0; }
.option.is-selected .option__arrow { color: var(--primary); }
.option__check {
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid #D5C8BA; flex-shrink: 0;
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.option__check svg { opacity: 0; transition: opacity .15s; }
.option.is-selected .option__check { background: var(--primary); border-color: var(--primary); }
.option.is-selected .option__check svg { opacity: 1; }

/* ---------- Fixed action bar ---------- */
.actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 65%, rgba(244, 237, 225, 0));
}
.actions__inner { max-width: calc(var(--maxw) - 32px); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 17px 24px;
  font-weight: 900; font-size: 17px; cursor: pointer; text-decoration: none;
  transition: transform .1s, background .15s, opacity .15s, box-shadow .15s;
}
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(47, 107, 79, .28); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(201, 106, 63, .35); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn--pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }

/* ---------- Inputs ---------- */
.field {
  width: 100%; margin-top: 22px; padding: 18px;
  font: inherit; font-size: 18px; font-weight: 700; text-align: center; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.field.has-error { border-color: var(--danger); }
.hint { text-align: center; color: var(--muted); font-size: 14px; margin-top: 12px; }
.error { color: var(--danger); font-size: 14px; font-weight: 700; text-align: center; margin-top: 8px; min-height: 20px; }

/* ---------- Info screens ---------- */
.info {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 28px 20px; box-shadow: var(--shadow); text-align: center;
}
.info__emoji {
  width: 92px; height: 92px; margin: 0 auto; border-radius: 50%;
  background: var(--accent-soft); display: grid; place-items: center; font-size: 48px;
}
.info h1 { font-size: 24px; font-weight: 900; margin: 18px 0 12px; }
.info p { color: var(--muted); font-size: 17px; line-height: 1.55; margin: 0; }
.info__list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; text-align: left; }
.info__list li { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); padding: 14px; border-radius: 14px; }
.info__list .num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 900; font-size: 14px;
  display: grid; place-items: center;
}
.info__list b { display: block; font-size: 16px; }
.info__list span.txt { color: var(--muted); font-size: 14.5px; line-height: 1.45; }

/* ---------- Loading ---------- */
.loading { text-align: center; padding-top: 12px; }
.ring { position: relative; width: 150px; height: 150px; margin: 0 auto 22px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring__bg { stroke: var(--line); }
.ring__fg { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.ring__pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 900; }
.bars { display: grid; gap: 18px; margin-top: 26px; text-align: left; }
.bar__head { display: flex; justify-content: space-between; gap: 12px; font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.bar__val { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar.is-done .bar__val { color: var(--primary); }
.bar__track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; background: var(--primary); border-radius: 99px; }

/* ---------- Result ---------- */
.timer-bar {
  position: sticky; top: 64px; z-index: 5;
  background: var(--accent); color: #fff; text-align: center;
  padding: 11px 14px; border-radius: 14px; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 16px rgba(201, 106, 63, .3);
}
.timer-bar b { font-variant-numeric: tabular-nums; font-size: 17px; margin-left: 2px; }
.timer-bar s { font-weight: 700; opacity: .85; }
.timer-bar__time { display: block; font-size: 13.5px; margin-top: 2px; }
.timer-bar__time b { font-size: 15px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 22px 18px; box-shadow: var(--shadow); margin-top: 16px;
}
.card h2 { font-size: 20px; font-weight: 900; margin-bottom: 14px; }
.result-hero { text-align: center; }
.result-hero .avatar { width: 72px; height: 72px; display: block; margin: 0 auto 12px; }
.result-hero h1 { font-size: 25px; font-weight: 900; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.tag { background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px; }

.meter { margin-bottom: 16px; }
.meter:last-child { margin-bottom: 0; }
.meter__head { display: flex; justify-content: space-between; font-weight: 800; font-size: 15px; margin-bottom: 7px; }
.lvl-low { color: var(--danger); }
.lvl-mid { color: var(--warn); }
.lvl-high { color: var(--primary); }
.meter__track { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter__fill { height: 100%; width: 0; border-radius: 99px; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.meter__fill.lvl-low { background: var(--danger); }
.meter__fill.lvl-mid { background: var(--warn); }
.meter__fill.lvl-high { background: var(--primary); }

.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 5; }
.chart .line { fill: none; stroke: var(--primary); stroke-width: 3.5; stroke-linecap: round; }
.chart .axis { fill: var(--muted); font-size: 11px; font-weight: 700; font-family: inherit; }
.chart .pill { font-size: 11.5px; font-weight: 900; font-family: inherit; fill: #fff; }
.fine { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; line-height: 1.4; }
.checklist li::before {
  content: ''; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; margin-top: -1px;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F6B4F' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.offer { position: relative; text-align: center; border: 2px solid var(--primary); padding-top: 30px; }
.offer__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .06em;
  padding: 5px 14px; border-radius: 999px;
}
.offer h2 { margin-bottom: 4px; }
.offer__for { margin: 0; color: var(--muted); font-weight: 700; }
.offer__price { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 4px; flex-wrap: wrap; }
.offer__was { color: var(--muted); font-size: 15px; font-weight: 700; }
.offer__was s { font-size: 18px; }
.offer__price b { font-size: 40px; font-weight: 900; line-height: 1; color: var(--ink); }
.offer__off { background: var(--accent-soft); color: var(--accent-dark); font-weight: 900; font-size: 14px; padding: 4px 10px; border-radius: 999px; }
.offer__day { margin: 0 0 16px; color: var(--primary-dark); font-weight: 800; font-size: 14.5px; }
.bump {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; cursor: pointer;
  border: 2px dashed var(--accent); background: var(--accent-soft); border-radius: 14px; padding: 14px;
  transition: background .15s, border-color .15s;
}
.bump.is-checked { border-style: solid; }
.bump input { position: absolute; opacity: 0; pointer-events: none; }
.bump__box {
  flex-shrink: 0; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px;
  border: 2px solid var(--accent); background: #fff; display: grid; place-items: center;
}
.bump__box svg { opacity: 0; }
.bump.is-checked .bump__box { background: var(--accent); }
.bump.is-checked .bump__box svg { opacity: 1; }
.bump input:focus-visible + .bump__box { box-shadow: 0 0 0 3px var(--primary-soft); }
.bump__text b { display: block; font-size: 15.5px; font-weight: 900; color: var(--accent-dark); }
.bump__text small { display: block; color: var(--ink); font-size: 14px; line-height: 1.4; margin-top: 3px; }
.offer__total { margin: 14px 0 14px; font-weight: 800; color: var(--muted); }
.offer__total b { color: var(--ink); font-size: 18px; }

.testi { background: var(--bg); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.testi:last-child { margin-bottom: 0; }
.testi .stars { color: #F5A623; letter-spacing: 2px; }
.testi p { margin: 6px 0 8px; line-height: 1.5; }
.testi small { color: var(--muted); font-weight: 800; }

.guarantee { display: flex; gap: 14px; align-items: flex-start; }
.guarantee__icon {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-soft); display: grid; place-items: center; font-size: 28px;
}
.guarantee h2 { margin-bottom: 6px; }
.guarantee p { margin: 0; color: var(--muted); line-height: 1.5; }

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details:last-child { border-bottom: 0; padding-bottom: 0; }
summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--primary); font-size: 22px; line-height: 1; font-weight: 900; }
details[open] summary::after { content: '–'; }
details p { color: var(--muted); margin: 10px 0 0; line-height: 1.55; }

.final-cta { margin-top: 20px; }

@media (min-width: 600px) {
  .app { padding-top: 36px; }
  .q-title { font-size: 28px; }
  .hero h1 { font-size: 34px; }
  .card { padding: 26px 24px; }
}
.footer .arrepentimiento { display: inline-block; margin-top: 4px; font-weight: 800; color: var(--ink); }
