/* ==========================================================================
   Mealtime Moments — Design System (Warm Cream & Coral)
   Mobile-First Single-Page Application Stylesheet
   ========================================================================== */

:root {
  /* Light Theme — Warm Cream & Coral */
  --bg-primary: #FDF8F3;
  --bg-secondary: #F7EFE6;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFDF9;
  --bg-subtle: #F3E7DA;
  --bg-accent-soft: #FFEBE5;
  --bg-sage-soft: #EAF3EC;
  --bg-amber-soft: #FFF4DE;
  --bg-lavender-soft: #F2ECF9;

  --text-primary: #2D221E;
  --text-secondary: #68564E;
  --text-muted: #968278;
  --text-on-accent: #FFFFFF;

  --coral-primary: #E06D53;
  --coral-hover: #CC5A40;
  --coral-active: #B84D35;
  --coral-light: #F7B2A1;
  --coral-glow: rgba(224, 109, 83, 0.22);

  --sage-accent: #4E8765;
  --amber-accent: #D68C32;
  --berry-accent: #9E587A;

  --border-soft: #EADCD0;
  --border-focus: #E06D53;

  --shadow-sm: 0 2px 8px rgba(45, 34, 30, 0.05);
  --shadow-md: 0 8px 24px rgba(45, 34, 30, 0.08);
  --shadow-lg: 0 14px 36px rgba(45, 34, 30, 0.12);
  --shadow-coral: 0 8px 22px rgba(224, 109, 83, 0.28);

  --font-serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --radius-pill: 9999px;

  --transition-fast: 160ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark Theme — Warm Cozy Evening */
[data-theme="dark"] {
  --bg-primary: #1C1614;
  --bg-secondary: #251E1B;
  --bg-surface: #2B221F;
  --bg-surface-elevated: #352A26;
  --bg-subtle: #382D28;
  --bg-accent-soft: #432822;
  --bg-sage-soft: #213328;
  --bg-amber-soft: #3B2F1D;
  --bg-lavender-soft: #2F263A;

  --text-primary: #F9EFE8;
  --text-secondary: #CDBBB0;
  --text-muted: #9A867B;
  --text-on-accent: #1C1614;

  --coral-primary: #F08268;
  --coral-hover: #F59680;
  --coral-active: #E06D53;
  --coral-light: #7A3E31;
  --coral-glow: rgba(240, 130, 104, 0.25);

  --sage-accent: #78B891;
  --amber-accent: #F0B265;
  --berry-accent: #D18AAE;

  --border-soft: #3E322D;
  --border-focus: #F08268;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-coral: 0 8px 22px rgba(240, 130, 104, 0.22);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* App Shell Container */
.app-shell {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 92px;
  position: relative;
}

/* Top Bar */
.top-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--bg-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Baby Switcher Pill */
.baby-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 6px 14px 6px 10px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.baby-switcher-btn:hover,
.baby-switcher-btn:focus-visible {
  border-color: var(--coral-primary);
  outline: none;
}

.baby-switcher-btn:active {
  transform: scale(0.97);
}

.baby-switcher-emoji {
  font-size: 1.2rem;
  line-height: 1;
}

.baby-switcher-caret {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Main Content Views */
.main-content {
  flex: 1;
  padding: 20px 18px 28px;
}

.view-screen {
  display: none;
  animation: fadeSlideUp 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-screen.active {
  display: block;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography Helpers */
.serif-heading {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.heading-xl {
  font-size: 1.85rem;
}

.heading-lg {
  font-size: 1.5rem;
}

.heading-md {
  font-size: 1.22rem;
}

.subtitle-warm {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin: 0 0 20px;
}

/* Warm Cards */
.warm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.warm-card-soft {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 15px 22px;
  min-height: 54px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
  user-select: none;
}

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

.btn-block {
  width: 100%;
}

.btn-coral {
  background: var(--coral-primary);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-coral);
}

.btn-coral:hover {
  background: var(--coral-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--coral-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
  min-height: 44px;
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-sm {
  padding: 9px 14px;
  min-height: 38px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--coral-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 84px;
}

/* Welcome Screen Tabs */
.welcome-hero {
  text-align: center;
  padding: 12px 6px 20px;
}

.welcome-hero-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: var(--bg-accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-secondary);
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-soft);
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Avatar Emoji Picker Grid */
.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.avatar-option {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-primary);
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.avatar-option.selected {
  border-color: var(--coral-primary);
  background: var(--bg-accent-soft);
  transform: scale(1.06);
}

/* Home Screen Hero CTA */
.home-hero-card {
  background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-accent-soft) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 24px 22px;
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
  text-align: center;
}

.start-mealtime-btn {
  font-size: 1.12rem;
  padding: 18px 26px;
  min-height: 62px;
  border-radius: var(--radius-lg);
  margin-top: 10px;
}

/* Mealtimes Noticed Pill Card */
.stats-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.stats-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stats-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--bg-amber-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}

.stats-count {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--coral-primary);
  line-height: 1.1;
}

/* Idea to Try Card */
.idea-card {
  background: var(--bg-sage-soft);
  border: 1px solid color-mix(in srgb, var(--sage-accent) 28%, var(--border-soft));
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
  position: relative;
}

.idea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.idea-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sage-accent);
}

.idea-level-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.idea-body {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0;
}

/* ==========================================================================
   Mealtime in Progress — 9 Tappable Level Cards
   ========================================================================== */

.mealtime-sticky-bar {
  position: sticky;
  top: 67px;
  z-index: 25;
  background: color-mix(in srgb, var(--bg-primary) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.recorded-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.recorded-strip-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.moments-chip-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px;
  min-height: 40px;
  scrollbar-width: none;
}

.moments-chip-list::-webkit-scrollbar {
  display: none;
}

.moment-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  animation: popIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Cheer Banner */
.cheer-toast {
  background: var(--bg-accent-soft);
  border: 1.5px solid var(--coral-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  animation: fadeSlideUp 220ms ease-out;
}

.cheer-toast-emoji {
  font-size: 1.35rem;
  line-height: 1.2;
}

.cheer-toast-text {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

/* 9 Level Cards Grid */
.levels-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.level-tap-card {
  width: 100%;
  text-align: left;
  background: var(--bg-surface);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.level-tap-card:hover {
  border-color: var(--coral-light);
  box-shadow: var(--shadow-md);
}

.level-tap-card:active,
.level-tap-card.just-tapped {
  transform: scale(0.985);
  border-color: var(--coral-primary);
  background: var(--bg-accent-soft);
}

.level-tap-emoji-wrap {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.level-tap-content {
  flex: 1;
  min-width: 0;
}

.level-tap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.level-tap-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.level-tap-badge {
  background: var(--coral-primary);
  color: var(--text-on-accent);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  min-width: 24px;
  text-align: center;
}

.level-examples-list {
  margin: 0;
  padding-left: 17px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.level-examples-list li {
  margin-bottom: 3px;
}

/* ==========================================================================
   Summary Screen
   ========================================================================== */

.summary-hero {
  text-align: center;
  padding: 18px 12px 20px;
  background: linear-gradient(155deg, var(--bg-accent-soft) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}

.summary-hero-emoji {
  font-size: 2.5rem;
  margin-bottom: 8px;
  display: inline-block;
}

.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.insight-card.highlight-sage {
  background: var(--bg-sage-soft);
  border-color: color-mix(in srgb, var(--sage-accent) 30%, var(--border-soft));
}

.insight-card.highlight-amber {
  background: var(--bg-amber-soft);
  border-color: color-mix(in srgb, var(--amber-accent) 35%, var(--border-soft));
}

.insight-card.highlight-lavender {
  background: var(--bg-lavender-soft);
}

.insight-icon {
  font-size: 1.55rem;
  line-height: 1.1;
  flex-shrink: 0;
}

.insight-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.insight-text {
  font-size: 0.94rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Journey Screen — Dot Chart & Repertoire List
   ========================================================================== */

.dot-chart-wrapper {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.dot-chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 6px 26px 0;
  border-right: 1px dashed var(--border-soft);
  flex-shrink: 0;
}

.y-axis-emoji {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
  line-height: 1;
}

.dot-chart-scroll {
  flex: 1;
  overflow-x: auto;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 8px 6px 4px;
}

.dot-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
}

.dot-chart-slots {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 258px;
  position: relative;
  align-items: center;
}

.dot-chart- slots-line {
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border-soft);
  z-index: 1;
}

.dot-slot {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.dot-marker {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--border-soft);
  opacity: 0.25;
}

.dot-marker.active {
  width: 18px;
  height: 18px;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  border: 2px solid var(--bg-surface);
}

.dot-col-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: nowrap;
}

/* Repertoire Level List */
.repertoire-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.repertoire-item.unseen {
  opacity: 0.76;
  background: var(--bg-secondary);
}

.repertoire-emoji {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.repertoire-info {
  flex: 1;
  min-width: 0;
}

.repertoire-name {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 2px;
}

.repertoire-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Past Mealtimes Accordion */
.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}

.history-summary {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  gap: 10px;
}

.history-summary::-webkit-details-marker {
  display: none;
}

.history-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

/* Family Code Display Box */
.family-code-box {
  background: var(--bg-accent-soft);
  border: 1.5px dashed var(--coral-primary);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}

.family-code-value {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--coral-primary);
}

/* Segmented Pill Controls (Theme / Language) */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
  background: var(--bg-secondary);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

.segment-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.segment-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: center;
  padding: 6px 12px calc(8px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav-inner {
  width: 100%;
  max-width: 500px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.nav-item {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-item-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.nav-item.active {
  color: var(--coral-primary);
  background: var(--bg-accent-soft);
}

/* Modal Overlay */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(24, 18, 15, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 24px 22px;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideUp 220ms ease-out;
  max-height: 90dvh;
  overflow-y: auto;
}

.baby-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-soft);
  margin-bottom: 8px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.baby-profile-row.active {
  border-color: var(--coral-primary);
  background: var(--bg-accent-soft);
}

/* Alert / Disclaimer Box */
.disclaimer-box {
  background: var(--bg-amber-soft);
  border-left: 4px solid var(--amber-accent);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}
