/* Qura — one phone interface at every viewport size.
   Loaded after styles.css; the original file retains component behavior. */
:root {
  --ink: #1c3029;
  --muted: #647168;
  --green: #183f35;
  --lime: #eee6b9;
  --pale: #edf1e9;
  --bg: #f5f5f0;
  --line: #dfe4dc;
  --phone-width: 480px;
  --phone-gutter: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  color-scheme: light;
}
html { width: 100%; max-width: 100%; overflow-x: hidden; overscroll-behavior-x: none; background: #e8ebe4; scroll-padding-bottom: 110px; }
@supports (overflow: clip) { html { overflow-x: clip; } }
body { margin: 0; width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; overscroll-behavior-x: none; background: #e8ebe4; color: var(--ink); }
@supports (overflow: clip) { body { overflow-x: clip; } }
*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:disabled { opacity: .5; }
:is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid #587e67;
  outline-offset: 3px;
}
[hidden], .hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.16; letter-spacing: -1px; font-weight: 700; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.5px; font-weight: 650; }
h3 { font-size: 17px; line-height: 1.4; letter-spacing: -.25px; }
p { line-height: 1.6; }
.eyebrow { font-size: 10px; line-height: 1.5; letter-spacing: 1.5px; font-weight: 700; color: var(--muted); }
.icon { width: 22px; height: 22px; stroke-width: 1.7; flex-shrink: 0; }
.btn { min-height: 50px; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.4; font-weight: 650; box-shadow: none; }
.btn.primary { color: #fff; background: var(--green); border-color: var(--green); }
.btn.soft { color: var(--green); background: var(--pale); border-color: var(--pale); }
.btn.danger { color: #9c392e; background: #fff5f2; border-color: #e9cfc7; }
.icon-btn, .add-small, .close { width: 44px; height: 44px; min-height: 44px; flex-shrink: 0; border-radius: 13px; }
.text-link { min-height: 44px; font-size: 13px; line-height: 1.4; color: var(--green); font-weight: 650; gap: 5px; }
.badge { min-height: 27px; font-size: 11px; line-height: 1.3; padding: 6px 9px; border-radius: 8px; }
.badge .icon { width: 14px; height: 14px; }
.hint, .footer-note { font-size: 12px; line-height: 1.65; color: var(--muted); }
.footer-note { margin: 24px 0 0; text-align: left; }
.notice { border: 1px solid #ead9b9; background: #fbf4e5; color: #715322; font-size: 13px; border-radius: 14px; }

/* The canvas never turns into a desktop dashboard. */
#app, #splash { max-width: var(--phone-width); margin-inline: auto; }
#app { width: 100%; min-width: 0; overflow-x: clip; min-height: 100dvh; background: var(--bg); }
.shell { width: 100%; max-width: var(--phone-width); margin: 0 auto; }
.rail, .context-label, .desktop-only, .desktop-add { display: none; }
.workspace { display: flex; flex-direction: column; min-height: 100dvh; margin: 0; width: 100%; min-width: 0; }
.shell > *, .workspace > *, .main > *, .dialog-body > * { min-width: 0; }
img, video { max-width: 100%; }
.topbar {
  height: calc(100px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--phone-gutter) 0;
  display: flex; flex-shrink: 0; align-items: center; justify-content: space-between;
  background: var(--bg);
}
.topbar .brand { display: flex; align-items: flex-start; gap: 12px; min-width: 0; font-size: clamp(40px, 11.3vw, 44px); line-height: 1; font-weight: 800; letter-spacing: -2px; }
.topbar .brand img { width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; }
.brand-copy { display: block; min-width: 0; }
.brand-name { display: block; font: inherit; }
.brand-tagline { display: block; margin-top: 5px; font-size: 11px; line-height: 1.4; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.avatar { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; }
.avatar .icon { width: 19px; height: 19px; }
.main { display: block; flex: 1 0 auto; width: 100%; min-width: 0; max-width: 100%; margin: 0; padding: 12px var(--phone-gutter) 0; animation: mobile-arrive .18s ease-out; }
.app-credit { display: flex; flex-shrink: 0; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 5px; margin: 30px var(--phone-gutter) 0; padding: 22px 0 calc(108px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.app-credit strong { font-weight: 650; color: var(--green); white-space: nowrap; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.page-head > div:first-child { flex: 1 1 100%; min-width: 0; }
.page-head h1 { font-size: 30px; line-height: 1.16; letter-spacing: -1px; }
.page-head .eyebrow { margin-bottom: 9px; font-size: 10px; letter-spacing: 1.5px; }
.page-head p { max-width: none; font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.page-head .date-control { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 1px solid var(--line); padding: 0 12px; border-radius: 12px; background: #fff; }
.date-control input { width: 142px; min-width: 0; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font-size: 16px; min-height: 42px; }
.date-control .icon { width: 18px; height: 18px; }
.home-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.home-head .date-control { position: relative; inset: auto; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 13px; }
.home-head .date-control input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.home-head .date-control:focus-within { outline: 3px solid #587e67; outline-offset: 3px; }
.head-actions { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; }
.head-actions .btn { min-height: 44px; }
.bottom-nav {
  position: fixed; z-index: 30; left: 50%; right: auto; bottom: 0; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, var(--phone-width)); min-height: 82px;
  padding: 8px max(8px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  border-top: 1px solid #dce2d8; background: #fffffff5; backdrop-filter: blur(18px);
  box-shadow: 0 -6px 25px #183f3505;
}
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 60px; border-radius: 14px; padding: 3px 0; font-size: 10px; font-weight: 600; color: #647168; }
.bottom-nav button > .icon { width: 22px; height: 22px; }
.bottom-nav button.active { color: var(--green); background: #edf1e9; }
.bottom-nav button.active > .icon { stroke-width: 2; }
.bottom-nav button.scan-nav { transform: none; margin: 0; position: static; color: var(--green); gap: 3px; }
.scan-bubble { display: grid; place-items: center; width: 46px; height: 38px; padding: 0; border: 0; border-radius: 13px; color: #fff; background: var(--green); box-shadow: none; box-sizing: border-box; }
.scan-bubble .icon { width: 23px; height: 23px; }
.offline-banner { font-size: 13px; text-align: left; padding: 14px var(--phone-gutter); line-height: 1.5; }

/* Home: a daily overview, photographic actions, recent products and meal planning. */
.home-page { width: 100%; min-width: 0; }
.home-head { margin-bottom: 13px; }
.home-overview { padding: 15px; border: 1px solid #dfe4d8; border-radius: 22px; background: #fff; box-shadow: 0 5px 20px #183f3504; }
.home-overview-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.home-overview-heading h2 { font-size: 17px; letter-spacing: -.45px; }
.home-day-state { padding: 4px 7px; border-radius: 6px; background: #eff3e9; font-size: 9px; font-weight: 600; color: #617151; }
.home-calorie-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; align-items: stretch; }
.home-calorie-grid > *, .home-activity { display: flex; width: 100%; min-width: 0; }
.home-intake, .home-movement { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: stretch; padding: 13px 12px; border-radius: 15px; border: 0; text-align: left; }
.home-intake { color: #fff; background: #224b3c; }
.home-movement { color: #5b4739; background: #f1e9dc; }
.home-metric-label { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 550; }
.home-metric-label .icon { width: 15px; height: 15px; }
.home-intake .home-metric-label { color: #d5e1d5; }
.home-movement .home-metric-label { color: #78614e; }
.day-energy, .home-burned { display: flex; align-items: flex-start; flex-direction: column; gap: 3px; margin: 12px 0 13px; font-variant-numeric: tabular-nums; }
.day-energy strong, .home-burned strong { display: block; min-width: 0; max-width: 100%; font-size: clamp(26px, 7.4vw, 33px); line-height: 1.1; font-weight: 700; letter-spacing: -1px; overflow-wrap: anywhere; }
.day-energy small, .home-burned small { font-size: 10px; line-height: 1.45; font-weight: 400; }
.day-energy small { color: #d5e1d5; }
.home-burned small { color: #78614e; }
.home-metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: auto; font-size: 9px; line-height: 1.5; font-weight: 500; }
.home-metric-foot .icon { width: 14px; height: 14px; }
.home-activity .activity-mini { display: flex; gap: 5px; margin: auto 0 0; padding: 0; }
.home-activity .activity-mini > span { display: inline; margin: 0; font-size: 9px; color: inherit; }
.home-activity .activity-mini b { display: inline; font-size: 10px; letter-spacing: 0; font-weight: 650; }
.home-movement-source { display: block; margin-top: 4px; font-size: 8px; line-height: 1.45; color: #8a735d; }
.home-energy-reference { margin-top: 13px; }
.home-energy-reference > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 10px; line-height: 1.5; color: #61705e; }
.home-energy-reference b { flex-shrink: 0; font-size: 11px; color: #36513d; }
.home-energy-track { height: 4px; overflow: hidden; background: #edf1e8; border-radius: 3px; margin-top: 7px; }
.home-energy-track i { display: block; height: 100%; border-radius: inherit; background: #74966b; }
.home-energy-reference > p { margin-top: 8px; font-size: 9px; line-height: 1.55; color: #74806f; }
.home-discover, .home-recents, .home-planning, .home-nutrition { margin-top: 28px; }
.home-section-heading { margin-bottom: 13px; }
.home-section-heading .eyebrow { display: block; margin-bottom: 6px; font-size: 8px; letter-spacing: 1.5px; color: #88907a; }
.home-section-heading h1, .home-section-heading h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.6px; font-weight: 650; }
.home-section-heading p { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.home-heading-inline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.home-heading-inline > div { min-width: 0; }
.home-heading-inline .text-link { flex-shrink: 0; font-size: 11px; }
.home-heading-inline .text-link .icon { width: 14px; height: 14px; }
.home-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-photo-action { display: grid; grid-template-rows: auto minmax(70px, 1fr); min-width: 0; width: 100%; aspect-ratio: .9; padding: 0; overflow: hidden; border: 1px solid #e1e3d8; border-radius: 18px; background: #fff; color: var(--ink); text-align: left; }
.home-photo-copy { display: block; padding: 14px 13px 11px; }
.home-photo-copy strong { display: block; font-size: clamp(15px, 4.2vw, 18px); font-weight: 650; line-height: 1.25; letter-spacing: -.4px; overflow-wrap: anywhere; }
.home-photo-copy small { display: block; margin-top: 5px; font-size: 10px; line-height: 1.45; color: #627066; }
.home-photo-media { position: relative; display: block; min-width: 0; min-height: 0; width: 100%; overflow: hidden; background: #f6f5f0; }
.home-photo-media > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.home-photo-open { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #ffffffd9; border-radius: 50%; background: #fffffff2; color: #36503c; box-shadow: 0 2px 8px #263d2910; }
.home-photo-open .icon { width: 18px; height: 18px; }
.home-photo-scan { background: #264b3a; border-color: #264b3a; color: #fff; }
.home-photo-scan .home-photo-copy small { color: #d5dfcb; }
.home-photo-search { background: #ecebdc; border-color: #e0e2d0; }
.home-planning .home-photo-action { aspect-ratio: .82; }
.home-photo-recipe .home-photo-copy { background: #f3eddf; }
.home-photo-menu .home-photo-copy { background: #edf1e4; }
.home-photo-action:active, .home-recent-row:active { opacity: .85; }
.home-recent-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.home-recent-row { display: grid; grid-template-columns: 53px minmax(0, 1fr) 40px; gap: 11px; align-items: center; width: 100%; min-width: 0; padding: 13px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.home-recent-row + .home-recent-row { border-top: 1px solid #edf0e8; }
.home-recent-row .food-art { width: 53px; height: 62px; border-radius: 11px; background: #f4f4ed; }
.home-recent-copy { display: block; min-width: 0; }
.home-recent-copy > small { display: block; font-size: 8px; line-height: 1.45; color: #839079; margin-bottom: 4px; }
.home-recent-copy > strong { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; letter-spacing: -.15px; overflow-wrap: anywhere; }
.home-recent-copy > span { display: block; font-size: 10px; line-height: 1.45; color: #7b8576; margin-top: 4px; overflow-wrap: anywhere; }
.home-recent-row .food-score-badge { position: static; transform: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 40px; min-width: 0; min-height: 42px; padding: 5px; border-radius: 10px; box-shadow: none; }
.home-recent-row .food-score-badge b { font-size: 15px; }
.home-recent-row .food-score-badge small { font-size: 8px; }
.home-recent-empty { display: flex; align-items: center; gap: 13px; padding: 19px 15px; border: 1px dashed #d9dfcf; border-radius: 17px; background: #f0f3e9; }
.home-recent-empty > span { display: grid; place-items: center; width: 43px; height: 43px; flex-shrink: 0; border-radius: 13px; background: #e4eadc; color: #6f8264; }
.home-recent-empty h3 { font-size: 13px; line-height: 1.5; }
.home-recent-empty p { margin-top: 4px; font-size: 11px; line-height: 1.6; color: #76846b; }
.home-history-link { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 44px; padding: 11px 2px 0; border: 0; background: transparent; text-align: left; font-size: 10px; font-weight: 550; color: #6b7d60; }
.home-history-link .icon { width: 14px; height: 14px; }
.home-history-link .icon:last-child { margin-left: auto; }
.home-utilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.home-utilities .home-utility { display: grid; grid-template-columns: 17px minmax(0, 1fr) 12px; gap: 7px; align-items: center; min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #52694d; text-align: left; }
.home-utilities .home-utility > .icon { width: 17px; height: 17px; }
.home-utilities .home-utility > .icon:last-child { width: 12px; height: 12px; }
.home-utilities strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.4; }
.home-utilities small { display: block; margin-top: 3px; font-size: 9px; line-height: 1.5; color: #85917b; }
.home-start-note { display: flex; gap: 12px; align-items: flex-start; padding: 17px; margin-top: 23px; border: 1px solid #e3e6da; border-radius: 16px; background: #eeefdf; }
.home-start-note > span { display: grid; place-items: center; width: 25px; flex-shrink: 0; color: #758365; }
.home-start-note h2 { font-size: 14px; line-height: 1.45; letter-spacing: -.2px; }
.home-start-note p { margin-top: 5px; font-size: 11px; line-height: 1.65; color: #76806b; }
.daily-missing, .daily-index-note { margin: 12px 0; font-size: 12px; }
.home-personal { margin: 0 0 16px; }
.home-personal > .analysis-warning { margin: 0 0 10px; }
.home-personal .analysis-warning > small { display: block; font-size: 10px; line-height: 1.6; margin-bottom: 6px; }
.home-reading { margin-top: 20px; border: 1px solid var(--line); border-radius: 15px; background: #edf1e9; }
.home-reading > summary { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px; min-height: 64px; list-style: none; cursor: pointer; }
.home-reading > summary::-webkit-details-marker { display: none; }
.home-reading > summary b { display: block; font-size: 12px; font-weight: 650; }
.home-reading > summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.home-reading-toggle { font-size: 19px; font-weight: 400; color: #5c705c; }
.home-reading > div { padding: 0 14px 14px; }
.home-portion-help { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 66px; margin-top: 18px; padding: 14px 0; border: 0; background: transparent; color: #536a57; text-align: left; }
.home-portion-help > span { flex: 1; min-width: 0; }
.home-portion-help strong { display: block; font-size: 12px; font-weight: 600; }
.home-portion-help small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.home-portion-help > .icon { width: 17px; height: 17px; }
.surface { padding: 20px; border: 1px solid var(--line); border-radius: 21px; background: #fff; box-shadow: none; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 16px; }
.section-title h2 { font-size: 18px; line-height: 1.35; letter-spacing: -.4px; }
.section-title > span { flex-shrink: 0; font-size: 12px; color: var(--muted); }
.section-title small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.section-title .text-link { font-size: 12px; }
.recent-surface { padding: 10px 17px 4px; }
.recent-surface .section-title { margin-bottom: 0; }
.food-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 82px; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.food-row:last-child { border-bottom: 0; }
.food-art, .entry-icon { width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0; background: #f0f2eb; overflow: hidden; }
.food-info { min-width: 0; flex: 1; }
.food-info b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.food-info small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.food-row .icon-btn { border: 0; background: #f2f4ed; border-radius: 12px; width: 38px; height: 44px; }
.food-row .icon-btn .icon { width: 18px; height: 18px; }
.discovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.discovery-card { min-width: 0; overflow: hidden; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 19px; padding: 0; }
.discovery-photo { display: block; height: 125px; background: #e9ede4; }
.discovery-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.discovery-copy { display: grid; grid-template-columns: 1fr 18px; gap: 5px; padding: 15px 13px; }
.discovery-copy strong { font-size: 16px; line-height: 1.3; font-weight: 650; }
.discovery-copy small { grid-column: 1 / -1; grid-row: 2; font-size: 11px; color: var(--muted); line-height: 1.5; }
.discovery-copy .icon { width: 17px; height: 17px; }
.profile-nudge, .portion-help { display: flex; align-items: center; gap: 12px; width: 100%; padding: 17px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; text-align: left; background: transparent; }
.profile-nudge > span, .portion-help > span { flex: 1; min-width: 0; }
.profile-nudge strong, .portion-help strong { display: block; font-size: 13px; line-height: 1.5; }
.profile-nudge small, .portion-help small { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.profile-nudge > .icon, .portion-help > .icon { width: 20px; height: 20px; color: var(--green); }
.profile-nudge + .portion-help { margin-top: -24px; }

/* Search and collections share one set of controls. */
.browse-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border: 1px solid var(--line); border-radius: 15px; background: #e9ede5; margin: 0 0 22px; gap: 3px; }
.browse-tabs button { min-height: 43px; border-radius: 11px; font-size: 13px; font-weight: 600; color: #57675a; }
.browse-tabs button.active { color: var(--green); background: #fff; box-shadow: 0 1px 4px #183f3510; }
.searchbox { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; border: 1px solid #d2dbcf; border-radius: 15px; background: #fff; padding: 0 12px 0 16px; margin: 0 0 14px; }
.searchbox:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px #183f350c; }
.searchbox input { width: 100%; min-width: 0; height: 52px; padding: 0; font-size: 16px; border: 0; background: transparent; color: var(--ink); }
.searchbox input:focus-visible { outline: 0; }
.searchbox input::placeholder { color: #6d786d; opacity: 1; }
.searchbox > .icon { width: 20px; height: 20px; color: var(--muted); }
.searchbox .icon-btn { width: 36px; min-width: 36px; height: 44px; border: 0; background: transparent; }
.filters { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 0 calc(-1 * var(--phone-gutter)) 20px; padding: 2px var(--phone-gutter) 7px; scrollbar-width: none; scroll-padding-inline: var(--phone-gutter); }
.filters::-webkit-scrollbar { display: none; }
.filter { flex-shrink: 0; min-height: 42px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; font-weight: 550; color: #526151; background: #fff; }
.filter.active { color: #fff; border-color: var(--green); background: var(--green); }
.online-call { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: #edf1e8; margin: 0 0 24px; }
.online-call strong { font-size: 14px; }
.online-call small { font-size: 12px; margin-top: 5px; max-width: none; }
.online-call .btn { min-height: 44px; font-size: 13px; }
.food-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.food-card { border-radius: 18px; border-color: var(--line); }
.food-card > .food-open { display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 14px; padding: 14px; min-height: 142px; }
.food-card .art { grid-column: 1; grid-row: 1 / 5; width: 84px; height: 100%; min-height: 112px; border-radius: 12px; margin: 0; font-size: 37px; background: #edf0e8; overflow: hidden; }
.food-card .eyebrow { grid-column: 2; font-size: 9px; line-height: 1.4; letter-spacing: .7px; padding-right: 30px; margin: 0 0 5px; }
.food-card h3 { grid-column: 2; min-height: 0; font-size: 15px; line-height: 1.35; letter-spacing: -.2px; padding-right: 26px; overflow-wrap: anywhere; }
.food-card p { grid-column: 2; font-size: 11px; line-height: 1.4; margin-top: 6px; white-space: normal; overflow: visible; }
.food-card footer { grid-column: 2; font-size: 11px; line-height: 1.4; margin-top: 12px; gap: 8px; align-self: end; }
.food-card footer .icon { width: 18px; height: 18px; }
.food-card .favorite { top: 6px; right: 5px; width: 44px; height: 44px; background: transparent; color: #66745f; }
.food-card .favorite .icon { width: 19px; height: 19px; }
.food-card .favorite.selected { color: var(--green); }
.food-card .food-score-badge { left: 5px; bottom: 5px; top: auto; right: auto; padding: 5px 6px; border-radius: 8px; }
.food-score-badge b { font-variant-numeric: tabular-nums; }
.empty { padding: 28px 18px; border-radius: 20px; }
.empty-art { width: 50px; height: 50px; border-radius: 16px; margin-bottom: 15px; background: var(--pale); }
.empty h3 { font-size: 18px; }
.empty p { font-size: 14px; margin: 9px 0 18px; color: var(--muted); }

/* Diary: calendar, full-day totals and an independently filtered meal list. */
.diary-page { display: grid; gap: 20px; min-width: 0; }
.diary-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.diary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.diary-heading > div { min-width: 0; }
.diary-heading .eyebrow { margin-bottom: 8px; }
.diary-heading h1 { font-size: 32px; line-height: 1.1; letter-spacing: -1px; }
.diary-heading p { font-size: 13px; color: var(--muted); margin-top: 9px; text-transform: capitalize; line-height: 1.5; }
.diary-day-state { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: #596653; font-size: 10px; line-height: 1.4; font-weight: 600; background: #fff; flex-shrink: 0; }
.diary-day-state .icon { width: 14px; height: 14px; }
.diary-day-state.is-complete { background: #e9f0e4; border-color: #d6e3ce; color: var(--green); }
.diary-calendar { padding: 7px 10px 0; border: 1px solid var(--line); border-radius: 20px; background: #fff; min-width: 0; }
.diary-calendar-toolbar { display: flex; justify-content: space-between; align-items: center; padding-left: 5px; gap: 8px; min-height: 48px; }
.diary-calendar-toolbar > span { font-size: 12px; font-weight: 600; line-height: 1.5; }
.diary-calendar-toolbar > div { display: flex; flex-shrink: 0; gap: 0; }
.diary-calendar-toolbar .icon-btn { border: 0; width: 44px; height: 44px; background: transparent; }
.diary-calendar-toolbar .icon { width: 17px; height: 17px; }
.diary-week { display: grid; grid-template-columns: repeat(7, minmax(36px, 1fr)); gap: 3px; padding: 7px 0 11px; overflow-x: auto; scrollbar-width: thin; }
.diary-week button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 71px; gap: 6px; padding: 9px 0 6px; border-radius: 12px; color: var(--muted); }
.diary-week button > span { font-size: 10px; line-height: 1.2; text-transform: uppercase; font-weight: 550; }
.diary-week button > b { font-size: 17px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.diary-week button > i { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.diary-week button > i.has-entries { background: #678057; }
.diary-week button[aria-current="date"]:not(.selected) { background: #f0f3ec; color: var(--green); box-shadow: inset 0 0 0 1px #d3ddcc; }
.diary-week button.selected { color: #fff; background: var(--green); }
.diary-week button.selected > span { color: #d6e3d4; }
.diary-week button.selected > i.has-entries { background: #efe5b0; }
.diary-calendar-footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 5px; }
.diary-calendar-footer .text-link { font-size: 11px; }
.diary-calendar-footer button:disabled { opacity: 1; color: var(--muted); font-weight: 400; }
.diary-date-picker { position: relative; display: flex; align-items: center; gap: 7px; min-height: 46px; font-size: 12px; font-weight: 600; cursor: pointer; }
.diary-date-picker .icon { width: 17px; height: 17px; }
.diary-date-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; border: 0; cursor: pointer; }
.diary-date-picker:focus-within { outline: 3px solid #587e67; outline-offset: 1px; border-radius: 6px; }
.diary-overview { border: 1px solid #dae2d3; border-radius: 22px; background: #fafbf6; padding: 19px 20px 0; min-width: 0; }
.diary-energy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 17px; }
.diary-energy { min-width: 0; }
.diary-energy > span { font-size: 12px; color: var(--muted); }
.diary-energy > div { display: flex; gap: 7px; align-items: baseline; margin: 6px 0 0; }
.diary-energy strong { font-size: clamp(35px, 10vw, 47px); font-weight: 600; letter-spacing: -1.7px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.diary-energy > div > span { font-size: 14px; color: #66775c; }
.diary-planned-energy { display: grid; gap: 8px; padding-left: 14px; border-left: 1px solid #dce2d4; max-width: 45%; }
.diary-planned-energy > span { font-size: 11px; color: #7b602e; }
.diary-planned-energy > b { font-size: 22px; letter-spacing: -.6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.diary-planned-energy small { font-size: 10px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.diary-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #dce2d4; padding-top: 17px; gap: 12px; }
.diary-macros > div { display: grid; gap: 7px; }
.diary-macros > div > span { font-size: 11px; color: var(--muted); }
.diary-macros b { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.diary-macros b small { font-size: 11px; font-weight: 400; color: var(--muted); }
.diary-projection, .diary-summary-caption { margin: 16px 0 17px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.diary-projection b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.diary-data-note { margin-bottom: 16px; padding: 11px 12px; border-radius: 10px; background: #f5ecda; color: #755626; font-size: 12px; line-height: 1.6; }
.diary-nutrients { margin: 0 -20px; padding: 0 20px; border-top: 1px solid #dce2d4; }
.diary-nutrients summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 600; }
.diary-nutrients summary::-webkit-details-marker { display: none; }
.diary-nutrients summary .icon { width: 16px; height: 16px; }
.diary-nutrients[open] summary .icon { transform: rotate(90deg); }
.diary-table-wrap { overflow-x: auto; }
.diary-nutrients table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.diary-nutrients caption { font-size: 11px; text-align: left; line-height: 1.5; padding: 3px 0 13px; color: var(--muted); }
.diary-nutrients th, .diary-nutrients td { padding: 11px 0 11px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.diary-nutrients th:first-child { text-align: left; padding-left: 0; font-weight: 500; white-space: normal; }
.diary-nutrients thead th { font-size: 10px; font-weight: 500; color: var(--muted); }
.diary-nutrients tbody tr:last-child > * { border-bottom: 0; }
.diary-nutrients > p { font-size: 12px; line-height: 1.65; color: var(--muted); padding: 12px 0 16px; }
.diary-nutrients > .text-link { font-size: 12px; margin: 3px 0 10px; }
.diary-primary-actions { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; }
.diary-primary-actions .btn { min-height: 53px; padding-inline: 9px; gap: 7px; font-size: 12px; border-radius: 14px; }
.diary-primary-actions .icon { width: 19px; height: 19px; }
.diary-scan { background: #ede6c0; border-color: #e2d9ad; color: #334e34; }
.diary-meals { min-width: 0; }
.diary-meals-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.diary-meals-heading h2 { font-size: 21px; letter-spacing: -.6px; }
.diary-meals-heading > span { font-size: 12px; color: var(--muted); }
.diary-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 4px; background: #e8ede3; border: 1px solid #dfe5d9; border-radius: 14px; }
.diary-filters button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 3px; min-height: 44px; border-radius: 10px; font-size: 11px; font-weight: 600; color: #5b6b56; }
.diary-filters button > span { font-size: 10px; font-weight: 400; opacity: .8; }
.diary-filters button.active { background: #fff; color: var(--green); box-shadow: 0 1px 5px #183f350c; }
.diary-list-hint { margin: 12px 1px 17px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.diary-meal-list { display: grid; gap: 14px; }
.diary-meal { background: #fff; border: 1px solid var(--line); border-radius: 20px; min-width: 0; }
.diary-meal-head { display: flex; align-items: center; gap: 10px; padding: 17px 14px; }
.diary-meal-symbol { display: grid; place-items: center; width: 36px; height: 40px; flex-shrink: 0; border-radius: 11px; color: #4d6749; background: #f0f3e9; }
.diary-meal-symbol .icon { width: 20px; height: 20px; }
.diary-meal-head > div { flex: 1; min-width: 0; }
.diary-meal h3 { font-size: 16px; letter-spacing: -.2px; font-weight: 650; }
.diary-meal-head p { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.diary-meal-add { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 7px 9px; background: #eff3e9; border-radius: 11px; color: var(--green); flex-shrink: 0; font-size: 11px; font-weight: 600; }
.diary-meal-add .icon { width: 16px; height: 16px; }
.diary-meal.has-items .diary-meal-add { background: transparent; }
.diary-entry { position: relative; border-top: 1px solid var(--line); padding: 13px 12px; }
.diary-entry:last-child { border-radius: 0 0 20px 20px; }
.diary-entry.is-planned { background: #fcfbf5; }
.diary-entry-line { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 4px; align-items: start; }
.diary-entry-main { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 11px; width: 100%; min-height: 70px; padding: 2px 0; text-align: left; border-radius: 10px; }
.diary-entry-photo { display: grid; place-items: center; width: 46px; height: 56px; border-radius: 12px; background: #f0f3e9; font-size: 24px; overflow: hidden; }
.diary-entry-copy { min-width: 0; }
.diary-entry-copy b { display: block; font-size: 14px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.diary-entry-copy > small { display: block; margin-top: 5px; font-size: 11px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.diary-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.diary-entry-meta > strong { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.diary-entry-state { font-size: 10px; color: #63755c; }
.is-planned .diary-entry-state { color: #856029; background: #f6edda; padding: 3px 6px; border-radius: 5px; }
.diary-entry-options { position: relative; }
.diary-entry-options > summary { width: 44px; height: 44px; display: grid; place-items: center; list-style: none; cursor: pointer; border-radius: 12px; color: #6e7b66; }
.diary-entry-options > summary::-webkit-details-marker { display: none; }
.diary-entry-options > summary .icon { width: 20px; height: 20px; }
.diary-entry-options[open] { z-index: 5; }
.diary-entry-options[open] > summary { background: #edf1e8; color: var(--green); }
.diary-entry-options > div { position: absolute; top: 47px; right: 0; width: 194px; padding: 5px; border: 1px solid #dce3d5; border-radius: 14px; box-shadow: 0 10px 30px #1d39221a; background: #fff; }
.diary-entry-options button { display: flex; align-items: center; gap: 9px; min-height: 48px; width: 100%; padding: 10px; border-radius: 9px; font-size: 12px; text-align: left; }
.diary-entry-options button .icon { width: 17px; height: 17px; }
.diary-entry-options .diary-remove { color: #9b3e32; }
.diary-entry-confirm { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e4ddca; }
.diary-entry-confirm > span { max-width: 120px; color: #7a6c50; font-size: 10px; line-height: 1.5; }
.diary-entry-confirm button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 11px; border-radius: 10px; background: #eaf0e3; color: var(--green); font-size: 11px; font-weight: 650; flex-shrink: 0; }
.diary-entry-confirm .icon { width: 16px; height: 16px; }
.diary-entry-unavailable { font-size: 12px; color: var(--muted); margin-top: 8px; }
.diary-filter-empty { padding: 27px 20px 20px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.diary-filter-empty > .icon { width: 28px; height: 28px; margin-bottom: 13px; color: #6b8260; }
.diary-filter-empty h3 { font-size: 17px; }
.diary-filter-empty p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 8px 0 12px; }
.diary-completion { border: 1px solid var(--line); padding: 18px; background: #edf1e8; border-radius: 19px; }
.diary-completion > label { position: relative; display: flex; gap: 14px; align-items: center; min-height: 50px; cursor: pointer; }
.diary-completion label > span:first-child { flex: 1; min-width: 0; }
.diary-completion label b { font-size: 13px; line-height: 1.5; display: block; font-weight: 600; }
.diary-completion label small { display: block; font-size: 11px; line-height: 1.6; color: var(--muted); margin-top: 5px; }
.diary-completion input { position: absolute; right: 0; width: 46px; height: 44px; opacity: 0; margin: 0; }
.diary-switch { position: relative; flex: 0 0 46px; width: 46px; height: 28px; border-radius: 18px; background: #cbd4c4; transition: background .15s; pointer-events: none; }
.diary-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #13271920; transition: transform .15s; }
.diary-completion input:checked + .diary-switch { background: var(--green); }
.diary-completion input:checked + .diary-switch::after { transform: translateX(18px); }
.diary-completion input:focus-visible + .diary-switch { outline: 3px solid #587e67; outline-offset: 3px; }
.diary-completion-detail { border-top: 1px solid #d5decc; margin-top: 16px; padding-top: 16px; }
.diary-completion-detail > p, .diary-completion-note { font-size: 12px; line-height: 1.65; color: #5e6d54; }
.diary-completion-note { margin-top: 13px; }
.diary-final-index { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.diary-final-index > b { font-size: 29px; line-height: 1.2; letter-spacing: -1px; font-weight: 600; }
.diary-final-index > b small { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 3px; }
.diary-final-index > span { font-size: 12px; line-height: 1.5; font-weight: 550; }
.diary-final-index > span > small { font-size: 11px; font-weight: 400; color: var(--muted); }
@media (max-width: 359px) {
  .diary-heading { flex-wrap: wrap; }
  .diary-heading h1 { font-size: 30px; }
  .diary-calendar { padding-inline: 7px; }
  .diary-week { gap: 1px; }
  .diary-overview { padding-inline: 16px; }
  .diary-energy-row { flex-wrap: wrap; row-gap: 16px; }
  .diary-planned-energy { max-width: 100%; }
  .diary-nutrients { margin-inline: -16px; padding-inline: 16px; }
  .diary-primary-actions { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .diary-meal-head { padding-inline: 12px; gap: 8px; }
  .diary-meal-add { min-width: 44px; padding: 8px; }
  .diary-meal-add > span { display: none; }
  .diary-entry-line { grid-template-columns: minmax(0, 1fr) 40px; }
  .diary-entry-main { grid-template-columns: 40px minmax(0, 1fr); gap: 9px; }
  .diary-entry-photo { width: 40px; height: 50px; }
  .diary-entry-options > summary { width: 40px; }
  .diary-entry-confirm { flex-wrap: wrap; gap: 6px; }
  .diary-entry-confirm > span { max-width: none; }
  .diary-entry-confirm button { width: 100%; }
}


/* Recipe lists and menu planning retain the same mobile rhythm. */
.recipe-guide { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #fff; margin: 0 0 18px; }
.recipe-guide summary { display: flex; align-items: center; gap: 9px; min-height: 50px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; }
.recipe-guide summary::-webkit-details-marker { display: none; }
.recipe-guide summary .icon { width: 18px; height: 18px; }
.recipe-guide summary .icon:last-child { margin-left: auto; }
.recipe-guide[open] summary .icon:last-child { transform: rotate(90deg); }
.recipe-guide p { padding: 0 0 16px; font-size: 13px; color: var(--muted); }
.recipe-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.recipe-card { display: grid; grid-template-columns: 82px minmax(0, 1fr) 14px; gap: 13px; padding: 13px; border-radius: 18px; transform: none; }
.recipe-card:hover { transform: none; }
.recipe-art { width: 82px; height: 104px; border-radius: 12px; font-size: 34px; overflow: hidden; background: #edf0e8; }
.recipe-card-copy { gap: 6px; }
.recipe-card-copy > small { font-size: 10px; letter-spacing: .2px; }
.recipe-card-copy > strong { font-size: 15px; line-height: 1.35; font-weight: 650; }
.recipe-card-copy > span { font-size: 11px; line-height: 1.5; }
.recipe-card-copy > b { font-size: 13px; line-height: 1.5; }
.recipe-card-copy > b > small { font-size: 10px; }
.recipe-card > .icon { width: 14px; height: 18px; }
.recipe-method { font-size: 13px; }
.recipe-method summary { min-height: 44px; line-height: 1.5; }
.recipe-method p, .recipe-method a { font-size: 12px; line-height: 1.7; }
.menu-jump { width: 100%; border: 1px solid var(--line); background: #fff; padding: 13px 15px; border-radius: 15px; gap: 10px; min-height: 58px; margin-bottom: 20px; }
.menu-jump > span { font-size: 14px; font-weight: 600; }
.menu-jump b { font-size: 12px; padding: 6px 10px; background: var(--pale); border-radius: 8px; }
.menu-goals { display: flex; overflow-x: auto; gap: 9px; margin: 0 calc(-1 * var(--phone-gutter)) 20px; padding: 2px var(--phone-gutter) 8px; scrollbar-width: none; }
.menu-goal { flex: 0 0 120px; display: grid; gap: 7px; padding: 14px 12px; min-height: 112px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; color: var(--ink); }
.menu-goal .icon { width: 21px; height: 21px; }
.menu-goal b { font-size: 12px; line-height: 1.4; }
.menu-goal small { font-size: 10px; line-height: 1.4; color: var(--muted); }
.menu-goal.active { background: var(--green); color: #fff; border-color: var(--green); }
.menu-goal.active small { color: #d7e3d6; }
.menu-filter-bar { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.menu-filter-bar .field { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; }
.menu-method-note { font-size: 12px; line-height: 1.65; margin: 18px 0 24px; }
.menu-ideas-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.menu-idea-card { padding: 18px; border: 1px solid var(--line); border-radius: 21px; background: #fff; overflow: hidden; }
.menu-idea-top { display: block; position: relative; height: 170px; margin: -18px -18px 17px; }
.menu-idea-top > span:first-child, .menu-idea-top .catalog-photo { display: flex; width: 100%; height: 100%; border-radius: 0; background: #edf0e8; font-size: 54px; }
.menu-idea-top > span:last-child { position: absolute; top: 13px; right: 13px; padding: 7px 10px; background: #fffffff0; border-radius: 9px; font-size: 11px; color: var(--ink); }
.menu-idea-card h3 { font-size: 19px; line-height: 1.35; }
.menu-idea-card > p { margin-top: 7px; font-size: 12px; }
.menu-card-nutrients { gap: 10px; padding: 16px 0; margin-top: 16px; border-top: 1px solid var(--line); }
.menu-card-nutrients > b { font-size: 23px; }
.menu-card-nutrients > b small, .menu-card-nutrients > span { font-size: 11px; }
.menu-card-nutrients > span b { font-size: 13px; }
.menu-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu-card-actions .btn { font-size: 13px; min-height: 48px; border-radius: 12px; }
.menu-card-warning { font-size: 12px; line-height: 1.55; }
.menu-plan { margin-top: 28px; padding: 20px 16px; border-radius: 21px; border: 1px solid #d4decf; background: #edf1e8; scroll-margin-top: 20px; }
.menu-plan .section-title h2 { font-size: 18px; }
.menu-plan-item { background: #fff; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.menu-plan-item-title { gap: 10px; }
.menu-plan-photo { flex: 0 0 44px; width: 44px; height: 50px; border-radius: 10px; }
.menu-plan-item-title h3 { font-size: 14px; }
.menu-plan-item-title span { font-size: 11px; line-height: 1.5; }
.menu-plan-item-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.menu-plan-item-controls .text-link { grid-column: 1 / -1; font-size: 12px; }
.menu-plan-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.menu-plan-actions .btn { width: 100%; }
.menu-total-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.menu-total-grid small { font-size: 11px; }
.menu-total-grid b { font-size: 16px; }
.menu-empty { padding: 26px 0; }
.menu-empty > .icon { width: 30px; height: 30px; margin-bottom: 10px; }
.menu-empty p { font-size: 13px; }
.menu-day-card { padding: 18px 14px; border-radius: 16px; }
.menu-day-breakdown { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.menu-day-breakdown > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.menu-day-breakdown span { margin: 0; font-size: 11px; }
.menu-day-breakdown b { font-size: 13px; white-space: nowrap; }

/* Bottom sheets, including keyboard-safe form controls. */
dialog { position: fixed; inset: auto 0 0; width: min(100%, var(--phone-width)); max-width: var(--phone-width); max-height: 92dvh; margin: 0 auto; padding: 0; border: 1px solid #e4e7df; border-bottom: 0; border-radius: 25px 25px 0 0; background: #fff; color: var(--ink); overflow-y: auto; overflow-x: hidden; overscroll-behavior-x: none; overscroll-behavior-y: contain; box-shadow: 0 -12px 80px #10241c26; }
dialog::backdrop { background: #10251e80; backdrop-filter: blur(5px); }
dialog[open] { animation: mobile-sheet .2s ease-out; }
.dialog-head { top: 0; padding: 11px var(--phone-gutter); min-height: 66px; background: #fffffff5; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.dialog-head .eyebrow { font-size: 10px; letter-spacing: 1.2px; color: #59695c; }
.close { background: #eff2eb; }
.close .icon { width: 19px; height: 19px; }
.dialog-body { padding: 22px var(--phone-gutter) calc(24px + env(safe-area-inset-bottom, 0px)); }
.dialog-body > h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.7px; margin-bottom: 12px; }
.dialog-body > p { font-size: 14px; line-height: 1.6; }
.dialog-body .hint { font-size: 12px; line-height: 1.65; }
.dialog-body details p { font-size: 12px; line-height: 1.7; color: #58685b; }
.dialog-body summary { min-height: 44px; font-size: 13px; line-height: 1.5; }
.dialog-body table { font-size: 12px; font-variant-numeric: tabular-nums; }
.dialog-body td, .dialog-body th { padding-block: 13px; }
.dialog-body small { line-height: 1.5; }
.field { min-width: 0; font-size: 13px; font-weight: 550; line-height: 1.5; gap: 8px; }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; min-height: 50px; padding: 12px; font-size: 16px; line-height: 1.4; background: #fff; border: 1px solid #d5ddd0; border-radius: 12px; color: var(--ink); }
.field small { font-size: 12px; font-weight: 400; color: var(--muted); }
.form-grid { gap: 17px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.actions { gap: 10px; }
.actions > * { min-width: 0; }
.sticky-actions { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom, 0px)); padding: 14px var(--phone-gutter) calc(16px + env(safe-area-inset-bottom, 0px)); margin: 24px calc(-1 * var(--phone-gutter)) calc(-24px - env(safe-area-inset-bottom, 0px)); background: #fffffff5; backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 4; }
.sticky-actions .actions { margin-top: 0; }
.sticky-actions .btn { font-size: 13px; padding-inline: 10px; min-height: 50px; }
#favorite-food { flex: 0 0 106px; }
.product-title { align-items: center; gap: 15px; margin-bottom: 20px; }
.product-title > div:last-child { min-width: 0; }
.big-emoji { width: 78px; height: 86px; border-radius: 17px; overflow: hidden; background: var(--pale); }
.product-title h2 { font-size: 23px; line-height: 1.2; letter-spacing: -.6px; overflow-wrap: anywhere; }
.product-title small { font-size: 12px; line-height: 1.5; }
.food-analysis-tabs { display: grid; grid-template-columns: 1fr 1.25fr; gap: 4px; padding: 4px; border-radius: 14px; margin: 20px 0; background: #edf0e9; }
.food-analysis-tabs button { min-height: 46px; padding: 9px 6px; font-size: 12px; gap: 7px; border-radius: 10px; }
.food-analysis-tabs .icon { width: 17px; height: 17px; }
.segmented { gap: 3px; padding: 4px; border-radius: 13px; background: #edf0e9; }
.segmented button { min-height: 46px; padding: 8px 5px; font-size: 11px; line-height: 1.4; border-radius: 10px; }
.quantity-box { border-radius: 19px; padding: 18px; margin: 18px 0; background: #f7f8f3; }
.quantity-top { flex-direction: column; align-items: stretch; gap: 13px; }
.quantity-top label { font-size: 14px; }
.quantity-input { justify-content: space-between; gap: 12px; }
.quantity-input input { width: 110px; max-width: 50%; min-height: 58px; font-size: 32px; background: #fff; border: 1px solid #d5ddd0; border-radius: 13px; }
#modal .quantity-input input { font-size: 32px !important; }
.quantity-input select { font-size: 16px; min-height: 50px; max-width: 55%; color: var(--ink); }
.quick-portions { gap: 6px; }
.quick-portions button { min-height: 44px; border-radius: 11px; background: #fff; border-color: var(--line); }
.quick-portions button.selected { background: var(--green); color: #fff; border-color: var(--green); }
.portion-note, .piece-setting { font-size: 12px; }
.piece-setting input { min-height: 44px; font-size: 16px; width: 70px; }
.piece-setting small { font-size: 11px; }
.inline-error { font-size: 13px; line-height: 1.6; color: #a13b30; }
.conditions { gap: 8px; }
.conditions label { min-height: 44px; font-size: 12px; padding: 9px 11px; }
.conditions input { width: 17px; height: 17px; }

/* Score and data availability stay visually distinct from personal amounts. */
.analysis-score-card, .analysis-score-card.amber, .analysis-score-card.red, .analysis-score-card.unknown { padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: #fafbf7; }
.analysis-score-top { gap: 12px; align-items: center; margin-bottom: 16px; }
.analysis-score-top > div:first-child { min-width: 0; }
.analysis-score-top .eyebrow { font-size: 9px; letter-spacing: 1px; }
.analysis-score-top h3 { font-size: 18px; line-height: 1.3; margin: 7px 0; }
.analysis-tag { font-size: 10px; color: var(--muted); }
.product-score { flex: 0 0 80px; width: 80px; height: 88px; border: 0; border-radius: 17px; background: #e3eddf; }
.product-score strong { font-size: 40px; font-weight: 650; letter-spacing: -1.5px; }
.product-score span { font-size: 12px; }
.analysis-score-card > p { font-size: 13px; line-height: 1.65; }
.analysis-score-card .analysis-disclaimer { font-size: 12px !important; color: #5c6b5d; }
.score-components { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.score-components span { display: flex; flex-direction: column; gap: 5px; padding: 12px 8px; font-size: 10px; text-align: center; color: #596956; background: #f0f3ec; border-radius: 12px; }
.score-components b { font-size: 17px; font-weight: 650; letter-spacing: -.5px; color: var(--ink); }
.coverage-strip:not(.score-components) { gap: 6px; }
.coverage-strip:not(.score-components) span { font-size: 10px; padding: 7px 9px; border-radius: 8px; }
.analysis-warning { padding: 16px; border-radius: 13px; margin-block: 14px; }
.analysis-warning b { font-size: 13px; line-height: 1.5; }
.analysis-warning p { font-size: 12px; line-height: 1.7; margin-top: 6px; }
.analysis-source { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; padding-block: 6px; }
.analysis-section-head { margin: 28px 0 14px; gap: 10px; align-items: end; }
.analysis-section-head h3 { font-size: 18px; line-height: 1.3; }
.analysis-section-head .eyebrow { font-size: 9px; letter-spacing: 1.1px; }
.analysis-section-head > small { font-size: 11px; }
.traffic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.traffic-card { border-radius: 14px; }
.traffic-card summary { gap: 8px; }
.traffic-label { font-size: 12px; }
.traffic-card summary > strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.traffic-card summary > strong small { font-size: 12px; }
.traffic-expand, .traffic-card .signal { font-size: 11px; }
.ingredient-row summary, .additive-card summary { gap: 10px; min-height: 58px; }
.ingredient-row summary b, .additive-card summary b { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ingredient-row summary small, .additive-card summary small { font-size: 11px; line-height: 1.5; }
.ingredient-number { width: 25px; height: 25px; font-size: 10px; background: #eef2e9; }
.ingredient-detail { padding: 10px 0 6px; }
.ingredient-detail p, .analysis-context, .analysis-empty { font-size: 12px; line-height: 1.7; }
.additive-code { font-size: 11px; padding: 7px; }
.additive-penalty { font-size: 11px; }
.personal-intro { padding: 18px; border-radius: 17px; }
.personal-intro h3 { font-size: 20px; }
.personal-intro p, .personal-advice p, .weekly-context p { font-size: 12px; line-height: 1.65; }
.personal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.personal-metric { border-radius: 15px; padding: 14px; }
.personal-metric > div:first-child { flex-wrap: wrap; gap: 8px; }
.personal-metric b { font-size: 12px; }
.personal-metric strong { font-size: 19px; }
.personal-metric > span, .personal-metric > small { font-size: 11px; line-height: 1.5; }
.comparison-entry { flex-wrap: wrap; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #f7f8f3; }
.comparison-entry > span { font-size: 12px; }
.comparison-entry .text-link { font-size: 12px; }
.comparison-controls { grid-template-columns: minmax(0, 1fr); gap: 15px; }
.comparison-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.comparison-product { padding: 13px; border-radius: 15px; }
.comparison-product h4 { font-size: 13px; overflow-wrap: anywhere; }
.comparison-product-score { flex-wrap: wrap; }
.comparison-warning p, .comparison-warning a, .comparison-caveat { font-size: 12px; }
.comparison-headline { padding: 18px; border-radius: 18px; }
.comparison-headline h3 { font-size: 21px; }
.comparison-choice { min-height: 64px; padding: 12px; }
.comparison-choice b { font-size: 13px; }
.comparison-choice small { font-size: 11px; }
.camera-stage { height: 250px; margin-block: 22px; border-radius: 20px; background: #17362c; }
.viewfinder { border-color: #eee6b9; border-radius: 13px; height: 108px; }
.viewfinder::after { background: #eee6b9; box-shadow: none; }
#barcode-form .field { margin-top: 10px; }

/* Account, setup and recipe editing use the same surfaces and type scale. */
.profile-panel { max-width: none; }
.profile-hero { text-align: left; margin: 0 0 26px; padding: 0; }
.profile-avatar { width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 17px; background: #fff; margin: 0 0 20px; }
.profile-avatar .icon { width: 25px; height: 25px; }
.profile-hero .eyebrow { margin-bottom: 9px; }
.profile-hero h1 { font-size: 30px; }
.profile-hero p { margin-top: 10px; font-size: 14px; color: var(--muted); }
.profile-panel > .surface { margin-bottom: 18px; }
.profile-panel .section-title { flex-wrap: wrap; gap: 9px; }
.profile-panel .section-title h2 { font-size: 18px; }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-block: 20px; }
.mini-stats b { font-size: 25px; font-variant-numeric: tabular-nums; }
.mini-stats small { font-size: 12px; }
.settings-list { border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 0 16px; overflow: hidden; }
.settings-row { display: flex; align-items: center; width: 100%; padding: 19px 0; gap: 13px; min-height: 80px; border-bottom: 1px solid var(--line); text-align: left; }
.settings-row:last-child { border-bottom: 0; }
.settings-row > .icon:first-child { width: 20px; height: 20px; color: #5e745e; }
.settings-row > .icon:last-child { width: 16px; height: 16px; color: #71806e; }
.settings-row > div { flex: 1; min-width: 0; }
.settings-row b { display: block; font-size: 13px; line-height: 1.5; }
.settings-row small { display: block; font-size: 12px; line-height: 1.5; margin-top: 4px; }
#clear-data b, #clear-data > .icon:first-child { color: #9b3e32; }
.account-email { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.account-actions { display: grid; gap: 10px; margin-top: 18px; }
.history-filters { grid-template-columns: minmax(0, 1fr); gap: 15px; }
.history-filters .field { font-size: 13px; }
.history-row { padding: 14px 0; min-height: 78px; }
.history-row .entry-info b { font-size: 14px; }
.history-row .entry-info small { font-size: 12px; }
.history-row > .icon { width: 18px; height: 18px; }
.step-label { font-size: 12px; }
.step-dots { margin-block: 16px 24px; }
.step-dots span { width: 28px; height: 4px; border-radius: 3px; }
.step-dots span.active { background: var(--green); }
.onboard { text-align: left; padding: 0; }
.onboard-art { width: 72px; height: 72px; margin: 0 0 24px; background: #edf1e8; border-radius: 20px; }
.onboard-art::before { display: none; }
.onboard-art img { width: 45px; }
.onboard h2 { font-size: 29px; line-height: 1.2; letter-spacing: -.8px; }
.onboard p { font-size: 14px; line-height: 1.65; }
.onboard-features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px 0; }
.onboard-features > div { display: flex; align-items: center; gap: 12px; font-size: 13px; text-align: left; }
.onboard-features .icon { margin: 0; width: 20px; height: 20px; }
.recipe-editor-heading { align-items: center; gap: 13px; }
.recipe-editor-heading p { font-size: 13px; }
.recipe-editor-heading > .catalog-photo { width: 64px; height: 72px; border-radius: 14px; }
.recipe-basic-fields { grid-template-columns: minmax(0, 1fr); gap: 15px; }
.recipe-batch-controls { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; }
.recipe-batch-controls p { font-size: 12px; }
.recipe-ingredient { border-radius: 16px; padding: 15px; }
.recipe-ingredients-title h3 { font-size: 17px; }
.recipe-ingredient input, .recipe-ingredient select { font-size: 16px; min-height: 46px; }
.recipe-portion-box { padding: 18px; border-radius: 18px; }
.recipe-portion-box h3 { font-size: 18px; }
.recipe-result-card { border-radius: 18px; padding: 18px; }
.recipe-result-card p { font-size: 12px; }
.recipe-precise { max-width: 100%; overflow-x: auto; }
.photo-block { border-radius: 16px; background: #f4f6ef; padding: 15px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-actions .btn { min-height: 44px; font-size: 12px; }

/* Required sign-in is a complete mobile screen, not a floating desktop card. */
.signin-gate { display: flex; flex-direction: column; min-height: 100dvh; padding: calc(34px + env(safe-area-inset-top, 0px)) 26px calc(26px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.signin-card { flex: 1 0 auto; width: 100%; max-width: none; padding: 0; text-align: left; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.signin-gate > .app-credit { margin: 30px 0 0; padding: 22px 0 0; }
.signin-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 34px; line-height: 1; font-weight: 750; letter-spacing: -1.7px; text-decoration: none; }
.signin-logo { width: 40px; height: 40px; margin: 0; display: block; }
.signin-intro { padding: 46px 0 30px; }
.signin-intro .eyebrow { font-size: 10px; margin-bottom: 14px; display: block; }
.signin-card h1 { font-size: 37px; line-height: 1.1; letter-spacing: -1.3px; max-width: 330px; margin: 0 0 16px; }
.signin-intro > p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.signin-features { display: grid; gap: 21px; padding-bottom: 32px; border-bottom: 1px solid #d6ddcf; }
.signin-features > div { display: flex; gap: 15px; align-items: center; }
.signin-features > div > .icon { width: 24px; height: 24px; color: var(--green); }
.signin-features b { display: block; font-size: 14px; line-height: 1.5; font-weight: 650; }
.signin-features small { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.signin-access { margin-top: 28px; }
.signin-access h2 { font-size: 19px; letter-spacing: -.3px; }
.signin-access > p { margin-top: 9px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.signin-access .inline-error:not(:empty) { color: #a13b30; padding: 12px; border: 1px solid #edcfc7; border-radius: 12px; background: #fff4ef; }
.signin-actions { display: grid; gap: 10px; margin-top: 21px; }
.signin-actions .btn { width: 100%; min-height: 54px; border-radius: 14px; font-size: 15px; }
.signin-card > .signin-note { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 20px 0 0; text-align: center; }
#splash { position: fixed; inset: 0; width: 100%; background: var(--bg); }
.splash-brand { color: var(--green); padding: 24px; }
.splash-brand b { font-size: 48px; font-weight: 800; line-height: 1.1; }
.splash-brand small { display: block; margin-top: 10px; font-size: 13px; line-height: 1.5; letter-spacing: 0; color: var(--muted); }
#toast { left: 50%; right: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 32px); max-width: 430px; border-radius: 15px; font-size: 13px; line-height: 1.5; padding: 15px 17px; z-index: 100; }
#toast button { min-width: 52px; min-height: 44px; font-size: 12px; }

@keyframes mobile-arrive { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes mobile-sheet { from { opacity: .6; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (max-width: 359px) {
  :root { --phone-gutter: 16px; }
  .page-head h1, .profile-hero h1 { font-size: 27px; }
  .day-card { padding-inline: 18px; }
  .day-energy strong { font-size: 49px; }
  .day-macros > div { padding-left: 11px; }
  .day-macros b { font-size: 18px; }
  .scan-cta { gap: 10px; padding-inline: 13px; }
  .scan-cta strong { font-size: 14px; }
  .scan-cta small { font-size: 11px; }
  .discovery-photo { height: 106px; }
  .discovery-copy { padding-inline: 11px; }
  .food-card > .food-open { grid-template-columns: 72px minmax(0, 1fr); column-gap: 11px; padding: 12px; }
  .food-card .art { width: 72px; }
  .food-card h3 { font-size: 14px; }
  .recipe-card { grid-template-columns: 66px minmax(0, 1fr) 12px; gap: 10px; }
  .recipe-art { width: 66px; height: 100px; }
  .recipe-card-copy > strong { font-size: 14px; }
  .product-title h2 { font-size: 21px; }
  .big-emoji { width: 65px; height: 76px; }
  .analysis-score-top h3 { font-size: 16px; }
  .product-score { flex-basis: 72px; width: 72px; height: 82px; }
  .score-components b { font-size: 15px; }
  .sticky-actions .actions { flex-wrap: wrap; }
  #favorite-food { flex-basis: 100%; min-height: 44px; }
  .signin-gate { padding-inline: 22px; }
  .signin-card h1 { font-size: 33px; }
  .signin-intro { padding-top: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Personal context, explicit contributions and observations on the phone. */
.portion-impact { margin: 22px 0; min-width: 0; }
.impact-equation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 16px; background: var(--line); overflow: hidden; margin: 14px 0; }
.impact-equation > div { background: #fff; padding: 15px 12px; min-width: 0; }
.impact-equation span { display: block; font-size: 11px; line-height: 1.5; color: var(--muted); }
.impact-equation b { display: block; font-size: 23px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.impact-equation b small { font-size: 12px; font-weight: 500; }
.impact-equation .impact-result { background: var(--pale); }
.impact-detail, .chemical-checks, .personal-method, .profile-references { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 0 14px; margin: 16px 0; min-width: 0; }
:is(.impact-detail, .chemical-checks, .personal-method, .profile-references) > summary { min-height: 52px; padding: 15px 0; cursor: pointer; font-size: 13px; font-weight: 650; line-height: 1.6; }
:is(.impact-detail, .chemical-checks, .personal-method, .profile-references) p { font-size: 12px; line-height: 1.65; color: var(--muted); margin: 0 0 14px; }
.impact-table-wrap { overflow-x: auto; max-width: 100%; }
.impact-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.impact-table-wrap caption { text-align: left; font-size: 11px; color: var(--muted); padding: 0 0 12px; }
.impact-table-wrap :is(td, th) { padding: 11px 5px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.impact-table-wrap th:first-child { text-align: left; }
.impact-table-wrap th small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.impact-detail > p { margin-top: 12px; }
.chemical-checks ul { padding: 0; margin: 0; list-style: none; }
.chemical-checks li { border-top: 1px solid var(--line); padding: 14px 0; }
.chemical-checks li > :is(b, span, small) { display: block; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.chemical-checks li > span { color: var(--muted); margin: 5px 0; }
.personal-method .analysis-source { display: block; padding: 8px 0; min-height: 44px; }
.profile-context { background: var(--pale); border-radius: 16px; padding: 16px; margin: 18px 0 0; }
.profile-context h3 { margin: 5px 0 13px; }
.profile-context p { font-size: 12px; margin: 10px 0; }
.profile-context summary { font-size: 12px; min-height: 44px; padding: 12px 0; cursor: pointer; }
.context-values { display: flex; gap: 16px; flex-wrap: wrap; }
.context-values span { font-size: 12px; }
.context-values b { font-size: 21px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.profile-check { display: grid; grid-template-columns: 22px 1fr; align-items: center; column-gap: 9px; }
.profile-check input { width: 20px; height: 20px; min-height: 20px; padding: 0; }
.profile-check small { grid-column: 2; }
.profile-references .field { margin-bottom: 15px; }
.profile-consent { color: var(--ink); line-height: 1.7; }
.daily-personal { margin: 22px 0; }
.daily-personal > h3 { margin-bottom: 12px; }
.health-context { border: 1px solid var(--line); border-radius: 16px; background: #fff; margin: 14px 0; overflow: hidden; }
.health-context > summary { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding: 16px; cursor: pointer; }
.health-context > summary span { font-size: 12px; color: var(--muted); }
.health-context > summary b { font-size: 14px; line-height: 1.5; }
.health-context > summary::after { content: "Apri dettagli +"; font-size: 11px; color: var(--green); margin-top: 4px; }
.health-context[open] > summary::after { content: "Chiudi dettagli −"; }
.health-context-body { padding: 0 16px 16px; font-size: 12px; }
.health-context-body h4 { margin: 18px 0 8px; font-size: 13px; }
.health-context-body p { margin: 12px 0; }
.health-food-list { padding: 0; margin: 10px 0; list-style: none; }
.health-food-list li { border-top: 1px solid var(--line); padding: 11px 0; }
.health-food-list :is(b, span) { display: block; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.health-food-list span { color: var(--muted); margin-top: 3px; }
.health-context .analysis-warning { margin-bottom: 13px; }
.health-context .analysis-warning > small { display: block; font-size: 10px; margin-bottom: 9px; line-height: 1.6; }
.diary-symptom { display: flex; gap: 7px; align-items: center; min-height: 44px; margin: 0 12px 7px; padding: 9px 6px; background: transparent; border: 0; text-align: left; font-size: 11px; line-height: 1.5; color: var(--muted); }
.diary-symptom .icon { width: 16px; height: 16px; }
#symptom-form .field { margin: 16px 0; }
#symptom-form :is(input, select, textarea) { font-size: 16px; width: 100%; }
#symptom-form textarea { min-height: 92px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.portion-comparison > summary { min-height: 44px; font-size: 13px; font-weight: 650; cursor: pointer; padding: 10px 0; }
.portion-comparison .actions { margin: 12px 0; }
.portion-comparison .actions button { flex: 1; }

/* Activity: the same phone canvas, with explicit availability and provenance. */
.activity-summary .section-title { margin-bottom: 12px; }
.activity-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 14px; }
.activity-mini > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.activity-mini b, .activity-mini span { display: block; }
.activity-mini b { font-size: 27px; font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.activity-mini span { font-size: 12px; color: var(--muted); margin-top: 3px; }
[data-health-detail] { display: grid; gap: 22px; }
.activity-head h1 { font-size: 28px; }
.activity-connection .section-title { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.activity-connection > p, .haptics-settings > p { font-size: 13px; margin-top: 12px; }
.activity-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.activity-controls .btn { min-height: 48px; flex: 1 1 auto; }
.activity-notice { border-left: 3px solid #a58e50; border-radius: 0 10px 10px 0; background: #f6f2e6; padding: 14px; margin-top: 16px; font-size: 12px; line-height: 1.7; }
.activity-notice p { margin-top: 5px; }
.activity-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.activity-metric { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 17px 14px; }
.activity-metric > :is(span, strong, small) { display: block; }
.activity-metric > span { font-size: 12px; font-weight: 600; }
.activity-metric > strong { font-size: 28px; line-height: 1.45; margin: 12px 0 5px; letter-spacing: -.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.activity-metric strong small { font-size: 11px; letter-spacing: 0; font-weight: 500; }
.activity-metric > small { font-size: 10px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.activity-caption { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 12px; }
.activity-energy h2 { margin: 8px 0 15px; }
.activity-energy dl { margin: 0 0 16px; }
.activity-energy dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 14px 0; }
.activity-energy dt { font-size: 12px; line-height: 1.5; }
.activity-energy dd { margin: 0; text-align: right; font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.activity-energy dd small { font-size: 11px; font-weight: 400; }
.activity-total dt { font-weight: 650; }
.activity-method { margin-top: 14px; border-top: 1px solid var(--line); }
.activity-method summary { font-size: 12px; font-weight: 600; cursor: pointer; padding: 16px 0; min-height: 48px; }
.activity-method p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; }
.activity-error { font-size: 12px; color: #92432f; margin-top: 14px; line-height: 1.6; }
.activity-providers > div { border-bottom: 1px solid var(--line); padding: 18px 0; }
.activity-providers b { font-size: 13px; }
.activity-providers p { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 7px; }
.activity-providers > p { margin-top: 16px; }
.haptics-settings { margin: 18px 0; }
.haptics-settings .section-title { margin: 0; }
.haptics-switch { border: 0; background: transparent; border-radius: 24px; width: 56px; height: 48px; padding: 8px 0; flex-shrink: 0; cursor: pointer; }
.haptics-switch > span { display: block; background: #a8afa8; border-radius: 20px; height: 32px; width: 54px; padding: 4px; }
.haptics-switch > span::after { content: ""; display: block; border-radius: 50%; background: #fff; width: 24px; height: 24px; box-shadow: 0 1px 3px #0002; transition: transform .15s ease; }
.haptics-switch[aria-checked="true"] > span { background: var(--green); }
.haptics-switch[aria-checked="true"] > span::after { transform: translateX(22px); }
@media (prefers-reduced-motion: reduce) { .haptics-switch > span::after { transition: none; } }

.activity-controls .btn[aria-disabled="true"] { opacity: .55; cursor: wait; }

.activity-manual .section-title { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.activity-manual > p { margin-top: 12px; }
#manual-activity-form .field { display: grid; gap: 7px; margin: 18px 0; font-size: 13px; }
#manual-activity-form input { width: 100%; font-size: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
#manual-activity-form .field small { font-size: 11px; line-height: 1.6; }
#manual-activity-form > button { margin-top: 20px; width: 100%; }

/* Scheda prodotto: giudizio netto e scheda tecnica densa. */
.analysis-score-card, .analysis-score-card.amber, .analysis-score-card.red, .analysis-score-card.unknown { --band: #2f7a4f; padding: 22px 20px; border: 0; border-radius: 22px; color: #f3f1e6; background: #10261f; }
.analysis-score-card.band-amber { --band: #c99a1e; }
.analysis-score-card.band-orange { --band: #d7682a; }
.analysis-score-card.band-red { --band: #c8402f; }
.analysis-score-card.band-unknown { --band: #6f7c74; }
.analysis-score-card .eyebrow, .analysis-score-card .analysis-tag { color: #a9b8ad; }
.analysis-score-card h3 { color: #d9e0d6; font-size: 13px !important; font-weight: 600; margin: 4px 0 6px !important; }
.score-verdict { display: block; margin-top: 8px; font-size: 30px; line-height: 1; font-weight: 850; letter-spacing: -1px; color: var(--band); }
.analysis-score-card .product-score, .analysis-score-card.amber .product-score, .analysis-score-card.red .product-score, .analysis-score-card.unknown .product-score { flex: 0 0 104px; width: 104px; height: 112px; border-radius: 20px; color: #10261f; background: var(--band); }
.analysis-score-card .product-score strong { font-size: 52px; font-weight: 850; letter-spacing: -3px; color: #fff; font-variant-numeric: tabular-nums; }
.analysis-score-card .product-score span { color: rgba(255,255,255,.8); font-weight: 700; }
.analysis-score-card > p { color: #d9e0d6; }
.analysis-score-card .analysis-disclaimer { color: #93a399 !important; }
.score-components b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Technical sheet: visible figures, with explanations in native disclosures. */
.tech-sheet { margin: 18px 0; padding: 18px 0 0; border-radius: 20px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.ts-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 0 16px; }
.ts-head .eyebrow { color: #526456; font-size: 10px; letter-spacing: 1.6px; }
.ts-head h3 { margin-top: 5px; font-size: 19px; line-height: 1.35; letter-spacing: -.5px; }
.ts-basis { flex-shrink: 0; border: 1px solid var(--line); padding: 5px 7px; border-radius: 7px; font-size: 11px; color: #526456; font-variant-numeric: tabular-nums; }
.ts-intro { padding: 0 16px; margin-top: 9px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.ts-status { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 16px; }
.ts-status span { background: #f0f3ed; border-radius: 6px; padding: 5px 7px; font-size: 10px; line-height: 1.4; color: #526456; }
.ts-explainer { margin: 0 -16px 15px; padding: 0 16px 15px; background: #fafbf8; font-size: 12px; line-height: 1.65; color: #526456; }
.ts-explainer b { color: var(--ink); font-weight: 650; }
.ts-reading { margin: 16px 0 12px; }
.ts-reading b { font-size: 13px; font-weight: 650; }
.ts-reading p { margin-top: 5px; font-size: 12px; line-height: 1.65; color: #526456; }
.ts-split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.ts-split i.carbs, .ts-split-legend .carbs::before { background: #c99a1e; }
.ts-split i.protein, .ts-split-legend .protein::before { background: #2f7a4f; }
.ts-split i.fat, .ts-split-legend .fat::before { background: #c8402f; }
.ts-split i.fiber, .ts-split-legend .fiber::before { background: #6b8095; }
.ts-split-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 0; margin: 12px 0 0; list-style: none; }
.ts-split-legend li { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 5px; align-items: center; font-size: 11px; color: #526456; }
.ts-split-legend li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; }
.ts-split-legend b { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.ts-caption { margin-top: 12px; font-size: 11px; line-height: 1.7; color: #627066; }
.ts-unit-example { margin-top: 16px; padding: 13px; border: 1px solid #e2dfca; border-radius: 12px; background: #f7f6ec; }
.ts-unit-example > span { display: block; font-size: 10px; color: #756e4b; }
.ts-unit-example > b { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ts-unit-example > p { margin-top: 6px; font-size: 11px; line-height: 1.65; color: #68644e; }
.ts-links { margin-top: 10px; }
.ts-links a { display: flex; align-items: center; min-height: 44px; padding: 9px 0; font-size: 11px; line-height: 1.6; color: #37583f; text-decoration: underline; }
.ts-more { margin-top: 12px; border-top: 1px solid var(--line); }
.ts-more > summary { padding: 14px 0; min-height: 44px; font-size: 12px; line-height: 1.6; font-weight: 650; }
.ts-facts { display: grid; gap: 0; margin: 0; }
.ts-facts > div { padding: 13px 0; border-bottom: 1px solid var(--line); }
.ts-facts > div:first-child { padding-top: 0; }
.ts-facts > div:last-child { padding-bottom: 0; border-bottom: 0; }
.ts-facts dt { font-size: 11px; line-height: 1.6; color: #627066; }
.ts-facts dd { margin: 4px 0 0; font-size: 14px; line-height: 1.5; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.ts-facts p { margin-top: 5px; font-size: 11px; font-weight: 400; line-height: 1.7; color: #627066; }
.ts-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.ts-data-note { padding: 12px; border: 1px solid #e6d6ba; border-radius: 10px; background: #faf6ed; font-size: 11px; line-height: 1.7; color: #715a30; margin-top: 14px; }
.tech-sheet > .ts-data-note { margin: 0 16px 16px; }
.ts-footer { padding: 14px 16px; border-top: 1px solid var(--line); background: #fafbf8; font-size: 11px; line-height: 1.7; color: #627066; }

/* Product decisions and portion controls stay beside the inputs on phones. */
.food-entry-actions { margin: 14px 0 20px; }
.food-entry-actions .actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr); align-items: stretch; }
.food-entry-actions .btn { padding: 12px 10px; white-space: normal; }
.food-entry-actions .icon { width: 18px; height: 18px; }
#food-product-actions:empty, #food-portion-actions:empty { display: none; }
#food-personal > .form-grid { margin-top: 16px; }
.food-reasons, .food-energy { margin: 20px 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }
.food-reasons { padding: 18px 16px 0; }
.food-reasons-head, .food-energy-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.food-reasons-status, .food-energy-tag { font-size: 10px; line-height: 1.5; color: #5c665e; background: #edf0e9; padding: 3px 7px; border-radius: 5px; }
.food-reasons h3, .food-energy h3 { font-size: 18px; letter-spacing: -.3px; }
.food-reasons-summary { margin: 9px 0 16px; font-size: 13px; color: #4d5e54; }
.food-reasons-group { margin: 0 -16px; padding: 16px; border-top: 1px solid #e5e9e2; }
.food-reasons-group h4 { margin: 0 0 12px; font-size: 13px; font-weight: 700; line-height: 1.5; }
.food-reasons-group.favorable h4 { color: #28583d; }
.food-reasons-group.caution h4 { color: #7d5420; }
.food-reasons-group.favorable.emphasized { background: #f1f6ef; }
.food-reasons-group.caution.emphasized { background: #faf5ec; }
.food-reasons-group ul { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.food-reasons-group li { border-left: 2px solid #d4dfd0; padding-left: 11px; overflow-wrap: anywhere; }
.food-reasons-group.caution li { border-color: #d9c6a7; }
.food-reasons-group li b { font-size: 12px; font-weight: 650; }
.food-reasons-group li p, .food-reasons-empty { margin-top: 3px; font-size: 12px; line-height: 1.6; color: #526157; }
.food-reasons-context, .food-reasons-note { font-size: 11px; line-height: 1.7; padding: 12px 0; color: #5b685e; border-top: 1px solid var(--line); }
.food-energy { padding: 18px 16px; background: #f4f6f8; border-color: #dce2e6; }
.food-energy-head .eyebrow { color: #536673; }
.food-energy-tag { color: #435d6d; background: #e4ebf0; }
.food-energy-amount { margin-top: 12px; font-size: 13px; overflow-wrap: anywhere; }
.food-energy-amount b { font-size: 18px; font-variant-numeric: tabular-nums; color: #253f50; }
.food-energy-intro, .food-energy.unavailable > p { margin-top: 9px; font-size: 12px; color: #52636d; }
.food-energy-activities { margin: 15px 0 12px; }
.food-energy-activities > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(75px, auto); gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid #dce2e6; }
.food-energy-activities dt b { font-size: 13px; }
.food-energy-activities dt span { display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; color: #52636d; }
.food-energy-activities dd { margin: 0; max-width: 130px; text-align: right; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; color: #253f50; }
.food-energy-profile { font-size: 11px; line-height: 1.6; color: #52636d; }
.food-energy-note { font-size: 11px; line-height: 1.7; color: #52636d; margin-top: 12px; }
.food-energy-method { margin-top: 14px; border-top: 1px solid #dce2e6; }
.food-energy-method summary { padding: 13px 0 0; min-height: 44px; font-size: 12px; font-weight: 650; color: #34566b; }
.food-energy-method p { margin-top: 12px; font-size: 11px; line-height: 1.7; color: #52636d; }
.food-energy-method a { display: flex; align-items: center; min-height: 44px; font-size: 11px; color: #34566b; text-decoration: underline; }

/* Product overview: numbers first, stable macro colours, optional explanations. */
#food-general > .analysis-score-card { padding: 18px; margin-bottom: 18px; border-radius: 20px; }
#food-general > .analysis-score-card .product-score strong { font-size: 51px; line-height: 1; }
#food-general > .analysis-score-card .analysis-disclaimer { margin-top: 12px; font-size: 11px; line-height: 1.6; }
.tech-visible .ts-head { align-items: center; }
.ts-data-status { padding: 10px 16px 14px; }
.ts-data-status strong { font-size: 11px; font-weight: 600; color: #526456; }
.ts-data-status > span { display: block; margin-top: 3px; font-size: 10px; line-height: 1.5; color: #627066; }
.ts-visible-body { padding: 0 16px 16px; }
.ts-energy { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px; border-radius: 13px; background: #10261f; color: #f3f1e6; }
.ts-energy > div > span { display: block; font-size: 11px; color: #c7d3c9; }
.ts-energy strong { display: block; margin-top: 4px; font-size: clamp(29px, 8vw, 36px); line-height: 1.1; letter-spacing: -1px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ts-energy strong small { margin-left: 5px; font-size: 13px; font-weight: 550; letter-spacing: 0; }
.ts-energy-context { text-align: right; flex-shrink: 0; }
.ts-energy-context b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ts-energy-context > span { margin-top: 5px; }
.ts-macros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.ts-macro { min-width: 0; padding: 12px; border: 1px solid var(--macro-border); border-radius: 12px; background: var(--macro-tint); }
.ts-macro.carbs { --macro: #c99a1e; --macro-tint: #fcf7e8; --macro-border: #eee1b4; }
.ts-macro.fat { --macro: #c8402f; --macro-tint: #fcf0ed; --macro-border: #efd6cf; }
.ts-macro.protein { --macro: #2f7a4f; --macro-tint: #edf6ee; --macro-border: #d6e6d7; }
.ts-macro.fiber { --macro: #6b8095; --macro-tint: #eff3f7; --macro-border: #dce4eb; }
.ts-macro dt { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.4; font-weight: 550; color: #34453a; }
.ts-macro dt i { width: 7px; height: 7px; border-radius: 2px; background: var(--macro); flex-shrink: 0; }
.ts-macro dd { margin: 7px 0 0; font-size: 25px; line-height: 1; font-weight: 700; letter-spacing: -.6px; color: #172b20; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ts-macro dd small { margin-left: 4px; font-size: 12px; font-weight: 500; color: #526456; letter-spacing: 0; }
.ts-composition { margin-top: 19px; }
.ts-composition h4, .ts-breakdown > h4 { margin: 0 0 11px; font-size: 13px; line-height: 1.5; font-weight: 650; }
.ts-composition .ts-caption { margin-top: 9px; }
.ts-level { display: table; padding: 2px 6px; margin-top: 4px; border-radius: 4px; font-size: 10px; line-height: 1.5; font-weight: 600; }
.ts-level.green { background: #edf6ee; color: #28633b; }
.ts-level.amber { background: #fcf3dd; color: #79601c; }
.ts-level.red { background: #fbece8; color: #9d3829; }
.ts-level.unknown { background: #f0f2ef; color: #5a655d; }
.ts-missing { font-size: 10px; font-weight: 400; line-height: 1.4; color: #627066; }
.ts-portion-note { padding: 11px 12px; margin-top: 15px; border-radius: 9px; background: #f2f5ef; font-size: 11px; line-height: 1.6; color: #526456; }
.ts-detail { border-top: 1px solid var(--line); }
.ts-detail > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 15px 16px; list-style: none; cursor: pointer; }
.ts-detail > summary::-webkit-details-marker { display: none; }
.ts-detail > summary b { font-size: 13px; font-weight: 650; line-height: 1.5; }
.ts-detail > summary small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.5; font-weight: 400; color: #627066; }
.ts-detail > summary i { display: grid; place-items: center; width: 23px; height: 23px; flex-shrink: 0; border-radius: 50%; font-style: normal; font-size: 17px; color: #526456; background: #f0f3ed; }
.ts-detail[open] > summary { background: #fafbf8; }
.ts-detail[open] > summary i { transform: rotate(45deg); }
.ts-detail > summary:focus-visible { outline: 2px solid #456a50; outline-offset: -3px; border-radius: 3px; }
.ts-detail-body { padding: 0 16px 18px; }
.ts-detail-body > .ts-explainer { margin: 0 0 15px; padding: 0; background: transparent; }
.ts-detail-body .analysis-section-head { margin-top: 20px; }
.ts-detail-body .analysis-section-head h3 { font-size: 16px; }
.ts-detail-body .coverage-strip { flex-wrap: wrap; }
.ts-detail-body .score-components b { font-size: 18px; }
.food-reasons.food-reasons-compact { padding: 0; margin: 20px 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.food-reasons-compact .food-reasons-head { margin-bottom: 11px; }
.food-reason-brief { background: #fff; padding: 13px 14px; border: 1px solid var(--line); border-left: 3px solid #c9d8c3; border-radius: 0 12px 12px 0; margin-bottom: 10px; }
.food-reason-brief.caution { border-left-color: #d9c6a2; }
.food-reason-brief > span { display: block; font-size: 10px; color: #557150; font-weight: 650; margin-bottom: 5px; }
.food-reason-brief.caution > span { color: #806337; }
.food-reason-brief > b { display: block; font-size: 13px; font-weight: 650; line-height: 1.5; }
.food-reason-brief > p { margin-top: 5px; font-size: 12px; color: #627066; line-height: 1.65; }
.food-reasons-more > summary { min-height: 44px; padding: 12px 0; font-size: 12px; font-weight: 600; color: #48664f; cursor: pointer; }
.food-reasons-compact .food-reasons-group { margin: 0; padding: 15px 13px; }
.food-reasons-compact .food-reasons-summary { margin-top: 10px; }
.home-reading[open] .home-reading-toggle { transform: rotate(45deg); }

/* Nutrient identity colours are shared by the product and day readings. */
.nutrient-card { --nutrient: #54715f; --nutrient-pale: #e9efe9; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.nutrient-card[data-nutrient="carbs"] { --nutrient: #c99a1e; --nutrient-pale: #f7efd5; }
.nutrient-card[data-nutrient="sugars"] { --nutrient: #b68124; --nutrient-pale: #f8edd7; }
.nutrient-card[data-nutrient="fat"] { --nutrient: #c8402f; --nutrient-pale: #f8e5e0; }
.nutrient-card[data-nutrient="saturated"] { --nutrient: #a55348; --nutrient-pale: #f5e7e3; }
.nutrient-card[data-nutrient="protein"] { --nutrient: #2f7a4f; --nutrient-pale: #e3efe5; }
.nutrient-card[data-nutrient="fiber"] { --nutrient: #6b8095; --nutrient-pale: #e8edf3; }
.nutrient-card[data-nutrient="salt"] { --nutrient: #81748f; --nutrient-pale: #eeebf2; }
.nutrient-card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.nutrient-card-heading h4 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 650; line-height: 1.5; color: var(--ink); }
.nutrient-card-heading h4 i { width: 7px; height: 7px; flex-shrink: 0; border-radius: 2px; background: var(--nutrient); }
.nutrient-card-heading .ts-level { margin: 0; }
.nutrient-card-numbers { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 13px; }
.nutrient-amount { display: flex; flex-wrap: wrap; min-width: 0; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; }
.nutrient-amount strong { min-width: 0; overflow-wrap: anywhere; font-size: 29px; line-height: 1.1; letter-spacing: -.8px; font-weight: 700; }
.nutrient-amount > span { font-size: 12px; color: var(--muted); }
.nutrient-reference { max-width: 54%; text-align: right; }
.nutrient-percent { display: block; font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums; font-weight: 650; }
.nutrient-reference > span { display: block; margin-top: 3px; font-size: 10px; line-height: 1.5; color: var(--muted); }
.nutrient-meter { height: 7px; border-radius: 4px; overflow: hidden; background: var(--nutrient-pale); margin-top: 13px; }
.nutrient-meter > i { display: block; height: 100%; background: var(--nutrient); border-radius: inherit; }
.nutrient-meter.is-unavailable { background: #edf0eb; border: 1px dashed #ccd5c8; }
.nutrient-note { margin-top: 9px; font-size: 11px; line-height: 1.6; color: #627066; }
.ts-breakdown { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.ts-breakdown > .ts-caption { margin-top: 6px; }
.ts-nutrient-list { display: grid; gap: 10px; margin-top: 14px; }
.daily-nutrient-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.daily-nutrient-grid .nutrient-card { padding: 13px; display: flex; flex-direction: column; }
.daily-nutrient-grid .nutrient-card-heading h4 { font-size: 12px; }
.daily-nutrient-grid .nutrient-card-numbers { flex-direction: column; align-items: flex-start; gap: 11px; margin-top: 12px; }
.daily-nutrient-grid .nutrient-reference { max-width: 100%; text-align: left; }
.daily-nutrient-grid .nutrient-amount strong { min-width: 0; overflow-wrap: anywhere; font-size: 27px; }
.daily-nutrient-grid .nutrient-percent { font-size: 15px; }
.daily-nutrient-grid .nutrient-note { font-size: 10px; }
.home-nutrition > .hint { margin-top: 12px; font-size: 11px; }
.home-nutrition > .text-link { margin-top: 5px; }

/* Horizontal controls scroll within their own bounds, never the page. */
.filters, .menu-goals, .diary-week, .diary-table-wrap, .impact-table-wrap, .recipe-precise { min-width: 0; overscroll-behavior-x: contain; }

/* Personal home: bounded slots keep the same phone grid for every arrangement. */
.home-sections { display: flex; flex-direction: column; gap: 28px; }
.home-sections > *, .home-sections .home-nutrition { min-width: 0; margin: 0; }
.home-sections .home-insights > :first-child { margin-top: 0; }
.home-slot { display: flex; min-width: 0; }
.home-slot.home-size-small { align-self: start; }
.home-slot > * { min-width: 0; width: 100%; }
.home-size-wide { grid-column: 1 / -1; }
.home-intake, .home-movement { padding: 0; overflow: hidden; }
.home-metric-content { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 142px; padding: 13px 12px; }
.home-metric-media { display: block; width: 100%; height: 82px; flex: 0 0 auto; overflow: hidden; }
.home-metric-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-intake .home-metric-media { background: #e8eee0; }
.home-movement .home-metric-media { background: #f1e7d6; }
.home-size-small .home-metric-content { min-height: 125px; padding: 11px; }
.home-size-small .home-metric-media { height: 54px; }
.home-size-wide .home-metric-content { padding: 16px 18px; }
.home-size-wide .home-metric-media { height: 112px; }
.home-slot [data-activity-summary] { display: flex; }
.home-size-small .home-photo-action { aspect-ratio: auto; grid-template-rows: auto 76px; }
.home-size-wide .home-photo-action { aspect-ratio: auto; grid-template-rows: auto 145px; }
.home-size-wide .home-photo-copy { padding: 16px 18px 12px; }
.home-size-wide .home-photo-copy strong { font-size: 20px; }
.home-photo-scan .home-photo-media { background: #e9eddf; }
.home-photo-scan .home-photo-media > img { object-fit: contain; }
.home-utilities .home-utility { width: 100%; min-height: 74px; }
.home-utilities .home-size-small .home-utility { min-height: 60px; padding: 11px 10px; }
.home-utilities .home-size-wide .home-utility { grid-template-columns: 22px minmax(0, 1fr) 18px; padding: 17px; }
.home-density-compact .home-sections { gap: 19px; }
.home-density-compact .home-photo-grid, .home-density-compact .home-utilities { gap: 8px; }
.home-density-compact .home-recent-row { padding-block: 9px; }
.home-page[data-home-images="false"] .home-metric-media, .home-page[data-home-images="false"] .home-photo-media { display: none; }
.home-page[data-home-images="false"] .home-photo-action { aspect-ratio: auto; grid-template-rows: auto; min-height: 86px; }
.home-page[data-home-images="false"] .home-recent-row .food-art { display: none; }
.home-page[data-home-images="false"] .home-recent-row { grid-template-columns: minmax(0, 1fr) 40px; }
.home-page[data-nutrient-columns="1"] .daily-nutrient-grid { grid-template-columns: minmax(0, 1fr); }
.home-page[data-nutrient-columns="1"] .nutrient-card-numbers { flex-direction: row; align-items: flex-start; }
.home-page[data-nutrient-columns="1"] .nutrient-reference { text-align: right; max-width: 55%; }
.home-customize { display: grid; grid-template-columns: 21px minmax(0, 1fr) 16px; gap: 12px; align-items: center; width: 100%; min-height: 76px; margin-top: 26px; padding: 15px; border: 1px dashed #cdd8c5; border-radius: 16px; background: #eef2e8; color: #4c6645; text-align: left; }
.home-customize b { display: block; font-size: 13px; }
.home-customize small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.5; color: #6a7b60; }
.home-customize > .icon { width: 21px; height: 21px; }
.home-customize > .icon:last-child { width: 16px; }
.home-layout-empty { padding: 22px; border: 1px dashed var(--line); border-radius: 18px; }
.home-layout-empty h2 { font-size: 19px; }
.home-layout-empty p { font-size: 13px; color: var(--muted); margin-top: 9px; }

/* Home editor: draft preview, touch-sized ordering controls and explicit save. */
.home-editor { min-width: 0; }
.home-editor-intro { margin-bottom: 20px; }
.home-editor-intro h2 { font-size: 25px; letter-spacing: -.8px; margin-top: 8px; }
.home-editor-intro p { font-size: 13px; color: var(--muted); margin-top: 8px; }
.home-preview-disclosure { margin-bottom: 22px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.home-preview-disclosure > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 13px; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.home-preview-disclosure > summary::-webkit-details-marker { display: none; }
.home-preview-disclosure > summary .icon { width: 16px; height: 16px; }
.home-preview-disclosure[open] > summary .icon { transform: rotate(90deg); }
.home-layout-preview { max-width: 275px; margin: 0 auto 16px; padding: 17px; background: #f5f5ee; border: 1px solid #e2e6db; border-radius: 18px; }
.home-preview-brand { display: block; font-size: 25px; letter-spacing: -1px; margin-bottom: 12px; color: var(--green); }
.home-preview-section { margin-top: 12px; }
.home-preview-section > small { display: block; font-size: 9px; font-weight: 600; margin-bottom: 5px; color: #6c7b63; }
.home-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.home-preview-card { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 39px; padding: 6px; border: 1px solid #dce3d5; border-radius: 7px; background: white; }
.home-preview-card.home-size-small { min-height: 28px; }
.home-preview-card.home-size-wide { min-height: 48px; }
.home-preview-card img { flex: 0 0 25px; width: 25px; height: 25px; border-radius: 5px; object-fit: cover; }
.home-preview-card span { min-width: 0; font-size: 8px; line-height: 1.35; font-weight: 600; }
.home-preview-lines { padding: 7px; border-radius: 7px; border: 1px solid #dce3d5; background: #fff; }
.home-preview-lines i { display: block; height: 4px; width: 78%; background: #e5ebdc; border-radius: 3px; margin: 4px 0; }
.home-preview-lines i:last-child { width: 54%; }
.home-layout-preview > p { font-size: 8px; color: #77866d; margin-top: 12px; }
.home-presets { margin: 22px 0; }
.home-presets h3, .home-appearance h3, .home-editor-section-title h3 { font-size: 16px; letter-spacing: -.3px; }
.home-presets > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.home-presets button { min-width: 0; min-height: 77px; padding: 12px 8px; border-radius: 12px; border: 1px solid #d9e1d0; color: #34503c; background: #f2f5ec; font-size: 11px; font-weight: 650; text-align: left; }
.home-presets button small { display: block; font-size: 9px; font-weight: 400; color: #75816c; margin-top: 6px; line-height: 1.5; }
.home-appearance { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fafbf7; margin-bottom: 24px; }
.home-appearance-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0; }
.home-appearance-row b { display: block; font-size: 12px; }
.home-appearance-row small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.home-visibility { position: relative; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; }
.home-visibility > span { display: block; height: 23px; width: 39px; background: #ced7c7; border-radius: 20px; position: absolute; inset: 10px 2px; }
.home-visibility > span::after { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #253b2020; }
.home-visibility[aria-checked="true"] > span { background: var(--green); }
.home-visibility[aria-checked="true"] > span::after { left: 19px; }
.home-setting-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #e4e8dc; }
.home-setting-field > span { font-size: 11px; line-height: 1.5; }
.home-setting-field select, .home-card-option select { display: block; min-width: 0; width: 100%; min-height: 44px; padding: 8px; border: 1px solid #dce2d6; border-radius: 9px; background: white; color: var(--ink); font-size: 13px; }
.home-editor-section-title > p { font-size: 12px; color: var(--muted); margin: 7px 0 14px; }
.home-editor-sections { display: grid; gap: 10px; }
.home-editor-section { min-width: 0; padding: 12px; border: 1px solid #dce3d5; border-radius: 15px; background: #fff; }
.home-editor-section.is-hidden { background: #f6f7f3; border-style: dashed; }
.home-editor-section-head { display: grid; grid-template-columns: 23px minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.home-order-number { display: grid; place-items: center; width: 23px; height: 26px; border-radius: 7px; background: #eef2e7; font-size: 10px; color: #697c5b; font-variant-numeric: tabular-nums; }
.home-section-expand { display: block; min-width: 0; min-height: 44px; padding: 5px 0; border: 0; background: transparent; text-align: left; }
.home-section-expand b { display: block; font-size: 13px; font-weight: 650; line-height: 1.4; }
.home-section-expand small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.home-section-order { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; padding-top: 5px; border-top: 1px solid #edf0e7; }
.home-section-order > span { font-size: 10px; color: #7d8a72; }
.home-move-controls { display: flex; gap: 3px; }
.home-move-controls .icon-btn { width: 44px; height: 44px; border: 0; background: #f2f5ed; }
.home-move-controls .icon { width: 17px; height: 17px; }
.home-arrow-up { transform: rotate(-90deg); }
.home-arrow-down { transform: rotate(90deg); }
.home-card-options { padding-top: 10px; }
.home-card-option { min-width: 0; padding: 10px; margin-top: 8px; border-radius: 12px; background: #f6f7f2; border: 1px solid #e5e9df; }
.home-card-option-title { display: flex; gap: 8px; align-items: center; }
.home-card-option-title > img, .home-card-option-title > .icon { width: 32px; height: 32px; flex: 0 0 32px; object-fit: cover; border-radius: 8px; }
.home-card-option-title b { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; }
.home-card-option-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 8px; }
.home-card-option-controls > label { min-width: 0; }
.home-editor .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-editor-note { font-size: 11px; color: var(--muted); line-height: 1.7; margin-top: 20px; }
.home-reset { margin-top: 7px; font-size: 12px; }
.home-editor-footer { position: sticky; bottom: 0; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 9px; margin: 16px calc(-1 * var(--phone-gutter)) calc(-24px - env(safe-area-inset-bottom, 0px)); padding: 12px var(--phone-gutter) calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #fffffff5; backdrop-filter: blur(14px); }
.home-editor-footer .btn { min-width: 0; padding-inline: 10px; font-size: 13px; }
@media (max-width: 360px) {
  .home-appearance { padding: 12px; }
  .home-setting-field { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .home-presets > div { gap: 5px; }
  .home-presets button { padding-inline: 7px; }
}

.home-head.home-section-heading h1 { font-size: 20px; }
.home-page .day-energy strong { font-size: clamp(26px, 7.4vw, 33px); }

/* Qura: a coherent daily story, from meal planning to the diary. */
.home-planning .home-section-heading p { max-width: 30ch; }
.home-recents .home-recent-list { padding: 5px 12px; border-radius: 20px; background: #fff; border: 1px solid #e0e5da; }
.home-recents .home-recent-row { padding: 14px 0; gap: 12px; }
.home-recents .home-recent-row .food-art { width: 56px; height: 64px; border-radius: 12px; }
.home-recents .home-recent-copy > small { font-size: 10px; color: #61705b; }
.home-recents .home-recent-copy > strong { font-size: 14px; }
.home-recents .home-history-link { border: 0; padding-inline: 3px; }
.day-report { min-width: 0; padding: 20px; border-radius: 22px; border: 1px solid #d3ddce; background: #edf2e8; color: #244737; }
.day-report-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-report-top > div:first-child { min-width: 0; }
.day-report .eyebrow { color: #58734e; font-size: 9px; letter-spacing: 1.3px; }
.day-report h2 { margin-top: 5px; font-size: 21px; line-height: 1.15; letter-spacing: -.7px; text-wrap: balance; }
.day-report-state { display: block; margin-top: 8px; font-size: 10px; line-height: 1.5; color: #60745b; }
.day-report-score { display: flex; flex: 0 0 75px; flex-direction: column; align-items: center; justify-content: center; width: 75px; height: 80px; border: 1px solid #c2d1bb; border-radius: 20px; background: #f9fbf5; font-variant-numeric: tabular-nums; }
.day-report-score strong { font-size: 38px; line-height: 1; letter-spacing: -1.5px; }
.day-report-score small { font-size: 10px; margin-top: 4px; color: #65805c; }
.day-report-reason { margin-top: 14px; color: #4d6347; font-size: 12px; line-height: 1.6; }
.day-report-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.day-report-parts > div { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 0; border-radius: 12px; background: #ffffffa6; }
.day-report-parts span { font-size: 10px; line-height: 1.4; color: #5b6d52; }
.day-report-parts b { font-size: 22px; font-variant-numeric: tabular-nums; }
.day-report-parts small { margin-left: 3px; font-size: 10px; font-weight: 400; }
.day-report-actions { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 8px; }
.day-report-actions .text-link { min-height: 44px; font-size: 11px; }
.day-movement-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 16px 0 4px; }
.day-movement-facts span { font-size: 10px; color: #63775a; line-height: 1.6; }
.day-movement-facts b { display: block; font-size: 16px; color: #2b4a3b; }
.day-report.is-compact { margin-top: 14px; padding: 15px; border-radius: 16px; }
.day-report.is-compact h2 { font-size: 17px; }
.day-report.is-compact .day-report-score { flex-basis: 57px; width: 57px; height: 64px; border-radius: 15px; }
.day-report.is-compact .day-report-score strong { font-size: 29px; }
.day-report.is-compact .day-report-parts > div { padding: 0; background: none; gap: 4px; }
.day-report.is-compact .day-report-parts b { font-size: 17px; }
.day-report.is-compact .day-report-reason { font-size: 11px; }
.day-report.is-compact .day-report-actions { border-top: 1px solid #d6e0d0; margin-top: 10px; }
.day-formula { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 5px 14px; padding: 18px; margin-block: 20px; border-radius: 16px; background: #edf2e8; }
.day-formula b { font-size: 28px; color: #315741; }
.day-component-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid #e1e7dc; font-size: 13px; }
.activity-head + [data-daily-report] { margin-bottom: 20px; }
.diary-page { gap: 22px; }
.diary-heading h1 { font-size: 32px; letter-spacing: -1.3px; }
.diary-calendar { border-radius: 22px; border-color: #dde4d7; box-shadow: 0 4px 20px #254b3403; }
.diary-primary-actions .btn { border-radius: 14px; min-height: 50px; }
.diary-overview { background: #fff; border-color: #dce4d5; padding: 20px 18px 0; border-radius: 22px; }
.diary-section-heading h2 { margin-top: 5px; font-size: 22px; line-height: 1.2; letter-spacing: -.7px; }
.diary-section-heading p { margin-top: 7px; font-size: 11px; line-height: 1.6; color: #6d7d66; }
.diary-energy-row { margin-top: 18px; border-radius: 16px; padding: 17px; gap: 12px; background: #234b3c; color: #fff; }
.diary-energy > span, .diary-energy > div > span { color: #d6e5ce; }
.diary-energy strong { font-size: clamp(30px,9vw,42px); letter-spacing: -1.7px; }
.diary-planned-energy { color: #dce7d5; border-left-color: #577665; }
.diary-planned-energy > span, .diary-planned-energy > small, .diary-planned-energy small { color: #d5e0d0; }
.diary-macros { gap: 7px; padding-top: 0; margin-top: 12px; border: 0; }
.diary-macros > div { padding: 12px 9px; border-radius: 13px; border-top: 3px solid var(--macro); background: var(--macro-bg); }
.diary-macro-protein { --macro: #397451; --macro-bg: #edf4e9; }
.diary-macro-carbs { --macro: #b98c25; --macro-bg: #fbf4df; }
.diary-macro-fat { --macro: #be6043; --macro-bg: #faece5; }
.diary-macros > div > span { color: #57614e; font-size: 10px; }
.diary-macros b { font-size: 20px; }
.diary-nutrients { margin-top: 17px; }
.diary-nutrients summary { min-height: 52px; }
.diary-meals-heading { align-items: flex-end; margin-bottom: 16px; }
.diary-meals-heading h2 { font-size: 25px; margin-top: 5px; letter-spacing: -.9px; }
.diary-meal { --meal-tone: #edf2e5; border-radius: 20px; border-color: #dce4d5; overflow: hidden; background: #fff; }
.diary-meal[data-meal-tone="sun"] { --meal-tone: #f8efd9; }
.diary-meal[data-meal-tone="moon"] { --meal-tone: #eaf0f3; }
.diary-meal[data-meal-tone="snack"] { --meal-tone: #f5eae0; }
.diary-meal-head { padding: 16px 14px; background: var(--meal-tone); }
.diary-meal-symbol { background: #ffffffb3; border-radius: 12px; color: #526344; width: 40px; height: 40px; }
.diary-meal-head h3 { font-size: 17px; }
.diary-meal-head p { font-size: 10px; line-height: 1.6; margin-top: 3px; }
.diary-meal-add { border-radius: 12px; background: #ffffffbb; min-width: 44px; min-height: 44px; }
.diary-meal.is-empty .diary-meal-head { padding-block: 20px; }
.diary-entry { padding: 15px 14px; }
.diary-entry-photo { border-radius: 12px; }
.diary-entry-copy b { font-size: 14px; line-height: 1.4; }
.diary-entry-state { border-radius: 6px; padding: 3px 6px; }
.diary-completion { border-radius: 20px; padding: 18px; border: 1px solid #dbe3d3; background: #f1f4eb; }
.recipe-catalog-filters { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-block: 14px; }
.recipe-catalog-filters select { width: 100%; min-width: 0; padding-right: 22px; font-size: 16px; min-height: 44px; }
.recipe-cut-note { border-left: 3px solid #a8ba97; padding: 10px 12px; background: #f1f4eb; border-radius: 0 10px 10px 0; color: #56634b; font-size: 12px; line-height: 1.6; }
.recipe-result-count { font-size: 11px; color: #69775f; margin: 12px 0; }
.recipe-picker-result { padding-block: 15px; min-height: 100px; }
.recipe-picker-result > span { min-width: 0; }
.recipe-picker-result b { line-height: 1.4; overflow-wrap: anywhere; }
.recipe-picker-figures { display: flex; flex-wrap: wrap; gap: 5px 10px; font-size: 11px; margin-block: 9px 5px; }
.recipe-picker-figures > span { border-radius: 5px; padding: 4px 6px; background: #edf2e8; color: #405b36; }

/* Identity colours stay on macro charts; traffic colours assess concentration. */
.nutrient-signals { margin: 18px 0 24px; }
.signal-heading h3 { font-size: 22px; margin-top: 5px; letter-spacing: -.7px; }
.signal-heading p, .signal-caption { font-size: 12px; line-height: 1.65; color: #63705c; margin-top: 8px; }
.nutrient-signal-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.nutrient-signal { --signal-ink: #586359; --signal-bg: #eef0ed; --signal-line: #d6dcd3; min-width: 0; display: flex; flex-direction: column; padding: 14px; border-radius: 15px; background: var(--signal-bg); border: 1px solid var(--signal-line); color: var(--signal-ink); }
.nutrient-signal.green, .nutrient-card.signal-green { --signal-ink: #21623e; --signal-bg: #e6f2e8; --signal-line: #b9d9bd; }
.nutrient-signal.amber, .nutrient-card.signal-amber { --signal-ink: #825400; --signal-bg: #fff1cf; --signal-line: #e7ce8b; }
.nutrient-signal.red, .nutrient-card.signal-red { --signal-ink: #a12827; --signal-bg: #fbe8e4; --signal-line: #e7b7ae; }
.nutrient-signal > span { font-size: 12px; font-weight: 600; }
.nutrient-signal > strong { font-size: 29px; font-weight: 650; letter-spacing: -.8px; margin: 10px 0; font-variant-numeric: tabular-nums; }
.nutrient-signal > strong > small { font-size: 12px; letter-spacing: 0; }
.nutrient-signal > b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.nutrient-signal > b i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nutrient-signal > small { margin-top: 8px; font-size: 10px; line-height: 1.5; }
.signal-method { margin-top: 10px; padding: 0 12px; border-radius: 12px; background: #f4f5ef; }
.signal-method summary { min-height: 48px; display: flex; align-items: center; font-size: 12px; font-weight: 600; cursor: pointer; }
.signal-method p, .signal-method a { font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
.signal-method a { display: inline-block; padding-bottom: 4px; text-decoration: underline; }
.signal-thresholds { padding: 10px; border-radius: 9px; background: #fff; margin-bottom: 12px; }
.signal-thresholds p { margin: 0 0 8px; }
.nutrient-card.has-signal { border-color: var(--signal-line,#dce1d8); }
.nutrient-card.has-signal .ts-level { background: var(--signal-bg,#edf0ea); color: var(--signal-ink,#52624b); padding: 5px 9px; font-size: 11px; }
@media(max-width:360px) {
  .day-report { padding: 16px; }
  .day-report-score { flex-basis: 64px; width: 64px; }
  .day-report h2 { font-size: 19px; }
  .diary-overview { padding-inline: 13px; }
  .diary-energy-row { padding: 13px; }
  .diary-macros > div { padding-inline: 7px; }
  .diary-macros b { font-size: 17px; }
  .nutrient-signal { padding: 12px; }
}
.food-data-quality { border: 1px solid #dce3d6; border-radius: 14px; background: #f3f5ee; margin: 14px 0 20px; padding: 14px; }
.food-data-quality > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.food-data-quality > div > span { color: #5f7055; font-size: 11px; }
.food-data-quality p { font-size: 11px; line-height: 1.65; color: #56634e; margin-top: 9px; }
.food-data-quality summary { min-height: 44px; display: flex; align-items: center; font-size: 11px; font-weight: 600; }
.additive-coverage { display: flex; flex-direction: column; gap: 7px; padding: 14px; border-radius: 13px; background: #edf2e8; margin-bottom: 14px; }
.additive-coverage b { font-size: 13px; }
.additive-coverage span { font-size: 11px; color: #5c6f50; line-height: 1.5; }
