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

:root {
  /* Playful Objects — V3 Palette */
  --primary: #FF8C5A;
  --primary-light: #FFF2E8;
  --primary-dark: #FF6B3A;

  /* Sauge */
  --secondary: #6B9E8F;
  --secondary-dark: #5A8A78;
  --secondary-light: #E8F5EE;

  /* Neutres — warm milk */
  --text: #2D3436;
  --text-light: #5A5A6A;
  --text-lighter: #B0B0A0;
  --bg: #FFFDF8;
  --card: #FFFFFF;
  --border: #F0F0EA;

  /* Accent */
  --accent: #FFD166;
  --blush: #E88DA6;

  /* Sémantiques */
  --success: #6B9E8F;
  --warning: #FFD166;
  --danger: #E05252;

  /* Header — sage instead of dark */
  --header-bg: #6B9E8F;
  --header-text: #FFFFFF;

  /* Couleurs de cards thématiques — Playful Objects */
  --pink: #FCE8EE; --green: #E8F5EE; --blue: #E3EDF8; --purple: #EEE8F8; --yellow: #FFF8E8; --orange: #FFF2E8;

  /* Layout — larger radii */
  --radius: 20px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Shadows — colored, warmer */
  --shadow-sm: 0 2px 8px rgba(45,52,54,0.06);
  --shadow-md: 0 4px 16px rgba(45,52,54,0.08);
  --shadow-lg: 0 8px 32px rgba(45,52,54,0.12);
  --shadow: var(--shadow-sm);

  /* Typo */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'DM Mono', monospace;
}

body {
  font-family: var(--font-body);
  background: var(--bg); color: var(--text);
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  line-height: 1.5; font-size: 16px;
}

/* ===== LANDING PAGE ===== */
/* ===== LANDING PAGE — PLAYFUL OBJECTS ===== */
.lp { font-family: 'Nunito', var(--font-body); background: #FFFDF8; overflow-x: hidden; }

/* --- Sticky Nav --- */
.lp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 253, 248, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid transparent;
  transform: translateY(-100%); transition: transform 0.3s ease, border-color 0.3s;
}
.lp-nav-visible { transform: translateY(0); border-bottom-color: #F0F0EA; }
.lp-nav-inner {
  max-width: 600px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.lp-nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Fraunces', serif; font-size: 1.1em; font-weight: 800; color: #2D3436;
}
.lp-nav-actions { display: flex; gap: 8px; }
.lp-nav-login {
  background: none; border: none; color: #6B9E8F; font-family: 'Nunito', sans-serif;
  font-size: 0.85em; font-weight: 700; cursor: pointer; padding: 8px 12px;
}
.lp-nav-signup {
  background: linear-gradient(135deg, #FF8C5A, #FF6B3A); color: white; border: none;
  font-family: 'Nunito', sans-serif; font-size: 0.85em; font-weight: 800;
  padding: 8px 16px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 3px 12px rgba(255, 100, 50, 0.25);
}

/* --- Hero Logo --- */
.lp-hero-logo { margin-bottom: 16px; }

/* --- Hero --- */
.lp-hero { padding: 48px 24px 0; text-align: center; position: relative; }
.lp-hero-inner { max-width: 480px; margin: 0 auto; }
.lp-hero-badge {
  display: inline-block; background: linear-gradient(135deg, #FFF2E8, #FFE0CC);
  color: #E07040; font-size: 0.8em; font-weight: 800; padding: 8px 18px;
  border-radius: 100px; margin-bottom: 20px; letter-spacing: 0.02em;
}
.lp-hero-title {
  font-family: 'Fraunces', serif; font-size: 2.2em; font-weight: 800;
  line-height: 1.15; color: #2D3436; margin-bottom: 16px;
}
.lp-hero-title em { font-style: italic; color: #FF8C5A; }
.lp-hero-sub {
  font-size: 1.05em; color: #7A7A8A; line-height: 1.55; max-width: 380px;
  margin: 0 auto 28px;
}
.lp-hero-actions { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 auto; }

/* --- Buttons --- */
.lp-btn {
  display: block; width: 100%; padding: 16px 24px; border-radius: 20px;
  font-family: 'Nunito', sans-serif; font-size: 1em; font-weight: 800;
  border: none; cursor: pointer; text-align: center; transition: transform 0.15s, box-shadow 0.15s;
}
.lp-btn:active { transform: scale(0.97); }
.lp-btn-primary {
  background: linear-gradient(135deg, #FF8C5A, #FF6B3A); color: white;
  box-shadow: 0 6px 24px rgba(255, 100, 50, 0.3);
}
.lp-btn-ghost { background: transparent; color: #6B9E8F; border: 2.5px solid #6B9E8F; }

/* --- Phone Mockup --- */
.lp-phone { margin: 36px auto 0; max-width: 300px; }
.lp-phone-frame {
  background: #FFFDF8; border-radius: 36px; border: 6px solid #2D3436;
  overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,0.12); position: relative;
}
.lp-phone-header {
  background: #6B9E8F; padding: 32px 20px 18px; text-align: center;
}
.lp-ph-greeting { font-size: 0.75em; color: rgba(255,255,255,0.7); }
.lp-ph-baby { font-family: 'Fraunces', serif; font-size: 1.4em; font-weight: 800; color: white; }
.lp-ph-age { font-size: 0.72em; color: rgba(255,255,255,0.6); margin-top: 2px; }
.lp-phone-body { padding: 14px; }

.lp-ph-obj {
  display: flex; align-items: center; gap: 12px; border-radius: 20px;
  padding: 14px; margin-bottom: 10px;
}
.lp-ph-obj-icon {
  width: 48px; height: 48px; border-radius: 16px; display: flex;
  align-items: center; justify-content: center; font-size: 1.4em;
  color: white; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.lp-ph-obj-text { flex: 1; }
.lp-ph-obj-text strong { font-size: 0.85em; display: block; color: #2D3436; }
.lp-ph-obj-text span { font-size: 0.7em; color: #8A8A8A; }
.lp-ph-obj-plus { font-family: 'Fraunces', serif; font-size: 1.5em; font-weight: 800; }

.lp-phone-mic {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #FF8C5A, #FF6B3A); display: flex;
  align-items: center; justify-content: center; font-size: 1.5em;
  box-shadow: 0 6px 24px rgba(255, 100, 50, 0.4);
}

/* --- Sections --- */
.lp-section { padding: 56px 24px; max-width: 600px; margin: 0 auto; }
.lp-section-badge {
  font-size: 0.75em; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: #6B9E8F; text-align: center;
  margin-bottom: 10px;
}
.lp-section-title {
  font-family: 'Fraunces', serif; font-size: 1.8em; font-weight: 800;
  text-align: center; color: #2D3436; line-height: 1.2; margin-bottom: 32px;
}
.lp-section-title em { font-style: italic; color: #FF8C5A; }

/* --- Steps --- */
.lp-steps { display: flex; flex-direction: column; gap: 24px; }
.lp-step {
  background: white; border-radius: 24px; padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06); border: 2px solid #F0F0EA;
  text-align: center; position: relative;
}
.lp-step-icon {
  width: 64px; height: 64px; border-radius: 20px; display: flex;
  align-items: center; justify-content: center; font-size: 1.8em;
  margin: 0 auto 14px; color: white; box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.lp-step-num {
  position: absolute; top: -10px; left: -10px; width: 32px; height: 32px;
  border-radius: 50%; background: #FFD166; color: #2D3436; font-weight: 800;
  font-size: 0.85em; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(255,209,102,0.3);
}
.lp-step h3 { font-size: 1.05em; font-weight: 800; margin-bottom: 6px; color: #2D3436; }
.lp-step p { font-size: 0.88em; color: #7A7A8A; line-height: 1.5; }

/* --- Features grid --- */
.lp-features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-feat {
  background: white; border-radius: 24px; padding: 24px 18px;
  text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  border: 2px solid #F0F0EA;
}
.lp-feat-icon {
  width: 56px; height: 56px; border-radius: 18px; display: flex;
  align-items: center; justify-content: center; font-size: 1.6em;
  margin: 0 auto 12px;
}
.lp-feat h3 { font-size: 0.9em; font-weight: 800; color: #2D3436; margin-bottom: 6px; }
.lp-feat p { font-size: 0.78em; color: #8A8A8A; line-height: 1.45; }

/* --- Trust / Why section --- */
.lp-trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-trust-card {
  background: white; border-radius: 24px; padding: 24px 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05); border: 2px solid #F0F0EA;
}
.lp-trust-emoji { font-size: 2em; margin-bottom: 10px; text-align: center; }
.lp-trust-card h3 { font-size: 0.95em; font-weight: 800; color: #2D3436; text-align: center; margin-bottom: 12px; }
.lp-trust-card ul { list-style: none; padding: 0; }
.lp-trust-card li {
  font-size: 0.82em; color: #5A5A6A; padding: 6px 0; line-height: 1.4;
  border-bottom: 1px solid #F5F5F0;
}
.lp-trust-card li:last-child { border-bottom: none; }
.lp-trust-card li::before { content: '✓ '; color: #6B9E8F; font-weight: 800; }

/* --- Voice demo --- */
.lp-voice-section { text-align: center; }
.lp-voice-demo {
  background: white; border-radius: 28px; padding: 36px 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06); border: 2px solid #F0F0EA;
}
.lp-voice-rings { position: relative; width: 140px; height: 140px; margin: 0 auto 20px; }
.lp-voice-ring {
  position: absolute; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.lp-voice-ring-3 { width: 140px; height: 140px; background: rgba(255,140,90,0.06); }
.lp-voice-ring-2 { width: 110px; height: 110px; background: rgba(255,140,90,0.12); }
.lp-voice-ring-1 { width: 80px; height: 80px; background: rgba(255,140,90,0.2); }
.lp-voice-mic {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #FF8C5A, #FF6B3A);
  display: flex; align-items: center; justify-content: center; font-size: 1.8em;
  box-shadow: 0 6px 28px rgba(255, 100, 50, 0.35);
}
.lp-voice-transcript {
  font-size: 1em; color: #2D3436; line-height: 1.6; margin-bottom: 16px;
  font-style: italic;
}
.lp-voice-transcript strong { color: #FF8C5A; font-style: normal; }
.lp-voice-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.lp-voice-tag {
  padding: 8px 14px; border-radius: 12px; font-size: 0.82em; font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.lp-voice-caption { font-size: 0.82em; color: #9A9AAA; line-height: 1.5; }

/* --- Final CTA --- */
.lp-final { text-align: center; padding-bottom: 40px; }
.lp-final-emoji { font-size: 3em; margin-bottom: 16px; }
.lp-final-title {
  font-family: 'Fraunces', serif; font-size: 1.8em; font-weight: 800;
  color: #2D3436; line-height: 1.2; margin-bottom: 12px;
}
.lp-final-title em { font-style: italic; color: #FF8C5A; }
.lp-final-sub { font-size: 1em; color: #7A7A8A; margin-bottom: 24px; }

/* --- Footer --- */
.lp-footer {
  text-align: center; padding: 32px 24px 40px;
  border-top: 2px solid #F0F0EA;
}
.lp-footer-brand {
  font-family: 'Fraunces', serif; font-size: 1.2em; font-weight: 800;
  color: #2D3436; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lp-footer p { font-size: 0.78em; color: #AAA; margin-bottom: 10px; }
.lp-footer-links { font-size: 0.78em; }
.lp-footer-links a { color: #8A8A8A; text-decoration: none; }
.lp-footer-links a:hover { text-decoration: underline; }
.lp-footer-links span { color: #CCC; margin: 0 6px; }

/* ===== LOGIN ===== */
.login-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 20px;
  background: linear-gradient(145deg, #5A8A78 0%, #6B9E8F 50%, #7BB0A0 100%);
  position: relative; overflow: hidden;
}
/* Motif décoratif doux */
.login-screen::before {
  content: ''; position: absolute; top: -20%; right: -20%;
  width: 60%; height: 60%; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,144,106,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.login-screen::after {
  content: ''; position: absolute; bottom: -15%; left: -15%;
  width: 50%; height: 50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(107,158,143,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.login-screen h1 {
  font-family: var(--font-display); color: white; font-size: 2.8em;
  margin-bottom: 8px; letter-spacing: -0.5px; font-weight: 700;
  position: relative; z-index: 1;
}
.login-screen .subtitle {
  color: rgba(255,255,255,0.7); font-size: 1em; margin-bottom: 32px;
  position: relative; z-index: 1;
}
.login-card {
  background: white; border-radius: var(--radius-lg); padding: 28px;
  width: 100%; max-width: 360px; box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.role-tabs { display: flex; margin-bottom: 24px; border-radius: var(--radius-md); overflow: hidden; border: 2px solid var(--primary); }
.role-tab { flex: 1; padding: 14px; text-align: center; font-weight: 600; cursor: pointer; border: none; background: white; color: var(--primary); font-size: 1em; transition: background-color 0.2s, color 0.2s; font-family: var(--font-body); }
.role-tab.active { background: var(--primary); color: white; }
.pin-input { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.pin-input input { width: 55px; height: 65px; text-align: center; font-size: 1.8em; font-weight: 700; border: 2px solid var(--border); border-radius: var(--radius-md); background: var(--bg); color: var(--text); outline: none; -webkit-appearance: none; font-family: var(--font-body); }
.pin-input input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-light); }

/* Lang selector — discret en bas */
.lang-selector { position: relative; z-index: 1; margin-bottom: 20px; opacity: 0.6; transition: opacity 0.2s; }
.lang-selector:hover, .lang-selector:focus-within { opacity: 1; }
.login-lang-select { padding: 8px 14px; border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: white; font-size: 0.85em; cursor: pointer; min-width: 160px; text-align: center; min-height: 40px; font-family: var(--font-body); }
.login-lang-select option { color: #333; background: white; }

/* ===== BUTTONS ===== */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 16px; border: none; border-radius: var(--radius-md); font-size: 1.05em; font-weight: 800; cursor: pointer; transition: background-color 0.15s, transform 0.1s; text-align: center; min-height: 48px; gap: 8px; touch-action: manipulation; font-family: var(--font-body); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 4px 14px rgba(255,107,58,0.3); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #E85A2A); }
.btn-primary:active { transform: scale(0.97); }
.btn-success { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: white; box-shadow: 0 4px 14px rgba(107,158,143,0.3); }
.btn-success:active { transform: scale(0.97); }
.btn-outline { background: transparent; color: var(--primary); border: 2.5px solid var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-lg { padding: 20px; font-size: 1.15em; margin-top: 12px; min-height: 56px; border-radius: var(--radius-lg); }
.btn-danger { background: transparent; color: var(--danger); border: none; padding: 14px; border-radius: var(--radius-md); font-size: 0.95em; font-weight: 500; cursor: pointer; width: 100%; min-height: 48px; text-decoration: underline; text-underline-offset: 2px; font-family: var(--font-body); }
.btn-danger-outline { background: transparent; color: var(--danger); border: 2px solid var(--danger); width: auto; min-width: 48px; text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: 0.85em; min-height: 40px; }
.transmission-actions { display: flex; gap: 10px; align-items: center; }

/* ===== MASQUERADE BANNER ===== */
.masq-banner { background: var(--warning); color: var(--text); padding: 8px 16px; text-align: center; font-size: 0.85em; font-weight: 500; position: sticky; top: 0; z-index: 200; }
.masq-banner a { color: var(--danger); font-weight: 700; cursor: pointer; margin-left: 12px; text-decoration: underline; }

/* ===== HEADER ===== */
.app-header {
  background: var(--header-bg); color: var(--header-text);
  padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 16px rgba(107,158,143,0.2);
}
.app-header h2 { font-family: var(--font-display); font-size: 1.2em; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.header-baby-name { font-size: 0.85em; opacity: 0.7; font-family: var(--font-body); }
/* Rhythm Dots logo */
.logo-dots { display: flex; gap: 3px; align-items: center; flex-shrink: 0; }
.logo-dots span { border-radius: 50%; }
.logo-dots .ld-1 { width: 7px; height: 7px; background: #FF8C5A; }
.logo-dots .ld-2 { width: 10px; height: 10px; background: #6B9E8F; }
.logo-dots .ld-3 { width: 6px; height: 6px; background: #FFD166; }
.logo-dots .ld-4 { width: 8px; height: 8px; background: #E88DA6; }
.header-actions { display: flex; gap: 8px; }
.header-btn { background: rgba(255,255,255,0.15); border: none; color: white; width: 44px; height: 44px; border-radius: 16px; font-size: 1.2em; cursor: pointer; display: flex; align-items: center; justify-content: center; touch-action: manipulation; transition: background-color 0.15s; }
.header-btn:active { background: rgba(255,255,255,0.3); }

/* ===== MAIN CONTENT ===== */
.main-content { padding: 16px; padding-bottom: calc(20px + var(--safe-bottom)); }
.section-title { font-family: var(--font-display); font-size: 1.2em; font-weight: 800; margin-bottom: 16px; color: var(--text); }
.section-hint { font-size: 0.85em; color: var(--text-light); margin-bottom: 10px; }
.date-banner { text-align: center; font-size: 0.85em; color: var(--primary-dark); font-weight: 700; margin-bottom: 16px; padding: 10px 16px; background: linear-gradient(135deg, var(--primary-light), #FFF8F0); border-radius: var(--radius-md); box-shadow: 0 2px 8px rgba(255,140,90,0.1); }
.weather-badge { display: inline-block; font-size: 0.95em; opacity: 1; margin-left: 4px; }
.daily-tip { background: linear-gradient(135deg, #EEE8F8, #F5F0FF); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; font-size: 0.88em; color: #6B5A8E; line-height: 1.5; text-align: center; box-shadow: 0 2px 8px rgba(110,90,160,0.08); }
.quick-actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.quick-btn { flex: 1; min-width: 0; padding: 14px 10px; border: 2px solid var(--border); border-radius: var(--radius); background: white; font-size: 0.9em; font-weight: 700; cursor: pointer; text-align: center; transition: all 0.2s ease; touch-action: manipulation; font-family: var(--font-body); box-shadow: var(--shadow-sm); }
.quick-btn:active { border-color: var(--secondary); background: var(--secondary-light); transform: scale(0.96); box-shadow: 0 2px 8px rgba(107,158,143,0.2); }

/* ===== BABY SELECTOR ===== */
.baby-selector { padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; min-height: calc(100vh - 70px); justify-content: center; }
.baby-card { background: white; border-radius: 18px; padding: 28px; width: 100%; max-width: 300px; text-align: center; box-shadow: var(--shadow-md); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; border: 2px solid transparent; }
.baby-card:active { transform: scale(0.96); box-shadow: var(--shadow-lg); }
.baby-card .emoji { font-size: 4em; margin-bottom: 10px; }
.baby-card .name { font-family: var(--font-display); font-size: 1.4em; font-weight: 700; color: var(--text); }
.baby-card .age { color: var(--text-light); margin-top: 6px; font-size: 0.95em; }

/* ===== CARDS ===== */
.card { background: white; border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.card-colored { border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card-colored h4 { margin-bottom: 12px; font-size: 1.05em; font-weight: 800; font-family: var(--font-display); }
.card-pink { background: linear-gradient(135deg, #FCE8EE, #FFF0F5); } .card-green { background: linear-gradient(135deg, #E8F5EE, #F0FFF5); } .card-blue { background: linear-gradient(135deg, #E3EDF8, #EEF4FF); }
.card-purple { background: linear-gradient(135deg, #EEE8F8, #F5F0FF); } .card-yellow { background: linear-gradient(135deg, #FFF8E8, #FFFCF0); } .card-orange { background: linear-gradient(135deg, #FFF2E8, #FFF8F2); }

/* ===== INFO BOX ===== */
.info-box { background: rgba(255,255,255,0.85); border: 2px solid var(--primary); border-radius: var(--radius-md); padding: 14px; font-size: 1em; line-height: 1.5; }
.info-box-original { margin-top: 8px; padding: 10px 14px; background: rgba(0,0,0,0.03); border-radius: 10px; font-size: 0.85em; color: var(--text-light); font-style: italic; }

/* ===== CHECK / ACTIVITY GRID ===== */
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 14px 14px; background: rgba(255,255,255,0.85); border-radius: var(--radius-md); cursor: pointer; border: 2px solid rgba(255,255,255,0.5); transition: all 0.2s ease; user-select: none; -webkit-user-select: none; min-height: 52px; touch-action: manipulation; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.check-item.checked { border-color: var(--secondary); background: var(--secondary-light); box-shadow: 0 2px 8px rgba(107,158,143,0.15); transform: scale(1.02); }
.check-item .icon { font-size: 1.3em; }
.check-item .label { font-size: 0.95em; font-weight: 600; }

.activity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.activity-item { display: flex; align-items: center; gap: 10px; padding: 14px 12px; background: rgba(255,255,255,0.75); border-radius: var(--radius-md); cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s, background-color 0.15s; user-select: none; -webkit-user-select: none; min-height: 48px; touch-action: manipulation; }
.activity-item.checked { border-color: var(--primary); background: var(--primary-light); }
.activity-item .icon { font-size: 1.4em; }
.activity-item .label { font-size: 0.9em; font-weight: 500; }
.activity-other-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; background: rgba(255,255,255,0.75); border-radius: var(--radius-md); }
.activity-other-row span { font-size: 0.95em; font-weight: 500; white-space: nowrap; }
.input-inline { flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 1em; background: white; outline: none; -webkit-appearance: none; min-height: 44px; font-family: var(--font-body); }
.input-inline:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* Small screens: single column grids */
@media (max-width: 380px) {
  .check-grid, .activity-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .mood-selector-wide { grid-template-columns: repeat(2, 1fr); }
}

/* ===== MOOD ===== */
.mood-selector { display: flex; gap: 10px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.mood-btn { width: 64px; height: 64px; border-radius: 20px; border: 2.5px solid var(--border); background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color 0.15s, transform 0.15s, background-color 0.15s; box-shadow: var(--shadow-sm); touch-action: manipulation; }
.mood-btn .emoji { font-size: 1.8em; }
.mood-btn.selected { border-color: var(--primary); background: var(--primary-light); transform: scale(1.08); box-shadow: 0 2px 8px rgba(255,140,90,0.15); }
.mood-btn:active { transform: scale(0.94); }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.dash-btn { background: white; border: none; border-radius: var(--radius); padding: 18px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); transition: transform 0.12s, box-shadow 0.12s; position: relative; min-height: 88px; touch-action: manipulation; }
.dash-btn:active { transform: scale(0.95); box-shadow: var(--shadow-md); }
.dash-icon { font-size: 2em; }
.dash-label { font-size: 0.85em; font-weight: 600; color: var(--text); }
.dash-count { position: absolute; top: 8px; right: 10px; background: var(--primary); color: white; min-width: 24px; height: 24px; border-radius: 12px; font-size: 0.8em; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.dash-green { border-left: 4px solid var(--secondary); }
.dash-blue { border-left: 4px solid #5B8DB8; }
.dash-purple { border-left: 4px solid #8B7EB8; }
.dash-orange { border-left: 4px solid var(--warning); }
.dash-red { border-left: 4px solid var(--danger); }
.dash-card { background: white; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); min-height: 72px; }
.dash-card .dash-icon { font-size: 1.6em; }
.dash-card .dash-label { font-size: 0.8em; font-weight: 600; color: var(--text-light); }
.dash-card .dash-count { font-size: 0.85em; font-weight: 700; color: var(--text); }
.morning-collapsible { cursor: default; }
.morning-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.morning-header h4 { margin: 0; }
.collapse-arrow { font-size: 0.8em; color: var(--text-light); transition: transform 0.2s; }
.morning-summary-line { font-size: 0.85em; color: var(--text); margin-top: 6px; line-height: 1.4; }
.parent-dashboard { margin-top: 12px; }

.temp-value { font-weight: 700; font-size: 1.05em; }
.temp-high { color: var(--danger); font-weight: 700; }
.temp-alert-info { font-size: 0.85em; color: var(--warning); font-style: italic; }
.entry-alert { border-left: 3px solid var(--danger); background: #FDF0F0; }

.pref-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.pref-btn { padding: 8px 12px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--bg); font-size: 0.85em; cursor: pointer; transition: all 0.2s; }
.pref-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }

/* ===== INPUTS ===== */
.time-row { display: flex; gap: 12px; margin-bottom: 14px; }
.time-field { flex: 1; }
.time-field label, .input-field label { display: block; font-size: 0.82em; font-weight: 600; color: var(--text-light); margin-bottom: 6px; letter-spacing: 0.02em; text-transform: uppercase; }
.time-field input, .input-field input, .input-field textarea {
  width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 16px;
  background: #FAFAF6; color: var(--text); outline: none; transition: all 0.2s ease; -webkit-appearance: none;
  min-height: 52px; font-family: var(--font-body);
}
.time-field input:focus, .input-field input:focus, .input-field textarea:focus { border-color: var(--secondary); background: white; box-shadow: 0 0 0 3px rgba(107,158,143,0.12); }
.input-field textarea { resize: vertical; min-height: 88px; font-family: var(--font-body); }
.input-field { margin-bottom: 14px; }

/* ===== VOICE INPUT ===== */
.vocal-row { display: flex; gap: 10px; align-items: flex-start; }
.vocal-row textarea { flex: 1; }
.vocal-btn { width: 52px; height: 52px; border-radius: 50%; border: none; background: var(--primary); color: white; font-size: 1.4em; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: background-color 0.15s, transform 0.1s; touch-action: manipulation; }
.vocal-btn.recording { background: var(--danger); animation: pulse 1s infinite; width: 60px; height: 60px; font-size: 1.6em; box-shadow: 0 0 0 4px rgba(255,59,48,0.3); }
.voice-status { font-size: 0.85em; color: var(--danger); margin-top: 6px; min-height: 20px; }
.voice-review { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.voice-preview { flex: 1; font-size: 0.9em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-review-btn { width: 44px; height: 44px; border: none; border-radius: 50%; font-size: 1.2em; cursor: pointer; display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
.voice-review-btn.delete { background: var(--danger); color: white; }
.voice-review-btn.send { background: var(--secondary); color: white; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ===== ENTRY CARDS ===== */
.entry-list { display: flex; flex-direction: column; gap: 8px; }
.entry-card { background: white; border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 2px 10px rgba(45,52,54,0.05); border-left: 4px solid var(--secondary); border: 1.5px solid var(--border); border-left: 4px solid var(--secondary); }
.entry-card.faded { opacity: 0.5; }
.entry-card .entry-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.entry-card .entry-num { font-weight: 800; color: var(--secondary-dark); font-size: 0.95em; font-family: var(--font-display); }
.entry-card .delete-btn { background: none; border: none; color: var(--danger); font-size: 1.2em; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
.entry-card .entry-summary { font-size: 0.9em; color: var(--text-light); }
.entry-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: center; flex-wrap: wrap; }
.entry-row .small-input { padding: 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 16px; text-align: center; background: white; outline: none; -webkit-appearance: none; min-height: 48px; font-family: var(--font-body); }
.entry-row .small-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* ===== QTY / QUALITY ===== */
.qty-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.qty-btn { padding: 12px 16px; border: 2px solid var(--border); border-radius: 10px; background: white; font-size: 0.9em; font-weight: 600; cursor: pointer; transition: border-color 0.15s, background-color 0.15s, color 0.15s; min-height: 44px; min-width: 44px; touch-action: manipulation; font-family: var(--font-body); }
.qty-btn.selected { border-color: var(--primary); background: var(--primary); color: white; }
.qty-btn:active { transform: scale(0.95); }
.quality-selector { display: flex; gap: 10px; }
.quality-btn { width: 52px; height: 52px; border-radius: var(--radius); border: 2px solid var(--border); background: #FAFAF6; font-size: 1.3em; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
.quality-btn.selected { border-color: var(--secondary); background: var(--secondary-light); transform: scale(1.1); box-shadow: 0 3px 10px rgba(107,158,143,0.2); }
.quality-btn:active { transform: scale(0.92); }

/* ===== MEAL TYPE GRID ===== */
.meal-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.meal-type-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 2px solid var(--border); border-radius: var(--radius); background: #FAFAF6; cursor: pointer; font-size: 0.8em; font-weight: 700; transition: all 0.2s ease; min-height: 68px; touch-action: manipulation; font-family: var(--font-body); }
.meal-type-btn span:first-child { font-size: 1.8em; }
.meal-type-btn.selected { border-color: var(--secondary); background: var(--secondary-light); position: relative; box-shadow: 0 3px 10px rgba(107,158,143,0.15); transform: scale(1.03); }
.meal-type-btn.selected::after { content: '✓'; position: absolute; top: 4px; right: 6px; font-size: 0.7em; color: var(--secondary-dark); font-weight: 800; }
.meal-type-btn:active { transform: scale(0.94); }
.meal-bottle-options .as-ml-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.meal-bottle-options .as-ml-btn { padding: 8px 14px; border-radius: 8px; font-size: 0.9em; }
.meal-bottle-options .as-ml-btn.selected { border-color: var(--primary); background: var(--primary-light); }

/* ===== MEDICATION ===== */
.med-reminder { background: rgba(255,255,255,0.75); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.days-left { color: var(--primary-dark); font-weight: 600; float: right; }
.med-quick-list { display: flex; flex-direction: column; gap: 8px; }
.med-quick-btn { padding: 14px; border: 2px solid var(--border); border-radius: 10px; background: white; text-align: left; font-size: 0.95em; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; min-height: 48px; touch-action: manipulation; font-family: var(--font-body); }
.med-quick-btn.selected { border-color: var(--primary); background: var(--primary-light); }

/* Medication autocomplete */
.med-suggestions { position: absolute; top: 100%; left: 0; right: 90px; background: white; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 50; max-height: 240px; overflow-y: auto; margin-top: 4px; }
.med-suggestion-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--bg); min-height: 44px; touch-action: manipulation; }
.med-suggestion-item:last-child { border-bottom: none; }
.med-suggestion-item:active { background: var(--primary-light); }
.med-sug-name { font-weight: 600; font-size: 0.95em; }
.med-sug-dose { font-size: 0.85em; color: var(--text-light); }

/* ===== AI ASSISTANT ===== */
/* ===== FAB CONTEXTUEL ===== */
.ai-fab {
  position: fixed; bottom: 90px; right: 20px; width: 60px; height: 60px;
  border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none;
  font-size: 1.6em; cursor: pointer; z-index: 100;
  touch-action: manipulation; transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 6px 24px rgba(255,107,58,0.4);
  animation: fab-pulse 3s ease-in-out infinite;
}
.ai-fab.fab-open { transform: rotate(45deg) scale(0.9); background: var(--secondary); animation: none; box-shadow: 0 4px 16px rgba(107,158,143,0.3); }
.ai-fab:active { transform: scale(0.88); }
@keyframes fab-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
body:has(input:focus, textarea:focus) .ai-fab { opacity: 0; pointer-events: none; }
body:has(input:focus, textarea:focus) .fab-menu { opacity: 0; pointer-events: none; }

/* FAB Menu */
.fab-menu-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(45,52,54,0.3); }
.fab-menu {
  position: fixed; bottom: 160px; right: 16px; z-index: 101;
  background: white; border-radius: 20px; padding: 8px;
  box-shadow: 0 12px 40px rgba(45,52,54,0.18);
  min-width: 200px; animation: fab-menu-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
  transform-origin: bottom right;
}
@keyframes fab-menu-in { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.fab-menu-voice {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 14px; border: 2px solid var(--primary);
  background: var(--primary-light); cursor: pointer; margin-bottom: 6px;
}
.fab-menu-voice-icon { font-size: 1.5em; }
.fab-menu-voice-text { text-align: left; line-height: 1.3; }
.fab-menu-voice-text strong { display: block; font-size: 0.95em; color: var(--primary-dark); }
.fab-menu-voice-text small { font-size: 0.75em; color: var(--primary); }

.fab-menu-divider { font-size: 0.65em; font-weight: 700; color: var(--text-lighter); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 8px 4px; }
.fab-menu-actions { display: flex; flex-direction: column; gap: 2px; }
.fab-menu-action {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 12px; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.9em; color: var(--text);
  transition: background 0.15s; text-align: left; width: 100%;
}
.fab-menu-action:active { background: var(--primary-light); }
.fab-menu-action-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--primary-light); display: flex; align-items: center;
  justify-content: center; font-size: 1em; flex-shrink: 0;
}
.fab-menu-action-label { font-weight: 500; }
.ai-overlay { position: fixed; inset: 0; background: rgba(45,52,54,0.5); z-index: 200; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.ai-panel { background: white; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 20px; padding-bottom: 30px; width: 100%; max-width: 500px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ai-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ai-header h3 { margin: 0; font-size: 1.1em; font-family: var(--font-display); }
.ai-close { background: none; border: none; font-size: 1.3em; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; touch-action: manipulation; }
.ai-hint { font-size: 0.85em; color: var(--text-light); margin-bottom: 10px; }
.ai-quick-phrases { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ai-quick { padding: 8px 12px; border: 1px solid var(--border); border-radius: 20px; background: white; font-size: 0.82em; cursor: pointer; touch-action: manipulation; transition: background-color 0.15s; font-family: var(--font-body); }
.ai-quick:active { background: var(--primary-light); }
.ai-input-row { display: flex; gap: 8px; align-items: center; }
.ai-input-row input { flex: 1; padding: 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 1em; min-height: 48px; font-family: var(--font-body); outline: none; }
.ai-input-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.ai-input-row .send-btn { width: 52px; height: 52px; border-radius: 50%; border: none; background: var(--primary); color: white; font-size: 1.4em; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; touch-action: manipulation; transition: background-color 0.15s, transform 0.1s; }
.ai-input-row .send-btn:active { transform: scale(0.92); }
.ai-results { margin-top: 16px; }
.ai-action-card { background: var(--bg); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; transition: opacity 0.3s; }
.ai-action-card.ai-card-validated { opacity: 0.5; border-left: 3px solid var(--success); }
.ai-action-summary { font-weight: 600; font-size: 1em; margin-bottom: 10px; color: var(--primary-dark); }
.ai-field-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-field-label { font-size: 0.85em; font-weight: 500; min-width: 100px; flex-shrink: 0; }
.ai-field-input { flex: 1; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.9em; min-height: 40px; background: white; font-family: var(--font-body); }
.ai-check { display: flex; align-items: center; gap: 8px; font-size: 0.9em; min-height: 40px; cursor: pointer; }
.ai-check input { width: 20px; height: 20px; accent-color: var(--primary); }
.ai-action-buttons { display: flex; gap: 8px; margin-top: 10px; }
.ai-question { background: var(--primary-light); border-left: 3px solid var(--primary); border-radius: 8px; padding: 12px; margin-bottom: 12px; font-size: 0.95em; color: var(--text); }
.ai-loading { display: flex; justify-content: center; padding: 20px; }
.ai-error { color: var(--danger); font-size: 0.9em; padding: 12px; text-align: center; }

/* ===== SENT BANNER ===== */
.sent-banner { background: var(--secondary); color: white; border-radius: var(--radius); padding: 20px; text-align: center; font-size: 1.15em; font-weight: 700; margin-top: 14px; }
.shared-banner { background: var(--blue); border-radius: var(--radius); padding: 14px; text-align: center; font-size: 0.9em; font-weight: 600; color: #1e40af; margin-bottom: 12px; }
.ack-banner { background: var(--green); border-radius: var(--radius); padding: 14px; text-align: center; font-size: 0.95em; font-weight: 600; color: #166534; margin-bottom: 12px; }
.ack-badge { font-size: 0.85em; color: var(--secondary); font-weight: 600; }

/* ===== TOAST ===== */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: var(--text); color: white; padding: 14px 24px; border-radius: var(--radius-md); font-weight: 600; z-index: 1000; transition: transform 0.3s ease; white-space: nowrap; max-width: 90vw; font-family: var(--font-body); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--secondary); }
.toast.error { background: var(--danger); }

/* ===== LOADING ===== */
.loading { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== MICRO-INTERACTIONS ===== */
/* Success celebration */
@keyframes celebrate { 0% { transform: scale(1); } 30% { transform: scale(1.12); } 60% { transform: scale(0.95); } 100% { transform: scale(1); } }
.celebrate { animation: celebrate 0.5s ease-out; }
/* Toast slide-in with bounce */
.toast { transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); }
/* Smooth view transitions */
.main-content { animation: viewFadeIn 0.2s ease; }
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
/* Hero card entrance */
.hero-card { animation: heroSlideIn 0.3s ease-out; }
@keyframes heroSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
/* Activity card stagger */
.v3-activity-grid .v3-activity-card:nth-child(1) { animation: cardIn 0.25s ease-out 0.05s both; }
.v3-activity-grid .v3-activity-card:nth-child(2) { animation: cardIn 0.25s ease-out 0.1s both; }
.v3-activity-grid .v3-activity-card:nth-child(3) { animation: cardIn 0.25s ease-out 0.15s both; }
.v3-activity-grid .v3-activity-card:nth-child(4) { animation: cardIn 0.25s ease-out 0.2s both; }
@keyframes cardIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* ===== CALENDAR ===== */
.calendar-container { background: white; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar-header h3 { font-family: var(--font-display); font-size: 1.05em; color: var(--primary-dark); margin: 0; font-weight: 700; }
.cal-nav-btn { background: none; border: 1px solid var(--border); width: 44px; height: 44px; border-radius: 50%; font-size: 1.3em; cursor: pointer; color: var(--primary); display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
.cal-nav-btn:active { background: var(--primary); color: white; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day-name { text-align: center; font-size: 0.7em; font-weight: 700; color: var(--text-lighter); padding: 4px 0; }
/* Heatmap calendar cells */
.cal-day { min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-size: 0.85em; cursor: default; padding: 4px 2px 3px; gap: 1px; transition: background 0.2s, transform 0.1s; }
.cal-day.empty { visibility: hidden; }
.cal-day.has-report { cursor: pointer; }
.cal-day.has-report:active { transform: scale(0.92); }
.cal-day-num { font-weight: 600; line-height: 1; font-size: 0.82em; color: var(--text); }
.cal-mood { font-size: 0.75em; line-height: 1; }
.cal-dots { display: flex; gap: 2px; margin-top: 1px; }
.cal-dot { width: 4px; height: 4px; border-radius: 50%; }
.dot-morning { background: var(--accent); }
.dot-acked { background: var(--primary); }
.dot-sent { background: var(--secondary); }
.cal-day.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
/* Heatmap intensity levels */
.cal-heat-0 { background: transparent; }
.cal-heat-1 { background: rgba(107,158,143,0.12); }
.cal-heat-2 { background: rgba(107,158,143,0.25); }
.cal-heat-3 { background: rgba(107,158,143,0.40); }
.cal-heat-4 { background: rgba(107,158,143,0.55); }
.cal-heat-3 .cal-day-num, .cal-heat-4 .cal-day-num { color: #1a3d32; font-weight: 700; }
/* Today overrides heatmap */
.cal-day.today { outline: 2.5px solid var(--primary); outline-offset: -2px; background: var(--primary-light) !important; }
.cal-day.today .cal-day-num { color: var(--primary-dark); font-weight: 800; }
/* Legend */
.cal-legend { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; }
.cal-legend-label { font-size: 0.65em; color: var(--text-lighter); font-weight: 600; }
.cal-legend-box { width: 14px; height: 14px; border-radius: 4px; }

/* Day detail panel */
.cal-day-detail { background: white; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--primary); animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.cal-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-detail-header h4 { margin: 0; font-size: 1.05em; color: var(--primary-dark); font-family: var(--font-display); }
.cal-detail-close { background: none; border: none; font-size: 1.2em; cursor: pointer; color: var(--text-light); padding: 4px 8px; }
.cal-detail-mood { font-size: 1.2em; margin-bottom: 8px; }
.cal-detail-stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.9em; color: var(--text); margin-bottom: 8px; }
.cal-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cal-tag { font-size: 0.75em; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.tag-morning { background: var(--yellow); color: #78600a; }
.tag-acked { background: var(--blue); color: #2a4a7a; }
.tag-sent { background: var(--green); color: #1a5a3a; }
.cal-detail-msg { font-size: 0.85em; color: var(--text-light); font-style: italic; margin-bottom: 8px; padding: 6px 10px; background: var(--bg); border-radius: 8px; }
.btn-sm { padding: 8px 16px; font-size: 0.85em; width: 100%; }

/* ===== HISTORY ===== */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item { background: white; border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 10px rgba(45,52,54,0.05); border: 1.5px solid var(--border); cursor: pointer; transition: all 0.15s ease; touch-action: manipulation; }
.history-item:active { transform: scale(0.97); box-shadow: 0 1px 4px rgba(45,52,54,0.08); }
.history-date { font-weight: 600; font-size: 0.95em; min-width: 80px; }
.history-info { display: flex; gap: 10px; font-size: 0.9em; flex: 1; color: var(--text-light); }
.sent-badge { color: var(--secondary); font-weight: 700; }
.history-arrow { color: var(--text-lighter); font-size: 1.3em; }

/* V3 Journal header */
.journal-header { padding-bottom: 14px; }
.journal-header-sub { font-size: 0.75em; color: rgba(255,255,255,0.7); margin-top: 2px; font-weight: 600; }

/* V3 History timeline cards */
.history-list { display: flex; flex-direction: column; gap: 0; padding: 0 16px; }
.history-tl-card {
  display: flex; align-items: stretch; gap: 14px; cursor: pointer;
  padding: 14px 0; transition: all 0.15s ease; touch-action: manipulation;
}
.history-tl-card:active { opacity: 0.8; }
.hl-icon-col { display: flex; flex-direction: column; align-items: center; width: 44px; flex-shrink: 0; }
.hl-mood-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--milk, #FFFDF8);
  display: flex; align-items: center; justify-content: center; font-size: 1.35em;
  border: 2.5px solid var(--secondary); box-shadow: 0 3px 8px rgba(107,158,143,0.2);
  flex-shrink: 0;
}
.hl-line { width: 2.5px; flex: 1; background: linear-gradient(to bottom, var(--secondary), transparent); margin-top: 4px; border-radius: 2px; }
.history-tl-card:last-child .hl-line { display: none; }
.hl-content { flex: 1; min-width: 0; }
.hl-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hl-date { font-family: var(--font-display); font-weight: 800; font-size: 0.95em; color: var(--text); }
.hl-sent-badge {
  font-size: 0.65em; font-weight: 700; color: var(--secondary);
  background: rgba(107,158,143,0.1); padding: 2px 8px; border-radius: 8px;
}
.hl-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hl-pill {
  font-size: 0.72em; font-weight: 700; padding: 4px 10px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 2px;
}
.hl-pill-bottle { background: rgba(255,140,90,0.15); color: #D06830; }
.hl-pill-sleep { background: rgba(107,158,143,0.15); color: #4A7A68; }
.hl-pill-diaper { background: rgba(255,209,102,0.15); color: #A09040; }
.hl-pill-meal { background: rgba(232,141,166,0.15); color: #B06880; }
.hl-chevron {
  display: flex; align-items: center; color: var(--text-lighter);
  font-size: 1.4em; font-weight: 300; padding-left: 4px;
}

/* ===== DETAIL VIEW ===== */
/* ===== AI SUMMARY CARD ===== */
.ai-summary-card {
  background: linear-gradient(135deg, #FFF8E8, #FFF2E0); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 16px; border: 1.5px solid #F0E0C8;
  box-shadow: 0 2px 12px rgba(255, 180, 80, 0.1);
}
.ai-summary-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-weight: 700; font-size: 0.9em; color: #8A7040;
}
.ai-summary-badge {
  background: linear-gradient(135deg, #FFD166, #FF8C5A); color: white;
  font-size: 0.7em; font-weight: 800; padding: 3px 8px; border-radius: 8px;
  letter-spacing: 0.05em;
}
.ai-summary-text { font-size: 0.92em; line-height: 1.6; color: #4A4030; }
.ai-summary-loading { color: #B0A080; font-style: italic; }

.detail-view { padding: 16px; padding-bottom: calc(20px + var(--safe-bottom)); }
.detail-section { margin-bottom: 14px; border-radius: var(--radius); padding: 18px; box-shadow: 0 2px 8px rgba(45,52,54,0.04); }
.detail-section:first-child { background: white; box-shadow: 0 2px 10px rgba(45,52,54,0.06); border: 1.5px solid var(--border); }
.detail-section h4 { font-size: 1.05em; margin-bottom: 10px; font-weight: 800; font-family: var(--font-display); }
.detail-section p { font-size: 0.95em; line-height: 1.6; }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 0.95em; }
.detail-row + .detail-row { border-top: 1px solid rgba(0,0,0,0.05); }
.detail-actions { margin-top: 20px; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

/* ===== AUTH ===== */
.auth-form { width: 100%; max-width: 360px; }
.auth-form .input-field { margin-bottom: 12px; }
.auth-form .input-field input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 16px; background: white; color: var(--text); outline: none; -webkit-appearance: none; min-height: 48px; font-family: var(--font-body); }
.auth-form .input-field input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-light); }
.auth-form .input-field label { display: block; font-size: 0.82em; font-weight: 600; color: var(--text-light); margin-bottom: 6px; letter-spacing: 0.02em; text-transform: uppercase; }
.auth-link { text-align: center; margin-top: 15px; font-size: 0.9em; color: var(--text-light); }
.auth-link a { color: var(--primary-dark); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.auth-welcome { text-align: center; margin-bottom: 20px; }
.auth-greeting { font-size: 1.15em; margin-bottom: 4px; font-family: var(--font-display); }
.auth-email-display { font-size: 0.85em; color: var(--text-light); }
.auth-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.auth-method-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 1.5px solid var(--border); border-radius: var(--radius); background: white; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; touch-action: manipulation; }
.auth-method-btn:active { border-color: var(--primary); background: var(--primary-light); }
.auth-method-btn .method-icon { font-size: 1.5em; }
.auth-method-btn .method-text { font-size: 1em; font-weight: 600; color: var(--text); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-lighter); font-size: 0.85em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Passkey item in profile */
.passkey-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--bg); margin-bottom: 6px; font-size: 0.9em; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-top: 2px solid var(--border);
  display: flex; justify-content: space-around; align-items: flex-end;
  padding: 4px 6px; padding-bottom: calc(4px + var(--safe-bottom)); z-index: 100;
  min-height: 64px; box-shadow: 0 -2px 8px rgba(45,52,54,0.04);
}
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: none; padding: 6px 4px; cursor: pointer; color: var(--text-lighter); font-size: 0.72em; font-weight: 700; position: relative; min-height: 56px; touch-action: manipulation; transition: color 0.15s; font-family: var(--font-body); }
.nav-btn .nav-icon { font-size: 1.5em; line-height: 1; }
.nav-btn.active { color: var(--secondary); }
.nav-btn:active { background: var(--secondary-light); border-radius: 12px; }
.nav-badge { position: absolute; top: 2px; right: 6px; background: var(--danger); color: white; min-width: 18px; height: 18px; border-radius: 9px; font-size: 0.7em; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.has-bottom-nav .main-content, .has-bottom-nav .detail-view { padding-bottom: calc(90px + var(--safe-bottom)); }

/* Mic button in nav (V3) */
.nav-mic { flex: 1; display: flex; justify-content: center; align-items: center; }
.mic-btn-nav {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center; font-size: 1.6em;
  box-shadow: 0 4px 18px rgba(255,107,58,0.35);
  margin-top: -24px; position: relative; border: none; cursor: pointer;
  color: white; touch-action: manipulation; transition: transform 0.15s;
}
.mic-btn-nav::before {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  background: rgba(255,140,90,0.12);
}
.mic-btn-nav:active { transform: scale(0.92); }
.mic-btn-nav.recording { background: linear-gradient(135deg, #E05252, #C03030); animation: micPulseNav 1s infinite; }
@keyframes micPulseNav { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,82,82,0.4); } 50% { box-shadow: 0 0 0 16px rgba(224,82,82,0); } }

/* ===== CHAT ===== */
.chat-container { display: flex; flex-direction: column; height: calc(100dvh - 60px - 64px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-date-separator { text-align: center; margin: 12px 0 4px; }
.chat-date-separator span { background: var(--bg); color: var(--text-secondary); font-size: 0.75em; font-weight: 600; padding: 4px 14px; border-radius: 12px; }
.chat-bubble { max-width: 80%; padding: 14px 18px; border-radius: var(--radius); font-size: 0.95em; line-height: 1.5; word-wrap: break-word; -webkit-touch-callout: none; }
.chat-bubble.mine { cursor: pointer; }
.chat-bubble.mine { align-self: flex-end; background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: white; border-bottom-right-radius: 6px; box-shadow: 0 2px 10px rgba(107,158,143,0.25); }
.chat-bubble.theirs { align-self: flex-start; background: white; color: var(--text); border-bottom-left-radius: 6px; box-shadow: 0 2px 10px rgba(45,52,54,0.06); border: 1.5px solid var(--border); }
.chat-bubble .bubble-name { font-size: 0.75em; font-weight: 700; margin-bottom: 4px; opacity: 0.7; }
.chat-bubble .bubble-name-mine { font-size: 0.7em; margin-bottom: 4px; text-align: right; }
.bubble-baby-tag { background: rgba(108,99,255,0.15); color: var(--primary); padding: 1px 6px; border-radius: 8px; font-size: 0.9em; font-weight: 600; margin-left: 4px; }
.chat-bubble .bubble-translation { font-size: 0.8em; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.2); font-style: italic; opacity: 0.8; }
.chat-bubble.theirs .bubble-translation { border-top-color: rgba(0,0,0,0.08); }
.bubble-translated-badge { font-size: 0.65em; opacity: 0.5; margin-top: 2px; }
.chat-bubble .bubble-time { font-size: 0.7em; margin-top: 4px; opacity: 0.6; text-align: right; }
.chat-input-row { display: flex; gap: 8px; padding: 10px 16px; background: white; border-top: 1px solid var(--border); }
.chat-input-row input { flex: 1; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 24px; font-size: 16px; outline: none; -webkit-appearance: none; min-height: 48px; font-family: var(--font-body); }
.chat-input-row input:focus { border-color: var(--primary); }
.chat-input-row .send-btn { width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--primary); color: white; font-size: 1.3em; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; touch-action: manipulation; transition: background-color 0.15s; }
.chat-input-row .send-btn.recording { background: var(--danger); animation: pulse 1s infinite; }
.chat-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-lighter); font-size: 0.95em; text-align: center; padding: 40px 24px; gap: 12px;
}
.chat-empty::before {
  content: '💬'; font-size: 2.5em; display: block;
  width: 72px; height: 72px; border-radius: 50%; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
}
.chat-recipient-row { display: flex; gap: 6px; padding: 6px 16px; background: var(--bg); border-top: 1px solid var(--border); }
.recipient-btn { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 20px; background: white; font-size: 0.85em; font-weight: 500; cursor: pointer; text-align: center; transition: background-color 0.15s, color 0.15s; touch-action: manipulation; min-height: 40px; font-family: var(--font-body); }
.recipient-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.chat-bubble.private { border: 1px dashed rgba(0,0,0,0.15); }
.chat-bubble.mine.private { border-color: rgba(255,255,255,0.3); }
.bubble-private { font-size: 0.7em; opacity: 0.6; margin-bottom: 2px; }

/* ===== MEDIA / GALLERY ===== */
.media-container { }
.media-date-header { font-weight: 700; font-size: 0.9em; color: var(--text); padding: 12px 8px 6px; display: flex; align-items: center; gap: 8px; }
.media-date-count { background: var(--primary); color: #fff; font-size: 0.75em; padding: 2px 8px; border-radius: 10px; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 4px 4px; }
.media-thumb { aspect-ratio: 1; object-fit: cover; border-radius: 8px; width: 100%; cursor: pointer; background: var(--border); }
.media-thumb video { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.media-actions { display: flex; gap: 10px; padding: 16px; }
.media-actions .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.media-overlay { position: fixed; inset: 0; background: rgba(45,52,54,0.92); z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.media-overlay img, .media-overlay video { max-width: 100%; max-height: 80vh; border-radius: 8px; }
.media-overlay .close-btn { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.2); border: none; color: white; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5em; cursor: pointer; touch-action: manipulation; }
.media-overlay .caption-text { color: white; padding: 12px; text-align: center; font-size: 0.95em; }
.media-overlay .share-actions { display: flex; gap: 10px; padding: 10px; }
.media-overlay .share-actions .btn { background: rgba(255,255,255,0.2); color: white; width: auto; padding: 12px 20px; }

/* V3 Gallery */
.gallery-v3 { padding-top: 0; }
.gallery-hero-card { margin: 14px 16px; cursor: pointer; touch-action: manipulation; }
.gallery-hero-card:active { transform: scale(0.98); }
.gallery-hero-card .hero-icon { box-shadow: 0 6px 16px rgba(107,158,143,0.35); }
.gallery-actions-grid { margin-top: 0; }

.media-empty {
  text-align: center; padding: 48px 24px; color: var(--text-lighter);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.media-empty .emoji {
  font-size: 2.2em; width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
}
.media-empty p { font-size: 0.95em; max-width: 240px; line-height: 1.5; }
.upload-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--primary); z-index: 300; transition: width 0.3s; }

/* ===== STATS ===== */
.stats-period-selector { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.period-btn { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 0.82em; cursor: pointer; min-height: 44px; touch-action: manipulation; font-weight: 500; transition: background-color 0.15s, color 0.15s; min-width: 0; font-family: var(--font-body); }
.period-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.stats-date-range { margin-bottom: 16px; }
.date-range-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.date-range-row label { font-size: 0.85em; font-weight: 600; color: var(--text-light); }
.date-range-row input[type="date"] { flex: 1; min-width: 120px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9em; min-height: 44px; font-family: var(--font-body); }
.btn-sm { padding: 8px 16px; font-size: 0.85em; min-height: 44px; }
.stats-view-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.view-btn { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 0.85em; cursor: pointer; font-weight: 500; min-height: 44px; touch-action: manipulation; transition: background-color 0.15s, color 0.15s; font-family: var(--font-body); }
.view-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Stats Calendar view */
.sc-grid { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 16px; }
.sc-header { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--header-bg); color: #fff; }
.sc-hdr { text-align: center; padding: 8px 2px; font-weight: 700; font-size: 0.8em; }
.sc-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.sc-cell { min-height: 48px; border: 1px solid var(--border); padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: default; transition: background-color 0.15s; border-radius: 6px; margin: 1px; }
.sc-cell.sc-outside { opacity: 0.3; }
.sc-cell.sc-today { outline: 2.5px solid var(--primary); outline-offset: -2px; background: var(--primary-light) !important; }
.sc-cell.sc-has-data { cursor: pointer; }
.sc-cell.sc-has-data:hover { filter: brightness(0.92); }
.sc-cell.sc-selected { box-shadow: inset 0 0 0 2px var(--primary); }
.sc-daynum { font-size: 0.75em; font-weight: 600; color: var(--text); }
.sc-today .sc-daynum { color: var(--primary-dark); font-weight: 800; }
.sc-mood { font-size: 0.75em; line-height: 1; }
.sc-day-detail { background: var(--bg); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; animation: scSlideDown 0.2s ease; }
.sc-detail-header { font-family: var(--font-display); font-size: 1.05em; font-weight: 700; margin-bottom: 12px; color: var(--primary-dark); text-align: center; }
.sc-detail-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sc-detail-card { border-radius: var(--radius-md); padding: 12px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-sm); }
.sc-detail-card .sc-card-icon { font-size: 1.6em; }
.sc-detail-card .sc-card-info { font-size: 0.85em; font-weight: 600; color: var(--text); line-height: 1.3; }
.sc-detail-card .sc-card-sub { font-size: 0.75em; font-weight: 400; color: var(--text-light); }
.sc-card-bottle { background: var(--blue); }
.sc-card-meal { background: var(--orange); }
.sc-card-nap { background: var(--purple); }
.sc-card-diaper { background: var(--green); }
.sc-card-mood { background: var(--yellow); }
.sc-card-vomit { background: var(--pink); }
@keyframes scSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.stats-period-info { text-align: center; color: var(--text-light); font-size: 0.85em; margin-bottom: 16px; }
.stats-section { margin-bottom: 20px; }
.section-subtitle { font-weight: 700; font-size: 1em; margin-bottom: 10px; color: var(--text); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card { background: white; border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: 0 2px 10px rgba(45,52,54,0.05); border: 1.5px solid var(--border); }
.stat-card:nth-child(1) { background: linear-gradient(135deg, #FFF2E8, #FFF8F2); border-color: #FFE0C8; }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #E8F5EE, #F0FFF5); border-color: #D4EDE4; }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #FFF8E8, #FFFCF0); border-color: #FFE8B0; }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #FCE8EE, #FFF0F5); border-color: #F0C8D8; }
.stat-value { font-family: var(--font-mono); font-size: 1.5em; font-weight: 700; color: var(--primary-dark); }
.stat-label { font-size: 0.8em; color: var(--text-light); margin-top: 4px; }
.suggestions-section { margin-bottom: 20px; }
.suggestion-card { padding: 16px 18px; border-radius: var(--radius); margin-bottom: 10px; font-size: 0.9em; line-height: 1.5; background: white; border: 1.5px solid var(--border); box-shadow: 0 2px 8px rgba(45,52,54,0.04); }
.suggestion-warning { background: #fff3e0; color: #c65100; border-left: 4px solid var(--warning); }
.suggestion-info { background: var(--blue); color: #1565c0; border-left: 4px solid #5B8DB8; }
.mood-bar { display: flex; border-radius: 10px; overflow: hidden; height: 36px; }
.mood-segment { display: flex; align-items: center; justify-content: center; font-size: 0.75em; font-weight: 600; color: #fff; min-width: 30px; }
.mood-good { background: var(--secondary); }
.mood-normal { background: var(--warning); }
.mood-difficult { background: var(--danger); }
.activity-stats { display: flex; flex-direction: column; gap: 6px; }
.activity-stat-item { display: flex; justify-content: space-between; background: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.activity-name { font-weight: 500; }
.activity-count { color: var(--primary-dark); font-weight: 600; }

/* ===== V3 STATS REDESIGN ===== */
.v3-stats-header { padding-bottom: 14px; }
.v3-stats-baby-selector { margin-top: 10px; }
.v3-stats-baby-selector .select-field {
  width: 100%; background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.25);
  color: white; border-radius: 12px; padding: 8px 12px; font-family: var(--font-body);
  font-size: 0.9em; font-weight: 600;
}
.v3-stats-baby-selector .select-field option { color: var(--text); background: white; }
.v3-stats-content { padding-top: 18px; }
.v3-stats-period-selector {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
  background: rgba(107,158,143,0.08); border-radius: 16px; padding: 6px;
}
.v3-stats-period-selector .period-btn {
  flex: 1; padding: 9px 6px; border: none; border-radius: 12px;
  background: transparent; font-size: 0.78em; cursor: pointer;
  min-height: 40px; touch-action: manipulation; font-weight: 600;
  transition: all 0.2s; min-width: 0; font-family: var(--font-body);
  color: var(--text-light);
}
.v3-stats-period-selector .period-btn.active {
  background: var(--secondary); color: #fff; box-shadow: 0 3px 10px rgba(107,158,143,0.3);
}
.v3-stats-period-selector .period-btn:not(.active):hover { background: rgba(107,158,143,0.12); }
.v3-stats-view-toggle {
  display: flex; gap: 0; margin-bottom: 16px;
  background: rgba(107,158,143,0.08); border-radius: 14px; padding: 4px;
  overflow: hidden;
}
.v3-stats-view-toggle .view-btn {
  flex: 1; padding: 10px; border: none; border-radius: 11px;
  background: transparent; font-size: 0.85em; cursor: pointer;
  font-weight: 600; min-height: 42px; touch-action: manipulation;
  transition: all 0.2s; font-family: var(--font-body); color: var(--text-light);
}
.v3-stats-view-toggle .view-btn.active {
  background: var(--secondary); color: #fff; box-shadow: 0 3px 10px rgba(107,158,143,0.3);
}
.v3-stats-view-toggle .view-btn:not(.active):hover { background: rgba(107,158,143,0.12); }

/* ===== EMPTY STATE (global) ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; gap: 12px; color: var(--text-lighter);
}
.empty-state::before {
  content: '📋'; font-size: 2.2em;
  width: 72px; height: 72px; border-radius: 50%; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
}

/* ===== PROFILE ===== */
.profile-section { margin-bottom: 24px; padding: 20px; background: white; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(45,52,54,0.05); border: 1.5px solid var(--border); }
.profile-section:last-child { border-bottom: none; }

/* Avatar */
.profile-avatar-row { display: flex; gap: 16px; align-items: flex-start; }
.profile-avatar { position: relative; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; cursor: pointer; flex-shrink: 0; background: linear-gradient(135deg, var(--secondary-light), #D4EDE4); border: 3px solid var(--secondary); box-shadow: 0 4px 14px rgba(107,158,143,0.2); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 2em; }
.avatar-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(45,52,54,0.5); color: white; font-size: 1.2em; opacity: 0; transition: opacity 0.2s; }
.profile-avatar:hover .avatar-overlay, .profile-avatar:active .avatar-overlay { opacity: 1; }
.profile-avatar-row .profile-info { flex: 1; }

/* Baby photo in profile */
.baby-photo-wrapper { position: relative; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; cursor: pointer; flex-shrink: 0; background: var(--bg); border: 2px solid var(--border); }
.baby-photo-wrapper img.baby-photo { width: 100%; height: 100%; object-fit: cover; }
.baby-photo-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 1.6em; }
.baby-photo-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(45,52,54,0.5); color: white; font-size: 0.9em; opacity: 0; transition: opacity 0.2s; }
.baby-photo-wrapper:hover .baby-photo-overlay, .baby-photo-wrapper:active .baby-photo-overlay { opacity: 1; }

.profile-info-old { color: var(--text-light); font-size: 0.9em; margin-top: 4px; }
.profile-lang-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lang-flag-btn-sm { font-size: 1.4em; background: none; border: 2px solid transparent; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.5; transition: opacity 0.15s, border-color 0.15s; touch-action: manipulation; }
.lang-flag-btn-sm.active { border-color: var(--primary); opacity: 1; transform: scale(1.08); }
.profile-baby-card { background: linear-gradient(135deg, #F8FBF9, var(--secondary-light)); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(107,158,143,0.1); border: 1.5px solid #D4EDE4; }
.baby-header { font-family: var(--font-display); font-size: 1.05em; margin-bottom: 8px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.linked-people { margin-top: 8px; }
.linked-label { font-size: 0.85em; color: var(--text-light); display: block; margin-bottom: 4px; }
.linked-person { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.9em; flex-wrap: wrap; }
.linked-badge { font-size: 0.75em; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.badge-nanny { background: #E8F5E9; color: #2E7D32; }
.badge-parent { background: #E3F2FD; color: #1565C0; }
.btn-unlink { background: var(--danger); color: white; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 0.75em; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-left: auto; touch-action: manipulation; }
.text-light { color: var(--text-light); font-size: 0.85em; }
.link-actions { display: flex; flex-direction: column; gap: 8px; }
.code-display { text-align: center; padding: 12px; }
.generated-code { font-size: 2em; font-weight: 700; letter-spacing: 6px; color: var(--primary-dark); font-family: var(--font-mono); }
.select-field { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 1em; background: #fff; min-height: 48px; font-family: var(--font-body); }
.profile-msg { text-align: center; margin-top: 8px; font-size: 0.9em; }
.profile-msg.success { color: var(--secondary); }
.profile-msg.error { color: var(--danger); }
.time-row .input-field { flex: 1; }
.mb-10 { margin-bottom: 10px; }

/* ===== V3 PROFILE ===== */
.v3-profile-hero {
  background: linear-gradient(145deg, #E8F5EE 0%, #D4EDE4 50%, #C8E6D8 100%);
  border-radius: 24px; padding: 20px; margin: 14px 16px 12px;
  position: relative; overflow: hidden;
  border: 2.5px solid #B8D8C8;
  box-shadow: 0 6px 20px rgba(107,158,143,0.18);
}
.v3-profile-hero::after {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(107,158,143,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.v3-profile-hero .profile-avatar-row { position: relative; z-index: 1; }
.v3-profile-hero .profile-avatar {
  width: 80px; height: 80px;
  border: 3.5px solid white;
  box-shadow: 0 4px 16px rgba(107,158,143,0.3);
}
.v3-profile-name {
  font-family: var(--font-display); font-size: 1.2em; font-weight: 800;
  color: var(--text); margin-bottom: 6px;
}
.v3-profile-hero .profile-email-row { display: flex; gap: 8px; align-items: center; }
.v3-profile-hero .input-field {
  background: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.6);
  border-radius: 12px;
}

.v3-profile-card {
  background: white; border-radius: 22px; padding: 20px;
  margin: 0 16px 12px; position: relative; overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: 0 3px 12px rgba(45,52,54,0.06);
}
.v3-profile-card::after {
  content: ''; position: absolute; top: -10px; right: -10px;
  width: 60px; height: 60px;
  background: radial-gradient(circle, rgba(107,158,143,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.v3-profile-card-title {
  font-family: var(--font-display); font-size: 1.05em; font-weight: 800;
  color: var(--text); margin-bottom: 12px; position: relative; z-index: 1;
}

/* V3 Baby cards with rotating colors */
.v3-baby-card {
  border-radius: 20px; padding: 16px; margin-bottom: 12px;
  position: relative; overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}
.v3-baby-card::after {
  content: ''; position: absolute; top: -10px; right: -10px;
  width: 60px; height: 60px;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 70%);
  border-radius: 50%;
}
.v3-baby-sage {
  background: linear-gradient(145deg, #E8F5EE, #D4EDE4);
  border-color: #B8D8C8;
}
.v3-baby-tangerine {
  background: linear-gradient(145deg, #FFF2E8, #FFE0CC);
  border-color: #FFD0B0;
}
.v3-baby-sunshine {
  background: linear-gradient(145deg, #FFF8E8, #FFEDBE);
  border-color: #FFE0A0;
}
.v3-baby-blush {
  background: linear-gradient(145deg, #FCE8EE, #FDD8E4);
  border-color: #F5C0D0;
}

.v3-profile-shortcuts { display: flex; gap: 10px; }
.v3-profile-legal { text-align: center; padding: 16px; }
.v3-profile-legal .legal-links { font-size: 0.85em; }

.v3-profile-logout {
  margin: 8px 16px 24px; text-align: center;
}
.v3-logout-btn {
  width: 100%; border-radius: 18px; padding: 14px;
  font-weight: 700; font-size: 0.95em;
  background: linear-gradient(135deg, #FF6B6B, #EE5A5A);
  border: 2px solid #E54545;
  box-shadow: 0 4px 14px rgba(229,69,69,0.2);
}
.v3-logout-btn:active { transform: scale(0.97); }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(45,52,54,0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 500; padding: 0; }
.modal-card { background: white; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px; padding-bottom: calc(24px + var(--safe-bottom)); width: 100%; max-width: 480px; box-shadow: 0 -4px 20px rgba(45,52,54,0.15); max-height: 90vh; overflow-y: auto; }
.add-baby-icon { text-align: center; font-size: 4em; margin-bottom: 8px; }
.gender-selector { display: flex; gap: 12px; }
.gender-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px; border: 2px solid var(--border); border-radius: var(--radius); background: white; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; touch-action: manipulation; }
.gender-btn.active { border-color: var(--primary); background: var(--primary-light); }
.gender-btn .gender-icon { font-size: 2em; }

/* ===== NOTIFICATION BELL ===== */
.notif-bell { position: relative; }
.bell-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: white; font-size: 0.6em; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* ===== MOOD SELECTOR WIDE ===== */
.mood-selector-wide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mood-selector-wide .mood-btn { flex-direction: column; padding: 10px 6px; width: auto; height: auto; min-height: 64px; }
.mood-label { font-size: 0.72em; margin-top: 2px; color: var(--text-light); }
.mood-btn.selected .mood-label { color: var(--primary-dark); font-weight: 600; }

/* ===== NOTIFICATIONS PREFS ===== */
.notif-options { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.notif-option { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-radius: 8px; cursor: pointer; min-height: 44px; }
.notif-option input { margin: 0; width: 20px; height: 20px; accent-color: var(--primary); }

/* ===== FORMAT TOGGLE ===== */
.format-toggle, .detail-format-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.format-btn { flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 0.9em; cursor: pointer; text-align: center; min-height: 44px; touch-action: manipulation; font-weight: 500; transition: background-color 0.15s, color 0.15s; font-family: var(--font-body); }
.format-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== PROFILE EMAIL ===== */
.profile-email-row { display: flex; gap: 8px; align-items: center; }

/* ===== STATS BABY SELECTOR ===== */
.stats-baby-selector { margin-bottom: 10px; }
.stats-baby-selector .select-field { width: 100%; }

/* ===== MOOD LEGEND ===== */
.mood-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 0.85em; }
.mood-legend-item { display: flex; align-items: center; gap: 3px; }

/* ===== MOOD ENTRIES LOG ===== */
.mood-entries-log { margin-bottom: 10px; }
.mood-entry-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--purple); border-radius: 10px; margin-bottom: 4px; font-size: 0.9em; }
.mood-entry-item .delete-btn { background: none; border: none; color: var(--text-light); font-size: 1em; cursor: pointer; padding: 6px 8px; min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; touch-action: manipulation; }

/* ===== NAP TOTAL ===== */
.nap-total-banner { background: linear-gradient(135deg, var(--purple), #EDE8F5); padding: 12px 16px; border-radius: var(--radius-md); text-align: center; font-size: 1.05em; margin-bottom: 10px; font-weight: 600; }

/* ===== TWINS / MULTI-BABY ===== */
.twin-copy-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.twin-copy-btn { font-size: 0.82em !important; border-color: var(--primary) !important; color: var(--primary) !important; }
.twin-copy-btn:disabled { opacity: 0.4; }
.multi-baby-tabs { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; }
.multi-baby-tab { padding: 8px 16px; border: 2px solid var(--border); background: var(--bg-card); border-radius: var(--radius-md); font-size: 0.85em; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.multi-baby-tab.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.multi-dash-section { margin-bottom: 16px; }
.multi-dash-section h4 { font-size: 0.95em; margin-bottom: 8px; }

/* ===== ADMIN ===== */
.admin-user-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 8px; flex-wrap: wrap; }
.admin-tabs { display: flex; gap: 4px; padding: 0 12px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-tab { padding: 8px 14px; border: none; background: var(--bg-card); border-radius: var(--radius-md); font-size: 0.82em; font-weight: 600; color: var(--text-light); cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.admin-tab.active { background: var(--primary); color: white; }
.admin-section { margin-bottom: 20px; padding: 0 4px; }
.admin-section h3 { font-size: 1em; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.admin-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.admin-kpi { background: var(--bg-card); border-radius: var(--radius-md); padding: 14px 10px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.admin-kpi-value { font-size: 1.6em; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.admin-kpi-label { font-size: 0.75em; color: var(--text-light); font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-today-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.admin-today-card { background: var(--bg-card); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.admin-today-val { font-size: 1.4em; font-weight: 800; color: var(--success); }
.admin-today-lbl { font-size: 0.75em; color: var(--text-light); margin-top: 2px; }
.admin-spark { display: flex; gap: 6px; align-items: flex-end; height: 120px; background: var(--bg-card); border-radius: var(--radius-md); padding: 12px 10px 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.admin-spark-bar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.admin-spark-fill { width: 100%; background: linear-gradient(180deg, var(--primary), var(--primary-light)); border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.3s; }
.admin-spark-count { font-size: 0.7em; font-weight: 700; color: var(--text); margin-top: 4px; }
.admin-spark-day { font-size: 0.65em; color: var(--text-light); text-transform: uppercase; }
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--bg-card); border-radius: var(--radius-md); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.82em; }
.admin-table thead th { background: var(--bg); padding: 8px 10px; text-align: left; font-weight: 700; color: var(--text-light); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; border-bottom: 2px solid var(--border); }
.admin-table tbody td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--primary-light); }

/* ===== INVITE SYSTEM ===== */
.invite-banner { background: linear-gradient(135deg, var(--primary-light), #E8F4E8); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.invite-banner-icon { font-size: 2em; }
.invite-banner-text { font-size: 0.95em; font-weight: 600; color: var(--text); line-height: 1.4; }
.invite-banner-text small { font-weight: 400; color: var(--text-light); }
.invite-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-invite { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: var(--radius-md); border: 1.5px dashed var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; font-size: 0.85em; cursor: pointer; transition: all 0.15s; flex: 1; justify-content: center; }
.btn-invite:active { transform: scale(0.97); background: var(--primary); color: white; }
.invite-link-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; font-family: monospace; font-size: 0.8em; word-break: break-all; margin-bottom: 12px; color: var(--text-light); }
.invite-code-big { font-size: 2em; font-weight: 800; letter-spacing: 6px; color: var(--primary); margin-bottom: 10px; }

/* ===== PREF SELECTOR ===== */
.pref-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.pref-btn { padding: 8px 12px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--bg); font-size: 0.85em; cursor: pointer; transition: all 0.2s; }
.pref-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }

/* ===== MILESTONES ===== */
.milestone-progress { margin-bottom: 16px; }
.milestone-progress-bar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.milestone-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #E8A87C); border-radius: 5px; transition: width 0.4s ease; }
.milestone-progress-text { text-align: center; font-size: 0.85em; color: var(--text-light); margin-top: 6px; font-weight: 600; }
.milestone-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; justify-content: center; }
.milestone-badge { font-size: 1.5em; background: var(--bg); border: 1.5px solid var(--border); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.milestone-age-info { text-align: center; font-size: 0.9em; color: var(--text-light); margin-bottom: 16px; font-weight: 500; }
.milestone-category { margin-bottom: 18px; }
.milestone-cat-header { font-weight: 700; font-size: 1em; padding: 8px 0; border-bottom: 2px solid var(--border); margin-bottom: 8px; }
.milestone-list { display: flex; flex-direction: column; gap: 4px; }
.milestone-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: #fff; border: 1.5px solid var(--border); cursor: pointer; transition: all 0.15s; touch-action: manipulation; }
.milestone-item:active { transform: scale(0.98); }
.milestone-item.achieved { background: #E8F5E9; border-color: #81C784; }
.milestone-item.upcoming { background: #FFF8E1; border-color: #FFD54F; }
.milestone-item.future { opacity: 0.5; }
.milestone-check { font-size: 1.2em; flex-shrink: 0; }
.milestone-info { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.milestone-emoji { font-size: 1.1em; }
.milestone-label { font-weight: 500; font-size: 0.9em; }
.milestone-age { font-size: 0.78em; color: var(--text-light); background: var(--bg); padding: 2px 6px; border-radius: 8px; }
.milestone-date { font-size: 0.78em; color: #4CAF50; flex-shrink: 0; font-weight: 500; }

@keyframes milestonePop {
  0% { transform: scale(1); }
  30% { transform: scale(1.06); background: #C8E6C9; }
  60% { transform: scale(0.98); }
  100% { transform: scale(1); }
}
.milestone-pop { animation: milestonePop 0.5s ease-out; }

/* ===== NANNY HOME V3 — Playful Objects ===== */
.nanny-home { padding-bottom: 100px; }

/* V3 compact sage header */
.nanny-header {
  background: var(--secondary); padding: 14px 20px 0;
  padding-top: max(14px, env(safe-area-inset-top));
}
.nanny-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nanny-greeting { font-size: 0.75em; color: rgba(255,255,255,0.6); }
.nanny-name { font-family: var(--font-display); font-size: 1.35em; color: white; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.nanny-header .logo-dots span { filter: brightness(1.3); }
.nanny-age-badge {
  background: rgba(255,255,255,0.15); padding: 5px 12px; border-radius: 10px;
  font-size: 0.7em; color: white; font-weight: 700;
}
.nanny-header-actions { display: flex; gap: 8px; }
.nanny-header .header-btn { color: white; }
/* Legacy compat */
.nanny-title { font-size: 1.3em; font-weight: 800; margin: 0; color: white; }
.nanny-baby { font-size: 0.9em; opacity: 0.9; margin-top: 2px; color: white; }

/* V3 summary strip */
.summary-strip {
  background: var(--secondary-dark); display: flex; padding: 10px 16px; gap: 4px;
}
.summary-strip-item {
  flex: 1; text-align: center; color: white; padding: 6px 0; border-radius: 10px;
}
.summary-strip-item .ss-emoji { font-size: 1em; }
.summary-strip-item .ss-count { font-size: 0.95em; font-weight: 800; }
.summary-strip-item .ss-label { font-size: 0.55em; opacity: 0.6; font-weight: 600; }

.nanny-morning-card { margin: 12px 16px 0; background: #FFF3E0; border-radius: var(--radius-lg); padding: 14px; border: 1.5px solid #FFB74D; }
.nanny-morning-header { font-weight: 700; font-size: 0.95em; margin-bottom: 6px; }
.nanny-morning-text { font-size: 0.85em; color: var(--text); line-height: 1.5; margin-bottom: 8px; }
.btn-ack { background: var(--primary); color: white; border: none; border-radius: var(--radius-md); padding: 8px 16px; font-size: 0.85em; font-weight: 600; cursor: pointer; width: 100%; }

.nap-active-banner { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; background: var(--secondary-light); border-radius: var(--radius-lg); padding: 12px 16px; border: 1.5px solid var(--secondary); font-weight: 600; font-size: 0.9em; }
.nap-pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--secondary); animation: napPulse 1.5s infinite; flex-shrink: 0; }
@keyframes napPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.btn-nap-stop { margin-left: auto; background: var(--secondary); color: white; border: none; border-radius: var(--radius-md); padding: 6px 14px; font-size: 0.85em; font-weight: 600; cursor: pointer; }

.nanny-meds-banner { margin: 10px 16px 0; background: #E3F2FD; border-radius: var(--radius-md); padding: 10px 14px; font-size: 0.85em; border: 1px solid #90CAF9; }

/* V3 Hero card (bottle) */
.hero-card {
  background: linear-gradient(145deg, #FFF2E8 0%, #FFE0CC 50%, #FFD4B8 100%);
  border-radius: 28px; padding: 20px; margin: 14px 16px; position: relative;
  overflow: hidden; border: 2.5px solid #FFD0B0;
}
.hero-card::after {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(255,140,90,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; position: relative; z-index: 1; }
.hero-icon {
  width: 68px; height: 68px; border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center; font-size: 2.1em;
  box-shadow: 0 6px 16px rgba(255,107,58,0.35);
}
.hero-info .hero-title { font-weight: 800; font-size: 1.05em; color: var(--text); }
.hero-info .hero-detail { font-size: 0.75em; color: #B07050; margin-top: 2px; }
.hero-info .hero-timer { font-size: 0.82em; color: var(--primary-dark); font-weight: 800; margin-top: 5px; }
.hero-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.hero-btn-primary {
  flex: 2; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; padding: 16px; border-radius: 18px; text-align: center;
  font-weight: 800; font-size: 0.95em; cursor: pointer; border: none;
  box-shadow: 0 4px 14px rgba(255,107,58,0.3); touch-action: manipulation;
}
.hero-btn-primary:active { transform: scale(0.97); }
.hero-btn-secondary {
  flex: 1; background: white; border: 2.5px solid #FFD0B0; padding: 16px;
  border-radius: 18px; text-align: center; font-weight: 800; font-size: 0.88em;
  color: var(--primary); cursor: pointer; touch-action: manipulation;
}
.hero-btn-secondary:active { transform: scale(0.97); }

/* V3 Object activity grid (2x2) */
.v3-activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; margin-bottom: 14px; }
.v3-activity-card {
  border-radius: 22px; padding: 16px; text-align: center; position: relative;
  overflow: hidden; border: 2.5px solid transparent; cursor: pointer;
  touch-action: manipulation; transition: transform 0.12s;
}
.v3-activity-card:active { transform: scale(0.95); }
.v3-activity-card::after {
  content: ''; position: absolute; top: -10px; right: -10px; width: 60px; height: 60px;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  border-radius: 50%;
}
.v3-activity-icon {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1.75em; color: white;
}
.v3-activity-card .act-title { font-weight: 800; font-size: 0.88em; color: var(--text); }
.v3-activity-card .act-detail { font-size: 0.7em; margin-top: 3px; }
.v3-activity-card .quick-hint {
  font-size: 0.55em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 6px; opacity: 0.5;
}

.v3-card-sleep { background: linear-gradient(145deg, #E8F5EE, #C8E6D8); border-color: #B8D8C8; }
.v3-card-sleep .v3-activity-icon { background: var(--secondary); box-shadow: 0 4px 10px rgba(107,158,143,0.3); }
.v3-card-sleep .act-detail { color: #5A8A78; }

.v3-card-diaper { background: linear-gradient(145deg, #FFF8E8, #FFE8B8); border-color: #FFE0A0; }
.v3-card-diaper .v3-activity-icon { background: var(--accent); box-shadow: 0 4px 10px rgba(255,209,102,0.3); }
.v3-card-diaper .act-detail { color: #A09040; }

.v3-card-meal { background: linear-gradient(145deg, #FCE8EE, #F8C8D8); border-color: #F0B0C8; }
.v3-card-meal .v3-activity-icon { background: var(--blush); box-shadow: 0 4px 10px rgba(232,141,166,0.3); }
.v3-card-meal .act-detail { color: #B06880; }

.v3-card-photo { background: linear-gradient(145deg, #EEE8F8, #DDD0F0); border-color: #D0C0E8; }
.v3-card-photo .v3-activity-icon { background: #9A80C0; box-shadow: 0 4px 10px rgba(154,128,192,0.25); }
.v3-card-photo .act-detail { color: #8070A0; }

/* V3 Tip card */
.v3-tip-card {
  background: white; border: 2.5px solid var(--accent); border-radius: var(--radius);
  padding: 14px 16px; display: flex; gap: 12px; align-items: center;
  margin: 0 16px 14px;
}
.v3-tip-icon {
  width: 40px; height: 40px; border-radius: 14px; background: #FFF8E8;
  display: flex; align-items: center; justify-content: center; font-size: 1.25em; flex-shrink: 0;
}
.v3-tip-text { font-size: 0.82em; color: var(--text-light); line-height: 1.5; }
.v3-tip-text strong { color: var(--text); }

/* V3 Parent — Section cards */
.v3-section-card {
  background: white; border-radius: var(--radius-lg); padding: 20px;
  margin-bottom: 16px; box-shadow: 0 2px 12px rgba(45,52,54,0.06);
  border: 1.5px solid var(--border); animation: cardIn 0.3s ease-out both;
}
.v3-section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.v3-section-icon {
  width: 48px; height: 48px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-light), #FFE8D8);
  display: flex; align-items: center; justify-content: center; font-size: 1.5em; flex-shrink: 0;
}
.v3-section-title { font-family: var(--font-display); font-weight: 800; font-size: 1.05em; color: var(--text); }
.v3-section-sub { font-size: 0.8em; color: var(--text-lighter); margin-top: 2px; }

/* V3 Care grid — replaces check-grid */
.v3-care-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.v3-care-grid .check-item {
  background: linear-gradient(135deg, #FAFAF6, #F5F5F0); border: 2px solid #EEEEE8;
  border-radius: var(--radius); padding: 16px 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.v3-care-grid .check-item.checked {
  background: linear-gradient(135deg, var(--secondary-light), #D4EDE4);
  border-color: var(--secondary); box-shadow: 0 3px 10px rgba(107,158,143,0.15);
}

/* V3 Quick hero buttons */
.v3-quick-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.v3-quick-card {
  background: white; border: 2.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.2s ease; box-shadow: var(--shadow-sm);
  font-family: var(--font-body);
}
.v3-quick-card:active { transform: scale(0.95); border-color: var(--secondary); background: var(--secondary-light); }
.v3-quick-icon { font-size: 2em; }
.v3-quick-label { font-weight: 800; font-size: 0.9em; color: var(--text); }

/* V3 Inputs */
.v3-input {
  padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius-md);
  font-size: 1em; background: #FAFAF6; outline: none; font-family: var(--font-body);
  min-height: 48px; transition: border-color 0.2s;
}
.v3-input:focus { border-color: var(--secondary); background: white; box-shadow: 0 0 0 3px rgba(107,158,143,0.15); }
.v3-textarea {
  flex: 1; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius-md);
  font-size: 1em; background: #FAFAF6; outline: none; font-family: var(--font-body);
  resize: vertical; min-height: 88px; transition: border-color 0.2s;
}
.v3-textarea:focus { border-color: var(--secondary); background: white; box-shadow: 0 0 0 3px rgba(107,158,143,0.15); }

/* V3 Send row */
.v3-send-row { display: flex; gap: 12px; align-items: center; margin-top: 4px; margin-bottom: 16px; }

/* Legacy voice hero (kept for compat) */
.voice-hero { text-align: center; padding: 28px 16px 12px; }
.mic-btn-hero { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; font-size: 2em; cursor: pointer; box-shadow: 0 4px 20px rgba(255,107,58,0.35); transition: transform 0.15s, box-shadow 0.15s; display: inline-flex; align-items: center; justify-content: center; }
.mic-btn-hero:active { transform: scale(0.92); }
.mic-btn-hero.recording { animation: micPulse 1s infinite; background: var(--danger); }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,82,82,0.4); } 50% { box-shadow: 0 0 0 16px rgba(224,82,82,0); } }
.voice-label { font-weight: 700; font-size: 1em; margin-top: 10px; color: var(--text); }
.voice-examples { font-size: 0.8em; color: var(--text-light); margin-top: 4px; }

/* Legacy quick grid (kept for compat) */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 16px 0; }
.quick-action-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: white; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 16px 8px; cursor: pointer; transition: all 0.12s; min-height: 80px; position: relative; touch-action: manipulation; }
.quick-action-btn:active { transform: scale(0.95); background: var(--bg); }
.qa-icon { font-size: 1.8em; }
.qa-label { font-size: 0.82em; font-weight: 600; color: var(--text); }
.qa-badge { position: absolute; top: 6px; right: 8px; background: var(--primary); color: white; border-radius: 10px; font-size: 0.7em; font-weight: 700; padding: 1px 6px; min-width: 18px; text-align: center; }
.qa-more { border-style: dashed; opacity: 0.7; }

/* V3 Timeline */
.timeline-section { padding: 16px; }
.timeline-title { font-size: 0.95em; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.timeline-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88em; }
.timeline-item:last-child { border-bottom: none; }
.tl-time { color: var(--text-lighter); font-weight: 700; font-size: 0.82em; min-width: 42px; font-variant-numeric: tabular-nums; }
.tl-icon { font-size: 1.1em; }
.tl-text { color: var(--text); flex: 1; }
.tl-delete { background: none; border: none; color: var(--text-lighter); cursor: pointer; font-size: 0.85em; padding: 4px; }

/* V3 Journal styles */
.v3-day-nav {
  display: flex; align-items: center; padding: 12px 20px; gap: 8px;
  background: white; border-bottom: 2px solid var(--border);
}
.v3-day-arrow {
  width: 36px; height: 36px; border-radius: 12px; background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 0.88em;
  color: var(--text-lighter); flex-shrink: 0; border: 1.5px solid var(--border);
  cursor: pointer; touch-action: manipulation;
}
.v3-day-arrow.disabled { opacity: 0.3; pointer-events: none; }
.v3-day-label { flex: 1; text-align: center; font-weight: 800; font-size: 0.95em; color: var(--text); }

.v3-summary-row {
  display: flex; gap: 6px; padding: 12px 16px; background: var(--bg);
  border-bottom: 2px solid var(--border);
}
.v3-sum-item { flex: 1; text-align: center; padding: 10px 4px; border-radius: 14px; }
.v3-sum-item .sum-emoji { font-size: 1.1em; }
.v3-sum-item .sum-val { font-family: var(--font-display); font-size: 1.25em; font-weight: 800; margin-top: 2px; }
.v3-sum-item .sum-label { font-size: 0.55em; font-weight: 600; margin-top: 1px; }

.v3-sum-bottle { background: var(--orange); }
.v3-sum-bottle .sum-val { color: var(--primary); }
.v3-sum-bottle .sum-label { color: #C08060; }

.v3-sum-sleep { background: var(--green); }
.v3-sum-sleep .sum-val { color: var(--secondary); }
.v3-sum-sleep .sum-label { color: var(--secondary-dark); }

.v3-sum-diaper { background: var(--yellow); }
.v3-sum-diaper .sum-val { color: #D4B040; }
.v3-sum-diaper .sum-label { color: #A09040; }

.v3-sum-meal { background: var(--pink); }
.v3-sum-meal .sum-val { color: var(--blush); }
.v3-sum-meal .sum-label { color: #B06880; }

/* V3 Timeline entries */
.v3-timeline { padding: 8px 16px 110px; }
.v3-time-group { font-size: 0.7em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-lighter); padding: 12px 0 6px; }
.v3-timeline-entry {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1.5px solid var(--border);
}
.v3-timeline-entry:last-child { border-bottom: none; }
.v3-tl-dot {
  width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center;
  justify-content: center; font-size: 1.5em; flex-shrink: 0;
}
.v3-tl-dot-bottle { background: linear-gradient(135deg, #FFF2E8, #FFE0CC); }
.v3-tl-dot-sleep { background: linear-gradient(135deg, #E8F5EE, #C8E6D8); }
.v3-tl-dot-diaper { background: linear-gradient(135deg, #FFF8E8, #FFE8B8); }
.v3-tl-dot-meal { background: linear-gradient(135deg, #FCE8EE, #F8C8D8); }
.v3-tl-info { flex: 1; }
.v3-tl-info .tl-title { font-weight: 800; font-size: 0.88em; color: var(--text); }
.v3-tl-info .tl-meta { font-size: 0.75em; color: var(--text-lighter); margin-top: 2px; }
.v3-tl-time { font-size: 0.82em; color: var(--text-lighter); font-weight: 700; flex-shrink: 0; }
.v3-tl-connector { width: 2px; height: 12px; background: var(--border); margin-left: 23px; }

/* V3 Voice fullscreen */
.v3-voice-screen {
  position: fixed; inset: 0; background: var(--bg); z-index: 200;
  display: flex; flex-direction: column; padding: 60px 24px 40px;
}
.v3-voice-top { text-align: center; margin-bottom: auto; }
.v3-listening-label { font-size: 0.82em; color: var(--text-lighter); font-weight: 700; margin-bottom: 16px; }
.v3-detected-type {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #FFF2E8, #FFE0CC);
  padding: 8px 18px; border-radius: 14px; font-size: 0.88em; font-weight: 800;
  color: var(--primary); border: 2px solid #FFD0B0;
}
.v3-mic-zone { text-align: center; padding: 24px 0; }
.v3-mic-rings { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.v3-ring { position: absolute; border-radius: 50%; }
.v3-ring-1 { inset: 0; background: rgba(255,140,90,0.05); }
.v3-ring-2 { inset: 15px; background: rgba(255,140,90,0.08); }
.v3-ring-3 { inset: 30px; background: rgba(255,140,90,0.14); }
.v3-ring-4 { inset: 45px; background: rgba(255,140,90,0.22); }
.v3-mic-core {
  position: absolute; inset: 55px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center; font-size: 2em;
  box-shadow: 0 8px 32px rgba(255,107,58,0.4); cursor: pointer;
  border: none; color: white; touch-action: manipulation;
}
.v3-mic-core:active { transform: scale(0.92); }
.v3-waves { display: flex; gap: 5px; justify-content: center; margin-top: 20px; align-items: center; height: 40px; }
.v3-wave-bar { width: 6px; border-radius: 3px; }

.v3-voice-bottom { margin-top: auto; }
.v3-transcript-card {
  background: white; border-radius: 22px; padding: 18px 20px;
  border: 2.5px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  margin-bottom: 14px;
}
.v3-transcript-text { font-size: 0.95em; color: var(--text); line-height: 1.7; }
.v3-transcript-text .hl-orange { color: var(--primary); font-weight: 800; }
.v3-transcript-text .hl-sage { color: var(--secondary); font-weight: 800; }

.v3-parsed-tags { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.v3-tag {
  padding: 10px 16px; border-radius: 14px; font-size: 0.82em; font-weight: 800;
  display: flex; align-items: center; gap: 6px;
}
.v3-tag-bottle { background: linear-gradient(135deg, #FFF2E8, #FFE0CC); color: var(--primary); box-shadow: 0 2px 8px rgba(255,140,90,0.12); }
.v3-tag-time { background: linear-gradient(135deg, #E0F2E8, #C8E6D8); color: var(--secondary-dark); box-shadow: 0 2px 8px rgba(107,158,143,0.12); }
.v3-tag-mood { background: linear-gradient(135deg, #FFF8E8, #FFE8B8); color: #A09040; box-shadow: 0 2px 8px rgba(255,209,102,0.12); }

.v3-action-row { display: flex; gap: 10px; }
.v3-btn-redo {
  flex: 1; background: white; border: 2.5px solid #E0E0D8; padding: 18px;
  border-radius: var(--radius); text-align: center; font-weight: 800; font-size: 0.95em;
  color: var(--text-lighter); cursor: pointer; touch-action: manipulation;
}
.v3-btn-redo:active { transform: scale(0.97); }
.v3-btn-confirm {
  flex: 2.5; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 18px; border-radius: var(--radius); text-align: center;
  font-weight: 800; font-size: 1em; color: white; border: none; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,107,58,0.3); touch-action: manipulation;
}
.v3-btn-confirm:active { transform: scale(0.97); }

/* V3 Bottle input */
.v3-bottle-visual-zone { padding: 16px 0; text-align: center; flex-shrink: 0; }
.v3-bottle-visual {
  width: 100px; height: 160px; margin: 0 auto; border-radius: 28px 28px 40px 40px;
  background: linear-gradient(180deg, #FFF2E8, #FFE0CC); position: relative;
  overflow: hidden; border: 2.5px solid #FFD0B0; box-shadow: 0 6px 20px rgba(255,140,90,0.15);
}
.v3-bottle-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--primary), #FFA87A);
  border-radius: 0 0 37px 37px; transition: height 0.3s;
}
.v3-bottle-emoji {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 2.2em; z-index: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.08));
}
.v3-amount-display { margin-top: 12px; }
.v3-amount-val { font-family: var(--font-display); font-size: 3.2em; font-weight: 800; color: var(--primary); line-height: 1; }
.v3-amount-unit { font-size: 1em; color: #C08060; font-weight: 600; }
.v3-amount-context { font-size: 0.75em; color: #B0A090; margin-top: 4px; }

.v3-controls-zone { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 24px; }

.v3-amounts-label {
  font-size: 0.7em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-lighter); margin-bottom: 8px; text-align: center;
}
.v3-amounts-row { display: flex; gap: 8px; margin-bottom: 16px; justify-content: center; }
.v3-amt-btn {
  width: 72px; height: 72px; border-radius: 22px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: white;
  border: 2.5px solid #FFE0CC; cursor: pointer; touch-action: manipulation; transition: all 0.15s;
}
.v3-amt-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent; box-shadow: 0 4px 14px rgba(255,107,58,0.3);
}
.v3-amt-btn .amt-val { font-size: 1.1em; font-weight: 800; color: var(--primary); }
.v3-amt-btn .amt-unit { font-size: 0.62em; color: #C08060; }
.v3-amt-btn.active .amt-val { color: white; }
.v3-amt-btn.active .amt-unit { color: rgba(255,255,255,0.7); }

.v3-mood-label {
  font-size: 0.7em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-lighter); margin-bottom: 8px; text-align: center;
}
.v3-mood-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.v3-mood-btn {
  width: 60px; height: 60px; border-radius: 20px; display: flex; align-items: center;
  justify-content: center; font-size: 1.8em; background: white; border: 2.5px solid var(--border);
  cursor: pointer; touch-action: manipulation; transition: all 0.15s;
}
.v3-mood-btn.active {
  border-color: var(--primary); background: var(--primary-light);
  box-shadow: 0 2px 8px rgba(255,140,90,0.15); transform: scale(1.08);
}

.v3-note-row { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.v3-note-input {
  flex: 1; background: white; border: 2px solid var(--border); border-radius: 16px;
  padding: 14px 16px; font-size: 0.82em; color: var(--text-lighter); font-family: var(--font-body);
  outline: none; min-height: 48px;
}
.v3-note-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); color: var(--text); }
.v3-note-mic {
  width: 48px; height: 48px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center; font-size: 1.35em;
  box-shadow: 0 3px 10px rgba(255,107,58,0.25); flex-shrink: 0;
  border: none; color: white; cursor: pointer; touch-action: manipulation;
}
.v3-note-mic:active { transform: scale(0.92); }

.v3-cta-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; padding: 20px; border-radius: 22px; text-align: center;
  font-weight: 800; font-size: 1.05em; border: none; width: 100%; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,107,58,0.3); touch-action: manipulation;
}
.v3-cta-btn:active { transform: scale(0.97); }
.v3-cta-btn.v3-cta-success {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark, #4E8A78));
  box-shadow: 0 6px 20px rgba(107,158,143,0.3);
}

/* V3 Section Card */
.v3-section-card {
  background: white; border-radius: var(--radius-lg); padding: 24px;
  margin-bottom: 16px; border: 1.5px solid rgba(107,158,143,0.15);
  box-shadow: 0 4px 16px rgba(107,158,143,0.08);
}
.v3-section-title {
  font-family: var(--font-display); font-weight: 800; font-size: 1.1em;
  color: var(--text); margin-bottom: 16px;
}
.v3-hero-card {
  background: linear-gradient(135deg, #FCE8EE, #FFF0F5); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 16px; border: 1.5px solid rgba(232,141,166,0.2);
  box-shadow: 0 4px 16px rgba(232,141,166,0.1);
}
.v3-hero-card h4 { margin-bottom: 12px; font-size: 1.1em; font-weight: 800; font-family: var(--font-display); }
.v3-info-banner {
  background: linear-gradient(135deg, rgba(107,158,143,0.12), rgba(107,158,143,0.06));
  padding: 14px 18px; border-radius: var(--radius); text-align: center;
  font-size: 1.05em; margin-bottom: 12px; font-weight: 600;
  border: 1.5px solid rgba(107,158,143,0.15);
  box-shadow: 0 2px 8px rgba(107,158,143,0.06);
}

/* Action Sheet (bottom sheet overlay) */
.action-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn 0.15s; }
.action-sheet { background: white; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px 20px 32px; width: 100%; max-width: 500px; max-height: 80vh; overflow-y: auto; animation: slideUp 0.2s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.action-sheet h3 { font-size: 1.2em; margin: 0 0 4px; }
.action-sheet p { color: var(--text-light); margin: 0 0 16px; font-size: 0.9em; }
.as-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.as-option { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 16px; font-size: 1em; font-weight: 600; cursor: pointer; transition: all 0.12s; touch-action: manipulation; }
.as-option:active { transform: scale(0.95); background: var(--secondary-light); border-color: var(--secondary); }
.as-option-full { grid-column: 1 / -1; }
.as-ml-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.as-ml-btn { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px 8px; font-size: 1.1em; font-weight: 700; cursor: pointer; text-align: center; transition: all 0.12s; }
.as-ml-btn:active { transform: scale(0.95); background: var(--secondary-light); border-color: var(--secondary); }
.as-time-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.as-time-row label { font-size: 0.9em; font-weight: 600; color: var(--text-secondary); min-width: 40px; }
.as-time-row input[type="time"] { flex: 1; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 1em; font-family: var(--font-body); }
.as-custom-row { display: flex; gap: 10px; align-items: center; }
.as-custom-row input { flex: 1; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 1em; }
.as-custom-row button { padding: 12px 20px; background: var(--primary); color: white; border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; }
.as-more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.as-more-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px; cursor: pointer; font-size: 0.9em; font-weight: 500; }
.as-more-btn .as-more-icon { font-size: 1.5em; }

/* Hide FAB on nanny home */
.nanny-home ~ .ai-fab, .nanny-home ~ .fab-menu, .nanny-home ~ .fab-menu-backdrop { display: none; }

/* ===== LEGAL PAGES ===== */
.legal-page h3 { font-size: 1em; font-weight: 700; margin: 20px 0 8px; color: var(--text-primary); }
.legal-page h3:first-of-type { margin-top: 8px; }
.legal-page p { font-size: 0.9em; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.legal-page ul { font-size: 0.9em; color: var(--text-secondary); line-height: 1.6; padding-left: 20px; margin-bottom: 8px; }
.legal-page li { margin-bottom: 4px; }
.legal-page a { color: var(--primary); text-decoration: underline; }
.legal-update { font-size: 0.8em; color: var(--text-muted); font-style: italic; margin-bottom: 12px; }

.legal-links { text-align: center; font-size: 0.85em; }
.legal-links a { color: var(--text-secondary); text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }

/* ===== FAQ ===== */
.faq-item { background: white; border-radius: var(--radius-lg); margin-bottom: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-q { padding: 14px 16px; font-weight: 600; font-size: 0.95em; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.faq-q::after { content: '▸'; transition: transform 0.2s; font-size: 0.8em; color: var(--text-secondary); }
details[open] .faq-q::after { transform: rotate(90deg); }
.faq-a { padding: 0 16px 14px; font-size: 0.9em; color: var(--text-secondary); line-height: 1.5; }

/* ===== NUTRITION TIPS ===== */
.tips-age-badge { text-align: center; background: var(--primary-light); color: var(--primary); font-weight: 700; padding: 10px; border-radius: var(--radius-lg); margin-bottom: 16px; font-size: 1em; }
.tips-section { margin-bottom: 20px; }
.tips-section-title { font-size: 1.05em; margin-bottom: 10px; }
.tips-card { display: flex; gap: 12px; background: white; border-radius: var(--radius-lg); padding: 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.tips-card-icon { font-size: 1.5em; flex-shrink: 0; width: 36px; text-align: center; }
.tips-card-content { flex: 1; min-width: 0; }
.tips-card-title { font-weight: 600; font-size: 0.95em; margin-bottom: 2px; }
.tips-card-desc { font-size: 0.85em; color: var(--text-secondary); line-height: 1.4; }
.tips-source { text-align: center; font-size: 0.75em; color: var(--text-secondary); margin-top: 16px; font-style: italic; }

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .main-content, .detail-view, .chat-container { max-width: 600px; margin: 0 auto; }
  .media-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-card { border-radius: var(--radius-lg); max-width: 420px; }
}
