/* ============ NutriTrack — design system ============ */
:root {
  --bg: #0D0F14;
  --surface: #161A22;
  --surface-2: #1E2430;
  --surface-3: #262E3D;
  --border: rgba(255,255,255,0.07);
  --text: #F2F5F9;
  --text-2: #9AA3B5;
  --text-3: #6B7385;
  --accent: #34D399;        /* calories — émeraude */
  --accent-dim: rgba(52,211,153,0.16);
  --protein: #60A5FA;       /* protéines — bleu */
  --carbs: #FBBF24;         /* glucides — ambre */
  --fat: #F472B6;           /* lipides — rose */
  --danger: #F87171;
  --warn: #FBBF24;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 8px 28px rgba(0,0,0,0.38);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 78px;
  --ease: cubic-bezier(.32,.72,.28,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
input, textarea { user-select: text; -webkit-user-select: text; }

#app { min-height: 100dvh; display: flex; flex-direction: column; }

.view {
  flex: 1;
  padding: calc(var(--sat) + 14px) 16px calc(var(--tabbar-h) + var(--sab) + 24px);
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  animation: viewIn .28s var(--ease);
}
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.xsmall { font-size: 11.5px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: stretch; justify-content: space-around;
  height: calc(var(--tabbar-h) + var(--sab));
  padding: 8px 8px var(--sab);
  background: rgba(18,21,28,0.82);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border-top: 1px solid var(--border);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: none; color: var(--text-3);
  font-size: 10.5px; font-weight: 600; font-family: inherit;
  min-width: 44px; min-height: 44px; cursor: pointer;
  transition: color .2s, transform .15s var(--ease);
}
.tab:active { transform: scale(0.92); }
.tab.active { color: var(--accent); }
.tab-ic { width: 25px; height: 25px; }
.tab-add { flex: 0 0 76px; }
.tab-add-btn {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #06120D; box-shadow: 0 6px 20px var(--accent-dim);
  margin-top: -22px;
  transition: transform .15s var(--ease);
}
.tab-add-btn svg { width: 26px; height: 26px; }
.tab-add:active .tab-add-btn { transform: scale(0.9); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-flat { box-shadow: none; }

/* ---------- header ---------- */
.day-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.day-title { text-align: center; flex: 1; cursor: pointer; }
.day-title .dt-main { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.day-title .dt-sub { font-size: 12px; color: var(--accent); font-weight: 600; min-height: 16px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit;
  transition: transform .14s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(0.88); background: var(--surface-2); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- rings ---------- */
.rings-card { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ring-main-wrap { position: relative; width: 198px; height: 198px; }
.ring-main-wrap svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-3); }
.ring-fill { fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ease), stroke .3s; }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0;
}
.ring-center .rc-value { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ring-center .rc-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ring-center .rc-over { color: var(--danger); }
.macro-row { display: flex; justify-content: space-around; width: 100%; }
.macro-cell { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.macro-ring { position: relative; width: 64px; height: 64px; }
.macro-ring svg { transform: rotate(-90deg); }
.macro-ring .mr-val {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.macro-cell .mc-label { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.macro-cell .mc-target { font-size: 10.5px; color: var(--text-3); }
.kcal-line { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-2); }
.kcal-line b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- meals ---------- */
.meal-card { padding: 0; overflow: hidden; }
.meal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px 13px; cursor: pointer;
}
.meal-head .mh-name { font-size: 16.5px; font-weight: 700; }
.meal-head .mh-sub { font-size: 12px; color: var(--text-2); margin-top: 1px; font-variant-numeric: tabular-nums; }
.meal-head .mh-kcal { font-size: 15px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.meal-actions { display: flex; gap: 6px; align-items: center; }
.meal-add-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .14s var(--ease);
}
.meal-add-btn:active { transform: scale(0.86); }
.meal-add-btn svg { width: 17px; height: 17px; }
.meal-more-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.entry-list { border-top: 1px solid var(--border); }
.entry-row-wrap { position: relative; overflow: hidden; }
.entry-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; background: var(--surface);
  position: relative; z-index: 1;
  transition: transform .25s var(--ease);
  border-bottom: 1px solid var(--border);
}
.entry-row-wrap:last-child .entry-row { border-bottom: none; }
.entry-thumb {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  flex-shrink: 0; background: var(--surface-3);
}
.entry-info { flex: 1; min-width: 0; }
.entry-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-detail { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.entry-kcal { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.entry-kcal small { color: var(--text-3); font-weight: 500; }
.entry-delete {
  position: absolute; right: 0; top: 0; bottom: 0; width: 84px; z-index: 0;
  background: var(--danger); color: #fff; border: none;
  font-weight: 700; font-size: 13px; font-family: inherit; cursor: pointer;
}
.meal-empty { padding: 13px 18px; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--border); }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px; border-radius: var(--r-md);
  border: none; font-family: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform .14s var(--ease), opacity .2s;
  min-height: 50px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, #34D399, #0EA371); color: #06231A; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: rgba(248,113,113,0.14); color: var(--danger); }
.btn-sm { padding: 10px 14px; min-height: 40px; font-size: 14px; width: auto; border-radius: var(--r-sm); }
.btn-ghost { background: none; color: var(--accent); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, select.input {
  width: 100%; padding: 13px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 16px;
  outline: none; transition: border-color .2s;
  appearance: none; -webkit-appearance: none;
}
.input:focus { border-color: var(--accent); }
.input-row { display: flex; gap: 10px; }
.input-row > * { flex: 1; }
select.input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239AA3B5' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

/* segmented control */
.seg { display: flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg button {
  flex: 1; padding: 9px 6px; border: none; border-radius: 9px;
  background: none; color: var(--text-2); font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .2s, color .2s; min-height: 38px;
}
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* rangée de catégories (défilement horizontal) */
.cat-row {
  display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-row .chip { flex: 0 0 auto; padding: 7px 12px; font-size: 12.5px; min-height: 34px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .18s; min-height: 38px;
}
.chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ---------- sheets (bottom) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .25s;
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  max-height: calc(100dvh - var(--sat) - 30px);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .32s var(--ease);
  padding-bottom: var(--sab);
}
.sheet.show { transform: translateY(0); }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 10px auto 4px; flex-shrink: 0; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px 12px; flex-shrink: 0;
}
.sheet-head h2 { font-size: 18px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 18px 24px; flex: 1; }
.sheet-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--surface-2); color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}

/* ---------- search ---------- */
.search-bar { position: relative; margin-bottom: 12px; }
.search-bar input { padding-left: 42px; }
.search-bar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.food-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.food-row:active { background: var(--surface-2); }
.food-row .fr-info { flex: 1; min-width: 0; }
.food-row .fr-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.food-row .fr-sub { font-size: 12px; color: var(--text-2); }
.food-row .fr-kcal { font-size: 13.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fav-btn { background: none; border: none; font-size: 19px; color: var(--text-3); cursor: pointer; padding: 6px; min-width: 38px; min-height: 38px; }
.fav-btn.active { color: var(--carbs); }
.cat-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--text-2); font-weight: 600;
}

/* ---------- stats ---------- */
.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { width: 100%; height: auto; display: block; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile { background: var(--surface-2); border-radius: var(--r-md); padding: 13px 14px; }
.stat-tile .st-label { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.stat-tile .st-value { font-size: 21px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-tile .st-unit { font-size: 12px; color: var(--text-3); font-weight: 600; }
.period-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.period-nav .pn-label { font-weight: 700; font-size: 15px; }

/* heatmap */
.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.heatmap .hm-dow { font-size: 10.5px; color: var(--text-3); text-align: center; font-weight: 600; }
.hm-day {
  aspect-ratio: 1; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); cursor: pointer; border: none; font-family: inherit;
  transition: transform .12s;
}
.hm-day:active { transform: scale(0.9); }
.hm-day.empty { background: transparent; pointer-events: none; }
.hm-under { background: rgba(52,211,153,0.28); color: #A7F3D0; }
.hm-near { background: rgba(251,191,36,0.28); color: #FDE68A; }
.hm-over { background: rgba(248,113,113,0.3); color: #FECACA; }
.hm-legend { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.hm-legend span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.hm-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* ---------- weight ---------- */
.weight-hero { text-align: center; padding: 6px 0 2px; }
.weight-hero .wh-value { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.weight-hero .wh-value small { font-size: 20px; color: var(--text-2); font-weight: 600; }
.weight-hero .wh-delta { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.delta-down { color: var(--accent); }
.delta-up { color: var(--warn); }

/* ---------- settings ---------- */
.set-group { padding: 4px 0; }
.set-row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 18px; cursor: pointer; min-height: 54px;
  border-bottom: 1px solid var(--border);
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; font-family: inherit; color: var(--text); text-align: left; font-size: 15.5px;
}
.set-row:last-child { border-bottom: none; }
.set-row:active { background: var(--surface-2); }
.set-row .sr-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.set-row .sr-label { flex: 1; font-weight: 600; }
.set-row .sr-value { color: var(--text-3); font-size: 13.5px; max-width: 40%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row .sr-chev { color: var(--text-3); flex-shrink: 0; }

/* list editor (meals) */
.edit-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.edit-row .er-name { flex: 1; font-weight: 600; font-size: 15px; }
.mini-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  font-family: inherit;
}
.mini-btn:disabled { opacity: 0.3; }
.mini-btn.danger { color: var(--danger); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--sab) + 16px);
  transform: translateX(-50%) translateY(20px); z-index: 200;
  background: var(--surface-3); color: var(--text);
  padding: 11px 20px; border-radius: 99px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .3s var(--ease);
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- modal (centered confirm) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; padding: 28px;
  opacity: 0; transition: opacity .22s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px; width: 100%; max-width: 330px;
  transform: scale(0.92); transition: transform .22s var(--ease);
  box-shadow: var(--shadow);
}
.modal-backdrop.show .modal { transform: scale(1); }
.modal h3 { font-size: 17px; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }
.modal-btns { display: flex; gap: 10px; }

/* ---------- photo analysis ---------- */
.photo-preview { width: 100%; border-radius: var(--r-md); max-height: 240px; object-fit: cover; margin-bottom: 14px; }
.ai-item { background: var(--surface-2); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; }
.ai-item .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-item input { padding: 9px 10px; font-size: 15px; }
.ai-macros { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.ai-macros .field { margin-bottom: 0; }
.ai-macros label { font-size: 10.5px; margin-bottom: 3px; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-loading { text-align: center; padding: 36px 0; }
.ai-loading p { margin-top: 14px; color: var(--text-2); font-size: 14px; }

/* ---------- onboarding ---------- */
.onboarding {
  position: fixed; inset: 0; z-index: 300; background: var(--bg);
  display: flex; flex-direction: column;
  padding: calc(var(--sat) + 28px) 24px calc(var(--sab) + 24px);
  overflow-y: auto;
}
.ob-progress { display: flex; gap: 6px; margin-bottom: 30px; }
.ob-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .3s; }
.ob-progress i.done { background: var(--accent); }
.ob-body { flex: 1; max-width: 460px; margin: 0 auto; width: 100%; }
.ob-emoji { font-size: 52px; margin-bottom: 14px; }
.ob-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.ob-sub { color: var(--text-2); font-size: 15px; margin-bottom: 26px; }
.ob-footer { max-width: 460px; margin: 18px auto 0; width: 100%; display: flex; gap: 10px; }

/* misc */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.empty-state { text-align: center; padding: 36px 16px; color: var(--text-3); }
.empty-state .es-emoji { font-size: 40px; margin-bottom: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin: 20px 4px 9px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.legend-line { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.notice {
  background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.25);
  color: #FDE68A; border-radius: var(--r-md); padding: 12px 14px; font-size: 13px;
}
.notice-info {
  background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.25); color: #BFDBFE;
}
@media (min-width: 561px) {
  .tabbar { max-width: 560px; left: 50%; transform: translateX(-50%); border-radius: 22px 22px 0 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ---------- personas / thème ---------- */
.ob-personas { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 6px; }
.ob-persona {
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2);
  border: 1.5px solid transparent; color: var(--text); font-family: inherit;
  cursor: pointer; text-align: left; transition: border-color .15s, transform .12s var(--ease);
}
.ob-persona:active { transform: scale(0.98); }
.ob-persona.active { border-color: var(--pa); background: var(--surface-3); }
.obp-mascot { flex: 0 0 auto; }
.obp-mascot svg { width: 46px; height: 50px; display: block; }
.obp-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.obp-emoji { font-size: 26px; line-height: 1; }
.obp-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.obp-desc { font-size: 11.5px; color: var(--text-2); line-height: 1.3; }
.ob-persona.active .obp-name { color: var(--pa); }
.mascotte-hero { display: flex; align-items: center; gap: 16px; }
.mascotte-hero svg { width: 68px; height: 76px; flex-shrink: 0; }
.mh-hero-name { font-size: 19px; font-weight: 800; }
.acc-dots { display: flex; flex-wrap: wrap; gap: 11px; }
.acc-dot {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0; transition: transform .12s var(--ease);
}
.acc-dot:active { transform: scale(0.9); }
.acc-dot.active { border-color: var(--text); }

/* ---------- RTL (arabe) ---------- */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .sr-chev { transform: scaleX(-1); }
html[dir="rtl"] .set-row { text-align: right; }
html[dir="rtl"] .kcal-line,
html[dir="rtl"] .legend-line { direction: rtl; }
html[dir="rtl"] .input { text-align: right; }

/* ---------- mascotte « Pousse » ---------- */
.mascotte-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.mascotte-card svg { width: 62px; height: 72px; flex-shrink: 0; }
.mascotte-msg { font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.mascotte-talk { flex: 1; min-width: 0; }
.mascotte-bubble {
  position: relative; display: inline-block; background: var(--accent-dim);
  color: var(--text-1); font-size: 15px; font-weight: 700; line-height: 1.35;
  padding: 10px 13px; border-radius: 14px; border-top-left-radius: 4px;
  animation: bubble-pop .28s var(--ease) both;
}
.mascotte-bubble::before {
  content: ''; position: absolute; left: -7px; top: 13px;
  border-width: 6px 8px 6px 0; border-style: solid;
  border-color: transparent var(--accent-dim) transparent transparent;
}
.mascotte-who { margin-top: 5px; padding-left: 3px; font-weight: 600; }
@keyframes bubble-pop {
  0% { opacity: 0; transform: translateY(4px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
[dir="rtl"] .mascotte-bubble { border-top-left-radius: 14px; border-top-right-radius: 4px; }
[dir="rtl"] .mascotte-bubble::before { left: auto; right: -7px; border-width: 6px 0 6px 8px; border-color: transparent transparent transparent var(--accent-dim); }

/* ---------- coach conversationnel ---------- */
#coach-card { cursor: pointer; transition: transform .12s var(--ease); }
#coach-card:active { transform: scale(0.985); }
.coach-cta { margin-top: 8px; font-size: 12.5px; font-weight: 800; color: var(--accent); letter-spacing: .2px; }
.co-line { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.co-av { flex-shrink: 0; }
.co-av svg { width: 44px; height: 52px; }
.co-bubble {
  position: relative; background: var(--accent-dim); color: var(--text-1);
  font-size: 15px; font-weight: 650; line-height: 1.42; padding: 11px 14px;
  border-radius: 16px; border-bottom-left-radius: 5px; max-width: 80%;
  animation: bubble-pop .3s var(--ease) both;
}
.co-bubble::before {
  content: ''; position: absolute; left: -6px; bottom: 9px;
  border-width: 6px 7px 0 0; border-style: solid;
  border-color: var(--accent-dim) transparent transparent transparent;
}
[dir="rtl"] .co-bubble { border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
[dir="rtl"] .co-bubble::before { left: auto; right: -6px; border-width: 6px 0 0 7px; }

/* ---------- effets visuels ---------- */
.fx-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; }
.fx-pop { animation: fx-pop .42s var(--ease); }
.fx-bounce { animation: fx-bounce .7s var(--ease); }
@keyframes fx-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.28); }
  60% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
@keyframes fx-bounce {
  0% { transform: translateY(0); }
  25% { transform: translateY(-9px); }
  45% { transform: translateY(0); }
  62% { transform: translateY(-5px); }
  80% { transform: translateY(0); }
  100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-pop, .fx-bounce { animation: none; }
}
/* interrupteur (toggle) */
.fx-toggle {
  flex-shrink: 0; width: 48px; height: 28px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); padding: 0;
  position: relative; cursor: pointer; transition: background .2s var(--ease);
}
.fx-toggle.on { background: var(--accent); border-color: var(--accent); }
.fx-knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: transform .2s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.fx-toggle.on .fx-knob { transform: translateX(20px); }
[dir="rtl"] .fx-knob { left: auto; right: 2px; }
[dir="rtl"] .fx-toggle.on .fx-knob { transform: translateX(-20px); }

/* ---------- mascotte vivante ---------- */
.mascotte { transform-origin: 50% 92%; animation: m-breathe 4.2s ease-in-out infinite; will-change: transform; }
.m-eyes { transform-box: fill-box; transform-origin: center; animation: m-blink 5.4s ease-in-out infinite; }
@keyframes m-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}
@keyframes m-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
  98% { transform: scaleY(1); }
}
/* la carte coach respire un poil plus marqué */
#coach-card .mascotte { animation-duration: 3.6s; }

/* ---------- transitions entre écrans ---------- */
#view { animation: view-enter .34s var(--ease); }
@keyframes view-enter {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
/* compteur en cours d'animation : pas de saut visuel */
.rc-value.counting, .macro-val.counting { font-variant-numeric: tabular-nums; }

/* respect des préférences / réglage utilisateur */
.no-motion .mascotte, .no-motion .m-eyes, .no-motion #view { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .mascotte, .m-eyes, #view { animation: none; }
}

/* ---------- planification ---------- */
.plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pa-btn { padding: 11px 10px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-1); color: var(--text-1); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: transform .12s var(--ease), background .2s; }
.pa-btn:active { transform: scale(0.97); }
.pa-btn.pa-primary { background: var(--accent); border-color: var(--accent); color: #06281d; }
.plan-day { padding: 14px 16px; margin-bottom: 12px; }
.pd-head { display: flex; justify-content: space-between; align-items: baseline; }
.pd-title { font-weight: 800; font-size: 15.5px; text-transform: capitalize; }
.pd-kcal { font-weight: 700; font-size: 13.5px; }
.pd-bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.pd-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .5s var(--ease); }
.pd-slot { margin-top: 8px; }
.ps-head { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.ps-name { font-weight: 700; font-size: 13px; flex: 1; }
.ps-target { font-size: 11.5px; color: var(--text-3); }
.ps-target.over { color: var(--danger); }
.ps-add { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--accent); font-size: 16px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.pl-item { display: flex; align-items: center; gap: 8px; padding: 7px 0 7px 6px; border-top: 1px solid var(--border); }
.pli-info { flex: 1; min-width: 0; }
.pli-name { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli-sub { font-size: 11.5px; color: var(--text-3); }
.pli-del { background: none; border: none; color: var(--text-3); font-size: 15px; cursor: pointer; padding: 4px; flex-shrink: 0; }
.pd-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
/* aperçu verrouillé */
.plan-preview { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 16px; }
.ppv-row { display: flex; justify-content: space-between; padding: 8px 0; font-weight: 600; border-bottom: 1px solid var(--border); }
.ppv-row:last-child { border-bottom: none; }
.ppv-lock { opacity: 0.5; }
.plan-bullets { text-align: left; list-style: none; padding: 0; margin: 0 0 16px; }
.plan-bullets li { padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.plan-bullets li:last-child { border-bottom: none; }
/* sélecteur recette/aliment */
.seg { display: flex; background: var(--surface-2); border-radius: var(--r-md); padding: 3px; gap: 3px; }
.seg-btn { flex: 1; padding: 9px; border: none; background: none; color: var(--text-2); font-weight: 700; font-size: 13.5px; border-radius: calc(var(--r-md) - 3px); cursor: pointer; }
.seg-btn.on { background: var(--surface-1); color: var(--text-1); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.rchip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.rchip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rchip.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
/* liste de courses */
.gr-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.gr-aisle { margin-bottom: 14px; }
.gr-aisle-h { font-weight: 800; font-size: 13px; color: var(--text-2); padding: 4px 2px 6px; position: sticky; top: 0; background: var(--surface-1); }
.gr-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--border); }
.gr-check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border); background: none; color: var(--accent); font-size: 15px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.gr-row.done .gr-check { background: var(--accent); border-color: var(--accent); color: #06281d; }
.gr-row.done .gr-name { text-decoration: line-through; opacity: 0.5; }
.gr-name { flex: 1; font-size: 14px; font-weight: 600; }
.gr-qty { font-size: 12.5px; color: var(--text-3); }
.gr-pantry { background: none; border: none; font-size: 15px; cursor: pointer; opacity: 0.6; flex-shrink: 0; }
/* équilibre */
.bal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bal-lab { width: 64px; font-size: 12.5px; font-weight: 600; }
.bal-track { flex: 1; height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bal-track i { display: block; height: 100%; border-radius: 5px; }
.bal-val { width: 88px; text-align: right; font-size: 12px; color: var(--text-3); }

/* ---------- insights aliment ---------- */
#qs-insights:empty { display: none; }
.fi-src { font-size: 11.5px; color: var(--text-3); margin-bottom: 8px; }
.fi-eq { display: flex; flex-wrap: wrap; gap: 6px; }
.fi-chip { background: var(--surface-2); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.fi-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fi-badge { border-radius: 8px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; }
.fi-badge.warn { background: rgba(248,113,113,0.15); color: var(--danger); }
.fi-badge.good { background: var(--accent-dim); color: var(--accent); }
.fi-scores { display: flex; gap: 18px; margin-bottom: 10px; }
.fi-nutri, .fi-nova { display: flex; align-items: center; gap: 8px; }
.fi-scorelab { font-size: 11.5px; color: var(--text-3); }
.ns-pill { width: 30px; height: 30px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.ns-a { background: #1E8F4E; } .ns-b { background: #85BB2F; } .ns-c { background: #FECB02; color: #3a2a00; } .ns-d { background: #EE8100; } .ns-e { background: #E63E11; }
.nova-dot { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.nova-1 { background: #1E8F4E; } .nova-2 { background: #85BB2F; color:#1a2e00;} .nova-3 { background: #EE8100; } .nova-4 { background: #E63E11; }

/* ---------- connaissance client ---------- */
.kc-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.kc-tag { border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 700; }
.kc-tag.warn { background: rgba(248,113,113,0.15); color: var(--danger); }
.kc-tag.good { background: var(--accent-dim); color: var(--accent); }
.kc-mood { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--text-2); }
.kc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- apprendre + quiz ---------- */
.learn-list { display: flex; flex-direction: column; }
.learn-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border: none; border-top: 1px solid var(--border); background: none; color: var(--text-1); cursor: pointer; text-align: left; width: 100%; }
.learn-row:first-child { border-top: none; }
.learn-emoji { font-size: 22px; flex-shrink: 0; }
.learn-t { flex: 1; font-weight: 600; font-size: 14.5px; }
.learn-row .sr-chev { color: var(--text-3); }
.quiz-q { font-size: 17px; font-weight: 700; line-height: 1.35; margin-bottom: 16px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-1); color: var(--text-1); font-weight: 600; font-size: 14.5px; cursor: pointer; text-align: left; transition: transform .1s var(--ease); }
.quiz-opt:active { transform: scale(0.98); }
.quiz-opt.right { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.quiz-opt.wrong { background: rgba(248,113,113,0.15); border-color: var(--danger); color: var(--danger); }
.quiz-exp { margin: 14px 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-md); font-size: 13.5px; line-height: 1.45; }
.art-head { text-align: center; margin-bottom: 12px; }
.art-head svg { width: 60px; height: 70px; }
.art-body { padding: 16px 18px; }
.art-p { font-size: 15px; line-height: 1.6; margin: 0 0 12px; white-space: normal; }
.art-p:last-child { margin-bottom: 0; }

/* ---------- hub Outils ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 6px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-1); color: var(--text-1); cursor: pointer; transition: transform .12s var(--ease), background .2s; }
.tool-tile:active { transform: scale(0.96); }
.tt-emoji { font-size: 24px; }
.tt-l { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; }
/* carte CTA (Apprendre, Personnalisation) */
.learn-cta { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; margin-bottom: 11px; padding: 14px 16px; cursor: pointer; }
.lc-emoji { font-size: 26px; flex-shrink: 0; }
.lc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lc-txt b { font-size: 15px; }
.sr-chev-lg { color: var(--text-3); font-size: 22px; line-height: 1; }

/* ---------- suivi rapide repliable ---------- */
.quick-track { margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-1); }
.qt-sum { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; }
.qt-sum::-webkit-details-marker { display: none; }
.qt-chev { color: var(--text-3); transition: transform .25s var(--ease); flex-shrink: 0; }
.quick-track[open] .qt-chev { transform: rotate(180deg); }
.qt-body { padding: 0 0 4px; display: flex; flex-direction: column; gap: 12px; }
.qt-body > .card { margin: 0 10px; }
[dir="rtl"] .qt-sum { flex-direction: row-reverse; }

/* ---------- personnalisation macros/micros ---------- */
.micro-adj { color: var(--accent); font-weight: 800; }
.why-list { display: flex; flex-direction: column; gap: 5px; }
.why-item { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }

/* ---------- proposition de valeur + mode gros texte (âge) ---------- */
.home-value { text-align: center; color: var(--text-2); font-size: 13px; font-weight: 600; margin: -4px 0 14px; }
body.lg-text { font-size: 17.5px; }
body.lg-text .mh-name, body.lg-text .er-name, body.lg-text .sr-label, body.lg-text .entry-name { font-size: 16px; }
body.lg-text .rc-value { font-size: 42px; }
body.lg-text .home-value { font-size: 15px; }

/* ---------- recettes (découverte) ---------- */
.rec-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px; cursor: pointer; }
.rec-card:active { transform: scale(0.99); }
.rec-thumb { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 12px; overflow: hidden; background: #F4ECDD; }
.rec-thumb svg { width: 100%; height: 100%; display: block; }
.rec-info { flex: 1; min-width: 0; }
.rec-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-meta { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.rec-fav { flex: 0 0 auto; background: none; border: none; color: var(--text-3); font-size: 20px; cursor: pointer; padding: 4px; line-height: 1; }
.rec-fav.on { color: var(--accent); }
.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; cursor: pointer; }
.rec-hero-top { height: 120px; }
.rec-hero-top svg { width: 100%; height: 100%; display: block; }
.rf-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.rf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rf-chip { flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 13px; font-size: 12.5px; color: var(--text); font-family: inherit; cursor: pointer; white-space: nowrap; }
.rf-grid .rf-chip { border-radius: var(--r-sm); text-align: center; padding: 12px 6px; font-weight: 600; }
.rf-chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.profil-gear { position: absolute; right: 16px; top: calc(var(--sat) + 14px); width: 38px; height: 38px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.profil-gear svg { width: 19px; height: 19px; }

/* emoji thumbnails recettes */
.rec-emoji { display: flex; align-items: center; justify-content: center; }
.rec-thumb.rec-emoji { font-size: 26px; }
.rec-hero-top.rec-emoji { font-size: 46px; }

/* ---------- profil tableau de bord ---------- */
.obj-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.obj-row:last-child { border-bottom: none; }
.obj-row .ol { color: var(--text-2); }
.obj-row .ov2 { font-weight: 700; }
.link-btn { background: none; border: none; color: var(--accent); font-family: inherit; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.ov-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ov-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 8px; text-align: center; }
.ov-tile .ovv { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ov-tile .ovl { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ---------- humeur ---------- */
.mood-row { display: flex; justify-content: space-around; align-items: center; }
.mood-btn { font-size: 30px; background: none; border: none; cursor: pointer; opacity: 0.45; padding: 4px 6px; transition: transform .15s var(--ease), opacity .2s; }
.mood-btn.on { opacity: 1; transform: scale(1.25); }

/* recettes — collections */
.rec-coll-row{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 6px;-webkit-overflow-scrolling:touch}
.rec-coll{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:96px;height:88px;border:none;border-radius:var(--r-md);cursor:pointer;padding:8px;transition:transform .15s var(--ease)}
.rec-coll:active{transform:scale(0.96)}
.rec-coll-emoji{font-size:28px;line-height:1}
.rec-coll-name{font-size:12px;font-weight:600;color:var(--text-1);text-align:center;line-height:1.2}
/* mode cuisson */
.cook-step{font-size:17px;line-height:1.5;color:var(--text-1)}
.cook-num{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;border-radius:50%;background:var(--accent);color:#fff;font-weight:800;margin-bottom:14px}
.cook-dots{display:flex;justify-content:center;gap:6px;margin:18px 0 8px}
.cook-dots i{width:7px;height:7px;border-radius:50%;background:var(--surface-2);transition:background .2s}
.cook-dots i.on{background:var(--accent)}

/* profil — ton pourquoi */
.why-card{border:1px solid var(--border);cursor:pointer}
.why-label{font-size:11px;color:var(--accent);letter-spacing:.04em;margin-bottom:4px;display:flex;justify-content:space-between;align-items:center}
.why-edit{color:var(--text-3);font-weight:600}
.why-text{font-size:14.5px;color:var(--text-1);line-height:1.4}
/* profil — badges */
.badge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 8px}
.badge-it{text-align:center}
.badge-it .badge-e{font-size:28px;line-height:1}
.badge-it .badge-l{font-size:10.5px;color:var(--text-2);margin-top:4px;line-height:1.2}
.badge-it.off{opacity:.32;filter:grayscale(1)}

/* dashboard micronutriments */
.micro-row{display:block;width:100%;text-align:left;background:none;border:none;padding:9px 2px;cursor:pointer}
.micro-top{display:flex;justify-content:space-between;align-items:baseline;font-size:14px;color:var(--text-1);margin-bottom:5px}
.micro-val{font-size:12px;color:var(--text-2);font-variant-numeric:tabular-nums}
.micro-bar{height:7px;border-radius:4px;background:var(--surface-2);overflow:hidden}
.micro-bar i{display:block;height:100%;border-radius:4px;transition:width .5s var(--ease)}
