/* ====== Mi Primer Bocado — Quiz inicial (mobile-first) ====== */
:root {
  --bg: #FBF9F5;
  --surface: #FFFFFF;
  --card: #F3F2EF;
  --card-hover: #ECEAE5;
  --ink: #232744;
  --ink-soft: #5C6075;
  --primary: #232744;
  --primary-ink: #FFFFFF;
  --disabled: #E4E3E0;
  --disabled-ink: #A6A5A2;
  --select-bg: #FCEEC9;
  --select-border: #EEBE3E;
  --bubble: #E7EFEE;
  --accent-green: #DCEFD9;
  --accent-pink: #F7DDE6;
  --accent-blue: #DDE8F2;
  --radius: 18px;
  --maxw: 460px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Pantalla completa, mobile-first — sin marco de teléfono */
.phone {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}

/* El contenido vive en una columna cómoda y centrada (full-bleed en móvil) */
.app { display: flex; flex-direction: column; height: 100%; max-width: 520px; margin: 0 auto; }

/* ====== Cabecera ====== */
.topbar { flex: 0 0 auto; height: 54px; display: flex; align-items: center; padding: 0 12px; }
.back-btn, .close-btn {
  background: none; border: none; cursor: pointer; color: var(--ink);
  padding: 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.back-btn:active, .close-btn:active { background: rgba(0,0,0,.06); }
.back-btn[hidden], .close-btn[hidden] { display: none; }

/* ====== Área del paso ====== */
.screen {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 22px 14px;
}
.screen::-webkit-scrollbar { width: 0; }

.fade-in { animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

/* ====== Tipografía ====== */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.title { font-size: 25px; line-height: 1.24; font-weight: 800; letter-spacing: -.01em; }
.title.lg { font-size: 28px; }
.subtitle { font-size: 15.5px; line-height: 1.48; color: var(--ink-soft); font-weight: 500; margin-top: 8px; }
.body-text { font-size: 16px; line-height: 1.55; color: var(--ink); font-weight: 500; margin-top: 12px; }
.legal-text { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); font-weight: 500; margin-top: 11px; }

/* ====== Burbuja de chat ====== */
.chat { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; }
.chat .avatar {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
  background-color: var(--card); background-size: 150%;
  background-position: 50% 8%; background-repeat: no-repeat;
}
.chat .bubble {
  background: var(--bubble); border-radius: 6px 17px 17px 17px;
  padding: 13px 15px; font-size: 17px; font-weight: 700; line-height: 1.32;
}

/* ====== Opciones ====== */
.options { display: flex; flex-direction: column; gap: 11px; margin-top: 14px; }
.option {
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  padding: 17px 17px; font-size: 16.5px; font-weight: 700; color: var(--ink);
  text-align: left; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 13px;
  transition: background .12s, border-color .12s, transform .08s;
}
.option:active { transform: scale(.985); }
.option.selected { background: var(--select-bg); border-color: var(--select-border); }
.option .opt-label { flex: 1 1 auto; }

.opt-box {
  flex: 0 0 auto; width: 25px; height: 25px; border-radius: 8px;
  border: 2px solid #C9C8C4; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.option.selected .opt-box { background: var(--primary); border-color: var(--primary); }
.opt-box svg { opacity: 0; }
.option.selected .opt-box svg { opacity: 1; }

/* opción con imagen */
.option.has-img { padding: 0; overflow: hidden; }
.option.has-img .opt-thumb { flex: 0 0 auto; width: 94px; height: 76px; object-fit: cover; background: var(--card-hover); }
.option.has-img .opt-label { padding: 16px 0; }
.option.has-img .opt-box { margin-right: 16px; }

.opt-info {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  border: 1.6px solid var(--ink-soft); color: var(--ink-soft);
  font-size: 14px; font-weight: 800; font-style: italic;
  display: flex; align-items: center; justify-content: center; background: none; cursor: pointer;
}

/* ====== Campo de texto / fecha ====== */
.text-field, .date-field {
  width: 100%; margin-top: 22px; padding: 16px 18px;
  font-size: 17px; font-weight: 700; font-family: inherit; color: var(--ink);
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
}
.text-field:focus, .date-field:focus { outline: none; border-color: var(--select-border); background: var(--surface); }

/* ====== Imágenes (altura limitada para no forzar scroll) ====== */
.hero {
  width: 100%; border-radius: var(--radius); margin-top: 16px;
  object-fit: cover; display: block; background: var(--card);
  max-height: 244px;
}
.hero.portrait { aspect-ratio: 3/4; object-position: 50% 16%; }
.hero.square { aspect-ratio: 1/1; }
.hero.wide { aspect-ratio: 16/10; }
.caption { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-top: 8px; text-align: center; }

.ph {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  background: linear-gradient(150deg, #EFE7DA, #E3EBE6);
  color: #9A8F7C; font-weight: 700; font-size: 13px; text-align: center;
}
.ph .ph-emoji { font-size: 44px; }

/* dos fotos (terapeutas) */
.duo { display: flex; gap: 12px; margin-top: 16px; }
.duo .duo-item { flex: 1 1 0; }
.duo .hero { margin-top: 0; max-height: 170px; }
.cred { text-align: center; margin-top: 8px; }
.cred .cred-name { font-weight: 800; font-size: 14px; }
.cred .cred-role { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }

/* ====== Icono circular ====== */
.badge {
  width: 70px; height: 70px; border-radius: 50%; margin: 6px auto 4px;
  display: flex; align-items: center; justify-content: center; font-size: 35px;
}
.badge.info { background: var(--accent-blue); }
.badge.green { background: var(--accent-green); }
.badge.pink { background: var(--accent-pink); }

/* ====== Resultado ====== */
.result-wrap { text-align: center; padding-top: 12px; }
.result-ring {
  width: 124px; height: 124px; border-radius: 50%; margin: 0 auto 16px;
  border: 3px solid var(--select-border); background: var(--accent-pink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.result-ring .r-name { font-size: 21px; font-weight: 900; }
.result-ring .r-age { font-size: 14px; font-weight: 700; color: var(--ink-soft); }

/* ====== Paywall ====== */
.paywall-title { font-size: 25px; font-weight: 900; line-height: 1.22; }
.paywall-sub { font-size: 15px; color: var(--ink-soft); font-weight: 600; margin-top: 8px; }
.benefits { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; }
.benefit { display: flex; gap: 12px; align-items: flex-start; }
.benefit .b-icon {
  flex: 0 0 auto; width: 37px; height: 37px; border-radius: 11px;
  background: var(--accent-green); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.benefit .b-title { font-weight: 800; font-size: 15px; line-height: 1.3; }
.b-badge { display: inline-block; margin-left: 7px; vertical-align: middle; background: var(--accent-green); color: #2f6b4f; font-size: 9.5px; font-weight: 900; letter-spacing: .04em; padding: 2px 7px; border-radius: 7px; text-transform: uppercase; }
.benefit .b-desc { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; line-height: 1.38; }

.plans { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; }
.plan {
  position: relative; border: 2px solid #DEDDD9; border-radius: var(--radius);
  padding: 15px 15px; cursor: pointer; background: var(--surface);
  display: flex; align-items: center; gap: 13px;
}
.plan.selected { border-color: var(--select-border); background: var(--select-bg); }
.plan .radio {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #C4C3BF; display: flex; align-items: center; justify-content: center;
}
.plan.selected .radio { border-color: var(--primary); }
.plan.selected .radio::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.plan .p-main { flex: 1 1 auto; }
.plan .p-name { font-weight: 800; font-size: 16px; }
.plan .p-sub { font-size: 12px; color: var(--ink-soft); font-weight: 600; line-height: 1.32; margin-top: 2px; }
.plan .p-price { text-align: right; font-weight: 900; font-size: 20px; line-height: 1.1; }
.plan .p-price small { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.plan .p-permonth { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin-top: 3px; }
.plan .tag {
  position: absolute; top: -11px; right: 14px; background: var(--select-border);
  color: #3a2c00; font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 8px;
}

/* ====== Prueba social del paywall ====== */
.pw-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pw-stars { color: #EEBE3E; font-size: 17px; letter-spacing: 2px; }
.pw-rating-text { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.testimonial { background: var(--accent-pink); border-radius: var(--radius); padding: 14px 16px; margin-top: 18px; }
.tm-quote { font-size: 14.5px; font-weight: 700; line-height: 1.42; color: var(--ink); }
.tm-author { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-top: 7px; }

.trust { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.trust-check {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-green); color: #2f6b4f; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

.pw-reassure { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 9px; }

/* ====== Pie / botón ====== */
.footer { flex: 0 0 auto; padding: 11px 22px calc(13px + env(safe-area-inset-bottom)); background: var(--bg); }
.footer[hidden] { display: none; }
.primary-btn {
  width: 100%; padding: 16px; border: none; border-radius: 100px;
  background: var(--primary); color: var(--primary-ink);
  font-size: 17px; font-weight: 800; font-family: inherit; cursor: pointer;
  transition: transform .08s, opacity .12s;
}
.primary-btn:active { transform: scale(.98); }
.primary-btn:disabled { background: var(--disabled); color: var(--disabled-ink); cursor: not-allowed; }
/* CTA del paywall: verde, pulsando (aparece tras leer las features) */
.primary-btn.pulse-green { background: #2EA86B; animation: pulseGreen 1.5s ease-in-out infinite; }
.primary-btn.pulse-green:active { transform: scale(.98); }
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(46,168,107,.55); }
  70%  { box-shadow: 0 0 0 14px rgba(46,168,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,168,107,0); }
}
.footer-note { text-align: center; font-size: 12.5px; color: var(--ink-soft); font-weight: 700; margin-top: 9px; }
.footer-note[hidden] { display: none; }
.link-btn { background: none; border: none; color: var(--ink-soft); font-weight: 700; font-size: 12.5px; cursor: pointer; text-decoration: underline; font-family: inherit; }

/* ====== Hoja inferior / modal ====== */
.sheet-overlay { position: absolute; inset: 0; background: rgba(20,20,25,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet-overlay[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 520px; background: var(--bg); border-radius: 24px 24px 0 0;
  padding: 12px 22px calc(22px + env(safe-area-inset-bottom));
  animation: sheetUp .27s ease both;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: #D2D1CD; margin: 4px auto 14px; }

/* confeti */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(620deg); opacity: .9; } }

/* lista de ventajas en la portada */
.hero-bullets { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.hero-bullets li {
  position: relative; padding-left: 28px;
  font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.4;
}
.hero-bullets li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  width: 21px; height: 21px; background: var(--accent-green); color: #2f6b4f;
  border-radius: 50%; font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

/* rodapé informativo de la primera pantalla */
.foot-hint { margin-top: 24px; text-align: center; }
.foot-hint .fh-1 { font-weight: 800; font-size: 14px; }
.foot-hint .fh-2 { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
