/* Cream and sage: shared surfaces for the daily app. */
:root {
  color-scheme: light;
  --bg: #f7f6ef;
  --surface: #ffffff;
  --surface-soft: #edf1e6;
  --surface-ink: #20352b;
  --text: #20352b;
  --dim: #59665e;
  --muted: #626d64;
  --line: #dce1d7;
  --teal: #2d4b3a;
  --teal-ink: #263f32;
  --mint: #dfe7d4;
  --blue: #4b6d79;
  --berry: #9d3654;
  --berry-soft: #f7e9ed;
  --amber: #92631e;
  --amber-soft: #f7efd9;
  --shadow: none;
  --shadow-soft: none;
  --shadow-lift: 0 8px 28px rgba(32, 53, 43, .10);
  --glow: none;
  --radius: 12px;
}

/* Shared component overrides preserve chart fills and layout rules. */
body,
.unlock-option,
.unlock-option.google,
.account-card,
.token-card,
.disclaimer-card,
.launch-readiness-card,
.screen-error-shell,
.capture-stage,
.home-shortcut.supplement,
.home-shortcut.workout,
.home-shortcut.feel,
.first-run-meal-callout,
.home-quick-log-card,
.meal-pick-tabs,
.supplement-shelf-item,
.supplement-row.just-logged,
.supplement-label-scan.disabled,
.supplement-label-preview,
.supplement-review-row,
.supplement-next-card,
.invite-landing-card,
.what-if-next,
.quick-log-card,
.timeline-supplement-card,
.supplement-cal,
.fast-log-card,
.fast-log-inline,
.ask-guidance-row span,
.move-guidance-row span,
.feel-guidance-row span,
.feedback-guidance-row span,
.community-command-card,
.ask-command-card,
.feedback-command-card,
.voice-agent-card,
.feedback-list-shell,
.shared-recipe-alert.strong,
.food-research-hero-card,
.food-research-library-shell,
.influence-command-card,
.influence-action-panel .research-summary,
.influence-empty-card,
.influence-claim-details,
.ask-evidence-card,
.ask-answer-marker,
.ask-answer-evidence-grid span,
.profile-command-story span:nth-child(2),
.profile-command-story span:nth-child(3),
.profile-command-story span:nth-child(4),
.profile-field-panel.basics,
.profile-field-panel.controls,
.profile-field-panel.preferences,
.profile-field-panel.ai,
.profile-voice-key-box,
.product-health-card,
.ops-card,
.diet-approach-panel,
.scan-card,
.smart-shopping-card,
.use-soon-card,
.raw-status,
.detail-why-list li,
.chart-stat.calories,
.chart-stat.protein,
.chart-signal.calories,
.chart-signal.protein,
.chart-insight-ribbon.coverage,
.feel-lead-stat,
.chart-insight-ribbon.feel,
.weekly-outcome-card,
.move-command-card,
.feel-command-card,
.recent-workouts-shell,
.feel-entry-card,
.home-stats-card,
.plan-gap-card,
.estimate-result,
.quick-add-sheet.impact-flow,
.log-action-card.meal,
.quick-add-option.voice,
.log-action-card.supplement,
.log-action-card.workout,
.log-action-card.feel,
.quick-impact-logged,
.quick-impact-change,
.proof-snapshot-card,
.review-queue-card { background: var(--surface); }

.skip-link,
button:hover, .btn:hover,
button.ghost, .btn.ghost,
button.ghost:hover, .btn.ghost:hover,
button.ghost:disabled,
.top-icon,
.health-pill,
.health-pill::before,
.health-pill.healthy::before,
.health-pill.degraded::before,
.health-pill.unhealthy::before,
.google-btn,
.card.quiet,
.loading::before,
.loading.inline,
.loading.inline::before,
button.inventory-photo-trigger,
.home-shortcuts-card,
.main-path-card,
.support-card,
.onboarding-step,
.onboarding-step.current,
.first-week-card,
.first-week-step,
.source-card,
.mini-action,
.nutrition-scorecard .nutrition-score,
.nutrition-scorecard .nutrition-score::before,
.scorecard-panel,
.meal-pick-tab.active,
.meal-pick-panel,
.coverage-source-split span,
.review-before-save,
.timeline-time::after,
.journal-timeline-item.supplement-entry .timeline-time::after,
.repeat-actions .danger.confirming,
.fast-log-btn:hover,
.insights-tabs-card,
.insights-tab,
.insights-tab:hover,
.insights-tab.active,
.voice-orb,
.voice-mic-button.active,
.compact-section-fold[open],
.food-research-filter.active,
.slider,
.insight-card .metric,
.profile-hub-card,
.profile-hub-card .profile-score-panel,
.profile-score-ring,
.profile-score-ring::before,
.profile-tune-bars span,
.profile-next-action,
.profile-power,
.profile-nav-card,
.profile-section-tab,
.feedback-type-dot,
.feedback-item.bug .feedback-type-dot,
.feedback-item.confusion .feedback-type-dot,
.feedback-item.idea .feedback-type-dot,
.feedback-item.value .feedback-type-dot,
.scan-item,
.make-now-chip,
.kitchen-fold[open],
.kitchen-workbench-grid > .kitchen-fold[open],
.kitchen-workbench-grid .use-soon-card,
.kitchen-ideas-shell .idea-section,
.inventory-quantity-stepper,
.pantry-date-group .use-soon-item,
.use-soon-item,
.optional-shop .shop-link,
.meal-detail-card,
.chart-card-head .count-pill,
.feel-metric-chip,
.chart-hero-strip span,
.command-meal-visual,
.macro-chart-wrap,
.coverage-ring,
.coverage-ring::before,
.nutrition-board-visual,
.gap-chart-track,
.gap-chart-track i,
.gap-chart-row.low .gap-chart-track i,
.gap-chart-row.over .gap-chart-track i,
.feel-entry-card,
.plan-section-card,
.toast button,
  .profile-section-tab:hover,
.log-action-card,
.log-action-card:hover,
.log-view-tab,
.log-view-tab:hover,
.log-view-tab.active,
.log-empty-card,
.proof-snapshot-grid,
.review-status-dot,
.review-status-dot.critical,
.review-status-dot.high,
.today-meal-modes button,
.today-meal-modes button[aria-pressed="true"],
.saved-library-open,
.saved-library .saved-library-open,
.recipe-log-totals .metric,
.find-anything-result,
.term-trigger.confidence-badge:hover,
.meal-context-switcher,
.meal-context-option,
.meal-context-option:hover,
.meal-context-option.active,
.quick-log-compact .quick-log-form,
.quick-log-compact button,
.compact-preview .metric,
.compact-preview .quick-log-editor-fold,
.log-hub-card.log-hub-compact,
.log-hub-compact .log-view-tab.active,
.log-entry-actions button,
.log-entry-types button,
.log-entry-tool,
.log-entry-body > .card,
body.signed-out .topbar,
.signin-code button,
.timeline-time-button { box-shadow: none; }

button, .btn { background: var(--teal); box-shadow: none; font-weight: 600; }

button.is-busy::after,
.eyebrow,
.unlock-divider,
.profile-control-tile small,
.error-detail summary,
.label-list span,
.freshness-strip span,
.cal small,
.confidence-badge,
.home-shortcut small,
.progress-badge small,
.core-loop-rail span,
.onboarding-step small,
.first-run-fields label,
.first-meal-progress small,
.first-week-next span,
.first-week-step small,
.quick-repeat-meta em,
.disclosure-row small,
.panel-label,
.scorecard-nutrient span,
.scorecard-nutrient small,
.ranking-basis span,
.best-for-chips em,
.recommendation-axis,
.scorecard-empty,
.scorecard-source span,
.coverage-source-split small,
.supplement-label-preview div,
.supplement-review-nutrient > span,
.unit-input span,
.supplement-row > div > span,
.supplement-nutrients span,
.household-member span,
.household-invite-row span,
.household-fit,
.what-if-next small,
.what-if-shift > span,
.what-if-caution small,
.metric span,
.review-before-save-copy small,
.review-before-save-signals small,
.meal-nutrition-facts span,
.meal-pro-list li,
.quick-log-time-field label,
.quick-log-question,
.journal-day-label span,
.timeline-time span,
.timeline-entry-title small,
.timeline-foods span,
.journal-pagination span,
.inventory-use-row small,
.inventory-use-controls label,
.inventory-use-controls > span,
.fast-log-inline label,
.fast-log-btn small,
.secondary-section-chip small,
.insights-tab small,
.insights-priority small,
.profile-detail-fold > summary,
.voice-agent-log span,
.compact-section-summary::after,
.compact-section-summary small,
.compact-section-summary em,
.shared-recipe-context-row small,
.shared-recipe-alert,
.shared-recipe-details summary span,
.evidence-tier,
.evidence-tier.large small,
.food-benefit-list small,
.influence-action-panel .source-list a,
.influence-action-panel .source-list span,
.influence-claim-details summary,
.warning-text,
.food-edit-head,
.range-labels,
.score-direction,
.direction,
.ask-answer-body code,
.ask-answer-evidence-grid small,
.ask-source-details summary span,
.ask-source-list small,
.tag,
.profile-command-story small,
.profile-score-ring-value span,
.profile-score-caption span,
.profile-next-action span,
.profile-power small,
.profile-status-chip small,
.profile-status-chip em,
.profile-section-tab small,
.profile-field-panel-head small,
.activation-row small,
.feature-use-row small,
.backup-remote-row span,
.backup-schedule-panel label,
.readiness-gate small,
.token-row span,
.token-row small,
.diet-chip small,
.feedback-item small,
.status-pill,
.count-pill,
.starter-staple-btn small,
.kitchen-section-chip small,
.kitchen-decision > span,
.kitchen-decision small,
.kitchen-answer-stats span,
.make-now-chip small,
.kitchen-fold-summary::after,
.kitchen-fold-summary small,
.kitchen-fold-summary em,
.idea-section-head::after,
.inventory-quantity-stepper output,
.expiry-badge,
.use-soon-item span,
.optional-shop > span,
.readiness-badge,
.prep-steps summary,
.service-row small,
.raw-status summary,
.detail-chip-row span,
.warning span,
.coverage-row span,
.chart-lead-stat small,
.chart-lead-stat span,
.chart-stat small,
.chart-stat em,
.chart-signal small,
.chart-insight-ribbon span,
.feel-date-label,
.feel-metric-chip small,
.feel-metric-chip em,
.chart-hero-strip small,
.chart-hero-strip em,
.command-meal-visual-copy small,
.command-meal-visual-copy span,
.weekly-change-chip,
.chart-kpi-row small,
.macro-latest-label,
.chart-average text,
.chart-axis-titles text,
.chart-target-band-label,
.macro-floating-label,
.macro-floating-cal,
.macro-floating-protein,
.chart-legend span,
.coverage-ring-value span,
.coverage-ring-caption,
.nutrition-runway-zone-labels text,
.nutrition-runway-value,
.nutrition-bar-status,
.nutrition-bar-value,
.nutrition-bar-status,
.nutrition-focus-pill small,
.nutrient-tile small,
.coverage-status-row span,
.nutrition-details summary,
.gap-chart-label span,
.coverage-day,
.shopping-plan-reasons em,
.shopping-plan-meals span,
.success-note,
.key-state,
.feel-entry-card label,
.suggestion-mode-btn span,
.suggestion-control-grid label,
.gap-pill,
.why-meal summary,
.food-row span,
.reason-row span,
.toast,
.more-nav-sheet-item small,
.quick-add-photo-stage > div,
.quick-repeat-item.compact small,
.quick-impact-stats small,
.log-view-tab small,
.log-view-tab em,
.log-data-quality small,
.proof-snapshot-grid small,
.proof-snapshot-grid em,
.proof-snapshot-foot > p,
.review-summary-pill,
.review-item-title p,
.review-issue-badge,
.review-more-note,
.review-queue-more > summary,
.recommendation-details > summary,
.quick-capture-choice em,
.quick-capture-more > summary,
.term-glossary-short,
.meal-context-label small,
.timeline-time-button small,
.journal-move-form label { font-weight: 600; }

.topbar,
.card,
.disclaimer-card,
.profile-control-tile,
.screen-error-icon,
.home-shortcut,
.log-quick-add-callout,
.more-path-card-wrap,
.main-path-next,
.nav-card,
.onboarding-card,
.daily-next-card,
.quick-repeat-item,
.disclosure-row,
.saved-meal-row,
.nutrition-scorecard,
.scorecard-nutrient,
.scorecard-nutrient.ok,
.meal-picks-card,
.supplement-card,
.daily-forecast-card,
.metric,
.meal-edit-card,
.meal-nutrition-read,
.quick-log-form,
.manual-meal-form,
.timeline-meal-card,
.timeline-thumb,
.fast-log-btn,
.secondary-section-rail-card,
.compact-section-fold,
.feedback-entry-card,
.feedback-entry-card .feedback-form > div,
.shared-recipe-card,
.shared-recipe-context-row span,
.food-research-control-card,
.search-box,
.food-research-filter,
.food-research-card,
.food-research-details,
.influence-workbench-card,
.influence-action-panel,
.influence-claim-card,
.checkin-cadence,
.insight-card,
.answer-card,
.answer-body-card,
.ask-answer-decision,
.profile-hero-card,
.profile-command-story span,
.profile-score-panel,
.profile-status-rail-card,
.profile-premium-setup,
.profile-field-panel,
.product-health-grid section,
.next-activation,
.activation-row,
.backup-remote-row,
.backup-preview-card,
.backup-schedule-panel,
.restore-drill-note,
.readiness-gate,
.token-row,
.feedback-item,
.kitchen-section-rail-card,
.scan-card,
.kitchen-answer-card,
.kitchen-answer-icon,
.kitchen-fold,
.kitchen-workbench-grid > .kitchen-fold,
.idea-section,
.inventory-item,
.idea-card,
.prep-steps,
.service-status-card,
.meal-detail-close,
.service-overview,
.service-overview div,
.service-row,
.chart-card,
.chart-lead-stat,
.chart-stat,
.chart-signal,
.chart-insight-ribbon,
.feel-chart-wrap,
.chart-hero-strip,
.chart-kpi-row span,
.coverage-hero,
.nutrition-overview,
.nutrition-focus-pill,
.nutrient-tile,
.gap-status-dot,
.smart-pick,
.recent-workouts-card,
.workout-form > div,
.workout-card,
.plan-feature-card,
.suggestion-creator-card,
.suggestion-mode-btn,
.tabbar,
.more-nav-sheet,
.more-nav-sheet-item,
.quick-add-sheet,
.quick-add-photo-stage,
.log-hub-card,
.term-glossary-dialog { background: var(--surface); box-shadow: none; }

.top-icon.active,
.cal.needs-nutrition,
.main-path-card.current,
.quick-start-chip,
.secondary-section-chip,
.profile-tune-bars span.done,
.profile-status-chip,
.kitchen-section-chip,
.suggestion-mode-btn.active,
.more-nav-sheet-item.current,
.find-anything-result.active { background: var(--surface-soft); box-shadow: none; }

.pill,
.chip,
.source-links a,
.nutrition-score,
.meal-pick-tab,
.tab { box-shadow: none; font-weight: 600; }

.profile-control-tile.ready,
.match-badge.inventory,
.match-badge.nutrition,
.main-path-next.complete,
.quick-start-chip,
.checkin-cadence.done,
.profile-power.ready,
.profile-status-chip.ready,
.activation-row.done,
.kitchen-decision.ready,
.service-badge.optional,
.timeline-workout-card .cal,
.timeline-feeling-card .cal { background: var(--surface-soft); }

.profile-control-tile.attention,
.ghost.attention,
.profile-power.attention,
.profile-status-chip.attention,
.kitchen-decision.near,
.chart-stat.low,
.chart-signal.low,
.nutrition-focus-pill.low,
.nutrient-tile.low,
.coverage-cell.low { background: var(--amber-soft); }

.profile-control-tile b,
.home-shortcut b,
.log-quick-add-callout b,
.log-quick-add-callout small,
.home-shortcut-launch em,
.main-path-next b,
.main-path-next span,
.main-path-next small,
.main-path-card small,
.progress-badge b,
.first-week-next b,
.daily-next-why span,
.quick-log-flow b,
.launch-checklist summary,
.ranking-basis > b,
.best-for-line > strong,
.best-for-chips b,
.recommendation-axis b,
.meal-nutrition-facts b,
.meal-pro-list > b,
.journal-day-label b,
.timeline-time b,
.timeline-entry-title b,
.journal-pagination b,
.form-guidance-row b,
.voice-agent-stage b,
.feedback-entry-card label,
.shared-recipe-context-row b,
.shared-recipe-details summary b,
.food-research-honesty b,
.food-research-honesty span,
.food-research-tags span,
.food-research-explain b,
.food-research-details summary,
.claim-source-link b,
.ask-answer-decision b,
.ask-answer-body h4,
.ask-answer-body strong,
.ask-answer-evidence-grid b,
.ask-source-details summary b,
.ask-source-list b,
.profile-status-chip b,
.kitchen-decision b,
.make-now-strip strong,
.chart-insight-ribbon b,
.chart-story-row b,
.gap-chart-row strong small,
.nutrition-estimate-status b { font-weight: 700; }

.loading,
.quick-log-flow span,
.form-guidance-row span,
.shop-link,
.chart-story-row span { background: var(--surface); box-shadow: none; font-weight: 600; }

.score, .cal,
.nutrient-chip { background: var(--surface-soft); box-shadow: none; font-weight: 600; }

.match-badge { background: var(--surface-soft); box-shadow: none; font-weight: 700; }

.best-nutrients span,
.food-research-quick-take { background: var(--surface); font-weight: 700; }

.match-explainer span { box-shadow: none; font-weight: 700; }

.what-if-next-icon,
.food-research-honesty,
.profile-section-tab.active,
.tab.active,
.tab.expanded,
.quick-add-fab,
.quick-impact-mark { background: var(--teal); box-shadow: none; }

.unlock-warning { background: var(--amber-soft); font-weight: 600; }

.service-badge { background: var(--surface-soft); font-weight: 600; }

.chart-stat.over,
.chart-signal.over,
.nutrition-focus-pill.over,
.nutrient-tile.over { background: var(--berry-soft); }

.gap-chart-row.low .gap-status-dot { background: var(--amber-soft); box-shadow: none; }

.gap-chart-row.over .gap-status-dot { background: var(--berry-soft); box-shadow: none; }

.chart-empty-panel,
.coverage-cell { background: var(--surface); font-weight: 600; }

body { background: var(--bg); background-attachment: scroll; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 400; }
body.signed-out, .signed-out .topbar { background: var(--bg); }
h1, h2, h3, h4 { color: var(--text); letter-spacing: -.02em; font-weight: 700; }
b, strong { font-weight: 650; }
button, .btn { background: var(--teal); box-shadow: none; font-weight: 600; border-radius: 12px; }
button:hover, .btn:hover { box-shadow: none; transform: none; }
button.ghost, .btn.ghost { background: transparent; border-color: var(--line); box-shadow: none; color: var(--text); }
button.ghost:hover, .btn.ghost:hover { background: var(--surface-soft); border-color: #aebda9; box-shadow: none; }
button:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #758b65; outline-offset: 3px; }
input, textarea, select { background-color: var(--surface); border-color: var(--line); box-shadow: none; font-size: 16px; }
input:focus, textarea:focus, select:focus { border-color: #758b65; box-shadow: none; }
a { color: var(--teal-ink); font-weight: 600; }
body .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
body .card::before { content: none; }
body .card:hover { box-shadow: none; transform: none; }
.eyebrow { color: var(--dim); font-weight: 600; letter-spacing: .05em; }
.meta { color: var(--dim); }
.topbar { padding: calc(8px + env(safe-area-inset-top)) 20px 8px; gap: 8px; background: var(--bg); border-bottom: 0; box-shadow: none; backdrop-filter: none; }
.brand { gap: 8px; }
.brand h1 { font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.logo { width: 26px; height: 26px; }
.tagline:empty { display: none; }
.top-actions { gap: 2px; }
.top-icon, .top-icon.active { width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--teal-ink); background: transparent; box-shadow: none; }
.top-icon.active { background: var(--mint); }
.view { padding: 24px 24px calc(120px + env(safe-area-inset-bottom)); }
.screen-head { margin-bottom: 24px; }
.screen-head h2 { font-size: 28px; font-weight: 700; }
.tabbar { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
.tab, .tab.expanded { min-height: 52px; gap: 4px; padding: 6px 2px; color: var(--dim); background: transparent; border: 0; border-radius: 12px; font-size: 12px; font-weight: 500; box-shadow: none; }
.tab.active { color: var(--teal-ink); background: var(--mint); box-shadow: none; font-weight: 650; }
.tab svg { width: 23px; height: 23px; stroke-width: 1.8; }
.quick-add-fab { color: white; background: var(--teal); border: 1px solid var(--teal); box-shadow: 0 3px 12px rgba(32, 53, 43, .12); }
.quick-add-fab:hover { transform: translateX(-50%); }
body[data-current-tab="home"] .quick-add-fab { display: none; }
.meal-detail-overlay, .service-status-overlay, .more-nav-sheet-overlay { background: rgba(25, 38, 30, .36); backdrop-filter: none; }
.meal-detail-card, .service-status-card, .quick-add-sheet, .find-anything-dialog, .term-glossary-dialog { background: var(--surface); border-color: var(--line); border-radius: 16px; box-shadow: var(--shadow-lift); }
.meal-detail-head h3 { font-size: 24px; letter-spacing: -.02em; }
.meal-detail-close, .icon-btn { color: var(--teal-ink); background: transparent; border-color: var(--line); box-shadow: none; }
.timeline-meal-card .cal, .match-badge, .metric { color: var(--text); background: var(--surface-soft); box-shadow: none; }
.timeline-time-button { color: var(--teal-ink); background: var(--surface); border-color: #c4cebd; box-shadow: none; }
.timeline-time-button b { color: var(--teal-ink); }
.timeline-time::after { background: var(--teal); box-shadow: none; border-color: var(--bg); }
.journal-day-items::before { background: #d8e0d0; }
.profile-score-ring, .coverage-ring, .nutrition-score { box-shadow: none; }
.meal-cook-dialog, .meal-explorer { color: var(--text); }
.meal-cook-dialog { border-radius: 14px; }

/* Today: one primary action, a meal card, then recent activity. */
body[data-current-tab="home"] .view { width: min(680px, 100%); margin: 0 auto; padding-top: 20px; }
.view .screen-head.today-heading { display: block; margin: 0 0 24px; padding: 0; }
.view .today-heading h2 { margin: 0; font-size: clamp(25px, 5.8vw, 30px); line-height: 1.25; letter-spacing: -.025em; font-weight: 700; }
.today-date { margin: 5px 0 0; font-size: 16px; color: var(--dim); }
.today-primary-action { margin: 0 0 24px; }
.today-primary-action button { width: 100%; min-height: 52px; font-size: 17px; font-weight: 600; }
.today-primary-action .i { width: 22px; height: 22px; }
.today-decision, .today-activity, .today-setup { width: 100%; margin: 0 0 24px; min-width: 0; }
.today-decision-heading, .today-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap; padding: 0; margin: 0 0 12px; }
.today-decision-heading h2, .today-section-heading h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; }
.today-options { position: relative; flex: 0 0 auto; }
.today-options > summary { min-height: 44px; padding: 10px 0 10px 8px; color: var(--dim); font-size: 13px; font-weight: 500; cursor: pointer; list-style: none; }
.today-options > summary::-webkit-details-marker { display: none; }
.today-options > summary:focus-visible, .today-entry-tools > summary:focus-visible { outline: 3px solid #758b65; outline-offset: 3px; border-radius: 6px; }
.today-options[open] > summary { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 4px; }
.today-options-panel { position: absolute; top: 100%; right: 0; z-index: 6; width: min(360px, calc(100vw - 40px)); max-height: 65dvh; overflow-y: auto; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); }
.today-meal-modes { grid-template-columns: 1fr; background: var(--bg); border-radius: 10px; padding: 4px; gap: 4px; }
.today-meal-modes button { min-height: 44px; font-size: 14px; text-align: left; justify-content: flex-start; padding: 10px 12px; color: var(--dim); }
.today-meal-modes button[aria-pressed="true"] { background: var(--mint); border-color: transparent; color: var(--teal-ink); box-shadow: none; }
.today-window-label { display: grid; grid-template-columns: 1fr 2fr; width: 100%; margin: 16px 0; font-size: 14px; }
.today-window-label select { width: 100%; font-size: 16px; }
.today-options-panel [data-today-saved] { width: 100%; }
.today-decision-status { color: var(--dim); font-size: 12px; margin: 12px 0 0; }
.today-decision-status:empty { display: none; }
.today-pick, .today-pick:has(.today-pick-photo) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.today-pick:has(.today-pick-photo) .today-pick-photo { grid-row: 1; margin: 8px 8px 0; border-radius: 10px; }
.today-pick:has(.today-pick-photo) .today-pick-main { grid-row: 2; }
.today-pick-photo img { width: 100%; aspect-ratio: 2.1 / 1; object-fit: cover; }
.today-pick-main { align-self: stretch; padding: 16px; }
.today-pick-main h3 { font-size: 21px; line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.today-pick-facts { display: block; margin: 7px 0 0; color: var(--dim); font-size: 14px; font-weight: 400; }
.today-prep-note { font-size: 13px; line-height: 1.45; color: var(--dim); margin: 12px 0 0; }
.today-pick-actions { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; margin: 16px 0 0; }
.today-pick-actions button { min-height: 46px; padding: 10px 8px; font-size: 14px; font-weight: 600; border-radius: 10px; }
.today-pick-actions [data-today-recipe] { background: var(--mint); color: var(--teal-ink); }
.today-pick-actions [data-today-switch] { background: transparent; border-color: transparent; font-weight: 500; }
.today-pick-main > .recommendation-details { margin: 8px 0 0; border: 0; }
.today-pick-main > .recommendation-details > summary { min-height: 44px; background: transparent; color: var(--dim); padding: 10px 0; font-size: 13px; font-weight: 500; box-shadow: none; }
.today-pick .recommendation-details-body { padding: 4px 0 0; font-size: 14px; }
.today-section-heading > button { min-height: 44px; padding: 8px 0 8px 12px; border: 0; background: transparent; font-size: 14px; font-weight: 500; }
.today-log-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.today-log-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 18px; gap: 12px; align-items: center; width: 100%; min-height: 72px; padding: 14px 16px; text-align: left; color: var(--text); background: var(--surface); border: 0; border-radius: 0; box-shadow: none; }
.today-log-row + .today-log-row { border-top: 1px solid var(--line); }
.today-log-row:hover { background: var(--surface-soft); }
.today-log-icon .i { width: 25px; height: 25px; stroke-width: 1.7; }
.today-log-copy { display: grid; gap: 3px; min-width: 0; }
.today-log-copy b { font-size: 15px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.today-log-copy time { font-size: 13px; color: var(--dim); font-weight: 400; }
.today-log-chevron { font-size: 26px; line-height: 1; color: var(--muted); font-weight: 400; }
.today-log-empty { padding: 20px 16px; margin: 0; color: var(--dim); font-size: 14px; }
.today-entry-tools { margin-top: 8px; }
.today-entry-tools > summary, .today-setup > summary { min-height: 44px; padding: 10px 0; color: var(--dim); font-size: 14px; font-weight: 500; cursor: pointer; }
.today-entry-actions { display: grid; gap: 8px; margin: 4px 0 16px; }
.today-entry-actions button { min-height: 46px; justify-content: flex-start; font-size: 14px; }
.today-setup { padding-top: 8px; border-top: 1px solid var(--line); }
.today-activity [data-today-reload] { margin: 8px 0; }
@media (max-width: 480px) {
  .topbar { padding-left: 20px; padding-right: 16px; }
  .topbar .logo { display: none; }
  .topbar .brand { gap: 0; }
  .view { padding-left: 20px; padding-right: 20px; }
}
@media (min-width: 760px) {
  /* Keep content clear of the fixed rail, including the iPhone's landscape notch. */
  .view { padding: 24px calc(28px + env(safe-area-inset-right)) 28px calc(116px + env(safe-area-inset-left)); }
  .topbar { padding-left: calc(116px + env(safe-area-inset-left)); padding-right: calc(28px + env(safe-area-inset-right)); }
  .tabbar { width: calc(88px + env(safe-area-inset-left)); padding-left: calc(12px + env(safe-area-inset-left)); padding-bottom: max(8px, env(safe-area-inset-bottom)); border-top: 0; border-right: 1px solid var(--line); }
  .quick-add-overlay { padding-left: calc(116px + env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  body[data-current-tab="home"] .view { padding-top: 32px; }
}
@media (min-width: 760px) and (max-height: 500px) {
  .topbar { padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; }
  .tagline { display: none; }
  .view, body[data-current-tab="home"] .view { padding-top: 16px; }
  .screen-head { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  button, .btn { transition: none; }
}

body[data-current-tab="home"] [data-today-stats] { display: block; width: 100%; }
.today-log-list { width: 100%; }

.timeline-meal-card .cal.needs-nutrition { background: var(--amber-soft); color: #70501e; }

.today-checkin-button { min-height: 44px; margin-top: 8px; font-size: 14px; justify-content: flex-start; }

body .chart-card::after { content: none; }

body.signed-out .topbar { background: var(--bg); }

/* Summary text follows the light surfaces used by the shared theme. */
.chart-lead-stat, .chart-hero-strip, .chart-insight-ribbon { color: var(--text); border-color: var(--line); }
.chart-hero-strip > span { background: var(--surface-soft); }
.chart-lead-stat b, .chart-hero-strip b, .chart-insight-ribbon b { color: var(--text); }
.chart-lead-stat small, .chart-lead-stat span,
.chart-hero-strip small, .chart-hero-strip em,
.chart-insight-ribbon span { color: var(--dim); }
.chart-lead-stat small, .chart-hero-strip small, .chart-insight-ribbon b { font-size: 12px; }
.chart-hero-strip b { font-size: 22px; }
.chart-hero-strip em { font-size: 12px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }

/* Daily tasks: compact controls, a single inventory workspace, and clear review. */
.daily-screen-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.daily-screen-heading h2 { margin:0; font-size:26px; }
body[data-current-tab="log"] .log-hub-card { padding:0; margin-bottom:8px; background:transparent; border:0; box-shadow:none; }
body[data-current-tab="log"] .log-view-tabs { display:flex; gap:8px; }
body[data-current-tab="log"] .log-view-tab { min-height:44px; padding:8px 12px; }
body[data-current-tab="log"] .log-filter-row { margin:8px 0 12px; gap:4px; overflow-x:auto; flex-wrap:nowrap; }
body[data-current-tab="log"] .log-filter-row button { min-height:44px; padding:8px 10px; font-size:13px; white-space:nowrap; }
.today-primary-action { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.today-primary-action button { font-size:14px; padding:12px 8px; min-height:48px; }
.today-repeats { margin:16px 0 24px; }
.today-repeat-list { display:flex; flex-wrap:wrap; gap:8px; }
.today-repeat { min-height:44px; min-width:0; max-width:100%; padding:10px 12px; font-size:14px; }
.today-repeat span { white-space:normal; overflow-wrap:anywhere; }
.kitchen-tabs, .meal-entry-modes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:0 0 16px; padding:4px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.kitchen-tabs button, .meal-entry-modes button { min-height:48px; padding:8px 6px; font-size:14px; background:transparent; color:var(--text); box-shadow:none; border:0; border-radius:9px; }
.kitchen-tabs [aria-selected="true"], .meal-entry-modes [aria-pressed="true"] { background:var(--mint); color:var(--teal-ink); }
[data-kitchen-panel][hidden] { display:none !important; }
.kitchen-home-actions { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.kitchen-home-actions button { min-height:46px; font-size:14px; }
.inventory-card { padding:16px; margin-bottom:12px; }
.inventory-card h3 { margin:0; font-size:17px; }
.inventory-card .inventory-item { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; padding:12px 0; }
.inventory-card .inventory-item-actions { display:flex; align-items:center; flex-wrap:nowrap; gap:4px; }
.inventory-card .inventory-quantity-stepper { display:flex; width:auto; gap:2px; padding:0; border:0; background:transparent; }
.inventory-quantity-stepper output { min-width:40px; max-width:80px; font-size:13px; text-align:center; overflow-wrap:anywhere; }
.inventory-quantity-stepper button { width:44px; height:44px; min-height:44px; padding:10px; }
.inventory-item-menu { position:relative; }
.inventory-item-menu > button { width:44px; min-height:44px; display:grid; place-items:center; padding:10px; }
.inventory-menu-popover { position:absolute; right:0; top:44px; z-index:4; width:150px; }
.inventory-menu-popover[hidden] { display:none !important; }
.inventory-menu-popover > button { width:100%; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-lift); }
.kitchen-fold > summary, .kitchen-date-review > summary, .plan-more-tools > summary, .meal-estimate-details > summary, .checkin-note > summary { min-height:44px; padding:12px 0; cursor:pointer; color:var(--dim); font-size:14px; }
.plan-simple-tools { display:flex; justify-content:space-between; gap:8px; margin-bottom:12px; }
.plan-simple-tools button { min-height:44px; font-size:14px; }
.plan-more-tools { margin-top:20px; border-top:1px solid var(--line); }
.plan-more-body { padding-top:12px; }
.plan-featured-meal .plan-meal-photo { max-height:160px; width:100%; object-fit:cover; }
.plan-featured-meal .home-actions { display:flex; flex-wrap:wrap; gap:8px; }
.plan-featured-meal .home-actions button { min-height:44px; padding:10px 12px; font-size:14px; }
.meal-when { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; font-size:14px; margin:12px 0; }
.meal-when input { min-width:0; width:100%; margin:0; font-size:16px; }
.quick-log-compact #quick-log-voice { display:none; }
.quick-log-compact .quick-log-note-fold > summary { font-size:14px; padding:8px 0; }
.quick-log-compact .quick-log-actions { justify-content:flex-end; }
.quick-log-compact .quick-log-actions button { min-height:44px; }
.quick-log-food-summary li > span:first-child { display:grid; gap:4px; }
.meal-inline-warning { color:#75521b; font-size:13px; font-weight:500; }
.quick-log-save-actions > button { width:100%; min-height:48px; }
.compact-preview h3 { margin-top:12px; }
.toast.has-action { display:flex; flex-wrap:nowrap; width:min(420px,calc(100vw - 32px)); min-width:0; max-width:none; gap:12px; align-items:center; justify-content:space-between; padding:10px 12px; border-radius:16px; }
.toast.has-action > .toast-message { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
.toast-actions { display:flex; flex:0 0 auto; gap:6px; align-items:center; }
.toast.has-action button { flex:0 0 auto; min-width:44px; min-height:44px; padding:8px 10px; border-radius:10px; }
.quick-feel-grid { display:grid; grid-template-columns:1fr; gap:8px; }
.compact-feel-metric { padding:8px 0; border-bottom:1px solid var(--line); }
.compact-feel-metric > div:first-child { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.compact-feel-metric label { margin:0; font-size:15px; }
.compact-feel-metric output { font-size:13px; color:var(--dim); }
.compact-feel-metric input[type="range"] { min-height:32px; margin:0; width:100%; padding:0; }
.compact-feel-metric .range-labels { font-size:12px; color:var(--dim); }
.feel-flow #quick-feel-save { width:100%; min-height:48px; margin-top:8px; }
.checkin-complete { display:flex; gap:8px; align-items:center; font-weight:600; }
.checkin-summary { margin:12px 0; }
.checkin-summary > div { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--line); }
.checkin-summary dd { margin:0; color:var(--dim); }
.insights-data-note { font-size:14px; line-height:1.5; color:var(--dim); }
.inventory-entry-optional { margin-top:12px; }
@media(max-width:360px) {
  .inventory-card .inventory-item { grid-template-columns:1fr; }
  .inventory-card .inventory-item-actions { justify-content:space-between; }
  .kitchen-tabs button { font-size:13px; }
}

.today-pick-photo img { aspect-ratio:3.5 / 1; max-height:110px; }
.log-view-tab { display:flex; flex-direction:row; align-items:center; gap:8px; }
body .timeline-entry-summary { display:grid; grid-template-columns:32px minmax(0,1fr) 48px; align-items:center; gap:8px; min-height:60px; }
body .timeline-entry-summary .timeline-thumb { width:32px; height:36px; min-width:0; }
body .timeline-entry-title b { font-size:15px; line-height:1.3; }
body .timeline-entry-title small { font-size:12px; }
body .timeline-entry-summary .cal { grid-column:auto; justify-self:end; min-width:0; width:48px; padding:6px 2px; }
body .timeline-entry-summary .cal b { font-size:18px; }
body .timeline-entry-summary .cal small { font-size:10px; }
body .journal-timeline-item .timeline-meal-card { padding:12px; border-radius:14px; }
body .timeline-entry-summary::after { display:none; }

.plan-featured-meal .plan-meal-photo { max-height:100px; }
.plan-featured-meal .home-actions button { width:auto; flex:1 1 130px; }
.quick-add-sheet { background:var(--surface); }

.daily-history-card .insights-start-state { display:block; padding:0; }
.daily-history-card h3 { font-size:22px; }
.daily-history-card p { font-size:15px; line-height:1.5; margin:12px 0; }
.daily-history-card > button { width:100%; min-height:48px; }
.meal-when input { box-sizing:border-box; max-width:100%; min-inline-size:0; inline-size:100%; -webkit-appearance:none; }
.quick-log-compact .quick-log-actions { grid-template-columns:minmax(0,1fr); }
.log-hub-card.log-hub-compact { grid-template-columns:minmax(0,1fr); }

.plan-featured-meal .row > div { min-width:0; }
.plan-featured-meal h3 { white-space:normal; overflow-wrap:anywhere; max-width:100%; }

/* Several photos, one reviewed meal. */
.meal-photo-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.meal-photo-tile { margin:0; min-width:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--surface); }
.meal-photo-tile > img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.meal-photo-tile figcaption { display:grid; gap:6px; padding:8px; font-size:13px; }
.meal-photo-tile figcaption > span { display:flex; gap:6px; }
.meal-photo-tile button { flex:1; min-height:44px; padding:6px; font-size:13px; }
.meal-photo-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.meal-photo-actions button { min-height:48px; padding:10px 8px; font-size:14px; }
.meal-photo-actions [data-meal-photo-review] { grid-column:1/-1; }
.meal-photo-review { padding:12px; margin:12px 0; border:1px solid #d9caa9; background:#faf4e8; border-radius:12px; color:var(--ink); font-size:14px; }
.meal-photo-review p { margin:6px 0 0; }
.timeline-photo-gallery { display:grid; grid-auto-flow:column; grid-auto-columns:80%; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory; margin:12px 0; }
.timeline-photo-gallery figure { margin:0; min-width:0; scroll-snap-align:start; }
.timeline-photo-gallery img { width:100%; height:180px; object-fit:contain; border-radius:12px; background:var(--bg); }
.timeline-photo-gallery figcaption { padding:6px 0; font-size:12px; color:var(--dim); }

.meal-photo-nutrition { margin: 12px 0; }
.meal-photo-nutrition > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 600; }
[data-meal-photo-result] { scroll-margin-top: 16px; }

.compact-photo-review .food-edit-head { display: none; }
.compact-photo-review .food-edit-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.compact-photo-review .food-name { grid-column: 1 / 3; }
.compact-photo-review .food-edit-row > [data-remove-food] { grid-column: 3; grid-row: 1 / 3; align-self: center; width: 44px; min-height: 44px; }
.compact-photo-review .food-amount { min-width: 0; }
.compact-photo-review .food-amount input { width: 100%; }
.compact-photo-review .meal-photo-review p { margin: 6px 0 0; }

/* Everyday meal editing and food-log completion. */
.journal-nutrition-editor .food-edit-head { display: none; }
.nutrition-day-recording { margin: 12px 0 20px; padding: 14px; border: 1px solid var(--border, #d7dfd7); border-radius: 14px; background: #f2f4ed; color: #243c31; }
.nutrition-day-recording p { margin: 0 0 10px; font-size: .88rem; line-height: 1.4; }
.nutrition-day-recording [data-nutrition-day-status]:empty { display: none; }
.inventory-restock { margin-top: 8px; white-space: normal; text-align: left; }
.inventory-restock[hidden] { display: none !important; }
.save-logged-meal input, .quick-add-sheet #restock-amount, .quick-add-sheet #restock-unit { width: 100%; margin-bottom: 12px; }
