/* ─────────────────────────────────────────────
   THE POCKET DOULA — Design System v1.0
   Regal purple. Cream is the breath. No cuteness.
   Change a color here and it changes everywhere.
   ───────────────────────────────────────────── */

:root {
  --purple: #4a1d6e;         /* Royal purple — the container */
  --purple-light: #5d2d84;   /* raised cards, active states */
  --purple-deep: #3a1556;    /* header, nav, deepest ground */
  --cream: #fbf7ef;          /* warm ivory — the breath */
  --cream-muted: rgba(251, 247, 239, 0.88);
  --cream-dim: rgba(251, 247, 239, 0.72);
  --sage: #6b8e7f;           /* links, dividers, secondary */
  --terracotta: #c85a3a;     /* birth stories, emotional moments */
  --gold: #e8b84b;           /* THE buy color — every paid CTA */
  --gold-deep: #b8891f;      /* gold text on light, gold borders */
  --charcoal: #2b2b2b;
  --error: #e8555d;
  --hairline: rgba(232, 184, 75, 0.28);  /* faint gold hairline */

  --font-display: "Crimson Text", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;

  --header-h: 60px;
  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--purple);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overscroll-behavior-y: none;
}

body {
  max-width: 640px;           /* mobile-first; centered on desktop */
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* ── App shell ─────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 8px);
  background: var(--purple-deep);
  border-bottom: 1px solid rgba(232,184,75,0.25);
}
.header__title {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.header__title {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.iconbtn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none;
  border-radius: 10px;
  background: rgba(251,247,239,0.08);
  color: var(--cream);
  font-size: 19px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s;
}
.iconbtn:hover { background: rgba(251,247,239,0.16); }
.iconbtn[hidden] { visibility: hidden; display: grid; }
.iconbtn:active { background: var(--purple-light); }
.iconbtn[hidden] { visibility: hidden; }

main {
  padding: 20px 18px calc(var(--nav-h) + 40px);
  min-height: calc(100dvh - var(--header-h));
  background: var(--purple);
}

/* ── Bottom navigation ─────────────────────── */
.nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 640px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--purple-deep);
  border-top: 1px solid rgba(232,184,75,0.35);
  z-index: 20;
}
.nav a {
  display: grid;
  place-items: center;
  gap: 2px;
  text-decoration: none;
  color: rgba(251,247,239,0.55);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav a span { font-size: 19px; line-height: 1; }
.nav a.active { color: var(--gold); }

/* ── Typography ────────────────────────────── */
h1 { font-family: var(--font-display); font-size: 34px; line-height: 1.2; letter-spacing: 0.02em; font-weight: 700; color: var(--cream); }
h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.25; font-weight: 700; margin-bottom: 8px; color: var(--cream); }
h3 { font-family: var(--font-display); font-size: 21px; line-height: 1.3; font-weight: 600; margin: 20px 0 8px; color: var(--gold); }
p  { margin-bottom: 14px; color: var(--cream-muted); }
a  { color: var(--sage); }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.lede { font-size: 17px; color: var(--cream-muted); margin-bottom: 22px; }
.muted { color: rgba(251,247,239,0.82); font-size: 14px; }

/* ── Cards ─────────────────────────────────── */
.card {
  display: block;
  width: 100%;
  text-align: left;
  background: #FFFDF9;
  border: 1px solid rgba(232,184,75,0.45);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 12px;
  color: var(--charcoal);
  box-shadow: 0 1px 3px rgba(74,29,110,0.06);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.card:active { opacity: 0.86; }
.card--cream { background: #FFFDF9; color: var(--charcoal); }
.card--cream p, .card--cream .muted { color: #5c5c5c; }
.card__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--purple); }
.card__sub { font-size: 14px; color: #575757; margin-top: 4px; }
.card--cream .card__sub { color: #6b6b6b; }
.card__row { display: flex; align-items: center; gap: 14px; }
.card__emoji { font-size: 26px; flex: 0 0 auto; }
.card__meta { display: flex; gap: 10px; margin-top: 10px; font-size: 12px; color: #5a5a5a; }

/* ── Buttons ───────────────────────────────── */
/* .btn (default) is GOLD — the buy color. Use it for every paid CTA:
   Start membership, Get full access, Change plan. The eye goes here first. */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--gold);
  background: var(--gold);
  color: var(--purple-deep);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 10px;
  text-align: center;
  text-decoration: none;
}
.btn--cream { background: var(--cream); border-color: var(--cream); color: var(--purple); }
.btn--secondary { background: var(--purple); border-color: var(--purple); color: var(--cream); }
.btn--sage { background: var(--sage); border-color: var(--sage); color: var(--cream); }
.btn--ghost { background: transparent; border-color: rgba(232,184,75,0.45); color: var(--cream); }
.btn--danger { background: transparent; border-color: var(--error); color: var(--error); }
.btn:active { opacity: 0.86; transform: scale(0.99); }
.btn--sm { width: auto; display: inline-block; padding: 10px 16px; font-size: 14px; }

/* ── Forms ─────────────────────────────────── */
label { display: block; font-size: 13px; color: var(--cream-dim); margin-bottom: 6px; }
input, textarea, select {
  width: 100%;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(232,184,75,0.35);
  background: var(--purple-light);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;              /* 16px prevents iOS zoom-on-focus */
  margin-bottom: 14px;
}
input::placeholder { color: var(--cream-dim); }
input:focus, textarea:focus, .btn:focus-visible, .card:focus-visible, .iconbtn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Reader (module content) ───────────────── */
.reader { background: #FFFDF9; border: 1px solid rgba(232,184,75,0.4); color: var(--charcoal); border-radius: var(--r-lg); padding: 22px 20px; }
.reader p { color: #2b2b2b; font-size: 17px; }
.reader h3 { color: var(--terracotta); font-size: 20px; }
.reader ul { margin: 0 0 16px 18px; }
.reader li { margin-bottom: 8px; color: var(--charcoal); }
.reader .note {
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 106, 0.14);
  padding: 12px 14px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 16px;
  font-style: italic;
}

/* ── Affirmation card ──────────────────────── */
.affirmation {
  background: linear-gradient(160deg, var(--purple-light), var(--purple-deep));
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  margin-bottom: 16px;
}
.affirmation__text {
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.35;
  color: var(--cream);
}
.affirmation__cat { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-top: 18px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* ── Chips ─────────────────────────────────── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232,184,75,0.35);
  background: transparent;
  color: var(--cream-muted);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.chip.active { background: var(--gold); border-color: var(--gold); color: var(--purple-deep); font-weight: 600; }

/* ── Banners / locks ───────────────────────── */
.banner {
  background: rgba(200, 90, 58, 0.10);
  border: 1px solid var(--terracotta);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--cream);
  margin-bottom: 16px;
}
.banner--gold { background: rgba(232, 184, 75, 0.16); border-color: var(--gold); color: var(--cream); }
.lock { opacity: 0.55; }
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--purple-deep);
  font-weight: 600;
}
.badge--sage { background: var(--sage); color: var(--cream); }

/* ── Progress ──────────────────────────────── */
.bar { height: 4px; background: rgba(251,247,239,0.18); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--sage); }

/* ── Chat ──────────────────────────────────── */
.msg { background: var(--purple-light); border: 1px solid rgba(232,184,75,0.3); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; color: var(--cream); }
.msg--mine { background: var(--sage); }
.msg__author { font-size: 12px; color: var(--gold); margin-bottom: 3px; font-weight: 600; }
.msg--mine .msg__author { color: var(--cream); }
.composer { display: flex; gap: 8px; align-items: flex-start; }
.composer input { margin-bottom: 0; }
.composer .btn { width: auto; padding: 14px 18px; margin: 0; }

/* ── Checklist (birth plan) ────────────────── */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid rgba(232,184,75,0.25); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--sage); }
.check span { flex: 1; font-size: 16px; color: #3a3a3a; }
.choice { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.choice button { padding: 6px 12px; font-size: 12px; border-radius: 999px; border: 1px solid rgba(232,184,75,0.35); background: transparent; color: var(--cream-dim); cursor: pointer; }
.choice button.on { background: var(--sage); border-color: var(--sage); color: var(--cream); }

/* ── Birth stories (terracotta — testimony) ── */
.story {
  background: #FFFDF9;
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 14px;
  border-left: 4px solid var(--terracotta);
  cursor: pointer;
  display: block;
  text-decoration: none;
}
.story:active { opacity: 0.9; }
.story__quote {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.4;
  color: var(--charcoal);
  margin-bottom: 12px;
}
.story__meta { display: flex; align-items: center; gap: 8px; }
.story__pill {
  background: var(--terracotta);
  color: var(--cream);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.story__by { font-size: 13px; color: #6b6b6b; }
.story__read {
  background: #FFFDF9;
  color: var(--charcoal);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  border-top: 4px solid var(--terracotta);
}
.story__read p { color: var(--charcoal); font-size: 17px; line-height: 1.7; margin-bottom: 16px; }
.story__read .lead {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.4;
  color: var(--terracotta);
  margin-bottom: 18px;
}

/* ── Founding member offer ─────────────────── */
.founding {
  background: linear-gradient(160deg, rgba(232,184,75,0.22), rgba(200,90,58,0.10));
  border: 2px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 18px;
}
.founding__badge {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}
.founding__count { font-size: 14px; color: var(--cream); }
.founding__count strong { font-size: 22px; color: var(--gold); font-family: var(--font-display); }
.founding__perk { font-size: 14px; color: var(--cream-muted); margin-bottom: 6px; }
.founding__promise {
  margin-top: 12px;
  font-size: 13px;
  font-style: italic;
  color: var(--gold);
  border-top: 1px solid rgba(232,184,75,0.4);
  padding-top: 10px;
}

/* ── Glimpse (locked content teaser) ───────── */
/* Shows the beginning of paid content, fading into a gold unlock CTA.
   Far more persuasive than a hard wall — she can feel what she's missing. */
.glimpse { position: relative; }
.glimpse__text {
  max-height: 190px;
  overflow: hidden;
  position: relative;
}
.glimpse__text::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 130px;
  background: linear-gradient(to bottom, rgba(255,253,249,0), #FFFDF9);
  pointer-events: none;
}
.glimpse__cta {
  text-align: center;
  margin-top: -10px;
  position: relative;
  z-index: 1;
}
.glimpse__lock {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ── Utility ───────────────────────────────── */
.stack > * + * { margin-top: 10px; }
.center { text-align: center; }
.mt { margin-top: 20px; }
.mb { margin-bottom: 20px; }
hr { border: none; border-top: 1px solid rgba(232,184,75,0.35); margin: 24px 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Print (birth plan export) ─────────────── */
@media print {
  .header, .nav, .no-print { display: none !important; }
  body, html { background: #fff; color: #000; max-width: none; }
  main { padding: 0; }
  .card, .reader { background: #fff; color: #000; border: 1px solid #ccc; }
}

/* ─────────────────────────────────────────────
   OPTIONAL LIGHT THEME
   The app is royal purple by default. If you ever want the
   cream-forward version, set  theme: "cream"  in src/config.js.
   Same palette, inverted surfaces. Nothing else changes.
   ───────────────────────────────────────────── */
body.theme-cream,
body.theme-cream html { background: var(--cream); color: var(--charcoal); }
body.theme-cream main { background: var(--cream); }
body.theme-cream h1,
body.theme-cream h2 { color: var(--purple); }
body.theme-cream h3 { color: var(--terracotta); }
body.theme-cream p,
body.theme-cream .lede { color: #5a5a5a; }
body.theme-cream .muted { color: #8a8a8a; }
body.theme-cream .eyebrow { color: var(--gold-deep); }
body.theme-cream .btn--ghost { border-color: rgba(74,29,110,0.3); color: var(--purple); }
body.theme-cream input,
body.theme-cream textarea,
body.theme-cream select {
  background: #FFFDF9; color: var(--charcoal); border-color: rgba(74,29,110,0.25);
}
body.theme-cream label { color: #6b6b6b; }
body.theme-cream input::placeholder { color: #a9a9a9; }
body.theme-cream .banner { color: #4a2a1e; }
body.theme-cream .banner--gold { color: #5a4212; border-color: var(--gold-deep); }
body.theme-cream .chip { border-color: rgba(74,29,110,0.25); color: var(--purple); }
body.theme-cream .check span { color: #4a4a4a; }
body.theme-cream .bar { background: rgba(74,29,110,0.12); }
body.theme-cream .msg { background: #FFFDF9; color: var(--charcoal); }
body.theme-cream .msg__author { color: var(--gold-deep); }
body.theme-cream .founding__badge { color: var(--purple); }
body.theme-cream .founding__count { color: var(--purple); }
body.theme-cream .founding__perk { color: #4a4a4a; }

/* ─────────────────────────────────────────────
   THE JOURNEY — scenes, reveals, checks
   ───────────────────────────────────────────── */

/* Module scene illustration */
.scene {
  margin: 4px 0 20px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(232,184,75,0.35);
}
.scene__svg { display: block; width: 100%; height: auto; }

/* Chapter divider motif */
.chapter__divider {
  display: flex;
  justify-content: center;
  margin: 26px 0 18px;
}
.motif { width: 120px; height: 24px; }

/* Chapters + gentle reveal-on-scroll */
.chapter { margin-bottom: 6px; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Journey progress dots */
.journey-progress {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 26px 0 8px;
}
.journey-progress .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(251,247,239,0.25);
  transition: background 0.3s, transform 0.3s;
}
.journey-progress .dot--done { background: var(--sage); }
.journey-progress .dot--on { background: var(--gold); transform: scale(1.5); }

/* Knowledge check cards */
.check-card {
  background: #FFFDF9;
  border: 1px solid rgba(232,184,75,0.4);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.check-card__q {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--purple);
  margin-bottom: 14px;
  line-height: 1.4;
}
.check-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  margin-bottom: 9px;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(74,29,110,0.2);
  background: var(--cream);
  color: #2b2b2b;
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.check-opt:hover { border-color: var(--gold); }
.check-opt.correct {
  border-color: var(--sage);
  background: rgba(107,142,127,0.14);
  font-weight: 600;
}
.check-opt.correct::after { content: " ✓"; color: var(--sage); }
.check-opt.chosen-wrong {
  border-color: var(--terracotta);
  background: rgba(200,90,58,0.1);
}
.check-card__why {
  display: none;
  margin-top: 8px;
  padding: 12px 14px;
  background: rgba(232,184,75,0.14);
  border-radius: var(--r-md);
  font-size: 14px;
  color: #5a4a2a;
  line-height: 1.5;
}
.check-card__why.show { display: block; }

/* Journal mood picker */
.mood-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mood {
  font-size: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(74,29,110,0.2);
  background: var(--cream);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.mood:hover { transform: scale(1.1); }
.mood.on { border-color: var(--gold); background: rgba(232,184,75,0.2); transform: scale(1.12); }

/* ─────────────────────────────────────────────
   CONTRAST FIXES — light surfaces on a purple app
   Anything sitting on a cream card must use dark text.
   This is scoped so purple-background elements are untouched.
   ───────────────────────────────────────────── */
.card .btn--ghost,
.reader .btn--ghost,
.story .btn--ghost {
  border-color: rgba(74, 29, 110, 0.35);
  color: var(--purple);
}
.card .btn--cream,
.reader .btn--cream {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--cream);
}
.card .muted,
.reader .muted,
.story .muted,
.check-card .muted { color: #6b6b6b; }

.card .choice button,
.reader .choice button {
  border-color: rgba(74, 29, 110, 0.3);
  color: #4a4a4a;
}
.card .choice button.on,
.reader .choice button.on {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--cream);
}

.card a, .reader a, .story__read a { color: var(--sage); }
.card .check span { color: #3a3a3a; }
.card label { color: #5a5a5a; }
.card input, .card textarea, .card select {
  background: var(--cream);
  color: var(--charcoal);
  border-color: rgba(74, 29, 110, 0.25);
}
.card input::placeholder, .card textarea::placeholder { color: #9a9a9a; }

/* Resource rows were washing out */
.res-item, .res-item span { color: #3a3a3a; }

/* Glimpse: readable teaser, CTA no longer overlaps the card */
.glimpse__text { max-height: 240px; }
.glimpse__text::after { height: 96px; }
.glimpse__cta { margin-top: 14px; }
.glimpse__lock { color: var(--gold-deep); }

/* ─────────────────────────────────────────────
   FLOW DIAGRAMS — "what happens in your body"
   ───────────────────────────────────────────── */
.flow { margin: 18px 0; }
.flow__step {
  background: rgba(74, 29, 110, 0.05);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.flow__label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.flow__text { color: #2b2b2b; font-size: 16px; line-height: 1.55; }
.flow__list { margin: 8px 0 0; padding-left: 20px; }
.flow__list li { color: #2b2b2b; font-size: 15px; margin-bottom: 4px; }
.flow__arrow {
  text-align: center;
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  padding: 7px 0;
}

/* ─────────────────────────────────────────────
   TABLES — e.g. Craving → Possible Need
   ───────────────────────────────────────────── */
.tbl {
  margin: 16px 0;
  border: 1px solid rgba(232, 184, 75, 0.5);
  border-radius: var(--r-md);
  overflow: hidden;
}
.tbl__row {
  display: grid;
  grid-template-columns: 40% 60%;
  border-bottom: 1px solid rgba(74, 29, 110, 0.1);
}
.tbl__row:last-child { border-bottom: none; }
.tbl__row--head {
  background: rgba(232, 184, 75, 0.18);
}
.tbl__row--head .tbl__c {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.tbl__c { padding: 11px 13px; font-size: 15px; color: #2b2b2b; line-height: 1.45; }
.tbl__c--key { font-weight: 600; color: var(--purple); }

/* ─────────────────────────────────────────────
   SURGE TRACKER
   ───────────────────────────────────────────── */
.surge { display: flex; justify-content: center; margin: 24px 0; }
.surge__btn {
  width: 210px; height: 210px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: radial-gradient(circle at 50% 40%, rgba(232,184,75,0.22), rgba(74,29,110,0.1));
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 21px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.2s, background 0.3s, border-color 0.3s;
}
.surge__btn:active { transform: scale(0.97); }
.surge__btn--on {
  border-color: var(--terracotta);
  background: radial-gradient(circle at 50% 40%, rgba(200,90,58,0.35), rgba(74,29,110,0.15));
  animation: surgepulse 2.4s ease-in-out infinite;
}
@keyframes surgepulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.surge__timer {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--gold);
}

/* ─────────────────────────────────────────────
   AFFIRMATION PRACTICE + BREATH
   ───────────────────────────────────────────── */
.affirm-card {
  background: linear-gradient(160deg, var(--purple-light), var(--purple-deep));
  border: 2px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 34px 22px;
  text-align: center;
  margin: 16px 0;
}
.affirm-card__text {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.4;
  color: var(--cream);
}
.affirm-card__cat {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.breath { text-align: center; margin: 26px 0; }
.breath__orb {
  width: 96px; height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold), rgba(232,184,75,0.25));
  transition: transform 4s ease-in-out, opacity 4s ease-in-out;
}
.breath__orb--in { transform: scale(1.7); }
.breath__orb--hold { transform: scale(1.7); opacity: 0.85; }
.breath__orb--out { transform: scale(1); }
.breath__cue {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cream);
}
.breath__round { font-size: 13px; color: var(--gold); margin-top: 4px; }

/* ─────────────────────────────────────────────
   BABY SIZE
   ───────────────────────────────────────────── */
.size-card {
  background: linear-gradient(160deg, rgba(232,184,75,0.2), rgba(200,90,58,0.12));
  border: 2px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 26px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.size-card__week {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.size-card__size {
  font-family: var(--font-display);
  font-size: 22px; line-height: 1.4; color: var(--cream);
}
.size-card__size strong { font-size: 30px; color: var(--gold); }
.size-card__note {
  margin-top: 12px; font-size: 14px; color: rgba(251,247,239,0.8);
}

/* ─────────────────────────────────────────────
   MODULE CHECK-IN
   ───────────────────────────────────────────── */
.checkin {
  background: rgba(232,184,75,0.12);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 18px;
  text-align: center;
}
.checkin__q {
  font-family: var(--font-display);
  font-size: 19px; color: var(--cream); margin-bottom: 14px;
}
.checkin__opts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.checkin__opt {
  background: transparent;
  border: 1px solid rgba(232,184,75,0.5);
  color: var(--cream);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.checkin__opt:active { transform: scale(0.96); }
.checkin__opt.on { background: var(--gold); color: var(--purple-deep); border-color: var(--gold); }
.checkin__reply {
  margin-top: 12px; font-size: 14px; color: var(--gold);
  font-style: italic; display: none;
}
.checkin__reply.show { display: block; }

/* Message moderation button */
.msg__del {
  background: none;
  border: none;
  color: var(--terracotta);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 0 0;
  font-family: var(--font-body);
}
.msg__del:hover { text-decoration: underline; }

/* Monthly alternative on a pricing card */
.monthly-alt {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(74,29,110,0.2);
  text-align: center;
}
.monthly-alt > span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6b6b;
  margin-bottom: 8px;
}


/* ─────────────────────────────────────────────
   READABILITY GUARANTEE
   Any text on a light (cream) card is always dark enough to read.
   This overrides faded cream/dim colors that only work on purple.
   ───────────────────────────────────────────── */
.card, .card__title, .card p, .card li, .card span:not(.badge),
.card .card__sub, .card label, .card .muted,
.reader, .reader p, .reader li, .reader span,
.check-card, .tbl__c, .flow__text, .flow__list li {
  /* fall through to specific colors below, but never inherit cream */
}
.card .card__sub { color: #575757; }
.card label { color: #575757; }
.card .muted { color: #6b6b6b; }
.card p { color: #2b2b2b; }
.card li { color: #2b2b2b; }
.card__sub { color: #575757; }

/* Story attribution + consent text were faded on cards */
.card .story__by { color: #6b6b6b !important; }

/* Placeholders inside cards readable */
.card input::placeholder, .card textarea::placeholder { color: #9a9a9a; }

/* ─────────────────────────────────────────────
   PAGED READER — one chapter card at a time
   Short scroll per card, tap/swipe to advance. No endless scroll.
   ───────────────────────────────────────────── */
.pager {
  position: relative;
  min-height: 200px;
}
.page {
  display: none;
  animation: pageIn 0.45s ease both;
}
.page--active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* The reader card itself — cream, readable, gently raised */
.pager .reader {
  background: #FFFDF9;
  border: 1px solid rgba(232,184,75,0.4);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.pager .reader p { color: #2b2b2b; font-size: 17px; line-height: 1.6; }
.pager .reader h3 { color: var(--terracotta); }
.pager .reader li { color: #2b2b2b; font-size: 16px; }

/* Page dots (chapters within a section) */
.page-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 18px;
}
.pdot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(251,247,239,0.28);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.pdot--on { background: var(--gold); transform: scale(1.15); }

/* Within-section nav row */
.pager-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.pager-nav .btn { margin: 0; flex: 0 0 auto; }
.pager-count {
  font-size: 13px;
  color: var(--cream-muted);
  font-family: var(--font-body);
}

/* ─────────────────────────────────────────────
   SCENE ANIMATION — gentle life in the illustrations
   ───────────────────────────────────────────── */
.scene {
  animation: sceneFloat 6s ease-in-out infinite;
}
@keyframes sceneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.scene__svg { transition: opacity 0.6s ease; }

/* The moon/sun/star elements get a soft glow pulse */
.scene__svg circle[fill="#E8B84B"] {
  animation: gentleGlow 4s ease-in-out infinite;
}
@keyframes gentleGlow {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════
   HARD CONTRAST RULE — the final word on readability
   NO cream/white text on light cards. NO dark text on purple.
   These override everything above by coming last + being specific.
   ═══════════════════════════════════════════════ */

/* Anything inside a cream card is dark. Full stop. */
.card:not(.affirm-hero):not([style*="purple"]) *:not(.badge):not(.btn):not(.eyebrow) {
  /* only recolor text nodes that were cream/white */
}
.card .affirmation__text,
.card [style*="var(--cream)"] { color: #2b2b2b !important; }

/* The emergency / note callouts — dark readable text, not faded */
.reader .note,
.note {
  background: rgba(232,184,75,0.16) !important;
  color: #3a2f14 !important;
  font-style: normal !important;
}
.note * { color: #3a2f14 !important; }

/* Emergency red-bordered box: readable dark text */
.emergency-box, .reader [style*="terracotta"][style*="border"] { color: #6b2416 !important; }

/* Reader section headers: strong terracotta, never faded cream */
.reader h2, .reader h3, .pager .reader h2, .pager .reader h3 {
  color: var(--terracotta) !important;
  opacity: 1 !important;
}

/* Affirmation hero on home — cream card, dark text, gold accent, POP */
.affirm-hero {
  background: linear-gradient(135deg, #FFFDF9 0%, #FDF6E8 100%) !important;
  border: 2px solid var(--gold) !important;
  box-shadow: 0 6px 24px rgba(232,184,75,0.28) !important;
  text-align: center;
  padding: 28px 22px !important;
}
.affirm-hero__text {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.4;
  color: var(--purple) !important;
  margin: 8px 0 14px;
}
.affirm-hero__cta {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep) !important;
  font-weight: 700;
}

/* Banners inside cream cards must have dark text (they're light-on-light otherwise) */
.card .banner,
.card .banner * {
  color: #6b2416 !important;
}
.card .banner--gold,
.card .banner--gold * {
  color: #5a4212 !important;
}
/* Banner on the purple background (home/legal top-level) keeps light text */
main > .banner { color: var(--cream) !important; }

/* ═══════════════════════════════════════════════
   GROUP-CHAT STYLE COMMUNITY
   ═══════════════════════════════════════════════ */
.chat-head { margin-bottom: 12px; }
.banner--soft {
  background: rgba(200,90,58,0.12) !important;
  border: 1px solid rgba(200,90,58,0.4) !important;
  color: var(--cream) !important;
  font-size: 13px;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0 16px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Message rows: others left, you right (like iMessage) */
.bubble-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 82%;
}
.bubble-row--mine {
  align-self: flex-end;
  align-items: flex-end;
}
.bubble__author {
  font-size: 12px;
  color: var(--gold);
  margin: 0 0 3px 12px;
  font-weight: 600;
}
.bubble {
  padding: 11px 15px;
  border-radius: 20px;
  border-bottom-left-radius: 5px;
  background: rgba(251,247,239,0.14);
  color: var(--cream);
  font-size: 15px;
  line-height: 1.4;
}
.bubble--mine {
  background: var(--sage);
  color: #fff;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 5px;
}
.bubble__text { white-space: pre-wrap; word-break: break-word; }

/* Row actions (save / delete) appear small under each bubble */
.bubble__actions {
  display: flex;
  gap: 10px;
  margin: 4px 12px 0;
}
.bubble__act {
  background: none;
  border: none;
  color: rgba(251,247,239,0.55);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 0;
  font-family: var(--font-body);
}
.bubble__act:hover { color: var(--gold); }
.bubble__act--del:hover { color: var(--terracotta); }

/* Pinned / saved strip */
.pinned-strip { margin-bottom: 10px; }
.pinned-strip__title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.pinned-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: rgba(232,184,75,0.12);
  border: 1px solid rgba(232,184,75,0.3);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--cream);
}
.pinned-item__x {
  background: none; border: none; color: var(--gold);
  font-size: 18px; cursor: pointer; flex: 0 0 auto; line-height: 1;
}

/* Composer: cleaner, sits like a chat input bar */
.composer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
}
.composer input {
  flex: 1;
  border-radius: 22px;
  background: rgba(251,247,239,0.1);
  border: 1px solid rgba(251,247,239,0.2);
  color: var(--cream);
  padding: 12px 16px;
}
.composer input::placeholder { color: rgba(251,247,239,0.5); }
.composer .btn { margin: 0; flex: 0 0 auto; border-radius: 22px; }

/* Payment type toggle on tier cards */
.pay-toggle { margin-top: 14px; }
.pay-toggle__label {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #6b6b6b; margin-bottom: 8px; text-align: center;
}
.pay-toggle__buttons { display: flex; gap: 10px; }
.pay-toggle__buttons .btn {
  flex: 1; margin: 0; display: flex; flex-direction: column;
  gap: 2px; padding: 12px 8px; height: auto;
}
.pay-opt__amt { font-size: 17px; font-weight: 700; }
.pay-opt__desc { font-size: 11px; opacity: 0.85; font-weight: 400; }
.pay-toggle__hint {
  font-size: 12px; color: #6b6b6b; text-align: center; margin-top: 8px;
}

/* Voice-log mood buttons */
.voicemood-opt {
  background: var(--cream);
  border: 1.5px solid rgba(74,29,110,0.2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #3a3a3a;
  font-family: var(--font-body);
  margin: 0 4px 4px 0;
}
.voicemood-opt.on { background: var(--gold); border-color: var(--gold); color: var(--purple-deep); font-weight:600; }

/* Baby growth reveal in Month-by-Month */
.growth { text-align: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(74,29,110,0.15); }
.growth__svg { width: 180px; height: auto; }
.growth__label { font-family: var(--font-display); font-size: 16px; color: var(--purple); margin-top: 6px; }
.growth__label strong { color: var(--terracotta); font-size: 19px; }
.month-reveal { color: var(--gold-deep) !important; }

/* ═══════════════════════════════════════════════
   FIRST-TIME TUTORIAL OVERLAY
   ═══════════════════════════════════════════════ */
.tut-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(30, 12, 48, 0.8);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: tutIn 0.3s ease;
}
.tut-overlay--out { animation: tutOut 0.3s ease forwards; }
@keyframes tutIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tutOut { to { opacity: 0; } }
.tut-card {
  background: #FFFDF9;
  border: 2px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: tutPop 0.4s cubic-bezier(0.2,0.8,0.3,1.2);
}
@keyframes tutPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tut-emoji { font-size: 44px; margin-bottom: 12px; }
.tut-title { font-family: var(--font-display); font-size: 22px; color: var(--purple); margin-bottom: 10px; }
.tut-body { font-size: 15px; line-height: 1.55; color: #3a3a3a; margin-bottom: 20px; }
.tut-dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 20px; }
.tut-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(74,29,110,0.2); }
.tut-dot--on { background: var(--gold); transform: scale(1.2); }
.tut-actions { display: flex; gap: 10px; justify-content: center; }
.tut-actions .btn { margin: 0; }

/* ═══════════════════════════════════════════════
   PAYMENT TAB (one-time vs monthly)
   ═══════════════════════════════════════════════ */
.paytab { margin-top: 16px; }
.paytab__tabs {
  display: flex;
  background: rgba(74,29,110,0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.paytab__tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #6b6b6b;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s;
}
.paytab__tab--on {
  background: #FFFDF9;
  color: var(--purple);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.paytab__panel { text-align: center; }
.paytab__price {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--terracotta);
  margin-bottom: 4px;
}
.paytab__sub {
  font-size: 13px;
  color: #6b6b6b;
  margin-bottom: 4px;
}
.paytab__buy { width: 100%; }
