/* ── Design tokens ────────────────────────────────────────── */
:root {
  --cream: #FAF7F2;
  --white: #FFFFFF;
  --ink: #2C2620;
  --ink-light: #7A6E65;
  --terra: #C4714A;
  --terra-light: #F0E0D6;
  --sage: #7A9E7E;
  --sage-light: #E2EDE3;
  --gold: #D4A847;
  --gold-light: #FBF3DC;
  --shadow: 0 2px 12px rgba(44,38,32,0.08);
  --radius: 14px;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  padding-bottom: 90px;
}

/* ── Typography ──────────────────────────────────────────── */
.wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.wordmark span { color: var(--terra); }

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 10px;
}

/* ── Header ──────────────────────────────────────────────── */
.header {
  background: var(--white);
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(44,38,32,0.07);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Bottom nav ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--white);
  border-top: 1px solid rgba(44,38,32,0.08);
  display: flex;
  padding: 8px 0 20px;
  z-index: 50;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: none;
  color: inherit;
}
.nav-icon { font-size: 20px; }
.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-light);
}
.nav-item.active .nav-label { color: var(--terra); }

/* ── Tradition card ──────────────────────────────────────── */
.tradition-card {
  background: var(--terra);
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.tradition-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.tradition-eyebrow {
  font-family: 'Caveat', cursive;
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.tradition-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

/* ── Ritual item ─────────────────────────────────────────── */
.ritual-item {
  background: var(--white);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.ritual-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--terra-light);
  background: var(--terra-light);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ritual-check.done { background: var(--terra); border-color: var(--terra); }
.ritual-check.done::after { content: '✓'; color: white; font-size: 12px; font-weight: 700; }
.ritual-name { font-weight: 700; font-size: 14px; }
.ritual-day { font-size: 12px; color: var(--ink-light); margin-top: 1px; }

/* ── Meals grid ──────────────────────────────────────────── */
.meals-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.meal-day {
  background: var(--white);
  border-radius: 8px;
  padding: 8px 4px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
}
.meal-day:active { transform: scale(0.95); }
.meal-day.today { background: var(--gold-light); border: 1.5px solid var(--gold); }
.meal-day.shopping { background: var(--sage-light); border: 1.5px solid var(--sage); }
.meal-day-name {
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--ink-light); margin-bottom: 4px;
}
.meal-day.today .meal-day-name { color: var(--gold); }
.meal-day.shopping .meal-day-name { color: var(--sage); }
.meal-icon { font-size: 16px; display: block; margin-bottom: 3px; }
.meal-text { font-size: 8.5px; color: var(--ink); font-weight: 700; line-height: 1.2; }
.meal-shopping-badge { font-size: 7px; font-weight: 700; color: var(--sage); text-transform: uppercase; }
.meal-day.has-recipe { cursor: pointer; }
.recipe-chevron { font-size: 7px; color: var(--terra); margin-left: 2px; display: inline-block; transition: transform 0.2s; }
.meal-day.expanded .recipe-chevron { transform: rotate(90deg); }
.recipe-body { display: none; font-size: 8px; color: var(--ink-light); white-space: pre-wrap; text-align: left; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(44,38,32,0.08); line-height: 1.4; }
.meal-day.expanded .recipe-body { display: block; }

/* ── Shopping banner ─────────────────────────────────────── */
.shopping-banner {
  background: var(--sage-light);
  border: 1.5px solid var(--sage);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.shopping-banner strong { display: block; font-size: 14px; font-weight: 700; }
.shopping-banner span { font-size: 12px; color: var(--ink-light); }

/* ── Routine card ────────────────────────────────────────── */
.routine-card { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.routine-header { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.routine-left { display: flex; align-items: center; gap: 10px; }
.routine-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.routine-dot.morning { background: var(--gold); }
.routine-dot.dad { background: var(--terra); }
.routine-dot.mum { background: #B07BAC; }
.routine-dot.afterschool { background: var(--sage); }
.routine-dot.night { background: #5A7BAC; }
.routine-name { font-weight: 700; font-size: 14px; }
.routine-time { font-size: 11px; color: var(--ink-light); margin-top: 1px; }
.routine-chevron { color: var(--ink-light); font-size: 12px; transition: transform 0.2s; }
.routine-card.open .routine-chevron { transform: rotate(180deg); }
.routine-body { display: none; padding: 0 14px 13px; border-top: 1px solid rgba(44,38,32,0.06); }
.routine-card.open .routine-body { display: block; }
.routine-steps { list-style: none; margin-top: 10px; }
.routine-steps li { font-size: 13px; padding: 4px 0 4px 16px; position: relative; line-height: 1.4; }
.routine-steps li::before { content: '·'; position: absolute; left: 4px; color: var(--ink-light); font-size: 16px; top: 1px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-icon {
  width: 36px; height: 36px;
  border: none; background: var(--cream);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--ink);
}
.btn-primary {
  background: var(--terra); color: white;
  border: none; border-radius: 20px;
  padding: 7px 16px; font-family: 'Lato', sans-serif;
  font-weight: 700; font-size: 13px; cursor: pointer;
  text-decoration: none; display: inline-block;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state p { color: var(--ink-light); margin-bottom: 16px; }

/* ── Content layout ──────────────────────────────────────── */
.content { padding: 20px 16px; display: flex; flex-direction: column; gap: 20px; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.35s ease both; }
