:root {
  --bg: #fdf8f3;
  --card: #ffffff;
  --text: #2d241e;
  --muted: #7a6f66;
  --brand: #8b5e3c;
  --brand2: #b08968;
  --accent: #d4a373;
  --soft: #f6eee3;
  --success: #4a7c59;
  --shadow: 0 10px 30px rgba(139, 94, 60, 0.1);
  --r-lg: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.app {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 0 100px;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 10px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.subtitle { font-size: 13px; color: var(--muted); margin: 2px 0 0; }

.chip {
  background: var(--soft);
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

/* SCREEN */
.screen { padding: 0 16px; }

/* CARD */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 1px solid rgba(139, 94, 60, 0.06);
}

.card h2 { margin: 0 0 8px; font-size: 22px; }
.card h3 { margin: 0 0 12px; font-size: 18px; }
.card p  { margin: 0 0 12px; color: var(--muted); font-size: 15px; }

/* HERO */
.hero {
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  overflow: hidden;
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  background: var(--brand);
  margin-bottom: 16px;
}

.heroImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.heroContent {
  position: relative;
  padding: 28px 22px;
  color: white;
  z-index: 2;
}

.heroContent h2 { margin: 0 0 6px; font-size: 24px; }
.heroContent p  { margin: 0; opacity: 0.9; font-size: 15px; }

/* BOTONES */
.btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  margin-top: 10px;
  display: block;
}

.btn:active { opacity: 0.8; }

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn-done {
  background: linear-gradient(135deg, var(--success), #6aab7a) !important;
}

/* PROGRESS BAR */
.progress-bar-wrap {
  background: var(--soft);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 20px;
  transition: width 0.5s ease;
}

.progress-text { font-size: 13px; color: var(--muted); }
.progress-big  { font-size: 32px; font-weight: 800; color: var(--brand); }

/* NEXT CARD (home) */
.next-card { border-left: 4px solid var(--accent); }
.next-label { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.next-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.next-desc  { font-size: 14px; color: var(--muted); margin-bottom: 12px; }

/* HOW IT WORKS */
.how-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.how-icon  { font-size: 26px; flex-shrink: 0; }
.how-title { font-weight: 700; font-size: 15px; }
.how-desc  { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* TESTIMONIALS */
.testimonial {
  background: var(--soft);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.testimonial-text { margin: 0 0 6px; font-style: italic; font-size: 15px; color: var(--text); }
.testimonial-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--brand); }

/* MÓDULOS LISTA */
.module-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: var(--soft);
  border-radius: 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.15s;
}

.module-item:active { transform: scale(0.98); }
.module-done { opacity: 0.7; }

.audioThumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin-right: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.module-info { flex: 1; }
.module-num  { font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.module-title { font-weight: 800; font-size: 15px; line-height: 1.3; }
.module-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.module-check { font-size: 20px; margin-left: 8px; }

/* INTRO CARD */
.intro-card { cursor: pointer; background: linear-gradient(135deg, #fff8f0, #fdebd0); }
.intro-row  { display: flex; align-items: center; gap: 14px; }
.intro-icon { font-size: 32px; }
.intro-title { font-weight: 800; font-size: 16px; }
.intro-desc  { font-size: 13px; color: var(--muted); }
.play-btn    { font-size: 22px; color: var(--brand); margin-left: auto; }

/* CLOSING CARD */
.closing-card { cursor: pointer; background: linear-gradient(135deg, #f0f7f0, #d4edda); }
.closing-row  { display: flex; align-items: center; gap: 14px; }
.closing-label { font-size: 11px; color: var(--success); font-weight: 700; text-transform: uppercase; }
.closing-title { font-weight: 800; font-size: 15px; }
.closing-desc  { font-size: 12px; color: var(--muted); }

/* DETALLE MÓDULO */
.module-detail { padding-bottom: 20px; }

.back-btn {
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  padding: 10px 0;
  display: block;
}

.module-hero-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--r-lg);
  margin-bottom: 16px;
}

.module-badge {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.module-phrase {
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 12px 0 0;
}

.goal-block, .expect-block {
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.goal-block   { background: #fff8f0; }
.expect-block { background: #f0f7f0; }

.goal-label, .expect-label {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
}

.goal-block p, .expect-block p { margin: 0; font-size: 14px; color: var(--text); }

.audio-section-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.audio-hint { font-size: 13px; color: var(--muted); margin: 0; }

/* CALMA - ITEM */
.item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: var(--soft);
  border-radius: 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.15s;
}

.item:active { transform: scale(0.98); }

/* PROGRESO */
.progress-module-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--soft);
}

.progress-module-item:last-child { border-bottom: none; }
.progress-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.progress-module-title { font-weight: 700; font-size: 14px; }
.progress-module-status { font-size: 12px; margin-top: 2px; }
.status-done    { color: var(--success); font-weight: 700; }
.status-pending { color: var(--muted); }

/* TABBAR */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  background: white;
  display: flex;
  padding: 12px 8px 20px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.07);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  z-index: 100;
}

.tab {
  flex: 1;
  border: none;
  background: none;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  transition: color 0.2s;
}

.tab .icon { font-size: 22px; }
.tab.active { color: var(--brand); }
/* RECORDATORIO DIARIO */
.daily-done { font-size: 14px; color: var(--success); font-weight: 600; padding: 16px 22px; }
.reminder-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.time-input {
  flex: 1;
  padding: 14px;
  border-radius: 16px;
  border: 2px solid var(--soft);
  background: var(--soft);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
}
.reminder-save { width: auto; margin-top: 0; padding: 16px 22px; }
.reminder-status { font-size: 14px; color: var(--success); margin: 12px 0 0; }

/* COBRO Y CUENTA */
.paywall-card { text-align: center; border: 2px solid var(--soft); }
.paywall-lock { font-size: 40px; margin: 4px 0; }
.paywall-list { text-align: left; padding-left: 20px; margin: 12px 0; color: var(--text); font-size: 15px; }
.paywall-list li { margin: 4px 0; }
.paywall-note { font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.account-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; text-align: left; }
.account-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.account-form input[type="email"],
.account-form input[type="password"] {
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--soft);
  background: var(--soft);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
}
.account-form input:focus { outline: none; border-color: var(--accent); }
.account-form .consent { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 13px; color: var(--muted); }
.account-form .consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.account-form .consent a { color: var(--brand); }
.form-error { color: #b3261e; font-size: 14px; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* TEST DE HAMBRE EMOCIONAL */
.quiz-invite { cursor: pointer; border-left: 4px solid var(--accent); }
.quiz-card { text-align: center; }
.quiz-step { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin: 6px 0 10px; }
.quiz-question { margin: 18px 0 14px; font-size: 21px; }
.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  margin-top: 10px;
  border-radius: 16px;
  border: 2px solid var(--soft);
  background: var(--card);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}
.quiz-option:active { border-color: var(--accent); background: var(--soft); }
.quiz-result-icon { font-size: 56px; margin: 4px 0; }
.quiz-locked { margin-top: 12px; padding: 12px; border: 2px dashed var(--soft); border-radius: 14px; color: var(--muted); font-size: 14px; }
