/* ==========================================================
   Diet AI — design system
   ========================================================== */
:root {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e7ecf3;
  --input: #f5f7fb;

  --brand: #10b981;
  --brand-2: #0d9488;
  --brand-ink: #ffffff;
  --brand-soft: #e7f8f1;
  --grad: linear-gradient(135deg, #10b981 0%, #0d9488 45%, #2563eb 100%);
  --ocean: #2563eb;
  --grad-warm: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  --grad-violet: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #d946ef 100%);
  --grad-sky: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);

  --protein: #6366f1;
  --carbs: #f59e0b;
  --fat: #ec4899;
  --fiber: #65a30d;
  --water: #0ea5e9;
  --danger: #ef4444;
  --warn: #f59e0b;

  --m-breakfast: #f59e0b;
  --m-lunch: #10b981;
  --m-dinner: #8b5cf6;
  --m-snack: #ec4899;

  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 18px 40px rgba(13, 148, 136, .28);
  --radius: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --bg-2: #111a2e; --card: #131c2f; --text: #e8eefb; --muted: #8a99b4; --line: #1f2b44; --input: #0e1627;
    --brand-soft: #0f2e2a; --protein: #818cf8; --carbs: #fbbf24; --fat: #f472b6; --fiber: #a3e635; --water: #38bdf8;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 18px 40px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --bg-2: #111a2e; --card: #131c2f; --text: #e8eefb; --muted: #8a99b4; --line: #1f2b44; --input: #0e1627;
  --brand-soft: #0f2e2a; --protein: #818cf8; --carbs: #fbbf24; --fat: #f472b6; --fiber: #a3e635; --water: #38bdf8;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 18px 40px rgba(0,0,0,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 420px at 110% -10%, rgba(16,185,129,.16), transparent 60%),
    radial-gradient(700px 380px at -20% 0%, rgba(99,102,241,.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 0.9375rem/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
a { color: var(--brand-2); font-weight: 600; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#app { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 12px;
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar h1 { font-size: 1.45rem; font-weight: 800; flex: 1; }
.topbar .titles { flex: 1; min-width: 0; }
.topbar .titles h1 { font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .hello { font-size: .8rem; color: var(--muted); font-weight: 600; }
.avatar {
  width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; box-shadow: 0 6px 16px rgba(16,185,129,.35); flex: none;
}
.icon-btn {
  border: 0; background: var(--card); width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; box-shadow: var(--shadow); font-size: 1.1rem; color: var(--text);
}
.datenav { display: flex; align-items: center; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 3px; }
.datenav button { border: 0; background: none; height: 34px; min-width: 30px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.datenav .datepill { color: var(--text); padding: 0 8px; font-size: .86rem; }
.datenav button:hover { background: var(--bg-2); }

.view { flex: 1; padding: 4px 18px calc(110px + env(safe-area-inset-bottom)); }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec { display: flex; align-items: center; gap: 10px; }
.sec-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; font-size: 1rem; }
.sec-ico svg.i { width: 18px; height: 18px; }
.section-label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 4px 10px; }

/* ---------- Buttons ---------- */
.btn {
  border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 700; letter-spacing: .01em;
  background: var(--grad); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(16,185,129,.28); transition: transform .12s ease, box-shadow .12s ease, opacity .12s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--brand-soft); color: var(--brand-2); box-shadow: none; }
.btn.outline { background: var(--card); border: 1px solid var(--line); color: var(--text); box-shadow: none; }
.btn.danger { background: transparent; border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); box-shadow: none; }
.btn.sm { padding: 8px 13px; font-size: .86rem; border-radius: 11px; }
.btn.white { background: #fff; color: #0d9488; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.link { background: none; border: 0; color: var(--brand-2); font-weight: 700; padding: 4px; }

/* ---------- Forms ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=number], input[type=password], input[type=search], input[type=date], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--input); border-radius: 14px; padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { resize: vertical; min-height: 74px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; background: var(--input); border: 1.5px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,.3); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: .86rem; font-weight: 600; }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(16,185,129,.3); }

/* ---------- Today: hero ---------- */
.hero-card {
  position: relative; overflow: hidden; border-radius: 26px; padding: 22px; color: #fff; margin-bottom: 14px;
  background: var(--grad); box-shadow: var(--shadow-lg);
}
.hero-card::before, .hero-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.hero-card::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.hero-card::after { width: 140px; height: 140px; left: -50px; bottom: -70px; background: rgba(255,255,255,.08); }
.hero-card.violet { background: var(--grad-violet); box-shadow: 0 18px 40px rgba(99,102,241,.3); }
.hero-card.over { background: var(--grad-warm); box-shadow: 0 18px 40px rgba(236,72,153,.3); }
.hero-top { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.hero-label { font-size: .82rem; font-weight: 600; opacity: .9; }
.hero-num { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 2px; }
.hero-num small { font-size: 1rem; font-weight: 600; opacity: .85; letter-spacing: 0; }
.hero-sub { font-size: .82rem; opacity: .9; margin-top: 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.hero-stats div { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 9px 10px; backdrop-filter: blur(6px); }
.hero-stats span { display: block; font-size: .72rem; opacity: .88; font-weight: 600; }
.hero-stats b { font-size: 1.05rem; }
.ring { position: relative; width: 112px; height: 112px; flex: none; margin-left: auto; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring .ring-txt b { font-size: 1.35rem; font-weight: 800; }
.ring .ring-txt span { font-size: .7rem; opacity: .9; font-weight: 600; }

/* Macro cards */
.macro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.macro-card { background: var(--card); border-radius: 18px; padding: 12px 4px 10px; box-shadow: var(--shadow); text-align: center; border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); min-width: 0; }
.mini-ring { position: relative; width: 54px; height: 54px; margin: 0 auto 6px; }
.mini-ring svg { transform: rotate(-90deg); display: block; width: 100%; height: 100%; }
.mini-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .74rem; font-weight: 800; }
.macro-card .lbl { font-size: .78rem; font-weight: 700; }
.macro-card .val { font-size: .68rem; color: var(--muted); white-space: nowrap; }

/* Meal cards */
.meal-card { --mc: var(--brand); position: relative; overflow: hidden; }
.meal-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mc); }
.meal-head { display: flex; align-items: center; gap: 12px; }
.meal-ico {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 1.35rem; flex: none;
  background: color-mix(in srgb, var(--mc) 16%, transparent);
}
.meal-head h3 { font-size: 1.02rem; }
.add-mini {
  width: 38px; height: 38px; border-radius: 12px; border: 0; flex: none; font-size: 1.4rem; line-height: 1; font-weight: 500;
  background: color-mix(in srgb, var(--mc) 15%, transparent); color: var(--mc);
}
.meal-bar { height: 5px; border-radius: 9px; background: var(--bg-2); margin-top: 12px; overflow: hidden; }
.meal-bar i { display: block; height: 100%; background: var(--mc); border-radius: 9px; }
.food-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px dashed var(--line); cursor: pointer; }
.food-item:first-of-type { margin-top: 12px; }
.thumb { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex: none; background: var(--bg-2); display: grid; place-items: center; font-size: 1.2rem; }
.food-item .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.food-item .kcal { font-weight: 800; white-space: nowrap; text-align: right; line-height: 1.1; }
.food-item .kcal small { display: block; font-size: .68rem; color: var(--muted); font-weight: 600; }
.tag { display: inline-block; font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }
.tag.ai { background: color-mix(in srgb, var(--protein) 15%, transparent); color: var(--protein); }
.macro-dots { display: flex; flex-wrap: wrap; gap: 2px 9px; font-size: .74rem; color: var(--muted); }
.macro-dots span { white-space: nowrap; }
.macro-dots span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: var(--d); }
.empty { color: var(--muted); font-size: .85rem; }

/* Water */
.water-card { background: linear-gradient(135deg, color-mix(in srgb, var(--water) 14%, var(--card)), var(--card) 70%); }
.water { display: flex; gap: 8px; flex-wrap: wrap; }
.glass {
  width: 32px; height: 40px; border-radius: 8px 8px 12px 12px; border: 2px solid color-mix(in srgb, var(--water) 55%, transparent);
  background: transparent; padding: 0; position: relative; overflow: hidden; transition: transform .1s;
}
.glass:active { transform: scale(.92); }
.glass.full { border-color: var(--water); }
.glass.full::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 78%; background: linear-gradient(180deg, #7dd3fc, var(--water)); }

/* Notice / promo */
.promo {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; margin-bottom: 14px; color: #fff;
  background: var(--grad-violet); box-shadow: 0 12px 28px rgba(99,102,241,.28);
}
.promo .e { font-size: 1.6rem; }
.promo b { display: block; }
.promo span { font-size: .8rem; opacity: .9; }
.notice { border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--card)); padding: 12px 14px; border-radius: 16px; font-size: .88rem; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 10;
  max-width: 600px; margin: 0 auto; height: 68px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 24px; box-shadow: 0 12px 34px rgba(15,23,42,.14);
}
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .68rem; font-weight: 700; color: var(--muted); padding: 6px 0; }
.tab svg.i { width: 23px; height: 23px; }
.tab.active { color: var(--brand-2); }
.tab.active svg.i { stroke: url(#tabgrad); }
.add-tab .plus {
  width: 58px; height: 58px; border-radius: 20px; background: var(--grad); color: #fff;
  display: grid; place-items: center; margin-top: -30px; box-shadow: 0 10px 24px rgba(16,185,129,.45);
  border: 4px solid var(--bg);
}
.add-tab .plus svg.i { width: 26px; height: 26px; stroke-width: 2.6; }

/* ---------- Bottom sheet ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.5); backdrop-filter: blur(3px); z-index: 20; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 640px; margin: 0 auto;
  background: var(--card); border-radius: 28px 28px 0 0; max-height: 92vh; overflow-y: auto;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .25s cubic-bezier(.2,.9,.3,1);
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
}
@keyframes up { from { transform: translateY(60px); opacity: .3; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 6px auto 14px; }
.sheet-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sheet-top h2 { flex: 1; font-size: 1.2rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .icon-btn { background: var(--bg-2); box-shadow: none; }

.add-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0 18px; }
.add-opt {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 20px; padding: 14px;
  display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: .9rem; text-align: left;
  transition: transform .12s, border-color .12s;
}
.add-opt:active { transform: scale(.98); }
.add-opt .e { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; flex: none; background: var(--c, var(--brand-soft)); }
.add-opt small { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.add-opt.hero {
  grid-column: span 2; background: var(--grad); color: #fff; border: 0; padding: 18px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.add-opt.hero .e { background: rgba(255,255,255,.2); width: 52px; height: 52px; font-size: 1.6rem; }
.add-opt.hero b { font-size: 1.05rem; display: block; }
.add-opt.hero small { color: rgba(255,255,255,.88); }
.add-opt.hero::after { content: "AI"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: .72rem; background: rgba(255,255,255,.22); padding: 4px 9px; border-radius: 99px; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item .name { font-weight: 700; }
.food-dot { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 1.1rem; flex: none; background: var(--bg-2); }

.photo-preview { width: 100%; max-height: 300px; object-fit: cover; border-radius: 20px; display: block; box-shadow: var(--shadow); }
.tips { background: var(--bg-2); border-radius: 18px; padding: 14px 16px; }
.tips ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: .85rem; }

/* Review list (AI results) */
.rv { border: 1.5px solid var(--line); border-radius: 18px; padding: 12px; margin-bottom: 10px; background: var(--card); }
.rv-top { display: flex; gap: 8px; align-items: center; }
.rv-top input { font-weight: 700; }
.rv-nums { display: grid; grid-template-columns: 90px 90px 1fr; gap: 8px; align-items: center; margin-top: 10px; }
.rv-nums label { font-size: .72rem; font-weight: 600; color: var(--muted); }
.rv-nums input { padding: 9px 10px; }
.rv-macros { font-size: .78rem; color: var(--muted); }
.conf { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.conf.hi { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-2); }
.conf.mid { background: color-mix(in srgb, var(--warn) 18%, transparent); color: #b45309; }
.conf.lo { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.x { border: 0; background: var(--bg-2); color: var(--muted); font-size: 1.05rem; width: 30px; height: 30px; border-radius: 10px; flex: none; }
.totalbar {
  display: flex; justify-content: space-between; align-items: center; font-weight: 800; padding: 14px 16px; margin: 14px 0;
  border-radius: 16px; background: var(--brand-soft); color: var(--brand-2); font-size: .9rem; gap: 10px;
}
.qbox { background: color-mix(in srgb, var(--protein) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--protein) 25%, transparent); border-radius: 18px; padding: 14px; font-size: .9rem; }
.meal-summary { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--bg-2); margin-bottom: 14px; }

/* Spinner */
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0; color: var(--muted); font-weight: 600; }
.spin { width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 25%, var(--brand) 60%, #0e7490); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* KPI tiles (colorful) */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; text-align: center; }
.kpis div { border-radius: 16px; padding: 10px 6px; }
.kpis div:nth-child(1) { background: color-mix(in srgb, var(--brand) 13%, transparent); }
.kpis div:nth-child(2) { background: color-mix(in srgb, var(--protein) 13%, transparent); }
.kpis div:nth-child(3) { background: color-mix(in srgb, var(--fat) 12%, transparent); }
.kpis b { display: block; font-size: 1.12rem; font-weight: 800; }
.kpis span { font-weight: 600; }

/* Charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 10px; font-weight: 600; font-family: inherit; }

/* Settings rows */
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.target-box {
  border-radius: 20px; padding: 16px; text-align: center; color: #fff; background: var(--grad); position: relative; overflow: hidden;
}
.target-box b { font-size: 2rem; font-weight: 800; display: block; letter-spacing: -.02em; }
.target-box .muted, .target-box .small { color: rgba(255,255,255,.92); }
.target-box.light { background: var(--brand-soft); color: var(--text); }
.target-box.light .muted { color: var(--muted); }
.target-box.light b { color: var(--brand-2); }
.macro-pills { display: flex; justify-content: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.macro-pills span { background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; }

/* ---------- Coach ---------- */
.coach-hero { text-align: center; padding: 26px 20px; }
.coach-hero .bot { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 24px; display: grid; place-items: center; font-size: 2rem; background: var(--grad-violet); box-shadow: 0 12px 28px rgba(99,102,241,.35); }
.prompt-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 16px; padding: 12px 14px; font-weight: 600; margin-bottom: 10px; box-shadow: var(--shadow); }
.prompt-card .e { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--c); flex: none; }
.chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 20px; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 6px 16px rgba(16,185,129,.25); }
.msg-row { display: flex; gap: 8px; align-items: flex-end; align-self: flex-start; max-width: 92%; }
.msg-row .bot-sm { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: .9rem; background: var(--grad-violet); }
.msg.model { background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; max-width: 100%; border: 1px solid var(--line); }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 18px; }
.msg li::marker { color: var(--brand); }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-input {
  position: fixed; left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 9;
  max-width: 600px; margin: 0 auto; padding: 8px; display: flex; gap: 8px; align-items: flex-end;
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px rgba(15,23,42,.12);
}
.chat-input textarea { min-height: 44px; max-height: 120px; border: 0; background: transparent; box-shadow: none; }
.chat-input .btn { padding: 11px 14px; }

/* Scanner */
.scanner { position: relative; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 28% 12%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }

/* Onboarding */
.welcome { background: var(--grad); color: #fff; border: 0; text-align: center; padding: 28px 22px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.welcome .muted { color: rgba(255,255,255,.9); }
.welcome .logo { width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 2.2rem; border: 1px solid rgba(255,255,255,.3); }
.welcome h2 { font-size: 1.35rem; font-weight: 800; }
.feature-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.feature-pills span { background: rgba(255,255,255,.18); padding: 5px 11px; border-radius: 99px; font-size: .76rem; font-weight: 700; }
.hero-emoji { font-size: 3rem; }

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 40;
  background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 16px; font-size: .9rem; font-weight: 600; max-width: calc(100% - 32px);
  box-shadow: 0 12px 30px rgba(0,0,0,.3); animation: toastIn .2s ease-out;
}
@keyframes toastIn { from { transform: translate(-50%, 10px); opacity: 0; } }

details summary { cursor: pointer; font-weight: 600; }
details summary::-webkit-details-marker { display: none; }

/* AI engine */
.engine-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg-2); }
.engine-row b { font-size: .92rem; }
.engine-line { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
.engine-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-2);
}
.engine-badge[data-engine="nano"] { background: color-mix(in srgb, var(--water) 15%, transparent); color: #0369a1; }
.engine-badge[data-engine="cloud"] { background: color-mix(in srgb, var(--protein) 15%, transparent); color: var(--protein); }
.meal-summary .engine-badge { margin-left: 6px; vertical-align: 2px; }

/* Sugar & salt */
.ss-card { display: grid; gap: 12px; }
.ss-over { color: var(--danger); font-weight: 700; }
.ss-tip { font-size: .82rem; background: color-mix(in srgb, var(--warn) 10%, var(--card)); border-radius: 12px; padding: 9px 12px; }
.warn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.warn-chip { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--carbs) 16%, transparent); color: #b45309; }
.warn-chip.salt { background: color-mix(in srgb, var(--protein) 14%, transparent); color: var(--protein); }
.totalbar { flex-wrap: wrap; }
.totalbar .warn-row { width: 100%; margin-top: 4px; }

/* Multi-photo */
.photo-wrap { position: relative; }
.photo-x { position: absolute; top: 8px; right: 8px; background: rgba(15,23,42,.6); color: #fff; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; display: block; }

/* Toggle switch */
.toggle { width: 50px; height: 30px; border-radius: 99px; border: 0; background: var(--line); position: relative; flex: none; transition: background .2s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.toggle.on { background: var(--brand); }
.toggle.on i { transform: translateX(20px); }
.link-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 600; }
.link-row:last-child { border-bottom: 0; }
button.avatar { border: 0; cursor: pointer; }

/* Fasting card */
.fast-card { cursor: pointer; }
.fast-card.fasting { background: linear-gradient(135deg, color-mix(in srgb, var(--protein) 12%, var(--card)), var(--card) 70%); }
.fast-ring { position: relative; width: 72px; height: 72px; flex: none; }
.fast-ring svg { transform: rotate(-90deg); display: block; }
.fast-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; }
.fast-big { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.fast-big small { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Progress photos */
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp { position: relative; }
.pp img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; display: block; }
.pp span { position: absolute; left: 6px; bottom: 6px; font-size: .66rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 8px; }
.pp .photo-x { top: 4px; right: 4px; width: 26px; height: 26px; font-size: .9rem; }
.slideshow { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slideshow img { max-width: 100%; max-height: 78vh; object-fit: contain; opacity: 0; }
.slideshow img.in { animation: ssIn .5s ease forwards; }
@keyframes ssIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.ss-cap { color: #fff; font-weight: 800; font-size: 1.3rem; margin-top: 14px; }
.ss-bar { width: 60%; height: 4px; background: rgba(255,255,255,.2); border-radius: 9px; margin-top: 12px; overflow: hidden; }
.ss-bar i { display: block; height: 100%; background: #34d399; transition: width .3s; }
.ss-actions { display: flex; gap: 10px; margin-top: 18px; }

/* Accessibility */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Meal cards (2×2) */
.meal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 600px) { .meal-grid { grid-template-columns: repeat(4, 1fr); } }
.meal-tile {
  --mc: var(--brand); position: relative; overflow: hidden; cursor: pointer;
  background: var(--card); border-radius: 20px; padding: 12px 12px 11px; box-shadow: var(--shadow);
  border: 1.5px solid color-mix(in srgb, var(--line) 60%, transparent); transition: transform .12s, border-color .2s;
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.meal-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--mc); }
.meal-tile:active { transform: scale(.98); }
.meal-tile.now { border-color: color-mix(in srgb, var(--mc) 55%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 9%, var(--card)), var(--card) 60%); }
.mt-head { display: flex; align-items: center; gap: 7px; }
.mt-head b { flex: 1; min-width: 0; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; flex: none; background: color-mix(in srgb, var(--mc) 16%, transparent); }
.meal-tile .add-mini { width: 30px; height: 30px; border-radius: 10px; font-size: 1.15rem; }
.mt-kcal { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.mt-kcal small { font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.meal-tile .meal-bar { margin-top: 0; }
.mt-foot { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.mt-thumbs { display: flex; }
.mt-thumbs > * { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--card); margin-left: -6px; object-fit: cover; background: var(--bg-2); display: grid; place-items: center; font-size: .75rem; }
.mt-thumbs > *:first-child { margin-left: 0; }
.empty-tile .mt-kcal small { font-size: .85rem; }

/* Meal details sheet */
.meal-sum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; padding: 12px 6px; border-radius: 16px;
  background: color-mix(in srgb, var(--mc) 10%, var(--card)); margin-bottom: 4px; }
.meal-sum b { display: block; font-size: 1.05rem; font-weight: 800; }
.meal-sum span { font-size: .68rem; color: var(--muted); font-weight: 600; }
.mt-ico { width: 22px; height: 22px; background: none; font-size: 1.05rem; }
.mt-head { gap: 5px; }
.meal-tile .add-mini { width: 28px; height: 28px; }
.seg button { min-width: 0; padding-left: 4px; padding-right: 4px; font-size: .86rem; }

/* Sign-up questionnaire */
.q-progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.q-progress i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .35s ease; }
.q-step { animation: qIn .28s ease; padding-bottom: 90px; }
@keyframes qIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.q-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 6px; }
.q-sub { color: var(--muted); margin: 0 0 16px; }
.q-body { margin-top: 14px; }
.q-input { font-size: 1.1rem !important; padding: 15px 16px !important; }
.q-note { font-size: .84rem; color: var(--muted); margin-top: 10px; }
.q-opts { display: grid; gap: 10px; }
.q-opts.cols { grid-template-columns: 1fr 1fr; }
.q-opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px; border-radius: 18px;
  border: 1.5px solid var(--line); background: var(--card); box-shadow: var(--shadow); transition: border-color .15s, transform .1s, background .15s; }
.q-opt:active { transform: scale(.98); }
.q-opt .q-e { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: var(--bg-2); flex: none; }
.q-opts.cols .q-opt { padding: 11px; gap: 9px; }
.q-opts.cols .q-opt .q-e { width: 34px; height: 34px; font-size: 1.1rem; border-radius: 11px; }
.q-opt b { display: block; font-size: .95rem; }
.q-opts.cols .q-opt b { font-size: .86rem; }
.q-opt small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.q-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--card)); }
.q-opt.on .q-e { background: var(--grad); }
.q-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; font-size: .75rem; font-weight: 800; flex: none; }
.q-opt.on .q-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.q-err { color: var(--danger); font-weight: 600; font-size: .88rem; min-height: 1.2em; margin-top: 10px; }
.q-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; max-width: 640px; margin: 0 auto;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.q-build { display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.q-build ul { list-style: none; padding: 0; margin: 22px 0 0; }
.q-build li { opacity: 0; animation: qLi .4s ease forwards; font-weight: 700; margin: 10px 0; color: var(--brand-2); }
@keyframes qLi { to { opacity: 1; } }
.q-chart { padding: 10px 12px; margin-top: 14px; }
.q-chart svg { width: 100%; display: block; }
.q-chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.q-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; text-align: center; }
.q-facts div { background: var(--card); border-radius: 16px; padding: 10px 6px; box-shadow: var(--shadow); }
.q-facts b { display: block; font-size: 1rem; }
.q-facts span { font-size: .7rem; color: var(--muted); font-weight: 600; }

/* Never scroll sideways: columns may shrink, long words wrap */
#app { overflow-x: clip; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q-opts.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q-opt, .q-opt .grow, .add-opt, .meal-tile, .list-item .grow { min-width: 0; }
.q-opt b, .q-opt small, .add-opt, .chip { overflow-wrap: anywhere; }
.topbar .titles, .topbar .grow { min-width: 0; }
input, select, textarea { min-width: 0; max-width: 100%; }

/* Forkast brand: emerald → ocean blue */
body {
  background:
    radial-gradient(900px 420px at 110% -10%, rgba(16,185,129,.16), transparent 60%),
    radial-gradient(800px 420px at -20% 0%, rgba(37,99,235,.13), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.hero-card { box-shadow: 0 18px 40px rgba(37,99,235,.22); }
.btn { box-shadow: 0 8px 20px rgba(13,148,136,.26); }
.add-tab .plus { box-shadow: 0 10px 24px rgba(37,99,235,.35); }
.tab.active { color: var(--ocean); }
a, .link { color: var(--ocean); }
.btn.ghost { background: color-mix(in srgb, var(--ocean) 9%, var(--card)); color: var(--ocean); }
.chip.on, .seg button.on { box-shadow: 0 4px 12px rgba(37,99,235,.25); }
.q-opt.on { border-color: var(--ocean); background: color-mix(in srgb, var(--ocean) 7%, var(--card)); }
.brand-name { font-weight: 800; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.q-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.q-brand img { border-radius: 16px; box-shadow: 0 8px 20px rgba(37,99,235,.25); }

/* ==========================================================
   Forkast "Sunrise" theme — warm, lively colours (overrides above)
   ========================================================== */
:root {
  --bg: #FFF8F2; --bg-2: #FDEDE2; --card: #ffffff; --text: #24160F; --muted: #8A7064; --line: #F3E0D4; --input: #FFF8F2;
  --brand: #F2545B; --brand-2: #D9480F; --brand-soft: #FFE8DB; --ocean: #D9480F;
  --grad: linear-gradient(135deg, #FF9A44 0%, #F2545B 55%, #E0457B 100%);
  --grad-action: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  --grad-warm: linear-gradient(135deg, #FFB547 0%, #FF7A45 100%);
  --grad-violet: linear-gradient(135deg, #8B5CF6 0%, #E0457B 100%);
  --m-breakfast: #F59E0B; --m-lunch: #10b981; --m-dinner: #F2545B; --m-snack: #D946EF;
  --shadow-lg: 0 18px 40px rgba(242,84,91,.28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17100D; --bg-2: #221713; --card: #211814; --text: #FBEDE5; --muted: #B79C90; --line: #3A2A23; --input: #1B1310;
    --brand-soft: #3A1E17; --ocean: #FF8A5C; --brand-2: #FF8A5C;
  }
}
:root[data-theme="dark"] {
  --bg: #17100D; --bg-2: #221713; --card: #211814; --text: #FBEDE5; --muted: #B79C90; --line: #3A2A23; --input: #1B1310;
  --brand-soft: #3A1E17; --ocean: #FF8A5C; --brand-2: #FF8A5C;
}
body {
  background:
    radial-gradient(900px 460px at 110% -10%, rgba(255,154,68,.20), transparent 60%),
    radial-gradient(800px 420px at -20% 0%, rgba(224,69,123,.12), transparent 60%),
    radial-gradient(700px 400px at 50% 120%, rgba(16,185,129,.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* Buttons: fresh green so actions pop against the warm theme */
.btn { background: var(--grad-action); box-shadow: 0 8px 20px rgba(13,148,136,.28); }
.btn.ghost { background: color-mix(in srgb, var(--brand) 10%, var(--card)); color: var(--brand-2); box-shadow: none; }
.btn.outline, .btn.danger { background: var(--card); box-shadow: none; }
.btn.white { background: #fff; }
.hero-card { box-shadow: var(--shadow-lg); }
.add-tab .plus { background: var(--grad); box-shadow: 0 10px 24px rgba(242,84,91,.42); }
.tab.active { color: var(--brand); }
a, .link { color: var(--brand-2); }
.avatar { background: var(--grad); box-shadow: 0 6px 16px rgba(242,84,91,.35); }
.chip.on, .seg button.on { background: var(--grad); box-shadow: 0 4px 12px rgba(242,84,91,.28); }
.q-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.q-progress i { background: var(--grad); }
.q-brand img { box-shadow: 0 8px 20px rgba(242,84,91,.28); }
/* Lively, coloured cards */
.meal-tile { background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 20%, var(--card)), color-mix(in srgb, var(--mc) 6%, var(--card))); border-color: color-mix(in srgb, var(--mc) 30%, transparent); }
.meal-tile.now { border-color: var(--mc); }
.macro-card:nth-child(1) { background: color-mix(in srgb, var(--protein) 10%, var(--card)); }
.macro-card:nth-child(2) { background: color-mix(in srgb, var(--carbs) 12%, var(--card)); }
.macro-card:nth-child(3) { background: color-mix(in srgb, var(--fat) 10%, var(--card)); }
.macro-card:nth-child(4) { background: color-mix(in srgb, var(--fiber) 12%, var(--card)); }
.ss-card { background: linear-gradient(160deg, color-mix(in srgb, var(--carbs) 10%, var(--card)), var(--card) 70%); }
.add-opt { background: color-mix(in srgb, var(--c, var(--brand-soft)) 35%, var(--card)); }
.add-opt.hero { background: var(--grad); }
.totalbar { background: color-mix(in srgb, var(--m-lunch) 14%, var(--card)); color: #0F6E56; }
.target-box { background: var(--grad); }

/* Day mood: header card colour follows the leading nutrient */
.hero-card { transition: box-shadow .6s ease; }
.hero-card[class*="mood-"] { animation: moodIn .6s ease; }
@keyframes moodIn { from { filter: saturate(.4) brightness(1.08); } to { filter: none; } }
.hero-card.mood-protein { background: linear-gradient(135deg, #3B82F6 0%, #4F46E5 55%, #6D28D9 100%); box-shadow: 0 18px 40px rgba(79,70,229,.32); }
.hero-card.mood-carbs   { background: linear-gradient(135deg, #F59E0B 0%, #EA580C 55%, #C2410C 100%); box-shadow: 0 18px 40px rgba(234,88,12,.32); }
.hero-card.mood-fat     { background: linear-gradient(135deg, #EC4899 0%, #DB2777 55%, #9D174D 100%); box-shadow: 0 18px 40px rgba(219,39,119,.32); }
.hero-card.mood-fiber   { background: linear-gradient(135deg, #22C55E 0%, #16A34A 55%, #166534 100%); box-shadow: 0 18px 40px rgba(22,163,74,.32); }
.hero-card.mood-over    { background: linear-gradient(135deg, #F87171 0%, #DC2626 55%, #991B1B 100%); box-shadow: 0 18px 40px rgba(220,38,38,.35); }
.mood-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 11px; border-radius: 99px;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.3); font-size: .78rem; font-weight: 700; backdrop-filter: blur(6px); }
.mood-tip { font-size: .74rem; opacity: .9; margin-top: 5px; }
/* The + button follows the day's mood too */
:root[data-mood="mood-protein"] .add-tab .plus { background: linear-gradient(135deg, #3B82F6, #6D28D9); box-shadow: 0 10px 24px rgba(79,70,229,.4); }
:root[data-mood="mood-carbs"]   .add-tab .plus { background: linear-gradient(135deg, #F59E0B, #C2410C); box-shadow: 0 10px 24px rgba(234,88,12,.4); }
:root[data-mood="mood-fat"]     .add-tab .plus { background: linear-gradient(135deg, #EC4899, #9D174D); box-shadow: 0 10px 24px rgba(219,39,119,.4); }
:root[data-mood="mood-fiber"]   .add-tab .plus { background: linear-gradient(135deg, #22C55E, #166534); box-shadow: 0 10px 24px rgba(22,163,74,.4); }
:root[data-mood="mood-over"]    .add-tab .plus { background: linear-gradient(135deg, #F87171, #991B1B); box-shadow: 0 10px 24px rgba(220,38,38,.4); }
.mood-chip { white-space: nowrap; font-size: .74rem; max-width: 100%; }
