/* ============================================================
   GROWING UP DAILY — Design System
   Warm editorial × modern mobile-first
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ── */
:root {
  --warm-white: #faf8f5;
  --cream: #f2ede4;
  --parchment: #e8e0d4;
  --ink: #1c1917;
  --ink-80: rgba(28,25,23,0.80);
  --ink-60: rgba(28,25,23,0.60);
  --ink-30: rgba(28,25,23,0.30);
  --ink-10: rgba(28,25,23,0.08);

  --sage: #3d7a52;
  --sage-mid: #4f9267;
  --sage-light: #d4edde;

  --sky: #2562a0;
  --sky-light: #daeaf8;

  --terracotta: #b54d2a;
  --terracotta-light: #fde6dc;

  --gold: #b58a10;
  --gold-light: #fef3c7;

  --plum: #6d35a0;
  --plum-light: #ede0fa;

  --rose: #9c2e67;
  --rose-light: #fce5f0;

  --r4: 4px;
  --r8: 8px;
  --r12: 12px;
  --r16: 16px;
  --r20: 20px;
  --r-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(28,25,23,0.06);
  --shadow: 0 4px 20px rgba(28,25,23,0.10);
  --shadow-lg: 0 12px 48px rgba(28,25,23,0.16);

  --transition: 0.18s ease;

  --max-w: 680px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--warm-white);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Layout helpers ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ════════════════════════════════════════════
   WELCOME / LANDING PAGE
════════════════════════════════════════════ */
.welcome-page {
  background: var(--ink);
  color: var(--warm-white);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.welcome-bg-layer {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 10% 0%, rgba(61,122,82,0.28) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 90% 90%, rgba(181,77,42,0.20) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(45,98,160,0.10) 0%, transparent 60%);
}

.welcome-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.welcome-nav {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
}

.welcome-logo {
  font-family: 'Lora', serif;
  font-size: 18px; font-weight: 700;
  color: var(--warm-white);
  text-decoration: none;
}
.welcome-logo em { color: #8ecfa0; font-style: italic; }

.welcome-hero {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 24px 60px;
}

.welcome-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-full);
  padding: 7px 18px;
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ddf7c;
  animation: badge-pulse 2.2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.45;transform:scale(1.35)}
}

.welcome-h1 {
  font-family: 'Lora', serif;
  font-size: clamp(38px, 10vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 10px;
}
.welcome-h1 em { color: #8ecfa0; font-style: italic; }

.welcome-tagline {
  font-size: clamp(16px, 3.5vw, 20px);
  color: rgba(255,255,255,0.58);
  font-weight: 300;
  max-width: 420px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.welcome-stats {
  display: flex; justify-content: center; gap: 36px;
  margin-bottom: 44px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-n {
  font-family: 'Lora', serif;
  font-size: 30px; font-weight: 700;
  color: #8ecfa0; display: block;
  line-height: 1;
}
.stat-l {
  font-size: 12px; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 1px;
  margin-top: 4px; display: block;
}

.welcome-cta-group {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}

.btn-cta-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--warm-white); color: var(--ink);
  border: none; border-radius: var(--r-full);
  padding: 17px 36px;
  font-size: 16px; font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.35);
}

.btn-cta-secondary {
  background: none; border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  border-radius: var(--r-full);
  padding: 13px 28px;
  font-size: 14px;
  transition: all var(--transition);
}
.btn-cta-secondary:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
}

.welcome-topics {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 52px; max-width: 520px; margin-left: auto; margin-right: auto;
}
.topic-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-full); padding: 6px 14px;
  font-size: 12px; color: rgba(255,255,255,0.5);
}

/* Features section */
.features-section {
  background: var(--cream);
  padding: 64px 24px;
}
.features-grid {
  max-width: 860px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 20px; margin-top: 40px;
}
.feature-card {
  background: white; border-radius: var(--r16);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-title { font-family: 'Lora', serif; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--ink-60); line-height: 1.6; }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-60); margin-bottom: 10px;
}
.section-heading {
  font-family: 'Lora', serif;
  font-size: clamp(24px,5vw,36px); font-weight: 700;
  line-height: 1.2;
}

/* ════════════════════════════════════════════
   ONBOARDING FLOW
════════════════════════════════════════════ */
.onboard-page {
  min-height: 100dvh;
  background: var(--warm-white);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
}
.onboard-card {
  width: 100%; max-width: 480px;
}
.onboard-progress {
  display: flex; gap: 5px; margin-bottom: 36px;
}
.op-seg {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--ink-10); transition: background 0.3s;
}
.op-seg.done { background: var(--sage); }
.op-seg.active { background: var(--ink); }

.step-badge {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-60); margin-bottom: 14px;
}
.step-h {
  font-family: 'Lora', serif;
  font-size: clamp(24px,6vw,34px); font-weight: 700;
  line-height: 1.2; margin-bottom: 10px;
}
.step-p {
  font-size: 15px; color: var(--ink-60);
  line-height: 1.7; margin-bottom: 28px;
}

/* Forms */
.form-row { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 7px; letter-spacing: 0.2px;
}
.form-input {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--ink-10);
  border-radius: var(--r12); font-size: 15px;
  background: white; color: var(--ink);
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--sage); }
.form-input::placeholder { color: var(--ink-30); }

.gender-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gender-option {
  border: 2px solid var(--ink-10);
  border-radius: var(--r12); padding: 18px 14px;
  text-align: center; cursor: pointer;
  transition: all var(--transition); background: white;
}
.gender-option:hover { border-color: var(--ink-30); }
.gender-option.sel { border-color: var(--sage); background: var(--sage-light); }
.gender-emoji { font-size: 32px; display: block; margin-bottom: 8px; }
.gender-name { font-size: 15px; font-weight: 600; }
.gender-note { font-size: 12px; color: var(--ink-60); margin-top: 2px; }

.btn-main {
  width: 100%; padding: 15px;
  background: var(--ink); color: white;
  border: none; border-radius: var(--r12);
  font-size: 15px; font-weight: 600;
  transition: all var(--transition); margin-top: 6px;
}
.btn-main:hover { background: #333; transform: translateY(-1px); }
.btn-main:disabled { opacity: .38; cursor: not-allowed; transform: none; }

.btn-back-link {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: var(--ink-60); font-size: 14px;
  margin-top: 14px; padding: 8px 0;
}
.btn-back-link:hover { color: var(--ink); }

/* Children preview list */
.children-list {
  background: white; border-radius: var(--r12);
  border: 2px solid var(--ink-10); overflow: hidden;
  margin-bottom: 10px;
}
.child-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-10);
}
.child-row:last-child { border-bottom: none; }
.child-avi {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.child-meta { flex: 1; }
.child-name { font-weight: 600; font-size: 15px; }
.child-sub { font-size: 12px; color: var(--ink-60); margin-top: 1px; }

.btn-add-dashed {
  width: 100%; padding: 13px;
  background: none;
  border: 2px dashed var(--ink-20, rgba(28,25,23,0.15));
  border-radius: var(--r12);
  color: var(--ink-60); font-size: 14px;
  transition: all var(--transition);
}
.btn-add-dashed:hover { border-color: var(--sage); color: var(--sage); }

/* How-it-works list */
.hiw-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.hiw-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: white; padding: 16px; border-radius: var(--r12);
}
.hiw-icon { font-size: 24px; flex-shrink: 0; }
.hiw-title { font-size: 14px; font-weight: 600; display: block; margin-bottom: 3px; }
.hiw-desc { font-size: 13px; color: var(--ink-60); line-height: 1.5; }

.privacy-note {
  text-align: center; font-size: 12px;
  color: var(--ink-60); margin-bottom: 20px; line-height: 1.6;
}

/* ════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════ */
.app-shell { background: var(--warm-white); min-height: 100dvh; }

/* Top bar */
.top-bar {
  background: white;
  border-bottom: 1px solid var(--ink-10);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 200;
}
.top-logo {
  font-family: 'Lora', serif; font-size: 18px; font-weight: 700;
}
.top-logo span { color: var(--sage); font-style: italic; }
.top-icons { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r8);
  border: none; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background var(--transition);
}
.icon-btn:hover { background: var(--parchment); }

/* Child tabs */
.child-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px 0;
  scrollbar-width: none;
}
.child-tabs::-webkit-scrollbar { display: none; }
.child-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-full);
  border: 2px solid var(--ink-10); background: white;
  white-space: nowrap; flex-shrink: 0;
  transition: all var(--transition); cursor: pointer;
  font-size: 14px; font-weight: 500;
}
.child-tab:hover { border-color: var(--ink-30); }
.child-tab.active { background: var(--ink); color: white; border-color: var(--ink); }
.ct-avi { font-size: 17px; }
.ct-age { font-size: 12px; opacity: .6; }

/* Add child mini-tab */
.add-child-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--r-full);
  border: 2px dashed var(--ink-20, rgba(28,25,23,0.15));
  background: none; white-space: nowrap; flex-shrink: 0;
  color: var(--ink-60); font-size: 13px;
  transition: all var(--transition); cursor: pointer;
}
.add-child-tab:hover { border-color: var(--sage); color: var(--sage); }

/* Main content area */
.main-content {
  max-width: var(--max-w); margin: 0 auto;
  padding: 16px 20px 100px;
}

/* ── Hero Card ── */
.hero-card {
  border-radius: var(--r20); padding: 26px;
  margin-bottom: 16px; position: relative; overflow: hidden;
  color: white; min-height: 220px;
}
.hero-texture {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 18px,
    rgba(255,255,255,0.025) 18px, rgba(255,255,255,0.025) 36px
  );
}
.hero-top-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px; position: relative; flex-wrap: wrap; gap: 8px;
}
.hero-date-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); border-radius: var(--r-full);
  padding: 5px 12px; font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.5px;
}
.hero-streak {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,165,0,0.22); border: 1px solid rgba(255,165,0,0.4);
  border-radius: var(--r-full); padding: 4px 10px; font-size: 12px;
}
.hero-cat {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  opacity: .7; position: relative; margin-bottom: 6px;
}
.hero-title {
  font-family: 'Lora', serif;
  font-size: clamp(20px,5vw,28px); font-weight: 700;
  line-height: 1.22; margin-bottom: 14px; position: relative;
}
.hero-preview {
  font-size: 14px; opacity: .78; line-height: 1.65; position: relative;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; position: relative;
}
.btn-read-hero {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; border: none; border-radius: var(--r-full);
  padding: 11px 22px; font-size: 14px; font-weight: 600;
  color: var(--ink); transition: transform var(--transition);
}
.btn-read-hero:hover { transform: scale(1.03); }
.hero-child-label { font-size: 13px; opacity: .65; }

/* Category gradients */
.grad-play    { background: linear-gradient(135deg,#2d6bbf,#1a3d80); }
.grad-joy     { background: linear-gradient(135deg,#d97706,#9a5005); }
.grad-safety  { background: linear-gradient(135deg,#dc2626,#8b1010); }
.grad-care    { background: linear-gradient(135deg,#059669,#035533); }
.grad-health  { background: linear-gradient(135deg,#b45309,#6b3005); }
.grad-mind    { background: linear-gradient(135deg,#7c3aed,#42148b); }
.grad-social  { background: linear-gradient(135deg,#0369a1,#013a60); }
.grad-puberty { background: linear-gradient(135deg,#9d174d,#58082a); }
.grad-money   { background: linear-gradient(135deg,#065f46,#033025); }
.grad-grit    { background: linear-gradient(135deg,#92400e,#4a1e04); }
.grad-work    { background: linear-gradient(135deg,#1e40af,#0b1f60); }
.grad-life    { background: linear-gradient(135deg,#374151,#111827); }

/* ── Progress Card ── */
.progress-card {
  background: white; border-radius: var(--r16); padding: 18px 20px;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.progress-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-60); margin-bottom: 12px;
}
.age-bar-wrap { height: 8px; background: var(--cream); border-radius: 4px; overflow: hidden; }
.age-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--sage), var(--sky));
  transition: width .6s ease;
}
.age-marks {
  display: flex; justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: var(--ink-60); margin-top: 5px;
}
.progress-stats {
  display: flex; gap: 16px; margin-top: 12px;
  flex-wrap: wrap;
}
.pstat { font-size: 13px; color: var(--ink-60); }
.pstat strong { color: var(--ink); }

/* ── Section header ── */
.section-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 12px;
}
.section-h {
  font-family: 'Lora', serif; font-size: 18px; font-weight: 700;
}
.see-all { font-size: 13px; color: var(--sage); font-weight: 600;
  background: none; border: none; }
.see-all:hover { text-decoration: underline; }

/* ── Tip list cards ── */
.tip-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item {
  background: white; border-radius: var(--r16);
  padding: 16px 18px; cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  display: flex; gap: 12px; align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.tip-item:hover {
  border-color: var(--ink-10);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.tip-item.completed { opacity: .55; }
.tip-icon {
  width: 42px; height: 42px; border-radius: var(--r8);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.tip-body { flex: 1; min-width: 0; }
.tip-cat-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-60); margin-bottom: 4px;
}
.tip-title {
  font-family: 'Lora', serif; font-size: 15px; font-weight: 600;
  line-height: 1.3; margin-bottom: 3px;
}
.tip-meta { font-size: 12px; color: var(--ink-60); }
.tip-check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--ink-20, rgba(28,25,23,0.15));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  transition: all var(--transition); cursor: pointer; font-size: 12px;
}
.tip-check.done { background: var(--sage); border-color: var(--sage); color: white; }

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-top: 1px solid var(--ink-10);
  display: flex; z-index: 300;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 10px 4px;
  border: none; background: none; color: var(--ink-60);
  transition: color var(--transition); font-size: 10px;
  font-family: 'DM Mono', monospace; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.nav-btn .ni { font-size: 21px; }
.nav-btn.active { color: var(--sage); }

/* ════════════════════════════════════════════
   TIP DETAIL MODAL (bottom sheet)
════════════════════════════════════════════ */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(28,25,23,0.55);
  z-index: 500; backdrop-filter: blur(3px);
  align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-bg.open {
  display: flex;
  animation: bg-in .22s ease;
}
@keyframes bg-in { from{opacity:0} to{opacity:1} }

.modal-sheet {
  background: var(--warm-white);
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: 680px;
  max-height: 94dvh; overflow-y: auto;
  animation: sheet-up .3s cubic-bezier(0.34,1.2,0.64,1);
}
@keyframes sheet-up {
  from{transform:translateY(100%)} to{transform:translateY(0)}
}

.sheet-handle {
  width: 38px; height: 4px; background: var(--ink-20, rgba(28,25,23,0.15));
  border-radius: 2px; margin: 14px auto 0;
}
.sheet-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; padding: 16px 22px 12px;
}
.sheet-cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--r-full); padding: 6px 14px;
  font-size: 12px; font-weight: 600;
}
.sheet-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--ink-10);
  font-size: 17px; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.sheet-close:hover { background: var(--parchment); }

.sheet-body { padding: 0 22px 32px; }

.sensitive-banner {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--r8); padding: 12px 14px;
  margin-bottom: 18px; font-size: 13px; line-height: 1.55;
}
.sensitive-puberty { background: #fdf0f8; border: 1px solid #e8b0cc; color: #6b0040; }
.sensitive-safety  { background: #fff0f0; border: 1px solid #e8a0a0; color: #6b0000; }
.sensitive-mental  { background: #f0f6ff; border: 1px solid #a0bce0; color: #003060; }

.sheet-title {
  font-family: 'Lora', serif;
  font-size: clamp(22px,5vw,30px); font-weight: 700;
  line-height: 1.2; margin-bottom: 6px;
}
.sheet-age-tag {
  font-size: 12px; color: var(--ink-60);
  margin-bottom: 20px; display: flex; align-items: center; gap: 6px;
}

.lesson-text {
  font-size: 16px; line-height: 1.82; color: var(--ink);
  margin-bottom: 22px;
}
.lesson-text strong { color: var(--terracotta); }

/* How-to approach */
.how-card {
  background: white; border-radius: var(--r12);
  padding: 16px 18px; margin-bottom: 18px;
  border: 1px solid var(--ink-10);
}
.how-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-60); margin-bottom: 10px;
}
.how-steps { list-style: none; }
.how-steps li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 7px 0; font-size: 14px; line-height: 1.5;
  border-bottom: 1px solid var(--ink-10);
}
.how-steps li:last-child { border-bottom: none; }
.step-n {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: white;
  font-family: 'DM Mono', monospace; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}

/* Conversation starters */
.convos-label {
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 10px;
}
.convo-q {
  background: white; border-radius: var(--r12);
  padding: 13px 15px; font-size: 14px;
  line-height: 1.5; margin-bottom: 8px;
  border-left: 3px solid var(--sage);
}

/* Fact box */
.fact-box {
  background: var(--gold-light); border-radius: var(--r12);
  padding: 14px 16px; font-size: 13px;
  color: #5a4500; line-height: 1.65;
  display: flex; gap: 10px; margin-bottom: 18px;
}
.fact-icon { font-size: 18px; flex-shrink: 0; }

/* Resources */
.resources-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-60); margin-bottom: 8px;
}
.resource-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: white;
  border-radius: var(--r8); border: 1px solid var(--ink-10);
  font-size: 13px; color: var(--sky);
  text-decoration: none; margin-bottom: 7px;
  transition: background var(--transition);
}
.resource-link:hover { background: var(--sky-light); }

/* Note textarea */
.note-area {
  width: 100%; padding: 13px; min-height: 90px;
  border: 2px solid var(--ink-10); border-radius: var(--r12);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  background: white; color: var(--ink); resize: vertical;
  margin-top: 10px; outline: none;
}
.note-area:focus { border-color: var(--sage); }

/* Share card preview */
.share-preview {
  border-radius: var(--r12); overflow: hidden;
  margin-bottom: 12px; box-shadow: var(--shadow);
}

/* Sheet actions */
.sheet-actions {
  display: flex; gap: 10px;
  padding-top: 16px; border-top: 1px solid var(--ink-10);
  margin-top: 8px;
}
.btn-mark-done {
  flex: 1; padding: 14px; background: var(--sage); color: white;
  border: none; border-radius: var(--r12);
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background var(--transition);
}
.btn-mark-done:hover { background: var(--sage-mid); }
.btn-mark-done.undone { background: var(--cream); color: var(--ink-60); }
.btn-action-sm {
  width: 50px; height: 50px; border-radius: var(--r12);
  border: 2px solid var(--ink-10); background: white;
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-action-sm:hover { background: var(--cream); }

/* ════════════════════════════════════════════
   BROWSE SCREEN
════════════════════════════════════════════ */
.browse-screen { padding: 20px 20px 100px; max-width: var(--max-w); margin: 0 auto; }
.browse-h { font-family: 'Lora', serif; font-size: 26px; font-weight: 700; margin-bottom: 16px; }

.scroll-chips {
  display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 12px; scrollbar-width: none;
}
.scroll-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 16px; border-radius: var(--r-full);
  border: 2px solid var(--ink-10); background: white;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  cursor: pointer; transition: all var(--transition);
}
.chip:hover { border-color: var(--ink-30); }
.chip.active { background: var(--ink); color: white; border-color: var(--ink); }

.cat-filter-wrap {
  display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px;
}
.cat-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: var(--r-full);
  border: 2px solid var(--ink-10); background: white;
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.cat-chip:hover { border-color: var(--ink-30); }
.cat-chip.active { background: var(--ink); color: white; border-color: var(--ink); }

.browse-grid { display: grid; gap: 10px; }

.empty-state {
  text-align: center; padding: 48px 20px; color: var(--ink-60);
}
.empty-icon { font-size: 44px; margin-bottom: 14px; }

/* ════════════════════════════════════════════
   SETTINGS SCREEN
════════════════════════════════════════════ */
.settings-screen { padding: 20px 20px 100px; max-width: var(--max-w); margin: 0 auto; }
.settings-h { font-family: 'Lora', serif; font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.settings-sub { font-size: 14px; color: var(--ink-60); margin-bottom: 28px; line-height: 1.5; }

.settings-block { margin-bottom: 24px; }
.settings-block-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-60); margin-bottom: 10px;
}
.settings-card { background: white; border-radius: var(--r16); overflow: hidden; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--ink-10);
  cursor: pointer; transition: background var(--transition);
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--cream); }
.row-left { display: flex; align-items: center; gap: 12px; }
.row-icon { font-size: 20px; }
.row-label { font-size: 15px; font-weight: 500; }
.row-sub { font-size: 12px; color: var(--ink-60); margin-top: 1px; }

.toggle {
  width: 42px; height: 23px; background: var(--ink-20, rgba(28,25,23,0.15));
  border-radius: var(--r-full); position: relative;
  transition: background .2s; cursor: pointer; flex-shrink: 0;
}
.toggle.on { background: var(--sage); }
.toggle::after {
  content: ''; position: absolute;
  top: 3px; left: 3px; width: 17px; height: 17px;
  background: white; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.toggle.on::after { transform: translateX(19px); }

.btn-danger {
  width: 100%; padding: 13px;
  background: none; border: 2px solid #e0cccc;
  border-radius: var(--r12); color: #b03030;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  transition: all var(--transition);
}
.btn-danger:hover { background: #fff0f0; }

/* ════════════════════════════════════════════
   EMAIL REMINDER SECTION
════════════════════════════════════════════ */
.email-section {
  background: linear-gradient(135deg, var(--sage), var(--sky));
  border-radius: var(--r16); padding: 22px;
  color: white; margin-bottom: 16px;
}
.email-section-title {
  font-family: 'Lora', serif; font-size: 18px; font-weight: 700;
  margin-bottom: 6px;
}
.email-section-sub { font-size: 13px; opacity: .82; margin-bottom: 16px; line-height: 1.5; }
.email-input-row { display: flex; gap: 8px; }
.email-input {
  flex: 1; padding: 11px 14px;
  border: none; border-radius: var(--r8);
  font-size: 14px; outline: none;
  background: rgba(255,255,255,0.9); color: var(--ink);
}
.email-input::placeholder { color: var(--ink-60); }
.btn-subscribe {
  padding: 11px 18px; border: none; border-radius: var(--r8);
  background: var(--ink); color: white; font-size: 14px; font-weight: 600;
  white-space: nowrap; transition: all var(--transition);
}
.btn-subscribe:hover { background: #333; }
.email-privacy { font-size: 11px; opacity: .6; margin-top: 8px; }

/* ════════════════════════════════════════════
   SHARE CARD CANVAS
════════════════════════════════════════════ */
.share-canvas-wrap {
  position: relative; border-radius: var(--r12);
  overflow: hidden; margin-bottom: 14px;
}
.share-canvas-wrap canvas { display: block; width: 100%; height: auto; }

/* ════════════════════════════════════════════
   PRIVACY PAGE
════════════════════════════════════════════ */
.privacy-page {
  max-width: 720px; margin: 0 auto; padding: 60px 24px 80px;
}
.privacy-page h1 {
  font-family: 'Lora', serif; font-size: clamp(26px,5vw,38px);
  font-weight: 700; margin-bottom: 8px;
}
.privacy-page .updated {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--ink-60); margin-bottom: 36px;
}
.privacy-page h2 {
  font-family: 'Lora', serif; font-size: 20px; font-weight: 700;
  margin: 32px 0 10px; padding-top: 8px;
  border-top: 1px solid var(--ink-10);
}
.privacy-page p { font-size: 15px; line-height: 1.8; margin-bottom: 14px; color: var(--ink-80); }
.privacy-page ul { padding-left: 20px; margin-bottom: 14px; }
.privacy-page li { font-size: 15px; line-height: 1.8; color: var(--ink-80); margin-bottom: 6px; }
.privacy-page a { color: var(--sage); text-decoration: underline; }
.privacy-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--sage); text-decoration: none; font-weight: 600;
  font-size: 14px; margin-bottom: 32px;
}

/* ════════════════════════════════════════════
   TOAST
════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 76px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink); color: white;
  padding: 11px 22px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 500;
  opacity: 0; transition: all .28s;
  z-index: 1000; white-space: nowrap; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (min-width: 640px) {
  .modal-bg { align-items: center; padding: 20px; }
  .modal-sheet { border-radius: 24px; max-height: 90vh; }
  .browse-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: repeat(3,1fr); }
}

@media (min-width: 900px) {
  .welcome-hero { padding: 80px 24px 100px; }
  .browse-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
