/* Арни — тёмная тема под аватар (синий неон + оранжевый акцент) */
:root {
  --bg: #0d1117;
  --bg2: #151b24;
  --card: #1a212c;
  --card2: #222b38;
  --line: #2a3442;
  --text: #eef2f7;
  --muted: #8b97a8;
  --dim: #5c6878;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, .14);
  --blue: #3ea6ff;
  --blue-soft: rgba(62, 166, 255, .14);
  --green: #34d17a;
  --green-soft: rgba(52, 209, 122, .14);
  --red: #ff5a5f;
  --yellow: #ffc53d;
  --p: #3ea6ff;   /* белок */
  --f: #ffc53d;   /* жиры */
  --c: #b57bff;   /* углеводы */
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); height: 100%; }
body { font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#app { min-height: 100%; display: flex; flex-direction: column; }
#top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px;
  padding: calc(var(--safe-t) + 8px) 12px 8px; background: rgba(13,17,23,.92); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(42,52,66,.6); min-height: 52px; }
#title { flex: 1; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
#actions { display: flex; gap: 4px; }
#view { flex: 1; padding: 12px 16px calc(84px + var(--safe-b)); max-width: 720px; width: 100%; margin: 0 auto; }
body.no-tabs #view { padding-bottom: calc(24px + var(--safe-b)); }
#tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: rgba(21,27,36,.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-b)); }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--dim); font-size: 11px; font-weight: 600; padding: 4px 0; }
#tabs a.on { color: var(--accent); }
#tabs svg { width: 24px; height: 24px; }
body.no-tabs #tabs { display: none; }

.icon-btn { background: none; border: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text); cursor: pointer; }
.icon-btn:active { background: var(--card2); }
.link-btn { background: none; border: 0; color: var(--blue); font-weight: 600; padding: 8px 6px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 13px 18px; font-weight: 700; background: var(--card2); color: var(--text); cursor: pointer; min-height: 48px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #111; }
.btn.blue { background: var(--blue); color: #061321; }
.btn.green { background: var(--green); color: #06170d; }
.btn.danger { background: rgba(255,90,95,.14); color: var(--red); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 7px 12px; border-radius: 11px; font-size: 14px; }
.btn[disabled] { opacity: .5; }

.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.card.tap { cursor: pointer; }
.card.tap:active { background: var(--card2); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 4px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 2px 8px; display: flex; justify-content: space-between; align-items: center; }
.section-title .link-btn { text-transform: none; letter-spacing: 0; font-size: 14px; padding: 0; }
h2 { font-size: 22px; margin: 4px 0 10px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--card2);
  border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--card2); color: var(--muted); }
.badge.orange { background: var(--accent-soft); color: var(--accent); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.green { background: var(--green-soft); color: var(--green); }

input.field, select.field, textarea.field { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; outline: none; }
input.field:focus, textarea.field:focus, select.field:focus { border-color: var(--accent); }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 10px 2px 5px; }
.search { position: relative; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--dim); }
.err { color: var(--red); font-size: 13px; margin-top: 6px; min-height: 1em; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:active { opacity: .7; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* мышцы — свои цвета */
.m-back { --m: #3ea6ff; } .m-chest { --m: #ff7a1a; } .m-triceps { --m: #ff5a8a; } .m-biceps { --m: #34d17a; }
.m-shoulders { --m: #b57bff; } .m-legs { --m: #ffc53d; } .m-abs { --m: #2dd4bf; } .m-cardio { --m: #94a3b8; } .m-other { --m: #64748b; }
.mtag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--m); background: color-mix(in srgb, var(--m) 15%, transparent); padding: 3px 8px; border-radius: 999px; }
.mdot { background: var(--m); }

/* стат-плитки */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats.two { grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--card); border-radius: 14px; padding: 10px 12px; }
.stat .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .l { font-size: 12px; color: var(--muted); }

/* sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; animation: fade .15s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--bg2); border-radius: 20px 20px 0 0;
  max-height: 92vh; display: flex; flex-direction: column; animation: up .2s ease-out; max-width: 720px; margin: 0 auto; }
.sheet-head { display: flex; align-items: center; padding: 14px 16px 6px; gap: 8px; }
.sheet-head .t { flex: 1; font-weight: 700; font-size: 17px; }
.sheet-body { overflow-y: auto; padding: 6px 16px calc(18px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-b)); z-index: 80;
  background: #f1f5f9; color: #0d1117; padding: 10px 16px; border-radius: 12px; font-weight: 600; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
#toast.err { background: var(--red); color: #fff; }

/* логин */
.login { max-width: 400px; margin: 5vh auto 0; text-align: center; }
.login img { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 0 40px rgba(62,166,255,.25); }
.login h1 { font-size: 28px; margin: 14px 0 2px; }
.login-tag { color: var(--muted); font-size: 15px; }
.login-card { margin-top: 22px; text-align: left; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.login-card .link-btn { align-self: center; padding: 2px 6px; }
.login-card .err:empty { display: none; }
.login-hint { text-align: center; }
.via { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: var(--bg2); border-radius: 12px; }
.via-btn { background: none; border: 0; border-radius: 10px; padding: 10px 0; font-weight: 700; color: var(--muted); cursor: pointer; }
.via-btn.on { background: var(--card2); color: var(--text); }
.feat { list-style: none; margin: 0; padding: 0; text-align: left; }
.feat li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feat li:first-child { padding-top: 2px; }
.feat li:last-child { border-bottom: 0; padding-bottom: 2px; }
.feat .ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--m); background: color-mix(in srgb, var(--m) 15%, transparent); }
.feat .t { font-weight: 700; }
.feat .d { color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-top: 1px; }
.install { text-align: left; }
.install-os { margin-top: 12px; }
.install-os ol { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.install-os li { margin: 2px 0; }
.code-input { font-size: 30px; letter-spacing: .4em; text-align: center; font-weight: 800; }

/* графики */
.chart { width: 100%; height: auto; display: block; stroke: none; }
.chart text { fill: var(--dim); font-size: 10px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart-tip { font-size: 13px; color: var(--muted); min-height: 18px; margin-top: 4px; }
.spark { flex: none; }

/* прогресс: переключатель разделов, изменения в %, статусы */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; background: var(--card); border-radius: 13px; padding: 3px; margin-bottom: 12px; }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 700; padding: 9px 6px; border-radius: 10px; cursor: pointer; }
.seg button.on { background: var(--card2); color: var(--text); }
.seg.mini { background: none; padding: 0; gap: 6px; margin-bottom: 12px; }
.seg.mini button { font-size: 13px; padding: 6px 4px; background: var(--card); }
.seg.mini button.on { background: var(--accent-soft); color: var(--accent); }
.chip .dot { width: 8px; height: 8px; }
.delta { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.small { font-size: 12px; }
.big { font-size: 32px; font-weight: 800; line-height: 1.15; }
.badge.red { background: rgba(255,90,95,.14); color: var(--red); }
.list-item.dimmed { opacity: .55; }

.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .c b { font-size: 26px; font-variant-numeric: tabular-nums; }

.bar { height: 7px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; }

.fab-row { position: fixed; left: 0; right: 0; bottom: calc(70px + var(--safe-b)); padding: 0 16px; z-index: 25; max-width: 720px; margin: 0 auto; }
body.no-tabs .fab-row { bottom: calc(14px + var(--safe-b)); }

/* карта: OSM в тёмном виде */
.dark-tiles { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.6); }
.leaflet-container { background: #0d1117; font: inherit; }
.leaflet-container svg { width: auto; height: auto; }   /* общее правило иконок (22px) ломает слой маршрута */
.leaflet-control-attribution { background: rgba(13,17,23,.7) !important; color: var(--dim) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--dim) !important; }

/* ── питание */
.fd-in { font-size: 16px; }                         /* iOS не зумит поле при фокусе */
.fd-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.fd-daybar { display: flex; align-items: center; gap: 4px; margin: -4px -8px 8px; }
.fd-daybar .icon-btn { width: 52px; height: 52px; flex: none; }
.fd-day { position: relative; flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; padding: 4px 0; }
.fd-day b { font-size: 18px; }
.fd-date { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
.fd-today { text-align: center; margin: -6px 0 6px; }
.fd-sum { display: flex; align-items: center; gap: 14px; }
.fd-ring .c { text-align: center; line-height: 1.2; }
.fd-macros { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 11px; }
.fd-macro .row { margin-bottom: 4px; gap: 6px; }
.fd-note { margin-top: 10px; }
.fd-burn { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.fd-burn .row { gap: 6px; }
.fd-fire { width: 18px; height: 18px; color: var(--accent); }
.fd-meal { padding: 8px 8px 6px 14px; }
.fd-meal-head { display: flex; align-items: center; gap: 2px; min-height: 44px; }
.fd-meal-head .t { flex: 1; font-weight: 700; font-size: 16px; }
.fd-meal-head .muted { margin-right: 4px; }
.fd-plus { color: var(--accent); }
.fd-chat .tiny.dim { margin: -4px 0 2px; }
.fd-items { padding-right: 6px; }
.fd-items .list-item { padding: 10px 2px; gap: 10px; }
.fd-ro { cursor: default; }
.fd-ro:active { opacity: 1; }
.fd-kcal { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; flex: none; }
.fd-spacer { height: 76px; }
.fd-fab { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fd-fab .btn { min-height: 52px; padding: 10px 6px; gap: 6px; font-size: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
.fd-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 2px; }
.fd-tools .btn { min-height: 50px; padding: 10px 8px; font-size: 14px; }
.fd-tools svg, .fd-fab svg { width: 20px; height: 20px; flex: none; }
.fd-list { padding: 2px 14px; }
.fd-list .empty { padding: 20px 6px; }
.fd-name { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fd-add { color: var(--accent); flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); }
.fd-add svg { width: 20px; height: 20px; }
.fd-busy { opacity: .45; pointer-events: none; }
.fd-portion { margin-top: 10px; }
.fd-qty { display: flex; align-items: center; gap: 10px; }
.fd-qty .btn { width: 60px; min-width: 60px; height: 60px; padding: 0; font-size: 28px; border-radius: 16px; }
.fd-big { flex: 1; min-width: 0; height: 60px; text-align: center; font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 6px; }
.fd-unit { text-align: center; color: var(--muted); font-size: 13px; margin: 5px 0 10px; }
.fd-units { justify-content: center; margin-bottom: 4px; }
.fd-nutr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.fd-nutr .stat { padding: 8px 4px; text-align: center; background: var(--card); }
.fd-nutr .stat .v { font-size: 19px; }
.fd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fd-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fd-grid4 input.field { padding: 11px 6px; text-align: center; }
.fd-grid4 label.lbl { font-size: 12px; margin-left: 0; margin-right: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-grid2 .btn svg { flex: none; }
.fd-hint { margin: 6px 2px 0; min-height: 1em; }
.fd-cam { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 56vh; border-radius: 18px; overflow: hidden; background: #000; }
.fd-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-aim { position: absolute; left: 8%; right: 8%; top: 35%; bottom: 35%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.38); }
.fd-cam.on .fd-aim { border-color: var(--accent); }
.fd-aim i { position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: var(--red); opacity: 0; box-shadow: 0 0 8px var(--red); }
.fd-cam.on .fd-aim i { opacity: 1; animation: fd-scan 1.4s ease-in-out infinite alternate; }
@keyframes fd-scan { from { transform: translateY(-26px); } to { transform: translateY(26px); } }
.fd-status { text-align: center; margin: 12px 4px; font-weight: 600; min-height: 1.4em; }
.fd-status.bad { color: var(--red); font-weight: 500; }
.fd-manual { display: flex; gap: 8px; align-items: stretch; }
.fd-manual input { height: 48px; letter-spacing: .06em; }
.fd-progress { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--radius); padding: 14px; margin-top: 12px; }
.fd-spin { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 3px solid var(--card2); border-top-color: var(--accent); animation: fd-rot .9s linear infinite; }
@keyframes fd-rot { to { transform: rotate(360deg); } }
.fd-photo-wrap { position: relative; margin-top: 10px; }
.fd-photo { width: 100%; max-height: 48vh; object-fit: contain; display: block; border-radius: 14px; background: #000; }
.fd-photo-x { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); }
.fd-photos.many { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; }
.fd-photos.many .fd-thumb { margin-top: 0; flex: none; width: 38%; max-width: 180px; aspect-ratio: 3 / 4; }
.fd-photos.many .fd-thumb .fd-photo { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.fd-thumb .fd-photo-x { top: 4px; right: 4px; }
.fd-photo-note { margin: 6px 2px 0; }
.shoot { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; display: flex; flex-direction: column; }
.shoot-top { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 12px 8px; }
.shoot-top .t { flex: 1; text-align: center; font-weight: 600; }
.shoot-top .icon-btn { background: rgba(255,255,255,.14); color: #fff; }
.shoot-sp { width: 40px; flex: none; }
.shoot-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.shoot-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shoot-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.shoot-flash.on { animation: shoot-flash .28s ease-out; }
@keyframes shoot-flash { from { opacity: .75; } to { opacity: 0; } }
.shoot-msg-wrap { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.shoot-msg { font-weight: 600; line-height: 1.4; }
.shoot-thumbs { display: flex; gap: 6px; padding: 8px 12px 0; height: 64px; box-sizing: content-box; overflow-x: auto; }
.shoot-thumbs img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255,255,255,.8); animation: fade .2s; }
.shoot-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 16px calc(14px + var(--safe-b)); }
.shoot-hint { color: rgba(255,255,255,.65); }
.shoot-btn { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: none; padding: 4px; cursor: pointer; }
.shoot-btn::after { content: ''; display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s; }
.shoot-btn:active::after { transform: scale(.88); }
.shoot-btn:disabled { opacity: .35; }
.shoot-done { justify-self: end; }
.fd-ritem { border-bottom: 1px solid var(--line); }
.fd-rrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.fd-refine-btn { background: none; border: 0; padding: 4px 0 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fd-refine { display: flex; gap: 8px; padding: 0 0 12px 42px; }
.fd-refine input { flex: 1; min-width: 0; }
.fd-refine .btn { flex: none; padding: 8px 14px; }
.fd-refine-st { padding: 0 0 10px 42px; }
.fd-src { margin-left: 6px; vertical-align: 1px; }
.fd-rrow.off .grow, .fd-rrow.off .fd-kcal { opacity: .45; }
.fd-rrow.fd-added { opacity: .45; }
.fd-check { width: 32px; height: 32px; flex: none; border-radius: 10px; border: 2px solid var(--line); background: none; display: grid; place-items: center; color: transparent; padding: 0; cursor: pointer; }
.fd-check.on { background: var(--accent); border-color: var(--accent); color: #111; }
.fd-check svg { width: 18px; height: 18px; stroke-width: 3; }
.fd-rg { display: flex; align-items: center; gap: 4px; flex: none; }
.fd-rrow input.fd-g { width: 64px; flex: none; padding: 8px 6px; text-align: right; }
.fd-rrow .fd-kcal { min-width: 40px; }
.fd-est { margin-left: 6px; vertical-align: 1px; }
.fd-total { padding-top: 10px; font-size: 14px; }
.fd-comment { margin: 2px 4px 4px; }

/* ── голосовой ввод */
.voice-btn svg { width: 20px; height: 20px; flex: none; }
.voice-btn.rec { background: var(--red); color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 9px rgba(255,90,95,.2); } }
.fd-voice { margin-top: 8px; }
.fd-supps .chips { gap: 6px; padding: 0 0 8px; }
.fd-supp svg { width: 14px; height: 14px; stroke-width: 3; opacity: .3; }
.fd-supp.on svg { opacity: 1; }

/* ── здоровье: добавки и анализы */
#tabs a span { white-space: nowrap; }
.hl-slot { padding: 8px 14px 4px; }
.hl-slot .list-item { gap: 10px; padding: 10px 0; }
.hl-adh { flex: none; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.hl-cat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hl-cat-item { text-align: left; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); font: inherit; cursor: pointer; }
.hl-cat-item:active { opacity: .7; }
.hl-list { padding: 2px 14px; }
.hl-val { flex: none; text-align: right; font-variant-numeric: tabular-nums; max-width: 42%; }
.hl-supp-photo { width: 100%; max-height: 30vh; object-fit: contain; display: block; border-radius: 12px; background: #000; margin-bottom: 4px; }
