/* ═══════════════════════════════════════════════════════════════════════
   FUEL (meal tracker) — styles. Loaded by ironlog.html as fuel.css?v=N.
   Colors: only theme variables. Fuel-specific tokens are defined below for
   each theme (same unscoped [data-theme] selectors as
   ironlog.html, so Settings preview tiles would pick them up too).
   ═══════════════════════════════════════════════════════════════════════ */
:root, [data-theme="dark"] {
  /* Macro fills carry white letters (P/C/F badges): all three stay dark enough for 4.5:1.
     Protein is rose, not the accent, so orange only ever means calories / actions. */
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.2);
  --carbs: #2f74d0;
  --carbs-soft: rgba(47,116,208,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #e85d26;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #2e2e2e;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="light"] {
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.12);
  --carbs: #1f6bc4;
  --carbs-soft: rgba(31,107,196,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #e2561b;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #e6e8ec;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="orchid"] {
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.12);
  --carbs: #1f6bc4;
  --carbs-soft: rgba(31,107,196,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #e2561b;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #eadcf4;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}

[data-theme="midnight"] {
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.2);
  --carbs: #2f74d0;
  --carbs-soft: rgba(47,116,208,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #e85d26;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #22304f;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="glacier"] {
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.12);
  --carbs: #1f6bc4;
  --carbs-soft: rgba(31,107,196,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #e2561b;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #dde7f3;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="aurora"] {
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.2);
  --carbs: #2f74d0;
  --carbs-soft: rgba(47,116,208,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #e85d26;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #272c43;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="sandstone"] {
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.12);
  --carbs: #1f6bc4;
  --carbs-soft: rgba(31,107,196,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #e2561b;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #eadfd1;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="forest"] {
  --protein: #c93a5c;
  --protein-soft: rgba(201,58,92,.2);
  --carbs: #2f74d0;
  --carbs-soft: rgba(47,116,208,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #e85d26;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #21362a;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}

/* Pink-accent themes: protein moves from rose to crimson so the P badge never reads as the accent. */
[data-theme="blush"] {
  --protein: #b8323f;
  --protein-soft: rgba(184,50,63,.12);
  --carbs: #2c6fc4;
  --carbs-soft: rgba(44,111,196,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #d65a82;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #f3e1e7;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="fuchsia"] {
  --protein: #d9453d;
  --protein-soft: rgba(217,69,61,.2);
  --carbs: #2f74d0;
  --carbs-soft: rgba(47,116,208,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #ff2e93;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #34202c;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="miami"] {
  --protein: #d4243a;
  --protein-soft: rgba(212,36,58,.12);
  --carbs: #1f6bc4;
  --carbs-soft: rgba(31,107,196,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #e8137a;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #ffd9ec;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="miami-nights"] {
  --protein: #e0443a;
  --protein-soft: rgba(224,68,58,.2);
  --carbs: #2f74d0;
  --carbs-soft: rgba(47,116,208,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #ff2a8a;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #3a1f66;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}

[data-theme="topgun"] {
  --protein: #e0445a;
  --protein-soft: rgba(224,68,90,.2);
  --carbs: #2f78d6;
  --carbs-soft: rgba(47,120,214,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #ffa024;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #1a2440;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="maverick"] {
  --protein: #d4243a;
  --protein-soft: rgba(212,36,58,.12);
  --carbs: #0f7f9c;
  --carbs-soft: rgba(15,127,156,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #1f4b99;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #e4ddcc;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
/* Pulp / Heist: red is the accent, so protein is purple instead of rose. */
[data-theme="pulp"] {
  --protein: #6a3fa0;
  --protein-soft: rgba(106,63,160,.14);
  --carbs: #1f6fa8;
  --carbs-soft: rgba(31,111,168,.14);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #c4161c;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.14);
  --fuel-track: #ead9a8;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="heist"] {
  --protein: #9b4fc0;
  --protein-soft: rgba(155,79,192,.14);
  --carbs: #3a86cc;
  --carbs-soft: rgba(58,134,204,.14);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.14);
  --kcal: #d8262d;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.14);
  --fuel-track: #1d1d20;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
/* Bubblegum / Glitz: pink is the accent, so protein is crimson / red, as in Blush / Fuchsia. */
[data-theme="bubblegum"] {
  --protein: #b8323f;
  --protein-soft: rgba(184,50,63,.12);
  --carbs: #1a86c0;
  --carbs-soft: rgba(26,134,192,.12);
  --fat: #a86f00;
  --fat-soft: rgba(168,111,0,.14);
  --kcal: #e0218a;
  --on-macro: #fff;
  --fuel-warn: #b86a00;
  --fuel-warn-soft: rgba(184,106,0,.12);
  --fuel-track: #ffe0ef;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="glitz"] {
  --protein: #e8483f;
  --protein-soft: rgba(232,72,63,.2);
  --carbs: #3a95e0;
  --carbs-soft: rgba(58,149,224,.2);
  --fat: #b27a00;
  --fat-soft: rgba(178,122,0,.2);
  --kcal: #ff3ea5;
  --on-macro: #fff;
  --fuel-warn: #f0a93b;
  --fuel-warn-soft: rgba(240,169,59,.16);
  --fuel-track: #36102d;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}

/* Arcade themes: macros kept off each theme's accent (yellow / gold) and button color. */
[data-theme="gridiron"] {
  --protein: #f85898;
  --protein-soft: rgba(248,88,152,.2);
  --carbs: #3cbcfc;
  --carbs-soft: rgba(60,188,252,.2);
  --fat: #fca044;
  --fat-soft: rgba(252,160,68,.2);
  --kcal: #fcd800;
  --on-macro: #000;
  --fuel-warn: #fca044;
  --fuel-warn-soft: rgba(252,160,68,.16);
  --fuel-track: #1c1c1c;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="prizefight"] {
  --protein: #ff5a5a;
  --protein-soft: rgba(255,90,90,.2);
  --carbs: #3cbcfc;
  --carbs-soft: rgba(60,188,252,.2);
  --fat: #fc9838;
  --fat-soft: rgba(252,152,56,.2);
  --kcal: #f8b800;
  --on-macro: #000;
  --fuel-warn: #fc9838;
  --fuel-warn-soft: rgba(252,152,56,.16);
  --fuel-track: #1c2858;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}
[data-theme="combo"] {
  --protein: #ff4f6d;
  --protein-soft: rgba(255,79,109,.2);
  --carbs: #4cb8ff;
  --carbs-soft: rgba(76,184,255,.2);
  --fat: #e090ff;
  --fat-soft: rgba(224,144,255,.2);
  --kcal: #fcd000;
  --on-macro: #000;
  --fuel-warn: #f8a838;
  --fuel-warn-soft: rgba(248,168,56,.16);
  --fuel-track: #2e1450;
  --fuel-scan-bg: #111;              /* camera view stays dark in every theme */
  --fuel-scan-fg: #f2f2f2;
  --fuel-scan-scrim: rgba(0,0,0,.55);
  --fuel-scan-soft: rgba(255,255,255,.14);
}

/* ─── shared ─────────────────────────────────────────────────────────── */
.fu-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fu-head h1 { font-size: 20px; }
.fu-iconbtn { width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg2); color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.fu-iconbtn:disabled { opacity: .35; cursor: default; }
.fu-link { background: none; border: none; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.fu-muted { font-size: 12px; color: var(--text3); }
.fu-lbl { font-size: 12px; font-weight: 600; color: var(--text2); }
.fu-note { font-size: 12px; color: var(--text2); background: var(--bg3); border-radius: var(--radius-sm); padding: 8px 10px; line-height: 1.45; }
.fu-btn-lg { height: 48px; font-size: 15px; }
.fu-first { cursor: pointer; border-color: var(--accent); background: var(--accent-faint); }
.fu-setup { border-color: var(--fuel-warn); background: var(--fuel-warn-soft); }

/* segmented control */
.fu-seg { display: flex; flex: 1; background: var(--bg3); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.fu-seg button { flex: 1; min-height: 34px; border: none; border-radius: 6px; background: none; color: var(--text2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 8px; }
.fu-seg button.on { background: var(--bg4); color: var(--text); }
.fu-seg-primary { background: var(--bg2); border: 1px solid var(--border); margin-bottom: 12px; }
.fu-seg-primary button { min-height: 36px; }
.fu-seg-primary button.on { background: var(--primary); color: var(--on-accent); }
.fu-seg-choice button.on { background: var(--accent-faint); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fu-seg-sm { flex: none; padding: 2px; }
.fu-seg-sm button { min-height: 28px; font-size: 12px; padding: 0 12px; }

/* chips */
.fu-chips { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.fu-chip { flex: 1; min-height: 34px; border-radius: 20px; border: 1px solid var(--border); background: none; color: var(--text2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0 10px; white-space: nowrap; }
.fu-chip.on { background: var(--primary); border-color: transparent; color: var(--on-accent); }

/* ─── targets ────────────────────────────────────────────────────────── */
.fu-form { display: flex; flex-direction: column; gap: 14px; }
.fu-line { display: flex; align-items: center; gap: 12px; }
.fu-line > .fu-lbl { width: 50px; flex-shrink: 0; }
.fu-grid3 { display: grid; grid-template-columns: 1fr 1.3fr 1.1fr; gap: 8px; }
.fu-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fu-field > span { font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.fu-field input { height: 42px; padding: 0 10px; }
.fu-field > span.fu-mlbl, .fu-mlbl { display: inline-flex; align-items: center; gap: 5px; }
.fu-mtile { display: inline-flex; align-items: center; gap: 6px; }
.fu-ftin { display: flex; gap: 4px; }
.fu-ftin input { min-width: 0; padding: 0 6px; text-align: center; }
.fu-statsum { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--bg3); border: none; border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fu-statsum svg { color: var(--text3); flex-shrink: 0; }
.fu-statsum-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fu-statsum-t b { font-size: 13px; }
.fu-statsum-t span { font-size: 12px; color: var(--text2); }
.fu-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fu-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg3); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fu-opt.on { border-color: var(--accent); background: var(--accent-faint); }
.fu-opt-t { font-size: 13px; font-weight: 600; }
.fu-opt-d { font-size: 11px; color: var(--text2); }
.fu-hint { font-size: 11px; color: var(--text3); margin-top: 6px; }
.fu-reco { display: flex; flex-direction: column; gap: 10px; }
.fu-big { display: flex; align-items: baseline; gap: 6px; }
.fu-big b { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-big span { font-size: 13px; color: var(--text2); }
.fu-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fu-tile { background: var(--bg3); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.fu-tile b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-tile span { font-size: 11px; color: var(--text2); }
.fu-actions { display: flex; gap: 10px; margin-top: 4px; }
.fu-actions .btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.fu-kcal-row { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.fu-kcal-row span { font-size: 14px; color: var(--text2); }
.fu-kcal-input { width: 150px; height: 52px; font-size: 26px; font-weight: 700; }
.fu-macro-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fu-macro-row label { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.fu-macro-row input { width: 80px; height: 42px; text-align: right; font-size: 16px; }
.fu-dot { width: 10px; height: 10px; border-radius: 5px; display: inline-block; flex-shrink: 0; }
.fu-other { width: 78px; font-size: 12px; color: var(--text2); }
.fu-split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin: 4px 0 10px; background: var(--fuel-track); }
.fu-split i { display: block; height: 100%; }
.fu-check { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.fu-check.ok { color: var(--green); }
.fu-check.warn { color: var(--fuel-warn); }
.fu-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

/* ─── home ───────────────────────────────────────────────────────────── */
.fu-home-head { margin-bottom: 12px; }
.fu-home-head h1 { margin-bottom: 6px; }
.fu-daynav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* the day's status chips (weigh-in, water, supps, burned): their own line under the date */
.fu-chiprow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fu-chiprow .sp-chip-wrap, .fu-chiprow .fu-burn-wrap, .fu-chiprow .bd-chip { margin-left: 0; }
.fu-iconbtn-sm { width: 30px; height: 30px; }
.fu-dateline { background: none; border: none; padding: 0; font: inherit; font-size: 13px; color: var(--text2); cursor: pointer; }
/* P / C / F badges: colored circle, white letter. Sizes s (rows) · m (meal headers) · l (totals) · xl (amount tiles). */
.fu-b { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; color: var(--on-macro); font-style: normal; font-weight: 800; line-height: 1; }
.fu-b-p { background: var(--protein); }
.fu-b-c { background: var(--carbs); }
.fu-b-f { background: var(--fat); }
.fu-b-k { background: var(--kcal); }
.fu-b-k svg { width: 64%; height: 64%; }
.fu-b-s { width: 15px; height: 15px; font-size: 9px; }
.fu-b-m { width: 18px; height: 18px; font-size: 10px; }
.fu-b-l { width: 24px; height: 24px; font-size: 12px; }
.fu-b-xl { width: 28px; height: 28px; font-size: 13px; }
.fu-macs { display: inline-flex; align-items: center; gap: 9px; }
.fu-macs-m { gap: 11px; font-size: 13px; font-weight: 600; color: var(--text); }
.fu-macs .fu-mac { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.fu-macs-m .fu-mac { gap: 4px; }

/* summary card: a sideways pager (Left / Eaten / Split); each page keeps the card's 16px gutter */
.fu-sum { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px 0 12px; }
.fu-sum-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fu-sum-track::-webkit-scrollbar { display: none; }
.fu-sum-page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
/* where the big number sits, outside the track: the pinned summary watches this (the pages scroll sideways out of view) */
.fu-sum-mark { position: absolute; left: 0; top: 16px; width: 1px; height: 42px; pointer-events: none; }
.fu-sum-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 42px; }
.fu-sum-title b { font-size: 30px; letter-spacing: -.8px; white-space: nowrap; }
.fu-sum-eaten em { font-style: normal; }
.fu-sum-eaten em.over { color: var(--red); font-weight: 600; }
.fu-sum-splitw { position: relative; }
.fu-sum-split { height: 8px; border-radius: 4px; overflow: hidden; display: flex; gap: 2px; background: var(--fuel-track); }
.fu-sum-split i { display: block; height: 100%; }
.fu-sum-split.plan i { opacity: .35; }
.fu-sum-split-tgt { position: absolute; left: 0; right: 0; top: -1px; height: 10px; pointer-events: none; }
.fu-sum-split-tgt i { position: absolute; top: 0; width: 2px; height: 10px; border-radius: 1px; background: var(--text); opacity: .55; transform: translateX(-1px); }
.fu-sm-s.ok, .fu-pin-c.ok small { color: var(--green); font-weight: 600; }
.fu-sm-s.off, .fu-pin-c.off small { color: var(--fuel-warn); font-weight: 600; }
.fu-sum-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; }
/* page dots: the button is the tap area, the pill is drawn by ::after (rounded, never clipped) */
.fu-sum-dots { display: flex; align-items: center; margin-left: -4px; }
.fu-sum-dots button { position: relative; width: 14px; height: 28px; margin: -10px 0; padding: 0; border: none; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fu-sum-dots button::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 3px; transform: translate(-50%, -50%); background: var(--text3); opacity: .45; transition: width .2s; }
.fu-sum-dots button.on { width: 24px; }
.fu-sum-dots button.on::after { width: 16px; background: var(--accent); opacity: 1; }
.fu-sum-dots span { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--text3); }
@media (prefers-reduced-motion: reduce) { .fu-sum-dots button::after { transition: none; } }
.fu-sum-big { display: flex; align-items: baseline; gap: 8px; }
.fu-sum-big b { font-size: 42px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.fu-sum-big span { font-size: 15px; font-weight: 600; color: var(--text2); }
.fu-sum-big.over b { color: var(--red); }
.fu-sum-big .fu-b { align-self: center; margin-right: -2px; }
.fu-sum-eaten { text-align: right; font-size: 12px; color: var(--text2); line-height: 1.4; font-variant-numeric: tabular-nums; }
.fu-sum .fu-bar-t.fu-sum-bar { height: 8px; border-radius: 4px; }
.fu-sum .fu-sum-bar i { height: 8px; border-radius: 4px; }
.fu-sum-macros { display: grid; gap: 12px; }
.fu-sm { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fu-sm-h { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.fu-sm-h b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-sm-h span { font-size: 12px; color: var(--text2); margin-left: -3px; }
.fu-sm-h.over span { color: var(--fuel-warn); font-weight: 600; }
.fu-sm .fu-bar-t { height: 5px; }
.fu-sm .fu-bar-t i { height: 5px; }
.fu-sm-s { font-size: 11px; color: var(--text3); font-variant-numeric: tabular-nums; }
.fu-bar { display: flex; flex-direction: column; gap: 4px; }
.fu-bar-h { display: flex; justify-content: space-between; font-size: 12px; }
.fu-bar-h span:first-child { font-weight: 600; }
.fu-bar-h span:last-child { color: var(--text2); font-variant-numeric: tabular-nums; }
.fu-bar-t { height: 6px; border-radius: 3px; background: var(--fuel-track); overflow: hidden; }
.fu-bar-t i { display: block; height: 6px; border-radius: 3px; }

.fu-meal { padding: 12px 12px 12px 16px; overflow: hidden; } /* clips swipe rows to the rounded corners */
.fu-meal-head { display: flex; align-items: center; gap: 12px; }
.fu-meal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.fu-meal-t { display: flex; align-items: baseline; gap: 8px; }
.fu-meal-t h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; line-height: 1.15; }
.fu-meal-t span { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.fu-meal-t .fu-meal-k { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; align-self: center; }
.fu-meal-k b { font-size: 15px; font-weight: 700; color: var(--text); }
.fu-meal-sub { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The header macros are a summary: smaller badges, muted numbers, so the meal name leads. */
.fu-meal-sub .fu-macs-m { font-size: 12px; font-weight: 600; color: var(--text2); gap: 10px; }
.fu-meal-sub .fu-macs-m .fu-b-m { width: 15px; height: 15px; font-size: 9px; }
.fu-meal-sub.empty { color: var(--text3); font-size: 13px; }
.fu-meal-sub b { color: var(--text); font-weight: 600; }
.fu-add { width: 40px; height: 40px; border-radius: 20px; border: none; background: var(--primary); color: var(--on-accent); box-shadow: var(--btn-shadow); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; padding: 0; }
.fu-add:active { transform: scale(.95); }
/* Home food rows: tap → amount panel (remove lives there, not on the row). */
.fu-rows { margin: 12px -12px 0 -16px; }
.fu-rows:last-child { margin-bottom: -12px; }
.fu-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 9px 12px 9px 16px; background: none; border: none; border-top: 1px solid var(--border); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fu-row:active { background: var(--bg3); }
.fu-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fu-row-n { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-row-b { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--text2); }
.fu-swipe.fu-new .fu-row { animation: fu-new 1.6s ease-out; }
@keyframes fu-new { 0%, 35% { background: var(--green-soft); } 100% { background: var(--bg2); } }
.fu-row-a { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; font-size: 12px; color: var(--text2); white-space: nowrap; min-width: 0; } /* long amounts push the counts to a 2nd line instead of clipping */
.fu-row-a > b { color: var(--text); font-weight: 600; }
.fu-row-a .fu-mac-k { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
/* food emoji tile (FuelCore.foodEmoji) */
.fu-fi { width: 38px; height: 38px; border-radius: 10px; background: var(--bg3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 21px; line-height: 1; }
.fu-row { gap: 11px; }
/* pinned summary: a zero-height sticky anchor; the bar hangs off it and slides in from above.
   top: -16px cancels #view's padding-top — sticky offsets are measured from the padded edge, so top: 0 left a gap that content showed through */
.fu-pin-anchor { position: sticky; top: -16px; height: 0; margin: 0 -16px; z-index: 20; }
.fu-pin { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 9px 16px 10px;
  background: var(--bg2); border-bottom: 1px solid var(--border); box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer;
  transform: translateY(-110%); visibility: hidden; transition: transform .18s ease, visibility 0s .18s; }
.fu-pin.show { transform: none; visibility: visible; transition: transform .18s ease; }
.fu-pin-c { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.fu-pin-t { display: flex; flex-direction: column; line-height: 1.1; }
.fu-pin-t b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fu-pin-t small { font-size: 11px; font-weight: 600; color: var(--text2); }
.fu-pin-c.over small { color: var(--fuel-warn); }
.fu-pin-c.over:first-child b, .fu-pin-c.over:first-child small { color: var(--red); }
.fu-ring { position: relative; width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.fu-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.fu-ring i { font-style: normal; font-size: 11px; font-weight: 800; line-height: 1; display: flex; }
.fu-ring i svg { position: static; transform: none; width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .fu-pin, .fu-pin.show { transition: none; } }
.fu-row > svg { color: var(--text3); flex-shrink: 0; }
.fu-meal-main { background: none; border: none; padding: 0; font: inherit; color: inherit; text-align: left; }
button.fu-meal-main { cursor: pointer; }
.fu-meal-chev { display: inline-flex; color: var(--text3); transition: transform .2s; align-self: center; }
.fu-meal.collapsed .fu-meal-chev { transform: rotate(-90deg); }
/* swipe-to-delete: the red Delete button sits under the row; the row slides left over it */
.fu-swipe { position: relative; overflow: hidden; border-top: 1px solid var(--border); }
.fu-swipe .fu-row { position: relative; z-index: 1; border-top: none; background: var(--bg2); transition: transform .2s ease; touch-action: pan-y; }
.fu-swipe .fu-row:active { background: var(--bg2); }
.fu-swipe.drag .fu-row { transition: none; }
.fu-swipe.open .fu-row { transform: translateX(-88px); }
.fu-swipe.gone .fu-row { transform: translateX(-100%); }
.fu-swipe-del { position: absolute; inset: 0; border: none; padding: 0; background: var(--red); color: var(--on-accent); font: inherit; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: flex-end; cursor: pointer; }
.fu-swipe-del span { width: 88px; text-align: center; transition: transform .15s; }
.fu-swipe.full .fu-swipe-del span, .fu-swipe.gone .fu-swipe-del span { transform: scale(1.12); }
.fu-rows + .fu-name-row { margin: 0 -12px 0 -16px; padding: 10px 12px 0 16px; border-top: 1px solid var(--border); }
.fu-name-row .fu-link { color: var(--text2); }
.fu-items { margin-top: 10px; border-top: 1px solid var(--border); }
.fu-item { border-bottom: 1px solid var(--border); }
.fu-item-row { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.fu-item-main { flex: 1; min-width: 0; background: none; border: none; padding: 6px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.fu-item-n { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-item-a { font-size: 12px; color: var(--text2); }
.fu-item.edit .fu-item-a { color: var(--accent); }
.fu-item-k { font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.fu-x { width: 36px; height: 36px; border: none; background: none; color: var(--text3); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; padding: 0; flex-shrink: 0; }
.fu-x:active { color: var(--red); background: var(--bg3); }
.fu-portion { display: flex; align-items: center; gap: 6px; padding: 0 0 10px; flex-wrap: wrap; }
.fu-pchip { min-width: 40px; height: 34px; padding: 0 10px; border-radius: 17px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.fu-pchip.on { background: var(--primary); border-color: transparent; color: var(--on-accent); }
.fu-unit { width: auto; max-width: 150px; height: 34px; padding: 0 28px 0 10px; font-size: 13px; border-radius: 17px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.fu-grams { width: 84px; height: 34px; padding: 0 10px; text-align: right; }
.fu-mac { white-space: nowrap; }
.fu-mac b { font-weight: 700; }
.fu-name-row { display: flex; align-items: center; gap: 8px; padding-top: 10px; }
.fu-name-row input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; font-size: 14px; }
.fu-meal-name { flex: 1; font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-planlink { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 4px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--ghost-bg, none); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fu-planlink.on { border-style: solid; }
.fu-planlink > svg:first-child { color: var(--accent); flex-shrink: 0; }
.fu-planlink > svg:last-child { color: var(--text3); flex-shrink: 0; }
.fu-planlink-t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fu-planlink-t b { font-size: 13px; font-weight: 600; }
.fu-planlink-t span { font-size: 12px; color: var(--text2); }

/* ─── add sheet (in #modal-container, own classes) ───────────────────── */
.fu-sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--backdrop); display: flex; align-items: flex-end; }
.fu-sheet { width: 100%; height: calc(100% - 40px - env(safe-area-inset-top)); background: var(--bg2); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--pop-shadow); }
.fu-sh-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 10px auto 6px; flex-shrink: 0; }
#fu-sh-main { padding: 0 16px; flex-shrink: 0; }
.fu-sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.fu-sh-head h1 { font-size: 19px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-sh-subhead { justify-content: flex-start; }
.fu-sh-close { width: 36px; height: 36px; border-radius: 18px; border: none; background: var(--bg3); color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.fu-sh-tools { display: flex; gap: 8px; margin-bottom: 4px; }
.fu-sh-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 10px 0 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text2); }
.fu-sh-search:focus-within { border-color: var(--accent); }
.fu-sh-search textarea { flex: 1; min-width: 0; background: none; border: none; outline: none; padding: 12px 0; margin: 0; font: inherit; font-size: 16px; line-height: 20px; color: var(--text); resize: none; overflow: hidden; display: block; }
.fu-sh-search > svg { align-self: flex-start; margin-top: 13px; flex-shrink: 0; }
.fu-sh-clear { align-self: flex-start; margin-top: 10px; }
.fu-sh-clear { width: 24px; height: 24px; border-radius: 12px; border: none; background: var(--bg4); color: var(--text2); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; flex-shrink: 0; }
.fu-sh-clear svg { width: 12px; height: 12px; }
.fu-sh-tool { width: 46px; height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg3); color: var(--text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; padding: 0; }
.fu-sh-kcal { font-size: 11px; font-weight: 800; letter-spacing: .02em; font-family: inherit; }
.fu-sh-scan { background: var(--primary); border-color: transparent; color: var(--on-accent); }
.fu-sh-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 16px; overscroll-behavior: contain; }
/* Bottom bars sit on the screen edge: clear the iPhone's rounded corners / home indicator (env() is 0 without viewport-fit=cover) */
.fu-sh-bar { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 12px 24px max(30px, calc(env(safe-area-inset-bottom) + 16px)); border-top: 1px solid var(--border); background: var(--bg2); }
.fu-sh-bar-t { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 14px; }
.fu-sh-bar-t { min-width: 0; }
.fu-sh-bar-n { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.fu-sh-bar-n > svg { color: var(--green); flex-shrink: 0; }
.fu-sh-bar-n > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-sh-bar-t .fu-muted .fu-link { font-size: inherit; }
.fu-sh-done { height: 46px; padding: 0 28px; }
.fu-sh-loading, .fu-sh-empty { color: var(--text3); font-size: 13px; padding: 14px 0; }
.fu-sh-amt { color: var(--text2); font-size: 13px; padding: 2px 0 6px; }
.fu-sh-amt b { color: var(--text); }
.fu-sh-sec { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text3); padding: 14px 0 8px; }
.fu-sh-sec span:last-child:not(:first-child) { font-weight: 400; letter-spacing: 0; }
.fu-past-row { display: flex; gap: 8px; overflow-x: auto; margin-right: -16px; padding-right: 16px; scroll-snap-type: x proximity; }
.fu-past-row::-webkit-scrollbar { display: none; }
.fu-past { width: 146px; flex-shrink: 0; background: var(--bg3); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; scroll-snap-align: start; }
.fu-past-l { font-size: 11px; font-weight: 700; color: var(--text2); }
.fu-past-l.hot { color: var(--accent); }
.fu-past-n { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fu-past-s { font-size: 12px; color: var(--text2); }
.fu-past-btn { margin-top: auto; height: 36px; border-radius: var(--radius-sm); border: none; background: var(--bg4); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; }
.fu-past-btn.ok { background: var(--green-soft); color: var(--green); }
.fu-list { display: flex; flex-direction: column; }
.fu-li { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.fu-li:last-child { border-bottom: none; }
.fu-li-row { width: 100%; display: flex; align-items: center; gap: 12px; }
.fu-li .fu-portion { width: 100%; padding: 8px 0 4px; }
.fu-li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; background: none; border: none; padding: 2px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
div.fu-li-main { cursor: default; }
.fu-li-main:disabled { cursor: default; opacity: 1; color: inherit; }
.fu-li-n { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.fu-li-s { font-size: 12px; color: var(--text2); }
.fu-li-m { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; flex-wrap: wrap; }
.fu-li-k { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fu-li-m .fu-li-k::before { content: '·'; color: var(--text3); margin-right: 9px; }
.fu-round { width: 40px; height: 40px; border-radius: 20px; border: 1.5px solid var(--accent); background: none; color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; padding: 0; }
.fu-round svg { width: 18px; height: 18px; }
.fu-round-ok { background: var(--green); border-color: transparent; color: var(--on-accent); }
.fu-sh-left { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text2); margin: -6px 0 12px; }
.fu-sh-left:empty { display: none; }
.fu-sh-left > b { color: var(--text); font-weight: 700; }
/* Search › Repeat a meal: a strip of cards. The open card turns into a tab joined to the
   pick panel under the strip (same fill, no border; a concave corner on its right). The
   strip stops scrolling while one is open and the card is slid to its left edge
   (_fuelPmAlign), so the panel's top-left corner is square under it. */
.fu-pm-row { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; margin-right: -16px; padding-right: 16px; scroll-snap-type: x proximity; }
.fu-pm-row::-webkit-scrollbar { display: none; }
.fu-pm-row.has-open { overflow-x: hidden; scroll-snap-type: none; padding-bottom: var(--radius); }
.fu-pm-pad { flex: 0 0 100%; }
.fu-pm { position: relative; flex: 0 0 172px; min-width: 0; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 12px; background: var(--bg3); border-radius: var(--radius); scroll-snap-align: start; }
.fu-pm .fu-li-main { padding: 0; }
.fu-pm .fu-round { width: 36px; height: 36px; }
.fu-pm .fu-round svg { width: 16px; height: 16px; }
.fu-pm-n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Cards stretch to the tallest one, so a 2-line date or name never leaves the open tab shorter
   than its neighbors. The open card alone reaches into the row's bottom padding to meet the panel. */
.fu-pm.on { background: var(--accent-soft); border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(10px + var(--radius)); margin-bottom: calc(-1 * var(--radius)); }
.fu-pm.on::after { content: ''; position: absolute; bottom: 0; right: calc(-1 * var(--radius)); width: var(--radius); height: var(--radius); background: radial-gradient(circle at 100% 0, transparent calc(var(--radius) - .5px), var(--accent-soft) var(--radius)); }
.fu-pm-when { font-size: 11px; font-weight: 700; color: var(--text2); }
.fu-pm-pick { background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.fu-pm-pick-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.fu-pm-x { width: 36px; height: 36px; border-radius: 18px; border: none; background: var(--bg2); color: var(--text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; cursor: pointer; }
.fu-pm-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; cursor: pointer; }
.fu-pm-item span:nth-of-type(1) { flex: 1; min-width: 0; }
.fu-pm-ok { width: 100%; border: none; font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; margin-top: 6px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green); font-size: 14px; font-weight: 600; }
.fu-pm-pick .btn { height: 44px; margin-top: 6px; }
.fu-pm-pick .btn:disabled { opacity: .5; }
.fu-sh-create { padding: 14px 0 4px; }
.fu-sub { padding-top: 6px; }
.fu-qa-kcal { height: 64px; font-size: 32px; font-weight: 700; }
.fu-grid3-eq { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fu-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fu-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fu-grid4 input { padding: 0 8px; }
.fu-remote-note { padding: 10px 0 2px; }
.fu-attrib { font-size: 11px; color: var(--text3); padding: 12px 0 0; }

/* ─── amount panel (one "how much" editor for home rows and the add sheet) ─── */
.fu-amt-backdrop { position: fixed; inset: 0; z-index: 120; background: var(--backdrop); display: flex; align-items: flex-end; }
.fu-amt { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; width: 100%; max-height: calc(100% - 40px - env(safe-area-inset-top)); overflow-y: auto; background: var(--bg2); border-radius: 22px 22px 0 0; box-shadow: var(--pop-shadow);
  /* bottom gap keeps the pad's last row (0 key) off the screen edge: a double tap there opens iOS "Type to Siri" */
  padding: 0 16px max(30px, calc(env(safe-area-inset-bottom) + 16px)); display: flex; flex-direction: column; gap: 12px; }
.fu-amt .fu-sh-handle { margin-bottom: 0; }
.fu-amt-head { display: flex; align-items: flex-start; gap: 8px; }
.fu-amt-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fu-amt-head h2 { font-size: 18px; font-weight: 700; }
.fu-amt-head span { font-size: 12px; color: var(--text2); }
.fu-amt-trash { color: var(--red); }
.fu-amt-head .fu-amt-edit { align-self: flex-start; margin-top: 3px; }
/* Edit food view: the panel blocks text selection for its pad; the form's inputs need it back */
.fu-amt-ed { -webkit-user-select: auto; user-select: auto; }
.fu-amt-ed .fu-amt-head { align-items: center; }
.fu-amt-hide { color: var(--text2); }
/* "Don't suggest this": manage list under Recent foods, hidden search results */
.fu-hid-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 6px; }
.fu-hid .fu-li-main { cursor: default; padding: 6px 0; }
.fu-hid .fu-li-n { color: var(--text2); font-weight: 500; }
.fu-hid-btn { flex-shrink: 0; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fu-hid-list .fu-li-n { color: var(--text2); }
.fu-amt-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 58px; padding: 0 16px; border-radius: var(--radius); background: var(--bg); border: 2px solid var(--accent); }
.fu-amt-num { display: inline-flex; align-items: center; min-width: 0; font-size: 28px; font-weight: 800; color: var(--text); }
/* fresh = the next key replaces the value, shown like selected text; otherwise a caret */
.fu-amt-num.fresh { background: var(--accent-soft); border-radius: 6px; padding: 0 4px; margin-left: -4px; }
.fu-amt-num:not(.fresh)::after { content: ''; width: 2px; height: 28px; margin-left: 1px; background: var(--accent); animation: fu-caret 1s steps(1) infinite; }
@keyframes fu-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fu-amt-num::after { animation: none; } }
.fu-amt-box > span:last-child { font-size: 15px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.fu-amt-pills { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.fu-amt-pills::-webkit-scrollbar { display: none; }
.fu-upill { flex-shrink: 0; height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.fu-upill.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.fu-amt-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--bg3); font-variant-numeric: tabular-nums; }
.fu-amt-strip .fu-mac { display: inline-flex; align-items: center; gap: 5px; }
.fu-amt-strip b { font-size: 17px; font-weight: 800; }
.fu-amt-strip small { font-size: 12px; font-weight: 600; color: var(--text2); margin-left: -3px; }
.fu-amt-strip .fu-amt-kcal { font-size: 13px; font-weight: 700; color: var(--accent); }
.fu-amt-strip .fu-amt-kcal b { font-size: 17px; }
.fu-amt-after { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; padding: 0 2px; font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.fu-amt-after > span:first-child { font-weight: 700; color: var(--text3); }
.fu-amt-after b { color: var(--text); font-weight: 800; }
.fu-amt-after .fu-mac { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.fu-amt-after .over { color: var(--fuel-warn); font-weight: 600; }
.fu-amt-after .hit { color: var(--green); font-weight: 600; }
/* own number pad: replaces the iOS keyboard so nothing is covered; the tall key saves */
.fu-amt-pad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 52px; gap: 6px; margin-top: 2px; }
.fu-amt-pad { touch-action: none; }
.fu-key { border: none; border-radius: 12px; background: var(--bg3); color: var(--text); font: inherit; font-size: 24px; font-weight: 500; display: flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; padding: 0; }
.fu-key:active, .fu-key.down { background: var(--bg4); }
.fu-key.fn { background: var(--bg4); color: var(--text2); font-size: 20px; font-weight: 700; }
.fu-key.fn:active, .fu-key.fn.down { background: var(--bg3); }
.fu-key.go { grid-column: 4; grid-row: 2 / span 3; flex-direction: column; gap: 3px; background: var(--primary); color: var(--on-accent); text-align: center; line-height: 1.15; padding: 0 4px; }
.fu-key.go b { font-size: 18px; font-weight: 800; }
.fu-key.go small { font-size: 11px; font-weight: 600; opacity: .9; overflow-wrap: anywhere; }
.fu-key.go:active, .fu-key.go.down { filter: brightness(.92); }
.fu-key.go:disabled { opacity: .45; cursor: default; }

/* ─── barcode scanner ─────────────────────────────────────────────────── */
.fu-scan { position: fixed; inset: 0; z-index: 150; background: var(--fuel-scan-bg); color: var(--fuel-scan-fg); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fu-scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fu-scan-top { position: absolute; left: 0; right: 0; top: 0; padding: max(16px, env(safe-area-inset-top)) 16px 0; display: flex; align-items: center; gap: 10px; z-index: 2; }
.fu-scan-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px var(--fuel-scan-scrim); }
.fu-scan-btn { width: 40px; height: 40px; border-radius: 20px; border: none; background: var(--fuel-scan-scrim); color: var(--fuel-scan-fg); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.fu-scan-btn.on { background: var(--fuel-scan-fg); color: var(--fuel-scan-bg); }
.fu-scan-reticle { position: relative; width: 250px; height: 140px; margin-top: -140px; z-index: 1; box-shadow: 0 0 0 100vmax var(--fuel-scan-scrim); border-radius: 8px; }
.fu-scan-reticle.off { visibility: hidden; }
.fu-scan-reticle i { position: absolute; width: 26px; height: 26px; border: 0 solid var(--accent); }
.fu-scan-reticle.ok i { border-color: var(--green); }
.fu-scan-reticle i:nth-child(1) { left: 0; top: 0; border-left-width: 4px; border-top-width: 4px; border-radius: 6px 0 0 0; }
.fu-scan-reticle i:nth-child(2) { right: 0; top: 0; border-right-width: 4px; border-top-width: 4px; border-radius: 0 6px 0 0; }
.fu-scan-reticle i:nth-child(3) { left: 0; bottom: 0; border-left-width: 4px; border-bottom-width: 4px; border-radius: 0 0 0 6px; }
.fu-scan-reticle i:nth-child(4) { right: 0; bottom: 0; border-right-width: 4px; border-bottom-width: 4px; border-radius: 0 0 6px 0; }
.fu-scan-hint { position: relative; z-index: 1; margin-top: 14px; font-size: 13px; color: var(--fuel-scan-fg); opacity: .8; min-height: 18px; }
.fu-scan-panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; }
.fu-scan-panel.added { left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--bg2); color: var(--text); border: 1px solid var(--green); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fu-scan-panel.added .fu-portion { padding: 0; }
.fu-scan-added { display: flex; align-items: center; gap: 10px; }
.fu-scan-added .fu-round { width: 32px; height: 32px; }
.fu-scan-actions { display: flex; gap: 8px; }
.fu-scan-soft { flex: 1; height: 40px; border-radius: var(--radius-sm); border: none; background: var(--bg3); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fu-scan-product { height: auto; max-height: 75vh; overflow-y: auto; color: var(--text); padding: 0 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.fu-scan-product h1 { font-size: 19px; }
.fu-scan-found { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 600; }
.fu-scan-amount { display: flex; align-items: center; gap: 10px; }
.fu-stepper { display: flex; align-items: center; gap: 4px; }
.fu-stepper button { width: 40px; height: 44px; border-radius: var(--radius-sm); border: none; background: var(--bg3); color: var(--text); font: inherit; font-size: 18px; cursor: pointer; }
.fu-stepper b { min-width: 32px; text-align: center; font-size: 17px; }
.fu-stepper input { width: 90px; height: 44px; text-align: right; }
.fu-tiles4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fu-tiles4 .fu-tile { align-items: center; padding: 10px 6px; }
.fu-scan-alt { align-self: center; font-size: 13px; }
/* "Not right? Fix it" + the implausible-numbers flag (FuelCore.checkFood) */
.fu-scan-tags { display: flex; gap: 6px; align-items: center; }
.fu-scan-mine { display: inline-flex; padding: 4px 12px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.fu-scan-alts { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.fu-scan-alt.dim { color: var(--text2); }
.fu-tile.fu-hot { box-shadow: inset 0 0 0 1.5px var(--fuel-warn); }
.fu-scan-flag { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--fuel-warn-soft); }
.fu-scan-flag > b { display: inline-flex; align-items: center; gap: 6px; color: var(--fuel-warn); font-size: 14px; }
.fu-scan-flag p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text); }
.fu-scan-flag-acts { display: flex; gap: 16px; flex-wrap: wrap; }
.fu-scan-flag-acts button { background: none; border: none; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--fuel-warn); cursor: pointer; }
.fu-scan-flag-acts button.dim { color: var(--text2); }
.fu-fix-hint { margin-top: -4px; font-size: 13px; }
.fu-field input[readonly] { color: var(--text2); background: transparent; }
.fu-field input.fu-changed { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.fu-was { font-style: normal; font-size: 11px; color: var(--text3); text-decoration: line-through; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-fix-share { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg3); font-size: 13px; color: var(--text2); cursor: pointer; }
.fu-fix-share input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.fu-fix-share b { color: var(--text); font-weight: 600; }
/* Admin → Food fixes */
.fu-fx { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.fu-fx-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fu-fx-tbl { overflow-x: auto; }
.fu-fx-tbl table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.fu-fx-tbl th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text3); padding: 4px 6px 4px 0; }
.fu-fx-tbl td { padding: 4px 6px 4px 0; vertical-align: top; }
.fu-fx-new { color: var(--accent); font-weight: 600; }
.fu-fx-new s { display: block; font-weight: 400; font-size: 11px; color: var(--text3); }
.fu-scan-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 24px max(30px, calc(env(safe-area-inset-bottom) + 16px)); background: var(--bg2); color: var(--text); border-top: 1px solid var(--border); }

/* ─── one-tap suggestions ────────────────────────────────────────────── */
/* Ghost rows: dashed outline, no fill, muted italic name, no macro badges, so a
   suggestion never reads as food that's already logged. */
.fu-sugg { display: flex; flex-direction: column; gap: 8px; margin: 12px 4px 0 0; }
.fu-sugg-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 12px; border-radius: var(--radius-sm); border: 1.5px dashed var(--border); min-width: 0; }
.fu-sugg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fu-sugg-l { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--text3); }
.fu-sugg-l.hot { color: var(--accent); }
.fu-sugg-n { font-size: 14px; font-weight: 500; font-style: italic; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-sugg-s { font-size: 12px; color: var(--text3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fu-sugg-log { flex-shrink: 0; height: 36px; padding: 0 16px; border-radius: 18px; border: none; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fu-sugg-log:active { transform: scale(.96); }
.fu-toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 12px); z-index: 300; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  background: var(--toast-bg); color: var(--fuel-scan-fg); padding: 8px 8px 8px 16px; border-radius: 22px; font-size: 13px; box-shadow: var(--pop-shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.fu-toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.fu-toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-toast button { flex-shrink: 0; height: 30px; padding: 0 14px; border-radius: 15px; border: none; background: var(--fuel-scan-soft); color: var(--accent2); font: inherit; font-weight: 700; cursor: pointer; }

/* ─── plan ───────────────────────────────────────────────────────────── */
.fu-daychip-wrap { position: relative; margin-left: 2px; }
.fu-daychip { background: var(--accent-soft); color: var(--accent); border: none; border-radius: 20px; padding: 2px 9px; font: inherit; font-size: 11px; font-weight: 700; line-height: 1.6; cursor: pointer; white-space: nowrap; }
.fu-daymenu { width: 200px; padding: 6px; display: flex; flex-direction: column; }
.fu-daymenu-i { display: flex; align-items: center; gap: 8px; background: none; border: none; border-radius: 8px; padding: 9px 8px; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.fu-daymenu-i.on { background: var(--accent-faint); color: var(--accent); font-weight: 600; }
.fu-divider { width: 100%; display: flex; align-items: center; gap: 8px; padding: 2px 16px 12px; background: none; border: none; font: inherit; font-size: 12px; color: var(--text2); text-align: left; }
button.fu-divider { cursor: pointer; }
.fu-divider svg { color: var(--accent); flex-shrink: 0; }
.fu-divider b { color: var(--text); font-weight: 600; white-space: nowrap; }
.fu-divider span { white-space: nowrap; }
.fu-divider i { flex: 1; height: 1px; background: var(--border); min-width: 12px; }
.fu-meal.hot { border-color: var(--accent); }
.fu-meal-note { font-size: 12px; color: var(--text2); }
.fu-meal-note.hot { color: var(--accent); font-weight: 600; }
.fu-plan-line { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.fu-plan-line span { flex: 1; min-width: 0; font-size: 12px; color: var(--text3); font-style: italic; }
.fu-logplan { flex-shrink: 0; height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fu-logplan.hot { background: var(--primary); border-color: transparent; color: var(--on-accent); }
.fu-plan-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; cursor: pointer; }
.fu-switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--bg4); display: inline-block; transition: background .2s; flex-shrink: 0; }
.fu-switch.on { background: var(--primary); }
.fu-switch input { position: absolute; inset: 0; width: 44px; height: 26px; margin: 0; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.fu-switch i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 10px; background: var(--bg2); box-shadow: var(--knob-shadow, var(--card-shadow)); transition: left .2s; pointer-events: none; }
.fu-switch.on i { left: 21px; }
.fu-plan-card { display: flex; flex-direction: column; gap: 12px; }
.fu-dt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fu-dt { background: var(--bg3); border-radius: var(--radius-sm); padding: 10px 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fu-dt-h { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text2); white-space: nowrap; }
.fu-dt-h .fu-dot { width: 8px; height: 8px; }
.fu-dt b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-dt > span { font-size: 11px; color: var(--text2); }
.fu-dt-step { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.fu-dt-step button { width: 28px; height: 28px; border-radius: 6px; border: none; background: var(--bg4); color: var(--text); font: inherit; font-size: 16px; cursor: pointer; padding: 0; }
.fu-dt-step em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text2); font-variant-numeric: tabular-nums; }
.fu-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fu-week-d { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border-radius: 8px; background: var(--bg3); border: 1px solid transparent; min-width: 0; }
.fu-week-d b { font-size: 11px; font-weight: 700; color: var(--text2); }
.fu-week-d span { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.fu-week-d .fu-dot { width: 8px; height: 8px; }
.fu-week-d.today { background: var(--accent-faint); border-color: var(--accent); }
.fu-week-d.today b { color: var(--accent); }
.fu-tpl-row { width: 100%; background: none; border-left: none; border-right: none; border-top: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.fu-tpl-row > svg { color: var(--text3); flex-shrink: 0; }
.fu-tag { font-size: 10px; font-weight: 700; border-radius: 20px; padding: 1px 7px; white-space: nowrap; }
.fu-tag.carbs { color: var(--carbs); background: var(--carbs-soft); }
.fu-tag.protein { color: var(--protein); background: var(--protein-soft); }
.fu-tag.prep { color: var(--text2); border: 1px solid var(--border); padding: 0 6px; }
.fu-tag.logged { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); padding: 0; font-size: 11px; vertical-align: -1px; }
.fu-tag.logged svg { width: 11px; height: 11px; }
.fu-today-strip { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; font: inherit; color: var(--text); text-align: left; cursor: pointer; margin-bottom: 14px; }
.fu-ts-head { display: flex; align-items: center; gap: 8px; }
.fu-ts-head svg:first-child { color: var(--accent); flex-shrink: 0; }
.fu-ts-head b { font-size: 13px; font-weight: 600; }
.fu-ts-head span { flex: 1; min-width: 0; font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-ts-head svg:last-child { color: var(--text3); flex-shrink: 0; }
.fu-ts-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fu-ts-bar .fu-bar-h { font-size: 11px; color: var(--text2); }
.fu-ts-bar .fu-bar-h span:first-child { font-weight: 400; }
.fu-ts-bar .fu-bar-t { height: 5px; }
.fu-post-prompt { display: flex; align-items: center; gap: 10px; background: var(--accent-faint); border: 1px solid var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.fu-post-prompt > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fu-post-prompt b { font-size: 13px; }
.fu-post-prompt span { font-size: 12px; color: var(--text2); }

/* ─── Progress › Nutrition ────────────────────────────────────────────── */
.fu-tt { display: flex; flex-direction: column; gap: 10px; }
.fu-tt .fu-link { font-size: 13px; }
.fu-tt-grid { display: grid; grid-template-columns: 76px repeat(4, minmax(0, 1fr)); font-size: 14px; font-variant-numeric: tabular-nums; }
.fu-tt-grid > * { padding: 7px 0; border-top: 1px solid var(--border); text-align: right; }
.fu-tt-grid > em { font-style: normal; font-size: 11px; color: var(--text2); border-top: none; padding-top: 0; display: flex; justify-content: flex-end; align-items: center; }
.fu-tt-grid > div:first-child { border-top: none; padding-top: 0; }
.fu-tt-grid .fu-tt-name { text-align: left; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }
.fu-tt-name i { width: 8px; height: 8px; border-radius: 2px; }
.fu-tt-grid b { font-weight: 700; }
.fu-trend { display: flex; flex-direction: column; gap: 10px; }
.fu-tc { position: relative; }
.fu-tc-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--chart-grid); }
.fu-tc-line span { position: absolute; left: 0; top: -7px; font-size: 10px; color: var(--text2); background: var(--bg2); padding-right: 3px; font-variant-numeric: tabular-nums; }
.fu-tc::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--border); }
.fu-tc-bars { position: absolute; left: 36px; right: 0; top: 0; bottom: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.fu-tc-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0; border: none; border-radius: 6px 6px 0 0; background: none; cursor: pointer; font: inherit; }
.fu-tc-col.sel { background: var(--bg3); }
.fu-tc-bar { display: block; width: 22px; max-width: 80%; min-height: 2px; border-radius: 4px 4px 0 0; opacity: .55; }
.fu-tc-col.today .fu-tc-bar { opacity: .35; }
.fu-tc-col.sel .fu-tc-bar { opacity: 1; }
.fu-tc-tick { position: absolute; left: 3px; right: 3px; height: 2px; border-radius: 1px; background: var(--text); opacity: .6; }
.fu-tc-col.sel .fu-tc-tick { opacity: 1; }
.fu-tc-val { font-size: 10px; font-weight: 700; color: var(--text); margin-bottom: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fu-tc-labels { margin: 0 0 0 36px; gap: 6px; }
.fu-tc-labels .sel { color: var(--text); font-weight: 700; }
.fu-trend .fu-legend { margin-top: 0; gap: 12px; }
.fu-tc-hint { margin-left: auto; }
.fu-td { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.fu-td-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fu-td-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fu-td-head b { font-size: 15px; font-weight: 700; }
.fu-td-head span { font-size: 12px; color: var(--text2); }
.fu-td-status { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: var(--bg4); color: var(--text); white-space: nowrap; }
.fu-td-status.ok { background: var(--green-soft); color: var(--green); }
.fu-td-status.over { background: var(--fuel-warn-soft); color: var(--fuel-warn); }
.fu-td-status.now { background: var(--accent-soft); color: var(--accent); }
.fu-td-kcal { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.fu-td-kcal b { font-size: 32px; font-weight: 700; color: var(--accent); }
.fu-td-kcal span { font-size: 14px; color: var(--text2); }
.fu-td-track { height: 6px; border-radius: 3px; background: var(--fuel-track); overflow: hidden; }
.fu-td-track i { display: block; height: 100%; border-radius: 3px; }
.fu-td-ktrack { height: 8px; border-radius: 4px; }
.fu-td-ktrack i { background: var(--accent); }
.fu-td-macs { display: flex; flex-direction: column; gap: 9px; }
.fu-td-mac { display: grid; grid-template-columns: 20px minmax(0, 1fr) 96px; align-items: center; gap: 10px; }
.fu-td-mac > span { font-size: 13px; text-align: right; color: var(--text2); font-variant-numeric: tabular-nums; }
.fu-td-mac > span b { color: var(--text); }
.fu-td-meals { background: var(--bg3); border-radius: 10px; overflow: hidden; }
.fu-td-meals div { display: flex; justify-content: space-between; padding: 9px 12px; border-top: 1px solid var(--border); font-size: 13px; }
.fu-td-meals div:first-child { border-top: none; }
.fu-td-meals span { color: var(--text2); }
.fu-td-meals b { font-weight: 600; font-variant-numeric: tabular-nums; }
.fu-td .fu-link { align-self: flex-start; font-size: 13px; }
.fu-b7-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; text-align: center; font-size: 11px; color: var(--text2); margin-top: 8px; line-height: 1.35; }
.fu-b7-labels div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-b7-labels .today { color: var(--accent); font-weight: 700; }
.fu-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: var(--text2); margin-top: 12px; }
.fu-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fu-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.fu-legend i.tick { width: 12px; height: 2px; background: var(--text); }
.fu-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.fu-stat { margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.fu-stat span { font-size: 11px; color: var(--text2); }
.fu-stat b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-stat em { font-style: normal; font-size: 11px; color: var(--text2); }
.fu-fxt { display: flex; flex-direction: column; gap: 10px; }
.fu-fxt b { font-variant-numeric: tabular-nums; }

/* ─── calories burned (context only — never changes targets) ─────────── */
.fu-burn-wrap { margin-left: auto; }
.fu-burn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fu-burn svg { color: var(--text2); }
.fu-burn b { font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-burn span { color: var(--text2); }
.fu-burn-pop[hidden] { display: none; }
.fu-burn-pop { left: auto; right: 0; width: 250px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.fu-burn-h { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text2); }
.fu-burn-i { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.fu-burn-i .fu-dot { width: 8px; height: 8px; }
.fu-burn-i span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-burn-i em { font-style: normal; color: var(--text2); white-space: nowrap; }
.fu-burn-i b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fu-burn-i svg { color: var(--text2); flex-shrink: 0; }
.fu-burn-tot { border-top: 1px solid var(--border); padding-top: 8px; font-weight: 600; }
.fu-burn-note { font-size: 12px; line-height: 1.45; color: var(--text2); }
.fu-tc-burn { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); font-weight: 600; font-variant-numeric: tabular-nums; }
.fu-tc-burn .none { color: var(--text3); font-weight: 400; }
.fu-legend .fu-lg-burn svg { width: 12px; height: 12px; color: var(--text2); }
.fu-td-burn { background: var(--bg3); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.fu-td-burn .fu-burn-tot { border-top: none; padding-top: 0; }
.fu-td-burn .fu-burn-i:not(.fu-burn-tot) { padding-left: 23px; font-size: 12px; color: var(--text2); }
.fu-bw { display: flex; flex-direction: column; gap: 12px; }
.fu-bw-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fu-bw-big b { font-size: 28px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.fu-bw-big span { font-size: 13px; color: var(--text2); }
.fu-bw-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.fu-bw-split { display: grid; gap: 8px; }
.fu-bw-split div { display: flex; flex-direction: column; gap: 2px; }
.fu-bw-split span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text2); }
.fu-bw-split .fu-dot { width: 8px; height: 8px; }
.fu-bw-split b { font-size: 15px; font-variant-numeric: tabular-nums; }
