@import url("recipe-image-clarity.css");

/* ===== BASE STYLES ===== */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: Arial, sans-serif; }
body { background: #f0f7f0; display: flex; justify-content: center; padding: 20px; }
.phone { width: 360px; text-align: center; padding: 30px 20px; position: relative; }
.logo-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.logo-icon { background: #2e7d32; color: white; padding: 6px 10px; border-radius: 8px; }
.green { color: #2e7d32; }
.subtitle { color: #666; font-size: 13px; margin-bottom: 30px; }
h1 { font-size: 28px; margin-bottom: 12px; }
.desc { color: #555; font-size: 14px; margin-bottom: 20px; }
.hero-img { width: 100%; border-radius: 20px; margin-bottom: 20px; }
.btn-primary {
  width: 100%; background: #2e7d32; color: white; border: none;
  padding: 16px; border-radius: 12px; font-size: 16px; font-weight: bold; cursor: pointer;
}
.login-link { margin-top: 16px; color: #2e7d32; font-weight: bold; cursor: pointer; }
.login-link.center { text-align: center; color: #555; font-weight: 500; }
.login-link.center b { color: #2e7d32; font-weight: 700; cursor: pointer; }

.screen { display: none; }
.screen.active { display: block; }

label { display: block; text-align: left; font-weight: bold; margin: 12px 0 6px; font-size: 14px; }
input {
  width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 10px;
  font-size: 14px; margin-bottom: 4px;
}
.or-text { color: #888; font-size: 13px; margin: 16px 0; }

/* ===== AUTH SCREENS (Login / Signup / Forgot / OTP / Reset / Success) ===== */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
  color: #5b5b76; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 0 14px;
}

.field-error { color: #e2445c; font-size: 12px; margin-top: 5px; display: none; }
.field-error.show { display: block; }
input.error { border-color: #e2445c; background: #fef4f5; }

.social-row { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px; border: 1.5px solid #e6e5f0; border-radius: 10px;
  background: #fff; font-size: 13.5px; font-weight: 600; color: #1a1a2e; cursor: pointer;
}
.btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-social:hover { border-color: #2e7d32; background: #f7fbf7; }

.method-row { display: flex; gap: 10px; margin-top: 4px; }
.method-card {
  flex: 1; border: 1.5px solid #e6e5f0; border-radius: 12px; padding: 14px 10px;
  text-align: center; cursor: pointer;
}
.method-card.selected { border-color: #2e7d32; background: #eefaef; }
.method-card .icon { font-size: 20px; display: block; margin-bottom: 6px; }
.method-card .label { font-size: 12.5px; font-weight: 700; }
.method-card .sub { font-size: 10.5px; color: #888; margin-top: 2px; }

.otp-row { display: flex; gap: 8px; margin-top: 6px; }
.otp-box { width: 100%; aspect-ratio: 1; text-align: center; font-size: 19px; font-weight: 700; padding: 0; }
.otp-box.error { border-color: #e2445c; background: #fef4f5; }

.resend { text-align: center; font-size: 12.5px; color: #888; margin-top: 16px; }
.resend b { color: #2e7d32; cursor: pointer; }
.resend .timer { color: #aaa; }

.demo-note {
  margin-top: 14px; background: #fff8e6; border: 1px dashed #eecf7a;
  border-radius: 10px; padding: 9px 11px; font-size: 11.5px; color: #8a6d1f; text-align: center;
}

.success-wrap { text-align: center; padding: 14px 0 4px; }
.success-icon {
  width: 56px; height: 56px; border-radius: 50%; background: #e6f8f2; color: #1fa37a;
  display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 16px;
}

.strength { height: 4px; border-radius: 2px; background: #e6e5f0; margin-top: 8px; overflow: hidden; }
.strength-bar { height: 100%; width: 0%; background: #e2445c; transition: width .2s, background .2s; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1a1a2e; color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; white-space: nowrap; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== OLD ONBOARDING SCREENS (kept for reference, no longer used by HTML) ===== */
.onboarding-screen {
  background: linear-gradient(to bottom, #0d1b2a, #a9c9d9);
  min-height: 600px; border-radius: 24px; padding: 24px 20px; color: white;
}
.onboard-top { display: flex; justify-content: space-between; margin-bottom: 20px; }
.back-arrow, .skip-btn { background: rgba(0,0,0,0.3); padding: 6px 14px; border-radius: 20px; cursor: pointer; font-size: 14px; }
.step-counter { text-align: center; font-size: 13px; opacity: 0.8; margin-bottom: 8px; }
.onboard-title { text-align: center; font-size: 24px; margin-bottom: 8px; }
.highlight { color: #4dd0e1; }
.onboard-sub { text-align: center; font-size: 13px; opacity: 0.85; margin-bottom: 24px; }
.onboard-input {
  display: block; width: 100%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.4);
  color: white; text-align: center; padding: 16px; border-radius: 14px; font-size: 16px; margin-bottom: 30px;
}
.option-card {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 18px; border-radius: 14px; margin-bottom: 14px; cursor: pointer; font-size: 15px;
}
.option-card.selected { border-color: #4dd0e1; background: rgba(77,208,225,0.2); }
.next-circle {
  width: 60px; height: 60px; background: #4dd0e1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  margin: 20px auto 0; cursor: pointer; color: #0d1b2a;
}
.gender-row { display: flex; gap: 12px; }
.gender-card {
  flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 24px 0; border-radius: 14px; text-align: center; cursor: pointer; font-size: 15px;
}
.gender-card.selected { border-color: #4dd0e1; background: rgba(77,208,225,0.2); }
.loader-circle {
  width: 90px; height: 90px; background: #4dd0e1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  margin: 40px auto 20px;
}

/* ===== HOME SCREEN ===== */
.home-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.greeting { text-align: left; }
.greet-small { font-size: 13px; color: #666; }
.menu-icon, .bell-icon { font-size: 20px; }

.summary-card {
  background: white; border-radius: 16px; padding: 20px; text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 16px;
}
.summary-label { font-size: 13px; color: #666; margin-bottom: 12px; }
.cal-label { font-size: 13px; color: #888; }
.cal-row { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 8px; }
.cal-value { font-size: 20px; font-weight: bold; }
.cal-percent { color: #2e7d32; font-weight: bold; }

.progress-track { background: #eee; border-radius: 20px; height: 8px; overflow: hidden; margin-bottom: 16px; }
.progress-fill { background: #2e7d32; height: 100%; border-radius: 20px; }

.macros-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.macro { text-align: center; font-size: 12px; min-width: 0; }
.macro-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; }
.macro-icon.blue { background: #e3f2fd; }
.macro-icon.orange { background: #fff3e0; }
.macro-icon.purple { background: #f3e5f5; }
.macro-value { font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section-title { text-align: left; margin: 16px 0 8px; font-size: 16px; }
.meal-item {
  display: flex; justify-content: space-between; align-items: center;
  background: white; padding: 12px 16px; border-radius: 12px; margin-bottom: 8px;
  text-align: left; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.meal-kcal { color: #2e7d32; font-weight: bold; }
.meal-item-left { display: flex; align-items: center; gap: 10px; }
.meal-portion-info { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.35; }
#daily-meal-list .meal-item { gap: 12px; flex-wrap: wrap; }
#daily-meal-list .meal-item-left { min-width: 0; flex: 1 1 150px; }
.meal-item-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}

/* Today's Meals ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â recipe cards patterned after the supplied meal-plan reference. */
#home-meals-list { display: grid; gap: 10px; padding-bottom: 84px; }
.home-meal-card {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(31, 71, 45, .08);
  color: #17362d;
}
.home-meal-card:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(31, 71, 45, .13); }
.home-meal-label { display: block; margin: 0 0 8px 2px; font-size: 13px; font-weight: 800; color: #17362d; }
.home-meal-recipe {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border-radius: 13px;
  background: #f3f5f6;
}
.home-meal-thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  background: #dcefe1;
}
.home-meal-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.home-meal-thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 27px; }
.home-meal-thumb-fallback[hidden],
.recipe-library-emoji[hidden] { display: none; }
.home-meal-copy { min-width: 0; flex: 1; display: block; }
.home-meal-copy b { display: block; overflow: hidden; color: #17362d; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.home-meal-copy small { display: block; margin-top: 5px; color: #617069; font-size: 11.5px; line-height: 1.35; white-space: normal; }
.home-meal-copy small i { padding: 0 2px; color: #9aa69f; font-style: normal; }
.home-meal-open { color: #2e7d32; font-size: 24px; font-weight: 400; line-height: 1; }
.home-scanned-meal { cursor: default; }

/* ===== ONBOARDING (white/green style) ===== */
.onb-screen { background: white; text-align: left; }
.onb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.onb-back { font-size: 20px; cursor: pointer; }
.onb-back-label { font-size: 14px; font-weight: 700; color: #2e7d32; }
.onb-title { font-weight: 700; font-size: 15px; }
.skip-text { color: #2e7d32; font-weight: bold; cursor: pointer; font-size: 14px; }
.onb-step { font-size: 13px; color: #888; margin-bottom: 4px; }
.onb-question { font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.onb-input {
  padding: 16px; border: 1px solid #ddd; border-radius: 12px; font-size: 15px; margin-bottom: 20px;
}
.onb-food-img { width: 100%; border-radius: 16px; margin-bottom: 16px; }
.onb-progress-bg { background: #eee; height: 6px; border-radius: 10px; overflow: hidden; margin-top: 20px; }
.onb-progress-fill { background: #2e7d32; height: 100%; border-radius: 10px; width: 12.5%; transition: width .3s; }

.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.gender-grid { display: flex; gap: 12px; margin-bottom: 20px; }
.goal-card {
  border: 1.5px solid #ddd; border-radius: 16px; padding: 20px 10px; text-align: center;
  position: relative; cursor: pointer; flex: 1;
}
.goal-card.selected { border-color: #2e7d32; background: #f0f7f0; }
.goal-check {
  position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid #ccc; font-size: 11px; color: transparent; display: flex; align-items: center; justify-content: center;
}
.goal-card.selected .goal-check { background: #2e7d32; border-color: #2e7d32; color: white; }
.goal-icon { font-size: 28px; margin-bottom: 10px; }

.dob-preview {
  text-align: center; padding: 16px; border: 1px solid #ddd; border-radius: 12px; font-weight: bold; margin-bottom: 20px;
}

.slider-display { text-align: center; font-size: 28px; font-weight: 800; margin: 20px 0 10px; }

/* ===== SLIDER (visible track + thumb across browsers) ===== */
.onb-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: #ddd;
  margin-bottom: 24px;
  cursor: pointer;
}
.onb-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2e7d32;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.onb-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2e7d32;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.onb-slider::-moz-range-track {
  height: 6px;
  border-radius: 10px;
  background: #ddd;
}

.unit-toggle { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.unit-btn { padding: 8px 20px; border: 1px solid #ddd; border-radius: 20px; background: white; cursor: pointer; }
.unit-btn.active { background: #2e7d32; color: white; border-color: #2e7d32; }
.compare-text { text-align: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.green-text { color: #2e7d32; font-weight: bold; }

.pace-card {
  display: flex; align-items: center; gap: 14px; border: 1px solid #ddd; border-radius: 16px;
  padding: 16px; margin-bottom: 12px; cursor: pointer;
}
.pace-card.selected { border-color: #2e7d32; background: #f0f7f0; }
.pace-icon {
  width: 44px; height: 44px; background: #e6f4ea; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.pace-title { font-weight: 700; font-size: 15px; }
.pace-sub { font-size: 12px; }
.pace-sub.red { color: #d32f2f; }
.pace-sub.yellow { color: #f9a825; }

.allset-title { color: #2e7d32; font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.allset-heading { font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid #f0f0f0; }

.allset-decor {
  text-align: center;
  font-size: 22px;
  margin-bottom: 8px;
  letter-spacing: 6px;
}
.allset-screen .summary-card {
  background: white;
  border: 1px solid #eee;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  margin: 10px 0 24px;
}
.allset-screen .summary-row:last-child {
  border-bottom: none;
}
.allset-screen .summary-row span:last-child {
  margin-left: 12px;
  text-align: right;
}

.bottom-nav {
  display: flex; justify-content: space-around; margin-top: 20px;
  border-top: 1px solid #eee; padding-top: 10px;
}
.nav-item { text-align: center; font-size: 11px; color: #999; cursor: pointer; }
.nav-item .nav-icon { display: block; font-size: 18px; margin-bottom: 2px; }
.nav-item.active { color: #2e7d32; font-weight: bold; }
.toggle-row { display: flex; gap: 8px; margin-bottom: 16px; }

#chat-messages { max-height: 420px; overflow-y: auto; margin-bottom: 12px; text-align: left; }
.chat-bubble {
  padding: 12px 16px; border-radius: 14px; max-width: 80%;
  margin-bottom: 10px; font-size: 14px; line-height: 1.4;
}
.chat-bubble.bot { background: #f0f0f0; color: #222; }
.chat-bubble.user { background: #2e7d32; color: white; margin-left: auto; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input {
  flex: 1; padding: 12px 16px; border-radius: 24px; border: 1px solid #ddd; margin-bottom: 0;
}
.chat-send-btn {
  background: #2e7d32; color: white; border: none; width: 44px; height: 44px;
  border-radius: 50%; font-size: 16px; cursor: pointer; flex-shrink: 0;
}

.pantry-filter-row { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.pantry-item {
  display: flex; justify-content: space-between; align-items: center;
  background: white; padding: 12px 16px; border-radius: 12px; margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04); text-align: left;
}
.pantry-item small { color: #999; }
.pantry-item.expired small { color: #e2445c; font-weight: bold; }
.pantry-item.expiring small { color: #f9a825; font-weight: bold; }
.pantry-item-right { text-align: right; flex-shrink: 0; font-size: 13.5px; }
.pantry-price { color: #2e7d32; font-weight: 700; }

.shop-category { font-weight: bold; color: #2e7d32; margin: 14px 0 8px; text-align: left; font-size: 14px; }
.shop-item {
  display: flex; align-items: center; gap: 10px;
  background: white; padding: 10px 14px; border-radius: 10px; margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04); text-align: left;
}
.shop-item input[type="checkbox"] { width: auto; margin: 0; }
.shop-item .item-name { flex: 1; font-size: 14px; }
.shop-item .item-qty { font-size: 12px; color: #888; }
.shop-item .item-price { font-weight: bold; font-size: 14px; }
.shop-item.checked .item-name { text-decoration: line-through; color: #aaa; }
.shopping-summary { margin: 16px 0; text-align: left; }
.savings-line { color: #2e7d32; font-size: 13px; margin-top: 4px; }

.budget-total-row { font-size: 28px; font-weight: 800; margin-bottom: 2px; }
.budget-of { font-size: 16px; color: #888; font-weight: normal; }
.budget-percent { text-align: right; font-size: 13px; color: #2e7d32; font-weight: bold; margin-top: 4px; }

.pie-row { display: flex; align-items: center; gap: 20px; margin: 16px 0; }
.pie-chart {
  width: 110px; height: 110px; border-radius: 50%; flex-shrink: 0;
}
.pie-legend { flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-label { flex: 1; }
.legend-amount { font-weight: bold; }

.budget-stats-row { display: flex; gap: 12px; margin: 16px 0; }
.budget-stat {
  flex: 1; background: white; padding: 14px; border-radius: 12px;
  text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ai-tip-box {
  background: #fff8e6; border: 1px dashed #eecf7a; border-radius: 12px;
  padding: 14px; font-size: 13px; color: #6b5a1f; text-align: left; margin-top: 8px;
}

.btn-outline {
  width: 100%; background: white; color: #222; border: 1px solid #ddd;
  padding: 14px; border-radius: 12px; font-size: 14px; font-weight: bold; cursor: pointer; margin-bottom: 16px;
}
.premium-banner {
  display: flex; align-items: center; gap: 10px; background: #fff8e6; border: 1px solid #eecf7a;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
}
.premium-icon { font-size: 22px; }
.premium-text { flex: 1; }
.premium-title { font-weight: bold; font-size: 14px; }
.premium-sub { font-size: 12px; color: #8a6d1f; }
.manage-btn { background: white; border: 1px solid #2e7d32; color: #2e7d32; padding: 6px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; }

.profile-list { background: white; border-radius: 12px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.profile-list-item {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  border-bottom: 1px solid #f0f0f0; cursor: pointer;
}
.profile-list-item:last-child { border-bottom: none; }
.pl-icon { font-size: 18px; width: 26px; flex-shrink: 0; text-align: center; display: inline-block; }
.pl-label { flex: 1; font-size: 14px; }
.pl-value { font-size: 12px; color: #999; }
#profile-screen > .profile-list .pl-value { display: none; }
.pl-arrow { color: #ccc; font-size: 18px; flex-shrink: 0; }

/* ===== Refer & Earn ===== */
.referral-hero-card {
  background: linear-gradient(135deg, #2e7d32, #66bb6a); color: white; border-radius: 16px;
  padding: 20px 18px; text-align: center; margin-bottom: 14px;
}
.referral-hero-emoji { font-size: 32px; margin-bottom: 6px; }
.referral-hero-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; }
.referral-hero-sub { font-size: 13px; opacity: 0.92; margin: 0; line-height: 1.4; }

.referral-wallet-card {
  display: flex; justify-content: space-between; align-items: center; background: #fff8e6;
  border: 1px solid #eecf7a; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; font-weight: 600; font-size: 13.5px;
}
.referral-wallet-amount { font-size: 20px; font-weight: 800; color: #8a6d1f; }

.referral-code-card { background: white; border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.referral-code-label { font-size: 12.5px; color: #888; margin: 0 0 8px; }
.referral-code-row { display: flex; gap: 8px; margin-bottom: 12px; }
.referral-code-text {
  flex: 1; background: #f7f7f9; border: 1px dashed #ccc; border-radius: 10px; padding: 10px 14px;
  font-weight: 800; letter-spacing: 1px; font-size: 15px; text-align: center;
}
.referral-copy-btn { background: #2e7d32; color: white; border: none; border-radius: 10px; padding: 0 18px; font-weight: 700; cursor: pointer; }

.referral-upi-card { background: white; border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.referral-upi-input { flex: 1; margin: 0 !important; }
.referral-upi-status { font-size: 12px; color: #999; margin: 0; }

.referral-steps-card { background: white; border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.referral-steps-title { font-weight: 700; font-size: 14px; margin: 0 0 10px; }
.referral-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #444; margin-bottom: 8px; }
.referral-step:last-child { margin-bottom: 0; }
.referral-step-num {
  width: 22px; height: 22px; border-radius: 50%; background: #e6f4ea; color: #2e7d32;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0;
}

.referral-list-header { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; }
.referral-status { font-size: 11.5px; }
.referral-status.pending { color: #b26a00; }
.referral-status.subscribed { color: #2e7d32; font-weight: 600; }
.referral-disclaimer { font-size: 10.5px; color: #999; line-height: 1.4; margin-top: 12px; text-align: center; }

.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  background: white; padding: 14px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 14px;
}
.settings-row input[type="checkbox"] { width: auto; margin: 0; }

.faq-item {
  background: white; padding: 14px; border-radius: 10px; margin-bottom: 10px; text-align: left;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.home-menu {
  display: none; position: absolute; top: 70px; left: 30px;
  background: white; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 20; width: 200px; overflow: hidden;
}
.home-menu.open { display: block; }
.menu-item {
  padding: 14px 16px; font-size: 14px; text-align: left; cursor: pointer; border-bottom: 1px solid #f0f0f0;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #f7f7f7; }

/* ===== Wishlist ===== */
.wishlist-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.wishlist-back-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #edf5ee;
  color: #1a4220;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}
.wishlist-header p {
  margin: 0 0 2px;
  color: #5e8062;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
}
.wishlist-header h1 {
  margin: 0;
  color: #1a4220;
  font-size: 28px;
}
.wishlist-intro {
  margin: 0 0 20px;
  color: #607164;
  font-size: 14px;
  line-height: 1.45;
}
.wishlist-recipes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 20px;
}
.wishlist-empty {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #607164;
}
.wishlist-empty > span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #edf5ee;
  color: #2e7d32;
  font-size: 42px;
}
.wishlist-empty h2 { margin: 0 0 8px; color: #1a4220; font-size: 20px; }
.wishlist-empty p { margin: 0 0 20px; max-width: 240px; line-height: 1.45; }
.wishlist-empty .btn-primary { width: auto; padding: 12px 22px; }

/* ===== Onboarding chips (Cuisine / Dislikes / Kitchen) ===== */
.cuisine-grid, .kitchen-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.chip {
  padding: 10px 16px; border: 1.5px solid #ddd; border-radius: 20px;
  cursor: pointer; font-size: 13.5px; background: white; user-select: none;
}
.chip.selected {
  background: #2e7d32; color: white; border-color: #2e7d32; font-weight: 600;
}

/* ===== Budget slider screen ===== */
.budget-value {
  text-align: center; font-size: 34px; font-weight: 800; color: #2e7d32; margin: 10px 0 4px;
}
.budget-presets {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; justify-content: center;
}
.preset-btn {
  padding: 8px 16px; border: 1px solid #ddd; border-radius: 20px; background: white; cursor: pointer; font-size: 13px;
}
.preset-btn.active { background: #2e7d32; color: white; border-color: #2e7d32; }

/* ===== Dislikes screen ===== */
.dislike-input-row, .kitchen-add-row {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.dislike-input-row input, .kitchen-add-row input { margin-bottom: 0; }
.add-chip-btn {
  background: #2e7d32; color: white; border: none; border-radius: 10px;
  padding: 0 16px; font-weight: bold; cursor: pointer; flex-shrink: 0;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip.dislike-chip { background: #fef4f5; border-color: #f3c6cc; color: #b23a4a; }
.chip.dislike-chip.selected { background: #e2445c; color: white; border-color: #e2445c; }
.chip-remove { margin-left: 6px; font-weight: bold; }

/* ===== Profile photo ===== */
.loader-circle img, .avatar-edit-circle img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.avatar-edit-wrap { text-align: center; margin: 10px 0 20px; }
.avatar-edit-circle {
  width: 90px; height: 90px; border-radius: 50%; background: #e6f4ea; color: #2e7d32;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  margin: 0 auto; position: relative; cursor: pointer; overflow: hidden;
}
.avatar-cam-badge {
  position: absolute; bottom: -2px; right: -2px; background: #2e7d32; color: white;
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; border: 2px solid white;
}

/* ===== Plan screen ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â BudgetÃƒÂ¢Ã¢â‚¬Â Ã¢â‚¬â„¢Plate cost summary ===== */
.plan-total-row {
  display: flex; justify-content: space-between; align-items: center;
  background: white; padding: 14px 16px; border-radius: 12px; margin: 4px 0 8px;
  font-weight: bold; font-size: 15px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.budget-note {
  font-size: 12.5px; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600;
}
.budget-note.over { background: #fef4f5; color: #b23a4a; border: 1px dashed #f3c6cc; }
.budget-note.ok { background: #eefaef; color: #2e7d32; border: 1px dashed #bfe3c2; }

/* ===== Make Cheaper screen ===== */
.cheaper-label { font-size: 13px; color: #888; margin-bottom: 6px; }
.cheaper-card {
  display: flex; justify-content: space-between; align-items: center;
  background: white; border: 1.5px solid #eee; border-radius: 14px; padding: 16px;
  margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); font-size: 14px;
}
.cheaper-card.alt { border-color: #2e7d32; background: #f0f7f0; }
.cheaper-price { font-weight: 800; font-size: 16px; }
.cheaper-price.green { color: #2e7d32; }
.cheaper-arrow { text-align: center; font-size: 20px; color: #999; margin-bottom: 14px; }
.cheaper-savings-box {
  text-align: center; background: #eefaef; border-radius: 14px; padding: 16px; margin-bottom: 16px;
}
.cheaper-savings-label { font-size: 12px; color: #2e7d32; font-weight: 700; letter-spacing: 0.5px; }
.cheaper-savings-amount { font-size: 28px; font-weight: 800; color: #2e7d32; }
.cheaper-protein-row {
  display: flex; justify-content: space-between; background: white; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 20px; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ===== Use My Kitchen ===== */
.kitchen-suggest-card {
  background: #f0f7f0; border: 1px dashed #bfe3c2; border-radius: 14px;
  padding: 14px 16px; margin: 4px 0 16px; text-align: left;
}
.kitchen-suggest-title { font-weight: 700; font-size: 14px; color: #2e7d32; margin-bottom: 10px; }
.kitchen-suggest-header { display: flex; justify-content: space-between; align-items: center; }
.kitchen-suggest-header .kitchen-suggest-title { margin-bottom: 0; }
.shuffle-btn {
  background: white; border: 1px solid #cfe8d1; border-radius: 8px; padding: 4px 8px;
  font-size: 13px; cursor: pointer; margin-bottom: 10px;
}
.kitchen-suggestion-item {
  display: flex; justify-content: space-between; align-items: center;
  background: white; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  font-size: 13.5px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.kitchen-suggestion-item.clickable { cursor: pointer; }
.kitchen-suggest-note { font-size: 12px; color: #2e7d32; margin-top: 4px; font-weight: 600; }

/* ===== Recipe library ===== */
.recipe-library-btn { width: 100%; margin: 0 0 16px; }
.recipe-library-intro { text-align: left; margin: 4px 0 14px; }
.recipe-filter-group { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.recipe-filter-group::-webkit-scrollbar { display: none; }
.recipe-filter { flex: 0 0 auto; border: 1px solid #cfe8d1; border-radius: 999px; background: #fff; color: #39733d; padding: 8px 11px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.recipe-filter.active { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.recipe-library-list { display: grid; gap: 10px; padding-bottom: 14px; }
.recipe-library-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid #e2eee3; border-radius: 14px; background: #fff; padding: 12px; cursor: pointer; box-shadow: 0 2px 8px rgba(26, 83, 33, .05); }
.recipe-library-card:hover { border-color: #99ca9d; transform: translateY(-1px); }
.recipe-library-thumb { position: relative; width: 52px; height: 52px; flex: 0 0 52px; overflow: hidden; display: grid; place-items: center; border-radius: 12px; background: #edf7ee; }
.recipe-library-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.recipe-library-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 25px; }
.recipe-library-info { min-width: 0; flex: 1; }
.recipe-library-name { display: block; color: #234b28; font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.recipe-library-meta { display: block; color: #6d806e; font-size: 12px; line-height: 1.35; }
.recipe-library-open { color: #2e7d32; font-size: 18px; font-weight: 800; }

.already-have-card {
  background: white; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
  text-align: left; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.already-have-label { font-size: 12.5px; color: #888; margin-bottom: 4px; }
.already-have-items { font-weight: 700; font-size: 14px; color: #2e7d32; }

/* ===== Smart Scanner ===== */
.scan-mode-toggle { display: flex; gap: 6px; margin: 0 0 12px; background: #e8f1e8; padding: 4px; border-radius: 12px; }
.scan-mode-btn { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 10px 6px; color: #56805a; font-size: 12px; font-weight: 700; cursor: pointer; }
.scan-mode-btn.active { background: white; color: #2e7d32; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.package-scan-intro { flex-direction: column; gap: 3px; text-align: left; background: #f0f7f0; border: 1px dashed #bfe3c2; border-radius: 12px; padding: 11px 13px; margin-bottom: 10px; color: #2e7d32; font-size: 13px; }
.package-scan-intro span { color: #666; font-size: 11.5px; line-height: 1.45; }
.barcode-frame { position: relative; height: 92px; margin: -112px 22px 20px; border: 2px solid #fff; border-radius: 10px; z-index: 1; pointer-events: none; box-shadow: 0 0 0 999px rgba(0,0,0,.18); }
.barcode-frame span { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #e2445c; box-shadow: 0 0 8px #e2445c; }

.scan-status { font-size: 12.5px; color: #555; margin-top: 10px; text-align: left; line-height: 1.45; }
.scan-limit-note { font-size: 12px; color: #2e7d32; margin: 4px 0 10px; text-align: left; font-weight: 600; }

.scan-progress-track { height: 5px; background: #e8f1e8; border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.scan-progress-fill { height: 100%; width: 0%; background: #2e7d32; border-radius: 6px; transition: width .25s; }

.manual-barcode-wrap {
  background: white; border: 1px solid #eee; border-radius: 14px; padding: 14px;
  text-align: left; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.manual-barcode-wrap label { margin-top: 0; }
.manual-barcode-row { display: flex; gap: 8px; }
.manual-barcode-row input { margin-bottom: 0; }
.link-btn {
  background: none; border: none; color: #2e7d32; font-weight: 700; font-size: 12.5px;
  cursor: pointer; padding: 10px 0 0; text-align: left;
}

/* Full-screen camera treatment for the grocery barcode scanner. */
#scan-screen { position: relative; min-height: min(720px, calc(100vh - 40px)); padding-bottom: 88px; color: #fff; overflow: hidden; }
#scan-screen::before { content: ''; position: absolute; z-index: -2; inset: -30px -20px 0; background: #111 url('https://images.unsplash.com/photo-1604719312566-8912e9227c6a?auto=format&fit=crop&w=900&q=70') center/cover; }
#scan-screen::after { content: ''; position: absolute; z-index: -1; inset: -30px -20px 0; background: rgba(4,9,7,.78); backdrop-filter: blur(3px); }
.scanner-topbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 52px; margin: -8px -4px 12px; }
.scanner-title { font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.scanner-icon-btn, .scanner-flash-btn { width: 43px; height: 43px; border: 0; border-radius: 50%; background: rgba(0,0,0,.52); color: #fff; font-size: 27px; line-height: 1; cursor: pointer; }
.scanner-icon-btn:last-child { font-size: 25px; }
#scan-screen .scan-mode-toggle { background: rgba(255,255,255,.13); }
#scan-screen .scan-mode-btn { color: rgba(255,255,255,.72); }
#scan-screen .scan-mode-btn.active { background: rgba(255,255,255,.94); color: #278637; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.scanner-camera-shell { position: relative; min-height: 410px; margin: 0 -20px; overflow: hidden; background: #0a0a0a; }
.scanner-camera-shell video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0b0b0b; }
.scanner-camera-shade { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(0,0,0,.32),rgba(0,0,0,.1) 32%,rgba(0,0,0,.58)); pointer-events: none; }
.scanner-flash-btn { position: absolute; top: 18px; left: 22px; z-index: 3; font-size: 30px; font-weight: 300; }
#scan-screen .barcode-frame { position: absolute; width: min(78vw,280px); height: 260px; left: 50%; top: 49%; transform: translate(-50%,-50%); z-index: 2; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.frame-corner { position: absolute; width: 43px; height: 43px; border-color: #51cf62; border-style: solid; border-width: 0; filter: drop-shadow(0 0 3px rgba(81,207,98,.38)); }
.frame-corner.top-left { top: 0; left: 0; border-top-width: 5px; border-left-width: 5px; border-radius: 17px 0 0; }
.frame-corner.top-right { top: 0; right: 0; border-top-width: 5px; border-right-width: 5px; border-radius: 0 17px 0 0; }
.frame-corner.bottom-left { bottom: 0; left: 0; border-bottom-width: 5px; border-left-width: 5px; border-radius: 0 0 0 17px; }
.frame-corner.bottom-right { right: 0; bottom: 0; border-bottom-width: 5px; border-right-width: 5px; border-radius: 0 0 17px 0; }
#scan-screen .barcode-frame span { display: none; left: 9px; right: 9px; top: 50%; background: #51cf62; box-shadow: 0 0 12px #51cf62; animation: scanLine 2.1s ease-in-out infinite; }
.scanner-frame-copy { position: absolute; z-index: 3; inset: auto 18px 31px; color: #fff; font-size: 15px; font-weight: 700; text-shadow: 0 1px 3px #000; }
#scan-screen .package-scan-intro { text-align: center; background: rgba(35,117,48,.25); border: 1px solid rgba(126,226,138,.35); color: #eaffec; margin: 12px 0 4px; }
#scan-screen .package-scan-intro span { color: rgba(255,255,255,.78); }
.scanner-actions { display: grid; grid-template-columns: 1fr 100px 1fr; align-items: center; gap: 12px; margin: 18px 5px 12px; }
.scanner-action { border: 0; background: transparent; color: #fff; display: grid; place-items: center; gap: 4px; font-size: 12px; font-weight: 700; cursor: pointer; }
.scanner-action span { font: 26px/1 Arial,sans-serif; }
.scanner-shutter { width: 92px; height: 92px; margin: 0 auto; border: 5px solid #fff; border-radius: 50%; background: transparent; padding: 5px; cursor: pointer; }
.scanner-shutter i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.scanner-secondary-action { display: none; }
@keyframes scanLine { 50% { transform: translateY(92px); opacity: .7; } }
#scan-screen .scan-status { color: rgba(255,255,255,.82); text-align: center; }
#scan-screen .scan-limit-note { color: #a8efb0; text-align: center; }
#scan-screen .bottom-nav { position: absolute; z-index: 5; left: -20px; right: -20px; bottom: 0; margin: 0; background: rgba(255,255,255,.97); }
#scan-screen .manual-barcode-wrap { color: #222; }
#scan-screen .scan-today-card, #scan-screen .shop-category { color: #fff; }
@media (max-height: 700px) { .scanner-camera-shell { min-height: 330px; } #scan-screen .barcode-frame { height: 220px; } .scanner-shutter { width: 78px; height: 78px; } }

/* Scanner option groups: Food is deliberately limited to Photo / Photo & Hint;
   the Barcode, Label and Menu choices live only under Grocery. */
#scan-screen .scanner-submode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  background: rgba(0,0,0,.25);
}
#scan-screen .scanner-submode-btn {
  flex: 1;
  min-width: 0;
  padding: 9px 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
#scan-screen .scanner-submode-btn.active {
  background: #fff;
  color: #278637;
  box-shadow: 0 1px 5px rgba(0,0,0,.2);
}
#scan-screen .scanner-submode-toggle-menu { max-width: 290px; margin-left: auto; margin-right: auto; }
#scan-screen .scanner-inline-field {
  margin: -2px 0 10px;
  padding: 11px 12px;
  border: 1px solid rgba(159,233,170,.36);
  border-radius: 12px;
  background: rgba(18,64,28,.38);
  text-align: left;
}
#scan-screen .scanner-inline-field label {
  display: block;
  margin: 0 0 6px;
  color: #effff0;
  font-size: 12px;
  font-weight: 800;
}
#scan-screen .scanner-inline-field input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: 13px;
}
#scan-screen .scanner-inline-field input::placeholder { color: rgba(255,255,255,.62); }
#scan-screen .scanner-inline-field small { display: block; margin-top: 6px; color: rgba(255,255,255,.75); font-size: 10.5px; line-height: 1.35; }
#scan-screen .menu-website-row { display: flex; gap: 7px; }
#scan-screen .menu-website-row input { min-width: 0; }
#scan-screen .menu-website-row .add-chip-btn { flex: 0 0 auto; margin: 0; padding: 0 11px; }
.menu-results-list { display: grid; gap: 10px; margin: 14px 0 18px; }
.menu-result-card { padding: 14px; border: 1px solid #e1ebe2; border-radius: 14px; background: #fff; text-align: left; box-shadow: 0 2px 7px rgba(0,0,0,.04); }
.menu-result-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.menu-result-name { margin: 0; color: #1b3f21; font-size: 15px; font-weight: 800; line-height: 1.3; }
.menu-result-price { flex: 0 0 auto; color: #4e7654; font-size: 12px; font-weight: 800; }
.menu-result-note { margin: 5px 0 0; color: #657567; font-size: 12px; line-height: 1.4; }
.menu-result-card .add-chip-btn { margin: 10px 0 0; }
.menu-results-empty { margin: 16px 0; padding: 18px 14px; border: 1px dashed #b5cdb8; border-radius: 14px; color: #58705b; font-size: 13px; line-height: 1.5; background: #f5faf5; }
.menu-review-copy { margin: 5px 0 8px; }

/* ===== Grocery package review ===== */
#package-review-screen { background: #101010; color: #f7f7f7; padding: 22px 20px 32px; }
#package-review-screen .onb-header { color: #fff; margin-bottom: 18px; }
#package-review-screen .onb-back { color: #fff; }
#package-review-screen .onb-title { color: #fff; font-size: 21px; font-weight: 800; }
.food-label-card { text-align: left; color: #fff; background: #050505; border: 1px solid #303030; border-radius: 14px; padding: 16px 14px 12px; box-shadow: 0 10px 28px rgba(0,0,0,.27); }
.food-label-product { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: start; margin-bottom: 15px; }
.food-label-product-icon, .food-label-image { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: #efcf82; color: #38230d; display: grid; place-items: center; font-size: 26px; }
.food-label-product h2 { font-size: 17px; line-height: 1.2; margin: 1px 0 5px; }
.food-label-product p { color: #c6c6c6; font-size: 12px; line-height: 1.3; }
.food-label-grade { min-width: 44px; text-align: center; }
.food-label-grade span { display: block; color: #e4e4e4; font-size: 10px; font-weight: 700; }
.food-label-grade b { display: block; margin-top: 3px; color: #ef6359; font-size: 27px; line-height: 1; }
.food-label-grade b.grade-a, .food-label-grade b.grade-b { color: #55d86a; }
.food-label-grade b.grade-c { color: #f8c34b; }
.food-label-serving { display: flex; justify-content: space-between; align-items: center; color: #43d35c; border-bottom: 5px solid #454545; padding: 0 0 10px; font-size: 16px; font-weight: 800; }
.food-label-serving b { color: #68c5ff; }
.food-label-table-note { display: grid; grid-template-columns: 1fr 76px 44px; gap: 8px; padding: 15px 0 8px; color: #fff; font-size: 11px; font-weight: 800; }
.food-label-table-note span { text-align: right; }
.food-label-table { font-size: 13px; }
.food-label-row { display: grid; grid-template-columns: 1fr 76px 44px; gap: 8px; align-items: center; min-height: 32px; border-bottom: 1px solid #555; }
.food-label-row strong { font-weight: 700; }
.food-label-row b, .food-label-row em { text-align: right; font-style: normal; font-weight: 800; }
.food-label-row em { color: #bfeaff; font-size: 11px; }
.food-label-row.indented strong { padding-left: 15px; font-size: 11.5px; color: #ebebeb; }
.food-label-row.calories { min-height: 42px; font-size: 15px; }
.food-label-row.calories b { color: #fff; }
.food-label-barcode { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; color: #42d15b; font-size: 15px; font-weight: 800; }
.food-label-barcode b { text-align: right; word-break: break-all; }
.food-label-disclaimer { color: #b5b5b5; font-size: 9.5px; line-height: 1.35; margin-top: 11px; }
#package-review-screen .package-review-badge { margin-top: 13px; }
#package-review-screen .package-review-badge.matched { background: rgba(62,170,77,.2); color: #9af3a4; }
#package-review-screen .package-review-badge.partial { background: rgba(248,195,75,.15); color: #f8d77d; }
#package-review-screen .package-review-note { color: #d4d4d4; text-align: center; font-size: 12px; margin-bottom: 12px; }
.package-edit-details { background: #1b1b1b; border: 1px solid #363636; border-radius: 12px; padding: 11px 13px; margin: 10px 0 12px; text-align: left; }
.package-edit-details summary { cursor: pointer; color: #7dcfff; font-size: 13px; font-weight: 800; }
.package-edit-details label { color: #efefef; }
.package-edit-details input { background: #292929; border-color: #494949; color: #fff; }
#package-review-screen .package-source { color: #b9b9b9; text-align: center; }
#package-review-screen .package-raw-ocr { background: #1b1b1b; color: #fff; }
#package-review-screen .package-raw-ocr summary, #package-review-screen .package-raw-ocr pre { color: #ddd; }
.food-label-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.food-label-actions .btn-primary { background: #217d35; padding: 13px 8px; }
.food-label-actions .btn-outline { border-color: #54bff6; color: #79cfff; background: transparent; padding: 13px 8px; }
.package-review-badge { border-radius: 10px; padding: 10px 12px; font-size: 12px; font-weight: 700; margin-bottom: 10px; text-align: left; line-height: 1.4; }
.package-review-badge.matched { background: #eefaef; color: #2e7d32; }
.package-review-badge.partial { background: #fff8e6; color: #8a6d1f; }
.package-preview-img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.package-review-note { text-align: left; }
.package-source { color: #888; font-size: 11px; text-align: left; line-height: 1.4; margin: 12px 0 10px; }
.package-raw-ocr { background: #f7f7f9; border-radius: 12px; padding: 10px 12px; margin-bottom: 16px; text-align: left; }
.package-raw-ocr summary { font-size: 12.5px; font-weight: 700; color: #555; cursor: pointer; }
.package-raw-ocr pre {
  margin-top: 8px; font-size: 11px; color: #666; white-space: pre-wrap;
  word-break: break-word; font-family: inherit; line-height: 1.45; max-height: 160px; overflow-y: auto;
}

/* ===== Chat quick-action chips ===== */
.chat-quick-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.quick-chip {
  border: 1.5px solid #cfe8d1; background: #f0f7f0; color: #2e7d32;
  padding: 8px 12px; border-radius: 18px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.quick-chip:hover { background: #e2f0e3; }

/* ===== Who are you cooking for? ===== */
.cooking-for-heading { margin: 8px 0 24px; }
.cooking-for-title {
  display: block; font-size: 28px; font-weight: 800; color: #1a3c34; line-height: 1.15;
}
.cooking-for-title-accent {
  display: block; font-size: 26px; font-weight: 800; color: #17685f;
  font-style: italic; line-height: 1.15;
}
.cooking-for-cards {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px;
}
.cooking-for-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 72px; padding: 14px 16px;
  border: 1.5px solid #d5e9df; border-radius: 16px;
  background: #fff; cursor: pointer; font: inherit;
  text-align: left; transition: all .15s ease;
}
.cooking-for-card:hover { border-color: #62a98e; }
.cooking-for-card.selected {
  border-color: #17685f; background: #eef7f2;
  box-shadow: inset 0 0 0 1px #17685f;
}
.cooking-for-emoji {
  font-size: 36px; line-height: 1; flex-shrink: 0;
}
.cooking-for-label {
  flex: 1; font-size: 18px; font-weight: 700; color: #1a3c34;
}
.cooking-for-check {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #c5ddd3; display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; color: transparent; flex-shrink: 0;
  transition: all .15s ease;
}
.cooking-for-card.selected .cooking-for-check {
  background: #17685f; border-color: #17685f; color: #fff;
}
.cooking-for-continue {
  display: block; width: 100%; padding: 16px;
  border: none; border-radius: 14px;
  background: #17685f; color: #fff;
  font: inherit; font-size: 18px; font-weight: 700;
  cursor: pointer; text-align: center;
  margin-top: auto;
}
.cooking-for-continue:hover { background: #145c53; }

/* Legacy family styles kept for referral reuse */
.family-goal { color: #888; font-weight: 500; }
.family-member-row { flex-wrap: wrap; }
.family-member-actions { display: flex; gap: 6px; margin-left: 8px; }
.family-action-btn {
  background: white; border: 1px solid #eee; border-radius: 8px; padding: 4px 7px;
  font-size: 13px; cursor: pointer; line-height: 1;
}
.family-action-btn:hover { background: #f7f7f7; }

/* ===== Grocery Price Optimization ===== */
.compare-row {
  display: flex; flex-direction: column; background: white; padding: 10px 14px;
  border-radius: 10px; margin-bottom: 6px; font-size: 13.5px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.compare-row.best { border: 1.5px solid #2e7d32; background: #f0f7f0; }
.compare-row-top { display: flex; justify-content: space-between; align-items: center; }
.compare-row-top .cr-name { font-weight: 700; }
.compare-row-top .cr-total { font-weight: 700; }
.compare-row-breakdown {
  display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px;
  font-size: 11px; color: #888; font-weight: 400;
}
.compare-row-breakdown span.free { color: #2e7d32; font-weight: 600; }
.compare-buy-btn { margin-top: 8px; padding: 8px 0; font-size: 12.5px; }
.grocery-compare-note { font-size: 12.5px; color: #2e7d32; font-weight: 600; margin-top: 8px; }
.grocery-compare-disclaimer { font-size: 10.5px; color: #999; margin-top: 8px; line-height: 1.4; }
.live-price-header { display: flex; align-items: center; gap: 7px; padding: 9px 11px; margin-bottom: 9px; border-radius: 9px; background: #edf8f0; color: #246b35; font-size: 11.5px; font-weight: 600; }
.live-price-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #2e9b55; box-shadow: 0 0 0 3px rgba(46,155,85,.14); }
.compare-row-live { color: #2e7d32; font-size: 11px; font-weight: 700; }
.compare-row-detail { margin-top: 4px; color: #777; font-size: 11px; line-height: 1.35; }
.copy-list-btn { width: 100%; margin-top: 8px; padding: 8px 0; font-size: 12.5px; }

/* ===== Store price comparison ===== */
.price-compare-banner {
  width: 100%; display: flex; align-items: center; gap: 11px; margin: 12px 0 16px;
  padding: 13px; border: 1px solid #cbd7ff; border-radius: 14px; text-align: left;
  color: #17204b; background: linear-gradient(110deg, #f2f1ff, #f8fbff); cursor: pointer;
  box-shadow: 0 5px 16px rgba(75, 85, 180, .08);
}
.price-compare-icon {
  width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 12px;
  background: #5d5ce6; color: white; font-size: 20px; font-weight: 800;
}
.price-compare-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; font-size: 13px; }
.price-compare-copy small { color: #70758c; font-size: 11px; font-weight: 500; }
.price-compare-arrow { font-size: 22px; color: #5d5ce6; }
.compare-hub { margin-top: 2px; padding: 16px; border: 1px solid #e4e5ff; border-radius: 17px; background: linear-gradient(140deg, #fafaff, #f3f8ff); }
.compare-hub-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eyebrow { display: block; margin: 0 0 4px; color: #6564df; font-size: 10px; letter-spacing: .9px; font-weight: 800; }
.compare-hub h2, .item-compare-panel h2 { margin: 0; color: #171b38; font-size: 21px; letter-spacing: -.5px; }
.compare-close, .sheet-close { border: 0; background: #eceefa; color: #5d5ce6; cursor: pointer; }
.compare-close { width: 28px; height: 28px; border-radius: 50%; font-size: 21px; line-height: 1; }
.compare-intro { margin: 8px 0 13px; color: #687084; font-size: 12px; line-height: 1.45; }
.retailer-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.retailer-choice { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid #e1e3eb; border-radius: 10px; background: #fff; color: #45495b; cursor: pointer; text-align: left; font-size: 11px; }
.retailer-choice.selected { border-color: #6964e9; background: #f5f4ff; color: #34308e; font-weight: 700; }
.retailer-choice > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.retailer-choice i { margin-left: auto; font-style: normal; font-size: 14px; }
.retailer-mark { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 50%; background: var(--retailer-color); color: #fff; font-weight: 900; font-size: 14px; text-transform: lowercase; }
.comparison-location { margin: 0 0 10px; padding: 8px 10px; border-radius: 9px; background: #fff; color: #45495b; font-size: 11px; font-weight: 700; }
.comparison-total-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 57px; margin-top: 13px; padding: 10px 12px; border-radius: 12px; background: #5d5ce6; color: #fff; }
.comparison-total-card > div { display: grid; grid-template-columns: auto auto; column-gap: 7px; align-items: baseline; }
.comparison-total-card .total-label { grid-column: 1 / -1; margin-bottom: 3px; color: #dfe0ff; font-size: 9px; font-weight: 800; letter-spacing: .7px; }
.comparison-total-card b { font-size: 12px; }.comparison-total-card strong { font-size: 19px; }
.total-saving { padding: 5px 7px; border-radius: 7px; background: rgba(255,255,255,.17); font-size: 10px; font-weight: 700; text-align: right; }
.item-compare-row { padding: 12px 14px; border: 1px solid #ececf3; box-shadow: none; }
.item-best-line { display: flex; align-items: baseline; justify-content: space-between; margin-top: 9px; color: #6b7081; font-size: 12px; }
.item-best-line b { color: #4b48be; }.item-best-line strong { color: #1e2134; font-size: 16px; }
.compare-row-live { color: #7779a0; font-weight: 600; }
.compare-empty { padding: 14px; border-radius: 10px; background: #f8f8fb; color: #74798b; font-size: 12px; text-align: center; }
.item-compare-sheet { position: fixed; z-index: 200; inset: 0; visibility: hidden; pointer-events: none; }
.item-compare-sheet.open { visibility: visible; pointer-events: auto; }
.item-compare-backdrop { position: absolute; inset: 0; background: rgba(19, 23, 39, .54); opacity: 0; transition: opacity .2s ease; }
.item-compare-sheet.open .item-compare-backdrop { opacity: 1; }
.item-compare-panel { position: absolute; right: 0; bottom: 0; left: 0; max-width: 430px; margin: 0 auto; padding: 10px 22px 16px; border-radius: 23px 23px 0 0; background: #fff; box-shadow: 0 -8px 30px rgba(0,0,0,.14); transform: translateY(105%); transition: transform .25s ease; }
.item-compare-sheet.open .item-compare-panel { transform: translateY(0); }
.sheet-grabber { width: 42px; height: 4px; margin: 2px auto 16px; border-radius: 9px; background: #cdd0dc; }
.sheet-close { position: absolute; top: 21px; right: 19px; width: 28px; height: 28px; border-radius: 50%; font-size: 20px; }
.item-compare-quantities { display: flex; gap: 8px; margin: 15px 0; }
.quantity-option { padding: 8px 16px; border: 1.5px solid #5d5ce6; border-radius: 9px; background: #f7f7ff; color: #312e9b; font-size: 13px; }
.item-compare-options { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; }
.item-store-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid #eef0f5; border-radius: 12px; background: #fff; color: #25293b; cursor: pointer; text-align: left; text-decoration: none; }
.item-store-option:hover, .item-store-option:focus-visible { border-color: #5d5ce6; background: #f7f7ff; outline: none; }
.item-store-name { display: flex; flex: 1; flex-direction: column; font-size: 14px; font-weight: 700; }.item-store-name small { margin-top: 2px; color: #2a9b62; font-size: 10px; font-weight: 700; }
.store-open-label { color: #5d5ce6; font-size: 11px; font-weight: 700; white-space: nowrap; }
.item-sheet-footer { display: flex; align-items: center; gap: 10px; margin: 15px -22px -16px; padding: 12px 22px; border-top: 1px solid #eef0f4; background: #fff; }.item-sheet-footer span { flex: 1; color: #646a7d; font-size: 11px; line-height: 1.35; }.item-sheet-footer .btn-primary { width: auto; margin: 0; padding: 11px 14px; white-space: nowrap; background: #5d5ce6; }

/* ===== Smart shopping ===== */
#shopping-screen { padding-bottom: 86px; }
.smart-shop-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.smart-location { display: flex; align-items: center; min-width: 0; gap: 8px; border: 0; background: transparent; color: #252941; cursor: pointer; font-size: 12px; font-weight: 700; text-align: left; }
.smart-location span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.smart-location span:first-child { color: #635be6; font-size: 20px; }.smart-location b { color: #7779a0; font-size: 14px; }
.smart-cart-button { position: relative; width: 39px; height: 39px; border: 0; border-radius: 13px; color: #fff; background: #171b38; font-size: 17px; cursor: pointer; }.smart-cart-button em { position: absolute; top: -5px; right: -5px; display: grid; min-width: 18px; height: 18px; place-items: center; border: 2px solid #f0f7f0; border-radius: 50%; background: #159866; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.smart-hero { position: relative; isolation: isolate; overflow: hidden; padding: 21px 18px 18px; border-radius: 22px; text-align: left; color: #fff; background: linear-gradient(132deg, #182a68 0%, #5147bd 50%, #7468ed 100%); box-shadow: 0 15px 30px rgba(55,51,147,.19); }.smart-hero::after { position: absolute; z-index: -1; right: -55px; bottom: -75px; width: 210px; height: 210px; border: 30px solid rgba(255,255,255,.1); border-radius: 50%; content: ''; }.smart-hero-glow { position: absolute; z-index: -1; border-radius: 50%; background: rgba(108,244,180,.2); filter: blur(4px); }.glow-one { top: -75px; right: 20px; width: 135px; height: 135px; }.glow-two { bottom: -50px; left: 12px; width: 100px; height: 100px; background: rgba(255,209,88,.16); }
.smart-kicker, .smart-section-title span, .manager-heading span { display: block; color: #bfdbff; font-size: 9px; font-weight: 800; letter-spacing: 1.15px; }.smart-hero h1 { margin: 6px 0 4px; font-size: 31px; line-height: .98; letter-spacing: -1.2px; }.smart-hero p { margin: 0; color: #e9e8ff; font-size: 12px; }.smart-store-pills { display: flex; align-items: center; min-height: 32px; margin: 13px 0 12px; }.smart-store-pills > span { margin-right: -6px; }.smart-store-pills .retailer-mark { border: 2px solid #5147bd; }.smart-store-pills small { margin-left: 13px; color: #fff; font-size: 10.5px; font-weight: 700; }
.smart-search { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 13px; border-radius: 12px; background: #fff; color: #625ce3; }.smart-search > span { font-size: 23px; line-height: 1; transform: rotate(-15deg); }.smart-search input { min-width: 0; margin: 0; padding: 9px 0; border: 0; color: #252941; font-size: 12.5px; outline: 0; }.smart-search input::placeholder { color: #8b8da4; }.smart-search button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: #f0efff; color: #5952d9; font-size: 19px; cursor: pointer; }
.connect-strip { display: flex; align-items: center; width: 100%; gap: 11px; margin: 13px 0 20px; padding: 10px 12px; border: 1px solid #e3e1ff; border-radius: 14px; background: #f8f7ff; color: #27264e; text-align: left; cursor: pointer; }.store-stack { display: flex; align-items: center; min-width: 73px; }.store-stack .retailer-mark { margin-right: -8px; border: 2px solid #f8f7ff; }.empty-store-stack { display: grid; width: 30px; height: 30px; place-items: center; border: 1px dashed #9f9bdc; border-radius: 50%; color: #655ee5; font-size: 19px; }.connect-strip > span:nth-child(2) { display: grid; flex: 1; gap: 3px; min-width: 0; }.connect-strip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.connect-strip small { color: #72748b; font-size: 10px; }.connect-strip i { color: #625ce3; font-size: 24px; font-style: normal; }
.smart-section-title { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 11px; text-align: left; }.smart-section-title span, .manager-heading span { color: #7774c5; }.smart-section-title h2, .manager-heading h2 { margin: 3px 0 0; color: #20233a; font-size: 19px; letter-spacing: -.5px; }.smart-section-title button { border: 0; background: transparent; color: #5c55d6; font-size: 11.5px; font-weight: 800; cursor: pointer; }.smart-popular-title { margin-top: 22px; }
.smart-category-row { display: flex; gap: 8px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }.smart-category-row::-webkit-scrollbar { display: none; }.smart-category-row button { display: grid; place-items: center; flex: 0 0 70px; gap: 4px; min-height: 63px; padding: 7px 4px; border: 1px solid #e8e9f0; border-radius: 14px; background: #fff; color: #626577; font-size: 10px; cursor: pointer; }.smart-category-row button span { font-size: 20px; }.smart-category-row button.active { border-color: #625ce3; background: #f2f1ff; color: #514bbf; font-weight: 800; box-shadow: 0 4px 11px rgba(88,82,210,.11); }
.smart-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }.smart-product-card { overflow: hidden; border: 1px solid #eaebf0; border-radius: 15px; background: #fff; text-align: left; box-shadow: 0 4px 13px rgba(31,38,66,.04); }.product-image-button { position: relative; display: block; width: 100%; height: 114px; padding: 0; border: 0; background: #eff0ef; cursor: pointer; }.product-image-button img { width: 100%; height: 100%; object-fit: cover; }.match-chip { position: absolute; right: 6px; bottom: 6px; padding: 4px 6px; border-radius: 6px; background: rgba(22,34,55,.8); color: #fff; font-size: 8.5px; font-weight: 800; }.product-info { position: relative; min-height: 126px; padding: 9px 9px 39px; }.product-qty { color: #9a9cad; font-size: 10px; }.product-info h3 { min-height: 31px; margin: 3px 0; color: #303345; font-size: 12.5px; line-height: 1.22; }.product-info p { margin: 0; color: #8b8d9c; font-size: 9.5px; }.product-info p b { color: #202336; font-size: 15px; }.product-info > small { display: block; overflow: hidden; margin-top: 2px; color: #3c9c69; font-size: 8.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.add-smart-product { position: absolute; right: 9px; bottom: 8px; left: 9px; padding: 7px; border: 1px solid #625ce3; border-radius: 8px; background: #fff; color: #5952d9; font-size: 10.5px; font-weight: 800; cursor: pointer; }.add-smart-product.in-cart { border-color: #159866; background: #eaf8f1; color: #10774e; }
.smart-search-area { margin-top: 3px; }.smart-empty { grid-column: 1 / -1; padding: 22px 12px; border: 1px dashed #cfd1e1; border-radius: 13px; color: #77798b; font-size: 12px; line-height: 1.4; text-align: center; }
.store-manager { margin: 3px 0 16px; padding: 16px; border: 1px solid #dfdffc; border-radius: 18px; background: linear-gradient(135deg, #fbfbff, #f0f3ff); text-align: left; }.manager-heading { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 13px; }.manager-heading p { margin: 6px 0 0; color: #73768a; font-size: 11px; line-height: 1.4; }.manager-heading > button { width: 28px; height: 28px; flex: 0 0 28px; border: 0; border-radius: 50%; background: #e7e7fb; color: #615cda; font-size: 20px; cursor: pointer; }.smart-store-manager-list { display: grid; gap: 8px; }.store-connect-card { display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid #e8e9f1; border-radius: 12px; background: #fff; }.store-connect-card.unavailable { opacity: .62; }.store-connect-card > div { display: grid; flex: 1; min-width: 0; gap: 2px; }.store-connect-card b { font-size: 12px; }.store-connect-card small { color: #878999; font-size: 9.5px; }.store-connect-card button { padding: 7px 9px; border: 1px solid #625ce3; border-radius: 8px; background: #fff; color: #5a54d4; font-size: 10px; font-weight: 800; cursor: pointer; }.store-connect-card button.connected { border-color: #159866; background: #eaf8f1; color: #10774e; }.not-available { color: #9294a2; font-size: 9.5px; font-weight: 700; }.smart-refresh { width: 100%; margin-top: 11px; padding: 9px; border: 1px solid #aaa7ee; border-radius: 9px; background: #fff; color: #5c56da; font-size: 11px; font-weight: 800; cursor: pointer; }
.smart-location-cta { width: 100%; padding: 12px; border: 1px dashed #8e89e8; border-radius: 10px; background: #fff; color: #5650ca; font-size: 12px; font-weight: 800; cursor: pointer; }
.smart-cart-bar { position: sticky; z-index: 8; bottom: 9px; display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px; border-radius: 16px; background: #171b38; color: #fff; box-shadow: 0 10px 24px rgba(15,20,48,.26); cursor: pointer; text-align: left; }.cart-orb { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 12px; background: #34ba83; font-size: 18px; }.smart-cart-bar span:nth-child(2) { display: grid; flex: 1; gap: 2px; }.smart-cart-bar b { font-size: 11.5px; }.smart-cart-bar small { color: #c2c7e6; font-size: 9.5px; }.smart-cart-bar strong { font-size: 16px; }.smart-cart-bar i { color: #abaff0; font-size: 22px; font-style: normal; }
.option-price { display: grid; color: #24273b; font-size: 15px; text-align: right; }.option-price small { color: #159866; font-size: 8px; }.option-best { color: #12815a; }.sheet-action { width: 100%; margin-top: 10px; padding: 12px; border: 0; border-radius: 10px; background: #625ce3; color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.smart-cart-summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-bottom: 11px; padding: 12px; border-radius: 13px; background: linear-gradient(125deg, #161b3c, #554ed0); color: #fff; }.smart-cart-summary span { color: #c9c8ff; font-size: 9px; font-weight: 800; letter-spacing: .7px; }.smart-cart-summary b { grid-row: span 2; align-self: center; font-size: 24px; }.smart-cart-summary small { color: #efefff; font-size: 10px; }.smart-store-cart { overflow: hidden; margin-top: 10px; border: 1px solid #e7e8f1; border-radius: 13px; background: #fff; }.smart-store-cart header { display: flex; align-items: center; gap: 8px; padding: 10px; background: #f4f5fa; }.smart-store-cart header small { color: #74778a; font-size: 9.5px; }.smart-store-cart header strong { margin-left: auto; font-size: 14px; }.cart-line { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-top: 1px solid #f0f0f5; }.cart-line img { width: 35px; height: 35px; border-radius: 7px; object-fit: cover; }.cart-line > span { display: grid; flex: 1; gap: 2px; min-width: 0; color: #343749; font-size: 11px; font-weight: 700; }.cart-line small { color: #858798; font-size: 9px; font-weight: 500; }.cart-quantity { display: flex; align-items: center; gap: 8px; }.cart-quantity button { width: 22px; height: 22px; border: 1px solid #d9daf1; border-radius: 6px; background: #fff; color: #5a54d4; font-size: 15px; cursor: pointer; }.cart-quantity b { min-width: 9px; text-align: center; font-size: 11px; }.smart-store-cart footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-top: 1px solid #f0f0f5; color: #777a8c; font-size: 9px; }.smart-store-cart footer a { padding: 7px 8px; border-radius: 7px; background: #625ce3; color: #fff; font-size: 9px; font-weight: 800; text-decoration: none; }.single-store-note { width: 100%; margin-top: 10px; padding: 10px; border: 1px solid #deddf8; border-radius: 10px; background: #f7f7ff; color: #5853bd; font-size: 10.5px; cursor: pointer; }

/* ===== Food Scan Result + History ===== */
.scan-result-photo { width: 100%; height: 220px; object-fit: cover; border-radius: 0 0 20px 20px; display: block; }
.scan-result-body { padding: 16px 18px 24px; }
.scan-result-time { font-size: 12px; color: #999; margin: 0 0 4px; }
.scan-result-name { font-size: 21px; font-weight: 800; margin: 0 0 2px; color: #222; }
.scan-result-portion { font-size: 13px; color: #777; margin: 0 0 16px; }

.scan-macro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.scan-macro-grid-full { margin-bottom: 0; }
.scan-macro-box {
  background: #f7f7f9; border-radius: 14px; padding: 12px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.scan-macro-icon { font-size: 18px; }
.scan-macro-value { font-size: 16px; font-weight: 800; color: #222; }
.scan-macro-label { font-size: 11px; color: #888; }

.scan-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid #eee; }
.scan-tab-btn {
  flex: 1; background: none; border: none; padding: 10px 0; font-size: 14px; font-weight: 700;
  color: #999; cursor: pointer; border-bottom: 2px solid transparent;
}
.scan-tab-btn.active { color: #222; border-bottom-color: #2e7d32; }
.scan-tab-panel { margin-bottom: 16px; }

.scan-ingredient-row {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 4px;
  border-bottom: 1px solid #f0f0f0; font-size: 13.5px;
}
.scan-ingredient-row:last-child { border-bottom: none; }
.scan-ingredient-name { font-weight: 600; color: #222; }
.scan-ingredient-qty { font-size: 11.5px; color: #999; }
.scan-ingredient-kcal { font-weight: 700; color: #555; font-size: 13px; }
.scan-quantity-label { display:flex; align-items:center; gap:8px; margin-top:8px; font-size:12px; color:inherit; }
.scan-quantity-input { width:90px; min-width:0; padding:7px 9px; border:1px solid #b8cec5; border-radius:8px; background:transparent; color:inherit; font:inherit; }
.scan-quantity-input:focus { outline:2px solid #16765c; outline-offset:2px; }
.scan-quantity-note { margin:12px 0; text-align:left; }
/* Receipt import uses the existing app palette. */
#grocery-scan-options { flex-wrap:wrap; }
#grocery-scan-options .scanner-submode-btn { flex:1 1 20%; min-width:0; }
#receipt-review-screen { text-align:left; }
#receipt-review-screen h2 { margin:16px 0 8px; }
.receipt-item { margin:12px 0; padding:14px; border:1px solid var(--app-line,#d4dfd7); border-radius:14px; background:var(--app-surface,#fff); }
.receipt-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
#receipt-review-screen label { display:block; margin:8px 0; font-size:12px; font-weight:600; color:var(--app-ink,#17382b); }
#receipt-review-screen input:not([type=checkbox]), #receipt-review-screen select { width:100%; min-width:0; box-sizing:border-box; margin:5px 0 0; padding:10px 8px; border:1px solid var(--app-line,#d4dfd7); border-radius:8px; background:var(--app-canvas,#faf7ef); color:var(--app-ink,#17382b); font:inherit; }
#receipt-review-screen .receipt-selection { display:flex; align-items:center; gap:8px; }
#receipt-review-screen input[type=checkbox] { width:18px; height:18px; margin:0; accent-color:var(--app-brand,#147d64); }
.receipt-row-note, #receipt-summary, #receipt-error { font-size:12px; line-height:1.5; overflow-wrap:anywhere; margin:10px 0; }
#receipt-error { color:#b74232; }

.scan-health-score-card { background: #f7f7f9; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.scan-health-score-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.scan-health-score-bar-bg { width: 100%; height: 8px; background: #e4e4e8; border-radius: 6px; overflow: hidden; }
.scan-health-score-bar-fill { height: 100%; background: linear-gradient(90deg, #2e7d32, #66bb6a); border-radius: 6px; }

.scan-info-card { background: #f7f7f9; border-radius: 14px; padding: 14px 16px; margin-bottom: 20px; }
.scan-info-title { font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.scan-info-text { font-size: 13px; color: #555; line-height: 1.5; margin: 0; }
.scan-confidence-note { font-size: 11.5px; color: #b26a00; margin: 8px 0 0; }

.scan-result-actions { display: flex; gap: 10px; }
.scan-result-actions .btn-outline, .scan-result-actions .btn-primary { flex: 1; margin: 0; }
.scan-result-delete-btn { margin-top: 10px; color: #c62828; border-color: #f0c6c6; }
.scan-edit-panel { margin: 14px 0; padding: 14px; border: 1px solid #cfe5d1; border-radius: 14px; background: #f5fbf5; text-align: left; }
.scan-edit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.scan-edit-heading h3 { margin: 0 0 3px; color: #215b29; font-size: 16px; }
.scan-edit-heading p { margin: 0; color: #647a67; font-size: 11.5px; line-height: 1.35; }
.scan-edit-close { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #e1eee2; color: #34683a; font-size: 22px; line-height: 1; cursor: pointer; }
.scan-edit-panel > label, .scan-edit-grid label { display: block; color: #426547; font-size: 11.5px; font-weight: 800; }
.scan-edit-panel input { width: 100%; box-sizing: border-box; margin: 5px 0 11px; padding: 10px 11px; border: 1px solid #c5ddc7; border-radius: 9px; background: #fff; color: #1e3321; font-size: 13px; outline: none; }
.scan-edit-panel input:focus { border-color: #2e7d32; box-shadow: 0 0 0 3px rgba(46,125,50,.12); }
.scan-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9px; }
.scan-edit-grid input { margin-bottom: 10px; }
.scan-edit-actions { display: flex; gap: 9px; margin-top: 2px; }
.scan-edit-actions .btn-outline, .scan-edit-actions .btn-primary { flex: 1; margin: 0; padding: 11px 8px; font-size: 12px; }

.scan-today-card { background: #f0f7f0; border-radius: 14px; padding: 12px 16px; margin: 14px 0 6px; }
.scan-today-kcal { font-weight: 800; font-size: 14px; color: #2e7d32; margin-bottom: 4px; }
.scan-today-macros { display: flex; gap: 12px; font-size: 12px; color: #555; }

.scan-history-row {
  display: flex; gap: 10px; background: white; border-radius: 12px; padding: 8px;
  margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); align-items: center;
}
.scan-history-row.clickable { cursor: pointer; }
.scan-history-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.scan-history-info { flex: 1; min-width: 0; }
.scan-history-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.scan-history-name { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-history-time { font-size: 11px; color: #999; flex-shrink: 0; }
.scan-history-macros { display: flex; gap: 8px; font-size: 11.5px; color: #777; margin-top: 3px; flex-wrap: wrap; }
.scan-history-delete {
  background: none; border: none; font-size: 16px; color: #bbb; cursor: pointer;
  padding: 4px 6px; flex-shrink: 0; border-radius: 8px;
}
.scan-history-delete:hover { background: #fbe9e9; color: #c62828; }
#scan-archive-open { width: 100%; margin-top: 18px; }
#scan-archive-screen .history-period-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); }
#scan-archive-screen .onb-back { background: transparent; border: 0; padding: 8px; color: var(--app-ink,#17382b); }
#scan-archive-screen .history-period-btn.active { box-shadow: inset 0 0 0 1px var(--app-line,#d4dfd7); }
#scan-archive-screen .scan-archive-row { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--app-line,#d4dfd7); }
#scan-archive-screen .scan-archive-open { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--app-ink,#17382b); text-align: left; cursor: pointer; font: inherit; }
#scan-archive-screen .scan-archive-copy { min-width: 0; overflow-wrap: anywhere; }
#scan-archive-screen .scan-archive-copy b, #scan-archive-screen .scan-archive-copy small { display: block; }
#scan-archive-screen .scan-archive-copy small { font-size: 12px; margin-top: 4px; color: var(--app-muted,#5d7162); }
#scan-archive-screen .scan-archive-delete { padding: 9px; border: 1px solid var(--app-line,#d4dfd7); border-radius: 8px; background: var(--app-surface,#fff); color: var(--app-ink,#17382b); cursor: pointer; }
#scan-archive-screen .scan-archive-open:focus-visible { outline: 2px solid var(--app-brand,#147d64); outline-offset: 3px; }

/* ===== Meal Detail ===== */
.meal-item.clickable { cursor: pointer; }
.meal-item-right { display: flex; align-items: center; gap: 8px; }
.meal-regen-btn {
  background: #f0f7f0; border: 1px solid #cfe8d1; border-radius: 8px;
  padding: 4px 7px; font-size: 13px; cursor: pointer; line-height: 1;
}
.meal-regen-btn:hover { background: #e2f0e3; }

.detail-quick-stats {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 14px 0 12px;
  font-size: 13.5px; color: #555; font-weight: 600;
}
.detail-difficulty-badge {
  background: #e6f4ea; color: #2e7d32; padding: 3px 10px; border-radius: 20px; font-size: 12px;
}
.detail-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-tag-chip {
  background: #f0f0f2; color: #444; font-size: 11.5px; font-weight: 600;
  padding: 5px 11px; border-radius: 20px;
}
.detail-section-card {
  background: white; border-radius: 14px; padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.detail-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.detail-estimated-label { font-size: 11px; color: #aaa; }
.detail-nutrition-note { margin: 6px 0 12px; font-size: 11px; line-height: 1.4; color: #8f8f8f; }
.detail-nutrition-row { display: flex; align-items: center; gap: 20px; }
.detail-nutrition-ring {
  width: 90px; height: 90px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#e57373 0% var(--protein-pct, 33%), #ffb74d var(--protein-pct, 33%) var(--carbs-pct, 66%), #64b5f6 var(--carbs-pct, 66%) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.detail-nutrition-ring::before {
  content: ''; position: absolute; width: 62px; height: 62px; background: white; border-radius: 50%;
}
.detail-nutrition-ring-value { position: relative; font-weight: 800; font-size: 18px; z-index: 1; }
.detail-nutrition-ring-label { position: relative; font-size: 10px; color: #999; z-index: 1; }
.detail-nutrition-stats { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.detail-nutrition-stat { display: flex; align-items: center; gap: 8px; }
.detail-nutrition-stat b { margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.protein { background: #e57373; }
.dot.carbs { background: #ffb74d; }
.dot.fat { background: #64b5f6; }
.dot.vitamin-c { background: #81c784; }
.dot.iron { background: #bc6c25; }
.dot.calcium { background: #9575cd; }
.dot.fiber { background: #4db6ac; }
.dot.cost { background: #81c784; }

/* The five supplied recipes use the same calorie-ring card as the recipe references. */
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-card {
  background: rgba(255,255,255,.42);
  border: 1px solid rgba(8,121,111,.22);
  border-radius: 22px;
  padding: 16px;
  box-shadow: none;
}
#meal-detail-screen.detail-reference-nutrition .detail-section-header {
  align-items: center;
  margin-bottom: 13px;
}
#meal-detail-screen.detail-reference-nutrition .detail-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
#meal-detail-screen.detail-reference-nutrition .detail-section-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  border-radius: 50%;
  background: #08796f;
  color: #fff;
  font-size: 23px;
}
#meal-detail-screen.detail-reference-nutrition .detail-section-header .section-title {
  color: #106f65;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}
#meal-detail-screen.detail-reference-nutrition .detail-estimated-label {
  padding: 8px 13px;
  border-radius: 999px;
  background: #dcefe8;
  color: #17685e;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  flex: 0 0 150px;
  background: conic-gradient(#e95767 0 20%, #a95ce7 20% 40%, #f5b65a 40% 60%, #4da4df 60% 80%, #77c58a 80% 100%);
}
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-ring::before {
  width: 120px;
  height: 120px;
  border: 8px solid rgba(255,255,255,.6);
  background: #f3f8f3;
}
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-ring-value {
  color: #08796f;
  font-size: 29px;
  line-height: 1;
}
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-ring-label {
  margin-top: 4px;
  color: #146e65;
  font-size: 14px;
}
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stats {
  width: 100%;
  gap: 9px;
  color: #1b7b70;
  font-size: 18px;
}
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat { gap: 10px; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat b { color: #14685f; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat .dot { width: 14px; height: 14px; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat .dot.calories { background: #e95767; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat .dot.protein { background: #a95ce7; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat .dot.carbs { background: #f5b65a; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat .dot.fat { background: #4da4df; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-stat .dot.fiber { background: #77c58a; }
#meal-detail-screen.detail-reference-nutrition .detail-cost-stat { display: none; }
#meal-detail-screen.detail-reference-nutrition .detail-nutrition-note {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid #abd5cb;
  color: #42857b;
  font-size: 13px;
  line-height: 1.55;
}
@media (max-width: 390px) {
  #meal-detail-screen.detail-reference-nutrition .detail-nutrition-card { padding: 12px; border-radius: 17px; }
  #meal-detail-screen.detail-reference-nutrition .detail-section-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 19px; }
  #meal-detail-screen.detail-reference-nutrition .detail-section-header .section-title { font-size: 22px; }
  #meal-detail-screen.detail-reference-nutrition .detail-estimated-label { padding: 6px 9px; font-size: 11px; }
  #meal-detail-screen.detail-reference-nutrition .detail-nutrition-ring { width: 132px; height: 132px; flex-basis: 132px; }
  #meal-detail-screen.detail-reference-nutrition .detail-nutrition-ring::before { width: 102px; height: 102px; }
  #meal-detail-screen.detail-reference-nutrition .detail-nutrition-stats { font-size: 16px; }
}
.detail-method-step { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.5; color: #444; }
.detail-method-step:last-child { margin-bottom: 0; }
.detail-method-num {
  width: 22px; height: 22px; border-radius: 50%; background: #2e7d32; color: white;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11.5px; flex-shrink: 0;
}
.ingredient-row {
  display: flex; justify-content: space-between; padding: 10px 4px;
  border-bottom: 1px solid #f0f0f0; font-size: 13.5px;
}
.ingredient-row:last-child { border-bottom: none; }

/* Recipe ingredients stay readable in compact phone screens. */
#detail-ingredients-list.detail-ingredients-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#detail-ingredients-list .ingredient-visual-card {
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px solid #edf1ed;
  border-radius: 12px;
  background: #fbfdfb;
}
#detail-ingredients-list .ingredient-image-wrap {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  overflow: hidden;
  border-radius: 9px;
}
#detail-ingredients-list .ingredient-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
#detail-ingredients-list .ingredient-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#detail-ingredients-list .ingredient-price {
  margin-top: 4px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #08796f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
#detail-ingredients-list .ingredient-copy span { font-size: 11px; line-height: 1.25; overflow-wrap: normal; word-break: normal; }
#detail-ingredients-list .ingredient-copy small { font-size: 10px; line-height: 1.25; color: #748174; overflow-wrap: normal; word-break: normal; }

/* Household picker ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â recipe nutrition remains per serving; only ingredient amounts change. */
.detail-cooking-for {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #d5e9df;
  border-radius: 14px;
  background: #f7fbf8;
}
.detail-cooking-for-title { display: block; margin-bottom: 8px; color: #285d4d; font-size: 12px; font-weight: 800; }
.detail-cooking-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.detail-cooking-option {
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid #d2e7de;
  border-radius: 10px;
  background: #fff;
  color: #31584c;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.detail-cooking-option:hover { border-color: #62a98e; }
.detail-cooking-option.selected { border-color: #17685f; background: #e5f3ec; color: #14685f; box-shadow: inset 0 0 0 1px #17685f; }

/* ===== Vitamins/minerals row + manual Nutrition Targets ===== */
.micro-row { margin-top: 4px; padding-top: 12px; border-top: 1px dashed #eee; }
.micro-row .macro-value { font-size: 11px; }
.macros-row.single-row { grid-template-columns: 1fr; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #eee; justify-items: center; }
.macro-icon.green { background: #e8f5e9; }
.macro-icon.red { background: #fdecea; }
.macro-icon.gray { background: #eceff1; }
.macro-icon.teal { background: #e0f2f1; }

.nutrition-target-card {
  background: white; border-radius: 14px; padding: 16px; margin-top: 12px;
  text-align: left; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.nutrition-target-row {
  display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
}
.nutrition-target-row:last-child { border-bottom: none; }
.nutrition-target-row b { color: #2e7d32; }

/* ===== Biometric onboarding screens ===== */
.bio-screen { position: relative; }
.bio-deco {
  position: absolute; top: 54px; right: 20px; width: 64px; height: 64px;
  border-radius: 16px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.gender-symbol { font-size: 46px; margin-bottom: 8px; line-height: 1; }
.activity-sub { display: block; color: #999; font-size: 10.5px; margin-top: 4px; font-weight: 400; }

/* DOB wheel picker */
.wheel-picker-row {
  position: relative; display: flex; justify-content: center; gap: 6px;
  height: 200px; margin: 10px 0 20px; overflow: hidden;
}
.wheel-col {
  width: 90px; height: 200px; overflow-y: scroll; scroll-snap-type: y mandatory;
  padding: 80px 0; -ms-overflow-style: none; scrollbar-width: none;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item {
  height: 40px; line-height: 40px; text-align: center; font-size: 16px;
  color: #bbb; scroll-snap-align: center; transition: color .15s, font-weight .15s;
}
.wheel-highlight {
  position: absolute; top: 80px; left: 0; right: 0; height: 40px;
  border-top: 1.5px solid #2e7d32; border-bottom: 1.5px solid #2e7d32;
  background: rgba(46,125,50,0.06); pointer-events: none;
}

/* Height screen */
.height-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 20px 0; height: 260px; }
.ruler-col { display: flex; flex-direction: column; justify-content: space-between; height: 220px; text-align: center; font-size: 12px; color: #999; }
.ruler-col-label { font-size: 11px; color: #bbb; margin-bottom: 4px; }
.height-slider-wrap { height: 220px; width: 30px; display: flex; align-items: center; justify-content: center; }
.vertical-slider {
  width: 220px;
  transform: rotate(-90deg);
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 10px;
  background: #ddd;
  cursor: pointer;
}
.vertical-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: #2e7d32; cursor: pointer; border: 3px solid white; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.vertical-slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: #2e7d32; cursor: pointer;
  border: 3px solid white; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.height-readout { text-align: left; }
.height-readout p { font-size: 20px; font-weight: 800; margin: 0; }
.height-readout .height-or { font-size: 13px; font-weight: 400; color: #999; margin: 2px 0; }

/* Weight / Target Weight ruler screens */
.ruler-value-display { text-align: center; font-size: 32px; font-weight: 800; margin: 16px 0 10px; }
.ruler-track {
  height: 46px; border-radius: 8px; margin-bottom: 10px;
  background-image:
    repeating-linear-gradient(to right, #ccc 0 1px, transparent 1px 10px),
    repeating-linear-gradient(to right, #999 0 2px, transparent 2px 50px);
  background-position: center;
}
.ruler-slider { margin-top: -34px; margin-bottom: 24px; }
.pantry-sync-panel { margin-bottom: 14px; text-align: left; }
.pantry-sync-panel .desc { margin-bottom: 8px; }
.pantry-sync-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pantry-sync-actions .pantry-pill { max-width: 100%; white-space: normal; text-align: left; }
.pantry-sync-actions [hidden] { display: none; }
.plan-sync-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.billing-options { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.billing-options label { flex: 1 1 220px; display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.billing-options select { width: 100%; padding: 12px; border: 1px solid var(--app-line, #d5e0d9); border-radius: 12px; background: var(--app-card, #fff); color: inherit; font: inherit; }
.billing-actions .pantry-pill { color: #126b55; background: #fff; border: 1px solid #b8d6c9; }
.billing-actions .pantry-pill:disabled { opacity: .55; }
.plan-sync-actions .desc { flex-basis: 100%; margin: 0; }
.plan-sync-actions [hidden], #home-plan-sync-retry[hidden], #plan-device-backup[hidden] { display: none; }
.pantry-example-label { display: inline-block; margin-left: 6px; font-size: 11px; color: #176d4c; background: #e7f3e9; padding: 3px 7px; border-radius: 8px; }

.compare-row-badges { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0; }
.compare-badge { text-align: center; background: white; border-radius: 14px; padding: 14px 18px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.compare-badge-icon { font-size: 20px; }
.compare-badge p { font-size: 12px; color: #888; margin-top: 4px; }
.compare-badge-value { font-weight: 800; font-size: 15px; color: #222; }
.compare-vs { color: #999; font-weight: 600; }

/* ===== Notifications ===== */
.bell-wrap { position: relative; cursor: pointer; display: inline-block; }
.bell-badge {
  position: absolute; top: -6px; right: -8px; background: #e2445c; color: white;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  border: 2px solid white;
}
.notification-item {
  display: flex; gap: 12px; background: white; border-radius: 12px; padding: 14px;
  margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); text-align: left;
}
.notification-icon { font-size: 20px; flex-shrink: 0; }
.notification-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.notification-message { font-size: 12.5px; color: #666; line-height: 1.4; }

/* ===== Subscription plan cards ===== */
.plan-card {
  background: white; border-radius: 16px; padding: 18px; margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1.5px solid #eee; text-align: left;
}
.plan-card.current { border-color: #2e7d32; background: #f6fbf6; }
.plan-card-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.plan-name { font-size: 17px; font-weight: 800; }
.plan-price { font-size: 14px; font-weight: 700; color: #2e7d32; }
.plan-features { list-style: none; margin-bottom: 14px; }
.plan-features li { font-size: 13px; color: #555; margin-bottom: 6px; }
.plan-select-btn { width: 100%; }
.premium-banner { cursor: pointer; }

/* ===== RECIPE HERO ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â brand-styled gradient + emoji, not a hotlinked photo =====
   We don't have licensing rights to embed the reference-app screenshots'
   photography, and hotlinking arbitrary web images into a real product's
   codebase is a copyright risk with no guarantee the link stays alive.
   This is a placeholder that matches MealMate's "friendly, modern, Indian,
   non-clinical" brand direction until real licensed/owned photography is
   added. */
.detail-hero {
  width: 100%; height: 170px; border-radius: 18px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.detail-hero-emoji { font-size: 68px; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.18)); }
.hero-south-indian { background: linear-gradient(135deg, #f5a623, #e8823c); }
.hero-north-indian { background: linear-gradient(135deg, #2e7d32, #e8823c); }
.hero-west-indian  { background: linear-gradient(135deg, #c1440e, #f2994a); }
.hero-east-indian  { background: linear-gradient(135deg, #1b998b, #2e7d32); }
.hero-indo-chinese { background: linear-gradient(135deg, #b3261e, #e8574a); }
.hero-default      { background: linear-gradient(135deg, #556b2f, #8fae68); }

/* ===== Nature theme: welcome, auth, and 13-step onboarding ===== */
:root {
  --nature-ink: #102d27;
  --nature-green: #2d9662;
  --nature-green-dark: #237b50;
  --nature-cream: #fbfaf0;
  --nature-soft: #eef3d9;
  --nature-line: #cbd5c2;
  --nature-shadow: 0 8px 24px rgba(53, 86, 63, 0.1);
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(221, 235, 185, .65), transparent 22%),
    radial-gradient(circle at 90% 88%, rgba(213, 231, 177, .58), transparent 25%),
    var(--nature-cream);
  color: var(--nature-ink);
  padding: 18px;
}

.phone {
  width: min(100%, 390px);
  min-height: calc(100vh - 36px);
  padding: 30px 22px 26px;
  background: rgba(251, 250, 240, .82);
  border: 1px solid rgba(164, 181, 153, .55);
  border-radius: 30px;
  box-shadow: 0 18px 50px rgba(42, 76, 53, .1);
  overflow: hidden;
}

#welcome-screen,
#login-screen,
#signup-screen,
#forgot-screen,
#otp-screen,
#reset-screen,
#success-screen,
.onb-screen {
  position: relative;
  isolation: isolate;
}

#welcome-screen::before,
#login-screen::before,
#signup-screen::before,
#forgot-screen::before,
#otp-screen::before,
#reset-screen::before,
#success-screen::before,
.onb-screen::before,
.onb-screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

#welcome-screen::before,
#login-screen::before,
#signup-screen::before,
#forgot-screen::before,
#otp-screen::before,
#reset-screen::before,
#success-screen::before {
  width: 150px;
  height: 90px;
  top: -42px;
  right: -55px;
  background: var(--nature-soft);
  transform: rotate(-22deg);
  box-shadow: -35px 48px 0 -20px #dce9bc;
}

.onb-screen::before {
  width: 170px;
  height: 110px;
  top: -55px;
  right: -72px;
  background: #e5edc9;
  transform: rotate(-28deg);
}

.onb-screen::after {
  width: 120px;
  height: 82px;
  bottom: -42px;
  left: -58px;
  background: #e6efca;
  transform: rotate(24deg);
}

.logo-row { justify-content: flex-start; margin-bottom: 8px; }
.logo-icon {
  background: var(--nature-green);
  border-radius: 50% 50% 50% 12px;
  transform: rotate(-10deg);
}
.green,
.login-link,
.login-link.center b,
.onb-back-label,
.skip-text,
.green-text,
.allset-title { color: var(--nature-green-dark); }
h1, .onb-question { color: var(--nature-ink); letter-spacing: -.4px; }
.subtitle, .desc { color: #52635b; }
.hero-img,
.onb-food-img {
  border: 7px solid rgba(255, 255, 255, .72);
  box-shadow: var(--nature-shadow);
}

.btn-primary {
  background: var(--nature-green);
  border-radius: 12px;
  box-shadow: 0 5px 12px rgba(45, 150, 98, .18);
}
.btn-primary:hover { background: var(--nature-green-dark); }
input,
.onb-input {
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--nature-line);
  color: var(--nature-ink);
}
input:focus,
.onb-input:focus {
  outline: 2px solid rgba(45, 150, 98, .22);
  border-color: var(--nature-green);
}
.btn-social,
.method-card,
.goal-card,
.pace-card,
.compare-badge,
.summary-card,
.plan-card,
.onb-screen .dob-preview {
  background: rgba(255, 255, 255, .72);
  border-color: var(--nature-line);
  box-shadow: 0 4px 14px rgba(53, 86, 63, .06);
}
.btn-social:hover,
.method-card.selected,
.goal-card.selected,
.pace-card.selected {
  border-color: var(--nature-green);
  background: #edf5df;
}

.onb-screen {
  background: transparent;
  min-height: calc(100vh - 90px);
  padding: 8px 2px 0;
}
.onb-title { color: var(--nature-ink); }
.onb-step { color: #718078; }
.onb-question { font-size: 25px; line-height: 1.12; }
.onb-progress-bg,
.progress-track { background: #dfe6d8; }
.onb-progress-fill,
.progress-fill { background: var(--nature-green); }
.onb-slider,
.vertical-slider { background: #d5dfd0; }
.onb-slider::-webkit-slider-thumb,
.vertical-slider::-webkit-slider-thumb,
.onb-slider::-moz-range-thumb,
.vertical-slider::-moz-range-thumb { background: var(--nature-green); }
.unit-btn {
  border-color: var(--nature-line);
  background: rgba(255, 255, 255, .7);
  color: var(--nature-ink);
}
.unit-btn.active,
.chip.selected,
.add-chip-btn { background: var(--nature-green); border-color: var(--nature-green); }
.chip { background: rgba(255, 255, 255, .7); border-color: var(--nature-line); }
.chip:hover { border-color: var(--nature-green); }
.kitchen-suggest-card,
.already-have-card { background: #edf5df; border-color: #bfd4b5; }
.allset-screen .summary-card { background: rgba(255, 255, 255, .78); }
.allset-heading { color: var(--nature-ink); }

/* Reference-app proportions and botanical framing */
* { font-family: "Trebuchet MS", Arial, sans-serif; }
.phone::before {
  content: none;
  position: absolute;
  top: 10px;
  left: 25px;
  z-index: 30;
  color: #17362d;
  font: 700 10px Arial, sans-serif;
  letter-spacing: .2px;
}
.phone > .screen.active {
  min-height: calc(100vh - 88px);
}
#login-screen,
#signup-screen,
#forgot-screen,
#otp-screen,
#reset-screen,
#success-screen {
  padding-top: 28px;
}
.onb-screen {
  padding: 28px 2px 0;
}
.onb-header {
  min-height: 28px;
  margin-bottom: 18px;
}
.onb-back-label {
  font-size: 0;
  width: 28px;
  color: transparent;
}
.onb-back-label::after {
  content: "\2190";
  font-size: 24px;
  color: var(--nature-green-dark);
}
.onb-title {
  font-size: 16px;
  letter-spacing: -.2px;
}
.onb-question {
  max-width: 320px;
  font-size: 27px;
  line-height: 1.05;
  margin-bottom: 22px;
}
.onb-screen .btn-primary {
  min-height: 48px;
  margin-top: 4px;
}
.onb-screen .onb-header + .onb-step {
  margin-top: 2px;
}
.onb-screen .onb-header ~ .onb-progress-bg {
  margin-left: 0;
  margin-right: 0;
}
.onb-screen .goal-check {
  background: #f8faf0;
  border-color: #aebca7;
}
.onb-screen .goal-card.selected .goal-check {
  background: var(--nature-green);
  border-color: var(--nature-green);
}
.onb-screen .gender-symbol,
.onb-screen .goal-icon,
.onb-screen .pace-icon {
  color: var(--nature-green-dark);
}
.onb-screen .bio-deco {
  opacity: .72;
  border-radius: 50%;
  mix-blend-mode: multiply;
}
.onb-step {
  color: #52645b;
  font-size: 12px;
  font-weight: 600;
}
.onb-input {
  min-height: 48px;
  border-radius: 11px;
  margin-bottom: 18px;
}
.onb-food-img {
  display: block;
  width: 62%;
  height: 145px;
  object-fit: cover;
  object-position: center;
  margin: 30px 0 14px auto;
  border-radius: 80px 0 0 80px;
}
.onb-progress-bg {
  height: 8px;
  margin-top: 24px;
  background: #d8ddd5;
}
.onb-progress-fill {
  background: var(--nature-green);
}
.goal-grid {
  gap: 12px;
}
.goal-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  padding: 16px 8px;
}
.goal-card.selected {
  border-width: 2px;
}
.goal-icon { font-size: 30px; }
.pace-card {
  min-height: 82px;
  border-radius: 12px;
}
.cuisine-grid,
.kitchen-grid {
  gap: 9px;
}
.chip {
  border-radius: 11px;
  padding: 11px 13px;
}
.unit-toggle {
  background: #e0e4df;
  border-radius: 22px;
  padding: 3px;
  gap: 0;
}
.unit-btn {
  min-width: 78px;
  padding: 8px 18px;
  border: 0;
}
.unit-btn.active {
  background: #fdfdf6;
  color: var(--nature-green-dark);
  box-shadow: 0 1px 4px rgba(42, 76, 53, .14);
}
.ruler-value-display {
  color: var(--nature-ink);
  font-size: 34px;
}
.summary-row {
  border-color: #e3e8d9;
}

/* Step 1: calmer, more botanical name-entry composition */
#onboard-name {
  background:
    radial-gradient(ellipse 120px 82px at 106% 9%, #e3edc2 0 58%, transparent 60%),
    radial-gradient(ellipse 145px 90px at -8% 91%, #e5efc9 0 54%, transparent 56%),
    radial-gradient(ellipse 92px 58px at 92% 58%, rgba(212, 229, 178, .48) 0 52%, transparent 54%),
    transparent;
}
#onboard-name::before {
  width: 148px;
  height: 98px;
  top: -52px;
  right: -62px;
  background: #e3edc2;
  box-shadow: -28px 54px 0 -19px #d8e7b4;
  transform: rotate(-24deg);
}
#onboard-name::after {
  width: 132px;
  height: 88px;
  bottom: -44px;
  left: -66px;
  background: #e5efc9;
  box-shadow: 88px -34px 0 -39px #dbe9bc;
  transform: rotate(24deg);
}
#onboard-name .onb-header {
  position: relative;
}
#onboard-name .onb-header::before,
#onboard-name .onb-header::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: #87ad62;
  border-radius: 100% 0 100% 0;
  opacity: .78;
}
#onboard-name .onb-header::before {
  width: 34px;
  height: 15px;
  right: 5px;
  top: 28px;
  transform: rotate(44deg);
  box-shadow: -13px 15px 0 -2px #a9c77d, 9px 16px 0 -3px #6f9e59;
}
#onboard-name .onb-header::after {
  width: 27px;
  height: 12px;
  left: -2px;
  top: 286px;
  transform: rotate(-42deg);
  box-shadow: 12px 14px 0 -2px #a9c77d, -6px 27px 0 -3px #6f9e59;
}
#onboard-name .onb-question {
  max-width: 285px;
  font-size: 29px;
  letter-spacing: -.8px;
}
#onboard-name .onb-input {
  position: relative;
  z-index: 1;
  min-height: 50px;
  padding-left: 15px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 4px 12px rgba(61, 92, 58, .05);
}
#onboard-name .onb-food-img {
  width: 68%;
  height: 168px;
  margin-top: 40px;
  margin-right: -2px;
  border: 8px solid rgba(255, 255, 255, .82);
  border-right: 0;
  border-radius: 96px 0 0 96px;
  box-shadow: -8px 8px 22px rgba(68, 99, 58, .14);
}
#onboard-name .btn-primary {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  min-height: 50px;
  letter-spacing: .1px;
}
#onboard-name .onb-progress-bg {
  margin-top: 22px;
  height: 8px;
}

@media (max-width: 420px) {
  body { padding: 0; }
  .phone {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
}

/* ===== Tips & Guides ===== */
.bottom-nav { gap: 2px; }
.nav-item { flex: 1; min-width: 0; }
.nav-item .nav-icon { font-size: 16px; }

#tips-screen { padding-bottom: 4px; }
.tips-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; text-align: left; margin: 3px 0 18px; }
.tips-page-header h2 { color: var(--nature-ink); font-size: 24px; line-height: 1.05; letter-spacing: -.7px; max-width: 255px; }
.tips-kicker { color: var(--nature-green-dark); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; margin-bottom: 5px; }
.tips-sparkle { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #c8dabc; border-radius: 50%; background: #f8fbeb; color: #4b9b60; font-size: 22px; }
.tips-feature { width: 100%; min-height: 145px; overflow: hidden; display: flex; align-items: stretch; border: 0; border-radius: 20px; padding: 0; text-align: left; cursor: pointer; color: #fff; background: linear-gradient(120deg, #226c50 0%, #348e61 58%, #8fcf74 100%); box-shadow: 0 9px 20px rgba(35, 103, 66, .16); }
.tips-feature-copy { z-index: 1; width: 67%; padding: 19px 8px 17px 19px; display: flex; flex-direction: column; align-items: flex-start; }
.tips-feature small { font-size: 9px; font-weight: 800; letter-spacing: 1px; opacity: .86; margin-bottom: 7px; }
.tips-feature strong { font-size: 21px; line-height: 1.08; letter-spacing: -.5px; }
.tips-feature em { margin-top: 8px; max-width: 190px; font-size: 11.5px; line-height: 1.34; font-style: normal; opacity: .94; }
.tips-feature em b { display: block; color: #e7f4bb; margin-top: 4px; }
.tips-feature-art { align-self: flex-end; margin: 0 -10px -16px 0; font-size: 112px; line-height: 1; filter: drop-shadow(0 9px 6px rgba(14, 57, 37, .25)); transform: rotate(-10deg); }
.tips-topic-row { display: flex; gap: 8px; overflow-x: auto; padding: 17px 0 5px; scrollbar-width: none; }
.tips-topic-row::-webkit-scrollbar { display: none; }
.tips-topic { flex: 0 0 auto; border: 1px solid #d4dfc9; border-radius: 999px; padding: 8px 11px; background: rgba(255,255,255,.72); color: #456052; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.tips-topic.active { background: var(--nature-green); border-color: var(--nature-green); color: #fff; box-shadow: 0 4px 9px rgba(45,150,98,.17); }
.tips-section { margin-top: 21px; text-align: left; }
.tips-section.is-filtered-out { display: none; }
.tips-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.tips-section-heading h3 { color: var(--nature-ink); font-size: 18px; letter-spacing: -.35px; }
.tips-section-heading button { border: 0; background: transparent; padding: 4px 0; color: var(--nature-green); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.tips-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.tips-card { position: relative; min-height: 205px; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; border: 0; border-radius: 17px; padding: 14px 13px; text-align: left; color: var(--nature-ink); cursor: pointer; box-shadow: 0 4px 12px rgba(43, 79, 52, .08); transition: transform .16s ease, box-shadow .16s ease; }
.tips-card:hover { transform: translateY(-2px); box-shadow: 0 8px 17px rgba(43, 79, 52, .12); }
.tips-card.peach { background: #ffe8dc; }.tips-card.lilac { background: #eee8fb; }.tips-card.mint { background: #dff1e5; }.tips-card.sunshine { background: #fff0b9; }.tips-card.rose { background: #f9e0e2; }.tips-card.sky { background: #dceefa; }
.tips-card-art { align-self: flex-end; height: 72px; margin: -3px -3px 2px 0; font-size: 64px; line-height: 1; filter: drop-shadow(0 4px 3px rgba(68, 81, 58, .13)); }
.tips-card-tag { color: #5d7564; font-size: 8.5px; font-weight: 800; letter-spacing: .8px; }
.tips-card strong { margin-top: 5px; font-size: 15px; line-height: 1.08; letter-spacing: -.25px; }
.tips-card em { margin-top: 6px; color: #53675b; font-size: 10.5px; font-style: normal; line-height: 1.3; }
.tips-card-arrow { position: absolute; bottom: 11px; right: 12px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.62); color: var(--nature-green-dark); font-weight: 800; }
.tips-disclaimer { margin: 22px 5px 6px; color: #728178; font-size: 10px; line-height: 1.42; text-align: center; }

.tip-article-hero { height: 170px; display: grid; place-items: center; overflow: hidden; border-radius: 22px; background: linear-gradient(135deg, #dff1e5, #94ce80); }
.tip-article-hero span { font-size: 108px; line-height: 1; filter: drop-shadow(0 8px 7px rgba(42, 93, 55, .18)); }
.tip-article-category { margin-top: 18px; color: var(--nature-green-dark); font-size: 10px; font-weight: 800; letter-spacing: 1.1px; }
.tip-article-title { margin: 6px 0 15px; color: var(--nature-ink); font-size: 26px; line-height: 1.08; letter-spacing: -.6px; text-align: left; }
.tip-article-copy { color: #3f5549; font-size: 13.5px; line-height: 1.56; text-align: left; }
.tip-article-copy p { margin: 0 0 12px; }
.tip-article-copy ul { margin: 0 0 14px 18px; }
.tip-article-copy li { margin-bottom: 7px; }
.article-disclaimer { margin-top: 24px; }

@media (max-width: 360px) {
  .nav-item { font-size: 9.5px; }
  .tips-feature strong { font-size: 19px; }
  .tips-card { min-height: 195px; }
}

/* ===== Floating main navigation dock ===== */
/* This override is deliberately shared by every screen so the navigation
   remains visually identical when a visitor moves between app sections. */
#home-screen,
#scan-screen,
#plan-screen,
#chat-screen,
#profile-screen,
#tips-screen,
#pantry-screen,
#recipes-screen,
#shopping-screen,
#budget-screen {
  padding-bottom: 102px;
}

.bottom-nav,
#scan-screen .bottom-nav {
  position: fixed;
  z-index: 100;
  left: 50%;
  right: auto;
  bottom: 16px;
  width: min(calc(100vw - 36px), 346px);
  min-height: 68px;
  margin: 0;
  padding: 6px 5px 5px;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1px;
  border: 1px solid rgba(207, 218, 226, .9);
  border-radius: 28px;
  background: rgba(240, 246, 251, .96);
  box-shadow: 0 12px 28px rgba(27, 43, 65, .2), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
}

.bottom-nav .nav-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 1px;
  color: #202632;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.1px;
  transition: color .18s ease, transform .18s ease;
}

.bottom-nav .nav-item .nav-icon {
  width: 30px;
  height: 29px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  filter: grayscale(1) contrast(1.25);
  transition: background .18s ease, filter .18s ease, transform .18s ease;
}

.bottom-nav .nav-item:hover { color: #584bd2; }
.bottom-nav .nav-item:hover .nav-icon { transform: translateY(-1px); }
.bottom-nav .nav-item.active { color: #6355d8; font-weight: 800; }
.bottom-nav .nav-item.active .nav-icon {
  background: #e5e2ff;
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(91, 78, 209, .16);
}

@media (max-width: 360px) {
  .bottom-nav,
  #scan-screen .bottom-nav { width: calc(100vw - 24px); bottom: 10px; min-height: 64px; }
  .bottom-nav .nav-item { font-size: 8px; }
  .bottom-nav .nav-item .nav-icon { width: 27px; height: 27px; font-size: 16px; }
}


/* ===== MY PANTRY ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â Redesigned Category Grid + Storage + Filters ===== */
.pantry-hero {
  background: #111; border-radius: 18px; padding: 20px 18px 14px; margin-bottom: 14px; color: #fff;
}
.pantry-hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.pantry-hero-title { font-size: 22px; font-weight: 800; margin: 0; color: #fff; }
.pantry-hero-sub { font-size: 13px; color: #4caf50; margin: 4px 0 0; }
.pantry-settings-btn {
  width: 38px; height: 38px; border: 1px solid #333; border-radius: 50%; background: #1a1a1a;
  display: grid; place-items: center; font-size: 18px; cursor: pointer; color: #fff;
}

.pantry-search-wrap { margin-bottom: 14px; }
.pantry-search {
  width: 100%; padding: 12px 16px; border: 1px solid #333; border-radius: 12px;
  background: #1a1a1a; color: #fff; font-size: 14px; margin-bottom: 0;
}
.pantry-search::placeholder { color: #777; }

.pantry-pill {
  padding: 8px 18px; border: 1px solid #333; border-radius: 20px;
  background: transparent; color: #aaa; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.pantry-pill.active { background: #fff; color: #111; border-color: #fff; }
.pantry-filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }

/* Storage tabs */
.pantry-storage-tabs {
  display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 4px;
  scrollbar-width: none;
}
.pantry-storage-tabs::-webkit-scrollbar { display: none; }
.storage-tab {
  flex: 0 0 auto; display: flex; align-items: center; gap: 5px;
  padding: 9px 14px; border: 1px solid #ddd; border-radius: 12px;
  background: #fff; font-size: 12.5px; font-weight: 600; color: #555; cursor: pointer;
  white-space: nowrap;
}
.storage-tab.active { border-color: #2e7d32; background: #eefaef; color: #2e7d32; font-weight: 700; }
.storage-tab-icon { font-size: 15px; }

/* Category grid (dark cards) */
.pantry-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.pantry-cat-card {
  background: #141414;
  border: 1px solid #242424;
  border-radius: 16px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pantry-cat-card:hover {
  border-color: #4caf50;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.pantry-cat-img-wrap {
  width: 100%;
  height: 96px;
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #1c1c1e;
  position: relative;
}
.pantry-cat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.pantry-cat-card:hover .pantry-cat-img-wrap img {
  transform: scale(1.06);
}
.pantry-cat-img-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 15, 15, 0.78);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 14px;
  line-height: 1;
}
.pantry-cat-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #19191b, #242429);
}
.pantry-cat-no-img .pantry-cat-icon {
  font-size: 34px;
  margin: 0;
}
.pantry-cat-info {
  padding: 2px 4px 4px;
}
.pantry-cat-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.25;
}
.pantry-cat-action {
  font-size: 11.5px;
  color: #4caf50;
  font-weight: 700;
}
.pantry-cat-action::after {
  content: ' \203A';
}
.pantry-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pantry-detail-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: #1c1c1e;
  border: 1px solid #333;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.pantry-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pantry-back-btn {
  background: none; border: none; color: #2e7d32; font-weight: 700; font-size: 14px;
  cursor: pointer; padding: 0 0 10px; display: block;
}
.pantry-category-heading { font-size: 18px; font-weight: 800; margin: 0 0 12px; }

/* Stock badge on pantry items */
.pantry-stock-badge {
  display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 700; margin-left: 6px;
}
.pantry-stock-badge.in-stock { background: rgba(76, 175, 80, 0.15); color: #4caf50; border: 1px solid rgba(76, 175, 80, 0.3); }
.pantry-stock-badge.low-stock { background: rgba(255, 152, 0, 0.15); color: #ff9800; border: 1px solid rgba(255, 152, 0, 0.3); }
.pantry-stock-badge.use-soon,
.pantry-stock-badge.expiring { background: rgba(255, 183, 77, 0.15); color: #ffb74d; border: 1px solid rgba(255, 183, 77, 0.3); }
.pantry-stock-badge.out-of-stock { background: rgba(244, 67, 54, 0.15); color: #ef5350; border: 1px solid rgba(244, 67, 54, 0.3); }

/* Category Detail View styles (Images 2, 3, 4, 5) */
.pantry-detail-shell {
  background: #0d0d0d;
  color: #fff;
  border-radius: 20px;
  padding: 18px 16px;
  margin-bottom: 16px;
  text-align: left;
}
.pantry-detail-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.pantry-detail-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.pantry-detail-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}
.pantry-detail-subtitle {
  font-size: 13px;
  color: #8e8e93;
  margin: 0;
}
.pantry-cube-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.pantry-cube-btn:hover { background: #262626; border-color: #444; }

/* 3 Stat Counters */
.pantry-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.pantry-stat-card {
  background: #161616;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
}
.pantry-stat-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}
.pantry-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}
.pantry-stat-num.low { color: #ff9800; }
.pantry-stat-num.soon { color: #ffb74d; }

/* Subcategories Section */
.pantry-subcat-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #ccc;
  margin: 14px 0 8px;
  display: block;
}
.pantry-subcat-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.pantry-subcat-row::-webkit-scrollbar { display: none; }
.pantry-subcat-btn {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #bbb;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.pantry-subcat-btn.active {
  background: #fff;
  color: #0d0d0d;
  border-color: #fff;
  font-weight: 700;
}

/* Ingredients Section Header */
.pantry-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 22px 0 12px;
  padding: 0 4px;
}
.pantry-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.pantry-section-count {
  font-size: 12px;
  color: #888;
  font-weight: 600;
}

/* Dark Ingredient Cards (Image 3) */
.pantry-ing-card {
  background: #161616;
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  transition: transform .15s, border-color .15s;
}
.pantry-ing-card:hover {
  border-color: #383838;
}
.pantry-ing-icon {
  font-size: 22px;
  padding-top: 2px;
  flex-shrink: 0;
}
.pantry-ing-body {
  flex: 1;
  min-width: 0;
}
.pantry-ing-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.pantry-ing-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  word-break: break-word;
}
.pantry-ing-status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}
.pantry-ing-status.in-stock { color: #4caf50; }
.pantry-ing-status.low-stock { color: #ff9800; }
.pantry-ing-status.use-soon,
.pantry-ing-status.expiring { color: #ffb74d; }
.pantry-ing-status.out-of-stock { color: #ef5350; }

.pantry-ing-submeta {
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.5;
  margin: 1px 0;
}
.pantry-ing-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pantry-btn-chip {
  background: #222;
  border: 1px solid #333;
  color: #ccc;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pantry-btn-chip:hover {
  background: #2d2d2d;
  color: #fff;
  border-color: #444;
}
.pantry-btn-chip.green {
  border-color: rgba(46, 125, 50, 0.5);
  color: #81c784;
}
.pantry-btn-chip.danger {
  border-color: rgba(226, 68, 92, 0.4);
  color: #e57373;
}

/* Add an ingredient Form (Image 4) */
.pantry-add-box {
  background: #141414;
  border: 1px solid #262626;
  border-radius: 16px;
  padding: 20px 16px;
  margin: 24px 0 16px;
  text-align: left;
}
.pantry-add-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}
.pantry-add-desc {
  font-size: 12.5px;
  color: #888;
  margin: 0 0 16px;
}
.pantry-field-group {
  margin-bottom: 12px;
}
.pantry-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #bbb;
  margin-bottom: 6px;
}
.pantry-dark-input,
.pantry-dark-select {
  width: 100%;
  background: #202020;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 14px;
  color: #fff;
  outline: none;
  box-sizing: border-box;
}
.pantry-dark-input:focus,
.pantry-dark-select:focus {
  border-color: #4caf50;
  background: #262626;
}
.pantry-dark-input::placeholder {
  color: #666;
}
.pantry-submit-btn {
  width: 100%;
  background: #ffffff;
  color: #111111;
  border: none;
  border-radius: 30px;
  padding: 15px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .1s, background .15s;
}
.pantry-submit-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}
.pantry-submit-btn:active {
  transform: scale(0.99);
}
.pantry-validation-hint {
  font-size: 11.5px;
  color: #888;
  margin-top: 8px;
  line-height: 1.4;
}
.pantry-validation-hint.error {
  color: #ff5252;
  font-weight: 700;
}
.pantry-validation-hint.success {
  color: #4caf50;
  font-weight: 700;
}
.pantry-disclaimer-note {
  font-size: 10.5px;
  color: #666;
  line-height: 1.45;
  margin-top: 10px;
}

/* AI Meal Planner Integration Card (Images 1 & 5) */
.pantry-ai-card {
  background: #111;
  border: 1px solid #242424;
  border-radius: 16px;
  padding: 18px 16px;
  margin: 20px 0 16px;
  text-align: left;
}
.pantry-ai-header {
  font-size: 14px;
  font-weight: 800;
  color: #4caf50;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pantry-ai-feature {
  background: #181818;
  border: 1px solid #282828;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.pantry-ai-feature-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pantry-ai-feature-desc {
  font-size: 11.5px;
  color: #8e8e93;
  line-height: 1.4;
  margin-bottom: 8px;
}
.pantry-ai-action-btn {
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pantry-ai-action-btn:hover {
  background: #388e3c;
}

/* Add item form enhancements */
.pantry-select {
  width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 10px;
  font-size: 14px; margin-bottom: 4px; background: #fff; cursor: pointer;
  appearance: auto;
}
.pantry-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pantry-tag {
  padding: 6px 12px; border: 1px solid #ddd; border-radius: 16px;
  font-size: 12px; cursor: pointer; user-select: none; background: #fff;
}
.pantry-tag.selected { background: #2e7d32; color: #fff; border-color: #2e7d32; }

.pantry-note {
  font-size: 11.5px; color: #888; line-height: 1.45; margin: 12px 0 16px; text-align: left;
}

/* ============================================================
   RECIPES MENU SCREEN (Matches Screenshots 2, 3, 4, 5)
============================================================ */
#recipes-screen {
  padding: 16px 16px 110px;
  background: #f7faf7;
  min-height: 100vh;
}

/* Navigation bar */
/* Recipe search uses the app theme instead of a browser prompt. */
#recipe-search-dialog {
  box-sizing: border-box;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px;
  overflow: auto;
  border: 1px solid var(--app-line);
  border-radius: 28px;
  background: var(--app-canvas);
  color: var(--app-ink);
  box-shadow: 0 20px 70px rgba(15, 55, 40, .2);
}
#recipe-search-dialog::backdrop { background: rgba(15, 35, 27, .5); }
#recipe-search-dialog form { margin: 0; }
#recipe-search-dialog .recipe-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#recipe-search-dialog .recipe-search-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: var(--app-soft);
  color: var(--appearance-link, var(--app-brand));
}
#recipe-search-dialog .recipe-search-symbol svg { width: 26px; height: 26px; }
#recipe-search-dialog .recipe-search-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--app-line);
  border-radius: 50%;
  background: var(--app-canvas);
  color: var(--app-ink);
  font-size: 19px;
  cursor: pointer;
}
#recipe-search-dialog h2 { margin: 20px 0 8px; font-family: 'Outfit', sans-serif; font-size: 28px; line-height: 1.2; color: var(--app-ink); }
#recipe-search-dialog #recipe-search-description { margin: 0 0 24px; color: var(--app-muted); font-size: 14px; line-height: 1.6; }
#recipe-search-dialog label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--app-ink); }
#recipe-search-dialog input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--appearance-raised, #fff);
  color: var(--app-ink);
  font-size: 16px;
  line-height: 1.5;
}
#recipe-search-dialog input::placeholder { color: var(--app-muted); opacity: 1; }
#recipe-search-dialog #recipe-search-error { margin: 10px 0 0; color: var(--app-ink); font-size: 13px; line-height: 1.5; }
#recipe-search-dialog .recipe-search-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
#recipe-search-dialog .recipe-search-actions button {
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
#recipe-search-dialog .recipe-search-cancel { background: var(--app-soft); color: var(--app-ink); }
#recipe-search-dialog .recipe-search-submit { background: var(--app-brand); color: #fff; border-color: var(--app-brand); }
#recipe-search-dialog .recipe-search-submit:hover { background: var(--app-brand-hover); }
@media (max-width: 400px) {
  #recipe-search-dialog { padding: 24px 20px; border-radius: 24px; }
}

.recipes-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.recipes-nav-tabs {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.recipes-nav-tab {
  background: none;
  border: none;
  font-size: 26px;
  font-weight: 800;
  color: #9cb19e;
  cursor: pointer;
  padding: 0;
  line-height: 1.1;
  transition: color 0.18s ease;
}
.recipes-nav-tab.active {
  color: #1a4220;
}
.recipes-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.recipes-icon-btn,
.recipes-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d5e5d8;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  cursor: pointer;
  color: #244b28;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: background 0.15s ease;
}
.recipes-icon-btn:hover,
.recipes-close-btn:hover {
  background: #e9f3ea;
}

/* Hero Banner (Orange/Warm gradient like Screenshot 2) */
.recipes-hero-banner {
  background: linear-gradient(135deg, #ff8a65, #ff5722);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 87, 34, 0.28);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease;
}
.recipes-hero-banner:hover {
  transform: translateY(-2px);
}
.recipes-hero-text h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.3px;
}
.recipes-hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.95);
  color: #e64a19;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.recipes-hero-img-wrap {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}
.recipes-hero-food-icon {
  font-size: 52px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
}

/* Filter pills row */
.recipes-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.recipes-pills-row::-webkit-scrollbar {
  display: none;
}
.recipes-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #d4e7d7;
  border-radius: 24px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #2c5831;
  cursor: pointer;
  transition: all 0.15s ease;
}
.recipes-pill:hover {
  border-color: #2e7d32;
}
.recipes-pill.active {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
  box-shadow: 0 3px 10px rgba(46, 125, 50, 0.22);
}
.recipes-pill-icon {
  font-size: 15px;
}
.recipes-pills-row.cuisine-row {
  margin-bottom: 16px;
}
.recipes-pill.cuisine {
  font-size: 12px;
  padding: 6px 12px;
  border-color: #e5ece6;
  color: #526b56;
  background: #f4f8f4;
}
.recipes-pill.cuisine.active {
  background: #1a4220;
  color: #fff;
  border-color: #1a4220;
}

/* Category sections */
.recipes-section {
  margin-bottom: 22px;
}
.recipes-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.recipes-section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #1a4220;
}
.recipes-see-all-btn {
  background: none;
  border: none;
  color: #2e7d32;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.recipes-see-all-btn:hover {
  text-decoration: underline;
}

/* 2-Card Row for Sections (Matches Screenshots 2, 3, 5) */
.recipes-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.recipes-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e7eee8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-align: left;
}
.recipes-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  border-color: #a5d6a7;
}
.recipes-card-media {
  width: 100%;
  height: 120px;
  position: relative;
  background: #edf5ee;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.recipes-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.recipes-card:hover .recipes-card-media img {
  transform: scale(1.05);
}
.recipes-card-media-emoji {
  font-size: 48px;
}
.recipes-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff5722;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.recipes-wishlist-button {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #37613d;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
}
.recipes-wishlist-button.saved { color: #e14b5a; }
.recipes-card-content {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.recipes-card-title {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 800;
  color: #1f3a24;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}
.recipes-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #6d8270;
  margin-top: auto;
}
.recipes-meta-pill {
  background: #eef6ef;
  color: #2e7d32;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
}
.recipes-meta-cal {
  font-weight: 600;
  color: #888;
}

/* See-All Drill-Down View (Matches Screenshot 4) */
.recipes-seeall-view {
  background: #f7faf7;
  padding-bottom: 20px;
}
.recipes-seeall-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.recipes-back-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #d4e3d6;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: #2e7d32;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.recipes-back-circle-btn:hover {
  background: #e9f3ea;
}
.recipes-seeall-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: #1a4220;
  flex: 1;
}
.recipes-seeall-count {
  font-size: 12px;
  font-weight: 700;
  color: #2e7d32;
  background: #eaf3eb;
  padding: 4px 10px;
  border-radius: 12px;
}
/* Purchase controls extend the existing budget screen without changing its layout. */
#budget-screen .budget-entry-panel { margin: 16px 0; padding: 14px; border: 1px solid #d4e7d7; border-radius: 14px; text-align: left; }
#budget-screen .budget-entry-panel label { display: block; font-size: 12px; margin: 10px 0 5px; }
#budget-screen .budget-entry-panel .onb-input { width: 100%; min-width: 0; box-sizing: border-box; margin-bottom: 8px; }
#budget-screen .budget-entry-panel summary { cursor: pointer; font-size: 13px; }
#budget-screen .budget-text-button, #budget-screen .budget-history-actions button { color: #176844; background: transparent; border: 1px solid #d4e7d7; border-radius: 8px; padding: 9px 12px; cursor: pointer; margin-top: 8px; }
#budget-screen .budget-history-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid #d4e7d7; text-align: left; }
#budget-screen .budget-history-row > div:first-child { flex: 1; min-width: 120px; overflow-wrap: anywhere; }
#budget-screen .budget-history-row small { display: block; color: #5d7162; margin-top: 4px; font-size: 11px; }
#budget-screen .budget-history-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
#budget-receipt-editor[hidden] { display: none; }
#budget-receipt-editor .receipt-item { min-width: 0; }
#budget-receipt-editor .receipt-fields label { min-width: 0; }
#budget-receipt-editor .onb-input { width: 100%; min-width: 0; box-sizing: border-box; }
#budget-receipt-error { color: #a13224; }
#budget-screen .legend-item { flex-wrap: wrap; }
#budget-screen .budget-total-row { flex-wrap: wrap; overflow-wrap: anywhere; }
#budget-screen #budget-message:not(:empty) { color: #a13224; }
.recipes-goal-controls[hidden] { display: none; }
.recipes-goal-controls { margin: 0 0 16px; min-width: 0; }
.recipes-goal-controls h3 { margin: 12px 0 8px; font-size: 13px; color: #254932; }
.recipes-category-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.recipes-category-pills .recipes-pill { margin: 0; min-height: 40px; padding: 8px 10px; white-space: normal; font-size: 12px; }
.recipes-category-pills .recipes-pill span { font-size: 10px; opacity: .8; }
.recipes-category-pills .recipes-pill:focus-visible, .recipes-category-reset:focus-visible,
.recipes-classification-rules summary:focus-visible { outline: 2px solid #278556; outline-offset: 2px; }
.recipes-classification-note, .recipes-classification-rules { font-size: 11px; line-height: 1.5; color: #5d7162; overflow-wrap: anywhere; }
.recipes-classification-note { margin: 10px 0 5px; }
.recipes-category-reset { border: 0; background: transparent; color: #176844; font-size: 12px; text-decoration: underline; padding: 8px 0; cursor: pointer; }
.recipes-classification-rules summary { cursor: pointer; padding: 4px 0; }
.recipes-classification-rules ul { padding-left: 18px; }
.recipes-nutrition-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.recipes-nutrition-tags:empty { display: none; }
.recipes-nutrition-tags span { border-radius: 8px; padding: 3px 6px; background: #edf5e9; color: #356047; font-size: 10px; line-height: 1.3; }
.recipes-seeall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}



/* Mobile viewport fit for MealMate */
@media (max-width: 400px) {
  body { padding: 10px; }
  .phone { width: 100%; padding-left: 12px; padding-right: 12px; }
  #meal-detail-screen { padding-left: 12px; padding-right: 12px; }
  #meal-detail-screen .detail-section-card { padding: 12px; }
  #detail-ingredients-list.detail-ingredients-grid { gap: 6px; }
  #detail-ingredients-list .ingredient-visual-card { gap: 6px; padding: 7px 6px; }
  #detail-ingredients-list .ingredient-image-wrap { width: 32px; height: 32px; flex-basis: 32px; }
  .detail-cooking-options { grid-template-columns: 1fr; }
}


/* ===== MealMate chat: scoped to the assistant screen ===== */
#chat-screen { text-align: left; color: #193d32; }
#chat-screen.active { display: flex; flex-direction: column; height: calc(100dvh - 96px); min-height: 570px; }
#chat-screen [hidden] { display: none !important; }
#chat-screen button, #chat-screen textarea { font: inherit; }
#chat-screen button { cursor: pointer; }
#chat-screen button:disabled { cursor: default; opacity: .48; }
#chat-screen button:focus-visible, #chat-screen textarea:focus-visible { outline: 3px solid #6aaa86; outline-offset: 3px; }
.mm-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0 15px; flex-shrink: 0; }
.mm-chat-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mm-chat-mark { display: grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; border-radius: 13px; background: #246747; color: #e9f4cd; font-size: 26px; }
.mm-chat-brand h1 { margin: 0 0 4px; font-size: 20px; line-height: 1.2; letter-spacing: -.6px; }
.mm-chat-brand h1 span { font-size: 11px; letter-spacing: 0; padding: 3px 5px; border-radius: 5px; background: #dfeccb; color: #356b45; vertical-align: middle; }
.mm-chat-brand p { color: #6b7d70; font-size: 10px; line-height: 1.4; }
.mm-chat-new { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 36px; flex-shrink: 0; padding: 6px 8px; border: 1px solid #d3dfcb; border-radius: 10px; background: #fffef8; color: #345e45; font-size: 11px !important; }
.mm-chat-context { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; flex-shrink: 0; }
.mm-chat-context span { border: 1px solid #dce5d3; border-radius: 20px; padding: 5px 8px; font-size: 10px; line-height: 1.3; color: #536a52; background: #f5f7eb; }
.mm-chat-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c7d8be transparent; padding: 0 2px 8px; scroll-padding-bottom: 10px; }
.mm-chat-welcome { text-align: center; padding: 18px 0 4px; }
.mm-chat-welcome-icon { display: grid; place-items: center; width: 65px; height: 65px; margin: 0 auto 16px; border-radius: 23px; font-size: 33px; background: linear-gradient(145deg, #edf2d5, #d7e7c5); box-shadow: 0 5px 14px #496a4220; transform: rotate(-5deg); }
.mm-chat-eyebrow { color: #6d845a; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 9px; }
.mm-chat-welcome h2 { font-size: 25px; line-height: 1.2; letter-spacing: -.8px; color: #244a37; margin: 0 0 10px; }
.mm-chat-welcome > p:not(.mm-chat-eyebrow) { max-width: 285px; margin: 0 auto 22px; color: #6b7c6b; font-size: 13px; line-height: 1.65; }
#chat-screen .chat-quick-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
#chat-screen .quick-chip { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 65px; text-align: left; color: #2e513b; background: #fffef9; border: 1px solid #dce4d1; border-radius: 14px; box-shadow: 0 2px 6px #39503405; white-space: normal; }
#chat-screen .quick-chip > span:first-child { display: grid; place-items: center; width: 35px; height: 35px; flex-shrink: 0; font-size: 21px; border-radius: 11px; background: #edf3e4; }
#chat-screen .quick-chip > span:nth-child(2) { flex: 1; font-size: 13px; font-weight: 700; }
#chat-screen .quick-chip small { display: block; margin-top: 4px; font-size: 10px; font-weight: 400; color: #7a8773; line-height: 1.4; }
#chat-screen .quick-chip b { color: #91a080; font-size: 17px; font-weight: 400; }
#chat-screen .quick-chip:hover { border-color: #91b18b; background: #f3f7ed; }
.mm-chat-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 8px; }
.mm-chat-starters button { border: 0; background: transparent; padding: 6px 3px; font-size: 11px !important; color: #61785b; }
#chat-screen #chat-messages { max-height: none; overflow: visible; margin: 0; padding: 4px 0; }
.mm-chat-message { margin: 9px 0 20px; min-width: 0; }
.mm-chat-message-meta { display: flex; align-items: center; gap: 9px; margin: 0 3px 7px; font-size: 10px; }
.mm-chat-speaker { color: #54724f; font-weight: 700; }
.mm-chat-message-meta time { color: #899281; font-size: 9px; }
#chat-screen .chat-bubble { max-width: 100%; margin: 0; padding: 14px; border-radius: 3px 15px 15px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; box-shadow: none; }
#chat-screen .chat-bubble.bot { border: 1px solid #dbe4d1; background: #fffef9; color: #365040; }
#chat-screen .chat-bubble.user { background: #2d694c; color: #fff; border-radius: 15px 3px 15px 15px; }
.mm-chat-text { white-space: pre-line; margin: 0; }
.mm-chat-message.user { margin-left: 30px; }
.mm-chat-message.user .mm-chat-message-meta { justify-content: flex-end; }
.mm-chat-recipe { display: flex; width: 100%; align-items: flex-start; gap: 9px; margin-top: 11px; padding: 11px 9px; border: 1px solid #dbe6d1; border-radius: 12px; text-align: left; background: #f5f8ee; color: #254932; }
.mm-chat-recipe:hover { border-color: #8ab184; background: #edf4e5; }
.mm-chat-recipe-icon { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 35px; border-radius: 10px; background: #e4edda; font-size: 22px; }
.mm-chat-recipe-detail { display: block; flex: 1; min-width: 0; }
.mm-chat-recipe-detail strong { display: block; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.mm-chat-recipe-detail small { display: block; margin-top: 4px; font-size: 10px; line-height: 1.6; color: #6b7e60; }
.mm-chat-recipe-link { display: block; margin-top: 4px; font-size: 10px; color: #337750; font-weight: 700; }
.mm-chat-estimate { font-size: 10px; color: #7b8971; margin: 10px 0 0; line-height: 1.5; }
.mm-chat-copy { border: 0; background: transparent; color: #73826c; font-size: 10px !important; margin: 6px 0 0; padding: 5px 2px; }
.mm-chat-actions, .mm-chat-followups { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mm-chat-actions button { background: #e6efdb; border: 1px solid #cbdcbd; border-radius: 8px; color: #355b38; padding: 8px 10px; font-size: 11px !important; min-height: 34px; }
.mm-chat-followups button { background: transparent; border: 1px solid #cfddc4; border-radius: 16px; color: #5c7351; padding: 7px 10px; font-size: 10px !important; min-height: 32px; }
.mm-chat-typing { display: flex; align-items: center; gap: 8px; color: #68865a; margin: 0 0 12px 3px; font-size: 12px; min-height: 28px; }
.mm-chat-typing > span:first-child { font-size: 20px; }
.mm-chat-dots { display: inline-flex; gap: 3px; }
.mm-chat-dots i { width: 4px; height: 4px; background: #6a8b5e; border-radius: 50%; animation: mm-chat-pulse 1s infinite; }
.mm-chat-dots i:nth-child(2) { animation-delay: .15s; }.mm-chat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mm-chat-pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.mm-chat-composer { flex-shrink: 0; margin-top: 9px; padding-top: 9px; border-top: 1px solid #e0e7d5; }
#chat-screen .chat-input-row { display: flex; align-items: flex-end; gap: 7px; padding: 6px; border: 1px solid #becfb2; background: #fffef9; border-radius: 17px; box-shadow: 0 3px 12px #46673e08; }
#chat-screen .chat-input-row:focus-within { border-color: #648f67; box-shadow: 0 0 0 3px #90af7c17; }
#chat-screen #chat-input { min-width: 0; flex: 1; border: 0; border-radius: 0; outline: 0; resize: none; background: transparent; padding: 7px 3px 7px 6px; min-height: 39px; max-height: 136px; margin: 0; color: #234b36; font-size: 14px; line-height: 1.6; box-shadow: none; }
#chat-screen #chat-input::placeholder { color: #8c9880; }
#chat-screen .chat-send-btn { display: grid; place-items: center; width: 38px; height: 38px; min-width: 38px; border-radius: 12px; border: 0; background: #2d694c; color: #fff; font-size: 25px; }
.mm-chat-composer-meta { display: flex; justify-content: space-between; gap: 8px; padding: 8px 2px 2px; color: #839078; font-size: 9px; line-height: 1.5; }
#chat-usage { flex-shrink: 0; color: #6d835e; }
.mm-chat-status { margin: 6px 0 0; padding: 8px; color: #715c2d; background: #f7efd9; border-radius: 9px; font-size: 12px; line-height: 1.5; }
#chat-screen > .bottom-nav { flex-shrink: 0; margin-top: 12px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.mm-chat-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
  #chat-screen.active { height: calc(100dvh - 57px); min-height: 0; }
  #chat-screen #chat-input { font-size: 16px; }
}
@media (max-width: 350px) {
  .mm-chat-brand h1 { font-size: 18px; }
  .mm-chat-brand p { font-size: 9px; }
  .mm-chat-new { width: 33px; padding: 5px; font-size: 18px !important; }
  .mm-chat-new span { display: none; }
  .mm-chat-welcome { padding-top: 6px; }
  .mm-chat-welcome h2 { font-size: 23px; }
  .mm-chat-welcome-icon { width: 52px; height: 52px; font-size: 28px; margin-bottom: 12px; }
  .mm-chat-welcome > p:not(.mm-chat-eyebrow) { margin-bottom: 16px; }
  .mm-chat-composer-meta { font-size: 8px; gap: 4px; }
}
@media (max-height: 620px) {
  #chat-screen.active { height: calc(100dvh - 57px); min-height: 0; }
  .mm-chat-header { padding-bottom: 8px; }
  .mm-chat-context { padding-bottom: 6px; }
  #chat-screen > .bottom-nav { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .mm-chat-dots i { animation: none; } }

/* Fit the chat shell to the viewport while its conversation scrolls. */
.phone:has(> #chat-screen.active) { height: calc(var(--mm-chat-viewport, 100dvh) - var(--mm-chat-page-space, 36px)); min-height: 0; display: flex; flex-direction: column; padding-bottom: 12px; }
.phone > #chat-screen.active { flex: 1; height: auto; min-height: 0; }
.mm-chat-welcome { padding-top: 10px; }
.mm-chat-welcome-icon { width: 50px; height: 50px; font-size: 28px; margin-bottom: 12px; }
.mm-chat-welcome > p:not(.mm-chat-eyebrow) { margin-bottom: 16px; }
@media (max-width: 480px) { .phone:has(> #chat-screen.active) { height: calc(var(--mm-chat-viewport, 100dvh) - var(--mm-chat-page-space, 20px)); } }

#chat-screen .chat-bubble { font-size: 15px; }
.mm-chat-recipe-detail strong { font-size: 14px; }

/* ===== More healthy tips, sourced facts, and practical guides ===== */
#tips-screen [hidden], #tip-article-screen [hidden] { display: none !important; }
#tips-screen .tips-fact-count { color: #6b806d; font-size: 12px; flex-shrink: 0; }
.tips-fact-card { padding: 18px; border: 1px solid #cadfc1; border-radius: 19px; background: linear-gradient(140deg, #eef5df, #f9fcf1); text-align: left; }
#tips-fact-content { display: flex; align-items: flex-start; gap: 11px; }
.tips-fact-emoji { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: #dfedcf; font-size: 24px; }
#tips-fact-text { margin: 0; color: #2e503a; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.tips-fact-source { display: inline-block; margin-top: 13px; color: #4b7151; font-size: 11px; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.tips-fact-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tips-fact-guide { background: none; border: 0; color: #2b6e43; font: 700 12px/1.4 Arial, sans-serif; text-align: left; min-height: 44px; cursor: pointer; }
.tips-fact-pager { display: flex; gap: 6px; flex-shrink: 0; }
.tips-fact-pager button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #c6d9bb; border-radius: 50%; background: #fffef8; color: #396b43; font-size: 19px; cursor: pointer; }
#tips-screen .tips-extra-card { min-height: 235px; padding-bottom: 44px; }
#tips-screen .tips-extra-card strong { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
#tips-screen .tips-extra-card em { font-size: 12px; line-height: 1.5; }
#tips-screen .tips-extra-card .tips-card-tag { line-height: 1.45; }
#tips-screen button:focus-visible, #tips-screen a:focus-visible, #tip-article-screen a:focus-visible { outline: 3px solid #2d9662; outline-offset: 3px; }
#tip-article-screen .tip-article-copy { font-size: 15px; line-height: 1.75; }
.tip-article-fact { margin: 0 0 17px; padding: 14px; border-left: 4px solid #7ea963; border-radius: 0 12px 12px 0; background: #eff5e3; color: #3e5f3c; font-size: 14px; line-height: 1.65; text-align: left; }
.tip-article-action { margin-top: 18px; padding: 15px; background: #eaf4e7; border: 1px solid #cfdfc6; border-radius: 14px; text-align: left; }
.tip-article-action h3 { font-size: 15px; color: #2f6842; margin: 0 0 7px; }
.tip-article-action p { font-size: 14px; line-height: 1.65; color: #436047; margin: 0; }
.tip-article-sources { margin: 21px 0 0; padding-top: 14px; border-top: 1px solid #d9e2cf; text-align: left; overflow-wrap: anywhere; }
.tip-article-sources p { font-size: 11px; font-weight: 700; color: #76856f; margin-bottom: 8px; }
.tip-article-sources a { color: #2d754c; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; line-height: 1.6; }
@media (max-width: 350px) {
  .tips-fact-card { padding: 13px; }
  #tips-fact-content { gap: 8px; }
  #tips-fact-text { font-size: 14px; }
  .tips-fact-emoji { width: 32px; height: 32px; flex-basis: 32px; font-size: 21px; }
  #tips-screen .tips-extra-card { padding-left: 11px; padding-right: 11px; }
  #tips-screen .tips-extra-card strong { font-size: 15px; }
}

#tip-article-screen .tips-article-back { border: 0; background: transparent; cursor: pointer; }
#tip-article-screen .tips-article-back:focus-visible { outline: 3px solid #2d9662; outline-offset: 3px; }

/* Settings links and in-app legal / feedback pages */
.settings-group-title { margin: 22px 4px 9px; color: #52705d; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.settings-link-row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 54px; margin: 0 0 8px; padding: 11px 14px; border: 1px solid #e2eee5; border-radius: 12px; background: #fff; color: #24382b; text-align: left; font: inherit; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.035); }
.settings-link-row:hover { background: #f8fcf8; }
.settings-link-icon { width: 30px; flex: 0 0 30px; font-size: 18px; text-align: center; }
.settings-link-label { flex: 1; font-weight: 650; font-size: 14px; }
.settings-link-row .pl-arrow { font-size: 23px; color: #829386; }
.policy-screen { padding-bottom: 24px; }
.policy-updated { margin: 0 2px 13px; color: #718075; font-size: 12px; }
.policy-card { margin: 0 0 10px; padding: 15px; border: 1px solid #e1eee3; border-radius: 14px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.035); }
.policy-card h3 { margin: 0 0 7px; color: #286b40; font-size: 15px; line-height: 1.35; }
.policy-card p { margin: 0; color: #526157; font-size: 13px; line-height: 1.62; overflow-wrap: anywhere; }
.rating-card { margin: 18px 0 10px; padding: 24px 18px; border: 1px solid #dcecdf; border-radius: 20px; background: linear-gradient(155deg,#f7fcf7,#fff); text-align: center; }
.rating-illustration { display: grid; width: 64px; height: 64px; margin: 0 auto 12px; place-items: center; border-radius: 50%; background: #e5f4e8; font-size: 30px; }
.rating-card h2 { margin: 0 0 6px; color: #284933; font-size: 21px; }
.rating-card .desc { margin: 0 auto; font-size: 13px; }
.rating-stars { display: flex; justify-content: center; gap: 4px; margin: 17px 0 4px; }
.rating-star { width: 44px; height: 48px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #c8d1c9; font-size: 34px; line-height: 1; cursor: pointer; transition: transform .15s ease, color .15s ease; }
.rating-star.selected { color: #e8ad35; }
.rating-star:hover { transform: translateY(-2px); }
.rating-star:focus-visible, .settings-link-row:focus-visible { outline: 3px solid #73b884; outline-offset: 2px; }
.rating-caption { min-height: 20px; margin: 3px 0 14px; color: #52705d; font-size: 13px; font-weight: 700; }
.rating-card .btn-primary { margin: 0; }
.rating-card .btn-primary:disabled { opacity: .52; cursor: not-allowed; }
.rating-note { max-width: 255px; margin: 13px auto 0; color: #849087; font-size: 11px; line-height: 1.5; }
@media (max-width: 360px) {
  .policy-card { padding: 13px; }
  .rating-card { padding: 21px 12px; }
  .rating-star { width: 40px; font-size: 31px; }
}

/* Profile daily food budget and budget-aware recipe notes */
#profile-screen > .profile-list .pl-value.profile-budget-value { display: block; color: #2e7d32; font-weight: 750; white-space: nowrap; }
.profile-budget-screen { padding-bottom: 24px; }
.profile-budget-panel { margin-top: 12px; padding: 18px 16px; border: 1px solid #e0eee2; border-radius: 16px; background: #fff; box-shadow: 0 2px 8px rgba(28,75,38,.06); }
.profile-budget-copy { margin: 0 0 16px; line-height: 1.55; }
.profile-budget-range-label { display: block; margin: 16px 0 4px; color: #607064; font-size: 12px; font-weight: 700; }
.profile-budget-presets { margin: 12px 0 22px; }
.budget-recipe-note, .budget-recipe-empty { margin: 0 0 9px; color: #718075; font-size: 11.5px; line-height: 1.45; }
@media (max-width: 360px) { .profile-budget-panel { padding: 15px 12px; } }

/* Home daily water and step trackers */
.daily-activity-trackers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.daily-tracker { min-width: 0; padding: 12px; border: 1px solid #e4ede1; border-radius: 15px; background: rgba(255,255,255,.9); box-shadow: 0 2px 7px rgba(38,83,43,.05); }
.daily-tracker-heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.daily-tracker-heading h3 { margin: 0; color: #31553a; font-size: 13px; font-weight: 750; }
.daily-tracker-heading h3 span { margin-right: 3px; }
.daily-tracker-heading strong { color: #183c25; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.daily-tracker-caption { min-height: 27px; margin: 5px 0 9px; color: #7a877b; font-size: 10.5px; line-height: 1.3; }
.daily-tracker-actions { display: flex; gap: 6px; }
.daily-tracker-actions button, .steps-entry-row button, .steps-quick-add { min-height: 36px; border: 1px solid #cfe4d0; border-radius: 9px; background: #f2f8f0; color: #2e7d32; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.daily-tracker-actions button { flex: 1; min-width: 0; padding: 6px 4px; }
.steps-entry-row { display: flex; gap: 5px; align-items: center; }
.steps-entry-row input { width: 1px; min-width: 0; flex: 1; height: 36px; margin: 0 !important; padding: 6px 7px; border: 1px solid #dce7da; border-radius: 8px; background: #fff; color: #24382b; font-size: 12px; }
.steps-entry-row button { flex: 0 0 auto; padding: 6px 9px; }
.steps-quick-add { width: 100%; margin-top: 6px; padding: 5px 8px; }
.daily-tracker button:hover { background: #e8f4e7; }
.daily-tracker button:focus-visible, .steps-entry-row input:focus-visible { outline: 2px solid #56a96a; outline-offset: 2px; }
@media (max-width: 360px) { .daily-activity-trackers { grid-template-columns: 1fr; } .daily-tracker-caption { min-height: 0; } }

/* Meal and activity history */
#home-meals-list { padding-bottom: 12px; }
.home-meal-entry { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 8px; }
.home-meal-entry .home-meal-card { min-width: 0; }
.meal-eaten-toggle { width: 42px; height: 42px; border: 1px solid #c9ddca; border-radius: 50%; background: #fff; color: #6d8b70; font-size: 21px; font-weight: 800; cursor: pointer; box-shadow: 0 2px 8px rgba(31,71,45,.08); }
.meal-eaten-toggle.saved { border-color: #2e9a65; background: #2e9a65; color: #fff; }
.meal-eaten-toggle:focus-visible, .history-open-button:focus-visible, .history-period-btn:focus-visible { outline: 3px solid #7ecb92; outline-offset: 2px; }
.history-open-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; margin: 4px 0 18px; padding: 12px 15px; border: 1px solid #d9e9da; border-radius: 13px; background: #f7fbf5; color: #286b40; text-align: left; font-size: 14px; font-weight: 750; cursor: pointer; }
.history-open-button span { font-size: 23px; line-height: 1; }
.history-screen { padding-bottom: 28px; text-align: left; }
.history-period-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 8px 0 13px; padding: 4px; border-radius: 12px; background: #eaf2e9; }
.history-period-btn { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: #5c7660; font-size: 12px; font-weight: 750; cursor: pointer; }
.history-period-btn.active { background: #fff; color: #247b42; box-shadow: 0 1px 5px rgba(28,74,40,.12); }
.history-date-label { margin: 0 0 5px; color: #748176; font-size: 11px; font-weight: 700; }
.history-date-picker { height: 42px; margin: 0 0 8px !important; padding: 8px 11px !important; }
.history-period-heading { margin: 5px 0 11px; color: #31553a; font-size: 16px; font-weight: 800; }
.history-period-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 18px; padding: 11px; border: 1px solid #e0ecdf; border-radius: 15px; background: #fff; }
.history-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 7px 8px; border-radius: 9px; background: #f7faf6; }
.history-stat span { color: #768278; font-size: 10px; }
.history-stat b { color: #254b30; font-size: 13px; overflow-wrap: anywhere; }
.history-summary-caption { grid-column: 1 / -1; margin: 2px 0 0; color: #89948b; font-size: 10px; text-align: right; }
.history-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 1px 9px; }
.history-list-heading h3 { color: #254b30; font-size: 15px; }
.history-add-meal { min-height: 36px; padding: 7px 10px; border: 1px solid #cfe4d0; border-radius: 10px; background: #f1f8ef; color: #2e7d32; font-size: 11px; font-weight: 750; cursor: pointer; }
.history-days-list { display: grid; gap: 10px; }
.history-day-card { padding: 13px; border: 1px solid #e1ece0; border-radius: 15px; background: #fff; box-shadow: 0 2px 7px rgba(38,83,43,.04); }
.history-day-heading h3 { margin: 0; color: #284c31; font-size: 13px; line-height: 1.35; }
.history-day-heading p { margin: 5px 0 0; color: #718075; font-size: 10.5px; line-height: 1.4; }
.history-day-macros { margin: 7px 0 9px; color: #52675a; font-size: 10px; line-height: 1.45; }
.history-meal-list { display: grid; gap: 6px; }
.history-meal-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border-radius: 10px; background: #f6f8f6; }
.history-meal-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.history-meal-copy b { overflow: hidden; color: #294232; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-meal-copy small { color: #758078; font-size: 9.5px; line-height: 1.35; }
.history-meal-actions { display: flex; flex: 0 0 auto; gap: 4px; }
.history-meal-actions button { min-width: 30px; min-height: 30px; padding: 4px 7px; border: 1px solid #dbe7da; border-radius: 8px; background: #fff; color: #2d7841; font-size: 10px; font-weight: 750; cursor: pointer; }
.history-no-meals { margin: 5px 0; color: #8a958d; font-size: 11px; }
.history-edit-activity { margin-top: 10px; padding: 6px 0; border: 0; background: transparent; color: #36764a; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.history-empty-state { margin: 12px 0; padding: 16px; border-radius: 13px; background: #f4f8f2; color: #738076; font-size: 12px; line-height: 1.55; text-align: center; }
.history-modal-backdrop { position: absolute; z-index: 50; inset: 0; align-items: center; justify-content: center; padding: 18px; background: rgba(16,35,22,.48); }
.history-editor-card { width: 100%; max-height: 90%; overflow: auto; padding: 16px; border-radius: 17px; background: #fff; box-shadow: 0 10px 35px rgba(0,0,0,.2); text-align: left; }
.history-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-editor-heading h2 { color: #254b30; font-size: 17px; }
.history-editor-heading button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eef5ec; color: #46684a; font-size: 21px; cursor: pointer; }
.history-editor-note { margin: 4px 0 10px; color: #7d8a7e; font-size: 11px; }
.history-editor-card label { margin: 9px 0 0; color: #4e6252; font-size: 11px; }
.history-editor-card input { height: 38px; margin: 4px 0 0 !important; padding: 8px 10px !important; font-size: 13px; }
.history-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 9px; }
.history-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 14px; }
.history-editor-actions .btn-primary { min-height: 42px; padding: 10px; font-size: 13px; }
.history-delete-button { min-height: 40px; padding: 8px 12px; border: 1px solid #f0d1d1; border-radius: 9px; background: #fff8f8; color: #b34545; font-size: 11px; font-weight: 750; cursor: pointer; }
.history-activity-editor-card .history-editor-actions { justify-content: flex-end; }
@media (max-width: 360px) { .home-meal-entry { grid-template-columns: minmax(0,1fr) 38px; gap: 6px; } .meal-eaten-toggle { width: 38px; height: 38px; } .history-period-summary { padding: 8px; gap: 5px; } .history-day-card { padding: 11px; } }

.home-meal-history-hint { margin: -4px 1px 8px; color: #758078; font-size: 10.5px; line-height: 1.4; }


/* Home dashboard visual polish */
#home-screen .home-header { margin: 0 2px 18px; }
#home-screen .menu-icon, #home-screen .bell-icon { cursor: pointer; }
#home-screen .summary-card {
  border: 1px solid #edf0e8;
  border-radius: 19px;
  padding: 19px 18px;
  box-shadow: 0 5px 18px rgba(39, 69, 43, .055);
}
#home-screen .summary-label { color: #66766b; font-size: 13px; letter-spacing: .01em; }
#home-screen .cal-value { color: #173a2b; letter-spacing: -.25px; }
#home-screen .progress-track { background: #e3e9df; }
#home-screen .progress-fill { background: linear-gradient(90deg, #27965d, #45ad70); }
#home-screen .macros-row { gap: 8px; }
#home-screen .macro { color: #263a2e; line-height: 1.3; }
#home-screen .macro-icon { box-shadow: 0 1px 4px rgba(31, 71, 45, .04); }
#home-screen .micro-row { border-color: #e8eee5; }
#home-screen .daily-tracker {
  padding: 14px 12px;
  border-color: #e4ecdf;
  border-radius: 17px;
  background: var(--app-surface);
  box-shadow: 0 3px 11px rgba(38, 83, 43, .055);
}
#home-screen .daily-tracker-heading { align-items: center; text-align: center; }
#home-screen .daily-tracker-heading h3 { color: #31553a; font-size: 13px; }
#home-screen .daily-tracker-heading strong { color: #173a2b; font-size: 17px; }
#home-screen .daily-tracker-caption { color: #748176; line-height: 1.4; }
#home-screen .daily-tracker-actions button,
#home-screen .steps-entry-row button,
#home-screen .steps-quick-add { transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
#home-screen .daily-tracker-actions button:active,
#home-screen .steps-entry-row button:active,
#home-screen .steps-quick-add:active { transform: scale(.97); }
#home-screen .section-title { margin-top: 18px; color: #203a2b; }
#home-screen .home-meal-history-hint { margin-bottom: 10px; }
#home-screen .home-meal-card { border: 1px solid #edf0e8; border-radius: 17px; box-shadow: 0 3px 12px rgba(31, 71, 45, .065); }
#home-screen .home-meal-recipe { background: #f3f5f6; }
#home-screen .home-meal-entry { grid-template-columns: minmax(0, 1fr) 50px; gap: 10px; }
#home-screen .meal-eaten-toggle {
  width: 50px; height: 50px;
  border-color: #d5e5d6;
  color: #5f8968;
  font-size: 25px;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
#home-screen .meal-eaten-toggle:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(31, 71, 45, .14); }
#home-screen .meal-eaten-toggle.saved { box-shadow: 0 3px 9px rgba(46, 154, 101, .22); }
#home-screen .history-open-button { border-radius: 15px; background: #f5f9f1; }
#home-screen .home-meal-card:focus-visible,
#home-screen .meal-eaten-toggle:focus-visible,
#home-screen .history-open-button:focus-visible { outline: 3px solid #7ecb92; outline-offset: 2px; }
@media (max-width: 360px) {
  #home-screen .summary-card { padding: 16px 14px; }
  #home-screen .daily-tracker { padding: 12px 9px; }
  #home-screen .daily-tracker-heading strong { font-size: 15px; }
  #home-screen .home-meal-entry { grid-template-columns: minmax(0, 1fr) 40px; gap: 6px; }
  #home-screen .meal-eaten-toggle { width: 40px; height: 40px; font-size: 21px; }
}


/* Clear, consistent Home action symbols */
#home-screen .home-meal-entry .meal-eaten-toggle {
  display: grid;
  place-items: center;
  font-size: 0;
}
#home-screen .home-meal-entry .meal-eaten-toggle::after {
  content: "";
  width: 9px;
  height: 16px;
  margin-top: -3px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
#home-screen .home-meal-entry .home-meal-open {
  display: inline-grid;
  width: 18px;
  height: 22px;
  place-items: center;
  font-size: 0;
}
#home-screen .home-meal-entry .home-meal-open::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
#home-screen > .btn-primary[onclick*="startCamera"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 0;
}
#home-screen > .btn-primary[onclick*="startCamera"]::before {
  content: "";
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 3 7.2 5H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3.2L15 3H9Zm3 4a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 3 7.2 5H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3.2L15 3H9Zm3 4a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
#home-screen > .btn-primary[onclick*="startCamera"]::after {
  content: "Scan Your Food";
  font-size: 16px;
}


/* Make the meal checkmark crisp on touch screens */
#home-screen .home-meal-entry .meal-eaten-toggle {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#home-screen .home-meal-entry .meal-eaten-toggle::after {
  width: 11px;
  height: 19px;
  border-right-width: 3.5px;
  border-bottom-width: 3.5px;
}
#home-screen .home-meal-entry .meal-eaten-toggle.saved {
  color: #fff;
}
#home-screen .home-meal-entry .meal-eaten-toggle:active {
  transform: scale(.92);
}
#home-screen .home-meal-entry .meal-eaten-toggle:active::after {
  transform: rotate(45deg) scale(.9);
}


/* Reduce only the checkmark glyph; keep its touch target unchanged */
#home-screen .home-meal-entry .meal-eaten-toggle::after {
  width: 5px;
  height: 9px;
  border-right-width: 1.5px;
  border-bottom-width: 1.5px;
  margin-top: -2px;
}

/* Weekly plans use the existing meal cards, with expandable recipe details. */
#weekly-meal-list { padding-bottom: 12px; }
.weekly-day { margin-bottom: 8px; border-radius: 12px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.weekly-day > .meal-item { margin-bottom: 0; cursor: pointer; list-style: none; gap: 12px; }
.weekly-day > summary::-webkit-details-marker { display: none; }
.weekly-day > summary small { display: block; margin-top: 4px; font-size: 11px; color: #62746c; }
.weekly-day .meal-kcal { flex-shrink: 0; font-size: 12px; }
.weekly-day-body { padding: 0 16px 12px; }
.weekly-day-macros { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; padding: 10px 0; border-top: 1px solid #edf1eb; font-size: 11px; }
.weekly-day-macros span { display: flex; flex-wrap: wrap; gap: 3px 6px; justify-content: space-between; }
.weekly-recipe { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border: 0; border-top: 1px solid #edf1eb; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.weekly-recipe > span:first-child { min-width: 0; }
.weekly-recipe > span:last-child { flex-shrink: 0; text-align: right; font-size: 11px; }
.weekly-recipe small { display: block; margin: 3px 0; color: #62746c; font-size: 10px; }
.weekly-plan-note { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: #62746c; }

/* MealMate app theme: presentation only. Screen visibility and data stay intact. */
:root {
  --app-brand: #147d64;
  --app-brand-hover: #10654f;
  --app-ink: #1d302b;
  --app-muted: #66776f;
  --app-canvas: #faf7f0;
  --app-surface: #f1e9dd;
  --app-soft: #eaf5ef;
  --app-line: #dfe8e2;
  --app-shadow: 0 3px 16px rgba(24, 58, 43, .045);
  --nature-ink: var(--app-ink);
  --nature-green: var(--app-brand);
  --nature-green-dark: var(--app-brand-hover);
  --nature-cream: var(--app-canvas);
  --nature-soft: var(--app-soft);
  --nature-line: var(--app-line);
  --nature-shadow: var(--app-shadow);
}
* { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body {
  padding: 24px;
  background: var(--app-surface);
  color: var(--app-ink);
  -webkit-font-smoothing: antialiased;
}
.phone {
  width: min(100%, 430px);
  min-height: calc(100dvh - 48px);
  padding: 28px 22px 24px;
  background: var(--app-canvas);
  border: 1px solid #d9e3dc;
  border-radius: 28px;
  box-shadow: 0 20px 64px rgba(31, 56, 43, .1);
}
.phone > .screen.active { min-height: calc(100dvh - 102px); }
h1, h2, .onb-question { letter-spacing: -.7px; }
h1 { line-height: 1.2; }
.desc { color: var(--app-muted); line-height: 1.65; }
.section-title { margin: 22px 0 12px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.subtitle, .summary-label, .onb-step { color: var(--app-muted); }
.green, .login-link, .onb-back-label { color: var(--app-brand); }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #85bea9;
  outline-offset: 3px;
}
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select, textarea {
  border-color: var(--app-line);
  border-radius: 12px;
  color: var(--app-ink);
}
input::placeholder, textarea::placeholder { color: #7a8881; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--app-brand); }
input.error:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) { border-color: #d33d55; }
.btn-primary {
  min-height: 50px;
  border-radius: 14px;
  background: var(--app-brand);
  font-weight: 650;
  box-shadow: 0 4px 10px rgba(20, 125, 100, .13);
}
.btn-primary:hover { background: var(--app-brand-hover); }
.btn-outline, .btn-social {
  min-height: 46px;
  border-color: var(--app-line);
  border-radius: 12px;
  color: var(--app-ink);
  background: var(--app-surface);
  box-shadow: none;
}
.btn-outline:hover, .btn-social:hover { background: var(--app-soft); border-color: #aacdbd; }

/* Quiet onboarding surfaces and consistent selection states. */
#welcome-screen::before, #login-screen::before, #signup-screen::before,
#forgot-screen::before, #otp-screen::before, #reset-screen::before,
#success-screen::before, .onb-screen::before, .onb-screen::after,
#onboard-name::before, #onboard-name::after,
#onboard-name .onb-header::before, #onboard-name .onb-header::after { content: none; }
.onb-screen, #onboard-name { background: transparent; }
.logo-row { gap: 10px; margin-bottom: 12px; }
.logo-row h2 { font-size: 23px; letter-spacing: -.8px; }
.logo-icon { border-radius: 14px; transform: none; background: var(--app-brand); }
#welcome-screen h1 { margin-top: 30px; font-size: 32px; line-height: 1.18; }
.hero-img { border: 5px solid #fff; border-radius: 24px; box-shadow: var(--app-shadow); }
.onb-title { font-size: 16px; font-weight: 700; }
.onb-question { line-height: 1.22; }
.onb-progress-bg, .progress-bg { background: #e4ece6; }
.onb-progress-fill { background: var(--app-brand); }
.method-card, .goal-card, .pace-card, .gender-card, .chip {
  border-color: var(--app-line);
  background: var(--app-surface);
  box-shadow: none;
}
.goal-card, .pace-card, .gender-card { border-radius: 16px; }
.method-card.selected, .goal-card.selected, .pace-card.selected, .gender-card.selected {
  border-color: var(--app-brand);
  background: var(--app-soft);
  box-shadow: inset 0 0 0 1px var(--app-brand);
}
.onb-screen .goal-card.selected .goal-check { background: var(--app-brand); border-color: var(--app-brand); }
.chip.selected:not(.dislike-chip), .pantry-tag.selected { background: var(--app-brand); border-color: var(--app-brand); color: #fff; }
.unit-toggle { background: #e7eee9; border-color: var(--app-line); }
.unit-btn.active { color: var(--app-brand); background: #fff; box-shadow: 0 2px 6px #1d302b0d; }

/* Shared cards retain their original content, sizing and interactions. */
.summary-card, .meal-item, .profile-list, .faq-item, .settings-row,
.settings-link-row, .nutrition-target-card, .profile-budget-panel,
.budget-stat, .detail-section-card, .weekly-day, .daily-tracker,
.home-meal-card, .smart-product-card, .recipes-card {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 16px;
  box-shadow: var(--app-shadow);
}
#home-screen .summary-card { border-color: var(--app-line); border-radius: 20px; box-shadow: var(--app-shadow); padding: 20px; }
#home-screen .cal-value { color: var(--app-ink); font-size: 24px; font-weight: 750; letter-spacing: -.7px; }
#home-screen .progress-fill { background: var(--app-brand); }
#home-screen .home-meal-card { border-color: var(--app-line); border-radius: 16px; box-shadow: var(--app-shadow); }
.home-header { margin-bottom: 24px; }
.greeting h2 { font-size: 24px; letter-spacing: -.7px; }
.daily-tracker-heading h3 { color: #49665a; }
.daily-tracker-heading strong { color: var(--app-ink); }
.daily-tracker-actions button, .steps-entry-row button, .steps-quick-add {
  color: var(--app-brand-hover); border-color: #cfe3d7; background: var(--app-soft);
}
.profile-list { overflow: hidden; }
.profile-list-item { padding: 17px 16px; border-bottom-color: #edf1ee; text-align: left; }
.profile-list-item:hover, .settings-link-row:hover { background: #f2f8f4; }
.pl-icon { width: 30px; }
.pl-label { color: var(--app-ink); font-weight: 550; }
.pl-arrow, .settings-link-row .pl-arrow { color: #8b9b92; }
.premium-banner { background: #fff7e7; border: 1px solid #efe0bc; border-radius: 16px; }
.settings-group-title { color: var(--app-muted); font-size: 11px; letter-spacing: 1px; }
#help-screen .faq-item { padding: 17px; margin-bottom: 10px; text-align: left; }
#help-screen .faq-item b { color: var(--app-ink); font-size: 14px; line-height: 1.5; }
#help-screen .faq-item .desc { margin: 8px 0 0; font-size: 13px; line-height: 1.7; }
#help-screen section > .section-title { margin-top: 28px; color: var(--app-brand-hover); }
.weekly-day > .meal-item { border: 0; box-shadow: none; }
.phone .recipe-price-controls, .phone .recipe-price-breakdown {
  background: var(--app-surface); border-color: var(--app-line); color: var(--app-ink); border-radius: 16px;
}
.phone .recipe-price-controls button { background: var(--app-soft); border-color: #aacdbd; color: var(--app-brand-hover); }
.phone .recipe-price-controls input, .phone .recipe-price-controls select { border-color: var(--app-line); color: var(--app-ink); }

/* One navigation dock across every main screen. */
.bottom-nav, #scan-screen .bottom-nav {
  width: min(calc(100vw - 32px), 386px);
  min-height: 68px;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding: 7px 6px;
  border: 1px solid #dce6df;
  border-radius: 22px;
  background: rgba(241, 233, 221, .97);
  box-shadow: 0 6px 28px rgba(24, 58, 43, .12);
}
.bottom-nav .nav-item { gap: 3px; color: #6a7b72; font-size: 10px; font-weight: 600; }
.bottom-nav .nav-item:hover, .bottom-nav .nav-item.active { color: var(--app-brand-hover); }
.bottom-nav .nav-item .nav-icon {
  position: relative;
  width: 34px;
  height: 29px;
  border-radius: 10px;
  font-size: 0;
  filter: none;
}
.bottom-nav .nav-icon::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--nav-symbol) center / contain no-repeat;
  mask: var(--nav-symbol) center / contain no-repeat;
}
.bottom-nav [data-screen="home-screen"] { --nav-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7v10H3V10Z M9 20v-7h6v7'/%3E%3C/svg%3E"); }
.bottom-nav [data-screen="scan-screen"] { --nav-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4H4v4m12-4h4v4M4 16v4h4m12-4v4h-4M8 9h8v6H8Z'/%3E%3C/svg%3E"); }
.bottom-nav [data-screen="plan-screen"] { --nav-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='3'/%3E%3Cpath d='M8 3v4m8-4v4M4 11h16m-12 4h2m4 0h2m-8 3h2'/%3E%3C/svg%3E"); }
.bottom-nav [data-screen="chat-screen"] { --nav-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15a3 3 0 0 1-3 3H9l-5 3V6a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3Z M8 8h8m-8 5h5'/%3E%3C/svg%3E"); }
.bottom-nav [data-screen="tips-screen"] { --nav-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 15c0-2-3-3-3-6a7 7 0 0 1 14 0c0 3-3 4-3 6v2H8Z M9 21h6m-3-4v-6m-2-2 2 2 2-2'/%3E%3C/svg%3E"); }
.bottom-nav [data-screen="profile-screen"] { --nav-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2Z'/%3E%3C/svg%3E"); }
.bottom-nav .nav-item.active .nav-icon { color: var(--app-brand); background: var(--app-soft); box-shadow: none; transform: none; }

/* Keep the camera controls legible inside their own dark surface. */
#scan-screen { isolation: isolate; background: #132d23; border-radius: 20px; padding: 16px 12px 102px; }
#scan-screen .scanner-topbar { margin: -4px 0 12px; }

/* Recipe discovery uses the same brand palette as the rest of the app. */
#recipes-screen { background: transparent; padding: 0 0 110px; }
.recipes-nav-tab { font-size: 24px; color: #7a8981; letter-spacing: -.6px; }
.recipes-nav-tab.active { color: var(--app-ink); }
.recipes-hero-banner, .smart-hero, .pantry-hero {
  background: linear-gradient(125deg, #143c30, #18745a);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(20, 60, 48, .12);
}
.recipes-hero-text h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.5px; }
.recipes-hero-text, .pantry-hero { text-align: left; }
.recipes-hero-tag { color: #d5f2e3; background: rgba(255, 255, 255, .13); border: 1px solid #ffffff26; }
.recipes-pill { border-color: var(--app-line); background: #fff; color: #526b5e; }
.recipes-pill.active, .recipes-pill.cuisine.active, .storage-tab.active {
  color: var(--app-brand-hover); background: var(--app-soft); border-color: #a4cdb8; box-shadow: none;
}
.recipes-section-title { color: var(--app-ink); font-size: 18px; letter-spacing: -.3px; }
.recipes-see-all-btn { color: var(--app-brand); background: var(--app-soft); border-color: var(--app-line); }
.recipes-card-title { color: var(--app-ink); font-weight: 650; }

/* Pantry inventory: clear surfaces and readable status colors. */
.pantry-hero-sub { color: #bce4d0; }
.pantry-settings-btn { background: #ffffff12; border-color: #ffffff30; }
.pantry-search { background: #ffffff12; border-color: #ffffff35; color: #fff; }
.pantry-search::placeholder { color: #c5dacf; }
.pantry-pill { border-color: #ffffff45; color: #d7ebe1; }
.pantry-pill.active { color: #143c30; background: #fff; border-color: #fff; }
.pantry-cat-card, .pantry-ing-card, .pantry-add-box, .pantry-ai-card, .pantry-stat-card {
  background: var(--app-surface); border-color: var(--app-line); box-shadow: var(--app-shadow);
}
.pantry-cat-card:hover, .pantry-ing-card:hover { border-color: #aacdbd; }
.pantry-cat-img-wrap, .pantry-cat-no-img { background: #edf3ee; }
.pantry-cat-name, .pantry-ing-name, .pantry-add-title, .pantry-ai-feature-title,
.pantry-detail-title, .pantry-section-title, .pantry-stat-num { color: var(--app-ink); }
.pantry-cat-action, .pantry-ai-header { color: var(--app-brand); }
.pantry-detail-shell { background: #edf4ef; color: var(--app-ink); border: 1px solid var(--app-line); }
.pantry-detail-kicker, .pantry-detail-subtitle, .pantry-stat-label,
.pantry-section-count, .pantry-ing-submeta, .pantry-add-desc,
.pantry-ai-feature-desc, .pantry-validation-hint, .pantry-disclaimer-note { color: var(--app-muted); }
.pantry-subcat-label, .pantry-field-label { color: #486254; }
.pantry-cube-btn, .pantry-subcat-btn, .pantry-btn-chip, .pantry-ai-feature {
  background: #f5f9f6; color: #446554; border-color: var(--app-line);
}
.pantry-cube-btn:hover, .pantry-btn-chip:hover { background: #e3f0e8; color: var(--app-brand-hover); border-color: #aacdbd; }
.pantry-subcat-btn.active { background: var(--app-brand); border-color: var(--app-brand); color: #fff; }
.pantry-dark-input, .pantry-dark-select, .pantry-dark-input:focus, .pantry-dark-select:focus { background: #fff; color: var(--app-ink); }
.pantry-submit-btn, .pantry-ai-action-btn { background: var(--app-brand); color: #fff; border-radius: 12px; }
.pantry-submit-btn:hover, .pantry-ai-action-btn:hover { background: var(--app-brand-hover); }
.pantry-btn-chip.green, .pantry-ing-status.in-stock, .pantry-stock-badge.in-stock,
.pantry-validation-hint.success { color: #167448; }
.pantry-btn-chip.danger, .pantry-ing-status.out-of-stock, .pantry-stock-badge.out-of-stock,
.pantry-validation-hint.error { color: #bf354a; }
.pantry-ing-status.low-stock, .pantry-stock-badge.low-stock, .pantry-stat-num.low { color: #9c6509; }
.pantry-ing-status.use-soon, .pantry-ing-status.expiring, .pantry-stock-badge.use-soon,
.pantry-stock-badge.expiring, .pantry-stat-num.soon { color: #9b601d; }

/* Shopping and chat share the same accents without changing their layouts. */
.smart-hero h1 { color: #fff; line-height: 1.1; }
.smart-hero p, .smart-kicker { color: #c7e8d8; }
.smart-store-pills .retailer-mark { border-color: #235d46; }
.smart-cart-button, .smart-cart-bar { background: #173f32; }
.smart-cart-bar small { color: #c7e8d8; }
.smart-search, .smart-location span:first-child, .smart-section-title button,
.connect-strip i, .store-open-label { color: var(--app-brand); }
.smart-search button, .manager-heading > button { background: var(--app-soft); color: var(--app-brand); }
.connect-strip, .store-manager, .single-store-note { background: #edf6f0; border-color: #d5e6db; color: var(--app-ink); }
.smart-section-title span, .manager-heading span { color: var(--app-muted); }
.smart-section-title h2, .manager-heading h2 { color: var(--app-ink); }
.smart-category-row button.active { background: var(--app-soft); border-color: var(--app-brand); color: var(--app-brand-hover); box-shadow: none; }
.add-smart-product, .store-connect-card button, .smart-refresh, .smart-location-cta,
.cart-quantity button { color: var(--app-brand); border-color: #a8cdbb; }
.smart-cart-summary { background: linear-gradient(125deg, #143c30, #18745a); }
.smart-cart-summary span { color: #c7e8d8; }
.smart-store-cart footer a { background: var(--app-brand); }
.mm-chat-mark, #chat-screen .chat-send-btn, #chat-screen .chat-bubble.user { background: var(--app-brand); color: #fff; }
.mm-chat-brand h1 span, .mm-chat-context span, .mm-chat-recipe,
.mm-chat-welcome-icon, .mm-chat-actions button, #chat-screen .quick-chip > span:first-child {
  background: var(--app-soft); color: var(--app-brand-hover); border-color: var(--app-line);
}
.mm-chat-welcome-icon { transform: none; box-shadow: none; border-radius: 18px; }
.mm-chat-new, #chat-screen .quick-chip, #chat-screen .chat-bubble.bot,
#chat-screen .chat-input-row { background: var(--app-surface); border-color: var(--app-line); color: var(--app-ink); }
#chat-screen .quick-chip:hover { background: var(--app-soft); border-color: #aacdbd; }
.mm-chat-composer { border-color: var(--app-line); }
#chat-screen .chat-input-row:focus-within { border-color: var(--app-brand); box-shadow: 0 0 0 3px #147d6410; }

@media (max-width: 480px) {
  body { padding: 0; background: var(--app-canvas); }
  .phone { width: 100%; min-height: 100dvh; padding: 24px 18px; border: 0; border-radius: 0; box-shadow: none; }
  .phone > .screen.active { min-height: calc(100dvh - 48px); }
  .phone > #chat-screen.active { min-height: 0; }
  .bottom-nav, #scan-screen .bottom-nav { bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 350px) {
  .phone { padding-left: 14px; padding-right: 14px; }
  #welcome-screen h1 { font-size: 29px; }
  .bottom-nav .nav-item { font-size: 9px; }
  .recipes-nav-tab { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary, .home-meal-card, .recipes-card, .recipes-card-media img,
  .pantry-cat-card, .pantry-cat-img-wrap img, .pantry-ing-card, .pantry-submit-btn { transition: none; }
}

/* Added Settings controls follow the existing card design. */
#settings-screen .settings-preference { gap: 16px; margin-top: 0; text-align: left; cursor: pointer; font-weight: 400; }
.settings-preference > span { min-width: 0; flex: 1; }
.settings-preference-title { display: block; color: var(--app-ink); font-size: 14px; font-weight: 650; }
.settings-preference small { display: block; margin-top: 5px; color: var(--app-muted); font-size: 11px; line-height: 1.5; }
#settings-screen .settings-preference input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.settings-preference-note { margin: 10px 4px 18px; text-align: left; font-size: 11px; line-height: 1.5; color: var(--app-muted); }

/* Reference landing design. The wide canvas applies only while Welcome is active. */
body:has(#welcome-screen.active) { padding: 0; background: #f7f8f0; }
.phone:has(> #welcome-screen.active) {
  width: min(100%, 1240px);
  min-height: 100dvh;
  padding: 0 5%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
#welcome-screen {
  --welcome-ink: #163b31;
  --welcome-green: #176d4c;
  --welcome-muted: #63786e;
  --welcome-card: #fff;
  --welcome-line: #d9e5db;
  --welcome-mint: #d8f0dc;
  --welcome-shadow: 0 22px 60px rgba(18, 66, 47, .12);
  text-align: left;
  color: var(--welcome-ink);
}
#welcome-screen, #welcome-screen * { font-family: 'DM Sans', sans-serif; }
#welcome-screen .welcome-header { height: 100px; display: flex; align-items: center; }
#welcome-screen .logo-row { gap: 10px; margin: 0; }
#welcome-screen .logo-icon {
  width: 42px; height: 42px; padding: 0; border-radius: 15px;
  display: grid; place-items: center; background: var(--welcome-green); font-size: 23px;
}
#welcome-screen .logo-row h2 { font: 800 26px 'Outfit', sans-serif; letter-spacing: -1px; color: var(--welcome-ink); }
#welcome-screen .logo-row .green {
  display: inline-block; padding: 3px 6px; border-radius: 7px;
  background: #e3f2e7; color: var(--welcome-green); vertical-align: middle;
  font-size: 11px; letter-spacing: 1px;
}
#welcome-screen .welcome-hero {
  min-height: min(740px, calc(100dvh - 100px));
  display: grid; grid-template-columns: 1.02fr .98fr;
  align-items: center; gap: 45px; padding: 45px 0 75px;
}
#welcome-screen .welcome-copy { min-width: 0; }
#welcome-screen .subtitle {
  display: inline-block; padding: 9px 15px; margin: 0;
  border: 1px solid #cfe6d4; border-radius: 30px; background: #e5f3e7;
  color: var(--welcome-green); font-size: 11px; font-weight: 700;
  line-height: 1.5; letter-spacing: .65px; text-transform: uppercase;
}
#welcome-screen h1 {
  margin: 26px 0 23px; font-family: 'Outfit', sans-serif;
  font-size: clamp(48px, 5.3vw, 72px); font-weight: 800;
  line-height: 1.05; letter-spacing: -2.8px; color: var(--welcome-ink);
}
#welcome-screen h1 .green { font-family: inherit; color: var(--welcome-green); }
#welcome-screen .desc { max-width: 500px; margin: 0; font-size: 18px; line-height: 1.75; color: var(--welcome-muted); }
#welcome-screen .welcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 29px; }
#welcome-screen .welcome-actions button {
  width: auto; margin: 0; padding: 16px 23px; min-height: 54px;
  border-radius: 15px; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
#welcome-screen .btn-primary { background: var(--welcome-green); color: #fff; box-shadow: 0 10px 20px rgba(23, 109, 76, .2); }
#welcome-screen .login-link { border: 1px solid var(--welcome-line); color: var(--welcome-ink); background: var(--welcome-card); }
#welcome-screen .welcome-actions button:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(23, 109, 76, .15); }
#welcome-screen .welcome-actions button:focus-visible { outline: 3px solid #ffae6b; outline-offset: 4px; }
#welcome-screen .welcome-visual { position: relative; min-width: 0; min-height: 530px; display: grid; place-items: center; }
#welcome-screen .welcome-blob {
  position: absolute; inset: 25px 8px 25px 15px;
  border-radius: 47% 53% 41% 59% / 50% 39% 61% 50%;
  background: var(--welcome-mint); transform: rotate(-8deg);
}
#welcome-screen .hero-img {
  position: relative; display: block; width: min(100%, 460px); aspect-ratio: 1;
  margin: 0; object-fit: cover; border-radius: 50%; border: 12px solid var(--welcome-card);
  box-shadow: var(--welcome-shadow);
}
#welcome-screen .welcome-sparkle { position: absolute; top: 8%; right: 5%; color: #f3a84d; font-size: 35px; }
#welcome-screen .welcome-float {
  position: absolute; display: flex; align-items: center; gap: 11px;
  padding: 13px 17px; border: 1px solid var(--welcome-line); border-radius: 19px;
  background: var(--welcome-card); box-shadow: var(--welcome-shadow);
  color: var(--welcome-ink); font-size: 13px; font-weight: 700;
}
#welcome-screen .welcome-float > span { font-size: 26px; }
#welcome-screen .welcome-float small { display: block; margin-top: 3px; color: var(--welcome-muted); font-size: 11px; font-weight: 500; }
#welcome-screen .welcome-float-taste { top: 13%; left: -3%; }
#welcome-screen .welcome-float-budget { right: -3%; bottom: 15%; }
html[data-theme="dark"] body:has(#welcome-screen.active) { background: var(--app-canvas); }
html[data-theme="dark"] #welcome-screen {
  --welcome-ink: var(--app-ink); --welcome-muted: var(--app-muted);
  --welcome-green: #267d59; --welcome-card: var(--app-surface);
  --welcome-line: var(--app-line); --welcome-mint: #263e30;
}
html[data-theme="dark"] #welcome-screen .subtitle,
html[data-theme="dark"] #welcome-screen .logo-row .green { background: var(--app-soft); color: var(--appearance-link); border-color: var(--app-line); }
@media (max-width: 850px) {
  #welcome-screen .welcome-header { height: 90px; }
  #welcome-screen .welcome-hero { grid-template-columns: 1fr; gap: 12px; padding: 25px 0 40px; }
  #welcome-screen .welcome-copy { text-align: center; }
  #welcome-screen h1 { max-width: 600px; margin-left: auto; margin-right: auto; }
  #welcome-screen .desc { margin: auto; }
  #welcome-screen .welcome-actions { justify-content: center; }
  #welcome-screen .welcome-visual { width: min(100%, 530px); min-height: 460px; margin: auto; }
  #welcome-screen .hero-img { width: min(76vw, 400px); }
  #welcome-screen .welcome-float-taste { left: 2%; }
  #welcome-screen .welcome-float-budget { right: 0; }
}
@media (max-width: 480px) {
  .phone:has(> #welcome-screen.active) { padding: 0 20px; }
  #welcome-screen .welcome-header { height: 80px; }
  #welcome-screen .logo-row h2 { font-size: 22px; }
  #welcome-screen h1 { font-size: 46px; letter-spacing: -2px; }
  #welcome-screen .subtitle { font-size: 10px; letter-spacing: .3px; padding: 9px 12px; }
  #welcome-screen .desc { font-size: 16px; }
  #welcome-screen .welcome-actions { gap: 10px; }
  #welcome-screen .welcome-actions button { padding: 14px 16px; }
  #welcome-screen .welcome-visual { min-height: 355px; }
  #welcome-screen .hero-img { width: min(77vw, 325px); border-width: 8px; }
  #welcome-screen .welcome-blob { inset: 20px 8px; }
  #welcome-screen .welcome-float { font-size: 10px; padding: 10px; gap: 8px; border-radius: 14px; }
  #welcome-screen .welcome-float small { font-size: 9px; }
  #welcome-screen .welcome-float > span { font-size: 19px; }
  #welcome-screen .welcome-float-taste { top: 10%; left: -1%; }
  #welcome-screen .welcome-float-budget { bottom: 10%; right: -1%; }
}
@media (prefers-reduced-motion: reduce) {
  #welcome-screen .welcome-actions button { transition: none; }
  #welcome-screen .welcome-actions button:hover { transform: none; }
}

/* Welcome-only feature cards, call to action and footer from the reference. */
#welcome-screen .welcome-features { padding: 70px 0; }
#welcome-screen .welcome-section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
#welcome-screen .welcome-eyebrow {
  display: inline-block; padding: 9px 15px; border: 1px solid #cfe6d4;
  border-radius: 30px; background: #e5f3e7; color: var(--welcome-green);
  font-size: 12px; line-height: 1.5; letter-spacing: .7px; font-weight: 700; text-transform: uppercase;
}
#welcome-screen .welcome-section-head h2 {
  margin: 14px 0; color: var(--welcome-ink); font-family: 'Outfit', sans-serif;
  font-size: clamp(34px, 4vw, 48px); line-height: 1.15; letter-spacing: -1.5px;
}
#welcome-screen .welcome-section-head p { color: var(--welcome-muted); font-size: 16px; line-height: 1.65; }
#welcome-screen .welcome-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
#welcome-screen .welcome-feature {
  padding: 30px; border: 1px solid var(--welcome-line); border-radius: 25px;
  background: var(--welcome-card); box-shadow: 0 7px 24px rgba(20, 70, 40, .035);
}
#welcome-screen .welcome-feature-icon {
  display: grid; place-items: center; width: 56px; height: 56px;
  margin-bottom: 20px; border-radius: 18px; background: #e8f5e9; font-size: 27px;
}
#welcome-screen .welcome-feature:nth-child(2) .welcome-feature-icon { background: #fff0df; }
#welcome-screen .welcome-feature:nth-child(3) .welcome-feature-icon { background: #e8effb; }
#welcome-screen .welcome-feature h3 { margin: 0 0 10px; color: var(--welcome-ink); font: 700 22px/1.25 'Outfit', sans-serif; letter-spacing: -.3px; }
#welcome-screen .welcome-feature p { margin: 0; color: var(--welcome-muted); font-size: 15px; line-height: 1.65; }
#welcome-screen .welcome-banner {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center;
  gap: 25px; margin: 45px 0 75px; padding: 46px 6%; border-radius: 32px; background: #174f3b; color: #fff;
}
#welcome-screen .welcome-banner::after { content: '✦'; position: absolute; top: -80px; right: 25%; font-size: 240px; opacity: .06; pointer-events: none; }
#welcome-screen .welcome-banner > * { position: relative; z-index: 1; }
#welcome-screen .welcome-banner h2 { margin: 0 0 8px; color: #fff; font: 700 clamp(28px, 3vw, 40px)/1.15 'Outfit', sans-serif; letter-spacing: -1px; }
#welcome-screen .welcome-banner p { margin: 0; color: #cce4d5; font-size: 16px; line-height: 1.65; }
#welcome-screen .welcome-banner-button {
  display: inline-flex; justify-content: center; align-items: center; gap: 9px; flex-shrink: 0;
  padding: 15px 25px; min-height: 50px; border: 0; border-radius: 15px;
  background: #fff; color: #176d4c; font-size: 16px; font-weight: 700; cursor: pointer;
}
#welcome-screen .welcome-banner-button:hover { background: #e5f3e7; }
#welcome-screen .welcome-banner-button:focus-visible { outline: 3px solid #ffae6b; outline-offset: 4px; }
#welcome-screen .welcome-footer {
  display: flex; justify-content: space-between; gap: 15px; padding: 25px 0 35px;
  border-top: 1px solid var(--welcome-line); color: var(--welcome-muted); font-size: 13px; line-height: 1.6;
}
html[data-theme="dark"] #welcome-screen .welcome-eyebrow { background: var(--app-soft); color: var(--appearance-link); border-color: var(--app-line); }
@media (max-width: 850px) {
  #welcome-screen .welcome-feature-grid { grid-template-columns: 1fr; }
  #welcome-screen .welcome-banner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  #welcome-screen .welcome-features { padding: 45px 0; }
  #welcome-screen .welcome-feature { padding: 25px; }
  #welcome-screen .welcome-banner { margin: 35px 0 50px; padding: 36px 23px; }
  #welcome-screen .welcome-banner-button { max-width: 100%; padding: 15px 18px; }
  #welcome-screen .welcome-footer { flex-direction: column; text-align: center; }
}

/* Nine-step onboarding presentation. Existing inputs and navigation are retained. */
body:has(.mm-setup.active) {
  min-height: 100dvh;
  padding: 26px max(20px, 5vw) 34px;
  background: radial-gradient(circle at 8% 89%, #d9efdb 0, transparent 28%),
    radial-gradient(circle at 98% 5%, #e8f3d5 0, transparent 30%), #f7f8f0;
}
.phone:has(> .mm-setup.active) {
  width: min(100%, 1180px); min-height: calc(100dvh - 60px); padding: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
.phone > .mm-setup {
  --setup-ink: #163b31; --setup-green: #176d4c; --setup-muted: #667c70;
  --setup-line: #dce8dd; --setup-card: #fff; --setup-field: #fbfdf9; --setup-soft: #e6f4e9;
  padding: 0; min-height: 0; background: transparent; text-align: left; color: var(--setup-ink);
}
.phone > .mm-setup.active { min-height: 0; }
.mm-setup, .mm-setup * { font-family: 'DM Sans', sans-serif; }
.mm-setup .setup-topbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 28px; }
.mm-setup .setup-brand { display: flex; align-items: center; gap: 10px; font: 800 25px 'Outfit', sans-serif; letter-spacing: -.8px; }
.mm-setup .setup-brand > span:last-child { font: inherit; color: var(--setup-green); }
.mm-setup .setup-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: #176d4c; color: #fff; font-size: 24px; }
.mm-setup .setup-tagline { color: var(--setup-muted); font-size: 13px; }
.mm-setup .setup-stage {
  display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(300px, .93fr);
  max-width: 1100px; min-height: 635px; margin: 0 auto; overflow: hidden;
  border: 1px solid var(--setup-line); border-radius: 35px; background: var(--setup-card);
  box-shadow: 0 26px 80px rgba(18, 66, 47, .1);
}
.mm-setup .setup-form { min-width: 0; display: flex; flex-direction: column; padding: clamp(24px, 4.5vw, 60px); }
.mm-setup .onb-header { margin: 0 0 32px; min-height: 40px; gap: 10px; }
.mm-setup .onb-header > span:last-child { display: none; }
.mm-setup .onb-back-label {
  display: inline-flex; align-items: center; justify-content: center; width: auto;
  padding: 9px 13px; border: 1px solid var(--setup-line); border-radius: 13px;
  background: var(--setup-card); color: var(--setup-green); font-size: 14px; font-weight: 700; cursor: pointer;
}
.mm-setup .onb-back-label::after { content: none; }
.mm-setup .onb-back-label:hover { background: var(--setup-soft); }
.mm-setup .onb-title { padding: 9px 13px; border-radius: 22px; background: var(--setup-soft); color: var(--setup-green); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.mm-setup .onb-step {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  color: var(--setup-green); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
}
.mm-setup .onb-step::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ffb16f; }
.mm-setup .onb-question, #onboard-name.mm-setup .onb-question {
  max-width: 470px; margin: 0 0 26px; color: var(--setup-ink);
  font: 800 clamp(32px, 3.7vw, 49px)/1.12 'Outfit', sans-serif; letter-spacing: -1.7px;
}
.mm-setup .desc { max-width: 440px; color: var(--setup-muted); font-size: 15px; line-height: 1.7; }
.mm-setup .onb-input, #onboard-name.mm-setup .onb-input {
  min-height: 59px; margin: 0 0 22px; padding: 16px 18px; border: 1.5px solid var(--setup-line);
  border-radius: 16px; background: var(--setup-field); color: var(--setup-ink); font-size: 15px; box-shadow: none;
}
.mm-setup input:focus-visible, .mm-setup button:focus-visible { outline: 3px solid #eeab55; outline-offset: 3px; }
.mm-setup .onb-food-img, #onboard-name.mm-setup .onb-food-img, .mm-setup .bio-deco { display: none; }
.mm-setup .goal-grid, .mm-setup .gender-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.mm-setup .goal-card {
  min-width: 0; min-height: 116px; padding: 17px; gap: 8px; text-align: left;
  border: 1.5px solid var(--setup-line); border-radius: 19px; background: var(--setup-field);
  color: var(--setup-ink); box-shadow: 0 5px 10px #1f513006; cursor: pointer;
}
.mm-setup .goal-card:hover { background: var(--setup-soft); border-color: var(--setup-green); }
.mm-setup .goal-card.selected { border-color: var(--setup-green); background: #eaf7eb; box-shadow: 0 0 0 2px #176d4c15; }
.mm-setup .goal-icon, .mm-setup .gender-symbol { font-size: 29px; margin: 0; color: var(--setup-green); }
.mm-setup .goal-card p { font-size: 14px; line-height: 1.35; font-weight: 700; }
.mm-setup .activity-sub { margin: 0; color: var(--setup-muted); font-size: 12px; line-height: 1.4; }
.mm-setup .goal-check { top: 13px; right: 13px; border: 2px solid #c6d7cb; background: transparent; }
.mm-setup .goal-card.selected .goal-check { background: #176d4c; border-color: #176d4c; color: #fff; }
.mm-setup .setup-bottom { margin-top: auto; padding-top: 20px; }
.mm-setup .btn-primary, #onboard-name.mm-setup .btn-primary {
  display: flex; justify-content: center; align-items: center; gap: 9px; width: 100%; min-height: 58px;
  margin: 0; border-radius: 17px; background: #176d4c; color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 12px 25px rgba(23, 109, 76, .22);
}
.mm-setup .btn-primary::after { content: '→'; }
.mm-setup .btn-primary:hover { background: #11583e; }
.mm-setup .setup-progress-meta { display: flex; justify-content: space-between; gap: 10px; margin: 22px 0 10px; color: var(--setup-muted); font-size: 12px; font-weight: 600; }
.mm-setup .onb-progress-bg, #onboard-name.mm-setup .onb-progress-bg { height: 8px; margin: 0; border-radius: 30px; background: #e7f0e7; }
/* Each screen already represents one fixed step; show its corresponding progress. */
.mm-setup .onb-progress-fill { width: var(--setup-progress) !important; background: linear-gradient(90deg, #176d4c, #7dc580); }
.mm-setup .unit-toggle { align-self: flex-start; display: inline-flex; gap: 3px; padding: 5px; margin-bottom: 22px; border: 1px solid var(--setup-line); border-radius: 15px; background: #f2f7ee; }
.mm-setup .unit-btn { padding: 9px 19px; border-radius: 11px; background: transparent; color: var(--setup-muted); font-weight: 700; }
.mm-setup .unit-btn.active { background: var(--setup-card); color: var(--setup-green); box-shadow: 0 3px 10px #2d5f3220; }
.mm-setup .ruler-value-display, .mm-setup .budget-value { margin: 10px 0 22px; color: var(--setup-green); font: 800 44px/1.2 'Outfit', sans-serif; text-align: left; }
.mm-setup .ruler-track { opacity: .7; pointer-events: none; }
.mm-setup .ruler-slider { position: relative; z-index: 1; }
.mm-setup .onb-slider { flex-shrink: 0; padding: 0; background: #dce8dd; accent-color: #176d4c; }
.mm-setup .vertical-slider { flex-shrink: 0; padding: 0; background: #dce8dd; accent-color: #176d4c; }
.mm-setup .onb-slider::-webkit-slider-thumb, .mm-setup .vertical-slider::-webkit-slider-thumb { background: #176d4c; }
.mm-setup .onb-slider::-moz-range-thumb, .mm-setup .vertical-slider::-moz-range-thumb { background: #176d4c; }
.mm-setup .wheel-picker-row { flex-shrink: 0; border-radius: 16px; border: 1px solid var(--setup-line); background: var(--setup-field); }
.mm-setup .wheel-col { flex: 1; min-width: 0; }
.mm-setup .wheel-item { color: var(--setup-muted); }
.mm-setup .wheel-highlight { border-color: var(--setup-green); background: #176d4c0d; }
.mm-setup .dob-preview { padding: 12px; margin-bottom: 20px; border: 1px solid var(--setup-line); border-radius: 13px; background: var(--setup-soft); color: var(--setup-green); }
.mm-setup .height-row { margin: 0 0 20px; gap: 16px; }
.mm-setup .ruler-col, .mm-setup .ruler-col-label { color: var(--setup-muted); }
.mm-setup .height-readout p { font-family: 'Outfit', sans-serif; font-size: 26px; }
.mm-setup .height-readout .height-or { color: var(--setup-muted); font: 400 13px 'DM Sans', sans-serif; }
.mm-setup .green-text { color: var(--setup-green); }
.mm-setup .compare-row-badges { gap: 12px; }
.mm-setup .compare-badge { flex: 1; min-width: 0; padding: 14px 10px; border: 1px solid var(--setup-line); background: var(--setup-field); border-radius: 16px; box-shadow: none; }
.mm-setup .compare-badge p { color: var(--setup-muted); }
.mm-setup .compare-badge .compare-badge-value { color: var(--setup-ink); }
.mm-setup .budget-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.mm-setup .preset-btn { min-height: 65px; border: 1.5px solid var(--setup-line); border-radius: 19px; background: var(--setup-field); color: var(--setup-ink); font-size: 16px; font-weight: 700; }
.mm-setup .preset-btn.active { border-color: var(--setup-green); background: #eaf7eb; color: var(--setup-green); box-shadow: 0 0 0 2px #176d4c15; }
.mm-setup .setup-visual {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; padding: 36px 31px; background: linear-gradient(145deg, #d7f0d6, #ebf5df 55%, #d1e9d9);
}
.mm-setup .setup-visual::before, .mm-setup .setup-visual::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.mm-setup .setup-visual::before { width: 400px; height: 400px; right: -210px; top: -150px; background: #ffffff44; }
.mm-setup .setup-visual::after { width: 300px; height: 300px; left: -190px; bottom: -190px; background: #8dbb8745; }
.mm-setup .setup-visual-top { position: relative; display: flex; align-items: center; gap: 7px; color: #176d4c; font-size: 11px; line-height: 1.5; letter-spacing: 1px; font-weight: 700; text-transform: uppercase; }
.mm-setup .setup-visual-top > span { font-size: 22px; color: #e8a751; }
.mm-setup .setup-food-wrap { position: relative; display: grid; place-items: center; min-height: 345px; margin: 15px 0; }
.mm-setup .setup-food-blob { position: absolute; width: 87%; max-width: 375px; aspect-ratio: 1; border-radius: 46% 54% 42% 58% / 56% 47% 53% 44%; transform: rotate(-17deg); background: #f0f7e9; }
.mm-setup .setup-food { position: relative; display: block; width: 75%; max-width: 330px; aspect-ratio: 1; object-fit: cover; border: 10px solid #fff; border-radius: 50%; box-shadow: 0 20px 50px #3c704c33; }
.mm-setup .setup-float { position: absolute; display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid #e3ede1; border-radius: 17px; background: #fff; color: #163b31; box-shadow: 0 9px 25px #2f634e24; font-size: 12px; font-weight: 700; }
.mm-setup .setup-float > span { font-size: 25px; }
.mm-setup .setup-float-left { left: 0; top: 12%; }
.mm-setup .setup-float-right { right: 0; bottom: 12%; }
.mm-setup .setup-visual-footer { position: relative; z-index: 1; }
.mm-setup .setup-visual-footer h2 { margin: 0 0 10px; color: #163b31; font: 800 31px/1.15 'Outfit', sans-serif; letter-spacing: -1.2px; }
.mm-setup .setup-visual-footer p { max-width: 340px; margin: 0; color: #547563; font-size: 14px; line-height: 1.65; }
.mm-setup .setup-visual-note { margin-top: 20px; font-size: 12px; font-weight: 600; color: #557466; }
html[data-theme="dark"] body:has(.mm-setup.active) { background: radial-gradient(circle at 8% 89%, #203a2b, transparent 40%), var(--app-canvas); }
html[data-theme="dark"] .phone:has(> .mm-setup.active) { background: transparent; }
html[data-theme="dark"] .mm-setup { --setup-ink: var(--app-ink); --setup-green: #8bd5ad; --setup-muted: var(--app-muted); --setup-line: var(--app-line); --setup-card: var(--app-canvas); --setup-field: var(--app-surface); --setup-soft: var(--app-soft); }
html[data-theme="dark"] .mm-setup .setup-visual { background: linear-gradient(145deg, #254732, #1e382b 55%, #213e31); }
html[data-theme="dark"] .mm-setup .setup-visual-top { color: #a8debb; }
html[data-theme="dark"] .mm-setup .setup-food-blob { background: #35553e; }
html[data-theme="dark"] .mm-setup .setup-visual-footer p,
html[data-theme="dark"] .mm-setup .setup-visual-note { color: #bad1c2; }
html[data-theme="dark"] .mm-setup .setup-float { background: var(--app-surface); border-color: var(--app-line); color: var(--app-ink); }
html[data-theme="dark"] .mm-setup .unit-toggle,
html[data-theme="dark"] .mm-setup .onb-progress-bg { background: var(--app-soft); }
@media (max-width: 760px) {
  body:has(.mm-setup.active) { padding: 15px 12px 25px; }
  .mm-setup .setup-topbar { margin-bottom: 15px; padding: 0 3px; }
  .mm-setup .setup-brand { font-size: 22px; }
  .mm-setup .setup-tagline { display: none; }
  .mm-setup .setup-stage { grid-template-columns: 1fr; min-height: 0; border-radius: 27px; }
  .mm-setup .setup-form { padding: 27px 22px 24px; min-height: 580px; }
  .mm-setup .setup-visual { display: none; }
  .mm-setup .onb-header { margin-bottom: 26px; }
  .mm-setup .onb-question, #onboard-name.mm-setup .onb-question { font-size: 36px; }
  .mm-setup .goal-grid, .mm-setup .gender-grid { gap: 10px; }
  .mm-setup .goal-card { min-height: 106px; padding: 14px; }
}
@media (max-width: 385px) {
  .mm-setup .setup-brand { font-size: 19px; }
  .mm-setup .setup-mark { width: 38px; height: 38px; }
  .mm-setup .setup-form { padding: 20px 17px; }
  .mm-setup .onb-question, #onboard-name.mm-setup .onb-question { font-size: 31px; }
  .mm-setup .goal-card p { font-size: 13px; }
  .mm-setup .height-row { gap: 10px; }
  .mm-setup .height-readout p { font-size: 22px; }
}

/* Final onboarding summary: profile and nutrition presentation only. */
body:has(#onboard-preparing.active) {
  min-height: 100dvh; padding: 28px 16px; align-items: center;
  background: radial-gradient(circle at top left, #d9f3ddf2, transparent 24%),
    radial-gradient(circle at bottom right, #1aa8bc1a, transparent 22%), #f7f8f0;
}
.phone:has(> #onboard-preparing.active) {
  width: min(1180px, 100%); min-height: 0; padding: 0; border: 0;
  border-radius: 0; box-shadow: none; background: transparent; overflow: visible;
}
.phone > #onboard-preparing {
  --ss-ink: #163b31; --ss-muted: #697d73; --ss-green: #176d4c; --ss-line: #dfe9df;
  --ss-card: #fff; --ss-panel: #f9fcf9; --ss-soft: #e4f4e8;
  min-height: 0; padding: 0; color: var(--ss-ink); background: transparent; text-align: left;
}
#onboard-preparing, #onboard-preparing * { font-family: 'DM Sans', sans-serif; }
#onboard-preparing .ss-shell {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  border: 1px solid var(--ss-line); border-radius: 36px; overflow: hidden;
  background: #ffffffb8; box-shadow: 0 28px 72px rgba(17, 62, 44, .12);
}
#onboard-preparing .ss-showcase {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; padding: 34px 42px 34px 46px; overflow: hidden;
  background: linear-gradient(180deg, #176d4cf7, #11583cfa); color: #fff;
}
#onboard-preparing .ss-showcase::before, #onboard-preparing .ss-showcase::after { content: ''; position: absolute; pointer-events: none; background: #ffffff0f; }
#onboard-preparing .ss-showcase::before { width: 400px; height: 400px; border-radius: 50%; top: -120px; right: -90px; }
#onboard-preparing .ss-showcase::after { width: 260px; height: 260px; bottom: -60px; left: -50px; border-radius: 45% 55% 60% 40% / 42% 38% 62% 58%; transform: rotate(18deg); }
#onboard-preparing .ss-brand { position: relative; display: flex; align-items: center; gap: 10px; font: 800 26px 'Outfit', sans-serif; letter-spacing: -1px; }
#onboard-preparing .ss-brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #ffffff29; box-shadow: inset 0 0 0 1px #ffffff1f; font-size: 22px; }
#onboard-preparing .ss-brand small { padding: 4px 7px; border-radius: 8px; background: #ffffff26; color: #dbf2e1; font-size: 11px; letter-spacing: 1px; }
#onboard-preparing .ss-hero-copy { position: relative; max-width: 520px; padding-top: 32px; }
#onboard-preparing .ss-eyebrow { display: inline-block; padding: 10px 15px; margin-bottom: 22px; border: 1px solid #ffffff1f; border-radius: 999px; background: #ffffff1f; color: #e6f7ea; font-size: 12px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; }
#onboard-preparing .ss-hero-copy h2 { margin: 0 0 14px; color: #fff; font: 800 clamp(40px, 4.8vw, 66px)/1.02 'Outfit', sans-serif; letter-spacing: -2.4px; }
#onboard-preparing .ss-hero-copy h2 span { font: inherit; color: #bff4d0; }
#onboard-preparing .ss-hero-copy > p { max-width: 460px; color: #d1e7d8; font-size: 18px; line-height: 1.72; }
#onboard-preparing .ss-feature-stack { display: grid; gap: 14px; margin-top: 28px; max-width: 430px; }
#onboard-preparing .ss-feature { display: flex; align-items: flex-start; gap: 13px; padding: 14px 16px; border-radius: 18px; background: #ffffff17; border: 1px solid #ffffff1a; }
#onboard-preparing .ss-feature-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 13px; background: #ffffff21; font-size: 20px; }
#onboard-preparing .ss-feature strong { display: block; margin-bottom: 3px; font-size: 15px; }
#onboard-preparing .ss-feature small { display: block; color: #d1e7d8; font-size: 13px; line-height: 1.45; }
#onboard-preparing .ss-dish-wrap { position: relative; align-self: flex-end; display: grid; place-items: center; width: min(100%, 460px); min-height: 340px; margin-top: 32px; }
#onboard-preparing .ss-blob { position: absolute; inset: 24px 20px 30px; background: #d8f0dc; border-radius: 50% 50% 39% 61% / 44% 42% 58% 56%; transform: rotate(-7deg); }
#onboard-preparing .ss-dish { position: relative; width: min(100%, 340px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 10px solid #fffffff2; box-shadow: 0 24px 60px #0000002e; }
#onboard-preparing .ss-float { position: absolute; display: flex; align-items: center; gap: 10px; max-width: 210px; padding: 12px 14px; border-radius: 18px; background: #fff; color: #163b31; box-shadow: 0 12px 26px #113e2c14; font-size: 13px; font-weight: 700; }
#onboard-preparing .ss-float > span { font-size: 23px; }
#onboard-preparing .ss-float small { display: block; margin-top: 2px; color: #697d73; font-size: 11px; font-weight: 500; }
#onboard-preparing .ss-float-top { top: 34px; left: 0; }
#onboard-preparing .ss-float-bottom { bottom: 28px; right: 0; }
#onboard-preparing .ss-content { min-width: 0; padding: 30px 28px 28px; background: #ffffffb8; }
#onboard-preparing .ss-card { min-width: 0; padding: 26px 24px 22px; border: 1px solid var(--ss-line); border-radius: 30px; background: var(--ss-card); box-shadow: 0 10px 34px #113e2c0f; }
#onboard-preparing .ss-top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
#onboard-preparing .ss-top-row > div { min-width: 0; }
#onboard-preparing .allset-title { margin: 0 0 7px; color: var(--ss-green); font-size: 13px; letter-spacing: .2px; text-transform: uppercase; }
#onboard-preparing .allset-heading { margin: 0 0 10px; color: var(--ss-ink); font: 800 clamp(32px, 3.2vw, 46px)/1.05 'Outfit', sans-serif; letter-spacing: -1.6px; }
#onboard-preparing .ss-sub { color: var(--ss-muted); font-size: 15px; line-height: 1.65; }
#onboard-preparing .ss-success { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #dff4e6, #eef9f0); box-shadow: 0 12px 26px #113e2c14; font-size: 30px; }
#onboard-preparing .ss-summary-grid { display: grid; gap: 16px; margin-top: 24px; }
#onboard-preparing .ss-panel { min-width: 0; padding: 19px; border: 1px solid var(--ss-line); border-radius: 24px; background: var(--ss-panel); }
#onboard-preparing .ss-section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
#onboard-preparing .ss-section-title > div { min-width: 0; flex: 1; }
#onboard-preparing .ss-section-icon { display: grid; place-items: center; width: 45px; height: 45px; flex: none; border-radius: 15px; background: var(--ss-soft); font-size: 23px; }
#onboard-preparing .ss-nutrition-icon { background: #fff0dd; }
#onboard-preparing .ss-overline { display: block; margin-bottom: 3px; color: #438262; font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: 1.2px; text-transform: uppercase; }
#onboard-preparing .ss-panel h3 { margin: 0; color: var(--ss-ink); font: 800 21px/1.2 'Outfit', sans-serif; letter-spacing: -.4px; }
#onboard-preparing .ss-check { display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 50%; background: #dcf2e1; color: #176d4c; font-size: 14px; font-weight: 700; }
#onboard-preparing .ss-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#onboard-preparing .ss-detail { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 13px; min-height: 75px; background: var(--ss-card); border: 1px solid var(--ss-line); border-radius: 16px; box-shadow: 0 4px 12px #113e2c06; }
#onboard-preparing .ss-detail-icon { display: grid; place-items: center; flex: none; width: 37px; height: 37px; border-radius: 12px; background: #edf7ef; font-size: 17px; }
#onboard-preparing .ss-detail-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#onboard-preparing .ss-label { color: var(--ss-muted); font-size: 11px; line-height: 1.3; font-weight: 600; }
#onboard-preparing .ss-value { color: var(--ss-ink); font-size: 14px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
#onboard-preparing .ss-detail-feature { grid-column: 1 / -1; min-height: 76px; padding: 14px 16px; background: linear-gradient(105deg, #e9f6ec, #f8fcf9); border-color: #cce7d3; }
#onboard-preparing .ss-detail-feature .ss-detail-icon { width: 42px; height: 42px; background: #d5ecdc; font-size: 21px; }
#onboard-preparing .ss-detail-feature .ss-value { font: 800 19px/1.3 'Outfit', sans-serif; letter-spacing: -.4px; }
#onboard-preparing .ss-spark { margin-left: auto; color: #62a883; font-size: 25px; }
#onboard-preparing .ss-bmr-fields { display: grid; gap: 12px; }
#onboard-preparing .ss-bmr-fields label { display: grid; gap: 6px; color: var(--ss-ink); font-size: 13px; font-weight: 700; }
#onboard-preparing .ss-bmr-fields :is(select, input) { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--ss-line); border-radius: 12px; background: var(--ss-card); color: var(--ss-ink); font: inherit; }
#onboard-preparing .ss-bmr-estimate { margin: 12px 0; color: var(--ss-muted); font-size: 13px; line-height: 1.5; }
#onboard-preparing .ss-macro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#onboard-preparing .ss-macro { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-width: 0; min-height: 140px; padding: 16px 16px 18px; overflow: hidden; border: 1px solid var(--ss-line); border-radius: 18px; background: var(--ss-card); box-shadow: 0 6px 18px #113e2c09; }
#onboard-preparing .ss-macro::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: #74bda0; }
#onboard-preparing .ss-macro-protein::after { background: #eca77c; }
#onboard-preparing .ss-macro-carbs::after { background: #8eafdf; }
#onboard-preparing .ss-macro-fat::after { background: #b0cc82; }
#onboard-preparing .ss-macro-head { display: flex; align-items: center; gap: 10px; color: var(--ss-muted); font-size: 12px; font-weight: 700; line-height: 1.4; }
#onboard-preparing .ss-macro-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #eef7ef; font-size: 17px; }
#onboard-preparing .ss-macro-protein .ss-macro-icon { background: #fff3e7; }
#onboard-preparing .ss-macro-carbs .ss-macro-icon { background: #edf3ff; }
#onboard-preparing .ss-macro-fat .ss-macro-icon { background: #f0f7ea; }
#onboard-preparing .ss-macro-value { display: block; color: var(--ss-green); font: 800 25px/1.2 'Outfit', sans-serif; letter-spacing: -.8px; overflow-wrap: anywhere; }
#onboard-preparing .ss-fat-fibre { display: grid; gap: 8px; }
#onboard-preparing .ss-fat-fibre .ss-macro-value { margin-top: 3px; font-size: 22px; }
#onboard-preparing .ss-cta-band { margin-top: 20px; padding: 18px; border: 1px solid var(--ss-line); border-radius: 24px; background: linear-gradient(135deg, #eff8f1, #f7fcf8); }
#onboard-preparing .ss-cta-band h3 { margin: 0 0 4px; color: var(--ss-ink); font: 800 19px/1.3 'Outfit', sans-serif; letter-spacing: -.5px; }
#onboard-preparing .ss-cta-band p { margin-bottom: 14px; color: var(--ss-muted); font-size: 13px; line-height: 1.5; }
#onboard-preparing .btn-primary { min-height: 56px; margin: 0; padding: 16px 18px; border-radius: 17px; background: linear-gradient(90deg, #176d4c, #1aa8bc); color: #fff; box-shadow: 0 14px 28px #176d4c33; font-size: 15px; font-weight: 700; }
#onboard-preparing .btn-primary:hover { filter: brightness(.94); }
#onboard-preparing .btn-primary:focus-visible { outline: 3px solid #ffae6b; outline-offset: 4px; }
html[data-theme="dark"] body:has(#onboard-preparing.active) { background: radial-gradient(circle at top left, #203a2b, transparent 40%), var(--app-canvas); }
html[data-theme="dark"] .phone:has(> #onboard-preparing.active) { background: transparent; }
html[data-theme="dark"] #onboard-preparing { --ss-ink: var(--app-ink); --ss-muted: var(--app-muted); --ss-green: #8bd5ad; --ss-line: var(--app-line); --ss-card: var(--app-surface); --ss-panel: var(--app-canvas); --ss-soft: var(--app-soft); }
html[data-theme="dark"] #onboard-preparing .ss-shell,
html[data-theme="dark"] #onboard-preparing .ss-content { background: var(--app-canvas); }
html[data-theme="dark"] #onboard-preparing .ss-detail-feature,
html[data-theme="dark"] #onboard-preparing .ss-cta-band { background: var(--app-soft); border-color: var(--app-line); }
html[data-theme="dark"] #onboard-preparing .ss-overline { color: #8bd5ad; }
@media (max-width: 980px) {
  #onboard-preparing .ss-shell { grid-template-columns: 1fr; }
  #onboard-preparing .ss-showcase { padding: 24px 22px 28px; border-radius: 0 0 30px 30px; }
  #onboard-preparing .ss-hero-copy h2 { font-size: 42px; letter-spacing: -1.6px; }
  #onboard-preparing .ss-hero-copy > p { font-size: 15px; }
  #onboard-preparing .ss-dish-wrap { display: none; }
  #onboard-preparing .ss-content { padding: 18px 14px; }
  #onboard-preparing .ss-card { padding: 22px 18px 18px; border-radius: 24px; }
}
@media (max-width: 640px) {
  body:has(#onboard-preparing.active) { padding: 0; }
  #onboard-preparing .ss-shell { min-height: 100dvh; border-radius: 0; }
  #onboard-preparing .ss-brand { font-size: 22px; }
  #onboard-preparing .ss-brand-mark { width: 38px; height: 38px; font-size: 20px; }
  #onboard-preparing .ss-hero-copy h2 { font-size: 35px; }
  #onboard-preparing .ss-success { width: 56px; height: 56px; border-radius: 18px; font-size: 27px; }
  #onboard-preparing .allset-heading { font-size: 31px; }
  #onboard-preparing .ss-feature-stack { margin-top: 22px; }
}
@media (max-width: 420px) {
  #onboard-preparing .ss-panel { padding: 15px; }
  #onboard-preparing .ss-detail-grid { grid-template-columns: minmax(0, 1fr); }
  #onboard-preparing .ss-detail { min-height: 62px; }
  #onboard-preparing .ss-macro { padding: 13px; min-height: 126px; }
  #onboard-preparing .ss-macro-head { flex-wrap: wrap; }
  #onboard-preparing .ss-macro-value { font-size: 23px; }
  #onboard-preparing .ss-fat-fibre .ss-macro-value { font-size: 20px; }
  #onboard-preparing .ss-macro-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Login-only layout inspired by the supplied food gallery reference. */
body:has(#login-screen.active) { min-height: 100dvh; padding: 0; background: #f7f8f0; }
.phone:has(> #login-screen.active) { width: min(100%, 1650px); min-height: 100dvh; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.phone > #login-screen { --lg-ink: #163b31; --lg-muted: #63786e; --lg-green: #176d4c; --lg-border: #dfebe1; --lg-field: #fff; padding: 0; min-height: 100dvh; color: var(--lg-ink); text-align: left; }
#login-screen, #login-screen * { font-family: 'DM Sans', sans-serif; }
#login-screen .lg-page { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); min-height: 100dvh; }
#login-screen .lg-showcase {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0; min-height: 740px;
  display: flex; flex-direction: column; padding: 40px clamp(30px, 5vw, 85px) 35px;
  background: radial-gradient(circle at 83% 18%, #7ddc992b, transparent 35%), linear-gradient(150deg, #124b37, #176d4c 65%, #236f4e); color: #fff;
}
#login-screen .lg-showcase::before, #login-screen .lg-showcase::after { content: ''; position: absolute; z-index: -1; border: 1px solid #ffffff1f; border-radius: 50%; pointer-events: none; }
#login-screen .lg-showcase::before { width: 490px; height: 490px; top: 160px; right: -185px; }
#login-screen .lg-showcase::after { width: 420px; height: 420px; bottom: -240px; left: -160px; }
#login-screen .lg-brand { display: flex; align-items: center; gap: 11px; font: 800 25px 'Outfit', sans-serif; letter-spacing: -.9px; }
#login-screen .lg-brand-mark { flex: none; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 15px; background: #fff; color: #176d4c; font-size: 24px; box-shadow: 0 8px 22px #0000001c; }
#login-screen .lg-brand small { padding: 4px 6px; margin-left: 2px; border: 1px solid #ffffff52; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
#login-screen .lg-showcase-main { position: relative; margin: auto 0; padding: 42px 0 10px; }
#login-screen .lg-pill { display: inline-block; padding: 9px 15px; border: 1px solid #ffffff33; border-radius: 99px; background: #ffffff24; font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .5px; text-transform: uppercase; }
#login-screen .lg-showcase h2 { max-width: 580px; margin: 23px 0 17px; color: #fff; font: 800 clamp(44px, 4.6vw, 72px)/1.06 'Outfit', sans-serif; letter-spacing: -2.5px; }
#login-screen .lg-showcase h2 span { font: inherit; color: #b5ecc4; }
#login-screen .lg-showcase-desc { max-width: 410px; color: #d4ecdd; font-size: 16px; line-height: 1.7; }
#login-screen .lg-gallery { position: relative; isolation: isolate; height: 375px; width: min(100%, 510px); margin: 24px auto 0; }
#login-screen .lg-gallery-glow { position: absolute; inset: 28px 24px 12px 35px; border-radius: 48% 52% 44% 56% / 54% 43% 57% 46%; background: linear-gradient(135deg, #c9f0d0, #94cba6); opacity: .33; transform: rotate(-13deg); }
#login-screen .lg-gallery-ring { position: absolute; inset: 0 8% 7% 11%; border: 1px dashed #e4fde838; border-radius: 50%; transform: rotate(23deg); }
#login-screen .lg-gallery-leaf { position: absolute; z-index: 4; top: 2px; left: 0; font-size: 30px; transform: rotate(-18deg); }
#login-screen .lg-gallery-main { position: absolute; z-index: 2; left: 12%; top: 30px; width: 61%; height: 305px; overflow: hidden; border: 7px solid #fff; border-radius: 30px 30px 94px 30px; transform: rotate(-7deg); background: #fff; box-shadow: 0 25px 50px #001f1357; }
#login-screen .lg-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
#login-screen .lg-photo-caption { position: absolute; left: 16px; bottom: 15px; padding: 10px 12px; border-radius: 14px; background: #fffffff0; color: #163b31; font: 800 13px/1.1 'Outfit', sans-serif; box-shadow: 0 5px 18px #00000014; }
#login-screen .lg-photo-caption small { display: block; margin-top: 4px; color: #63786e; font-size: 10px; font-weight: 600; }
#login-screen .lg-gallery-second { position: absolute; z-index: 3; right: 2%; top: 28px; width: 42%; height: 171px; border: 7px solid #fff; border-radius: 26px; transform: rotate(8deg); box-shadow: 0 17px 34px #001f1347; overflow: hidden; background: #fff; }
#login-screen .lg-gallery-info { position: absolute; z-index: 4; right: 0; bottom: 38px; width: 44%; min-height: 129px; padding: 17px 17px 16px; border-radius: 22px; background: #fff; color: #163b31; box-shadow: 0 18px 35px #001f133b; transform: rotate(5deg); }
#login-screen .lg-info-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 9px; border-radius: 11px; background: #e5f4e7; font-size: 20px; }
#login-screen .lg-gallery-info strong { display: block; font: 800 17px/1.05 'Outfit', sans-serif; letter-spacing: -.25px; }
#login-screen .lg-gallery-info small { display: block; margin-top: 6px; color: #698375; font-size: 11px; font-weight: 600; line-height: 1.3; }
#login-screen .lg-gallery-pill { position: absolute; z-index: 5; left: 0; bottom: 9px; display: flex; align-items: center; gap: 8px; max-width: 220px; padding: 11px 14px; border: 1px solid #ffffffa6; border-radius: 999px; background: #e1f5e6; color: #195d42; box-shadow: 0 10px 20px #001f1333; transform: rotate(-5deg); font-size: 12px; font-weight: 700; }
#login-screen .lg-gallery-pill span { font-size: 17px; }
#login-screen .lg-showcase-foot { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; color: #cae9d6; font-size: 12px; font-weight: 600; }
#login-screen .lg-showcase-foot span { display: inline-flex; align-items: center; gap: 7px; }
#login-screen .lg-showcase-foot span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #b5ecc4; }
#login-screen .lg-auth-side { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px clamp(22px, 4vw, 65px) 30px; }
#login-screen .lg-card { width: 100%; max-width: 438px; margin: auto 0; padding: 40px 0; }
#login-screen .lg-overline { margin: 0 0 9px; color: var(--lg-green); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
#login-screen h1 { margin: 0 0 11px; color: var(--lg-ink); font: 800 clamp(35px, 3.8vw, 48px)/1.11 'Outfit', sans-serif; letter-spacing: -1.5px; }
#login-screen .desc { margin: 0 0 31px; color: var(--lg-muted); font-size: 15px; line-height: 1.6; }
#login-screen .lg-field { margin-bottom: 19px; }
#login-screen label { display: block; margin: 0 0 9px; color: var(--lg-ink); font-size: 13px; font-weight: 700; }
#login-screen .lg-field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
#login-screen .lg-field-head label { margin: 0; }
#login-screen .lg-field-head .login-link { margin: 0; color: var(--lg-green); font-size: 12px; font-weight: 700; }
#login-screen .lg-field-box { min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 15px; border: 1.5px solid var(--lg-border); border-radius: 15px; background: var(--lg-field); }
#login-screen .lg-field-box:focus-within { border-color: var(--lg-green); box-shadow: 0 0 0 4px #176d4c17; }
#login-screen .lg-field-box:has(.error) { border-color: #d33d55; }
#login-screen .lg-field-box svg { flex: none; width: 19px; height: 19px; stroke: #7f998c; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#login-screen .lg-field-box input { min-width: 0; width: 100%; min-height: 53px; margin: 0; padding: 12px 0; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--lg-ink); font-size: 14px; box-shadow: none; }
#login-screen .lg-field-box input::placeholder { color: #82998c; }
#login-screen .field-error { margin-top: 7px; }
#login-screen .btn-primary { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; margin: 4px 0 0; border-radius: 15px; background: #176d4c; color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 11px 25px #176d4c36; }
#login-screen .btn-primary::after { content: '→'; }
#login-screen .btn-primary:hover { background: #11583b; }
#login-screen .or-text { display: flex; align-items: center; gap: 15px; margin: 25px 0 20px; color: var(--lg-muted); font-size: 12px; }
#login-screen .or-text::before, #login-screen .or-text::after { content: ''; flex: 1; height: 1px; background: var(--lg-border); }
#login-screen .social-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
#login-screen .btn-social { min-width: 0; min-height: 53px; padding: 12px 10px; gap: 8px; border: 1.5px solid var(--lg-border); border-radius: 14px; background: var(--lg-field); color: var(--lg-ink); font-size: 12px; font-weight: 700; }
#login-screen .btn-social:hover { border-color: #a7cbb1; background: #eef7ef; }
#login-screen .login-link.center { margin: 26px 0 0; color: var(--lg-muted); font-size: 14px; font-weight: 400; }
#login-screen .login-link.center b { color: var(--lg-green); font-weight: 700; }
#login-screen .lg-auth-foot { padding-top: 20px; color: var(--lg-muted); font-size: 12px; text-align: center; line-height: 1.6; }
#login-screen button:focus-visible { outline: 3px solid #ffae6b; outline-offset: 3px; }
html[data-theme="dark"] body:has(#login-screen.active) { background: var(--app-canvas); }
html[data-theme="dark"] .phone:has(> #login-screen.active) { background: transparent; }
html[data-theme="dark"] #login-screen { --lg-ink: var(--app-ink); --lg-muted: var(--app-muted); --lg-green: #8bd5ad; --lg-border: var(--app-line); --lg-field: var(--app-surface); }
html[data-theme="dark"] #login-screen .lg-field-box input { background: transparent !important; }
@media (max-width: 980px) {
  #login-screen .lg-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #login-screen .lg-showcase { padding: 28px; min-height: 690px; }
  #login-screen .lg-showcase h2 { font-size: 47px; }
  #login-screen .lg-gallery { height: 320px; }
  #login-screen .lg-gallery-main { height: 255px; top: 22px; }
  #login-screen .lg-gallery-second { height: 145px; top: 22px; }
  #login-screen .lg-gallery-info { bottom: 31px; min-height: 115px; padding: 13px; }
  #login-screen .lg-gallery-pill { bottom: 3px; }
  #login-screen .lg-auth-side { padding: 28px; }
  #login-screen .social-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  #login-screen .lg-page { display: flex; flex-direction: column; }
  #login-screen .lg-showcase { min-height: 0; padding: 21px 22px 28px; border-radius: 0 0 30px 30px; }
  #login-screen .lg-showcase-main { padding: 25px 0 0; }
  #login-screen .lg-showcase h2 { margin: 14px 0 10px; font-size: 37px; letter-spacing: -1.2px; }
  #login-screen .lg-showcase-desc { font-size: 13px; }
  #login-screen .lg-gallery { display: none; }
  #login-screen .lg-showcase-foot { padding-top: 16px; }
  #login-screen .lg-brand { font-size: 22px; }
  #login-screen .lg-brand-mark { width: 38px; height: 38px; }
  #login-screen .lg-auth-side { padding: 22px 20px 26px; }
  #login-screen .lg-card { max-width: 490px; margin: 12px 0 22px; padding: 0; }
  #login-screen h1 { font-size: 37px; }
  #login-screen .desc { margin-bottom: 23px; }
  #login-screen .lg-auth-foot { padding-top: 0; }
}
@media (max-width: 380px) {
  #login-screen .lg-showcase h2 { font-size: 33px; }
  #login-screen .lg-pill { font-size: 10px; padding: 9px 12px; }
}

/* Home dashboard only: existing live cards and navigation, wider presentation. */
body:has(#home-screen.active) { min-height: 100dvh; padding: 0; background: #f7f8f0; }
.phone:has(> #home-screen.active) { width: min(1580px, 100%); min-height: 100dvh; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
.phone > #home-screen { --hd-ink: #163b31; --hd-green: #176d4c; --hd-muted: #667c70; --hd-line: #dce8dd; --hd-card: #fff; --hd-soft: #e7f5e9; --hd-field: #fbfdf9; color: var(--hd-ink); text-align: left; }
#home-screen, #home-screen * { font-family: 'DM Sans', sans-serif; }
#home-screen .hd-layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100dvh; }
#home-screen .hd-sidebar { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 0; height: 100dvh; min-height: 620px; padding: 30px 18px; border-right: 1px solid var(--hd-line); background: var(--hd-card); z-index: 10; }
#home-screen .hd-brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; white-space: nowrap; font: 800 23px 'Outfit', sans-serif; letter-spacing: -.8px; }
#home-screen .hd-brand-word, #home-screen .hd-brand-word em { font: inherit; }
#home-screen .hd-brand-word em { color: var(--hd-green); font-style: normal; }
#home-screen .hd-brand-mark { display: grid; place-items: center; flex: none; width: 43px; height: 43px; border-radius: 15px; background: #176d4c; color: #fff; box-shadow: 0 8px 18px #176d4c20; font-size: 23px; }
#home-screen .hd-nav-heading { margin: 43px 12px 15px; color: var(--hd-muted); font-size: 10px; font-weight: 700; letter-spacing: 2.1px; text-transform: uppercase; }
#home-screen .bottom-nav { position: static; inset: auto; transform: none; display: flex; flex-direction: column; gap: 3px; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
#home-screen .bottom-nav .nav-item { display: flex; flex: none; flex-direction: row; align-items: center; justify-content: flex-start; gap: 13px; width: 100%; min-height: 49px; padding: 14px 15px; margin: 0; border-radius: 16px; color: var(--hd-muted); font-size: 14px; font-weight: 700; text-align: left; }
#home-screen .bottom-nav .nav-item.active, #home-screen .bottom-nav .nav-item:hover { background: var(--hd-soft); color: var(--hd-green); }
#home-screen .bottom-nav .nav-icon { width: 22px; height: 22px; margin: 0; padding: 0; background: transparent; border-radius: 0; box-shadow: none; transform: none; color: inherit; }
#home-screen .bottom-nav .nav-icon::before { width: 20px; height: 20px; }
#home-screen .hd-sidebar-note { margin-top: auto; padding: 18px; border: 1px solid #d7ead5; border-radius: 21px; background: linear-gradient(140deg, #e2f5e2, #f3f8e9); }
#home-screen .hd-sidebar-note > span { font-size: 30px; }
#home-screen .hd-sidebar-note strong { display: block; margin: 8px 0; color: var(--hd-ink); font: 700 17px/1.25 'Outfit', sans-serif; }
#home-screen .hd-sidebar-note p { color: var(--hd-muted); font-size: 12px; line-height: 1.6; }
#home-screen .hd-main { position: relative; min-width: 0; padding: 28px clamp(16px, 3.5vw, 54px) 45px; background: radial-gradient(ellipse at 96% 0%, #edf5df, transparent 30%), radial-gradient(ellipse at 0% 70%, #e8f4e4, transparent 24%), #f7f8f0; }
#home-screen .hd-topbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 28px; }
#home-screen .hd-breadcrumb { color: var(--hd-muted); font-size: 13px; font-weight: 600; }
#home-screen .hd-breadcrumb span { padding: 0 6px; color: #9aad9e; }
#home-screen .hd-breadcrumb strong { color: var(--hd-green); }
#home-screen .hd-mobile-brand { display: none; }
#home-screen .hd-day-note { padding: 11px 14px; border: 1px solid var(--hd-line); border-radius: 30px; background: var(--hd-card); color: var(--hd-green); font-size: 12px; font-weight: 600; }
#home-screen .hd-overline { margin-bottom: 9px; color: var(--hd-green); font-size: 11px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
#home-screen .home-header { gap: 14px; margin: 0 0 24px; }
#home-screen .greeting { flex: 1; min-width: 0; }
#home-screen .greet-small { margin-bottom: 4px; color: var(--hd-muted); font-size: 14px; }
#home-screen .greeting h2 { color: var(--hd-ink); font: 800 clamp(28px, 3vw, 39px)/1.1 'Outfit', sans-serif; letter-spacing: -1.2px; overflow-wrap: anywhere; }
#home-screen .menu-icon, #home-screen .bell-wrap { display: grid; place-items: center; flex: none; width: 43px; height: 43px; border: 1px solid var(--hd-line); border-radius: 50%; background: var(--hd-card); color: var(--hd-ink); }
#home-screen .bell-icon { font-size: 20px; }
#home-screen .bell-badge { top: -4px; right: -4px; }
#home-screen .home-menu { position: absolute; top: 160px; left: clamp(16px, 3.5vw, 54px); width: min(300px, calc(100% - 32px)); margin: 0; border: 1px solid var(--hd-line); border-radius: 18px; background: var(--hd-card); box-shadow: 0 15px 45px #12422f26; z-index: 30; overflow: hidden; }
#home-screen .menu-item { padding: 14px 16px; color: var(--hd-ink); font-size: 14px; border-color: var(--hd-line); }
#home-screen .menu-item:hover { background: var(--hd-soft); }
#home-screen .hd-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .84fr); align-items: center; min-height: 254px; margin-bottom: 28px; overflow: hidden; border-radius: 29px; background: linear-gradient(115deg, #14593f, #247b53 65%, #348b68); color: #fff; box-shadow: 0 18px 40px #15664221; }
#home-screen .hd-hero::before, #home-screen .hd-hero::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; pointer-events: none; }
#home-screen .hd-hero::before { right: 8%; top: -205px; border: 1px solid #ffffff23; }
#home-screen .hd-hero::after { right: -180px; bottom: -250px; background: #ffffff0e; }
#home-screen .hd-hero-copy { position: relative; padding: 35px clamp(25px, 4vw, 52px); }
#home-screen .hd-hero-eyebrow { margin-bottom: 16px; color: #d4efd6; font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
#home-screen .hd-hero h2 { max-width: 440px; margin: 0 0 13px; color: #fff; font: 800 clamp(31px, 3.25vw, 46px)/1.08 'Outfit', sans-serif; letter-spacing: -1.4px; }
#home-screen .hd-hero h2 em { font: inherit; font-style: normal; color: #caedb7; }
#home-screen .hd-hero-copy > p:last-child { max-width: 355px; color: #e1f0e4; font-size: 14px; line-height: 1.6; }
#home-screen .hd-hero-art { align-self: stretch; position: relative; min-height: 254px; overflow: hidden; }
#home-screen .hd-hero-art img { position: absolute; top: 50%; left: 50%; transform: translate(-45%, -49%); width: min(82%, 340px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 11px solid #ffffffe6; box-shadow: 0 24px 45px #0638225a; background: #9cc99d; }
#home-screen .hd-hero-note { position: absolute; bottom: 26px; left: 5%; padding: 10px 14px; border: 1px solid #ecffe5a1; border-radius: 14px; background: #ffffffed; color: #1c5b3f; box-shadow: 0 8px 22px #124b3244; font-size: 11px; font-weight: 700; }
#home-screen .hd-content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
#home-screen .hd-primary-column, #home-screen .hd-secondary-column { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
#home-screen .summary-card, #home-screen .hd-panel { min-width: 0; margin: 0; padding: 25px; border: 1px solid var(--hd-line); border-radius: 26px; background: var(--hd-card); box-shadow: 0 15px 45px #12422f11; }
#home-screen .summary-label { margin-bottom: 18px; color: var(--hd-ink); font: 700 23px/1.2 'Outfit', sans-serif; letter-spacing: -.55px; }
#home-screen .hd-calories { margin-bottom: 16px; padding: 20px; border: 1px solid #e6efdf; border-radius: 21px; background: linear-gradient(120deg, #f2f9ed, #fff9ed); }
#home-screen .cal-label { margin-bottom: 8px; color: var(--hd-muted); font-size: 12px; font-weight: 600; }
#home-screen .cal-row { gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
#home-screen .cal-value { color: var(--hd-ink); font: 800 25px/1.2 'Outfit', sans-serif; letter-spacing: -.6px; }
#home-screen .cal-percent { color: var(--hd-green); font-size: 13px; }
#home-screen .progress-track { height: 8px; margin: 0; background: #dbeadd; }
#home-screen .progress-fill { background: #176d4c; }
#home-screen .hd-macros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#home-screen .hd-macros .macros-row { display: contents; }
#home-screen .macro { min-width: 0; padding: 14px 8px; border: 1px solid var(--hd-line); border-radius: 17px; background: var(--hd-field); text-align: center; }
#home-screen .macro-icon { width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 12px; box-shadow: none; }
#home-screen .macro p:not(.macro-value) { color: var(--hd-muted); font-size: 11px; }
#home-screen .macro .macro-value { margin-top: 6px; color: var(--hd-ink); font: 700 15px/1.3 'Outfit', sans-serif; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
#home-screen .daily-activity-trackers { gap: 15px; margin: 0; }
#home-screen .daily-tracker { padding: 21px; border: 1px solid var(--hd-line); border-radius: 24px; background: var(--hd-card); box-shadow: 0 15px 45px #12422f11; }
#home-screen .daily-tracker-heading { align-items: flex-start; text-align: left; gap: 15px; }
#home-screen .daily-tracker-heading h3 { display: flex; align-items: center; gap: 9px; color: var(--hd-ink); font: 700 17px/1.2 'Outfit', sans-serif; }
#home-screen .daily-tracker-heading h3 span { display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin: 0; border-radius: 14px; background: #e2f4f7; font-size: 20px; }
#home-screen .steps-tracker .daily-tracker-heading h3 span { background: #fff0e6; }
#home-screen .daily-tracker-heading strong { color: var(--hd-ink); font: 800 25px/1.2 'Outfit', sans-serif; letter-spacing: -.7px; }
#home-screen .daily-tracker-caption { min-height: 34px; margin: 10px 0 14px; color: var(--hd-muted); font-size: 11px; line-height: 1.5; }
#home-screen .daily-tracker-actions, #home-screen .steps-entry-row { gap: 8px; }
#home-screen .daily-tracker-actions button, #home-screen .steps-entry-row button, #home-screen .steps-quick-add { min-height: 39px; padding: 9px 8px; border: 1px solid var(--hd-line); border-radius: 11px; background: var(--hd-soft); color: var(--hd-green); font-size: 12px; font-weight: 700; }
#home-screen .steps-entry-row input { height: 39px; padding: 8px; border-color: var(--hd-line); border-radius: 10px; color: var(--hd-ink); background: var(--hd-field); }
#home-screen .steps-quick-add { margin-top: 8px; }
#home-screen .hd-meals { min-width: 0; }
#home-screen .section-title { margin: 6px 0 8px; color: var(--hd-ink); font: 700 24px/1.2 'Outfit', sans-serif; letter-spacing: -.55px; }
#home-screen .home-meal-history-hint { margin: 0 0 15px; color: var(--hd-muted); font-size: 12px; line-height: 1.5; }
#home-screen #home-meals-list { display: grid; gap: 13px; padding: 0; }
#home-screen .home-meal-entry { grid-template-columns: minmax(0, 1fr) 40px; gap: 12px; padding: 12px; border: 1px solid var(--hd-line); border-radius: 20px; background: var(--hd-card); box-shadow: 0 7px 20px #18472908; }
#home-screen .home-meal-card { position: relative; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#home-screen .home-meal-card:hover { transform: none; box-shadow: none; }
#home-screen .home-meal-label { margin: 0 0 5px 100px; color: var(--hd-green); font-size: 10px; line-height: 1.5; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
#home-screen .home-meal-recipe { gap: 11px; padding: 0; border-radius: 0; background: transparent; min-height: 65px; }
#home-screen .home-meal-thumb { position: absolute; top: 0; left: 0; width: 89px; height: 85px; border-radius: 15px; }
#home-screen .home-meal-copy { margin-left: 100px; }
#home-screen .home-meal-copy b { color: var(--hd-ink); font: 700 18px/1.25 'Outfit', sans-serif; white-space: normal; overflow: visible; }
#home-screen .home-meal-copy small { margin-top: 6px; color: var(--hd-muted); font-size: 11px; line-height: 1.5; }
#home-screen .home-meal-open { display: none; }
#home-screen .home-meal-entry .meal-eaten-toggle { width: 40px; height: 40px; border: 1px solid #d7e8da; border-radius: 13px; background: #f6fbf4; color: var(--hd-green); box-shadow: none; }
#home-screen .home-meal-entry .meal-eaten-toggle.saved { background: #176d4c; border-color: #176d4c; color: #fff; box-shadow: none; }
#home-screen .home-meal-entry .meal-eaten-toggle::after { color: inherit; }
#home-screen .already-have-card { position: relative; overflow: hidden; min-height: 185px; margin: 0; padding: 25px; border: 1px solid #e8e8d9; border-radius: 26px; background: linear-gradient(125deg, #f4ead9, #e4f3d8); box-shadow: 0 15px 45px #12422f11; }
#home-screen .already-have-card::after { content: '🥑'; position: absolute; right: 10px; bottom: 8px; font-size: 62px; transform: rotate(-11deg); opacity: .75; pointer-events: none; }
#home-screen .already-have-label { position: relative; z-index: 1; margin-bottom: 12px; color: #176d4c; font: 700 24px/1.2 'Outfit', sans-serif; }
#home-screen .already-have-items { position: relative; z-index: 1; max-width: calc(100% - 40px); color: #466852; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
#home-screen .hd-panel h3 { margin: 0 0 8px; color: var(--hd-ink); font: 700 21px/1.2 'Outfit', sans-serif; letter-spacing: -.4px; }
#home-screen .hd-panel > p { margin: 0 0 18px; color: var(--hd-muted); font-size: 12px; line-height: 1.65; }
#home-screen .hd-scanner .btn-primary { min-height: 62px; margin: 0; padding: 16px; border-radius: 18px; background: #144e39; color: #fff; font-size: 15px; box-shadow: none; }
#home-screen .hd-tip { background: #fffbf1; border-color: #f0e6ce; }
#home-screen .hd-tip-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 12px; border-radius: 13px; background: #fff0c8; font-size: 20px; }
#home-screen .hd-tip > p { margin: 0; }
#home-screen .history-open-button { margin: 0; padding: 13px 14px; border-color: var(--hd-line); border-radius: 14px; background: var(--hd-soft); color: var(--hd-green); font-size: 13px; line-height: 1.5; }
#home-screen .hd-footer { padding-top: 35px; color: var(--hd-muted); font-size: 11px; line-height: 1.7; text-align: center; }
html[data-theme="dark"] body:has(#home-screen.active) { background: var(--app-canvas); }
html[data-theme="dark"] .phone:has(> #home-screen.active) { background: transparent; }
html[data-theme="dark"] #home-screen { --hd-ink: var(--app-ink); --hd-green: #8bd5ad; --hd-muted: var(--app-muted); --hd-line: var(--app-line); --hd-card: var(--app-surface); --hd-soft: var(--app-soft); --hd-field: var(--app-canvas); }
html[data-theme="dark"] #home-screen .hd-main { background: radial-gradient(ellipse at 96% 0%, #243a28, transparent 30%), var(--app-canvas); }
html[data-theme="dark"] #home-screen .hd-sidebar-note,
html[data-theme="dark"] #home-screen .hd-calories { background: var(--app-soft); border-color: var(--app-line); }
html[data-theme="dark"] #home-screen .hd-tip { background: #393021; border-color: #665537; }
html[data-theme="dark"] #home-screen .home-meal-entry { background: var(--app-surface); }
html[data-theme="dark"] #home-screen .already-have-card { background: linear-gradient(125deg, #343c28, #263e30); border-color: var(--app-line); }
html[data-theme="dark"] #home-screen .already-have-label { color: var(--hd-green); }
html[data-theme="dark"] #home-screen .home-meal-recipe { background: transparent !important; }
html[data-theme="dark"] #home-screen .home-meal-entry .meal-eaten-toggle:not(.saved) { background: var(--app-soft); border-color: var(--app-line); }
@media (max-width: 1160px) {
  #home-screen .hd-layout { grid-template-columns: 190px minmax(0, 1fr); }
  #home-screen .hd-sidebar { padding: 24px 12px; }
  #home-screen .hd-brand { gap: 7px; padding: 0; font-size: 19px; }
  #home-screen .hd-brand-mark { width: 38px; height: 38px; }
  #home-screen .hd-main { padding: 25px 25px 45px; }
  #home-screen .hd-content-grid { grid-template-columns: 1fr; }
  #home-screen .hd-secondary-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
}
@media (max-width: 900px) {
  #home-screen .hd-day-note { display: none; }
  #home-screen .hd-sidebar-note { padding: 14px; }
  #home-screen .hd-hero-copy { padding: 26px; }
  #home-screen .hd-hero h2 { font-size: 34px; }
  #home-screen .hd-hero-note { left: 0; padding: 9px; font-size: 10px; }
  #home-screen .daily-tracker { padding: 17px; }
  #home-screen .daily-tracker-heading strong { font-size: 23px; }
  #home-screen .hd-secondary-column { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  #home-screen .hd-layout { display: block; }
  #home-screen .hd-sidebar { display: contents; }
  #home-screen .hd-sidebar > :not(.bottom-nav) { display: none; }
  #home-screen .bottom-nav { position: fixed; inset: auto 0 0; display: flex; flex-direction: row; justify-content: space-between; gap: 4px; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hd-line); background: var(--hd-card); box-shadow: 0 -10px 25px #24523e12; z-index: 25; }
  #home-screen .bottom-nav .nav-item { flex: 1; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 48px; padding: 7px 3px; border-radius: 12px; font-size: 10px; text-align: center; }
  #home-screen .bottom-nav .nav-icon { width: 20px; height: 20px; }
  #home-screen .hd-main { padding: 16px 15px 110px; }
  #home-screen .hd-topbar { margin-bottom: 20px; }
  #home-screen .hd-breadcrumb { display: none; }
  #home-screen .hd-mobile-brand { display: block; color: var(--hd-ink); font: 800 22px 'Outfit', sans-serif; letter-spacing: -.7px; }
  #home-screen .home-header { gap: 10px; margin-bottom: 20px; }
  #home-screen .greeting h2 { font-size: 28px; }
  #home-screen .greet-small { font-size: 12px; }
  #home-screen .menu-icon, #home-screen .bell-wrap { width: 39px; height: 39px; }
  #home-screen .home-menu { left: 15px; top: 145px; }
  #home-screen .hd-hero { grid-template-columns: minmax(0, 1fr) minmax(0, .74fr); min-height: 225px; margin-bottom: 20px; border-radius: 23px; }
  #home-screen .hd-hero-copy { padding: 22px 0 23px 22px; }
  #home-screen .hd-hero h2 { font-size: 27px; letter-spacing: -.7px; }
  #home-screen .hd-hero-copy > p:last-child { font-size: 11px; }
  #home-screen .hd-hero-eyebrow { margin-bottom: 9px; font-size: 9px; letter-spacing: 1px; }
  #home-screen .hd-hero-art { min-height: 225px; }
  #home-screen .hd-hero-art img { width: 190px; left: 63%; border-width: 7px; }
  #home-screen .hd-hero-note { display: none; }
  #home-screen .hd-content-grid, #home-screen .hd-primary-column, #home-screen .hd-secondary-column { gap: 16px; }
  #home-screen .summary-card, #home-screen .hd-panel { padding: 20px; border-radius: 22px; }
  #home-screen .summary-label { font-size: 21px; }
  #home-screen .hd-calories { padding: 15px; }
  #home-screen .cal-value { font-size: 22px; }
  #home-screen .hd-macros { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #home-screen .macro { padding: 12px 8px; }
  #home-screen .daily-activity-trackers { gap: 11px; }
  #home-screen .daily-tracker { padding: 15px; border-radius: 20px; }
  #home-screen .daily-tracker-heading h3 { gap: 7px; font-size: 15px; }
  #home-screen .daily-tracker-heading h3 span { width: 34px; height: 34px; }
  #home-screen .daily-tracker-heading strong { font-size: 22px; }
  #home-screen .daily-tracker-actions { flex-wrap: wrap; }
  #home-screen .daily-tracker-actions button { padding: 9px 5px; }
  #home-screen .home-meal-entry { gap: 10px; padding: 10px; grid-template-columns: minmax(0, 1fr) 37px; }
  #home-screen .home-meal-label { margin-left: 87px; }
  #home-screen .home-meal-thumb { width: 76px; height: 77px; }
  #home-screen .home-meal-copy { margin-left: 87px; }
  #home-screen .home-meal-copy b { font-size: 16px; }
  #home-screen .home-meal-entry .meal-eaten-toggle { width: 37px; height: 37px; }
}
@media (max-width: 395px) {
  #home-screen .hd-hero h2 { font-size: 24px; }
  #home-screen .hd-hero-copy { padding-left: 18px; }
  #home-screen .hd-hero-art img { width: 165px; }
  #home-screen .greeting h2 { font-size: 25px; }
  #home-screen .daily-tracker { padding: 12px; }
  #home-screen .daily-tracker-heading h3 { flex-wrap: wrap; font-size: 14px; }
}
@media (max-width: 360px) {
  #home-screen .daily-activity-trackers { grid-template-columns: 1fr; }
  #home-screen .daily-tracker-caption { min-height: 0; }
  #home-screen .home-meal-thumb { width: 60px; height: 70px; }
  #home-screen .home-meal-label, #home-screen .home-meal-copy { margin-left: 70px; }
}

/* Kitchen menu drawer: the six existing destinations retain their handlers. */
body:has(#home-menu[open]) { overflow: hidden; }
#home-screen .menu-icon { cursor: pointer; border-radius: 15px; }
#home-screen #home-menu {
  position: fixed; inset: 0 auto 0 0; width: min(405px, calc(100vw - 18px));
  max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: #fffdf8; color: var(--hd-ink);
  box-shadow: 22px 0 70px #102e2255; overflow: hidden;
}
#home-screen #home-menu.open { display: flex; flex-direction: column; }
#home-menu::backdrop { background: rgba(13, 39, 31, .38); backdrop-filter: blur(4px); }
#home-menu .hm-head { flex: none; padding: 23px 24px 0; }
#home-menu .hm-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#home-menu .hm-logo { display: flex; align-items: center; gap: 10px; font: 800 22px 'Outfit', sans-serif; letter-spacing: -.8px; }
#home-menu .hm-logo > span:last-child, #home-menu .hm-logo em { font: inherit; }
#home-menu .hm-logo em { color: #2b9667; font-style: normal; }
#home-menu .hm-logo-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 14px; background: #176d4c; color: white; box-shadow: 0 7px 15px #176d4c21; }
#home-menu .hm-close { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid #deebdf; border-radius: 14px; background: #fff; color: #385f4d; font-size: 24px; cursor: pointer; }
#home-menu .hm-welcome { position: relative; overflow: hidden; min-height: 166px; margin-top: 23px; padding: 22px 22px 23px; border-radius: 25px; background: linear-gradient(125deg, #135b41 5%, #278b65 75%, #4da97b); color: white; box-shadow: 0 12px 28px #166b481d; }
#home-menu .hm-welcome::before, #home-menu .hm-welcome::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
#home-menu .hm-welcome::before { width: 175px; height: 175px; border: 1px solid #ffffff4a; right: -45px; top: -75px; }
#home-menu .hm-welcome::after { width: 210px; height: 210px; background: #ffffff12; right: -130px; bottom: -150px; }
#home-menu .hm-eyebrow { position: relative; z-index: 1; margin: 0; color: #dbefdc; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; }
#home-menu .hm-welcome h2 { position: relative; z-index: 1; max-width: calc(100% - 75px); margin: 10px 0; color: white; font: 800 26px/1.11 'Outfit', sans-serif; letter-spacing: -.9px; }
#home-menu .hm-intro { position: relative; z-index: 1; max-width: calc(100% - 90px); margin: 0; color: #e4f3e8; font-size: 12px; line-height: 1.55; }
#home-menu .hm-plate { position: absolute; right: 12px; bottom: 22px; display: grid; place-items: center; width: 98px; height: 98px; border: 5px solid #ffffffac; border-radius: 50%; background: #eaffd6; box-shadow: 0 9px 23px #093d2b5a; font-size: 49px; transform: rotate(-8deg); }
#home-menu .hm-body { min-height: 0; flex: 1; padding: 24px 19px 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b5d7ba transparent; }
#home-menu .hm-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 13px; }
#home-menu .hm-section-heading h3 { margin: 0; color: #6d897b; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
#home-menu .hm-section-heading > span { flex: none; color: #738779; font-size: 11px; font-weight: 700; }
#home-menu .hm-links { display: grid; gap: 8px; }
#home-screen #home-menu .menu-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 19px; background: transparent; text-align: left; transition: background .2s, border-color .2s; }
#home-screen #home-menu .menu-item:hover { background: #eefaec; border-color: #d5ead9; }
#home-menu .hm-icon { display: grid; place-items: center; flex: none; width: 53px; height: 53px; border-radius: 16px; font-size: 25px; color: #234b38; }
#home-menu .hm-lemon { background: #fff1d8; }
#home-menu .hm-peach { background: #fff0e5; }
#home-menu .hm-blue { background: #e5f5ff; }
#home-menu .hm-mint { background: #dff2df; }
#home-menu .hm-lilac { background: #eee7ff; }
#home-menu .hm-pink { background: #ffe9e7; }
#home-menu .hm-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 3px; }
#home-menu .hm-copy strong { color: #234b38; font: 700 15px 'Outfit', sans-serif; }
#home-menu .hm-copy small { color: #687f70; font-size: 11.5px; font-weight: 500; line-height: 1.4; }
#home-menu .hm-arrow { color: #799b88; font-size: 18px; }
#home-menu .hm-foot { display: flex; align-items: center; flex: none; gap: 11px; padding: 13px 24px calc(17px + env(safe-area-inset-bottom)); border-top: 1px solid #edf1e8; }
#home-menu .hm-foot-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: #e5f4e4; font-size: 20px; }
#home-menu .hm-foot b { display: block; margin-bottom: 2px; color: #25513b; font-size: 12px; }
#home-menu .hm-foot div > span { color: #678475; font-size: 11px; line-height: 1.5; }
#home-menu button:focus-visible, #home-screen .menu-icon:focus-visible { outline: 3px solid #e6ad63; outline-offset: 2px; }
html[data-theme="dark"] #home-menu .hm-logo em,
html[data-theme="dark"] #home-menu .hm-copy strong,
html[data-theme="dark"] #home-menu .hm-foot b { color: var(--hd-ink); }
html[data-theme="dark"] #home-menu .hm-copy small,
html[data-theme="dark"] #home-menu .hm-section-heading > span,
html[data-theme="dark"] #home-menu .hm-foot div > span { color: var(--hd-muted); }
html[data-theme="dark"] #home-menu .hm-close { color: var(--hd-ink); background: var(--hd-soft); border-color: var(--hd-line); }
html[data-theme="dark"] #home-menu .hm-foot { border-color: var(--hd-line); }
html[data-theme="dark"] #home-screen #home-menu .menu-item:hover { background: var(--hd-soft); border-color: var(--hd-line); }
@media (max-width: 690px) {
  #home-menu .hm-head { padding: 18px 20px 0; }
  #home-menu .hm-welcome { margin-top: 17px; min-height: 149px; padding: 18px; }
  #home-menu .hm-welcome h2 { margin: 8px 0; font-size: 24px; }
  #home-menu .hm-plate { width: 83px; height: 83px; font-size: 43px; }
  #home-menu .hm-body { padding: 17px 15px 7px; }
  #home-menu .hm-section-heading { padding-bottom: 8px; }
  #home-menu .hm-links { gap: 3px; }
  #home-screen #home-menu .menu-item { padding: 9px 10px; gap: 11px; }
  #home-menu .hm-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 22px; }
  #home-menu .hm-foot { padding: 10px 19px calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-height: 540px) {
  #home-menu .hm-head { padding: 12px 20px 0; }
  #home-menu .hm-welcome { display: none; }
  #home-menu .hm-body { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { #home-screen #home-menu .menu-item { transition: none; } }

/* Profile presentation; original data IDs, actions and destination pages retained. */
body:has(#profile-screen.active) { padding: 0; background: #f7f8f0; }
.phone:has(> #profile-screen.active) { width: min(1120px, 100%); min-height: 100dvh; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
#profile-screen { --pr-ink: #153b2c; --pr-muted: #6e8478; --pr-green: #176d4c; --pr-card: #fff; --pr-line: #e0ebe1; --pr-soft: #eff8ed; color: var(--pr-ink); text-align: left; }
#profile-screen, #profile-screen * { font-family: 'DM Sans', sans-serif; }
#profile-screen .pr-shell { padding: 32px 24px 112px; }
#profile-screen .pr-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; color: var(--pr-muted); font-size: 13px; }
#profile-screen .pr-topbar > span:first-child > span { padding: 0 8px; color: #94a69a; }
#profile-screen .pr-topbar strong { color: var(--pr-green); }
#profile-screen .pr-brand { font: 800 22px 'Outfit', sans-serif; letter-spacing: -.8px; color: var(--pr-ink); }
#profile-screen .pr-brand em { font: inherit; font-style: normal; color: var(--pr-green); }
#profile-screen .pr-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 12px 0 24px; }
#profile-screen .pr-kicker { display: block; margin-bottom: 10px; color: var(--pr-green); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
#profile-screen .pr-heading h1 { margin: 0 0 9px; color: var(--pr-ink); font: 800 clamp(31px, 4vw, 43px)/1.1 'Outfit', sans-serif; letter-spacing: -1.5px; }
#profile-screen .pr-heading p { color: var(--pr-muted); font-size: 14px; line-height: 1.6; }
#profile-screen .pr-spark { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 17px; background: #e5f4e6; font-size: 27px; transform: rotate(-7deg); }
#profile-screen .pr-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 21px; padding: clamp(21px, 3.5vw, 38px); border-radius: 31px; color: #fff; background: linear-gradient(118deg, #145941, #1b7654 62%, #35936e); box-shadow: 0 18px 45px #185c3a21; }
#profile-screen .pr-hero::after { content: ''; position: absolute; z-index: -1; right: -85px; top: -145px; width: 270px; height: 270px; border: 45px solid #ffffff12; border-radius: 50%; }
#profile-screen .pr-hero::before { content: ''; position: absolute; z-index: -1; left: 40%; bottom: -155px; width: 190px; height: 190px; background: #ffffff0b; border-radius: 50%; }
#profile-screen .pr-person { display: flex; align-items: center; min-width: 0; gap: 20px; }
#profile-screen #profile-avatar-circle { display: grid; place-items: center; flex: none; width: 94px; height: 94px; margin: 0; border: 4px solid #ffffffd1; border-radius: 26px; background: linear-gradient(150deg, #eaffda, #d5f1e4) !important; box-shadow: 0 12px 30px #042d1940; overflow: hidden; font-size: 45px; }
#profile-screen #profile-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
#profile-screen .pr-identity { min-width: 0; }
#profile-screen .pr-status { color: #e1f7d9; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
#profile-screen #profile-name { margin: 9px 0 7px; color: #fff; font: 800 clamp(26px, 3vw, 36px)/1.1 'Outfit', sans-serif; letter-spacing: -.7px; overflow-wrap: anywhere; }
#profile-screen .pr-person .desc { margin: 0; color: #e0f5e5; font-size: 13px; overflow-wrap: anywhere; }
#profile-screen .pr-hero-actions { flex: none; }
#profile-screen .pr-hero-actions .btn-outline { width: auto; margin: 0; padding: 13px 18px; border: 0; border-radius: 14px; background: #fff; color: #176447; box-shadow: 0 6px 16px #082d1d29; font-size: 13px; font-weight: 800; }
#profile-screen .pr-content-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; gap: 19px; }
#profile-screen .pr-stack { display: grid; gap: 19px; min-width: 0; }
#profile-screen .pr-card { min-width: 0; padding: 23px; border: 1px solid var(--pr-line); border-radius: 25px; background: var(--pr-card); box-shadow: 0 9px 32px #234d3709; }
#profile-screen .pr-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
#profile-screen .pr-card-heading h2 { margin: 0; color: var(--pr-ink); font: 800 20px 'Outfit', sans-serif; letter-spacing: -.35px; }
#profile-screen .pr-tag { flex: none; padding: 7px 10px; border-radius: 99px; background: #e6f7e8; color: #287951; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
#profile-screen .profile-list { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
#profile-screen .profile-list-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) 15px; column-gap: 13px; row-gap: 5px; align-items: center; padding: 15px 4px; border-bottom: 1px solid var(--pr-line); background: transparent; }
#profile-screen .profile-list-item:last-child { border-bottom: 0; padding-bottom: 5px; }
#profile-screen .profile-list-item:hover { background: var(--pr-soft); border-radius: 12px; }
#profile-screen .pl-icon { grid-column: 1; grid-row: 1 / 3; display: grid; place-items: center; width: 43px; height: 43px; margin: 0; border-radius: 14px; background: #e7f4e9; font-size: 20px; }
#profile-screen .pl-label { grid-column: 2; grid-row: 1; align-self: end; color: var(--pr-ink); font-size: 14px; font-weight: 800; }
#profile-screen .pl-value { display: block; grid-column: 2; grid-row: 2; align-self: start; color: var(--pr-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
#profile-screen .pl-arrow { grid-column: 3; grid-row: 1 / 3; color: #96ab9b; font-size: 19px; }
#profile-screen .profile-list-item:not(:has(.pl-value)) .pl-label { grid-row: 1 / 3; align-self: center; }
#profile-screen .profile-list-item:has(#family-count) .pl-icon { background: #fff1dc; }
#profile-screen .profile-list-item:has(#profile-budget-value) .pl-icon { background: #e6f2fa; }
#profile-screen .profile-list-item:has(#goals-value) .pl-icon,
#profile-screen .profile-list-item:has(#referral-wallet-preview) .pl-icon { background: #ffebed; }
#profile-screen .pr-stack:first-child .pr-card:first-child .profile-list-item:last-child .pl-icon { background: #f0eafb; }
#profile-screen .premium-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: 49px minmax(0, 1fr) auto; gap: 13px; align-items: center; margin: 0; padding: 24px 20px; border: 1px solid #d4e9d5; border-radius: 22px; background: linear-gradient(135deg, #f6fae8, #e7f4e8); }
#profile-screen .premium-banner::after { content: '✦'; position: absolute; top: -20px; right: -10px; color: #a3d4ab35; font-size: 70px; transform: rotate(20deg); pointer-events: none; }
#profile-screen .premium-icon { display: grid; place-items: center; width: 49px; height: 49px; border-radius: 15px; background: #fff; font-size: 25px; }
#profile-screen .premium-text { min-width: 0; }
#profile-screen .premium-title { color: var(--pr-ink); font: 800 20px 'Outfit', sans-serif; overflow-wrap: anywhere; }
#profile-screen .premium-sub { margin-top: 3px; color: #6d8a74; font-size: 12px; }
#profile-screen .manage-btn { position: relative; z-index: 1; padding: 10px 14px; border: 1px solid #c5e0c9; border-radius: 11px; color: #176746; background: #fff; font-size: 12px; font-weight: 800; }
#profile-screen .pr-note { display: flex; align-items: start; gap: 13px; padding: 16px; border: 1px solid #dcebdc; border-radius: 19px; background: var(--pr-soft); color: #4d755e; font-size: 12px; line-height: 1.65; }
#profile-screen .pr-note > span { font-size: 21px; }
#profile-screen .pr-note b { color: #266e48; }
#profile-screen .pr-logout .btn-primary { margin: 0; padding: 14px 18px; border: 1px solid #f5dcd5; border-radius: 14px; background: #fff5f2 !important; color: #b84c4b; box-shadow: none; font-size: 13px; font-weight: 800; }
#profile-screen .pr-logout .btn-primary:hover { background: #ffeae6 !important; }
#profile-screen .pr-footer { padding: 24px 0 4px; color: var(--pr-muted); font-size: 11px; text-align: center; text-transform: uppercase; letter-spacing: .6px; line-height: 1.6; }
#profile-screen .bottom-nav { width: min(660px, calc(100% - 30px)); max-width: none; background: var(--pr-card); border: 1px solid var(--pr-line); box-shadow: 0 -6px 28px #24523e12; }
html[data-theme="dark"] body:has(#profile-screen.active) { background: var(--app-canvas); }
html[data-theme="dark"] #profile-screen { --pr-ink: var(--app-ink); --pr-muted: var(--app-muted); --pr-green: #8bd5ad; --pr-card: var(--app-surface); --pr-line: var(--app-line); --pr-soft: var(--app-soft); }
html[data-theme="dark"] #profile-screen .premium-banner { background: linear-gradient(135deg, #31402c, #263e30); border-color: var(--pr-line); }
html[data-theme="dark"] #profile-screen .premium-title,
html[data-theme="dark"] #profile-screen .premium-sub,
html[data-theme="dark"] #profile-screen .pr-note,
html[data-theme="dark"] #profile-screen .pr-note b { color: var(--pr-ink); }
html[data-theme="dark"] #profile-screen .pr-note { border-color: var(--pr-line); }
html[data-theme="dark"] #profile-screen .pr-person .desc { color: #e0f5e5 !important; }
@media (max-width: 760px) {
  #profile-screen .pr-content-grid { grid-template-columns: 1fr; }
  #profile-screen .pr-hero { flex-wrap: wrap; align-items: start; }
  #profile-screen .pr-hero-actions, #profile-screen .pr-hero-actions .btn-outline { width: 100%; }
  #profile-screen #profile-avatar-circle { width: 76px; height: 76px; border-radius: 22px; font-size: 35px; }
}
@media (max-width: 520px) {
  #profile-screen .pr-shell { padding: 22px 16px 110px; }
  #profile-screen .pr-topbar { margin-bottom: 24px; font-size: 12px; }
  #profile-screen .pr-brand { font-size: 18px; }
  #profile-screen .pr-heading { margin: 4px 0 17px; gap: 12px; }
  #profile-screen .pr-heading h1 { font-size: 30px; }
  #profile-screen .pr-heading p { font-size: 12px; }
  #profile-screen .pr-spark { width: 42px; height: 42px; font-size: 22px; }
  #profile-screen .pr-hero { padding: 22px; border-radius: 24px; gap: 18px; }
  #profile-screen .pr-person { gap: 13px; }
  #profile-screen #profile-avatar-circle { width: 70px; height: 70px; font-size: 32px; }
  #profile-screen .pr-status { font-size: 9px; }
  #profile-screen #profile-name { font-size: 26px; }
  #profile-screen .pr-person .desc { font-size: 12px; }
  #profile-screen .pr-content-grid, #profile-screen .pr-stack { gap: 15px; }
  #profile-screen .pr-card { padding: 19px; border-radius: 21px; }
  #profile-screen .pr-card-heading { flex-wrap: wrap; }
  #profile-screen .profile-list-item { padding: 14px 0; }
  #profile-screen .premium-banner { grid-template-columns: 49px minmax(0, 1fr); }
  #profile-screen .manage-btn { grid-column: 1 / -1; justify-self: stretch; }
  #profile-screen .bottom-nav { width: calc(100% - 20px); }
}

/* Scan screen: presentation only; live scanner controls and IDs stay intact. */
body:has(#scan-screen.active) { padding: 0; background: radial-gradient(circle at 6% 6%, #d9f2df, transparent 30%), radial-gradient(circle at 95% 85%, #e9f5e6, transparent 25%), #f7f8f0; }
.phone:has(> #scan-screen.active) { width: min(1160px, 100%); min-height: 100dvh; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.phone > #scan-screen { --sc-ink: #163b31; --sc-green: #176d4c; --sc-muted: #63786e; --sc-line: #e1eadf; --sc-card: #fff; --sc-soft: #f2f7f2; min-height: 100dvh; padding: 0; border-radius: 0; color: var(--sc-ink); background: transparent; overflow: visible; text-align: left; }
#scan-screen, #scan-screen * { font-family: 'DM Sans', sans-serif; }
#scan-screen::before, #scan-screen::after { content: none; }
#scan-screen .sc-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); gap: 40px; align-items: start; padding: 30px 28px; }
#scan-screen .sc-story { position: sticky; top: 30px; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: 920px; padding: 37px 40px; border-radius: 34px; background: linear-gradient(165deg, #176d4c 4%, #11563d 79%); color: #fff; box-shadow: 0 24px 60px #13523924; }
#scan-screen .sc-story::before { content: ''; position: absolute; z-index: -1; right: -124px; top: 45px; width: 390px; height: 390px; border: 1px solid #ffffff1a; border-radius: 50%; box-shadow: 0 0 0 75px #ffffff06; }
#scan-screen .sc-story::after { content: '✳'; position: absolute; z-index: -1; right: 45px; top: 75px; color: #ffe0b2; font-size: 70px; opacity: .9; }
#scan-screen .sc-story-brand { display: flex; align-items: center; gap: 10px; width: max-content; font: 800 27px 'Outfit', sans-serif; letter-spacing: -1px; }
#scan-screen .sc-story-brand > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: #ffffff2b; font-size: 24px; }
#scan-screen .sc-story-brand small { padding: 4px 6px; border-radius: 6px; background: #ffffff2b; color: #d8f3dc; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
#scan-screen .sc-story-content { margin-top: 48px; }
#scan-screen .sc-eyebrow { display: inline-flex; padding: 10px 15px; border: 1px solid #ffffff2e; border-radius: 50px; background: #ffffff1c; color: #e9f8e7; font-size: 11px; font-weight: 800; letter-spacing: 1.15px; text-transform: uppercase; }
#scan-screen .sc-story h1 { margin: 22px 0 15px; color: #fff; font: 800 clamp(44px, 5vw, 70px)/1.03 'Outfit', sans-serif; letter-spacing: -2.5px; }
#scan-screen .sc-story h1 em { font: inherit; font-style: normal; color: #bdf2c9; }
#scan-screen .sc-story-content > p { max-width: 450px; color: #d7e9da; font-size: 17px; line-height: 1.7; }
#scan-screen .sc-features { display: grid; gap: 11px; margin-top: 28px; }
#scan-screen .sc-feature { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #ffffff24; border-radius: 16px; background: #ffffff16; }
#scan-screen .sc-feature > span { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: #ffffff2b; font-size: 21px; }
#scan-screen .sc-feature strong { display: block; color: #fff; font-size: 14px; }
#scan-screen .sc-feature small { display: block; margin-top: 3px; color: #d2e8d7; font-size: 12px; line-height: 1.4; }
#scan-screen .sc-plate-area { position: relative; display: flex; justify-content: end; align-items: end; min-height: 210px; margin-top: auto; }
#scan-screen .sc-plate-halo { position: absolute; right: 26px; bottom: -61px; width: 272px; height: 230px; border-radius: 52% 48% 40% 60%; background: #daf2dd; opacity: .9; transform: rotate(-12deg); }
#scan-screen .sc-plate-area img, #scan-screen .sc-plate-fallback { position: absolute; right: 34px; bottom: -52px; width: 225px; height: 225px; border: 9px solid #fff; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #f3ffe9, #b1d8b6); object-fit: cover; box-shadow: 0 15px 40px #00000036; }
#scan-screen .sc-plate-fallback { display: grid; place-items: center; font-size: 105px; }
#scan-screen .sc-plate-chip { position: absolute; z-index: 2; left: 0; bottom: 42px; padding: 12px 15px; border-radius: 14px; background: #fff; color: #163b31; box-shadow: 0 15px 30px #0000001f; font-size: 12px; font-weight: 800; }
#scan-screen .sc-device { min-width: 0; width: 100%; max-width: 472px; justify-self: center; overflow: hidden; border: 1px solid var(--sc-line); border-radius: 32px; background: var(--sc-card); box-shadow: 0 25px 75px #18443121; }
#scan-screen .sc-head { padding: 22px 23px 14px; border-bottom: 1px solid var(--sc-line); background: linear-gradient(#fff, #fbfdfb); }
#scan-screen .scanner-topbar { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 10px; min-height: 36px; margin: 0; }
#scan-screen .scanner-icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--sc-line); border-radius: 12px; background: var(--sc-card); color: var(--sc-green); font-size: 23px; }
#scan-screen .sc-brand { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
#scan-screen .sc-brand strong { font: 800 21px 'Outfit', sans-serif; letter-spacing: -.6px; }
#scan-screen .sc-brand em { font: inherit; font-style: normal; color: var(--sc-green); }
#scan-screen .sc-brand > span { color: var(--sc-muted); font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
#scan-screen .sc-intro { margin-top: 17px; }
#scan-screen .sc-intro > span { display: inline-block; padding: 6px 10px; border-radius: 20px; background: #e9f7ec; color: #176d4c; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
#scan-screen .scanner-title { margin: 8px 0 4px; color: var(--sc-ink); font: 800 27px/1.1 'Outfit', sans-serif; letter-spacing: -.8px; }
#scan-screen .sc-intro p { color: var(--sc-muted); font-size: 12.5px; line-height: 1.5; }
#scan-screen .sc-body { padding: 17px 20px 10px; }
#scan-screen .scan-mode-toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0 0 12px; padding: 6px; border: 1px solid #e9f0e8; border-radius: 17px; background: var(--sc-soft); }
#scan-screen .scan-mode-btn { min-width: 0; min-height: 42px; padding: 7px 5px; border-radius: 12px; color: var(--sc-muted); background: transparent; font-size: 12px; font-weight: 800; }
#scan-screen .scan-mode-btn.active { background: #176d4c; color: #fff; box-shadow: 0 5px 12px #176d4c2b; }
#scan-screen .scanner-submode-toggle { gap: 7px; margin: 12px 0 13px; padding: 0; border: 0; border-radius: 0; background: transparent; flex-wrap: wrap; }
#scan-screen .scanner-submode-btn { min-width: 0; min-height: 35px; padding: 8px 9px; border: 1px solid var(--sc-line); border-radius: 11px; background: var(--sc-card); color: var(--sc-muted); font-size: 12px; font-weight: 700; }
#scan-screen .scanner-submode-btn.active { background: #e4f5e7; border-color: #b9e0c4; color: #176d4c; box-shadow: none; }
#scan-screen .scanner-camera-shell { isolation: isolate; height: 306px; min-height: 0; margin: 0; border-radius: 23px; background: radial-gradient(circle at 50% 36%, #31574e, #19382f 46%, #112d27); }
#scan-screen .scanner-camera-shell::before { content: ''; position: absolute; z-index: 0; inset: 0; background-image: linear-gradient(#ffffff09 1px, transparent 1px), linear-gradient(90deg, #ffffff09 1px, transparent 1px); background-size: 24px 24px; }
#scan-screen .scanner-camera-shell::after { content: ''; position: absolute; z-index: 0; top: 68px; left: 50%; transform: translateX(-50%); width: 102px; height: 102px; border: 1px solid #ffffff2b; border-radius: 29px; background: #ffffff18 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1f5d7' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h-4l-2 3H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3z'/%3E%3Ccircle cx='12' cy='13.5' r='3.5'/%3E%3C/svg%3E") center / 44px 44px no-repeat; }
#scan-screen .scanner-camera-shell video { z-index: 1; background: transparent; }
#scan-screen .scanner-camera-shade { z-index: 2; background: linear-gradient(transparent 60%, #081f1a50); }
#scan-screen .scanner-flash-btn { z-index: 4; top: 13px; left: 14px; width: 34px; height: 34px; border: 1px solid #ffffff21; border-radius: 11px; background: #0a231c9e; font-size: 24px; }
#scan-screen .barcode-frame { z-index: 3; width: calc(100% - 86px); height: 198px; max-width: 280px; top: 47%; }
#scan-screen .frame-corner { width: 38px; height: 38px; border-color: #9beaab; filter: none; }
#scan-screen .scanner-frame-copy { z-index: 4; inset: auto 14px 12px; padding: 9px 11px; border-radius: 11px; background: #081f1ac2; color: #edf7ee; font-size: 11.5px; line-height: 1.4; text-align: center; text-shadow: none; }
#scan-screen .scanner-actions { grid-template-columns: 1fr 78px 1fr; gap: 15px; margin: 16px 0 10px; }
#scan-screen .scanner-action { justify-self: center; width: 63px; min-height: 53px; padding: 7px 4px; border-radius: 16px; background: #edf6ef; color: #176d4c; font-size: 10px; }
#scan-screen .scanner-action > span { font: 23px/1 Arial, sans-serif; }
#scan-screen .scanner-shutter { width: 72px; height: 72px; margin: 0 auto; padding: 5px; border: 5px solid #c5ead0; background: #fff; box-shadow: 0 0 0 2px #176d4c, 0 8px 22px #13593b29; }
#scan-screen .scanner-shutter i { background: #176d4c; }
#scan-screen .scan-limit-note { margin: 12px 0 4px; color: var(--sc-muted); font-size: 11px; line-height: 1.5; }
#scan-screen .scanner-inline-field, #scan-screen .manual-barcode-wrap { margin: 12px 0; padding: 12px 13px; border: 1px solid var(--sc-line); border-radius: 17px; background: #f8fbf8; color: var(--sc-ink); }
#scan-screen .scanner-inline-field label, #scan-screen .manual-barcode-wrap label { display: block; margin: 0 0 7px; color: var(--sc-ink); font-size: 12px; font-weight: 800; }
#scan-screen .scanner-inline-field input, #scan-screen .manual-barcode-wrap input { min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid #d6e5d8; border-radius: 12px; background: var(--sc-card); color: var(--sc-ink); font-size: 12px; }
#scan-screen .scanner-inline-field input::placeholder, #scan-screen .manual-barcode-wrap input::placeholder { color: #768a7c; }
#scan-screen .scanner-inline-field small { color: var(--sc-muted); font-size: 11px; line-height: 1.45; }
#scan-screen .manual-barcode-row, #scan-screen .menu-website-row { gap: 8px; }
#scan-screen .manual-barcode-row .add-chip-btn, #scan-screen .menu-website-row .add-chip-btn { flex: none; margin: 0; padding: 10px 12px; border: 0; border-radius: 12px; background: #176d4c; color: #fff; font-size: 11px; font-weight: 800; }
#scan-screen .manual-barcode-wrap .link-btn { padding-top: 8px; color: var(--sc-green); font-size: 11px; line-height: 1.5; }
#scan-screen #receipt-scan-intro { margin-bottom: 12px; color: var(--sc-muted); font-size: 12px; line-height: 1.6; }
#scan-screen .package-scan-intro { margin: 12px 0 4px; border: 1px solid var(--sc-line); border-radius: 15px; background: var(--sc-soft); color: var(--sc-ink); }
#scan-screen .package-scan-intro span { color: var(--sc-muted); }
#scan-screen #scan-upload-btn { display: block; min-height: 48px; margin: 14px 0 0; padding: 12px; border: 0; border-radius: 15px; background: #176d4c; color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 8px 20px #176d4c29; }
#scan-screen #scan-camera-fallback-btn, #scan-screen #scan-retry-camera { margin: 10px 0 0; padding: 12px; border: 1px solid var(--sc-line); border-radius: 13px; background: var(--sc-soft); color: var(--sc-green); font-size: 12px; }
#scan-screen .scan-status { margin: 12px 0; color: var(--sc-muted); font-size: 12px; line-height: 1.5; text-align: center; }
#scan-screen .scan-today-card, #scan-screen .shop-category { color: var(--sc-ink); }
#scan-screen .scan-today-card { border-color: var(--sc-line); background: var(--sc-soft); }
#scan-screen .history-open-button { margin: 12px 0 0; padding: 12px 13px; border: 1px solid var(--sc-line); border-radius: 13px; background: var(--sc-soft); color: var(--sc-green); font-size: 12px; }
#scan-screen .bottom-nav { position: static; inset: auto; transform: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; max-width: none; min-height: 68px; margin: 12px 0 0; padding: 10px 7px calc(12px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--sc-line); border-radius: 0; background: #fcfdfa; box-shadow: none; }
#scan-screen .bottom-nav .nav-item { min-width: 0; padding: 0 1px; font-size: 9px; }
#scan-screen button:focus-visible, #scan-screen input:focus-visible { outline: 3px solid #eca763; outline-offset: 3px; }
html[data-theme="dark"] body:has(#scan-screen.active) { background: radial-gradient(circle at 6% 6%, #233d2d, transparent 30%), var(--app-canvas); }
html[data-theme="dark"] .phone > #scan-screen { --sc-ink: var(--app-ink); --sc-muted: var(--app-muted); --sc-line: var(--app-line); --sc-card: var(--app-surface); --sc-soft: var(--app-soft); --sc-green: #8bd5ad; }
html[data-theme="dark"] #scan-screen .sc-head { background: var(--sc-card); }
html[data-theme="dark"] #scan-screen .scanner-inline-field { background: var(--sc-soft); }
html[data-theme="dark"] #scan-screen .scanner-inline-field input { color: var(--sc-ink); }
@media (max-width: 1000px) {
  #scan-screen .sc-layout { gap: 20px; padding: 20px; grid-template-columns: minmax(0, .95fr) minmax(390px, 1fr); }
  #scan-screen .sc-story { top: 20px; padding: 28px; }
  #scan-screen .sc-story h1 { font-size: 46px; }
  #scan-screen .sc-story-content { margin-top: 40px; }
  #scan-screen .sc-plate-area img, #scan-screen .sc-plate-fallback { width: 190px; height: 190px; right: 14px; }
  #scan-screen .sc-plate-chip { bottom: 12px; }
}
@media (max-width: 780px) {
  #scan-screen .sc-layout { grid-template-columns: 1fr; gap: 15px; padding: 14px; }
  #scan-screen .sc-story { position: relative; top: auto; min-height: 0; padding: 19px 23px 22px; border-radius: 24px; }
  #scan-screen .sc-story-content { margin-top: 12px; }
  #scan-screen .sc-story h1 { margin: 10px 0 4px; font-size: 27px; letter-spacing: -.8px; }
  #scan-screen .sc-story h1 br { display: none; }
  #scan-screen .sc-story h1 em { margin: 0 5px; }
  #scan-screen .sc-story-content > p { max-width: none; font-size: 12px; line-height: 1.6; }
  #scan-screen .sc-features, #scan-screen .sc-plate-area { display: none; }
  #scan-screen .sc-eyebrow { padding: 7px 10px; font-size: 9px; }
  #scan-screen .sc-story::after { right: 30px; top: 18px; font-size: 34px; }
  #scan-screen .sc-story-brand { font-size: 21px; }
  #scan-screen .sc-story-brand > span { width: 36px; height: 36px; font-size: 18px; }
  #scan-screen .sc-device { max-width: 560px; }
}
@media (max-width: 450px) {
  #scan-screen .sc-layout { gap: 0; padding: 0; }
  #scan-screen .sc-story { padding: 14px 18px 18px; border-radius: 0 0 22px 22px; }
  #scan-screen .sc-story h1 { font-size: 24px; }
  #scan-screen .sc-story-content > p { font-size: 11px; }
  #scan-screen .sc-story::after { display: none; }
  #scan-screen .sc-device { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
  #scan-screen .sc-head { padding: 15px 18px 13px; }
  #scan-screen .sc-body { padding: 14px 14px 9px; }
  #scan-screen .scanner-camera-shell { height: clamp(260px, 77vw, 330px); border-radius: 19px; }
  #scan-screen .scanner-submode-btn { padding: 8px 6px; font-size: 11px; }
  #scan-screen .scan-mode-btn { font-size: 11px; }
  #scan-screen .scanner-title { font-size: 24px; }
  #scan-screen .sc-brand > span { font-size: 8px; }
}
/* Scan results and history share the food scanner's desktop presentation. */
body:has(#scan-result-screen.active, #scan-archive-screen.active) { padding: 0; background: radial-gradient(ellipse at 5% 10%, #e2f1df, transparent 45%), #f7f8f0; }
.phone:has(> #scan-result-screen.active, > #scan-archive-screen.active) { width: min(1160px, 100%); min-height: 100dvh; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
:is(#scan-result-screen, #scan-archive-screen) { --sd-ink: #163b31; --sd-muted: #6b8278; --sd-green: #176d4c; --sd-card: #fff; --sd-soft: #f0f7ee; --sd-line: #dce9dd; padding: 30px 24px 48px; color: var(--sd-ink); text-align: left; }
:is(#scan-result-screen, #scan-archive-screen), :is(#scan-result-screen, #scan-archive-screen) * { font-family: 'DM Sans', sans-serif; }
:is(#scan-result-screen, #scan-archive-screen) .onb-header { display: flex; justify-content: flex-start; gap: 18px; margin: 0 0 26px; padding: 0; }
:is(#scan-result-screen, #scan-archive-screen) .onb-title { color: var(--sd-ink); font: 800 clamp(26px, 3vw, 36px)/1.2 'Outfit', sans-serif; letter-spacing: -1px; }
:is(#scan-result-screen, #scan-archive-screen) .onb-back { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--sd-line); border-radius: 14px; background: var(--sd-card); color: var(--sd-green); }
:is(#scan-result-screen, #scan-archive-screen) button:focus-visible { outline: 3px solid #eca763; outline-offset: 3px; }
#scan-result-screen .scan-result-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 28px; padding: 0; }
#scan-result-screen .sr-overview { overflow: hidden; border: 1px solid #276c50; border-radius: 30px; background: linear-gradient(135deg, #1a7152, #124f3d); box-shadow: 0 18px 48px #1844311c; }
#scan-result-screen .scan-result-photo { width: calc(100% - 32px); height: auto; aspect-ratio: 4 / 3; margin: 16px 16px 0; object-fit: cover; border: 5px solid #ffffffdf; border-radius: 23px; background: #dcebdc; }
#scan-result-screen .sr-summary { padding: 24px; }
#scan-result-screen .scan-result-time { margin-bottom: 8px; color: #c4e3cf; font-size: 12px; }
#scan-result-screen .scan-result-name { margin: 0 0 8px; color: #fff; font: 800 clamp(26px, 3vw, 36px)/1.12 'Outfit', sans-serif; letter-spacing: -.8px; overflow-wrap: anywhere; }
#scan-result-screen .scan-result-portion { margin-bottom: 24px; color: #d4eadc; font-size: 14px; line-height: 1.5; }
#scan-result-screen .scan-macro-grid { gap: 10px; margin-bottom: 18px; }
#scan-result-screen .scan-macro-box { min-width: 0; gap: 7px; padding: 17px 6px; border: 1px solid var(--sd-line); border-radius: 18px; background: var(--sd-soft); }
#scan-result-screen .scan-macro-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; background: #e2f0df; font-size: 19px; }
#scan-result-screen .scan-macro-value { color: var(--sd-ink); font: 800 21px 'Outfit', sans-serif; overflow-wrap: anywhere; }
#scan-result-screen .scan-macro-label { color: var(--sd-muted); font-size: 11px; }
#scan-result-screen .sr-overview .scan-macro-box { background: #ffffff12; border-color: #ffffff26; }
#scan-result-screen .sr-overview .scan-macro-icon { background: #ffffff1c; }
#scan-result-screen .sr-overview .scan-macro-value { color: #fff; }
#scan-result-screen .sr-overview .scan-macro-label { color: #d4eadc; }
#scan-result-screen .scan-health-score-card { margin: 0; padding: 17px; border: 1px solid #ffffff26; border-radius: 17px; background: #ffffff12; color: #eef9f1; }
#scan-result-screen .scan-health-score-row { gap: 12px; font-size: 13px; }
#scan-result-screen .scan-health-score-bar-bg { background: #ffffff29; }
#scan-result-screen .scan-health-score-bar-fill { background: linear-gradient(90deg, #a4db9c, #d1ecad); }
#scan-result-screen .sr-details { min-width: 0; padding: 27px; border: 1px solid var(--sd-line); border-radius: 30px; background: var(--sd-card); box-shadow: 0 18px 48px #1844310d; }
#scan-result-screen .scan-tabs { gap: 6px; margin: 0 0 20px; padding: 6px; border: 1px solid var(--sd-line); border-radius: 17px; background: var(--sd-soft); }
#scan-result-screen .scan-tab-btn { min-height: 44px; padding: 10px; border: 0; border-radius: 12px; color: var(--sd-muted); font-size: 14px; }
#scan-result-screen .scan-tab-btn.active { background: #176d4c; color: #fff; box-shadow: 0 5px 12px #176d4c26; }
#scan-result-screen .scan-tab-panel { margin-bottom: 22px; }
#scan-result-screen .scan-ingredient-row { gap: 12px; margin-bottom: 10px; padding: 15px; border: 1px solid var(--sd-line); border-radius: 17px; background: var(--sd-soft); }
#scan-result-screen .scan-ingredient-row > div:first-child { min-width: 0; }
#scan-result-screen .scan-ingredient-name { color: var(--sd-ink); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
#scan-result-screen .scan-ingredient-qty { margin-top: 4px; color: var(--sd-muted); font-size: 12px; }
#scan-result-screen .scan-ingredient-kcal { flex: none; color: var(--sd-green); font-size: 13px; }
#scan-result-screen .scan-quantity-label { flex-wrap: wrap; color: var(--sd-muted); font-size: 11px; }
#scan-result-screen .scan-quantity-input { width: 85px; min-height: 35px; border-color: var(--sd-line); border-radius: 10px; color: var(--sd-ink); background: var(--sd-card); }
#scan-result-screen .scan-info-card { padding: 18px; border: 1px solid var(--sd-line); border-radius: 18px; background: var(--sd-soft); text-align: left; }
#scan-result-screen .scan-info-title { margin-bottom: 9px; color: var(--sd-ink); font: 700 18px 'Outfit', sans-serif; }
#scan-result-screen .scan-info-text { color: var(--sd-muted); font-size: 13px; line-height: 1.65; }
#scan-result-screen .scan-confidence-note { color: #936029; font-size: 11px; line-height: 1.6; }
#scan-result-screen :is(.btn-primary, .btn-outline) { min-height: 46px; padding: 12px 15px; border-radius: 13px; font-size: 13px; line-height: 1.4; }
#scan-result-screen .btn-primary { background: #176d4c; color: #fff; box-shadow: 0 8px 20px #176d4c20; }
#scan-result-screen .btn-outline { border-color: var(--sd-line); background: var(--sd-soft); color: var(--sd-green); }
#scan-result-screen .scan-result-delete-btn { color: #ba4444; }
#scan-result-screen .scan-edit-panel { padding: 18px; border-color: var(--sd-line); border-radius: 18px; background: var(--sd-soft); }
#scan-result-screen .scan-edit-panel input { min-width: 0; background: var(--sd-card); color: var(--sd-ink); border-color: var(--sd-line); }
#scan-archive-screen .sa-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr); align-items: start; gap: 28px; }
#scan-archive-screen .sa-summary { position: sticky; top: 24px; min-width: 0; padding: 25px; border: 1px solid #276c50; border-radius: 30px; background: linear-gradient(135deg, #1a7152, #124f3d); box-shadow: 0 18px 48px #1844311c; }
#scan-archive-screen .history-period-tabs { gap: 6px; margin: 0 0 26px; padding: 6px; border: 1px solid #ffffff26; border-radius: 16px; background: #ffffff15; }
#scan-archive-screen .history-period-btn { min-height: 42px; border-radius: 11px; color: #d4eadc; font-size: 13px; }
#scan-archive-screen .history-period-btn.active { color: #176d4c; background: #fff; box-shadow: 0 5px 15px #082b1930; }
#scan-archive-screen .history-date-label { margin-bottom: 9px; color: #d4eadc; font-size: 12px; }
#scan-archive-screen .history-date-picker { width: 100%; min-width: 0; min-height: 49px; margin-bottom: 27px; padding: 12px 14px; border: 1px solid #ffffff40; border-radius: 13px; color: #163b31; background: #fff; font-size: 14px; }
#scan-archive-screen .history-period-heading { margin: 0 0 18px; color: #fff; font: 700 25px/1.3 'Outfit', sans-serif; letter-spacing: -.5px; }
#scan-archive-screen .history-period-summary { gap: 10px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
#scan-archive-screen .history-stat { gap: 8px; padding: 18px 14px; border: 1px solid #ffffff26; border-radius: 16px; background: #ffffff12; }
#scan-archive-screen .history-stat span { color: #d4eadc; font-size: 12px; }
#scan-archive-screen .history-stat b { color: #fff; font: 700 22px 'Outfit', sans-serif; }
#scan-archive-screen .sa-meals { min-width: 0; }
#scan-archive-screen .history-days-list { display: grid; gap: 20px; }
#scan-archive-screen .history-day-card { margin: 0; padding: 24px; border: 1px solid var(--sd-line); border-radius: 26px; background: var(--sd-card); box-shadow: 0 12px 35px #1844310b; }
#scan-archive-screen .history-day-heading { padding-bottom: 17px; border-bottom: 1px solid var(--sd-line); }
#scan-archive-screen .history-day-heading h3 { margin: 0 0 6px; color: var(--sd-ink); font: 700 21px/1.3 'Outfit', sans-serif; }
#scan-archive-screen .history-day-heading p { color: var(--sd-muted); font-size: 12px; }
#scan-archive-screen .scan-archive-row { gap: 14px; padding: 20px 0; border-color: var(--sd-line); }
#scan-archive-screen .scan-archive-row:last-child { padding-bottom: 0; border-bottom: 0; }
#scan-archive-screen .scan-archive-open { gap: 15px; color: var(--sd-ink); }
#scan-archive-screen .scan-history-thumb { flex: none; width: 78px; height: 78px; border: 1px solid var(--sd-line); border-radius: 17px; object-fit: cover; }
#scan-archive-screen .scan-archive-copy b { font: 700 18px/1.3 'Outfit', sans-serif; }
#scan-archive-screen .scan-archive-copy small { margin-top: 5px; color: var(--sd-muted); font-size: 12px; line-height: 1.5; }
#scan-archive-screen .scan-archive-delete { min-height: 39px; padding: 9px 12px; border-color: var(--sd-line); border-radius: 11px; background: var(--sd-soft); color: var(--sd-green); font-size: 12px; }
#scan-archive-screen .history-empty-state { margin: 0; padding: 80px 40px; border: 1px dashed var(--sd-line); border-radius: 28px; background: var(--sd-card); color: var(--sd-muted); font-size: 15px; line-height: 1.8; text-align: center; }
html[data-theme="dark"] body:has(#scan-result-screen.active, #scan-archive-screen.active) { background: var(--app-canvas); }
html[data-theme="dark"] :is(#scan-result-screen, #scan-archive-screen) { --sd-ink: var(--app-ink); --sd-muted: var(--app-muted); --sd-green: #8bd5ad; --sd-card: var(--app-surface); --sd-soft: var(--app-soft); --sd-line: var(--app-line); }
html[data-theme="dark"] #scan-result-screen .scan-result-name, html[data-theme="dark"] #scan-archive-screen .history-period-heading { color: #fff !important; }
html[data-theme="dark"] #scan-result-screen .scan-confidence-note { color: #e0bb86; }
html[data-theme="dark"] #scan-archive-screen .history-date-label { color: #d4eadc !important; }
@media (max-width: 850px) {
  #scan-result-screen .scan-result-body, #scan-archive-screen .sa-layout { gap: 18px; }
  #scan-result-screen .sr-details, #scan-result-screen .sr-summary, #scan-archive-screen .sa-summary, #scan-archive-screen .history-day-card { padding: 18px; }
  #scan-archive-screen .scan-history-thumb { width: 58px; height: 58px; }
}
@media (max-width: 700px) {
  :is(#scan-result-screen, #scan-archive-screen) { padding: 20px 15px 30px; }
  :is(#scan-result-screen, #scan-archive-screen) .onb-header { margin-bottom: 20px; }
  #scan-result-screen .scan-result-body, #scan-archive-screen .sa-layout { grid-template-columns: minmax(0, 1fr); }
  #scan-result-screen .scan-result-photo { max-height: 360px; }
  #scan-archive-screen .sa-summary { position: static; }
  #scan-archive-screen .history-period-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #scan-archive-screen .history-stat { padding: 14px 10px; }
  #scan-archive-screen .history-stat b { font-size: 19px; }
  #scan-archive-screen .history-empty-state { padding: 45px 24px; }
}
@media (max-width: 380px) {
  :is(#scan-result-screen, #scan-archive-screen) { padding-right: 10px; padding-left: 10px; }
  #scan-result-screen .sr-details, #scan-result-screen .sr-summary, #scan-archive-screen .history-day-card { padding: 14px; }
  #scan-result-screen .scan-macro-value { font-size: 19px; }
  #scan-archive-screen .scan-archive-row { gap: 8px; flex-wrap: wrap; }
  #scan-archive-screen .scan-archive-open { gap: 10px; }
  #scan-archive-screen .scan-archive-copy b { font-size: 16px; }
  #scan-archive-screen .scan-archive-delete { margin-left: auto; }
  #scan-archive-screen .history-stat { padding: 12px 7px; }
  #scan-archive-screen .history-stat b { font-size: 17px; }
}


/* Meal planner: presentation from the supplied reference; existing actions retained. */
#plan-screen .mp-showcase {background:linear-gradient(151deg,#196f50 0%,#115d42 67%,#0c513b 100%);color:#fff;position:relative;padding:34px 39px;display:flex;flex-direction:column;isolation:isolate;min-width:0;overflow:hidden}
#plan-screen .mp-showcase:before {content:'';position:absolute;width:450px;height:450px;border:1px solid #ffffff16;border-radius:50%;right:-190px;top:45px;box-shadow:0 0 0 90px #ffffff05;z-index:-1}
#plan-screen .mp-showcase:after {content:'';position:absolute;width:330px;height:330px;border-radius:45% 55% 61% 39%;background:#ffffff07;left:-140px;bottom:-130px;z-index:-1}
#plan-screen .mp-brand {display:flex;align-items:center;gap:11px;font:800 25px 'Outfit',sans-serif;letter-spacing:-1px;width:max-content}
#plan-screen .mp-brand-symbol {width:44px;height:44px;border-radius:15px;background:#ffffff23;display:grid;place-items:center;font-size:23px;border:1px solid #ffffff2b}
#plan-screen .mp-brand small {font:800 10px 'DM Sans',sans-serif;letter-spacing:1px;border-radius:7px;color:#e0fbe5;background:#ffffff22;padding:4px 7px}
#plan-screen .mp-hero-copy {margin-top:65px;position:relative}
#plan-screen .mp-kicker {display:inline-flex;gap:7px;align-items:center;background:#ffffff22;border:1px solid #ffffff24;border-radius:50px;padding:9px 13px;font-size:11px;text-transform:uppercase;letter-spacing:1px;font-weight:800;color:#e8fff0}
#plan-screen .mp-showcase h1 {font:800 clamp(44px,4.4vw,71px)/1.02 'Outfit',sans-serif;letter-spacing:-2.5px;margin:23px 0 16px}
#plan-screen .mp-showcase h1 span {color:#baf4ca}
#plan-screen .mp-showcase .mp-lede {color:#d6e9da;font-size:16px;line-height:1.76;max-width:435px}
#plan-screen .mp-hero-perks {display:grid;gap:12px;margin-top:29px}
#plan-screen .mp-hero-perk {display:flex;gap:12px;align-items:center;border:1px solid #ffffff24;background:#ffffff13;border-radius:17px;padding:13px 14px;backdrop-filter:blur(8px)}
#plan-screen .mp-hero-perk .mp-perki {width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:#ffffff22;font-size:21px;flex-shrink:0}
#plan-screen .mp-hero-perk strong {display:block;font-size:13px}
#plan-screen .mp-hero-perk small {display:block;color:#cce4d3;font-size:12px;line-height:1.5;margin-top:3px}
#plan-screen .mp-hero-art {margin:auto auto 0;position:relative;min-height:350px;width:100%;max-width:485px;display:grid;place-items:center}
#plan-screen .mp-hero-art .mp-blob {position:absolute;inset:36px 36px 16px 33px;background:#d4f0dc;border-radius:52% 48% 42% 58% / 46% 40% 60% 54%;transform:rotate(-8deg)}
#plan-screen .mp-hero-art .mp-plate {position:relative;width:295px;height:295px;border-radius:50%;object-fit:cover;border:9px solid white;box-shadow:0 20px 45px #092f2466;background:#d7eee0}
#plan-screen .mp-hero-art .mp-plate-fallback {position:absolute;width:295px;height:295px;border-radius:50%;background:#d7eee0;display:grid;place-items:center;font-size:125px;color:#236847}
#plan-screen .mp-hero-chip {position:absolute;z-index:2;display:flex;gap:10px;align-items:center;padding:12px 14px;border-radius:17px;box-shadow:0 11px 25px #082d2045;background:#fff;color:var(--ink);font-size:12px;font-weight:800;max-width:216px}
#plan-screen .mp-hero-chip em {font:500 11px 'DM Sans',sans-serif;color:var(--muted);display:block;font-style:normal;margin-top:2px}
#plan-screen .mp-hero-chip span {font-size:22px}
#plan-screen .mp-hero-chip.mp-a {top:52px;left:-3px}
#plan-screen .mp-hero-chip.mp-b {bottom:23px;right:-6px}
#plan-screen .mp-showcase-foot {color:#d9eee1;font-size:12px;font-weight:700;margin-top:25px;display:flex;gap:18px;flex-wrap:wrap}
#plan-screen .mp-showcase-foot i {display:inline-block;width:8px;height:8px;border-radius:50%;background:#a5ecc2;margin-right:6px}

/* Daily and weekly planner surfaces, scoped to preserve other screens. */
body:has(#plan-screen.active) { padding: 0; background: radial-gradient(circle at 4% 4%, #e1f2e2, transparent 26%), radial-gradient(circle at 96% 98%, #e0efed, transparent 26%), #f7f8f0; }
.phone:has(> #plan-screen.active) { width: min(1406px, 100%); min-height: 100dvh; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
#plan-screen { --mp-ink: #163b31; --mp-muted: #71867a; --mp-green: #176d4c; --mp-card: #fff; --mp-soft: #eef8ef; --mp-line: #dfe9df; --ink: #163b31; --muted: #71867a; padding: 28px; color: var(--mp-ink); text-align: left; }
#plan-screen, #plan-screen * { font-family: 'DM Sans', sans-serif; }
#plan-screen .mp-shell { display: grid; grid-template-columns: minmax(0, .81fr) minmax(580px, 1fr); align-items: start; border: 1px solid var(--mp-line); border-radius: 34px; background: var(--mp-card); box-shadow: 0 24px 65px #184e341c; }
#plan-screen .mp-showcase { position: sticky; top: 28px; min-height: 850px; height: calc(100dvh - 56px); max-height: 1100px; border-radius: 33px 0 33px 33px; }
#plan-screen .mp-hero-copy { margin-top: 40px; }
#plan-screen .mp-hero-art { margin-top: 35px; min-height: 330px; }
#plan-screen .mp-planner { min-width: 0; padding: 28px 26px 0; border-radius: 0 33px 33px 0; background: linear-gradient(180deg, #fff, #fbfcf8 45%, #fff); }
#plan-screen .mp-breadcrumb { margin-bottom: 30px; color: var(--mp-muted); font-size: 12px; }
#plan-screen .mp-breadcrumb > span { padding: 0 9px; color: #a2b4a7; }
#plan-screen .mp-breadcrumb strong { color: var(--mp-green); font-weight: 700; }
#plan-screen .mp-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
#plan-screen .mp-section-kicker { margin: 0 0 8px; color: var(--mp-green); font-size: 11px; font-weight: 800; letter-spacing: 1.1px; }
#plan-screen .onb-title { margin: 0; color: var(--mp-ink); font: 800 clamp(31px, 3.3vw, 42px)/1.05 'Outfit', sans-serif; letter-spacing: -1.6px; }
#plan-screen .onb-title > span { color: var(--mp-green); font: inherit; }
#plan-screen .mp-title-sub { margin-top: 10px; color: var(--mp-muted); font-size: 13px; line-height: 1.65; }
#plan-screen .mp-title-emoji { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px; background: #e7f5e9; font-size: 27px; }
#plan-screen .toggle-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 24px 0; padding: 6px; border: 1px solid var(--mp-line); border-radius: 18px; background: var(--mp-soft); }
#plan-screen .unit-btn { min-width: 0; min-height: 46px; margin: 0; padding: 10px; border: 0; border-radius: 13px; background: transparent; color: var(--mp-muted); font-size: 14px; font-weight: 800; }
#plan-screen .unit-btn.active { background: var(--mp-card); color: var(--mp-green); box-shadow: 0 6px 19px #164a3020; }
#plan-screen #daily-btn::before { content: '☀️'; margin-right: 7px; }
#plan-screen #week-btn::before { content: '🗓️'; margin-right: 7px; }
#plan-screen .mp-section-heading { margin: 23px 0 14px; color: var(--mp-ink); font: 800 21px 'Outfit', sans-serif; letter-spacing: -.6px; }
#plan-screen #daily-meal-list .meal-item { gap: 13px; margin: 13px 0 0; padding: 16px; border: 1px solid var(--mp-line); border-radius: 22px; background: var(--mp-card); box-shadow: 0 7px 21px #12432f0a; }
#plan-screen #daily-meal-list .meal-item:has(+ .recipe-price-breakdown) { border-bottom: 0; border-radius: 22px 22px 0 0; }
#plan-screen .meal-item-left { gap: 13px; }
#plan-screen .meal-item-left > span:last-child { min-width: 0; color: var(--mp-green); font-size: 11px; font-weight: 800; line-height: 1.5; }
#plan-screen .meal-item-left small:not(.meal-portion-info) { display: block; margin: 4px 0 5px; color: var(--mp-ink); font: 800 18px/1.2 'Outfit', sans-serif; letter-spacing: -.3px; overflow-wrap: anywhere; }
#plan-screen .meal-item-left .meal-portion-info { color: var(--mp-muted); font-size: 11px; font-weight: 500; line-height: 1.5; }
#plan-screen .meal-item-icon { flex: none; width: 68px; height: 74px; border-radius: 17px; font-size: 34px; }
#plan-screen .meal-item-right { display: flex; flex-direction: column; align-items: end; gap: 10px; max-width: 130px; }
#plan-screen #daily-meal-list .meal-kcal { color: var(--mp-green); font: 800 16px/1.3 'Outfit', sans-serif; text-align: right; }
#plan-screen .meal-regen-btn { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--mp-line); border-radius: 11px; background: var(--mp-soft); font-size: 15px; }
#plan-screen #daily-meal-list .recipe-price-breakdown { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--mp-line); border-radius: 0 0 22px 22px; background: var(--mp-soft); color: var(--mp-ink); }
#plan-screen .recipe-price-breakdown summary { color: var(--mp-green); font-size: 12px; }
#plan-screen .price-ingredient-row { border-color: var(--mp-line); }
#plan-screen .price-footnote, #plan-screen .price-connection-status, #plan-screen .price-location-status { color: var(--mp-muted); font-size: 11px; line-height: 1.65; }
#plan-screen .plan-total-row { gap: 12px; margin: 22px 0 0; padding: 20px 20px 14px; border: 1px solid var(--mp-line); border-bottom: 0; border-radius: 23px 23px 0 0; background: var(--mp-soft); color: var(--mp-ink); font: 800 19px 'Outfit', sans-serif; }
#plan-screen #plan-total-cost { color: var(--mp-green); font: 800 25px 'Outfit', sans-serif; }
#plan-screen #plan-budget-note { margin: 0 0 20px; padding: 0 20px 20px; border: 1px solid var(--mp-line); border-top: 0; border-radius: 0 0 23px 23px; background: var(--mp-soft); font-size: 12px; line-height: 1.6; }
#plan-screen #plan-budget-note.ok { color: var(--mp-green); }
#plan-screen #plan-budget-note.over { color: #a35a25; }
#plan-screen .kitchen-suggest-card { margin: 20px 0 12px; padding: 18px; border: 1px solid var(--mp-line); border-radius: 23px; background: var(--mp-soft); }
#plan-screen .kitchen-suggest-title { color: var(--mp-ink); font: 800 18px 'Outfit', sans-serif; }
#plan-screen .shuffle-btn { flex: none; width: 34px; height: 34px; border: 1px solid var(--mp-line); border-radius: 11px; background: var(--mp-card); }
#plan-screen .budget-recipe-note, #plan-screen .budget-recipe-empty { margin: 8px 0 12px; color: var(--mp-muted); font-size: 12px; line-height: 1.6; }
#plan-screen .kitchen-suggestion-item { gap: 10px; margin: 8px 0; padding: 12px; border: 1px solid var(--mp-line); border-radius: 14px; background: var(--mp-card); color: var(--mp-ink); font-size: 12px; line-height: 1.5; }
#plan-screen .kitchen-suggestion-item > span:first-child { min-width: 0; }
#plan-screen .kitchen-suggestion-item .meal-kcal { flex: 0 1 125px; color: var(--mp-green); text-align: right; font-size: 12px; }
#plan-screen .nutrition-target-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 20px 0; padding: 18px; border: 1px solid var(--mp-line); border-radius: 23px; background: var(--mp-card); }
#plan-screen .nutrition-target-card .summary-label { grid-column: 1 / -1; margin: 0 0 7px; color: var(--mp-ink); font: 800 19px 'Outfit', sans-serif; }
#plan-screen .nutrition-target-row { display: flex; flex-direction: column; align-items: start; justify-content: flex-start; gap: 8px; min-width: 0; padding: 13px; border: 1px solid var(--mp-line); border-radius: 15px; background: var(--mp-soft); }
#plan-screen .nutrition-target-row > span:first-child { color: var(--mp-muted); font-size: 11px; font-weight: 700; }
#plan-screen .nutrition-target-row > span:last-child { color: var(--mp-ink); font: 700 18px/1.45 'Outfit', sans-serif; overflow-wrap: anywhere; }
#plan-screen .nutrition-target-row b { color: var(--mp-green); font: 700 11px 'DM Sans', sans-serif; }
#plan-screen #week-nutrition-card { background: var(--mp-soft); }
#plan-screen #week-nutrition-card .nutrition-target-row { background: var(--mp-card); }
#plan-screen .weekly-plan-note { grid-column: 1 / -1; margin: 9px 0 0; color: var(--mp-muted); font-size: 11px; line-height: 1.65; }
#plan-screen .weekly-day { margin: 0 0 12px; overflow: hidden; border: 1px solid var(--mp-line); border-radius: 20px; background: var(--mp-card); box-shadow: 0 7px 21px #12432f07; }
#plan-screen .weekly-day > summary { gap: 12px; padding: 18px; border-radius: 0; background: transparent; color: var(--mp-ink); font: 800 18px 'Outfit', sans-serif; }
#plan-screen .weekly-day > summary > span:first-child { min-width: 0; }
#plan-screen .weekly-day > summary small { margin-top: 6px; color: var(--mp-muted); font: 500 11px/1.5 'DM Sans', sans-serif; }
#plan-screen .weekly-day > summary .meal-kcal { padding: 7px 9px; border-radius: 10px; color: var(--mp-green); background: var(--mp-soft); font: 800 11px 'DM Sans', sans-serif; }
#plan-screen .weekly-day[open] > summary { background: var(--mp-soft); }
#plan-screen .weekly-day-body { padding: 0 18px 18px; }
#plan-screen .weekly-day-macros { gap: 9px; margin: 12px 0; padding: 0; border: 0; }
#plan-screen .weekly-day-macros > span { display: flex; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid var(--mp-line); border-radius: 11px; color: var(--mp-muted); background: var(--mp-soft); font-size: 10px; }
#plan-screen .weekly-day-macros b { color: var(--mp-ink); font-size: 11px; }
#plan-screen .weekly-recipe { gap: 12px; padding: 14px 0; border-color: var(--mp-line); color: var(--mp-ink); }
#plan-screen .weekly-recipe b { display: block; font: 700 15px/1.4 'Outfit', sans-serif; }
#plan-screen .weekly-recipe small { color: var(--mp-muted); font-size: 10px; line-height: 1.5; }
#plan-screen .weekly-recipe > span:last-child { max-width: 40%; color: var(--mp-green); font-size: 11px; }
#plan-screen :is(.btn-primary, .btn-outline) { min-height: 48px; margin: 10px 0; padding: 13px 15px; border-radius: 15px; font-size: 13px; font-weight: 800; }
#plan-screen .btn-primary { min-height: 54px; border: 0; background: linear-gradient(100deg, #176d4c, #179f9b); color: #fff; box-shadow: 0 9px 24px #176d4c29; }
#plan-screen .btn-outline { border: 1px solid var(--mp-line); background: var(--mp-soft); color: var(--mp-green); }
#plan-screen .recipe-library-btn { background: var(--mp-card); }
#plan-screen .recipe-price-controls { margin: 22px 0; padding: 18px; border-color: var(--mp-line); border-radius: 23px; background: var(--mp-soft); color: var(--mp-ink); }
#plan-screen .recipe-price-controls h3 { color: var(--mp-ink); font: 800 19px 'Outfit', sans-serif; }
#plan-screen .recipe-price-controls h4 { color: var(--mp-ink); font-size: 13px; }
#plan-screen .recipe-price-controls label { color: var(--mp-muted); font-size: 11px; }
#plan-screen .recipe-price-controls :is(input, select) { border-color: var(--mp-line); border-radius: 11px; background: var(--mp-card); color: var(--mp-ink); font-size: 12px; }
#plan-screen .recipe-price-controls button { border-color: var(--mp-line); border-radius: 11px; background: var(--mp-card); color: var(--mp-green); font-size: 12px; }
#plan-screen .bottom-nav { position: sticky; bottom: 0; inset-inline: auto; transform: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: calc(100% + 52px); max-width: none; margin: 20px -26px 0; padding: 12px 13px calc(12px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--mp-line); border-radius: 0 0 33px 0; background: var(--mp-card); box-shadow: 0 -6px 20px #234b3108; }
#plan-screen .bottom-nav .nav-item { min-width: 0; padding: 4px 1px; font-size: 10px; }
#plan-screen :is(button, input, select, summary):focus-visible { outline: 3px solid #f5b56c; outline-offset: 3px; }
html[data-theme="dark"] body:has(#plan-screen.active) { background: var(--app-canvas); }
html[data-theme="dark"] #plan-screen { --mp-ink: var(--app-ink); --mp-muted: var(--app-muted); --mp-green: #8bd5ad; --mp-card: var(--app-surface); --mp-soft: var(--app-soft); --mp-line: var(--app-line); }
html[data-theme="dark"] #plan-screen .mp-planner { background: var(--mp-card); }
@media (max-width: 1100px) {
  #plan-screen { padding: 12px; }
  #plan-screen .mp-shell { grid-template-columns: minmax(0, .75fr) minmax(510px, 1fr); border-radius: 25px; }
  #plan-screen .mp-showcase { top: 12px; padding: 27px; border-radius: 24px 0 24px 24px; }
  #plan-screen .mp-hero-art .mp-plate, #plan-screen .mp-hero-art .mp-plate-fallback { width: 255px; height: 255px; }
  #plan-screen .mp-hero-chip { padding: 9px; font-size: 10px; }
  #plan-screen .mp-planner { padding: 24px 19px 0; border-radius: 0 24px 24px 0; }
  #plan-screen .bottom-nav { width: calc(100% + 38px); margin-inline: -19px; }
}
@media (max-width: 850px) {
  #plan-screen { padding: 0; }
  #plan-screen .mp-shell { grid-template-columns: minmax(0, 1fr); border: 0; border-radius: 0; box-shadow: none; }
  #plan-screen .mp-showcase { position: relative; top: auto; height: auto; min-height: 0; padding: 22px 24px; border-radius: 0 0 28px 28px; }
  #plan-screen .mp-hero-copy, #plan-screen .mp-hero-art { display: none; }
  #plan-screen .mp-showcase-foot { margin-top: 16px; font-size: 11px; }
  #plan-screen .mp-planner { width: 100%; max-width: 730px; margin: auto; padding: 23px 19px 0; border-radius: 0; }
  #plan-screen .bottom-nav { border-radius: 0; }
}
@media (max-width: 490px) {
  #plan-screen .mp-showcase { padding: 18px; }
  #plan-screen .mp-brand { font-size: 22px; }
  #plan-screen .mp-brand-symbol { width: 37px; height: 37px; font-size: 19px; border-radius: 12px; }
  #plan-screen .mp-showcase-foot { gap: 10px; }
  #plan-screen .mp-planner { padding: 20px 14px 0; }
  #plan-screen .mp-breadcrumb { margin-bottom: 22px; }
  #plan-screen .onb-title { font-size: 33px; }
  #plan-screen .mp-title-emoji { width: 47px; height: 47px; font-size: 23px; }
  #plan-screen .mp-section-kicker { font-size: 10px; }
  #plan-screen #daily-meal-list .meal-item { gap: 9px; padding: 12px; }
  #plan-screen .meal-item-left { gap: 9px; }
  #plan-screen .meal-item-icon { width: 51px; height: 62px; border-radius: 13px; font-size: 28px; }
  #plan-screen .meal-item-left small:not(.meal-portion-info) { font-size: 16px; }
  #plan-screen .meal-item-right { max-width: 94px; }
  #plan-screen #daily-meal-list .meal-kcal { font-size: 14px; }
  #plan-screen :is(.nutrition-target-card, .recipe-price-controls, .kitchen-suggest-card) { padding: 14px; }
  #plan-screen .nutrition-target-row { padding: 11px; }
  #plan-screen .nutrition-target-row > span:last-child { font-size: 16px; }
  #plan-screen .weekly-day > summary { padding: 15px 12px; font-size: 16px; }
  #plan-screen .weekly-day-body { padding: 0 12px 12px; }
  #plan-screen .bottom-nav { width: calc(100% + 28px); margin-inline: -14px; padding-inline: 6px; }
  #plan-screen .bottom-nav .nav-item { font-size: 9px; }
}
/* Responsive workspace layouts. Existing visibility, controls and data remain in charge. */
body:has(.mm-wide.active) { padding: 0; background: #f7f8f0; }
.phone:has(> .mm-wide.active) { width: min(1180px, 100%); min-height: 100dvh; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
.phone > .mm-wide { --rw-card: #fff; --rw-soft: #eef6ef; --rw-line: #dce8dd; padding: 32px 30px 24px; min-width: 0; color: var(--app-ink); text-align: left; }
.mm-wide > *, .mm-wide :is(section, article, form), .rw-columns > * { min-width: 0; }
.phone:has(> .mm-reading.active) { width: min(920px, 100%); }
.phone > #address-screen.mm-wide { max-width: 680px; margin: auto; }
.mm-wide :is(.onb-header, .wishlist-header) { margin-bottom: 28px; }
.mm-wide :is(.onb-title, .wishlist-header h1, .tips-page-header h2, .pantry-hero-title) { font: 800 clamp(26px, 3vw, 38px)/1.15 'Outfit', sans-serif; letter-spacing: -.8px; }
.mm-wide .onb-back-label::after { color: var(--app-brand); }
.mm-wide :is(.onb-back, .wishlist-back-btn) { flex: none; }
.mm-wide :is(input, select, textarea) { max-width: 100%; min-width: 0; }
.mm-wide :is(button, a, summary, input, select, textarea):focus-visible { outline: 3px solid #eca763; outline-offset: 3px; }
.mm-wide :is(.btn-primary, .btn-outline) { border-radius: 14px; }
.mm-wide > .bottom-nav { position: sticky; inset: auto; bottom: 0; transform: none; width: 100%; max-width: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 28px 0 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border: 1px solid var(--rw-line); border-radius: 20px; background: var(--rw-card); box-shadow: 0 -5px 24px #204c3010; }
.mm-wide > .bottom-nav .nav-item { min-width: 0; min-height: 44px; padding: 4px 2px; font-size: 11px; }
.rw-columns { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: 28px; align-items: start; }
.rw-overview { padding: 24px; border: 1px solid var(--rw-line); border-radius: 25px; background: var(--rw-card); box-shadow: 0 12px 35px #1844310b; }
.rw-content { min-width: 0; }
#budget-screen .rw-overview > .desc { text-align: left; }
#budget-screen .rw-overview .pie-row { flex-wrap: wrap; gap: 24px; padding: 22px 0; }
#budget-screen .rw-overview .pie-legend { flex: 1; min-width: 150px; }
#budget-screen .budget-entry-panel { margin-top: 0; padding: 22px; border-color: var(--rw-line); border-radius: 22px; background: var(--rw-card); }
#budget-screen .budget-entry-panel label { font-size: 13px; }
#budget-screen .rw-overview .budget-entry-panel { margin-top: 20px; padding: 15px; background: var(--rw-soft); }
#budget-screen .budget-history-row { margin-top: 12px; padding: 18px; border: 1px solid var(--rw-line); border-radius: 18px; background: var(--rw-card); }
#budget-screen .budget-stat { border-radius: 15px; background: var(--rw-soft); }
#budget-screen .budget-total-row { font-size: 36px; margin-top: 16px; }
#meal-history-screen .history-period-tabs { margin: 0 0 18px; padding: 6px; border-radius: 14px; }
#meal-history-screen .history-period-btn { min-height: 44px; font-size: 13px; }
#meal-history-screen .history-period-heading { margin: 20px 0 15px; font: 700 23px 'Outfit', sans-serif; }
#meal-history-screen .history-period-summary { gap: 10px; padding: 0; margin-bottom: 0; border: 0; background: transparent; }
#meal-history-screen .history-stat { gap: 7px; padding: 15px; border: 1px solid var(--rw-line); border-radius: 15px; background: var(--rw-soft); }
#meal-history-screen .history-stat span { font-size: 12px; }
#meal-history-screen .history-stat b { font: 700 22px 'Outfit', sans-serif; }
#meal-history-screen .history-day-card { padding: 22px; border-color: var(--rw-line); border-radius: 22px; background: var(--rw-card); }
#meal-history-screen .history-days-list { gap: 18px; }
#meal-history-screen .history-day-heading h3 { font: 700 20px 'Outfit', sans-serif; }
#meal-history-screen :is(.history-day-heading p, .history-day-macros) { font-size: 12px; line-height: 1.6; }
#meal-history-screen .history-meal-row { padding: 12px; border-radius: 13px; }
#meal-history-screen .history-meal-copy b { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
#meal-history-screen .history-meal-copy small { font-size: 11px; }
#meal-history-screen :is(.history-meal-actions button, .history-add-meal, .history-edit-activity) { min-height: 40px; font-size: 12px; }
#meal-history-screen .history-modal-backdrop { position: fixed; z-index: 100; padding: max(15px, env(safe-area-inset-top)) 15px max(15px, env(safe-area-inset-bottom)); }
#meal-history-screen .history-editor-card { width: min(560px, 100%); max-height: calc(100dvh - 40px); padding: 24px; border-radius: 24px; }
#meal-history-screen .history-editor-card label { font-size: 13px; }
#meal-history-screen .history-editor-card input { min-height: 44px; }
#notifications-screen #notifications-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
#notifications-screen .notification-item { margin: 0; padding: 24px; border: 1px solid var(--rw-line); border-radius: 23px; background: var(--rw-card); }
#notifications-screen .notification-title { font: 700 19px 'Outfit', sans-serif; }
#notifications-screen .notification-message { font-size: 14px; line-height: 1.6; }
#tips-screen .tips-page-header { margin-bottom: 26px; }
#tips-screen .tips-feature { min-height: 240px; padding: 32px; border-radius: 28px; }
#tips-screen .tips-feature-copy strong { max-width: 600px; font: 800 clamp(28px, 4vw, 46px)/1.1 'Outfit', sans-serif; }
#tips-screen .tips-feature-copy em { font-size: 15px; line-height: 1.6; }
#tips-screen .tips-feature-art { font-size: 100px; }
#tips-screen .tips-topic-row { gap: 10px; flex-wrap: wrap; overflow: visible; margin: 24px 0; }
#tips-screen .tips-topic { min-height: 42px; padding: 10px 16px; font-size: 13px; }
#tips-screen .tips-card-grid { gap: 18px; }
#tips-screen .tips-card { min-height: 235px; padding: 22px; border-radius: 24px; }
#tips-screen .tips-card strong { font: 700 21px/1.2 'Outfit', sans-serif; }
#tips-screen .tips-card em { font-size: 13px; }
#tips-screen .tips-section { margin-bottom: 28px; }
#tips-screen .tips-fact-card { padding: 25px; border-radius: 24px; }
#tip-article-screen .tip-article-hero { height: 240px; border-radius: 26px; }
#tip-article-screen .tip-article-title { font: 800 clamp(27px, 4vw, 40px)/1.15 'Outfit', sans-serif; }
#tip-article-screen .tip-article-copy { font-size: 16px; line-height: 1.8; }
#tip-article-screen .tip-article-copy p, #tip-article-screen .tip-article-copy li { font-size: inherit; line-height: inherit; }
#pantry-screen .pantry-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
#pantry-screen .pantry-cat-card { border-radius: 21px; }
#pantry-screen .pantry-cat-img-wrap { height: 150px; }
#pantry-screen .pantry-cat-info { padding: 16px; }
#pantry-screen .pantry-cat-name { font-size: 17px; }
#pantry-screen :is(.pantry-storage-tabs, .pantry-subcat-row, .pantry-filter-row) { flex-wrap: wrap; overflow: visible; gap: 9px; }
#pantry-screen .pantry-hero { padding: 26px; border-radius: 26px; }
#pantry-screen #pantry-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
#pantry-screen .pantry-ing-card { min-width: 0; margin: 0; }
#pantry-screen .pantry-ing-name { overflow-wrap: anywhere; }
#pantry-screen .pantry-add-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; padding: 26px; border-radius: 24px; }
#pantry-screen .pantry-add-box > :not(.pantry-field-group) { grid-column: 1 / -1; }
#pantry-screen .pantry-field-group { min-width: 0; margin: 0; }
#pantry-screen .pantry-stats-strip { gap: 16px; }
#pantry-screen #add-item-form { max-width: 700px; margin-inline: auto; }
#recipes-screen .recipes-nav-bar { padding: 0 0 22px; }
#recipes-screen .recipes-hero-banner { min-height: 240px; padding: 30px; border-radius: 28px; }
#recipes-screen .recipes-hero-text h3 { font: 800 42px/1.08 'Outfit', sans-serif; }
#recipes-screen .recipes-hero-img-wrap { width: 220px; height: 200px; }
#recipes-screen .recipes-hero-food-icon { font-size: 125px; }
#recipes-screen .recipes-pills-row { flex-wrap: wrap; overflow: visible; gap: 10px; }
#recipes-screen .recipes-sections-container { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
#recipes-screen .recipes-section { min-width: 0; margin: 0; }
#recipes-screen .recipes-section-title { font-size: 22px; }
.mm-wide .recipes-card { min-width: 0; border-radius: 20px; background: var(--rw-card); }
.mm-wide .recipes-card-media { height: auto; aspect-ratio: 4 / 3; }
.mm-wide .recipes-card-title { min-height: 0; display: block; overflow: visible; font-size: 16px; line-height: 1.4; }
.mm-wide .recipes-card-content { padding: 15px; gap: 5px; }
.mm-wide .recipes-card-meta { flex-wrap: wrap; gap: 6px; font-size: 12px; }
#recipes-screen .recipes-seeall-grid, #wishlist-screen .wishlist-recipes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
#wishlist-screen .wishlist-empty { padding: 70px 25px; border: 1px dashed var(--rw-line); border-radius: 26px; background: var(--rw-card); }
#recipe-library-screen .recipe-library-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
#recipe-library-screen .recipe-library-card { min-width: 0; margin: 0; }
#recipe-library-screen .recipe-filter-group { flex-wrap: wrap; }
#shopping-screen .smart-hero { padding: 36px; border-radius: 28px; }
#shopping-screen .smart-hero h1 { font-size: 48px; }
#shopping-screen .smart-search { max-width: 650px; }
#shopping-screen .smart-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
#shopping-screen .smart-category-row { flex-wrap: wrap; overflow: visible; gap: 10px; }
#shopping-screen .product-image-button { height: 180px; }
#shopping-screen .product-info { min-height: 160px; padding: 14px 14px 50px; }
#shopping-screen .product-info h3 { min-height: 44px; font-size: 16px; line-height: 1.4; }
#shopping-screen .product-info :is(p, small), #shopping-screen .product-qty { font-size: 11px; }
#shopping-screen .add-smart-product { min-height: 36px; font-size: 12px; }
#shopping-screen .smart-store-manager-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#shopping-screen .smart-cart-bar { position: sticky; inset: auto; bottom: 100px; width: 100%; max-width: none; transform: none; margin-top: 24px; }
.item-compare-panel { width: min(700px, 100%); max-height: min(850px, 90dvh); overflow: auto; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
.phone:has(> #chat-screen.active) { width: min(1080px, 100%); height: var(--mm-chat-viewport, 100dvh); min-height: 0; padding: 0; }
.phone > #chat-screen.active { min-height: 0; padding: 24px 32px 0; }
#chat-screen .mm-chat-header { padding-bottom: 20px; }
#chat-screen .mm-chat-brand h1 { font: 800 28px 'Outfit', sans-serif; }
#chat-screen .mm-chat-brand p { font-size: 12px; }
#chat-screen .mm-chat-context span { padding: 7px 11px; font-size: 12px; }
#chat-screen .mm-chat-body { padding: 12px 6px 18px; }
#chat-screen .mm-chat-welcome { max-width: 780px; margin: 0 auto; padding: 22px 0; }
#chat-screen .mm-chat-welcome h2 { font: 800 36px/1.2 'Outfit', sans-serif; }
#chat-screen .mm-chat-welcome > p:not(.mm-chat-eyebrow) { max-width: 490px; font-size: 15px; }
#chat-screen .chat-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#chat-screen .quick-chip { padding: 18px; min-height: 86px; border-radius: 20px; background: var(--rw-card); }
#chat-screen .mm-chat-message { max-width: 820px; }
#chat-screen .mm-chat-message.user { max-width: 720px; margin-left: auto; }
#chat-screen .chat-bubble { padding: 20px; }
#chat-screen .mm-chat-composer { margin-top: 0; }
#chat-screen #chat-input { font-size: 16px; }
#chat-screen .mm-chat-composer-meta { font-size: 11px; }
#chat-screen > .bottom-nav { position: static; flex: none; margin-top: 12px; border-radius: 18px 18px 0 0; padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
html[data-theme="dark"] body:has(.mm-wide.active) { background: var(--app-canvas); }
html[data-theme="dark"] .phone > .mm-wide { --rw-card: var(--app-surface); --rw-soft: var(--app-soft); --rw-line: var(--app-line); }
@media (min-width: 900px) {
  #tips-screen.active { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
  #tips-screen > :is(.tips-page-header, .tips-feature, .tips-topic-row, .tips-facts-section, #tips-more-guides, .tips-disclaimer, .bottom-nav) { grid-column: 1 / -1; }
  #tips-screen #tips-more-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
@media (max-width: 950px) {
  #pantry-screen .pantry-category-grid, #shopping-screen .smart-product-grid, #recipes-screen .recipes-seeall-grid, #wishlist-screen .wishlist-recipes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #recipe-library-screen .recipe-library-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rw-columns { gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .rw-overview { padding: 18px; }
}
@media (max-width: 760px) {
  .phone > .mm-wide { padding: 22px 16px 0; }
  .rw-columns { grid-template-columns: minmax(0, 1fr); }
  #recipes-screen .recipes-sections-container, #notifications-screen #notifications-list { grid-template-columns: minmax(0, 1fr); }
  #pantry-screen #pantry-detail-list { grid-template-columns: minmax(0, 1fr); }
  .mm-wide > .bottom-nav { bottom: 0; gap: 0; margin-top: 24px; padding: 10px 4px max(10px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .mm-wide > .bottom-nav .nav-item { font-size: 10px; }
  #tips-screen .tips-feature { min-height: 190px; padding: 22px; }
  #tips-screen .tips-feature-art { font-size: 70px; }
  #tips-screen .tips-feature-copy em { font-size: 13px; }
  #recipes-screen .recipes-hero-banner { min-height: 210px; padding: 24px; }
  #recipes-screen .recipes-hero-text h3 { font-size: 34px; }
  #recipes-screen .recipes-hero-img-wrap { width: 140px; height: 170px; }
  #recipes-screen .recipes-hero-food-icon { font-size: 90px; }
  #shopping-screen .smart-hero { padding: 25px; }
  #shopping-screen .smart-hero h1 { font-size: 38px; }
  .phone > #chat-screen.active { padding: max(14px, env(safe-area-inset-top)) 16px 0; }
  #chat-screen .mm-chat-brand h1 { font-size: 24px; }
  #chat-screen .mm-chat-welcome h2 { font-size: 29px; }
  #chat-screen .mm-chat-welcome { padding: 12px 0; }
  /* Avoid iOS focus zoom; keep native Android/iOS input and date controls. */
  .screen :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { font-size: 16px; }
  .screen img { max-width: 100%; }
  .mm-wide :is(.history-editor-card input, .pantry-dark-input, .pantry-dark-select, .pantry-search) { font-size: 16px; }
  .mm-wide :is(.storage-tab, .pantry-pill, .pantry-subcat-btn, .recipes-pill, .recipe-filter, .history-add-meal, .history-meal-actions button, .history-edit-activity, .tips-topic) { min-height: 44px; }
}
@media (max-width: 520px) {
  #pantry-screen .pantry-category-grid, #shopping-screen .smart-product-grid, #recipes-screen .recipes-seeall-grid, #wishlist-screen .wishlist-recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #recipe-library-screen .recipe-library-list, #shopping-screen .smart-store-manager-list { grid-template-columns: minmax(0, 1fr); }
  #pantry-screen .pantry-add-box { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  #pantry-screen .pantry-hero { padding: 18px; }
  #pantry-screen .pantry-cat-img-wrap { height: 110px; }
  #pantry-screen .pantry-cat-info { padding: 12px; }
  #pantry-screen .pantry-cat-name { font-size: 15px; }
  #shopping-screen .product-image-button { height: 140px; }
  #shopping-screen .product-info { padding-inline: 10px; }
  #shopping-screen .product-info h3 { font-size: 14px; }
  #tips-screen .tips-card { min-height: 230px; padding: 16px; }
  #tips-screen .tips-card strong { font-size: 18px; }
  #tips-screen .tips-card-grid { gap: 12px; }
  #tips-screen .tips-topic-row { gap: 7px; }
  #tips-screen .tips-topic { padding: 9px 12px; font-size: 12px; }
  #chat-screen .chat-quick-actions { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #chat-screen .quick-chip { min-height: 65px; padding: 12px; border-radius: 15px; }
  #chat-screen .mm-chat-header { padding-bottom: 12px; }
  #chat-screen .mm-chat-context span { font-size: 10px; padding: 5px 8px; }
  #chat-screen .mm-chat-composer-meta { font-size: 9px; }
  #chat-screen .chat-bubble { padding: 14px; }
  #chat-screen .mm-chat-brand p { font-size: 10px; }
  #meal-history-screen .history-editor-card { padding: 18px; }
  #meal-history-screen .history-day-card { padding: 15px; }
  #meal-history-screen .history-stat { padding: 12px; }
  #meal-history-screen .history-stat b { font-size: 20px; }
  .mm-wide .recipes-card-title { font-size: 14px; }
  .mm-wide .recipes-card-content { padding: 11px; }
}
@media (max-width: 360px) {
  .phone > .mm-wide { padding-left: 12px; padding-right: 12px; }
  #tips-screen .tips-card-grid { grid-template-columns: minmax(0, 1fr); }
  #tips-screen .tips-feature-art { font-size: 48px; }
  #tips-screen .tips-feature-copy strong { font-size: 27px; }
  #recipes-screen .recipes-hero-text h3 { font-size: 28px; }
  #recipes-screen .recipes-hero-img-wrap { width: 90px; }
  #recipes-screen .recipes-hero-food-icon { font-size: 70px; }
  #meal-history-screen .history-meal-row { flex-wrap: wrap; }
  #meal-history-screen .history-meal-actions { margin-left: auto; }
  .mm-wide .bottom-nav .nav-item { font-size: 9px; }
}
#tips-screen .tips-page-header h2 { max-width: none; }
#tips-screen .tips-feature-copy { padding: 0; }
#pantry-screen .pantry-cat-action::after { content: "\2192"; margin-left: 6px; }
#recipes-screen.mm-wide { padding: 32px 30px 24px; }
.mm-wide .onb-back-label { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rw-line); border-radius: 13px; background: var(--rw-card); cursor: pointer; }
@media (max-width: 760px) { #recipes-screen.mm-wide { padding: 22px 16px 0; } }
@media (max-width: 360px) { #recipes-screen.mm-wide { padding-inline: 12px; } }
#pantry-screen #pantry-category-detail .pantry-pill { color: var(--app-ink); background: var(--rw-card); border-color: var(--rw-line); }
#pantry-screen #pantry-category-detail .pantry-pill.active { color: #fff; background: var(--app-brand); border-color: var(--app-brand); }
/* Profile destinations: desktop forms and cards with native phone-sized controls. */
.phone:has(> .pf-option.active) { width: min(1180px, 100%); }
.phone > .pf-option { padding-bottom: max(36px, env(safe-area-inset-bottom)); }
.pf-option, .pf-option * { font-family: 'DM Sans', sans-serif; }
.pf-option .onb-header { justify-content: flex-start; gap: 20px; margin-bottom: 30px; }
.pf-option .onb-title { color: var(--app-ink); font: 800 clamp(27px, 3.5vw, 38px)/1.15 'Outfit', sans-serif; letter-spacing: -.8px; text-align: left; }
.pf-option .onb-header > span:last-child:empty { margin-left: auto; }
.pf-option > .desc { max-width: 820px; line-height: 1.7; }
.pf-option :is(input:not([type=checkbox]):not([type=range]):not([type=file]), select) { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--rw-line); border-radius: 13px; background: var(--rw-card); color: var(--app-ink); font-size: 16px; }
.pf-option :is(.btn-primary, .btn-outline, .cooking-for-continue) { min-height: 48px; padding: 14px 20px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.pf-option > :is(.btn-primary, .btn-outline) { max-width: 560px; display: block; margin: 24px auto 0; }
.pf-option :is(.pf-form-card, .pf-settings-card, .pf-field-card, .profile-budget-panel, .rating-card) { min-width: 0; padding: 26px; border: 1px solid var(--rw-line); border-radius: 25px; background: var(--rw-card); box-shadow: 0 12px 35px #18443109; }
.pf-edit-layout { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1fr); align-items: start; gap: 28px; max-width: 1000px; margin: 0 auto; }
#edit-profile-screen .avatar-edit-wrap { display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 280px; margin: 0; padding: 30px; border: 1px solid var(--rw-line); border-radius: 26px; background: var(--rw-soft); }
#edit-profile-screen .avatar-edit-circle { width: 130px; height: 130px; margin: 0; border: 5px solid var(--rw-card); box-shadow: 0 12px 28px #1844311c; }
#edit-profile-screen .pf-form-card > label:first-child { margin-top: 0; }
#edit-profile-screen .pf-form-card > label { color: var(--app-muted); font-size: 13px; }
#edit-profile-screen .pf-form-card .btn-primary { margin-top: 18px; }
#profile-budget-screen .profile-budget-panel { width: min(820px, 100%); margin: 0 auto; padding: 38px; }
#profile-budget-screen .profile-budget-copy { max-width: 620px; margin: 0 auto 24px; text-align: center; }
#profile-budget-screen .budget-value { color: var(--app-brand); font: 800 60px 'Outfit', sans-serif; text-align: center; }
#profile-budget-screen .onb-slider { width: 100%; margin: 22px 0; }
#profile-budget-screen .profile-budget-presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0 28px; }
#profile-budget-screen .preset-btn { flex: 1 1 90px; max-width: 130px; min-height: 46px; padding: 10px; border-radius: 13px; }
#family-screen .cooking-for-heading { margin: 5px 0 30px; }
#family-screen :is(.cooking-for-title, .cooking-for-title-accent) { font: 800 clamp(30px, 4vw, 48px)/1.12 'Outfit', sans-serif; letter-spacing: -1px; }
#family-screen .cooking-for-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#family-screen .cooking-for-card { min-width: 0; min-height: 180px; padding: 28px; border-radius: 25px; }
#family-screen .cooking-for-emoji { font-size: 52px; }
#family-screen .cooking-for-label { font: 700 21px 'Outfit', sans-serif; }
#family-screen .cooking-for-continue { display: block; width: min(560px, 100%); margin: 28px auto 0; }
#goals-screen .goal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
#goals-screen .goal-card { min-width: 0; min-height: 200px; padding: 28px 18px; border-radius: 25px; }
#goals-screen .goal-icon { margin: 10px 0 20px; font-size: 52px; }
#goals-screen .goal-card p { font: 700 21px/1.3 'Outfit', sans-serif; overflow-wrap: anywhere; }
.pf-target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
#nutrition-targets-screen .pf-field-card { padding: 22px; background: var(--rw-card); }
#nutrition-targets-screen .pf-field-card label { margin: 0 0 13px; color: var(--app-muted); font-size: 14px; }
#nutrition-targets-screen .pf-field-card input { margin: 0; font: 700 25px 'Outfit', sans-serif; color: var(--app-brand); background: var(--rw-soft); }
#subscription-screen #subscription-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 25px 0; }
#subscription-screen .plan-card { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 26px; border-radius: 25px; background: var(--rw-card); }
#subscription-screen .plan-card.current { background: var(--rw-soft); }
#subscription-screen .plan-card-header { align-items: start; gap: 12px; flex-wrap: wrap; }
#subscription-screen .plan-name { font: 800 26px 'Outfit', sans-serif; }
#subscription-screen .plan-price { font: 700 21px 'Outfit', sans-serif; }
#subscription-screen .plan-features { flex: 1; padding: 8px 0; }
#subscription-screen .plan-features li { margin: 12px 0; font-size: 14px; line-height: 1.6; }
#subscription-screen .plan-select-btn { margin-top: 12px; }
.pf-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
#settings-screen .pf-settings-card { padding: 24px; }
#settings-screen .settings-group-title { margin: 0 0 18px; color: var(--app-muted); font-size: 12px; line-height: 1.6; }
#settings-screen .settings-row { gap: 20px; min-height: 60px; margin-bottom: 12px; padding: 16px; border: 1px solid var(--rw-line); border-radius: 16px; background: var(--rw-soft); font-size: 14px; }
#settings-screen .settings-row input[type=checkbox] { flex: none; width: 22px; height: 22px; accent-color: var(--app-brand); }
#settings-screen .settings-link-row { min-height: 62px; padding: 15px; border-color: var(--rw-line); border-radius: 16px; background: var(--rw-soft); }
#settings-screen .settings-preference-note { margin-bottom: 0; }
.pf-referral-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 26px; align-items: start; }
.pf-referral-grid > section { min-width: 0; }
#referral-screen :is(.referral-hero-card, .referral-upi-card, .referral-code-card, .referral-steps-card) { padding: 26px; border: 1px solid var(--rw-line); border-radius: 25px; }
#referral-screen .referral-hero-card { margin-bottom: 22px; }
#referral-screen .referral-hero-emoji { font-size: 48px; }
#referral-screen .referral-hero-title { font: 800 34px 'Outfit', sans-serif; }
#referral-screen .referral-hero-sub { font-size: 14px; line-height: 1.7; }
#referral-screen .referral-wallet-card { padding: 22px; border-radius: 20px; gap: 14px; flex-wrap: wrap; }
#referral-screen .referral-wallet-amount { font: 800 28px 'Outfit', sans-serif; }
#referral-screen .referral-code-row { min-width: 0; align-items: stretch; }
#referral-screen .referral-code-text { min-width: 0; overflow-wrap: anywhere; }
#referral-screen .referral-copy-btn { flex: none; min-height: 46px; padding: 10px 18px; }
#referral-screen .referral-step { align-items: start; font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
#referral-screen .referral-step-num { flex: none; }
#referral-screen .referral-list-header { margin-top: 24px; }
#referral-screen .referral-disclaimer { margin-top: 25px; text-align: left; font-size: 12px; line-height: 1.8; }
#family-member-plan-screen #family-plan-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#family-member-plan-screen #family-plan-list > * { min-width: 0; margin: 0; }
.phone:has(> #terms-screen.active, > #privacy-screen.active, > #rate-us-screen.active) { width: min(960px, 100%); }
.pf-option .policy-card { padding: 25px 28px; border-radius: 22px; }
.pf-option .policy-card h3 { font: 700 22px 'Outfit', sans-serif; }
.pf-option .policy-card p { font-size: 15px; line-height: 1.8; }
#rate-us-screen .rating-card { max-width: 720px; margin: 24px auto; padding: 40px; }
#rate-us-screen .rating-card h2 { font: 800 32px 'Outfit', sans-serif; }
#rate-us-screen .rating-stars { gap: 12px; flex-wrap: wrap; }
#rate-us-screen .rating-star { min-width: 44px; min-height: 44px; font-size: 38px; }
#help-screen > section { min-width: 0; padding: 24px; border: 1px solid var(--rw-line); border-radius: 25px; background: var(--rw-card); }
#help-screen section > .section-title { margin: 0 0 20px; font: 700 23px/1.3 'Outfit', sans-serif; }
#help-screen .faq-item { padding: 16px; border: 1px solid var(--rw-line); border-radius: 16px; background: var(--rw-soft); box-shadow: none; }
#help-screen .faq-item:last-child { margin-bottom: 0; }
#help-screen .faq-item .desc { font-size: 14px; }
#help-screen #support-contact { grid-column: 1 / -1; }
#support-contact a { color: var(--app-brand-hover); overflow-wrap: anywhere; }
#support-request-form:not([hidden]) { display: grid; gap: 10px; margin-top: 20px; }
#support-request-form label { margin-top: 6px; color: var(--app-ink); font-weight: 700; }
#support-request-form :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 12px; border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-input-bg, #fff); color: var(--app-ink); font: inherit; font-size: 16px; }
#support-request-form textarea { resize: vertical; }
#support-request-form :is(input, select, textarea):focus-visible { outline: 2px solid var(--app-brand); outline-offset: 2px; }
#support-request-form .desc { margin: 0; }
@media (min-width: 900px) {
  #help-screen.active { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  #help-screen > :is(.onb-header, .desc, .btn-primary) { grid-column: 1 / -1; }
  #help-screen > .onb-header, #help-screen > .desc { margin-bottom: 0; }
}
@media (max-width: 900px) {
  #goals-screen .goal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-edit-layout { grid-template-columns: minmax(0, .65fr) minmax(0, 1fr); gap: 20px; }
  .pf-settings-grid { gap: 18px; }
  #help-screen > section { margin-bottom: 20px; }
}
@media (max-width: 700px) {
  .pf-edit-layout, .pf-referral-grid, .pf-settings-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #family-screen .cooking-for-cards { grid-template-columns: minmax(0, 1fr); }
  #edit-profile-screen .avatar-edit-wrap { min-height: 210px; padding: 24px; }
  #edit-profile-screen .avatar-edit-circle { width: 110px; height: 110px; }
  #subscription-screen #subscription-list, #family-member-plan-screen #family-plan-list { grid-template-columns: minmax(0, 1fr); }
  #profile-budget-screen .profile-budget-panel { padding: 25px; }
  #family-screen .cooking-for-card { min-height: 150px; padding: 20px; }
  #family-screen .cooking-for-emoji { font-size: 40px; }
  #family-screen .cooking-for-label { font-size: 18px; }
  #goals-screen .goal-card { min-height: 165px; padding: 20px 12px; }
  #goals-screen .goal-card p { font-size: 18px; }
  #rate-us-screen .rating-card { padding: 25px; }
  .pf-option .policy-card { padding: 20px; }
  .pf-option .onb-header { gap: 14px; }
  #nutrition-targets-screen .pf-field-card input { font-size: 22px; }
}
@media (max-width: 450px) {
  .pf-option .onb-title { font-size: 26px; letter-spacing: -.5px; }
  .pf-option :is(.pf-form-card, .pf-settings-card, .pf-field-card, .rating-card) { padding: 20px; border-radius: 21px; }
  .pf-target-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #profile-budget-screen .profile-budget-panel { padding: 22px 18px; }
  #profile-budget-screen .budget-value { font-size: 48px; }
  #family-screen .cooking-for-cards { gap: 12px; }
  #family-screen .cooking-for-card { padding: 18px 14px; }
  #family-screen .cooking-for-label { font-size: 16px; }
  #goals-screen .goal-grid { gap: 12px; }
  #goals-screen .goal-card p { font-size: 16px; }
  #goals-screen .goal-icon { font-size: 40px; }
  #referral-screen :is(.referral-hero-card, .referral-upi-card, .referral-code-card, .referral-steps-card) { padding: 20px; }
  #referral-screen .referral-copy-btn { padding-inline: 14px; }
  #help-screen > section { padding: 18px; }
  #help-screen .faq-item { padding: 14px; }
  #rate-us-screen .rating-stars { gap: 3px; }
  #rate-us-screen .rating-star { min-width: 38px; font-size: 32px; }
}
#edit-profile-screen .avatar-edit-circle { overflow: visible; }
#edit-profile-screen .avatar-edit-circle img { border-radius: 50%; }
#edit-profile-screen .avatar-cam-badge { display: grid; place-items: center; right: 0; bottom: 0; width: 34px; height: 34px; border: 3px solid var(--rw-card); font-size: 16px; }
/* Tips photography: replace decorative hero emojis while preserving every action. */
:is(#tips-screen, #tip-article-screen) .tips-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
#tips-screen .tips-card-art { display: block; flex: none; align-self: stretch; width: calc(100% + 44px); height: 160px; margin: -22px -22px 18px; overflow: hidden; border-radius: 24px 24px 0 0; filter: none; font-size: 0; line-height: 0; }
#tips-screen .tips-card { overflow: hidden; padding-bottom: 44px; }
#tips-screen .tips-feature { position: relative; isolation: isolate; overflow: hidden; }
#tips-screen .tips-feature-art { position: absolute; inset: 0 0 0 auto; width: 40%; height: 100%; margin: 0; border-radius: 0; transform: none; filter: none; opacity: 1; font-size: 0; line-height: 0; }
#tips-screen .tips-feature-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #206d4e38, transparent 28%); }
#tips-screen .tips-feature-copy { width: 58%; }
#tips-screen #tips-fact-content { align-items: center; gap: 22px; }
#tips-screen .tips-fact-emoji { display: block; flex: 0 0 180px; width: 180px; height: 120px; border-radius: 17px; overflow: hidden; font-size: 0; }
#tips-screen .tips-fact-card { overflow: hidden; }
#tip-article-screen #tip-article-emoji { display: block; min-width: 0; min-height: 0; width: 100%; height: 100%; overflow: hidden; filter: none; font-size: 0; line-height: 0; }
#tip-article-screen .tip-article-hero { height: clamp(220px, 34vw, 400px); grid-template-rows: minmax(0, 1fr); }
:is(#tips-screen, #tip-article-screen) .tips-photo[src*="/balanced-plate-"] { object-position: center 80%; }
:is(#tips-screen, #tip-article-screen) .tips-photo[src*="/berries-"] { object-position: center 40%; }
@media (max-width: 760px) {
  #tips-screen .tips-feature-copy { width: 59%; }
  #tips-screen #tips-fact-content { gap: 16px; }
  #tips-screen .tips-fact-emoji { flex-basis: 120px; width: 120px; height: 100px; }
}
@media (max-width: 520px) {
  #tips-screen .tips-card-art { width: calc(100% + 32px); height: 130px; margin: -16px -16px 16px; }
  #tips-screen .tips-feature-copy strong { font-size: 25px; }
  #tips-screen .tips-feature-copy em { font-size: 12px; }
  #tips-screen #tips-fact-content { align-items: start; flex-direction: column; gap: 15px; }
  #tips-screen .tips-fact-emoji { flex: none; width: 100%; height: 170px; border-radius: 16px; }
  #tip-article-screen .tip-article-hero { height: 230px; }
}
@media (max-width: 360px) {
  #tips-screen .tips-card-art { height: 170px; }
  #tips-screen .tips-feature-copy strong { font-size: 23px; }
  #tips-screen .tips-feature-copy em { font-size: 11px; }
}
/* Create Account and Forgot Password: responsive presentation only. */
body:has(:is(#signup-screen, #forgot-screen).active) {
  min-height: 100dvh;
  padding: 32px max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left));
  align-items: center;
}
.phone:has(> :is(#signup-screen, #forgot-screen).active) {
  width: min(1180px, 100%);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 32px;
}
.phone > :is(#signup-screen, #forgot-screen) { padding: 0; }
.phone > :is(#signup-screen, #forgot-screen).active { min-height: 0; }
:is(#signup-screen, #forgot-screen) .auth-responsive-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  min-height: 640px;
  text-align: left;
}
:is(#signup-screen, #forgot-screen) .auth-responsive-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 100px clamp(30px, 4.5vw, 64px) 80px;
  overflow: hidden;
  background: linear-gradient(145deg, #207c58, #124d3b);
  color: #fff;
}
:is(#signup-screen, #forgot-screen) .auth-responsive-intro::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  right: -200px;
  bottom: -130px;
  border: 1px solid #ffffff26;
  border-radius: 50%;
  box-shadow: 0 0 0 60px #ffffff05, 0 0 0 120px #ffffff05;
  pointer-events: none;
}
:is(#signup-screen, #forgot-screen) .auth-responsive-intro .back-btn {
  position: absolute;
  top: 28px;
  left: clamp(30px, 4.5vw, 64px);
  min-height: 44px;
  padding: 10px 0;
  color: #e0f3e8;
  font-size: 14px;
}
:is(#signup-screen, #forgot-screen) .auth-responsive-intro h1 {
  max-width: 440px;
  margin: 0 0 20px;
  color: #fff;
  font: 800 clamp(36px, 3.5vw, 48px)/1.12 'Outfit', sans-serif;
  letter-spacing: -1.5px;
  overflow-wrap: break-word;
}
:is(#signup-screen, #forgot-screen) .auth-responsive-intro .desc {
  max-width: 390px;
  margin: 0;
  color: #d4ecdd;
  font-size: 16px;
  line-height: 1.8;
  text-align: left;
}
:is(#signup-screen, #forgot-screen) .auth-responsive-form {
  min-width: 0;
  width: 100%;
  max-width: 640px;
  align-self: center;
  justify-self: center;
  padding: clamp(28px, 4.5vw, 56px);
}
:is(#signup-screen, #forgot-screen) .auth-responsive-form label {
  margin: 20px 0 9px;
  font-size: 14px;
}
#signup-screen .auth-responsive-form > label:first-child { margin-top: 0; }
:is(#signup-screen, #forgot-screen) .auth-responsive-form input {
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 16px;
}
:is(#signup-screen, #forgot-screen) .auth-responsive-form .desc {
  margin: 8px 0 16px;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
  overflow-wrap: anywhere;
}
#signup-screen .strength { margin: 12px 0 0; }
:is(#signup-screen, #forgot-screen) .auth-responsive-form .btn-primary {
  min-height: 54px;
  margin-top: 22px;
  font-size: 16px;
}
#signup-screen .or-text { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px; }
#signup-screen .or-text::before, #signup-screen .or-text::after { content: ''; flex: 1; height: 1px; background: var(--app-line); }
#signup-screen .social-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
#signup-screen .btn-social { min-width: 0; min-height: 52px; padding: 12px 10px; line-height: 1.5; font-size: 13px; }
#signup-screen .login-link.center { margin: 24px 0 0; font-size: 14px; line-height: 1.8; }
#forgot-screen .method-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 26px; }
#forgot-screen .method-card { min-width: 0; padding: 22px 12px; border-radius: 17px; }
#forgot-screen .method-card .icon { margin-bottom: 12px; font-size: 28px; }
#forgot-screen .method-card .label { display: block; font-size: 15px; }
#forgot-screen .method-card .sub { display: block; margin-top: 5px; font-size: 12px; }
:is(#signup-screen, #forgot-screen) .field-error { text-align: left; line-height: 1.6; }
html[data-theme="dark"] .phone :is(#signup-screen, #forgot-screen) .auth-responsive-intro h1 { color: #fff !important; }
html[data-theme="dark"] .phone :is(#signup-screen, #forgot-screen) .auth-responsive-intro .desc { color: #d4ecdd !important; }
@media (max-width: 760px) {
  body:has(:is(#signup-screen, #forgot-screen).active) { padding: 0; align-items: flex-start; }
  .phone:has(> :is(#signup-screen, #forgot-screen).active) { width: 100%; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  :is(#signup-screen, #forgot-screen) .auth-responsive-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  :is(#signup-screen, #forgot-screen) .auth-responsive-intro { padding: calc(88px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left)); border-radius: 0 0 28px 28px; }
  :is(#signup-screen, #forgot-screen) .auth-responsive-intro .back-btn { top: calc(16px + env(safe-area-inset-top)); left: max(24px, env(safe-area-inset-left)); }
  :is(#signup-screen, #forgot-screen) .auth-responsive-intro h1 { max-width: none; font-size: clamp(32px, 6vw, 42px); margin-bottom: 12px; letter-spacing: -1px; }
  :is(#signup-screen, #forgot-screen) .auth-responsive-intro .desc { max-width: 520px; font-size: 14px; line-height: 1.7; }
  :is(#signup-screen, #forgot-screen) .auth-responsive-form { max-width: 600px; padding: 30px max(24px, env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
}
@media (max-width: 400px) {
  #signup-screen .social-row { grid-template-columns: minmax(0, 1fr); }
  #forgot-screen .method-row { gap: 10px; }
  #forgot-screen .method-card { padding: 18px 8px; }
}
