:root {
  --cream: #f4ede0;
  --cream-2: #efe4d3;
  --paper: #fbf7ef;
  --ink: #2c2a26;
  --ink-soft: #6b655c;
  --green: #3f5854;
  --green-soft: #8a9c8c;
  --terracotta: #c17a5d;
  --terracotta-dark: #b3673f;
  --sage: #8caa8e;
  --rose: #c9a091;
  --border: #e4d8c4;
  --green-accent: #3f5854;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(44, 42, 38, 0.04);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-theme="dark"] {
  --cream: #14170f;
  --cream-2: #1e2318;
  --paper: #232b1f;
  --ink: #f2eee3;
  --ink-soft: #b3ac9c;
  --green: #3d6153;
  --green-soft: #588472;
  --terracotta: #e29a70;
  --terracotta-dark: #f0b088;
  --sage: #a9c7ab;
  --rose: #a8654e;
  --border: #38402f;
  --green-accent: #9fcab8;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --cream: #14170f;
    --cream-2: #1e2318;
    --paper: #232b1f;
    --ink: #f2eee3;
    --ink-soft: #b3ac9c;
    --green: #3d6153;
    --green-soft: #588472;
    --terracotta: #e29a70;
    --terracotta-dark: #f0b088;
    --sage: #a9c7ab;
    --rose: #a8654e;
    --border: #38402f;
    --green-accent: #9fcab8;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  }
}

html, body { transition: background-color 0.2s ease, color 0.2s ease; }

html[data-fontsize="large"] { font-size: 112%; }
html[data-fontsize="xlarge"] { font-size: 124%; }

/* ---------- Tutoriel premier lancement ---------- */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.tutorial-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 32px 24px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.tutorial-icon { font-size: 2.625rem; margin-bottom: 14px; }
.tutorial-slide h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin: 0 0 10px;
  color: var(--green-accent);
}
.tutorial-slide p { color: var(--ink-soft); font-size: 0.9062rem; line-height: 1.6; margin: 0; }
.tutorial-dots { display: flex; justify-content: center; gap: 6px; margin: 22px 0; }
.tutorial-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border);
}
.tutorial-dot.active { background: var(--green-accent); }
.tutorial-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tutorial-actions .btn-primary { flex: 1; padding: 12px 16px; }

.quantity-card { max-width: 320px; text-align: left; }
.quantity-card h3 {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  margin: 0 0 16px;
  color: var(--green-accent);
  text-align: center;
}
.quantity-card .field { margin-bottom: 18px; }
.quantity-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream-2);
  color: var(--ink);
  font-size: 1rem;
}

/* ---------- Groupes de repas (matin/midi/collation/soir) ---------- */
.meal-select { margin-bottom: 16px; }
.food-group { margin-bottom: 14px; }
.food-group-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.food-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.food-item:last-child { border-bottom: none; }
.food-item-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}
.food-item-name:active { opacity: 0.7; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--cream);
}

.hidden { display: none !important; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  font-weight: 600;
  margin: 0 0 6px;
}
.screen-title {
  font-family: var(--font-display);
  font-size: 2.125rem;
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}
.screen-sub {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 20px;
}
.group-label {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: 18px 0 8px;
}
.helper-text {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 10px 0 0;
}
.disclaimer-text {
  font-size: 0.7812rem;
  color: var(--ink-soft);
  line-height: 1.6;
  text-align: center;
  margin: 24px 0 8px;
  padding: 0 8px;
}
.big-number {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  margin: 4px 0 8px;
}

/* ---------- Layout ---------- */
.screen {
  padding: 18px 18px 110px;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 237, 224, 0.92);
  backdrop-filter: blur(8px);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--green-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
html[data-theme="dark"] .app-header,
html[data-theme="system"] .app-header { background: rgba(23, 25, 21, 0.88); }
.theme-toggle {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 14px;
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--terracotta-dark);
  background: rgba(193, 122, 93, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.kcal-card {
  background: var(--cream-2);
  border: none;
}
.kcal-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.kcal-value {
  font-family: var(--font-display);
  font-size: 2.625rem;
  font-weight: 600;
  color: var(--green-accent);
  margin: 0 0 14px;
}
.kcal-unit {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--ink-soft);
}
.kcal-breakdown div {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--ink-soft);
  padding: 6px 0;
  border-top: 1px solid var(--border);
}
.kcal-breakdown div:first-child { border-top: none; }
.kcal-breakdown .strong { color: var(--ink); font-weight: 600; }
.kcal-pill {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--terracotta-dark);
}

.banner {
  background: var(--rose);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  gap: 10px;
  font-size: 0.9062rem;
  line-height: 1.5;
  margin-bottom: 16px;
}
.banner-icon { flex-shrink: 0; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span:first-child {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field-hint {
  display: block;
  font-size: 0.7812rem;
  color: var(--ink-soft);
  margin: -4px 0 8px;
}
input[type="text"], input[type="number"], textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  outline: none;
}
input:focus, textarea:focus {
  border-color: var(--green-soft);
}
textarea { resize: vertical; font-family: var(--font-body); }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field-row-3 { display: flex; gap: 10px; }
.field-row-3 .field { flex: 1; }
.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 0 14px;
}
.input-suffix input {
  border: none;
  padding: 13px 4px 13px 0;
  background: transparent;
}
.input-suffix span { color: var(--ink-soft); font-size: 0.875rem; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 15px 20px;
  border: none;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta-dark);
}
.link-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.9062rem;
  padding: 14px;
  cursor: pointer;
  text-decoration: none;
}
.link-btn.danger { color: #b3492f; }

/* ---------- Photo repas (S-01) ---------- */
.photo-choice-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.photo-choice-row .btn {
  flex: 1;
  padding: 12px 10px;
  font-size: 0.875rem;
}
.photo-analyzing {
  text-align: center;
  padding: 14px 10px;
  border: 1.5px solid var(--terracotta);
  border-radius: 999px;
  color: var(--terracotta-dark);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 12px;
}
.photo-preview {
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: visible;
  border: 1.5px solid var(--terracotta);
  background: var(--cream, #f7f1e8);
}
.photo-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
}
.photo-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}
.photo-preview-actions .btn-primary {
  width: 100%;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.9375rem;
  text-align: center;
}
.photo-preview-actions .link-btn {
  text-align: center;
  padding: 6px;
}

/* ---------- Ajout manuel (S-02) ---------- */
.manual-food-form {
  background: var(--cream, #f7f1e8);
  border-radius: 18px;
  padding: 20px 18px;
  margin-bottom: 16px;
}
.manual-food-form .field { margin-bottom: 16px; }
.manual-food-form .field > span:first-child { margin-bottom: 8px; line-height: 1.4; display: block; }
.manual-food-form .field:last-of-type { margin-bottom: 4px; }
.field-error {
  color: #b3492f;
  font-size: 0.8438rem;
  margin: 4px 0 14px;
  line-height: 1.4;
}
.manual-food-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.manual-food-actions .btn-primary {
  flex: 1;
  padding: 14px 18px;
  font-size: 0.9375rem;
}
.manual-food-actions .link-btn { flex-shrink: 0; padding: 14px 10px; }

/* ---------- Pills ---------- */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.pill-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.pill-grid-2 .pill { text-align: center; }
.pill {
  font-family: var(--font-body);
  font-size: 0.9062rem;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.pill.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* ---------- Steppers ---------- */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}
.stepper-row:first-of-type { border-top: none; }
.stepper {
  display: flex;
  align-items: center;
  gap: 16px;
}
.stepper-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--paper);
  font-size: 1.125rem;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}
.stepper-value { min-width: 18px; text-align: center; font-weight: 600; }

/* ---------- Hydration ---------- */
.hydration-count { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 10px; }
.progress-track {
  height: 8px;
  background: var(--cream-2);
  border-radius: 999px;
  margin-bottom: 8px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--terracotta);
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ---------- Food list ---------- */
.search-row { margin: 14px 0 10px; position: relative; }
.food-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 15;
}
.food-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.food-search-item:last-child { border-bottom: none; }
.food-search-item:active { background: var(--cream-2); }
.fsi-name { flex: 1; margin-right: 10px; }
.fsi-kcal { flex-shrink: 0; color: var(--ink-soft); font-size: 0.7812rem; white-space: nowrap; }
.food-list { list-style: none; padding: 0; margin: 10px 0 0; }
.food-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9062rem;
}
.food-list li .remove-food {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 1.125rem;
  cursor: pointer;
}
.empty-hint { text-align: center; color: var(--ink-soft); font-size: 0.8438rem; margin: 10px 0 0; }

/* ---------- Chart / stats ---------- */
.chart-card { padding-bottom: 12px; }
.chart-card .empty-hint { padding: 24px 12px; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.stat-card { margin-bottom: 0; }
.stat-value { font-family: var(--font-display); font-size: 1.625rem; font-weight: 600; margin: 4px 0; }
.stat-caption { font-size: 0.75rem; color: var(--ink-soft); margin: 0; }

/* ---------- Menus ---------- */
.menu-tags { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.menu-tags .tag { background: var(--cream-2); color: var(--ink-soft); }
.meal-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.meal-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  font-weight: 600;
  margin: 0 0 6px;
}
.meal-text { margin: 0; font-size: 0.9375rem; line-height: 1.5; }

/* ---------- Accordion ---------- */
.accordion { margin-bottom: 16px; }
.accordion-item {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
}
.accordion-header .chev { transition: transform 0.2s ease; color: var(--ink-soft); }
.accordion-item.open .accordion-header .chev { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 18px;
}
.accordion-item.open .accordion-body { padding-bottom: 16px; }
.accordion-body p { margin: 0; font-size: 0.9062rem; line-height: 1.6; color: var(--ink-soft); }
.accordion-body strong { color: var(--ink); }
.accordion-body a { color: var(--terracotta-dark); text-decoration: underline; }
.accordion-body a:active { opacity: 0.7; }

/* ---------- Apparence / thème (S-04) ---------- */
.theme-card { margin-top: 24px; }
.theme-choice-row {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}
.theme-btn {
  flex: 1;
  background: var(--cream-2);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.theme-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* ---------- Rappels ---------- */
.reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9062rem;
}
.reminder-row:last-of-type { border-bottom: none; }
.reminder-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); }

/* ---------- Logo de marque en pied de page ---------- */
.brand-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 28px 0 8px;
  opacity: 0.8;
}
.brand-footer-logo { width: 36px; height: auto; }
.brand-footer p { font-size: 0.75rem; color: var(--ink-soft); margin: 0; }

/* ---------- About card (Conseils) ---------- */
.about-card { background: var(--green); border: none; color: #fff; }
.about-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.about-avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.about-row > div { flex: 1; min-width: 0; }
.about-name { font-family: var(--font-display); font-size: 1.125rem; margin: 0; }
.about-role { font-size: 0.8125rem; opacity: 0.85; margin: 2px 0 0; }
.about-ig {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  opacity: 0.9;
  font-size: 0.8125rem;
  text-decoration: none;
  margin-top: 2px;
}
.btn-follow {
  flex-shrink: 0;
  background: var(--terracotta);
  color: #fff;
  font-size: 0.8438rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.about-text { font-size: 0.875rem; line-height: 1.6; opacity: 0.92; margin: 0 0 14px; }
.about-features { display: flex; flex-direction: column; gap: 10px; }
.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.feature-icon { font-size: 0.9375rem; }

/* ---------- Instagram feed section ---------- */
.ig-feed-section { margin: 24px 0 16px; }
.ig-feed-title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  margin: 0 0 12px;
}
.ig-feed-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ig-feed-scroll::-webkit-scrollbar { display: none; }

.ig-cta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream-2);
  border: none;
}
.ig-cta-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.ig-cta-text { font-size: 0.8438rem; color: var(--ink-soft); margin: 0; }
.ig-cta-handle { font-size: 0.9375rem; font-weight: 600; color: var(--terracotta-dark); text-decoration: none; }

/* ---------- Plate chart ---------- */
.plate-chart { display: flex; justify-content: center; margin: 8px 0 18px; }
.plate-svg { width: 160px; height: 160px; }
.bullet-list { margin: 0; padding-left: 18px; font-size: 0.9062rem; line-height: 1.7; color: var(--ink-soft); }
.bullet-list strong { color: var(--ink); }

/* ---------- Tags (allergies etc.) ---------- */
.tag-input-row { display: flex; gap: 8px; margin-bottom: 10px; }
.tag-input-row input { flex: 1; }
.btn-add-tag {
  width: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--cream-2);
  font-size: 1.25rem;
  color: var(--ink);
  cursor: pointer;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--cream-2);
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
  font-size: 0.8438rem;
}
.tag-chip button {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  cursor: pointer;
  padding: 0 4px;
}

/* ---------- Activity cards ---------- */
.activity-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.activity-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--paper);
}
.activity-card input { margin-top: 4px; accent-color: var(--green); }
.activity-card strong { display: block; font-size: 0.9375rem; margin-bottom: 2px; }
.activity-card p { margin: 0; font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.4; }
.activity-card:has(input:checked) {
  border-color: var(--green);
  background: rgba(63, 88, 84, 0.06);
}

/* ---------- Rate slider ---------- */
#rate-card .card-title-row { margin-bottom: 4px; font-size: 0.9062rem; color: var(--ink-soft); }
.rate-value { color: var(--terracotta-dark); font-weight: 600; font-family: var(--font-display); font-size: 1.0625rem; }
input[type="range"] {
  width: 100%;
  accent-color: var(--terracotta);
  margin-top: 8px;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  background: var(--paper);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 30;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 8px 2px;
  color: var(--ink-soft);
  font-size: 0.6875rem;
  cursor: pointer;
}
.nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav-item.active { color: var(--green-accent); font-weight: 600; }

/* ---------- Onboarding ---------- */
.onboarding {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 40px 24px;
}
.onboarding-inner { width: 100%; text-align: center; }
.onboarding-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 18px; }
.onboarding-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--green-accent);
  margin: 4px 0 10px;
}
.onboarding-sub { color: var(--ink-soft); font-size: 0.9375rem; margin: 0 0 26px; line-height: 1.5; }
.onboarding-card { text-align: left; }
.onboarding-disclaimer { font-size: 0.75rem; color: var(--ink-soft); margin-top: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 20px);
  background: var(--green);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
  white-space: normal;
  max-width: min(88vw, 380px);
  text-align: center;
  box-shadow: 0 4px 16px rgba(44, 42, 38, 0.18);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 560px) {
  #app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}
