/* Переиспользуемые компоненты: поиск, чипы, карточки, состояния, настройки. */

/* ── Иконки Lucide (js/icons.js): цвет берут у текста, размер — от шрифта ── */
.i { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.22em; }
/* иконка перед подписью; в cat-mode отступ уже даёт gap */
.chip .i, .deal-chip .i, .rec-photo .i, .ing-add .i, .rec-primary .i, .rec-secondary .i,
.saved-open .i, .ai-note .i { margin-right: .4em; }
.chip.cat-mode .i { margin-right: 0; }
.ai-note .i { color: var(--accent); }

/* Значок сети (storeMark): буква на фирменном цвете вместо эмодзи */
.sm {
  display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; margin-right: .45em;
  border-radius: .45em; background: var(--sm-bg, var(--sep)); color: var(--sm-fg, var(--hint));
  font-size: .8em; font-weight: 900; line-height: 1; vertical-align: .1em; flex-shrink: 0;
}
.sm .i { width: 1.1em; height: 1.1em; }
.net-toggle.off .sm { filter: grayscale(1); }
/* на зелёной «таблетке» зелёный значок ВкусВилла иначе сливается */
.net-toggle.on .sm { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }

.search { position: relative; display: flex; gap: 8px; margin-bottom: 16px; }
.composition { font: inherit; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 12px; padding: 8px 10px; cursor: pointer; }
.nt-food-evidence { font-size: 13px; color: var(--hint); margin: 8px 0 16px; overflow-wrap: anywhere; }
.nt-food-evidence p { margin: 8px 0; }
.nt-food-evidence summary { cursor: pointer; color: var(--accent); font-size: 15px; padding: 8px 0; }
.search-field { position: relative; flex: 1; min-width: 0; display: flex; }
.search-field input { min-width: 0; padding-right: 52px; }
/* Крестик очистки и статус ИИ лежат поверх поля справа. Крестик — span, а не button:
   на button легли бы стили «Найти». Он виден, пока в поле есть текст (placeholder не показан) */
.q-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: none;
  width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--hint) 22%, transparent); color: var(--hint); font-size: 14px; cursor: pointer;
}
.search-field input:not(:placeholder-shown) ~ .q-clear { display: flex; }
.search .search-field input:not(:placeholder-shown) { padding-right: 44px; }
/* Статус ИИ: пилюля с заливкой — пока ИИ работает, фон медленно заполняется, в конце залит целиком */
.ai-pill {
  position: absolute; right: 44px; top: 50%; transform: translateY(-50%); overflow: hidden;
  border-radius: 10px; padding: 1px 6px; font-size: 10px; white-space: nowrap; pointer-events: none;
  background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, #000);
}
.ai-pill:not([hidden]) { display: block; }
.search-field input:placeholder-shown ~ .ai-pill { display: none; }  /* поле очистили — статус старого запроса не нужен */
.ai-pill-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--accent) 20%, transparent); }
.ai-pill.is-search .ai-pill-fill { animation: aiFill 3s ease-out forwards; }
.ai-pill.is-done .ai-pill-fill { width: 100%; }
.ai-pill-text { position: relative; display: flex; align-items: center; gap: 3px; }
.ai-pill .i { width: 10px; height: 10px; color: var(--accent); }
.search .search-field.has-pill input { padding-right: calc(52px + var(--pill-w, 0px)); }
@keyframes aiFill { from { width: 0; } to { width: 92%; } }
.search input {
  flex: 1; padding: 9px 16px; border: 1.5px solid var(--sep); border-radius: 14px;
  background: var(--card); color: var(--text); font-size: 16px; outline: none;
  transition: border-color .15s;
}
.search input:focus { border-color: var(--accent); }
.search button {
  border: none; border-radius: 14px; padding: 0 20px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 15px;
}

/* Подсказки при наборе (#ac): выпадают под полем поверх чипов и выдачи.
   Строки — div, а не button: иначе на них легли бы стили .search button */
.ac {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 10;
  background: var(--card); border: 1px solid var(--sep); border-radius: 14px;
  box-shadow: var(--shadow); padding: 4px;
}
.ac-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.ac-item:active { background: var(--accent-soft); }
@media (hover: hover) { .ac-item:hover { background: var(--accent-soft); } }
.ac-item .i { color: var(--hint); }
.ac-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-typed { font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  padding: 6px 12px; border-radius: 18px; background: var(--accent-soft);
  color: var(--accent); font-size: 13.5px; font-weight: 600; border: none; cursor: pointer;
}

/* режим «Категория»: включён — залит акцентом; точка = запрос можно расширить */
.chip.cat-mode { display: inline-flex; align-items: center; gap: 6px; }
/* режимы поиска — сетка 2 колонки: ряды ровно друг под другом и от края до края */
.chips.modes { display: grid; grid-template-columns: 1fr 1fr; }
.chips.modes > .chip { justify-content: center; }
.chips.modes > .chip[hidden] { display: none; }
.chip.cat-mode.active, .chip.active { background: var(--accent); color: var(--accent-text); }
/* круглая кнопка-иконка */
.chip.cat-mode.icon-only { aspect-ratio: 1; padding: 0; justify-content: center; border-radius: 50%; min-width: 38px; }
/* сегменты — «Взрослым | Детям» в «Как принимать» (.ht-who) */
.seg { display: inline-flex; padding: 2px; border-radius: 14px; background: var(--bg); }
.seg-opt { padding: 2px 8px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--hint); transition: background .15s, color .15s; }
.seg-opt.on { background: var(--accent); color: var(--accent-text); }
/* поиск: «Все товары | Белковые» и «По цене: За кг | За шт. | Дороже» */
.search-mode-row, .search-sort-row {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.search-mode-row[hidden], .search-sort-row[hidden], .search-sort-options button[hidden] { display: none; }
.search-mode-option, .search-sort-options button {
  min-width: 40px; min-height: 34px; padding: 0 10px;
  color: var(--text); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
}
.search-mode-option { border: 1px solid var(--sep); border-radius: 17px; background: var(--card); padding-inline: 14px; }
.search-sort-row > span { font-size: 13px; color: var(--text); }
.search-sort-options {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; max-width: 100%;
  border-radius: 14px; background: var(--field, var(--sep));
}
.search-sort-options button { padding-inline: 7px; border: 0; border-radius: 10px; background: transparent; }
.search-mode-option[aria-pressed="true"], .search-sort-options button[aria-pressed="true"] {
  background: var(--accent-strong, #16763b); color: var(--accent-text);
}
.chip.cat-mode .hint {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2px var(--card);
}

/* популярные запросы до поиска — плитки: иконка продукта на своей пастельной
   подложке (--tile-bg/--tile-fg из SearchTab) и подпись снизу */
.chips.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0;
  background: none; border: none; color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer;
  /* длинное слово («обезболивающее») шире колонки — переносим по слогам, а не наезжаем на соседа */
  min-width: 0; line-height: 1.2; text-align: center; -webkit-hyphens: manual; hyphens: manual; overflow-wrap: anywhere; text-wrap: balance;
}
.tile-ic {
  width: 100%; max-width: 76px; aspect-ratio: 1; border-radius: 18px;
  display: grid; place-items: center; background: var(--tile-bg); color: var(--tile-fg);
}
.tile-ic .i { width: 34px; height: 34px; stroke-width: 1.8; transition: filter .2s ease; }
.tile-ic .tile-3d { width: 68%; height: 68%; object-fit: contain; transition: filter .2s ease; }
/* поиск по плитке: иконка размыта под стеклом, поверх — лоадер */
.tile-ic { position: relative; overflow: hidden; }
.tile.loading { pointer-events: none; }
.tile.loading .tile-ic .i, .tile.loading .tile-ic .tile-3d { filter: blur(4px); }
.tile.loading .tile-ic::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .15));
  -webkit-backdrop-filter: blur(6px) saturate(160%); backdrop-filter: blur(6px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.tile.loading .tile-ic::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; box-sizing: border-box;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .7); border-top-color: var(--tile-fg);
  animation: spin .8s linear infinite;
}

.card {
  display: flex; gap: 12px; background: var(--card); border-radius: var(--radius);
  padding: 12px; margin-bottom: 10px; align-items: center;
  box-shadow: var(--shadow); border: 1px solid var(--sep);
}
.card.best { outline: 2px solid var(--accent); }
.card img { width: 66px; height: 66px; border-radius: 12px; object-fit: contain; padding: 3px; background: var(--bg); flex-shrink: 0; }
.card .info { flex: 1; min-width: 0; }
/* переносим строку только между магазином и ярлыком: без этого эмодзи
   отрывалось от названия сети и висело на своей строке */
.card .store { font-size: 12.5px; color: var(--hint); display: flex; align-items: center;
  gap: 5px; flex-wrap: wrap; }
.card .shop { white-space: nowrap; }
.card .shop img.restaurant-logo, [data-theme] #results .card .shop img.restaurant-logo {
  display: inline-block; width: 1.8em; height: 1.8em; aspect-ratio: auto; filter: none;
  margin-right: .35em; padding: 1px; border-radius: .35em; object-fit: contain;
  background: #fff; vertical-align: -.45em; }
.add .i { width: 1em; height: 1em; margin-left: .15em; }
.arr .i { width: 1em; height: 1em; vertical-align: -.15em; }
.card .tag { color: var(--accent); font-weight: 700; white-space: nowrap; }
/* «вы брали» / «часто берут» тише, чем «дешевле всего»: это подсказка, а не выгода */
.card .tag.soft { color: var(--hint); font-weight: 600; }
/* три строки, а не две: названия тут длинные («Батончик Snickers шоколадный
   жареный арахис-карамель-нуга 81 г»), и на двух обрывалось на полуслове */
.card .name { font-size: 13.5px; margin: 2px 0 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.card .price { font-size: 18px; font-weight: 800; }
.card .old { font-size: 12.5px; color: var(--hint); text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.card .unit { font-size: 11.5px; color: var(--hint); margin-left: 6px; }
.card .badge { display: inline-block; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; }
/* «В магазин» — небольшая ссылка под ценой (слева) */
.store-link { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--link); cursor: pointer; text-decoration: none; }
/* Кнопки справа. Ширину колонки задаёт самая широкая из них, а всё, что она
   заберёт, отнимается у названия товара слева — оно и так обрезано двумя
   строками. Поэтому подписи короткие, а у колокольчика её нет вовсе. */
.card .actions { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; align-self: center; }
.add { border: 1.5px solid var(--accent); border-radius: 10px; padding: 7px 10px; font-size: 11.5px; font-weight: 700; background: transparent; color: var(--accent); white-space: nowrap; cursor: pointer; }
.add.added { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.bell { border: 1.5px solid var(--sep); border-radius: 10px; padding: 4px 10px; font-size: 15px; line-height: 1.4; background: transparent; color: var(--hint); cursor: pointer; }
.bell.on { border-color: #ff9500; color: #ff9500; background: color-mix(in srgb, #ff9500 12%, transparent); }
/* колокольчик и «БЖУ» — вторичные, в одну строку под «В корзину», чтобы
   карточка не стала выше */
.card .actions-row { display: flex; gap: 5px; }
.card .actions-row .bell { flex: 1; }
/* «БЖУ» — на подложке цвета акцента и с бликом (motion.css): серым ярлыком её
   не замечали */
.nutri { position: relative; overflow: hidden; border: none; border-radius: 10px; padding: 4px 8px; font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--accent); cursor: pointer; }

/* вкладка «Скидки» */
.deals-banner { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); font-weight: 700; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; }
.watch-item { display: flex; gap: 12px; background: var(--card); border-radius: 16px; padding: 11px; margin-bottom: 10px; align-items: center; box-shadow: var(--shadow); }
.wi-pic { position: relative; flex-shrink: 0; }
.wi-off { position: absolute; left: -4px; bottom: -4px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 8px; }
.watch-item img { width: 60px; height: 60px; border-radius: 12px; object-fit: contain; padding: 3px; background: var(--bg); flex-shrink: 0; }
.wi-info { flex: 1; min-width: 0; }
.wi-store { font-size: 12.5px; color: var(--hint); }
.wi-name { font-size: 13.5px; margin: 2px 0 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wi-price { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.w-old { color: var(--hint); text-decoration: line-through; font-size: 13px; }
.w-new { font-size: 17px; font-weight: 800; color: var(--danger); }
.w-cur { font-size: 17px; font-weight: 800; }
.w-hint { font-size: 11.5px; color: var(--hint); }
.wi-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.del-watch { color: var(--hint); border: none; background: none; font-size: 17px; cursor: pointer; padding: 2px; }
.watch-item[data-id] { cursor: pointer; }
.watch-item.open { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.wi-chevron { opacity: .6; }
.wi-chevron .i { width: 14px; height: 14px; }

/* шапка Скидок: чипы + обновить */
/* «Скидки в чат» на вкладке «Скидки»: строка-тумблер над чипами */
.deals-notify { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 10px; padding: 7px 10px; border: none; border-radius: 14px; background: var(--card); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.deals-notify .ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); color: var(--hint); flex-shrink: 0; }
.deals-notify.on .ic { background: var(--accent-soft); color: var(--accent); }
.deals-notify .ic .i { width: 16px; height: 16px; }
.deals-notify .dn-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; font-weight: 800; white-space: nowrap; }
.deals-notify .sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; color: var(--hint); }
.dn-switch { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--sep); flex-shrink: 0; transition: background-color .2s ease; }
.dn-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.deals-notify.on .dn-switch { background: var(--accent); }
.deals-notify.on .dn-switch::after { transform: translateX(16px); }
/* переключатель отделов в «Скидках» и «Корзине»: сегменты в одну строку, компактно */
/* вкладки не сжимаются меньше подписи (иначе число упирается в край) — на узком экране ряд листается */
.dept-switch { display: flex; gap: 4px; margin-bottom: 10px; padding: 3px; border-radius: 14px; background: var(--card); overflow-x: auto; scrollbar-width: none; }
.dept-tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px; border: none; border-radius: 11px; background: transparent; color: var(--hint);
  font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.dept-tab .i { width: 15px; height: 15px; flex: none; }
.dept-tab .cnt { opacity: .6; font-weight: 600; font-size: 11.5px; }
.dept-tab:disabled { opacity: .4; cursor: default; }
.dept-tab.active { background: var(--accent); color: var(--accent-text); }
.restaurant-note { color: var(--hint); font-size: 12px; line-height: 1.4; margin: 8px 2px; }
.card .bell:disabled { opacity: .35; cursor: not-allowed; }
.dept-tab.dept-beauty.active { background: linear-gradient(90deg, #f7a1d5, #a8c8ff, #a6f0d0); color: #22222a; }
.dept-tab.dept-pharmacy.active { background: linear-gradient(90deg, #8fe3bd, #a8d4ff); color: #16322a; }

.deals-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.deal-chips { display: flex; gap: 8px; }
.deal-chip { padding: 8px 13px; border-radius: 20px; border: 1.5px solid var(--sep); background: transparent; color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.deal-chip.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.deal-chip .cnt { opacity: .6; margin-left: 3px; }
.deal-chip.active .cnt { opacity: .85; }
.refresh-btn { border: 1.5px solid var(--sep); background: transparent; color: var(--link); border-radius: 20px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.refresh-btn:disabled { opacity: .6; cursor: default; }

/* добавление товара по ссылке */
.link-add { display: flex; gap: 8px; margin-bottom: 10px; }
.link-add input {
  flex: 1; min-width: 0; padding: 11px 14px; border: 1.5px solid var(--sep); border-radius: 14px;
  background: var(--card); color: var(--text); font-size: 15px; outline: none; transition: border-color .15s;
}
.link-add input:focus { border-color: var(--accent); }
.link-add button { border: none; border-radius: 14px; padding: 0 16px; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.link-add button:disabled { opacity: .6; cursor: default; }
.link-note { font-size: 12.5px; margin: -4px 2px 12px; line-height: 1.4; }
.link-note.loading { color: var(--hint); }
.link-note.ok { color: var(--accent); }
.link-note.error { color: var(--danger); }

/* история цены (разворот) */
.wh-panel { background: var(--card); border-radius: 0 0 16px 16px; padding: 4px 12px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.wh-spark { width: 100%; height: 44px; display: block; }
.wh-summary { font-size: 12px; color: var(--hint); margin: 4px 0 6px; }
.wh-rows { display: flex; flex-direction: column; }
.wh-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--sep); }
.wh-row.down span:last-child { color: #23a55a; font-weight: 700; }
.wh-row.up span:last-child { color: var(--danger); }
.wh-row span:first-child { color: var(--hint); }
.wh-empty { font-size: 12.5px; color: var(--hint); padding: 6px 0; }

.hint-add { font-size: 12.5px; color: var(--hint); margin: -6px 2px 12px; }

/* чипы-уточнения (группы выдачи от ИИ) */
.refine-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.refine-row::-webkit-scrollbar { display: none; }
.refine-chip {
  flex-shrink: 0; padding: 6px 11px; border-radius: 18px; border: 1.5px solid var(--sep);
  background: transparent; color: var(--text); font-size: 13px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
}
.refine-chip.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.refine-chip .cnt { opacity: .6; font-size: 12px; margin-left: 3px; }
.refine-chip.active .cnt { opacity: .85; }
.drug-chip .cnt { opacity: .6; font-size: 12px; margin-left: 3px; }
.drug-chip.active .cnt { opacity: .85; }

/* корзина */
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 600; }
/* «Всё в одной аптеке» — подсказка над списком корзины */
.one-store { margin-bottom: 12px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(90deg, #dcf7ec, #e3f1ff); color: #16322a; }
.os-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; opacity: .8; }
.os-title .i { width: 16px; height: 16px; }
.os-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 15px; font-weight: 700; }
.os-row span { display: inline-flex; align-items: center; gap: 6px; }
.os-hint { margin-top: 2px; font-size: 12px; opacity: .7; }
.link-btn { border: none; background: none; color: var(--danger); font-size: 14px; font-weight: 600; cursor: pointer; }
.cart-group { background: var(--card); border-radius: 16px; padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.cart-group-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.cart-group-total { color: var(--accent); }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--sep); }
.cart-item img { width: 44px; height: 44px; border-radius: 9px; object-fit: contain; padding: 3px; background: var(--bg); flex-shrink: 0; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ci-price { font-size: 14px; font-weight: 700; margin-top: 2px; }
.ci-each { font-size: 11.5px; font-weight: 500; color: var(--hint); margin-left: 4px; }
/* количество: − 2 + */
.qty { display: inline-flex; align-items: center; gap: 2px; margin-top: 5px; background: var(--bg); border-radius: 10px; padding: 2px; }
.qty-btn { width: 28px; height: 26px; border: none; border-radius: 8px; background: var(--card); color: var(--text); font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; }
.qty-btn:disabled { opacity: .4; cursor: default; }
.qty-n { min-width: 22px; text-align: center; font-size: 14px; font-weight: 700; }
.buy-item { border: none; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--accent-text); cursor: pointer; }
.del-item { color: var(--hint); border: 1.5px solid var(--sep); background: var(--bg); border-radius: 10px; font-size: 15px; cursor: pointer; padding: 6px 9px; line-height: 1; }
.del-item:hover { border-color: var(--danger); color: var(--danger); }
.open-store { width: 100%; margin-top: 10px; border: none; border-radius: 10px; padding: 9px; font-size: 13px; font-weight: 600; background: var(--bg); color: var(--link); cursor: pointer; }
.vv-cart { display: flex; align-items: center; justify-content: center; gap: 6px; }
.vv-cart .i.i3d { width: 22px; height: 22px; }
.vv-cart:disabled { opacity: .6; }
.vv-hint { margin-top: 6px; text-align: center; font-size: 12px; color: var(--hint); }
.cart-total { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px 8px; font-weight: 800; font-size: 17px; }
.cart-total-sum { font-size: 20px; }

/* вкладка «Рецепт» */
.rec-input { margin-bottom: 14px; }
.rec-input textarea { width: 100%; min-height: 88px; border: none; border-radius: 12px; background: var(--card); color: var(--text); font-size: 15px; padding: 12px 14px; outline: none; resize: vertical; font-family: inherit; }
.rec-actions { display: flex; gap: 8px; margin-top: 8px; }
.rec-photo { flex-shrink: 0; padding: 11px 15px; border-radius: 12px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.rec-primary { flex: 1; border: none; border-radius: 12px; padding: 12px; background: var(--accent); color: var(--accent-text); font-size: 15px; font-weight: 700; cursor: pointer; }
.rec-photo-name { font-size: 12.5px; color: var(--hint); margin-top: 6px; }

/* превью прикреплённого фото */
.rec-preview { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px; background: var(--card); border: 1px solid var(--sep); border-radius: 14px; }
.rec-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: var(--bg); flex-shrink: 0; }
.rec-preview-name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-preview-del { border: none; background: none; color: var(--hint); font-size: 15px; cursor: pointer; padding: 4px 6px; flex-shrink: 0; }
.rec-preview-del:hover { color: var(--danger); }

/* кнопка в состоянии «Распознаётся…» */
.rec-primary.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: 8px; opacity: .85; cursor: default; }
.btn-spinner { width: 14px; height: 14px; border: 2px solid color-mix(in srgb, var(--accent-text) 40%, transparent); border-top-color: var(--accent-text); border-radius: 50%; animation: spin .7s linear infinite; }
/* место под «...» занято всегда — текст рядом не сдвигается, когда точки появляются */
.btn-dots { display: inline-block; width: 1.1em; text-align: left; }
.rec-primary.is-loading .btn-dots { margin-left: -6px; }
.btn-dots::after { content: ""; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.rec-card { background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.rec-title { width: 100%; border: none; background: transparent; color: var(--text); font-size: 18px; font-weight: 800; outline: none; margin-bottom: 10px; }
.ing-list { display: flex; flex-direction: column; gap: 7px; }
.ing-row { display: flex; gap: 8px; align-items: center; }
.ing-input { flex: 1; border: none; border-radius: 9px; background: var(--bg); color: var(--text); font-size: 14px; padding: 9px 11px; outline: none; }
.ing-del { border: none; background: none; color: var(--hint); font-size: 15px; cursor: pointer; padding: 4px 6px; }
.ing-add { border: none; background: none; color: var(--link); font-size: 14px; font-weight: 600; cursor: pointer; margin: 8px 0 2px; padding: 4px; }
.rec-find { width: 100%; margin-top: 6px; }
.rec-modes { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rec-secondary { width: 100%; border: 1.5px solid var(--sep); border-radius: 12px; padding: 11px; background: var(--bg); color: var(--text); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.shop-modes { margin-bottom: 4px; }
.store-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; padding: 2px 2px 8px; }
.store-total { color: var(--accent); }
.store-add { margin-top: 10px; }
.opt-group { margin-bottom: 16px; }
.opt-title { font-size: 15px; font-weight: 800; margin: 2px 2px 8px; text-transform: capitalize; }
.opt-btns { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* «+ в корзину» у строки подбора: уже в корзине — мягкая заливка и галочка */
.opt-add.row-add { display: grid; place-items: center; min-width: 34px; padding: 5px 8px; }
.opt-add.row-add .i { width: 16px; height: 16px; }
.opt-add.row-add.added { background: var(--accent-soft); color: var(--accent-strong, var(--accent)); border-color: transparent; }
.opt-add { border: 1.5px solid var(--accent); background: none; color: var(--accent); border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; padding: 5px 10px; }
.opt-old { font-size: 12px; color: var(--hint); text-decoration: line-through; font-weight: 400; margin-left: 4px; }
.shop-card { background: var(--card); border-radius: 16px; padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--sep); }
.shop-row:first-child { border-top: none; }
.shop-row img { width: 42px; height: 42px; border-radius: 9px; object-fit: contain; padding: 3px; background: var(--bg); flex-shrink: 0; }
.shop-info { flex: 1; min-width: 0; }
.shop-ing { font-size: 13px; font-weight: 700; }
.shop-prod { font-size: 12px; color: var(--hint); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.shop-row.miss { justify-content: space-between; color: var(--hint); font-size: 13px; }
.miss-note { font-size: 12px; }
.shop-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; padding: 12px 2px; }
.saved-list { display: flex; flex-direction: column; gap: 8px; }
.saved-row { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: 12px; padding: 11px 13px; }
.saved-open { flex: 1; font-size: 14px; font-weight: 600; cursor: pointer; }
.saved-cnt { color: var(--hint); font-size: 12px; font-weight: 400; margin-left: 6px; }
.saved-del { border: none; background: none; color: var(--hint); font-size: 15px; cursor: pointer; padding: 2px 4px; }

.state { text-align: center; color: var(--hint); padding: 44px 20px; }
.state > .i { display: block; width: 40px; height: 40px; margin: 0 auto 12px; stroke-width: 1.6; opacity: .7; }
.nt-nofood { font-size: 48px; line-height: 1; margin-bottom: 12px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--sep); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.corrected { font-size: 13px; color: var(--hint); margin-bottom: 10px; }

.empty-hero { text-align: center; padding: 40px 24px; }
.empty-hero .ic {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.empty-hero .ic .i { width: 40px; height: 40px; stroke-width: 1.7; }
.empty-hero h2 { font-size: 19px; margin-bottom: 8px; }
.empty-hero p { color: var(--hint); font-size: 14px; line-height: 1.5; max-width: 300px; margin: 0 auto; }

.set-group { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--sep); font-size: 15px; gap: 12px; }
.set-row:last-child { border-bottom: none; }
.set-row .sub { color: var(--hint); font-size: 13px; }
.set-title { font-size: 13px; color: var(--hint); text-transform: uppercase; letter-spacing: .4px; margin: 0 4px 7px; font-weight: 600; }
/* экран админа «Пользователи» (adminPeopleView.js): строка человека — кнопка на всю ширину */
.set-row:has(+ #adminBox:empty) { border-bottom: none; }
.ap-user { width: 100%; background: none; border: none; border-bottom: 1px solid var(--sep); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ap-user:last-child { border-bottom: none; }
.ap-user:active { background: var(--sep); }
.ap-main { min-width: 0; overflow-wrap: anywhere; }
.ap-cost { flex-shrink: 0; font-weight: 800; white-space: nowrap; }
.ap-big { font-size: 22px; }
.ap-gift { padding: 14px 16px; }
.ap-pro { display: inline-block; padding: 1px 6px; border-radius: 6px; background: var(--accent, #5aa84a); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.store-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.store-badge { padding: 6px 11px; border-radius: 20px; background: var(--bg); font-size: 13px; border: 1px solid var(--sep); }
/* тумблеры сетей в поиске */
.net-toggle {
  padding: 6px 11px; border-radius: 20px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--sep);
  transition: background .2s ease, color .2s ease, opacity .2s ease, border-color .2s ease;
}
.net-toggle.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.net-toggle.off { background: var(--bg); color: var(--hint); opacity: .6; text-decoration: line-through; }
.net-toggle:active { transform: scale(.94); }

/* «Выбрать все / Снять все»: волна по бейджам, чтобы было видно, что сработало */
.net-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.net-count { font-size: 13px; color: var(--hint); transition: color .2s ease; }
.net-count.warn { color: var(--danger); }
.net-all {
  padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .2s ease, color .2s ease;
}
.net-all:active { transform: scale(.93); }
.net-all.filled { background: var(--accent); color: var(--accent-text); }

@keyframes netWave {
  from { opacity: .25; transform: scale(.86); }
  60%  { transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}
.net-toggle.wave { animation: netWave .3s ease both; animation-delay: calc(var(--i) * 35ms); }

@media (prefers-reduced-motion: reduce) {
  .net-toggle.wave { animation: none; }
}
/* поле под три цифры (до 130): без стрелок-спиннера — они съедали место и обрезали число */

/* мой район в настройках: точка по геолокации или место по адресу */
.store-picker { padding: 12px 15px 15px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--sep); }
.store-addr { display: flex; gap: 8px; }
.store-addr input { flex: 1; padding: 10px 12px; border: none; border-radius: 10px; background: var(--bg); color: var(--text); font-size: 15px; outline: none; }
.store-opt { display: block; width: 100%; text-align: left; border: 1px solid var(--sep); border-radius: 10px; padding: 11px 13px; margin-top: 8px; background: var(--bg); color: var(--text); font-size: 14px; cursor: pointer; }
.store-opt:hover { border-color: var(--accent); }
.store-hint { font-size: 13px; color: var(--hint); }
.store-credit { margin-top: 8px; }
.store-credit a { color: var(--accent); cursor: pointer; }

/* строка состояния режима «ИИ» под чипами поиска */
.ai-note { font-size: 12px; color: var(--hint); margin: -6px 2px 8px; }

/* сети в настройках: тумблер + живой статус */
.net-list { display: flex; flex-direction: column; }
.net-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 15px; border-bottom: 1px solid var(--sep); }
.net-row .net-toggle { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
.net-row .net-toggle.off { text-decoration: none; }
.net-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 12px; line-height: 1; }
.net-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hint); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--sep); flex-shrink: 0; }
.net-state.online i { background: #22a55a; }
.net-state.slow i { background: #f5a524; }
.net-state.offline { color: var(--danger); white-space: normal; }
.net-state.offline i { background: var(--danger); }
.net-foot { gap: 12px; }
.net-foot .sub { font-size: 12px; }
.net-note { color: var(--danger); }
/* поиск сам сменил раздел: подпись и кнопка вернуться */
.dept-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.dept-note[hidden] { display: none; }
.
.dept-note .dept-back {
  padding: 3px 10px; border: none; border-radius: 12px; background: var(--card); color: var(--accent);
  font: inherit; font-weight: 700; cursor: pointer;
}

/* профиль в настройках */
.pf-row { gap: 10px; }
.pf-col { flex-direction: column; align-items: stretch; gap: 8px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { padding: 6px 11px; border-radius: 20px; border: 1px solid var(--sep); background: var(--bg); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.pf-chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pf-col input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--sep); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 15px; font-family: inherit; }
.pf-err { color: var(--danger); font-size: 12px; }
.pf-ok { color: var(--accent); }
.set-row:has(> #pfFlash:empty) { display: none; }
/* ── Вкладка «БЖУ» ── */
/* Свой акцент вкладки — «фитнес»: энергичный оранжево-коралловый градиент
   вместо зелёного магазина. Переопределяем переменные только внутри вкладки,
   поэтому кнопки, чипсы и подсветки (и в теме «Фуд-маркет» тоже) берут его сами. */
#v-nutrition, #v-search .protein-chip {
  --accent: #ff5a1f;
  --accent-strong: #e2470f;
  --accent-text: #ffffff;
  --accent-soft: #fff1ea;
  --link: #e2470f;
  --nt-grad: linear-gradient(135deg, #ff8a00 0%, #ff4d2e 55%, #ff2e6a 100%);
  --nt-track: color-mix(in srgb, var(--text) 7%, transparent);
  --nt-p: #ff9f1c;  /* белки — оранжевый */
  --nt-f: #8e6cf0;  /* жиры — фиолетовый */
  --nt-c: #2ec4b6;  /* углеводы — бирюза */
  font-variant-numeric: tabular-nums;
}
/* цвета БЖУ: одинаковые в плашках, полосках дня, сплите и статистике */
.nt-m.p, .nt-bar.p, .nt-mrow.p { --c: var(--nt-p); }
.nt-m.f, .nt-bar.f, .nt-mrow.f { --c: var(--nt-f); }
.nt-m.c, .nt-bar.c, .nt-mrow.c { --c: var(--nt-c); }
/* режим «Протеин» в поиске: белая кнопка, цвет — только в круге с гантелей;
   выбран — круг заливается оранжевым, остальные кнопки остаются спокойными */
#v-search .chips.modes > .protein-chip { justify-content: flex-start; padding: 4px 12px 4px 5px; gap: 8px; }
/* «Рестораны»: две компактные кнопки белка в ровном ряду */
#v-search .chips.modes > .rest-protein { flex: 1 1 calc(50% - 6px); min-width: 0; min-height: 42px; justify-content: center; padding: 7px 10px; text-align: center; line-height: 1.2; white-space: normal; font-size: 13px; }
#v-search .protein-chip .i {
  box-sizing: border-box; width: 24px; height: 24px; padding: 5px; border-radius: 50%;
  background: #fde8da; color: #e8743a; transition: background .2s ease, color .2s ease;
}
/* включён — вся кнопка в мягком градиенте, круг с белым кольцом */
#v-search .protein-chip.active {
  background: linear-gradient(rgba(255, 255, 255, .12), rgba(255, 255, 255, .12)), linear-gradient(90deg, #ff9a5a, #f0568c);
  color: #22222a; animation: none;
}
#v-search .protein-chip.active .i {
  background: linear-gradient(135deg, #ff9a5a, #f0568c); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
}
/* «Аналоги» в аптеке: мятный круг с таблеткой, как гантель у «Протеина»;
   в первый раз — пульсирует, чтобы кнопку заметили */
#v-search .chips.modes > .analogs-chip { justify-content: flex-start; padding: 4px 12px 4px 5px; gap: 8px; }
#v-search .analogs-chip .i {
  box-sizing: border-box; width: 24px; height: 24px; padding: 5px; border-radius: 50%;
  background: #d9f5ea; color: #13a37a;
}
#v-search .analogs-chip.active { background: linear-gradient(90deg, #4fd1a5, #2bb7c4); color: #fff; }
#v-search .analogs-chip.active .i { background: rgba(255, 255, 255, .25); color: #fff; }
#v-search .analogs-chip.hint { animation: analogs-hint 0.85s ease-in-out 3; }
/* блик: светлая полоса пробегает по кнопке раз в несколько секунд, пока аналоги не включены */
#v-search .analogs-chip { position: relative; overflow: hidden; }
#v-search .analogs-chip:not(.active)::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, .85) 50%, transparent 80%);
  transform: translateX(-130%) skewX(-18deg); animation: analogs-shine 3.6s ease-in-out 1.2s infinite;
}
@keyframes analogs-shine { 0% { transform: translateX(-130%) skewX(-18deg); } 35%, 100% { transform: translateX(330%) skewX(-18deg); } }
@keyframes analogs-hint {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(43, 183, 160, .55); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(43, 183, 160, 0); }
}
@media (prefers-reduced-motion: reduce) { #v-search .analogs-chip.hint { animation: none; outline: 2px solid #2bb7a0; } #v-search .analogs-chip::after { display: none; } }
/* «Как принимать» рядом с «Аналогами»: та же форма и ширина колонки, круг — голубой с камерой */
#v-search .chips.modes > .howto-chip { justify-content: flex-start; padding: 4px 12px 4px 5px; gap: 8px; cursor: pointer; }
#v-search .howto-chip .i {
  box-sizing: border-box; width: 24px; height: 24px; padding: 5px; border-radius: 50%;
  background: #e3ecff; color: #3559c7;
}
#v-search .howto-chip .i.i3d { width: 24px; height: 24px; padding: 0; background: none; border-radius: 0; }
/* hidden у чипов перебивается display: inline-flex — прячем явно */
.chip.cat-mode[hidden] { display: none; }
.protein-chip .x { margin-left: 2px; font-size: 15px; line-height: 1; opacity: .8; }
/* «≈ 3.5 ₽ за 1 г белка» — первой строкой под фото */
.protein-tag { order: -2; display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-bottom: 4px;
  padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong, var(--accent));
  font-size: 11.5px; font-weight: 800; line-height: 1.25; }
.protein-tag .i { flex-shrink: 0; width: 13px; height: 13px; }
/* «Протеин»: белок и цена двумя блоками рядом, цена из ряда с кнопкой уходит сюда */
.card .pg { order: 4; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.card .pg > div { flex: 1 1 68px; min-width: 0; padding: 6px 8px; border-radius: 14px; }
.card .pg b { display: block; font-size: clamp(13px, 4.2vw, 16px); font-weight: 900; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .pg small { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.25; color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .pg-p { background: var(--accent-soft); }
.card .pg-p b, .card .pg-p small { color: var(--accent-strong, var(--accent)); }
.card .pg-c { background: var(--bg); }
.card.pg-card .info > div:has(.price) { display: none; }
.card.pg-card .price-inline { display: none; }
/* совет ИИ-нутрициолога в подборке «Протеиновые продукты» */
.protein-note { order: -1; margin-bottom: 4px; font-size: 12px; line-height: 1.3; color: var(--hint); }
/* плитки-входы в фичи: «БЖУ» и «Протеин» */
.tile-action { font-weight: 800; }
.tile-action .tile-ic { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tile-fg) 25%, transparent); }
/* главные кнопки вкладки — градиентом, с мягким цветным свечением */
#v-nutrition .rec-primary:not(:disabled) { background: var(--nt-grad); box-shadow: 0 6px 16px -6px rgba(255, 77, 46, .55); }
#v-nutrition .rec-primary { letter-spacing: .1px; }
/* «Диетолог» под «Узнать БЖУ» — тёмная, с меткой PRO */
.nt-dietitian { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 8px; padding: 13px; border: none; border-radius: 12px; background: #211a2e; color: #fff; font-size: 15px; font-weight: 800; box-shadow: 0 8px 20px -10px rgba(20, 10, 40, .8); cursor: pointer; }
.nt-dietitian .i3d { width: 22px; height: 22px; }
/* Диетолог и Тренер — отдельная карточка «ИИ-помощники»: два цветных квадрата с 3D-иконкой */
.nt-ai-card { margin-top: 12px; }
.nt-ai-row { display: flex; gap: 10px; }
.nt-ai-tile { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 108px; padding: 0 4px; border: none; border-radius: 20px; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.nt-ai-tile .i3d { width: 42px; height: 42px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }
.nt-ai-tile .nt-pro { position: absolute; top: 8px; right: 8px; }
.nt-ai-diet { background: linear-gradient(150deg, #ff9a5a, #ff5f8f); box-shadow: 0 10px 22px -12px rgba(255, 95, 143, .9); }
.nt-ai-coach { background: linear-gradient(150deg, #6f7bff, #a05cff); box-shadow: 0 10px 22px -12px rgba(111, 123, 255, .9); }
.nt-ai-psy { background: linear-gradient(150deg, #3fd3a4, #1fa3c9); box-shadow: 0 10px 22px -12px rgba(31, 163, 201, .9); }
.nt-ai-tile:active { transform: scale(.97); }
/* шапка чата помощника: полоса его цвета, справа кружки двух других для переключения */
.nt-subhead.nt-ai-head { gap: 10px; padding: 8px 8px 8px 8px; border-radius: 26px; color: #fff; font-size: 21px; font-weight: 900; }
.nt-ai-head .nt-back { width: 40px; height: 40px; background: rgba(255, 255, 255, .25); color: #fff; }
.nt-ai-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-ai-name .i3d { width: 26px; height: 26px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .2)); }
.nt-ai-mini { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid rgba(255, 255, 255, .75); border-radius: 50%; cursor: pointer; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .35); }
.nt-ai-mini .i3d { width: 24px; height: 24px; }
.nt-ai-mini:active { transform: scale(.92); }
/* последний помощник — первым, подпись «Продолжить чат» под именем */
.nt-ai-tile small { margin-top: -4px; font-size: 11.5px; font-weight: 700; opacity: .9; }
/* быстрые вопросы под плитками: тап открывает чат и сразу спрашивает; точка — цвет помощника */
.nt-ai-quick { display: flex; gap: 6px; margin: 10px -16px 0; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.nt-ai-quick::-webkit-scrollbar { display: none; }
.nt-ai-q { flex: none; display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: none; border-radius: 999px; background: rgba(120, 100, 180, .08); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.nt-ai-q i { width: 9px; height: 9px; border-radius: 50%; box-shadow: none; }
/* дневник: подсказка «спросить помощника» под кольцом — про перебор нормы, тренировку или последний приём */
.nt-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nt-ai-chip { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1 1 auto; max-width: 100%; padding: 4px 9px 4px 4px; border: none; border-radius: 999px; background: var(--field); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-ai-stats { display: grid; place-items: center; flex: none; width: 20px; height: 20px; }
.nt-coach-stats { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 800; text-decoration: none; }
.nt-coach-stats .i3d { width: 20px; height: 20px; }
.nt-add-meal { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.nt-ai-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-style: normal; }
.nt-ai-chip > span { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; }
.nt-ai-chip > span .i3d { width: 13px; height: 13px; }
.nt-ai-nudge { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 9px 12px; border: none; border-radius: 14px; background: rgba(120, 100, 180, .08); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.nt-ai-nudge > span { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; }
.nt-ai-nudge > span .i3d { width: 22px; height: 22px; }
.nt-ai-nudge b { flex: 1; min-width: 0; }
.nt-ai-nudge .i:last-child { flex: none; width: 16px; height: 16px; opacity: .5; }
/* Тренер: полоса «сегодня» над чатом и карточка расхода */
.nt-coach-today { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 10px 12px; border-radius: 14px; background: var(--card); }
.nt-coach-today > span .i3d { width: 30px; height: 30px; }
.nt-coach-today b { display: block; font-size: 14px; }
.nt-coach-today small { display: block; color: var(--hint); font-size: 12px; margin-top: 2px; }
/* карточка расхода: градиентная шапка во всю ширину, число крупно */
.nt-coach-card { overflow: hidden; }
.nt-coach-card .nt-diet-plan-head { margin: -14px -14px 0; padding: 16px; background: linear-gradient(135deg, #ff9a5a, #ee4f7a); color: #fff; }
.nt-coach-card .nt-diet-plan-pic { flex-basis: auto; width: 44px; height: auto; background: none; }
.nt-coach-card .nt-diet-plan-head small { color: rgba(255, 255, 255, .92); }
.nt-coach-card .nt-diet-plan-head b { font-size: 34px; font-weight: 900; line-height: 1.05; }
.nt-coach-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.nt-coach-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nt-coach-what b { display: block; font-size: 14px; }
.nt-coach-what small { display: block; color: var(--hint); font-size: 12px; margin-top: 2px; }
.nt-coach-kcal { text-align: right; white-space: nowrap; color: var(--hint); font-size: 12px; }
.nt-coach-kcal b { display: block; color: #e8590c; font-size: 17px; font-weight: 800; }
.nt-coach-how { margin: 8px 0 0; color: var(--hint); font-size: 11px; }
/* Психолог — третий режим вкладки рядом с «Дневником»: нижнее меню не прячем, выход — переключателем сверху */
.nt-psy-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; padding: 9px 12px; border-radius: 12px; background: var(--card); color: var(--hint); font-size: 12.5px; line-height: 1.35; }
.nt-psy-note .i { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; color: #8a63d2; }
.nt-psy .nt-diet-send { background: linear-gradient(135deg, #9b6fd6, #6a4fc2); }
.nt-psy-crisis { max-width: 92%; border: 1.5px solid #e5d9fb; }
.nt-psy-phones { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.nt-psy-phone { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 12px; background: #f3edff; color: var(--text); text-decoration: none; }
.nt-psy-phone .i { flex: 0 0 18px; width: 18px; height: 18px; color: #6a4fc2; }
.nt-psy-phone b { display: block; font-size: 16px; color: #4b2fa8; }
.nt-psy-phone small { display: block; color: var(--hint); font-size: 12px; }
.nt-pro { padding: 2px 6px; border-radius: 6px; background: linear-gradient(100deg, #ffd36b, #ffa63d); color: #3a2500; font-size: 10px; font-weight: 900; letter-spacing: .3px; }
/* Экран «Диетолог»: вкладки, кольца БЖУ за сегодня, чат и закреплённое поле вопроса */
.nt-subhead .nt-pro { margin-left: -4px; }
.nt-subhead .i3d { width: 26px; height: 26px; }
/* экран ровно в видимую область над меню вкладок: листается только лента, поле и кольца на месте */
.nt-diet { display: flex; flex-direction: column; height: calc(100dvh - 222px); min-height: 440px; }
.nt-diet.page { height: auto; min-height: 0; }
/* чат диетолога — нижнее меню прячем, как при открытой клавиатуре: внизу своё поле ввода,
   назад — стрелкой в шапке; чат тянется до низа экрана */
body:has(.view.active .nt-diet:not(.page)) nav.tabbar { opacity: 0; visibility: hidden; pointer-events: none; }
body:has(.view.active .nt-diet:not(.page)) main { bottom: 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
/* поле ввода — на высоте меню вкладок (10px + вырез снизу) с запасом: цветная шапка помощника выше прежней,
   а без вычета выреза поле на iPhone уезжало под край экрана */
body:has(.view.active .nt-diet:not(.page)) .nt-diet { height: calc(100dvh - 226px + var(--nav-h) - env(safe-area-inset-bottom)); }
.nt-diet-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.nt-diet-tabs button { flex: 1; padding: 8px 4px; border: none; border-radius: 10px; background: none; color: var(--hint); font-size: 14px; font-weight: 700; cursor: pointer; }
.nt-diet-tabs button.on { background: var(--bg); color: var(--text); box-shadow: 0 2px 8px -4px rgba(60, 40, 110, .35); }
/* «Разбор»: период, карточки калорий по дням и БЖУ к норме */
.nt-rv { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.nt-rv-seg { display: flex; gap: 4px; align-self: center; padding: 3px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.nt-rv-seg button { padding: 6px 16px; border: none; border-radius: 9px; background: none; color: var(--hint); font-size: 13px; font-weight: 700; cursor: pointer; }
.nt-rv-seg button.on { background: #211a2e; color: #fff; }
.nt-rv-card { padding: 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.nt-rv-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.nt-rv-head b { font-size: 15px; font-weight: 800; }
.nt-rv-head span { color: var(--hint); font-size: 12px; }
.nt-rv-bars { position: relative; display: flex; gap: 6px; }
.nt-rv-bars.month { gap: 2px; }
.nt-rv-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 138px; }
.nt-rv-col i { width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px; background: var(--nt-c); }
.nt-rv-col.today i { opacity: .45; }
.nt-rv-col.over i { background: var(--danger); }
.nt-rv-col.empty i { background: var(--bg); }
.nt-rv-col span { height: 18px; padding-top: 4px; color: var(--hint); font-size: 11px; font-weight: 600; }
.nt-rv-norm { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--text); opacity: .35; pointer-events: none; }
.nt-rv-row + .nt-rv-row { margin-top: 12px; }
.nt-rv-row-h { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 14px; }
.nt-rv-row-h b { font-weight: 700; }
.nt-rv-row .nt-bar { display: block; height: 7px; border-radius: 4px; }
.nt-rv-row em { display: block; margin-top: 4px; font-size: 12px; font-style: normal; font-weight: 600; }
.nt-rv-row em.over { color: var(--danger); }
.nt-rv-row em.left { color: var(--hint); }
.nt-rv-row em.ok { color: var(--nt-c); }
.nt-rv-cap { margin-top: 12px; color: var(--hint); font-size: 12px; }
.nt-rv .nt-dietitian { margin-top: 0; }
.nt-rv .nt-norm-hint { margin: 0; }
.nt-hb-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sep); }
.nt-hb-row:first-of-type { border-top: 0; padding-top: 2px; }
.nt-hb-row > .i3d { flex: 0 0 44px; width: 44px; height: 44px; }
.nt-hb-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.nt-hb-row b { font-size: 15px; font-weight: 800; }
.nt-hb-row span { color: var(--danger); font-size: 13px; font-weight: 700; }
.nt-hb-row em { color: var(--hint); font-size: 13px; font-style: normal; line-height: 1.35; }
.nt-hb-row .nt-link { margin-top: 4px; font-size: 13px; font-weight: 800; text-decoration: none; }
.nt-hb-empty { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--hint); font-size: 13px; line-height: 1.4; }
.nt-hb-empty.ok { color: var(--nt-c); font-weight: 700; }
.nt-hb-empty .i { flex: 0 0 18px; width: 18px; height: 18px; }
.nt-diet-rings { display: flex; justify-content: space-around; min-height: 92px; margin-top: 10px; padding: 10px 6px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); transition: min-height .2s ease, padding .2s ease; }
.nt-diet-ring { display: flex; flex-direction: column; align-items: center; font-size: 12px; }
.nt-diet-ring svg { width: 48px; height: 48px; margin-bottom: 4px; transition: width .2s ease, height .2s ease; }
/* в ленте чата прокрутили вниз или пишут — кольца одной узкой строкой (NutritionTab._dietRings) */
.nt-diet-rings.small { min-height: 0; padding: 6px; }
.nt-diet-rings.small .nt-diet-ring { flex-direction: row; gap: 4px; font-size: 11px; }
.nt-diet-rings.small svg { width: 20px; height: 20px; margin-bottom: 0; }
.nt-diet-rings.small text { display: none; }
.nt-diet-rings.small + .nt-norm-hint { display: none; }
.nt-diet-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.nt-diet-ring .nt-diet-track { stroke: var(--sep); }
.nt-diet-ring text { font-size: 11px; font-weight: 900; text-anchor: middle; }
.nt-diet-ring span { color: var(--hint); font-size: 11px; }
.nt-diet-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; margin: 4px -16px 0; padding: 12px 16px; overflow-y: auto; overscroll-behavior: contain; -webkit-mask-image: linear-gradient(transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.nt-diet-msgs > :first-child { margin-top: auto; }
.nt-diet-msg { max-width: 84%; padding: 10px 13px; border-radius: 18px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.nt-diet-msg.ai { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.nt-diet-train { display: flex; gap: 10px; align-items: flex-start; background: linear-gradient(110deg, #e9f0ff, #f3e9ff) !important; color: #1f2340 !important; }
.nt-diet-train .i { flex: 0 0 28px; width: 28px; height: 28px; }
.nt-diet-rec { align-self: flex-end; display: flex; align-items: center; gap: 6px; max-width: 92%; margin-top: -2px; padding: 6px 6px 6px 10px; border-radius: 14px; background: color-mix(in srgb, #2fa84f 14%, var(--card)); color: #1f7a3a; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.nt-diet-rec .i { flex: 0 0 15px; width: 15px; height: 15px; }
.nt-diet-rec .nt-link { flex: none; padding: 4px 8px; font-size: 12.5px; }
.nt-diet-prod { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px; border-radius: 14px; background: var(--accent-soft); }
.nt-diet-prod .i3d { flex: 0 0 34px; width: 34px; height: 34px; }
.nt-diet-prod b { display: block; font-size: 13px; line-height: 1.3; }
.nt-diet-prod-m { display: block; margin-top: 2px; color: var(--hint); font-size: 11.5px; }
.nt-diet-pick > img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; }
.nt-diet-pick > span { flex: 1; min-width: 0; }
.nt-pick .nt-diet-pick { background: var(--card); box-shadow: var(--shadow); }
.nt-pick-link { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 6px 6px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.nt-pick-link input { flex: 1; min-width: 0; min-height: 36px; border: 0; background: none; color: inherit; font: inherit; font-size: 15px; outline: none; }
.nt-pick > .nt-rest-h { margin-top: 14px; }
/* блюда из меню плитками по две в ряд: фото с кнопкой «+», крупно калории, название, белок и цена */
.nt-diet-dishes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.nt-diet-dish { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.nt-diet-dish-ph { position: relative; display: block; aspect-ratio: 1 / .82; background: color-mix(in srgb, #ff5a7a 10%, var(--card)); }
.nt-diet-dish-ph > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
/* нет фото — значок поменьше по центру, не похожий на снимок самого блюда (у .i3d padding: 0 !important) */
.nt-diet-dish-ph > .i3d { position: absolute; inset: 0; margin: auto; width: 52%; height: 52%; object-fit: contain; }
.nt-diet-dish-btn { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border: 0; border-radius: 18px; background: #fff; color: #2fa84f; font: inherit; font-size: 12px; font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.nt-diet-dish-btn .i { width: 20px; height: 20px; stroke: currentColor; stroke-width: 20; }
.nt-diet-dish-btn:not(.q) { width: 36px; padding: 0; }
.nt-diet-dish-btn.on { background: #2fa84f; color: #fff; }
.nt-diet-dish-btn:disabled { opacity: .7; }
.nt-diet-dish-b { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 8px 10px 10px; }
.nt-diet-dish-k { font-size: 17px; font-weight: 900; line-height: 1.2; }
.nt-diet-dish-k small { color: var(--hint); font-size: 12px; font-weight: 800; }
.nt-diet-dish-b > b { display: -webkit-box; overflow: hidden; margin-top: 1px; font-size: 14px; font-weight: 600; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.nt-diet-dish-m { margin-top: 3px; color: var(--hint); font-size: 12px; font-weight: 700; }
.nt-diet-dish .nt-diet-prod-m { overflow: hidden; margin-top: 1px; text-overflow: ellipsis; white-space: nowrap; }
.nt-diet-dish .nt-rest-why { display: -webkit-box; overflow: hidden; margin-top: 4px; color: #1f7a3a; font-weight: 700; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.nt-diet-dish .nt-diet-rec { display: flex; align-self: stretch; justify-content: space-between; max-width: none; margin-top: 8px; padding: 2px 2px 2px 10px; }
.nt-diet-dish .nt-diet-rec.off { padding: 6px 0 0; background: none; }
.nt-diet-cart { flex: none; margin-left: auto; padding: 8px 10px; border: 0; border-radius: 12px; background: #2fa84f; color: #fff; font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; }
.nt-diet-cart.added { background: color-mix(in srgb, #2fa84f 14%, var(--card)); color: #1f7a3a; }
.nt-diet-msg.nt-diet-plan { align-self: stretch; flex-shrink: 0; max-width: none; padding: 14px; border-radius: 22px; }
.nt-diet-plan-head { display: flex; align-items: center; gap: 12px; }
.nt-diet-plan-pic { flex: 0 0 56px; display: grid; place-items: center; height: 56px; border-radius: 18px; background: linear-gradient(135deg, #ffe2c4, #ffc7d3); }
.nt-diet-plan-pic .i3d { width: 44px; height: 44px; }
.nt-diet-plan-head small { display: block; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.nt-diet-plan-head b { display: block; font-size: 17px; font-weight: 900; line-height: 1.2; }
.nt-diet-plan-mac { display: flex; gap: 6px; margin: 12px 0 6px; }
.nt-diet-plan-mac div { flex: 1; padding: 6px 0; border-radius: 12px; color: var(--hint); font-size: 11px; font-weight: 700; text-align: center; }
.nt-diet-plan-mac b { display: block; font-size: 16px; font-weight: 900; }
.nt-diet-plan-mac .k { --c: var(--accent); }
.nt-diet-plan-mac .p { --c: var(--nt-p); }
.nt-diet-plan-mac .f { --c: var(--nt-f); }
.nt-diet-plan-mac .c { --c: var(--nt-c); }
.nt-diet-plan-mac div { background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.nt-diet-plan-mac div b { color: var(--c); }
.nt-diet-plan-row { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--hint) 15%, transparent); font-size: 14px; }
.nt-diet-plan-row:last-child { border-bottom: 0; }
.nt-diet-plan-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-diet-plan-row span::first-letter { text-transform: uppercase; }
.nt-diet-plan-row b { font-weight: 800; }
.nt-diet-plan-row img { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: #fff; }
.nt-rest-order .nt-diet-plan-row { align-items: center; }
.nt-diet-plan-act { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.nt-diet-plan-eat { flex: 1; min-height: 44px; border: 0; border-radius: 14px; background: #2fa84f; color: #fff; font: inherit; font-size: 15px; font-weight: 800; box-shadow: 0 8px 16px -10px #2fa84f; }
.nt-diet-plan-eat:disabled { opacity: .6; }
.nt-link.nt-diet-plan-again { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; text-decoration: none; }
.nt-diet-plan-again .i { width: 16px; height: 16px; }
.nt-diet-msg .nt-diet-rec { align-self: auto; max-width: none; margin-top: 8px; }
/* Еда из реплики «ротти половинка, яйцо…»: продукт строкой, итог плитками, остаток и «Добавить» с выбором приёма */
.nt-diet-eaten-row { align-items: center; }
.nt-diet-eaten-row span { white-space: normal; }
.nt-diet-eaten-row small { display: block; margin-top: 1px; color: var(--hint); font-size: 12px; font-weight: 600; }
.nt-diet-eaten-row b { flex: none; }
.nt-diet-eaten-label { display: block; margin-top: 12px; color: var(--hint); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.nt-diet-eaten .nt-diet-plan-mac { margin-top: 6px; }
.nt-diet-eaten-tip { margin: 10px 0 0; font-size: 14px; line-height: 1.4; }
.nt-diet-eaten .nt-meals { margin: 6px 0 0; }
.nt-diet-eaten .nt-diet-plan-act { margin-top: 10px; }
/* «Что в ресторане»: заказ карточкой, «Другие рестораны» — экран «Что заказать» с сортировкой */
.nt-rest-why { display: block; margin-top: 3px; color: #b8304f; font-size: 11.5px; font-weight: 700; line-height: 1.3; }
.nt-rest-order .nt-rest-why { margin: 8px 0 0; font-size: 13px; }
.nt-rest-order .nt-diet-plan-head b { font-size: 16px; }
.nt-rest-order .nt-diet-plan-act { flex-direction: column; align-items: stretch; gap: 8px; }
.nt-rest-compare { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border: 0; border-radius: 14px; background: color-mix(in srgb, #ff5a7a 14%, var(--card)); color: #b8304f; font: inherit; font-size: 15px; font-weight: 800; }
.nt-rest-compare .i { width: 18px; height: 18px; }
.nt-diet-plan-rest { width: 100%; margin-top: 8px; }
.nt-rest-like-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.nt-rest-likes .nt-mem-hint { margin: 10px 0 0; }
/* онбординг тренера: три вопроса чипсами в первой реплике чата */
.nt-coach-q { margin: 14px 0 0; font-size: 14px; font-weight: 800; }
.nt-coach-intro .nt-rest-like-chips { margin-top: 8px; }
.nt-coach-own { width: 100%; margin-top: 8px; padding: 10px 14px; border: 1.5px solid var(--sep); border-radius: 14px;
  background: var(--card); color: var(--text); font: inherit; font-size: 16px; outline: none; }
.nt-coach-own:focus { border-color: #8a7bff; }
.nt-coach-intro .nt-diet-plan-act { margin-top: 14px; }
.nt-rest-chips { display: flex; gap: 6px; margin: 10px -16px 0; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.nt-rest-chips::-webkit-scrollbar { display: none; }
.nt-rest-chips .refine-chip { flex-shrink: 0; }
.nt-rest > .nt-diet-plan { margin-bottom: 18px; }
.nt-rest-h { margin: 0 4px; font-size: 17px; font-weight: 900; }
.nt-rest-more { display: block; width: 100%; margin-top: 12px; min-height: 44px; border: 0; border-radius: 14px; background: color-mix(in srgb, #ff5a7a 12%, var(--card)); color: #b8304f; font: inherit; font-size: 15px; font-weight: 800; }
/* «Покупки» у диетолога: приглашение, список на неделю карточкой блюда и цены по сетям */
/* «Разбор» → «День»: оценка дня 1–10 */
.nt-sc-top { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.nt-sc-ring { flex: 0 0 64px; width: 64px; height: 64px; }
.nt-sc-ring circle { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.nt-sc-ring .nt-diet-track { stroke: var(--sep); }
.nt-sc-ring.on circle:last-of-type { stroke: #2fa84f; }
.nt-sc-ring.stall circle:last-of-type { stroke: #f0a020; }
.nt-sc-ring.off circle:last-of-type { stroke: var(--danger); }
.nt-sc-ring text { fill: var(--text); font-size: 12px; font-weight: 900; text-anchor: middle; }
.nt-sc-top > div { display: flex; flex-direction: column; gap: 2px; }
.nt-sc-top small { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.nt-sc-top b { font-size: 18px; font-weight: 900; line-height: 1.2; }
.nt-sc-top span { color: var(--hint); font-size: 13px; font-weight: 600; }
.nt-sc-row { display: grid; grid-template-columns: 18px auto 1fr auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--sep); font-size: 14px; }
.nt-sc-row .i { width: 18px; height: 18px; color: var(--danger); }
.nt-sc-row.ok .i { color: #2fa84f; }
.nt-sc-row span { font-weight: 700; }
.nt-sc-row em { color: var(--danger); font-size: 13px; font-style: normal; font-weight: 600; }
.nt-sc-row.ok em { color: var(--hint); }
.nt-sc-row b { color: var(--hint); font-size: 12px; font-weight: 700; white-space: nowrap; }
.nt-sc .nt-link { margin-top: 8px; font-size: 14px; font-weight: 800; text-decoration: none; }
/* «Цель»: прогноз веса на 12 недель */
.nt-goal-card .nt-diet-plan-head b { font-size: 22px; }
.nt-goal-verdict { margin: 12px 0 0; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 800; line-height: 1.35; }
.nt-goal-verdict.on { background: color-mix(in srgb, #2fa84f 14%, var(--card)); color: #2a8f45; }
.nt-goal-verdict.stall { background: color-mix(in srgb, #f0a020 16%, var(--card)); color: #b5730a; }
.nt-goal-verdict.off { background: color-mix(in srgb, var(--danger) 13%, var(--card)); color: var(--danger); }
.nt-goal-plan { margin: 6px 2px 0; color: var(--hint); font-size: 13px; }
.nt-goal-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.nt-goal-chart line { stroke-width: 3; stroke-linecap: round; }
.nt-goal-chart .now { stroke: var(--text); fill: var(--text); }
.nt-goal-chart .plan { stroke: var(--nt-c); fill: var(--nt-c); stroke-dasharray: 6 6; }
.nt-goal-chart circle.plan { stroke-dasharray: none; }
.nt-goal-chart text { stroke: none; font-size: 12px; font-weight: 800; }
.nt-goal-chart .start { fill: var(--text); }
.nt-goal-chart .tick { fill: var(--hint); font-size: 11px; font-weight: 600; }
.nt-goal-legend { display: flex; gap: 16px; margin-top: 6px; color: var(--hint); font-size: 12px; font-weight: 600; }
.nt-goal-legend span::before { content: ""; display: inline-block; width: 16px; margin-right: 6px; vertical-align: 3px; border-top: 3px solid var(--text); }
.nt-goal-legend .plan::before { border-top: 3px dashed var(--nt-c); }
.nt-goal-tiles { display: flex; gap: 8px; margin-top: 12px; }
.nt-goal-tiles div { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 12px; background: var(--bg); color: var(--hint); font-size: 11.5px; font-weight: 600; }
.nt-goal-tiles b { color: var(--text); font-size: 17px; font-weight: 900; }
.nt-goal-tiles .on b { color: #2a8f45; }
.nt-goal-tiles .stall b { color: #b5730a; }
.nt-goal-tiles .off b { color: var(--danger); }
.nt-buy-tab { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.nt-buy-intro { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 18px 18px; text-align: center; }
.nt-buy-intro > b { font-size: 19px; font-weight: 900; }
.nt-buy-intro p { margin: 0 0 6px; color: var(--hint); font-size: 14px; line-height: 1.45; }
.nt-buy-intro .nt-diet-plan-eat { flex: none; align-self: stretch; }
.nt-buy-intro .nt-diet-plan-pic { flex-basis: auto; width: 64px; height: 64px; }
.nt-buy-wait { align-self: flex-start; }
.nt-buy-note { margin: 0 0 4px; color: var(--hint); font-size: 12px; font-weight: 700; text-align: center; }
.nt-buy-act { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.nt-buy-act .rec-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.nt-buy-act .rec-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.nt-buy-act .nt-diet-plan-again { align-self: center; margin-top: 4px; }
.nt-buy-shop { padding: 12px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.nt-diet-rec.off { padding: 6px 10px; background: var(--card); color: var(--hint); font-weight: 600; }
.nt-diet-msg.me { align-self: flex-end; border-bottom-right-radius: 6px; background: linear-gradient(100deg, #ff9a3d, #ff5f45); color: #fff; font-weight: 600; }
.nt-diet-error { color: var(--danger); }
.nt-diet-wait { display: flex; align-items: center; gap: 10px; color: var(--hint); }
.nt-diet-wait .spinner { flex: none; width: 18px; height: 18px; margin: 0; border-width: 2px; }
.nt-diet-error .nt-link { display: block; margin-top: 6px; }
.nt-diet-typing { display: flex; gap: 5px; padding: 14px 16px; }
.nt-diet-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--hint); animation: nt-diet-dot 1.2s infinite ease-in-out; }
.nt-diet-typing i:nth-child(2) { animation-delay: .15s; }
.nt-diet-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes nt-diet-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.nt-diet-bottom { padding-top: 4px; }
.nt-diet-chips { display: flex; gap: 6px; margin: 0 -16px 8px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.nt-diet-chips::-webkit-scrollbar { display: none; }
.nt-diet-chips:empty { display: none; }
.nt-diet-chip { flex-shrink: 0; padding: 8px 12px; border: none; border-radius: 999px; background: var(--card); color: var(--text); font-size: 13.5px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); cursor: pointer; }
.nt-diet-chip-advice, .nt-diet-chip-meal, .nt-diet-chip-protein, .nt-diet-chip-rest, .nt-diet-chip-memory { display: inline-flex; align-items: center; gap: 5px; padding-left: 8px; }
.nt-diet-chip-advice { background: #211a2e; color: #fff; }
.nt-diet-chip-rest { background: color-mix(in srgb, #ff5a7a 14%, var(--card)); color: #b8304f; }
.nt-diet-chip-meal { background: color-mix(in srgb, #ff7a3d 14%, var(--card)); color: #b4471a; }
.nt-diet-chip-protein { background: color-mix(in srgb, #2fa84f 14%, var(--card)); color: #1f7a3a; }
.nt-diet-chip-memory { background: color-mix(in srgb, #8a5cf6 14%, var(--card)); color: #6a3fd0; }
/* память диетолога: группы «Любите», «Не предлагаю», «Питание» — чипсы с крестиком */
.nt-mem-group { margin-top: 12px; }
.nt-mem-group small { display: block; margin-bottom: 6px; color: var(--hint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.nt-mem-items { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-mem-item { display: inline-flex; align-items: center; gap: 2px; padding: 5px 4px 5px 11px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: color-mix(in srgb, #2fa84f 14%, var(--card)); color: #1f7a3a; }
.nt-mem-item.allergies { background: color-mix(in srgb, #ff5a5a 14%, var(--card)); color: #c0392b; }
.nt-mem-item.diet { background: color-mix(in srgb, #8a5cf6 14%, var(--card)); color: #6a3fd0; }
.nt-mem-item button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.nt-mem-item button .i { width: 13px; height: 13px; }
.nt-mem-hint { margin: 12px 0 0; color: var(--hint); font-size: 13px; line-height: 1.4; }
.nt-diet-chip .i3d { width: 20px; height: 20px; }
.nt-diet-field { display: flex; gap: 8px; }
.nt-diet-field input { flex: 1; min-width: 0; padding: 13px 16px; border: none; border-radius: 999px; background: var(--card); color: var(--text); font-size: 15px; box-shadow: var(--shadow); outline: none; }
.nt-diet-send, .nt-chef-send { flex-shrink: 0; width: 46px; height: 46px; display: grid; place-items: center; border: none; border-radius: 50%; background: linear-gradient(135deg, #ff9a3d, #ff5f45); color: #fff; cursor: pointer; }
.nt-diet-send .i, .nt-chef-send .i { width: 22px; height: 22px; transform: rotate(-90deg); }
.nt-diet-cam { flex-shrink: 0; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); cursor: pointer; }
.nt-diet-cam .i3d { width: 30px; height: 30px; }
/* фото тарелки: реплика-снимок и снимок вместо иконки в карточке блюда */
.nt-diet-msg.me.nt-diet-photo { padding: 4px; }
.nt-diet-photo img { display: block; width: 168px; height: 168px; object-fit: cover; border-radius: 16px; }
.nt-diet-plate-pic { overflow: hidden; }
.nt-diet-plate-pic img { width: 100%; height: 100%; object-fit: cover; }
.nt-diet button:disabled { opacity: .5; cursor: default; }
.nt-diet > .state .i3d { width: 40px; height: 40px; }
/* переключатель «Узнать БЖУ / Дневник» — сегменты во всю ширину */
.nt-modes { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 14px; background: var(--card); }
/* три режима в ряд на 360 px: ширина по тексту, без переноса «Узнать БЖУ» */
.nt-mode { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 10px; padding: 9px 8px; background: transparent; color: var(--hint); font-size: 14px; font-weight: 700; cursor: pointer; transition: color .15s; }
.nt-mode.active { background: var(--nt-grad, var(--accent)); color: var(--accent-text); box-shadow: 0 4px 12px -4px rgba(255, 77, 46, .5); }
.nt-hint .i { margin-right: .35em; }
/* приёмы пищи: четыре плитки в ряд, иконка над подписью — на узком экране
   в строку не влезали и «Перекус» уезжал за край */
.nt-meals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.nt-meals .refine-chip { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 14px; font-size: 12.5px; }
.nt-meals .refine-chip .i { width: 20px; height: 20px; }
/* в дневнике пятая плитка — «Спорт» */
.nt-meals.with-sport { grid-template-columns: repeat(5, 1fr); gap: 5px; }
.nt-meals.with-sport .refine-chip { font-size: 12px; }
/* форма «Спорт»: вид спорта, минуты и ккал — ккал считаются сами по MET от ИИ */
.nt-sports { margin-bottom: 10px; }
.nt-log .set-group { margin: 0; }
.nt-sport-text { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--sep); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 15px; text-align: right; outline: none; }
.nt-act-hint { display: flex; align-items: flex-start; gap: 6px; margin: 10px 4px 0; font-size: 13px; line-height: 1.4; color: var(--hint); }
.nt-act-hint > .i { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }
.nt-link { border: none; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.rec-input textarea.nt-short { min-height: 56px; }
/* место под крестик справа; селектор сильнее, чем padding поля в теме vv */
.rec-input .rec-text-wrap textarea.nt-short { padding-right: 48px; }
.nt-look-clear {
  display: flex; top: 14px; right: 14px; transform: none; border: none; padding: 0;
  background: color-mix(in srgb, var(--hint) 22%, var(--card)); color: var(--text);
}
.nt-look-clear[hidden] { display: none; }
/* дневник тренировок: интенсивность — сегменты, темп под дистанцией, заметка */
.nt-levels { display: flex; gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 12px; background: var(--card); }
.nt-level { flex: 1; padding: 7px 4px; border: none; border-radius: 9px; background: transparent; color: var(--hint); font-size: 13px; font-weight: 700; cursor: pointer; }
.nt-level.active { background: var(--accent-soft); color: var(--accent); }
.nt-pace-row[hidden], .nt-ex-hints[hidden] { display: none; }
.nt-pace-row b { font-variant-numeric: tabular-nums; }
.nt-log .set-group.nt-act-more { margin-top: 10px; }
.nt-note-input { flex: 1; min-width: 0; padding: 0; border: none; background: transparent; color: var(--text); font-size: 15px; outline: none; }
.nt-act-editing { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--accent); }
.nt-act-editing .i { width: 16px; height: 16px; }
/* упражнения силовой: карточка на упражнение, подходы «повторы × кг» строками */
#ntEx { margin-top: 14px; }
#ntEx > .set-title { margin: 0 2px 8px; }
.nt-ex { padding: 8px 10px 10px; margin-bottom: 8px; border-radius: 14px; background: var(--card); }
.nt-ex-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.nt-ex-name { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--sep); border-radius: 9px; background: var(--bg); color: var(--text); font-size: 15px; font-weight: 700; outline: none; }
.nt-ex-del, .nt-set-del { flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: none; border-radius: 50%; background: transparent; color: var(--hint); cursor: pointer; }
.nt-ex-del .i, .nt-set-del .i { width: 16px; height: 16px; margin: 0; }
.nt-ex-hints { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.nt-ex-hints .refine-chip { padding: 6px 10px; font-size: 13px; }
.nt-set { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 14px; color: var(--hint); }
.nt-set-n { width: 18px; text-align: center; font-size: 12px; font-weight: 700; }
.nt-set-in { width: 64px; padding: 6px 8px; border: 1px solid var(--sep); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 15px; text-align: right; outline: none; }
.nt-set .nt-unit { flex: 1; }
.nt-set-add, .nt-ex-add { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 6px 10px; border: 1px dashed var(--accent); border-radius: 10px; background: transparent; color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.nt-set-add .i, .nt-ex-add .i { width: 14px; height: 14px; margin: 0; }
.nt-ex-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nt-ex-foot .nt-ex-add { margin-top: 0; }
.nt-ex-total { font-size: 13px; color: var(--hint); }
.nt-ex-total b { font-weight: 800; color: var(--text); }
/* частые запросы «Узнать БЖУ»: длинное название обрезаем, вес виден всегда */
.nt-recent, .nt-recent-today, .nt-today-again, .nt-quick { display: inline-flex; align-items: center; }
.nt-quick .i { margin-right: .25em; }
/* записали в один тап — зелёная галочка на пару секунд */
.refine-chip.nt-quick.done { background: #e3f6e8; color: #1f9d55; animation: quickDone .35s cubic-bezier(.3, 1.4, .5, 1); }
.refine-chip.nt-quick.done .cnt { color: #1f9d55; }
.refine-chip.nt-quick.done .i { stroke-width: 3; }
@keyframes quickDone { 40% { transform: scale(1.08); } }
.nt-today-title { display: flex; justify-content: space-between; align-items: baseline; }
.nt-today-title .cnt { font-size: 12px; font-weight: 600; color: var(--hint); }
.refine-row.nt-today-row { margin-bottom: 14px; }
.nt-today-item { display: inline-flex; gap: 3px; flex: none; }
.nt-today-again { padding-inline: 10px; }
.nt-today-again .i { width: 14px; height: 14px; }
.nt-today-again.done { background: #e3f6e8; color: #1f9d55; }
.nt-recent-name { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.nt-recent-name::first-letter { text-transform: uppercase; }
.nt-note { font-size: 13px; color: var(--hint); line-height: 1.45; margin: -4px 4px 14px; }
.nt-go { margin: 0 0 14px; }
.nt-actions { display: flex; gap: 8px; margin-top: 12px; }
.nt-food-row { cursor: pointer; }
.nt-food-row.active { box-shadow: inset 3px 0 0 var(--accent); }  /* продукт, который правим в форме */
.nt-actions > button { flex: 1; width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.nt-actions .i { margin-right: 0; }
.nt-actions.col { flex-direction: column; }
.rec-secondary.is-loading { opacity: .85; cursor: default; }
.rec-secondary .btn-spinner, .rec-photo .btn-spinner { border-color: var(--sep); border-top-color: var(--accent); }

/* результат: ккал крупно, сплит калорий, БЖУ плашками, позиции с граммами */
.nt-card-title { font-size: 17px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; }
.nt-kcal { display: flex; align-items: baseline; gap: 6px; font-size: 14px; color: var(--hint); }
.nt-kcal .i { align-self: center; color: #ff6a00; }
.nt-kcal b { font-size: 34px; line-height: 1; font-weight: 900; letter-spacing: -.5px;
  background: var(--nt-grad, none); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nt-weight { margin-left: auto; font-size: 13px; padding: 3px 9px; border-radius: 10px; background: var(--bg); color: var(--hint); font-weight: 700; }
/* откуда калории: одна полоска Б/Ж/У по доле ккал */
.nt-split { display: flex; gap: 3px; height: 8px; margin: 12px 0 5px; }
.nt-split i { min-width: 3px; border-radius: 4px; }
.nt-split i.p { background: var(--nt-p); }
.nt-split i.f { background: var(--nt-f); }
.nt-split i.c { background: var(--nt-c); }
.nt-split-legend { display: flex; gap: 10px; font-size: 11.5px; font-weight: 800; }
.nt-split-legend .p { color: var(--nt-p); }
.nt-split-legend .f { color: var(--nt-f); }
.nt-split-legend .c { color: var(--nt-c); }
.nt-split-legend em { margin-left: auto; font-style: normal; font-weight: 600; color: var(--hint); }
.nt-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 6px; }
.nt-m { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 11px 4px 8px; border-radius: 12px;
  background: color-mix(in srgb, var(--c) 9%, var(--card)); font-size: 11.5px; font-weight: 600; color: var(--hint); text-transform: lowercase; }
.nt-m::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.nt-m b { font-size: 17px; font-weight: 900; color: var(--c); text-transform: none; }
.nt-per100 { font-size: 12.5px; color: var(--hint); margin-top: 6px; }
/* перебор нормы: что будет за день с этой записью, где перебор и «Уложиться» */
.nt-m-day { font-style: normal; font-size: 10.5px; margin-top: 2px; white-space: nowrap; }
.nt-m.over { box-shadow: inset 0 0 0 1.5px var(--danger); }
.nt-m.over .nt-m-day { color: var(--danger); font-weight: 700; }
.nt-kcal.over b { color: var(--danger); }
.nt-over { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 13px; font-weight: 600; line-height: 1.35; }
.nt-over > span:first-of-type { flex: 1; min-width: 150px; }
.nt-fit { border: none; border-radius: 8px; padding: 6px 10px; background: var(--danger); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.nt-fit-none { font-size: 12.5px; opacity: .85; }
/* порции одиночной позиции: штуки — степпером, порция / 100 г / упаковка — чипсами */
.nt-portions { margin-top: 10px; }
.nt-portion-row { margin-bottom: 0; }
/* порции плитками: число, подпись и значок; активная — цветная рамка и лёгкий тон */
.nt-tiles { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.nt-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 8px; min-width: 0;
  border-radius: 14px; border: 1.5px solid var(--sep); background: rgba(255, 255, 255, .7); color: var(--text); cursor: pointer;
}
.nt-tile .i { width: 22px; height: 22px; color: var(--hint); margin-bottom: 2px; }
.nt-tile b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.nt-tile span { font-size: 11.5px; font-weight: 600; color: var(--hint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-tile.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff); box-shadow: inset 0 0 0 1px var(--accent); }
.nt-tile.active .i, .nt-tile.active span { color: var(--accent); }
.nt-pieces { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nt-pieces b { min-width: 48px; text-align: center; font-size: 15px; }
.nt-pc { width: 34px; height: 34px; border: none; border-radius: 10px; background: var(--bg); color: var(--text); font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.nt-pc-note { font-size: 12.5px; color: var(--hint); }
/* «₽ за 10 г белка» и где белок дешевле из посчитанного раньше */
.nt-price { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13.5px; }
.nt-price .i { color: var(--accent); }
.nt-rank-card { margin-top: 12px; }
.nt-rank-title { font-size: 12.5px; color: var(--hint); margin: 0 0 6px; }
.nt-rank { display: flex; align-items: center; gap: 8px; width: 100%; border: none; border-radius: 10px; padding: 7px 10px; margin-bottom: 4px; background: var(--bg); color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.nt-rank.cur { box-shadow: inset 0 0 0 1.5px var(--accent); }
.nt-rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-rank-name::first-letter { text-transform: uppercase; }
.nt-items { margin-top: 10px; border-top: 1px solid var(--sep); }
.nt-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--sep); font-size: 14px; }
.nt-item:last-child { border-bottom: none; }
.nt-item-name { flex: 1; min-width: 0; }
.nt-g { display: flex; align-items: center; gap: 3px; color: var(--hint); font-size: 13px; }
.nt-grams { width: 68px; border: none; border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; padding: 6px 7px; text-align: right; outline: none; appearance: textfield; -moz-appearance: textfield; }
/* стрелки number-поля съедали место — «1500» обрезалось */
.nt-grams::-webkit-inner-spin-button, .nt-grams::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.nt-item-kcal { width: 64px; flex-shrink: 0; text-align: right; font-size: 13px; color: var(--hint); }
.nt-qty-row { align-items: center; margin-top: 8px; }
.nt-qty-label { font-size: 13px; color: var(--hint); white-space: nowrap; margin-right: 2px; }
.refine-chip.nt-quick-food.active { box-shadow: inset 0 0 0 2px var(--accent); }
.nt-to-foods { border: none; background: none; color: var(--hint); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.nt-to-foods.active { color: #e5484d; }
.nt-to-foods.active .i { fill: currentColor; }  /* уже в моих продуктах */
.nt-item-del, .nt-del, .nt-fav-del { border: none; background: none; color: var(--hint); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.nt-item-del:hover, .nt-del:hover { color: var(--danger); }

/* карточка дня: съедено / норма и полоски БЖУ */
.nt-day { position: relative; overflow: hidden; background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
/* тонкая градиентная кромка сверху — «карточка тренировки» */
.nt-day::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--nt-grad, var(--accent)); }
.nt-day.nt-day-fail::before { display: none; }
/* кольцо калорий слева, полоски БЖУ справа */
.nt-day-main { display: flex; align-items: center; gap: 16px; }
.nt-day-side { flex: 1; min-width: 0; }
.nt-ring { --size: 116px; --w: 11px; position: relative; flex-shrink: 0; width: var(--size); height: var(--size); border-radius: 50%;
  background: conic-gradient(from -90deg, #ff8a00, #ff4d2e calc(var(--p) * .6%), #ff2e6a calc(var(--p) * 1%), var(--nt-track, #eee) 0); }
.nt-ring::after { content: ""; position: absolute; inset: var(--w); border-radius: 50%; background: var(--card); }
.nt-ring.over { background: conic-gradient(var(--danger) 0 100%); }
.nt-ring-in { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.nt-ring-in .i { width: 16px; height: 16px; color: #ff6a00; margin-bottom: 2px; }
.nt-ring-in b { font-size: 25px; font-weight: 900; letter-spacing: -.5px; color: var(--text); }
.nt-ring.over .nt-ring-in b { color: var(--danger); }
.nt-ring-in span { font-size: 11.5px; font-weight: 600; color: var(--hint); }
.nt-day-fail { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--hint); font-size: 13.5px; text-align: center; }
.nt-day-fail > svg { width: 22px; height: 22px; }
.nt-day-fail .nt-day-retry { width: auto; margin: 4px 0 0; }
.nt-day .spinner { margin: 8px auto; }
.nt-day-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; margin-bottom: 8px; }
.nt-day-title { font-size: 16px; font-weight: 800; }
/* сожжённое на тренировках — под кольцом: на столько выросла норма */
.nt-day-burn { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sep); font-size: 13px; color: var(--hint); }
.nt-day-burn .i { width: 16px; height: 16px; color: var(--accent); }
/* листать дни: стрелки по бокам названия дня */
.nt-day-nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nt-day-nav .nt-day-title { white-space: nowrap; }
.nt-day-step { width: 30px; height: 30px; flex-shrink: 0; border: none; border-radius: 9px; background: var(--bg); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.nt-day-step:disabled { opacity: .35; cursor: default; }
.nt-entry .nt-g { flex-shrink: 0; }
.nt-day-kcal { font-size: 14px; color: var(--hint); white-space: nowrap; }
.nt-day-kcal b { font-size: 22px; font-weight: 900; color: var(--text); margin-right: 2px; }
.nt-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--nt-track, var(--bg)); overflow: hidden; }
.nt-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent)); transition: width .4s ease; }
.nt-bar.big { height: 10px; border-radius: 5px; }
.nt-bar.over i { background: var(--danger); }
.nt-day-left { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--accent-strong); background: var(--accent-soft); padding: 4px 10px; border-radius: 10px; margin: 0 0 6px; }
.nt-day-left b { font-weight: 900; }
/* длинная дата («12 сентября, пн») — «Осталось» переносится на строку ниже */
.nt-day-head .nt-day-left { margin: 0 0 0 auto; white-space: nowrap; }
.nt-day-left.over { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.nt-mrow { margin-top: 8px; font-size: 12.5px; }
.nt-mrow .nt-bar { display: block; height: 7px; border-radius: 4px; }
.nt-mhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.nt-mlabel { color: var(--hint); font-weight: 600; }
.nt-mlabel::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
.nt-mval { color: var(--hint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-mval b { color: var(--text); font-weight: 800; }
/* «Повторить вчерашний завтрак» — запись одним тапом, без ИИ */
.nt-repeat { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 10px; padding: 11px 13px; border: 1px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.nt-repeat span { margin-left: auto; font-weight: 600; opacity: .8; white-space: nowrap; }
.nt-norm-hint { display: flex; align-items: center; gap: 6px; width: 100%; margin: 8px 0 12px; padding: 9px 11px; border: 1px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }

/* «Составь меню»: настроение — чипсы в строку с переносом */
.nt-moods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.nt-mood { display: inline-flex; align-items: center; gap: 5px; }
.nt-mood .i { width: 16px; height: 16px; }
/* «Из того, что есть»: чипса-вход в «Составь меню», экран продуктов и подборка блюд */
.nt-moods .refine-chip.nt-pan-open { display: inline-flex; align-items: center; gap: 5px; background: color-mix(in srgb, #ff7a3d 14%, var(--card)); color: #b4471a; border-color: transparent; font-weight: 700; }
.nt-pan-open .i3d { width: 20px; height: 20px; }
.nt-pan-add { margin: 8px 0 14px; }
.nt-pan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.nt-pan-chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; font-size: 14px; font-weight: 600; }
.nt-pan-chip .i3d { width: 20px; height: 20px; margin: -2px 0; }
/* тема красит .refine-chip.active в белый — перебиваем весом селектора */
.nt-pan-chips .refine-chip.nt-pan-chip.active { background: color-mix(in srgb, #ff7a3d 16%, var(--card)); color: #b4471a; border-color: transparent; box-shadow: inset 0 0 0 2px #ff7a3d; }
.nt-pan-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.nt-pan-seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 10px 2px 8px; border: none; border-radius: 12px; background: none; color: var(--hint); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.nt-pan-seg button .i { width: 22px; height: 22px; }
.nt-pan-seg button.on { background: var(--accent); color: var(--accent-text); }
.nt-pan-list { display: flex; flex-direction: column; gap: 8px; }
.nt-pan-dish { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: none; border-radius: 18px; background: var(--card); color: var(--text); font: inherit; text-align: left; box-shadow: var(--shadow); cursor: pointer; }
.nt-pan-dish > img { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--accent-soft); }
.nt-pan-dish-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-pan-dish-b b { font-size: 15px; line-height: 1.25; }
.nt-pan-dish-b small { color: var(--hint); font-size: 12.5px; }
.nt-pan-miss { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.nt-pan-badge { flex: none; align-self: flex-start; padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, #2fa84f 14%, var(--card)); color: #1f7a3a; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.nt-pan-badge.buy { background: color-mix(in srgb, #ff7a3d 14%, var(--card)); color: #b4471a; }
/* экран блюда: рецепт первой карточкой чата с ИИ-поваром */
.nt-chef-card { max-width: 100%; align-self: stretch; padding: 10px; }
.nt-chef-top { display: flex; align-items: center; gap: 12px; }
.nt-chef-top img { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: var(--accent-soft); }
.nt-chef-top b { display: block; font-size: 17px; line-height: 1.25; }
.nt-chef-top small { display: block; margin-top: 4px; color: var(--hint); font-size: 13px; }
.nt-chef-wait { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--hint); font-size: 14px; }
.nt-chef-wait .spinner { width: 20px; height: 20px; margin: 0; }
.nt-chef-mac { display: flex; gap: 6px; margin-top: 12px; }
.nt-chef-mac span { flex: 1; padding: 7px 0; border-radius: 12px; background: var(--accent-soft); color: var(--hint); font-size: 11px; font-weight: 700; text-align: center; }
.nt-chef-mac b { display: block; color: var(--text); font-size: 16px; }
.nt-chef-cap { display: block; margin-top: 5px; color: var(--hint); font-size: 12px; }
.nt-chef-h { margin: 14px 0 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--hint); }
.nt-chef-items div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--hint) 16%, transparent); font-size: 14.5px; }
.nt-chef-items div:last-child { border-bottom: none; }
.nt-chef-items b { flex: none; }
.nt-chef-steps { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.45; }
.nt-chef-steps li { margin-bottom: 6px; }
.nt-chef-steps li::marker { color: var(--accent); font-weight: 800; }
.nt-chef-text { white-space: pre-line; }
.nt-chef-pick { display: flex; gap: 20px; margin-top: 8px; font-weight: 700; }

/* «Фитнес»-ожидание, пока ИИ составляет меню: градиентные кольца активности
   набирают и сбрасывают норму, в центре бьётся пульс */
.ai-think { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  padding: 18px 14px 16px; margin-bottom: 12px; border-radius: 20px; background: var(--card);
  background-image: radial-gradient(90% 70% at 50% 0%, var(--accent-soft) 0%, transparent 70%);
  box-shadow: var(--shadow); }
.ai-rings { position: relative; width: 168px; height: 168px; }
.ai-rings > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ai-track, .ai-ring { fill: none; stroke-width: 9; }
.ai-track { stroke: #ff4d6d; opacity: .1; }
.ai-ring { stroke-linecap: round; stroke-dasharray: 100 100;
  animation: aiFill var(--dur) cubic-bezier(.65, 0, .35, 1) infinite alternate; }
@keyframes aiFill { from { stroke-dashoffset: 88; } to { stroke-dashoffset: 6; } }
/* 3D-суп в центре колец: анимированный WebP, при reduced-motion — статичный кадр */
.ai-soup img { position: absolute; top: 50%; left: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; }
/* тройки продуктов шире супа и в 74px смотрелись мелко — крупнее, на весь внутренний круг */
.ai-food img { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.ai-thought { margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.ai-thought .btn-dots { color: var(--accent); }
#ntThought.swap, #htThought.swap { display: inline-block; animation: aiSwap .45s ease; }
@keyframes aiSwap { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
/* готовое меню проявляется из «нейро» */
#ntPlan > .rec-card.plan-in { animation: aiSwap .5s ease both; }

/* разделы дневника: 2×2 плитки */
.nt-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.nt-sec { min-height: 66px; display: flex; align-items: center; gap: 8px; padding: 12px; border: none; border-radius: 12px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.nt-sec .i { flex-shrink: 0; width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.nt-sec:nth-child(1) .i { background: color-mix(in srgb, var(--nt-p) 12%, transparent); color: var(--nt-p); }
.nt-sec:nth-child(3) .i { background: color-mix(in srgb, #ff2e6a 12%, transparent); color: #ff2e6a; }
.nt-sec:nth-child(4) .i { background: color-mix(in srgb, var(--nt-f) 16%, transparent); color: #e08a00; }
/* пятая — «Тренировки» во всю ширину, с подписью справа */
.nt-sec:nth-child(n+7) { grid-column: 1 / -1; }  /* «Протеиновые продукты» — во всю ширину */
.nt-sec:nth-child(5) .i { background: color-mix(in srgb, var(--nt-f) 16%, transparent); color: #e08a00; }
.nt-sec:nth-child(6) .i { background: color-mix(in srgb, var(--nt-c) 14%, transparent); color: var(--nt-c); }
.nt-sec:nth-child(7) .i { background: color-mix(in srgb, var(--nt-p) 12%, transparent); color: var(--nt-p); }
.nt-sec > span { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--hint); }

/* сегодняшние приёмы пищи */
.nt-meal-card .store-head .i, .nt-bought .store-head .i { margin-right: .4em; color: var(--accent); }
.nt-entry { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--sep); font-size: 14px; }
.nt-entry-name { flex: 1; min-width: 0; }
.nt-entry-g { margin-left: 6px; font-size: 12px; color: var(--hint); }
.nt-entry-kcal { font-size: 13px; color: var(--hint); white-space: nowrap; }
/* тренировка в карточке дня: тап — правка; под названием темп, подходы, заметка */
.nt-act-edit { display: block; padding: 0; border: none; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.nt-act-facts, .nt-act-sets, .nt-act-note { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--hint); }
.nt-act-note { font-style: italic; }
.nt-all-workouts { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--sep); width: 100%; font-size: 13px; font-weight: 700; text-decoration: none; }
.nt-all-workouts .i { width: 16px; height: 16px; }
.nt-meal-macros { padding-top: 8px; border-top: 1px solid var(--sep); font-size: 12px; color: var(--hint); }

/* подразделы: заголовок с кнопкой «назад» */
.nt-subhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 19px; font-weight: 800; }
.nt-back { flex-shrink: 0; width: 36px; height: 36px; display: grid; place-items: center; border: none; border-radius: 50%; background: var(--card); color: var(--text); cursor: pointer; }

/* статистика */
.nt-stat { padding: 11px 15px; border-bottom: 1px solid var(--sep); }
.nt-stat:last-child { border-bottom: none; }
.nt-stat-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.nt-stat-head span:first-child { text-transform: capitalize; }
.nt-stat-head b { font-weight: 800; }
.nt-stat-m { margin-top: 5px; font-size: 12px; color: var(--hint); }

/* раздел «Тренировки»: неделя против прошлой, прогресс в упражнениях */
.nt-wk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nt-wk-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; border-radius: 12px; background: var(--bg); }
.nt-wk-cell b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.nt-wk-cell > span { font-size: 12px; color: var(--hint); }
.nt-wk-d { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; font-size: 12px; font-weight: 700; color: var(--hint); }
.nt-wk-d .i { width: 14px; height: 14px; margin: 0; }
.nt-wk-d.up { color: #1f9d55; }
.nt-stat-head.nt-prog span:first-child { text-transform: none; font-weight: 700; }
.nt-wk-day { display: inline-block; }
.nt-wk-day::first-letter { text-transform: uppercase; }
/* запись прямо из раздела и программы: карточка — начать, × — удалить */
.nt-wk-new { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 18px; }
.nt-wk-new .i { margin-right: 0; }
.nt-wk-form { margin-bottom: 18px; }
.nt-tpl-from { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 12px; font-size: 13.5px; font-weight: 700; text-decoration: none; }
.nt-tpl-from .i { width: 15px; height: 15px; }
.nt-tpl-name { margin-top: 14px !important; }
.nt-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.nt-tpl { position: relative; display: flex; min-height: 64px; border-radius: 12px; background: var(--card); }
.nt-tpl-go { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 10px 30px 10px 12px; border: none; background: none; color: var(--text); text-align: left; cursor: pointer; }
.nt-tpl-go b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 800; }
.nt-tpl-go span { font-size: 12px; line-height: 1.3; color: var(--hint); }
.nt-tpl-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: none; border-radius: 50%; background: none; color: var(--hint); cursor: pointer; }
.nt-tpl-del .i { width: 14px; height: 14px; margin: 0; }
.nt-tpl-new { align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: none; color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; }
.nt-tpl-new .i { width: 16px; height: 16px; }
/* календарь: 12 недель столбцами, один оттенок от светлого к тёмному — сколько сожжено */
.nt-cal-card { margin-top: 12px; }
.nt-cal { display: flex; gap: 3px; margin-top: 10px; }
.nt-cal-col { flex: 1; display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.nt-cal-days { flex: 0 0 18px; }
.nt-cal-days span { display: flex; align-items: center; font-size: 9.5px; color: var(--hint); }
.nt-cal-c { display: block; aspect-ratio: 1; padding: 0; border: none; border-radius: 4px; background: transparent; }
button.nt-cal-c { background: color-mix(in srgb, var(--hint) 14%, transparent); cursor: pointer; }
button.nt-cal-c.l1 { background: color-mix(in srgb, var(--accent) 28%, transparent); }
button.nt-cal-c.l2 { background: color-mix(in srgb, var(--accent) 52%, transparent); }
button.nt-cal-c.l3 { background: color-mix(in srgb, var(--accent) 76%, transparent); }
button.nt-cal-c.l4 { background: var(--accent); }
.nt-cal-c.sel { box-shadow: 0 0 0 2px var(--text); }
.nt-cal-cap b, .nt-chart-cap b { color: var(--text); }
/* график упражнения: линия в цвет раздела, шкала мин/макс слева, выбранная точка — с обводкой */
.nt-chart { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.nt-chart-grid { stroke: var(--sep); stroke-width: 1; stroke-dasharray: 3 3; }
.nt-chart-axis { font-size: 11px; fill: var(--hint); font-variant-numeric: tabular-nums; }
.nt-chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nt-chart-pt { cursor: pointer; }
.nt-chart-pt .hit { fill: transparent; }
.nt-chart-pt .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.nt-chart-pt.sel .dot { fill: var(--card); stroke: var(--accent); stroke-width: 2.5; }
.nt-chart-cap { margin-top: 2px; font-size: 12px; color: var(--hint); }

/* нормы */
.nt-field { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--hint); }
.nt-unit { width: 26px; }
.nt-field input { width: 72px; padding: 6px 8px; border: 1px solid var(--sep); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 15px; text-align: right; outline: none; }
.nt-norm-empty { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--hint); }
.nt-norm-empty .i { width: 22px; height: 22px; color: var(--accent); }
.nt-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.nt-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1.5px solid transparent; border-radius: 12px; background: var(--card); color: var(--text); font-size: 14px; text-align: left; cursor: pointer; }
.nt-opt span { font-size: 12.5px; color: var(--hint); text-align: right; }
.nt-opt.active { border-color: var(--accent); background: var(--accent-soft); }

/* любимая еда (и первый вход) */
.nt-hero { padding: 16px 16px 20px; }
.nt-favs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nt-favs .nt-note { margin: 0 4px; }
.nt-fav { display: inline-flex; align-items: center; gap: 2px; padding: 6px 6px 6px 12px; border-radius: 20px; background: var(--accent-soft); font-size: 14px; font-weight: 600; }
.nt-fav-add { display: flex; gap: 8px; margin-bottom: 16px; }
.nt-fav-add .ing-input { background: var(--card); padding: 11px 12px; font-size: 15px; }
.nt-hints { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.nt-hints .refine-chip { padding: 7px 11px; font-size: 13px; }

/* шапка: аватар профиля рядом с шестерёнкой */
.head-actions { display: flex; align-items: center; gap: 8px; }
header .avatar-btn {
  width: 34px; height: 34px; border: none; background: var(--bg); border-radius: 50%;
  color: var(--text); display: grid; place-items: center; cursor: pointer;
}
/* окно профиля */
.pr-head { display: flex; align-items: center; gap: 12px; margin: 4px 2px 16px; }
.pr-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 22px; font-weight: 800; flex-shrink: 0; }
.pr-name { font-size: 18px; font-weight: 800; }
.pr-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.pr-form input { width: 100%; padding: 11px 13px; border: 1px solid var(--sep); border-radius: 12px;
  background: var(--bg); color: var(--text); font-size: 16px; font-family: inherit; }
.pr-back { align-self: flex-start; color: var(--link); }
.pr-edit { align-self: flex-start; }
.pr-hero .i { width: 44px; height: 44px; color: var(--accent); }
.pr-usage { position: relative; display: flex; justify-content: space-between; font-size: 14px; padding-bottom: 8px; }
.pr-usage i { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--p), var(--sep) var(--p)); }
.set-row .net-all .i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
/* админ: статистика в профиле — активные по дням столбиками */
.st-bars { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.st-bars i { flex: 1; height: var(--h); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--accent); }

/* окно «Лимит исчерпан / Pro» (js/paywall.js) */
.pw-back {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .35); animation: pw-fade .15s ease-out;
}
.pw-sheet {
  position: relative; width: 100%; max-width: 520px; box-sizing: border-box;
  background: var(--card); color: var(--text); border-radius: 22px 22px 0 0;
  padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); animation: pw-up .2s ease-out;
}
.pw-sheet h3 { margin: 0 32px 6px 0; font-size: 20px; }
.pw-sheet p { margin: 0 0 14px; color: var(--hint); line-height: 1.4; }
.pw-sheet .rec-primary { width: 100%; }
.pw-sheet .rec-primary .i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.pw-sheet .rec-secondary { margin-top: 8px; }  /* «Звёздами» под рублями; «Сбросить лимиты» — только у админа */
.pw-sheet .pw-stars { width: 100%; justify-content: center; }
.pw-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--field, var(--bg)); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pw-plan {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px;
  background: var(--bg); font-size: 13px;
}
.pw-plan b { font-size: 15px; }
.pw-plan small { color: var(--hint); }
.pw-plan.pro { background: var(--accent-soft, var(--bg)); box-shadow: inset 0 0 0 2px var(--accent); }
/* «Оформить Pro» — полноэкранный экран тарифа: герой, преимущества, сравнение, оплата */
.pw-page { align-items: stretch; background: var(--bg); }
.pw-page .pw-sheet {
  max-width: none; height: 100%; overflow-y: auto; border-radius: 0;
  padding-top: calc(18px + env(safe-area-inset-top));
  background: radial-gradient(120% 320px at 50% 0, rgba(255, 170, 60, .22), transparent 70%), var(--card);
  animation: pw-page .25s ease-out;
}
.pw-page .pw-sheet > * { max-width: 520px; margin-inline: auto; }
.pw-page .pw-x { top: calc(12px + env(safe-area-inset-top)); }
.pw-hero { text-align: center; margin: 10px auto 18px; }
.pw-logo {
  width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 12px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(140deg, #ffe066, #ff9a3c 50%, #ff5c8a); box-shadow: 0 10px 26px rgba(255, 100, 80, .35);
}
.pw-logo img { width: 96px; height: 96px; max-width: none; margin: -10px; }
.pw-page .pw-hero h3 { margin: 0 0 4px; font-size: 26px; }
.pw-page .pw-hero p { margin: 0; }
.pw-perks { list-style: none; padding: 0; margin: 0 auto 14px; display: grid; gap: 8px; }
.pw-perks li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; background: var(--bg); }
.pw-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft, var(--card)); color: var(--accent); }
.pw-ic .i { width: 20px; height: 20px; }
.pw-perks b { display: block; font-size: 15px; }
.pw-perks span:not(.pw-ic) { display: block; color: var(--hint); font-size: 13px; line-height: 1.3; }
.pw-price { text-align: center; margin: 0 auto 12px; color: var(--hint); }
.pw-price b { color: var(--text); font-size: 26px; }
.pw-page .rec-primary { display: block; }
@keyframes pw-page { from { transform: translateY(16px); opacity: 0; } }
@keyframes pw-fade { from { opacity: 0; } }
@keyframes pw-up { from { transform: translateY(24px); opacity: .6; } }

/* ── Режим «Косметика»: перламутровый фон вкладки, категории и чипсы сетей ── */
#v-search.beauty-on { border-radius: 20px; padding: 12px 10px; background: linear-gradient(135deg, #fde2f3, #e0ecff 35%, #e8fff4 65%, #fff3d9); }
.beauty-on .tile { color: #5b4f73; }
.beauty-on .tile-ic { background: #ffffffd9; color: #8a6cc7; border: 1px solid #fff; }
/* сети — одной прокручиваемой строкой: в несколько рядов они съедали пол-экрана */
.beauty-stores { display: flex; flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: none; }
/* hidden перебивается display: flex — чипсы сетей были видны и при выключенной «Косметике» */
.beauty-stores[hidden] { display: none; }
.beauty-stores .st {
  display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 11px 4px 4px;
  border-radius: 999px; border: 1px solid #fff; background: #ffffffaa; color: #5b4f73;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.beauty-stores .st:first-child { padding-left: 12px; }
.beauty-stores .st img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.beauty-stores .st.active { background: linear-gradient(90deg, #f7a1d5, #a8c8ff, #a6f0d0); color: #433; border-color: transparent; }
/* сети продуктов — те же кружки, фирменный значок сети вместо логотипа */
.food-stores .st { color: #25483c; }
.food-stores .st .sm { margin: 0; font-size: 17px; border-radius: 50%; vertical-align: 0; transition: font-size .25s ease; }
.food-stores .st.active { background: linear-gradient(90deg, #8fe3a4, #a8d4ff); color: #16322a; }
#v-search .food-stores.compact .st .sm { font-size: 20px; }

/* ── Режим «Аптека»: мятный фон вкладки, плитки и чипсы аптек (как «Косметика», другая гамма) ── */
#v-search.pharmacy-on { border-radius: 20px; padding: 12px 10px; background: linear-gradient(135deg, #dcf7ec, #e3f1ff 45%, #effbe6); }
.pharmacy-on .tile { color: #25483c; }
.pharmacy-on .tile-ic { background: #ffffffd9; color: #2c9a6e; border: 1px solid #fff; }
.pharmacy-stores { display: flex; flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.pharmacy-stores[hidden] { display: none; }
.pharmacy-stores .st {
  display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 11px 4px 4px;
  border-radius: 999px; border: 1px solid #fff; background: #ffffffaa; color: #25483c;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.pharmacy-stores .st:first-child { padding-left: 12px; }
.pharmacy-stores .st:not(:has(img)) { padding-left: 12px; }
.pharmacy-stores .st img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.pharmacy-stores .st.active { background: linear-gradient(90deg, #8fe3bd, #a8d4ff); color: #16322a; border-color: transparent; }

/* после «Найти» чипсы сетей сжимаются в кружки: логотип (или буква) без названия */
.beauty-stores .st-name, .pharmacy-stores .st-name { max-width: 140px; overflow: hidden; white-space: nowrap; transition: max-width .25s ease, opacity .2s ease; }
.beauty-stores .st-ini, .pharmacy-stores .st-ini { display: none; }
.beauty-stores .st, .pharmacy-stores .st { transition: padding .25s ease, gap .25s ease; }
#v-search .beauty-stores.compact, #v-search .pharmacy-stores.compact { flex-wrap: nowrap; gap: 5px; margin-bottom: 12px; scroll-margin-top: 10px; }
#v-search .beauty-stores.compact .st, #v-search .pharmacy-stores.compact .st {
  box-sizing: border-box; min-width: 34px; height: 34px; padding: 0 5px; gap: 0; justify-content: center;
}
#v-search .beauty-stores.compact .st img, #v-search .pharmacy-stores.compact .st img { width: 24px; height: 24px; }
#v-search .beauty-stores.compact .st-name, #v-search .pharmacy-stores.compact .st-name { max-width: 0; opacity: 0; }
#v-search .beauty-stores.compact .st-ini, #v-search .pharmacy-stores.compact .st-ini { display: inline; }

/* карточка косметики — как у Золотого яблока: плитки в две колонки;
   #results — чтобы перебить кнопки темы vv (vkusvill.css) */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }  /* телефон — две колонки (и на 375 px), широкий экран — 5–6 */
.bcard { background: #fff; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.b-img { position: relative; aspect-ratio: 1; border-radius: 10px; background: #f2f2f2; overflow: hidden; margin-bottom: 4px; }
.b-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.b-badge { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 6px; background: #ec3d8c; color: #fff; font-size: 12px; font-weight: 700; }
#results .bcard .b-img button { position: absolute; margin: 0; box-shadow: none; min-width: 0; display: grid; place-items: center; padding: 0; border: none; cursor: pointer; }
#results .bcard .b-heart { right: 0; top: 0; width: 44px; height: 44px; background: none; color: #a8927a; touch-action: manipulation; }
#results .bcard .b-heart.on { color: #ec3d8c; }
#results .bcard .b-heart.on .i { fill: currentColor; }
/* сумка — 3D-картинка без подложки; круг появляется только с галочкой «в корзине» */
#results .bcard .b-bag { right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; background: none; color: #fff; }
#results .bcard .b-bag.added { background: #ec3d8c; }
#results .bcard .b-img button .i { width: 18px; height: 18px; margin: 0; }
/* .b-img img множит фото на фон — иконки кнопок поверх фото (сердце, сумка) этого не должны: чёрный круг и пропавшее сердце */
#results .bcard .b-img button img { mix-blend-mode: normal; }
.b-store { font-size: 11.5px; color: #a8927a; }
.b-store b { color: #ec3d8c; }
.b-name { font-size: 13px; line-height: 1.3; color: #222; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b-price { font-size: 15px; font-weight: 700; color: #111; }
.b-price s { margin-left: 6px; font-size: 12px; font-weight: 400; color: #a8927a; }
.b-unit { font-size: 11.5px; color: #a8927a; }
/* тот же препарат в других аптеках */
.b-offers { font-size: 12px; }
.b-offers summary { cursor: pointer; color: #2c9a6e; font-weight: 700; list-style: none; }
.b-offer { display: flex; justify-content: space-between; gap: 6px; padding: 3px 0; color: #333; border-top: 1px solid #f0ece6; }

/* аптека: чипсы формы и дозировки над выдачей */
.drug-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 10px; padding: 2px; }
.drug-chips::-webkit-scrollbar { display: none; }
.drug-chip { white-space: nowrap; flex: none; }
/* «Аналоги» у лекарства в корзине */
.analogs-item {
  display: inline-flex; align-items: center; gap: 5px; margin: 2px 0 6px; padding: 4px 10px 4px 6px;
  border: 0; border-radius: 999px; background: #d9f5ea; color: #0f8a66; font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.analogs-item .i { width: 14px; height: 14px; }

/* Напоминания о приёме (RemindersTab) */
.remind {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 5px 10px 5px 7px;
  border: 0; border-radius: 999px; background: #e8efff; color: #3559c7; font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.remind .i, .remind-item .i { width: 14px; height: 14px; }
/* аптека: низ карточки — склеенный блок «Напомнить о приёме» + «В корзину» без зазора,
   «В аптеку →» и «Подробнее» — на фото; #results — чтобы перебить кнопки темы vv (vkusvill.css) */
.bcard .ph-actions { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; }
.bcard .ph-actions > * { margin-top: 0; }
#results .bcard .ph-cart {
  width: 100%; margin: 0; padding: 10px 8px; border: none; border-radius: 0;
  background: #2c9a6e; color: #fff; font-size: 14px; font-weight: 700; box-shadow: none;
}
#results .bcard .ph-cart.added { background: #d9f5ea; color: #0f8a66; }
.bcard .remind { width: 100%; justify-content: center; box-sizing: border-box; margin-top: 0; border-radius: 0; padding: 8px 10px; }
/* «В аптеку →» — пилюля в левом нижнем углу фото */
#results .bcard .b-img .ph-go {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px;
  border-radius: 8px; background: #ffffffee; color: #0f8a66; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.ph-go .i { width: 14px; height: 14px; }
/* «Подробнее» — круглая кнопка под сердечком */
#results .bcard .b-img .drug-more {
  right: 4px; top: 46px; width: 30px; height: 30px; border-radius: 50%; background: #ffffffee; color: #0f8a66;
}
.drug-more .i { width: 14px; height: 14px; }
/* окно «Подробнее о препарате» (js/drugSheet.js) */
/* шторка инструкции — аптечный градиент в шапке, как у «Как принимать» */
.dg-sheet { max-height: 85vh; overflow-y: auto; }
.dg-sheet:has(.dg-head) { padding: 0 0 calc(18px + env(safe-area-inset-bottom)); }
.dg-sheet h3 { font-size: 17px; }
.dg-head { display: flex; gap: 12px; align-items: center; padding: 20px 52px 16px 16px; background: linear-gradient(90deg, #8fe3bd, #a8d4ff); }
.dg-head img, .dg-pill { width: 64px; height: 64px; flex: none; border-radius: 16px; background: #fff; border: 1px solid #fff; object-fit: contain; }
.dg-pill { display: grid; place-items: center; color: #2c9a6e; }
.dg-pill svg { width: 30px; height: 30px; }
.dg-head b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; color: #16322a; }
.dg-head div span { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #16322a; background: #ffffffaa; border: 1px solid #fff; }
.dg-sheet .pw-x { background: #ffffffaa; color: #16322a; }
.dg-body { padding: 14px 16px 0; }
.dg-row { margin-bottom: 12px; font-size: 14px; line-height: 1.4; }
.dg-row b { display: block; margin-bottom: 3px; color: #0f8a66; }
.dg-row ul { margin: 0; padding-left: 18px; }
.dg-sheet .dg-note { font-size: 12.5px; margin: 12px 0; }
.dg-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: #0f8a66; margin-bottom: 8px; }
.dg-label svg { width: 18px; height: 18px; }
.dg-label.no { color: #b4502a; }
.dg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dg-chip { padding: 4px 11px; border-radius: 999px; font-size: 13px; background: #d9f5ea; color: #0f8a66; }
.dg-chip.no { background: #fde8df; color: #b4502a; }
.dg-full { margin-bottom: 4px; border-radius: 14px; background: #f1f9f5; }
.dg-full summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  color: #16322a; font-size: 14px; font-weight: 700;
}
.dg-full summary svg { width: 18px; height: 18px; color: #2c9a6e; }
.dg-full summary svg:last-child { margin-left: auto; transition: transform .2s; }
.dg-full[open] summary svg:last-child { transform: rotate(180deg); }
.dg-full summary::-webkit-details-marker { display: none; }
.dg-full .dg-row { padding: 0 14px; }
.dg-full .dg-row:last-child { padding-bottom: 12px; margin-bottom: 0; }
.dg-open { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 16px; background: linear-gradient(90deg, #2c9a6e, #3aa8c9); color: #fff; font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer; }
.dg-open svg { width: 18px; height: 18px; }
.dg-sheet .rec-primary, .dg-sheet .rec-secondary { display: block; text-align: center; text-decoration: none; cursor: pointer; }
.b-drug { font-size: 12px; color: #2c9a6e; font-weight: 600; }
.remind-item { background: #e8efff; color: #3559c7; margin-left: 6px; }
.rem-title { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 4px 0 14px; }
.rem-title .i { width: 22px; height: 22px; }
.rem-card { background: var(--card, #fff); border-radius: 18px; padding: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.06); margin-bottom: 18px; }
.rem-head { display: flex; align-items: center; gap: 8px; }
.rem-head .i { width: 22px; height: 22px; color: #0f8a66; flex: none; }
.rem-name, .rem-input { width: 100%; box-sizing: border-box; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; padding: 10px 12px; font: inherit; background: transparent; color: inherit; }
.rem-name { font-weight: 600; }
.rem-label { display: block; font-size: 13px; opacity: .65; margin: 12px 0 6px; }
.rem-times { display: flex; flex-wrap: wrap; gap: 8px; }
.rem-time-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 14px; border: 1.5px solid var(--accent); background: var(--card, #fff); padding: 4px 6px 4px 12px; }
.rem-time-chip .i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.rem-time::-webkit-calendar-picker-indicator { display: none; }
.rem-time { border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 700; color: inherit; }
.rem-del-time { border: 0; background: transparent; font: inherit; color: var(--hint); font-weight: 600; padding: 4px 6px; }
.rem-add-time { display: inline-flex; align-items: center; gap: 4px; border: 1.5px dashed var(--accent); border-radius: 14px; background: transparent; font: inherit; color: var(--accent); font-weight: 700; padding: 8px 14px; }
.rem-add-time .i { width: 16px; height: 16px; }
.rem-doses { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rem-dose { border: 1.5px solid var(--sep); border-radius: 14px; background: var(--card, #fff); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; padding: 7px 14px; }
.rem-dose.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.rem-courses { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: #f0f2ef; }
.rem-course { flex: 1; border: 0; border-radius: 11px; background: transparent; color: var(--hint); font: inherit; font-size: 14px; font-weight: 700; padding: 9px 0; }
.rem-course.active { background: var(--card, #fff); color: var(--accent); box-shadow: 0 0 0 1px #d8eadf; }
.rem-hint { font-size: 12px; color: var(--hint); margin-top: 6px; }
.rem-error { color: #d33; font-size: 13px; margin-top: 10px; }
.rem-save, .rem-new { width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; }
.rem-new { margin: 0 0 18px; }
.rem-btns { display: grid; grid-template-columns: 1fr 1.7fr; gap: 8px; margin-top: 16px; }
.rem-btns .rem-save { margin-top: 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.rem-btns .rem-save .i { width: 20px; height: 20px; }
.rem-cancel { border: 1.5px solid var(--sep); border-radius: 14px; background: var(--card, #fff); color: var(--text); font: inherit; font-weight: 600; padding: 13px; }
.rem-tg { text-align: center; margin-top: 10px; }
.rem-empty { opacity: .65; font-size: 14px; padding: 8px 2px; }
.rem-row { display: flex; align-items: center; gap: 8px; background: var(--card, #fff); border-radius: 14px; padding: 10px 10px 10px 14px; margin-bottom: 8px; }
.rem-row.off { opacity: .55; }
.rem-edit { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; padding: 0; }
.rem-edit b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rem-edit span { font-size: 13px; }
.rem-edit .sub { opacity: .6; }
.rem-pause, .rem-remove { border: 0; border-radius: 10px; background: rgba(0,0,0,.05); font: inherit; font-size: 13px; padding: 8px 10px; color: inherit; }
.rem-remove .i { width: 16px; height: 16px; }
.rem-doctor-open {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 13px; margin: 0 0 14px;
  border: 1px solid var(--sep); border-radius: 16px; background: var(--card); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.rem-doctor-open span { flex: 1; min-width: 0; }
.rem-doctor-open small { display: block; font-size: 13px; margin-top: 3px; }
.rem-doctor-open .i { flex: none; width: 20px; height: 20px; color: var(--accent-strong, #16763b); }
#remDoctorBack { min-height: 44px; text-align: left; color: var(--accent-strong, #16763b); }
.doctor-chat { display: grid; gap: 12px; max-width: 640px; padding: 14px; border-radius: 18px; background: var(--card); }
.doctor-description { margin: 0; font-size: 14px; }
.doctor-shortcuts { display: flex; gap: 6px; }
.doctor-shortcuts button {
  flex: 0 1 auto; min-height: 44px; min-width: 0; padding: 6px 8px; border: 0; border-radius: 13px;
  background: var(--accent-soft); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
#doctorLog { display: grid; gap: 6px; max-height: min(34dvh, 380px); overflow-y: auto; overscroll-behavior: contain; }
#doctorLog:empty { display: none; }
.doctor-message { margin: 0; padding: 9px 11px; border-radius: 13px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.doctor-question { justify-self: end; background: var(--accent-soft); }
.doctor-answer { justify-self: start; background: var(--bg); }
.doctor-plan { justify-self: start; width: auto; min-height: 40px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.doctor-plan svg { width: 16px; height: 16px; }
#doctorForm { display: flex; align-items: stretch; gap: 6px; }
#doctorForm input {
  flex: 1; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--sep);
  border-radius: 12px; font: inherit; font-size: 16px; background: var(--card); color: var(--text);
}
#doctorForm .rem-save { width: auto; margin: 0; padding: 8px 10px; font-size: 13px; cursor: pointer; }

.doctor-instruction { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--sep); }
.doctor-instruction label { display: grid; gap: 4px; font-size: 14px; min-width: 0; }
.doctor-instruction select { width: 100%; min-width: 0; min-height: 44px; }
.doctor-instruction-result { display: grid; gap: 8px; font-size: 14px; }
.doctor-instruction-result:empty { display: none; }
.doctor-instruction-result p, .doctor-instruction-result ul { margin: 0; }
.doctor-instruction-result li + li { margin-top: 6px; }
.doctor-instruction-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* экран «Как принимать» (HowtoTab) */
/* шапка результата «Как принимать» — аптечный градиент, как на ожидании */
.ht-head { padding: 14px; background: linear-gradient(90deg, #8fe3bd, #a8d4ff); }
.ht-top { display: flex; align-items: center; gap: 12px; }
.ht-pic { flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 20px; background: #ffffffcc; border: 1px solid #fff; overflow: hidden; }
.ht-pic img { width: 76px; height: 76px; object-fit: contain; }
.ht-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; flex: 1; }
.ht-info b { font-size: 17px; font-weight: 800; line-height: 1.2; color: #16322a; }
.ht-tag { padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #16322a; background: #ffffffb8; border: 1px solid #fff; }
.ht-fix { align-self: flex-start; flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 10px; background: #ffffffb8; border: 1px solid #fff; color: #237a57; cursor: pointer; }
.ht-fix svg { width: 16px; height: 16px; }
.ht-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ht-facts > div { padding: 6px 10px; border-radius: 12px; background: #ffffffa8; border: 1px solid #fff; min-width: 0; }
.ht-facts span { display: block; font-size: 11px; font-weight: 600; color: #3d5a50; }
.ht-facts b { font-size: 13.5px; font-weight: 800; color: #16322a; overflow-wrap: anywhere; }
.ht-name { display: flex; gap: 8px; margin: 0 0 14px; }
.ht-name .rec-primary { flex: none; padding: 10px 16px; }
.ht-card .ht-name { margin: 10px 0 0; }
.ht-who { display: grid; grid-template-columns: 1fr 1fr; width: 100%; box-sizing: border-box; margin-bottom: 10px; }
.ht-who .seg-opt { border: 0; padding: 8px; font: inherit; font-size: 14px; font-weight: 700; background: transparent; }
.ht-who .seg-opt.on { background: var(--accent); color: var(--accent-text); }
.ht-card { background: var(--card, #fff); border-radius: 18px; padding: 12px 14px; box-shadow: 0 2px 12px rgba(0,0,0,.06); margin-bottom: 14px; }
.ht-card-title { font-size: 13px; font-weight: 700; color: var(--hint); margin-bottom: 4px; }
.ht-res { position: relative; padding: 0; overflow: hidden; }
/* смена режима по клику: свежие блоки так же выходят из дымки */
.ht-soft .ht-rows > *, .ht-soft .ht-name, .ht-soft #htCompatBox, .ht-soft .ht-head .ht-info { animation: ht-rise .7s cubic-bezier(.22, 1, .36, 1) both; }
.ht-soft .ht-rows > :nth-child(2) { animation-delay: .06s; } .ht-soft .ht-rows > :nth-child(3) { animation-delay: .12s; }
.ht-soft .ht-rows > :nth-child(4) { animation-delay: .18s; } .ht-soft .ht-rows > :nth-child(n+5) { animation-delay: .24s; }
/* результат проявляется мягко: блоки по очереди выходят из дымки, строки следом, по шапке проходит блик */
.ht-out .ht-skel { opacity: 0; filter: blur(8px); transform: scale(.98); transition: opacity .55s ease, filter .55s ease, transform .55s ease; }
.ht-in > :not(.rem-title):not(.ht-res) { animation: ht-appear 1s .35s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes ht-appear { from { opacity: 0; filter: blur(10px); transform: scale(.97); } }
/* карточка с шапкой не исчезает: градиент и рамка те же, внутри лупа перетекает в упаковку, подпись — в название */
.ht-in .ht-head .ht-info { animation: ht-text .9s .1s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes ht-text { from { opacity: 0; transform: translateX(-6px); filter: blur(4px); } }
.ht-in .ht-head img, .ht-in .ht-head .ht-pill { animation: ht-focus 1s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes ht-focus { from { filter: blur(6px); opacity: .5; transform: scale(.92); } }
.ht-in .ht-rows > * { animation: ht-rise .9s cubic-bezier(.22, 1, .36, 1) both; }
.ht-in .ht-rows > :first-child { animation-delay: .3s; } .ht-in .ht-rows > :nth-child(2) { animation-delay: .42s; }
.ht-in .ht-rows > :nth-child(3) { animation-delay: .54s; } .ht-in .ht-rows > :nth-child(4) { animation-delay: .66s; }
.ht-in .ht-rows > :nth-child(n+5) { animation-delay: .78s; }
@keyframes ht-rise { from { opacity: 0; filter: blur(4px); transform: translateY(8px); } }
.ht-head { position: relative; overflow: hidden; }
.ht-in .ht-head::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, #ffffffb0 50%, transparent 70%); animation: ht-gleam 1.4s .35s ease-in-out both; }
@keyframes ht-gleam { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .ht-lens, .ht-ring, .ht-load-head, .ht-load-head::before { animation: none; }
  .ht-ring { display: none; }
}
.ht-rows { padding: 6px 14px 8px; }
.ht-rows .ht-card-title { margin: 6px 0 0; }
.ht-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid #edf4f1; }
.ht-rows > .ht-row:first-child, .ht-card-title + .ht-row { border-top: 0; }
.ht-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #e2f6ee; color: #2c9a6e; }
.ht-ico svg { width: 20px; height: 20px; }
.ht-row span { display: block; font-size: 12px; color: var(--hint); }
.ht-row b { font-size: 15px; font-weight: 700; }
.ht-avoid { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; font-weight: 800; color: #b4502a; }
.ht-avoid svg { width: 18px; height: 18px; }
.ht-card .dg-chips { margin-bottom: 2px; }
.ht-empty { margin: 0; font-size: 14px; color: var(--hint); }
.ht-wait { display: flex; align-items: center; gap: 10px; color: var(--hint); }
.btn-spinner.dark { display: inline-block; border-color: rgba(0,0,0,.15); border-top-color: var(--accent); vertical-align: middle; }
.ht-note { font-size: 12px; color: var(--hint); margin: 10px 2px 14px; }
.ht-main { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border-radius: 16px; background: linear-gradient(90deg, #2c9a6e, #3aa8c9); color: #fff; font-weight: 800; }
.ht-main svg, .ht-actions svg { width: 18px; height: 18px; }
/* четыре действия — сетка 2×2 одинаковых кнопок */
.ht-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.ht-actions .rec-secondary { border-radius: 14px; background: #ffffffcc; border: 1px solid #fff; color: #16322a; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; }
.ht-compat { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.06); }
.ht-card-title + .ht-compat { border-top: 0; }
.ht-compat .lvl { font-size: 13px; font-weight: 700; color: var(--hint); }
.ht-compat.warn .lvl { color: #c77a00; }
.ht-compat.no .lvl { color: var(--danger); }
.ht-compat .note { flex-basis: 100%; font-size: 13px; color: var(--hint); }

/* ожидание «Как принимать»: аптечная шапка с лупой (lens.webp, 3dicon), шаги и скелетоны результата */
.ht-load { padding: 0; overflow: hidden; }
.ht-load-head { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px; overflow: hidden;
  background: linear-gradient(90deg, #8fe3bd, #a8d4ff); }
/* «дыхание» — белая вуаль с opacity (GPU), а не анимация filter (перерисовка каждый кадр) */
.ht-load-head::before { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: ht-breathe 2.4s ease-in-out infinite; }
@keyframes ht-breathe { 50% { opacity: .14; } }
.ht-scan { position: relative; flex: none; width: 84px; height: 84px; border-radius: 20px; overflow: hidden; background: #ffffffaa; border: 1px solid #fff; }
.ht-scan-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(9px) saturate(1.1); transform: scale(1.1); opacity: .5; }
/* лупа — один кадр и transform-анимация: 121 кадр webp декодировался в основном потоке и дёргался */
.ht-lens { position: absolute; left: 18px; top: 18px; width: 48px; height: 48px; object-fit: contain; will-change: transform;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.2)); animation: ht-orbit 2.4s ease-in-out infinite; }
@keyframes ht-orbit {
  0%, 100% { transform: translate(9px, 0); }
  25% { transform: translate(0, 9px) rotate(-6deg); }
  50% { transform: translate(-9px, 0); }
  75% { transform: translate(0, -9px) rotate(6deg); }
}
/* голубые кольца «святилища» расходятся от упаковки */
.ht-ring { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px; border-radius: 50%; opacity: 0;
  border: 2px solid #5ee0ff; box-shadow: 0 0 12px #5ee0ff, inset 0 0 8px #5ee0ff; animation: ht-ring 2.4s ease-out infinite; }
.ht-ring + .ht-ring { animation-delay: 1.2s; }
@keyframes ht-ring { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(6); } }
.ht-scan { overflow: visible; }
.ht-scan-bg { border-radius: 20px; }
/* вспышка перед результатом */
.ht-load-head::after { content: ""; position: absolute; inset: -40%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #ffffffcc, transparent 60%); }
.ht-flash .ht-load-head::after { animation: ht-burst .6s ease-in-out both; }
.ht-flash .ht-ring { animation: ht-ring .55s ease-out both; }
@keyframes ht-burst { 45% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes ht-melt { to { opacity: 0; transform: scale(1.4); filter: blur(8px); } }
.ht-thought { font-size: 15px; font-weight: 800; color: #16322a; }
.ht-thought .btn-dots { color: #16322a; }
.ht-steps { display: flex; padding: 14px 6px 12px; }
.ht-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #9fb5ab; }
.ht-step::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; background: #e6f1ec; }
.ht-step:first-child::before { display: none; }
.ht-step.done::before, .ht-step.on::before { background: #8fe3bd; }
.ht-step i { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-size: 12px; background: #eef5f1; color: #9fb5ab; }
.ht-step.done { color: #25483c; }
.ht-step.done i { background: #8fe3bd; color: #16322a; }
.ht-step.on { color: #2c9a6e; }
.ht-step.on i { background: #2c9a6e; color: #fff; box-shadow: 0 0 0 5px #2c9a6e22; }
.ht-skel .ht-row { align-items: center; }
.ht-skel .ht-row i { width: 90px; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #e6f4ee, #f4fbf8, #e6f4ee); background-size: 200% 100%; animation: ht-shimmer 1.4s linear infinite; }
@keyframes ht-shimmer { to { background-position: -200% 0; } }

/* 3D-иконки (ico("3d:…")): картинка вместо линейного SVG; подложка и цвет линейных иконок ей не нужны */
.i3d { width: 1.2em; height: 1.2em; object-fit: contain; flex-shrink: 0; background: none !important; padding: 0 !important; border-radius: 0 !important; }
nav.tabbar button .ic img.i3d,
[data-theme="vv"] nav.tabbar button .ic img.i3d { width: 24px; height: 24px; opacity: 1; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
nav.tabbar button.active .ic img.i3d { opacity: 1; transform: none; }
.dept-tab .i3d { width: 18px; height: 18px; }
/* поиск: четыре отдела в два ряда по равной сетке, подписи не обрезаются и не налезают на иконки */
#depts .dept-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: 18px; }
#depts .dept-tab { justify-content: flex-start; gap: 8px; min-height: 40px; padding: 3px 12px; border-radius: 14px; font-size: 14px; }
#depts .dept-tab .i3d { width: 26px; height: 26px; }
.refresh-btn .i3d, .deal-chip .i3d { width: 20px; height: 20px; vertical-align: middle; }
.nt-mode .i3d { width: 24px; height: 24px; }
.nt-sec .i3d { width: 36px; height: 36px; }
.nt-meals .refine-chip .i3d { width: 28px; height: 28px; }
#results .bcard .b-heart .i3d { width: 26px; height: 26px; }
/* «Слежу»: та же белая картинка, поверх — розовая маска по её форме (multiply): без подмены src и задержки */
#results .bcard .b-heart::after {
  content: ""; position: absolute; left: 9px; top: 9px; width: 26px; height: 26px; pointer-events: none;
  background: #ee5f99; mix-blend-mode: multiply; opacity: 0; transition: opacity .12s ease;
  -webkit-mask: url(../img/3d/heartoff.webp) center / contain no-repeat; mask: url(../img/3d/heartoff.webp) center / contain no-repeat;
}
#results .bcard .b-heart.on::after { opacity: 1; }
#results .bcard .b-bag .i3d { width: 28px; height: 28px; }
.rec-photo .i3d { width: 24px; height: 24px; vertical-align: middle; }
.saved-open .i3d { width: 34px; height: 34px; vertical-align: middle; }
.empty-hero .ic .i3d { width: 56px; height: 56px; }
.empty-hero p .i3d { width: 20px; height: 20px; vertical-align: -4px; }
.bell .i3d, #results .card .bell img.i3d, [data-theme="vv"] #results .card .bell img.i3d { width: 22px; height: 22px; aspect-ratio: 1; padding: 0; vertical-align: middle; filter: none; box-shadow: none; }
.bell:active .i3d { transform: none; }
.del-watch .i3d, .watch-item .del-watch img.i3d, [data-theme="vv"] .watch-item .del-watch img.i3d { width: 24px; height: 24px; box-shadow: none; }
.rem-btns .rem-save .i.i3d { width: 24px; height: 24px; }
/* лёгкая анимация: плавное парение у плиток и блоков, пружинка при нажатии; GPU-only (transform) */
@keyframes i3d-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.tile-3d, .nt-sec .i3d { animation: i3d-float 3.6s ease-in-out infinite; }
.tile:nth-child(2n) .tile-3d, .nt-sec:nth-child(2n) .i3d { animation-delay: -1.2s; }
.tile:nth-child(3n) .tile-3d, .nt-sec:nth-child(3n) .i3d { animation-delay: -2.4s; }
.tile.float-off .tile-3d { animation-play-state: paused; }  /* за экраном — SearchTab._floatVisible */
button:active > .i3d, button:active .i3d, .tile:active .tile-3d { animation: none; transform: scale(.88); }
/* Сердце и его цветовая маска должны оставаться совмещёнными при касании. */
#results .bcard .b-heart:active .i3d { transform: none; }
@media (prefers-reduced-motion: reduce) { .tile-3d, .nt-sec .i3d { animation: none; } }

/* кнопка «Найти» берёт цвет раздела: диагональный градиент светлый → тёмный и мягкая цветная тень */
.search { --dept-c: var(--accent); --dept-l: #6cc277; --dept-d: #3a8a45; }
.search[data-dept="beauty"] { --dept-c: #d65a9e; --dept-l: #f07ab9; --dept-d: #c23f86; }
.search[data-dept="pharmacy"] { --dept-c: #4f8fda; --dept-l: #63a9f2; --dept-d: #2a75c2; }
.search #go { background: linear-gradient(135deg, var(--dept-l), var(--dept-d)); color: #fff;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--dept-c) 35%, transparent); }

/* «Вы считали»: приходит после загрузки — раскрываем по высоте, без рывка страницы */
.nt-lookups { display: grid; grid-template-rows: 1fr; }
.nt-lookups > div { min-height: 0; overflow: hidden; }
.nt-lookups.reveal { animation: ntLookupsOpen .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ntLookupsOpen { from { grid-template-rows: 0fr; opacity: 0; } to { grid-template-rows: 1fr; opacity: 1; } }
/* Распознавание фото и редактирование состава */
.rec-text-wrap { position: relative; }
.rec-text-wrap textarea { display: block; }
.rec-text-loading { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: inherit; background: var(--card); color: var(--hint); font-size: 14px; font-weight: 600; border-radius: 12px; }
.rec-text-loading[hidden] { display: none; }
.rec-text-loading > span:last-child { flex: 1; min-width: 0; }
.rec-text-loading i { display: block; height: 6px; width: 74%; margin-top: 8px; border-radius: 8px; background: linear-gradient(100deg, var(--sep) 25%, var(--card) 48%, var(--sep) 70%); background-size: 220% 100%; animation: rec-shimmer 1.6s linear infinite; }
.rec-text-loading i:last-child { width: 46%; }
.nt-food-spinner { display: inline-block; width: 15px; height: 15px; flex: none; border: 2px solid var(--sep); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes rec-shimmer { to { background-position: -220% 0; } }
.nt-item-editable { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0; }
.nt-item-top { display: flex; align-items: center; gap: 5px; }
.nt-item-top .nt-food-name { font-size: 15px; font-weight: 700; }
.nt-item-top .nt-kcal-field { margin-left: auto; font-weight: 700; color: var(--text); }
.nt-item-bar { display: flex; align-items: center; gap: 10px; }
.nt-item-bar .nt-g { flex-shrink: 0; }
.nt-food-name { min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: 8px 2px; }
.nt-item-editable .nt-grams { width: 55px; font-weight: 700; }
/* ползунок веса: заливка до бегунка — тем же градиентом, что ИИ-кнопки диетолога */
.nt-grams-range { flex: 1; min-width: 0; height: 6px; margin: 8px 0; border-radius: 3px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: linear-gradient(90deg, #ff9a5a, #ff5f8f) 0 0 / var(--fill, 0%) 100% no-repeat, var(--sep); }
.nt-grams-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.nt-grams-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.nt-grams-range:disabled { opacity: .45; }
.nt-kcal-field { width: auto; background: var(--bg); border-radius: 20px; padding: 7px 5px; white-space: nowrap; }
.nt-food-kcal { width: 45px; border: 0; padding: 0; background: transparent; color: var(--text); text-align: right; font: inherit; appearance: textfield; -moz-appearance: textfield; }
.nt-food-kcal::-webkit-inner-spin-button, .nt-food-kcal::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.nt-food-search { color: var(--hint); font-size: 12px; }
.nt-food-add, .nt-food-retry { border: 0; background: none; color: var(--link); font: inherit; font-size: 13px; font-weight: 700; padding: 10px 2px; cursor: pointer; }
.nt-food-retry { flex-basis: 100%; text-align: right; color: var(--danger); padding: 2px; }
.nt-food-hint { color: var(--hint); font-size: 12px; margin: 0 0 8px; }
@media (prefers-reduced-motion: reduce) { .rec-text-loading i, .nt-food-spinner { animation: none; } }

/* Поле рецепта плавно убирается, пока выбрано фото; результат остаётся на месте. */
#v-recipe .rec-text-shell { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .35s ease, opacity .25s ease; }
#v-recipe .rec-text-shell > .rec-text-wrap { min-height: 0; overflow: hidden; }
#v-recipe .rec-text-shell.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
@media (prefers-reduced-motion: reduce) { #v-recipe .rec-text-shell { transition: none; } }

/* Цветной знак БЖУ в кнопке рецепта — тот же огонёк, что и во вкладке. */
#recNutrition { display: flex; align-items: center; justify-content: center; gap: 10px; }
#recNutrition .rec-bju-icon { position: relative; flex: none; display: inline-flex; justify-content: center; align-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, #ffe0b5 0, #fff3e7 50%, #ffffff 74%); box-shadow: 0 1px 5px #ff9a623d; }
#recNutrition .rec-bju-icon .i { width: 25px; height: 25px; margin: -3px 0 0; }
#recNutrition .rec-bju-icon .kcal { position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%) rotate(-8deg); padding: 0 3px; border-radius: 5px; background: linear-gradient(120deg, #ff9857, #ff512c); box-shadow: 0 1px 4px #ff603e66; color: #fff; font: 800 7px/1.3 Nunito, system-ui, sans-serif; }

#v-recipe .rec-mode .i3d { width: 28px; height: 28px; object-fit: contain; }

/* Дорисовка выдачи по страницам: кнопка на случай, если прокрутка до конца не сработала */
.more-wrap { display: flex; justify-content: center; padding: 14px 0 6px; grid-column: 1 / -1; }
.more-btn { border: none; border-radius: 14px; padding: 10px 20px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--accent-soft, #e6f4e8); color: color-mix(in srgb, var(--accent, #267b43) 75%, #000); }
.more-btn:active { transform: scale(.96); }

/* Компактная история цены */
.wh-overview { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.wh-current { flex: 1 1 45%; min-width: 0; }
.wh-label, .wh-min, .wh-dates { color: var(--hint); }
.wh-current strong { display: block; font-size: 24px; line-height: 1.3; color: var(--text); }
.wh-change { font-size: 13px; color: var(--hint); }
.wh-change.down { color: var(--accent); font-weight: 700; }
.wh-change.up { color: var(--danger); font-weight: 700; }
.wh-chart { flex: 1 1 55%; min-width: 0; }
.wh-spark { width: 100%; height: 70px; display: block; }
.wh-dates { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; }
.wh-min { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--sep); font-size: 13px; }
.wh-min span:last-child { color: var(--text); }
.wh-details summary { color: var(--hint); font-size: 13px; padding: 10px 0 2px; cursor: pointer; }

/* Действия в истории питания */
.nt-recent-wrap { display: inline-flex; align-items: center; flex: none; border-radius: 999px; background: var(--bg); }
.nt-recent-wrap .nt-recent:not(:last-child) { padding-right: 0; }
.nt-recent-wrap .nt-recent { background: transparent; }  /* чипс из дневника — без крестика, отступ обычный */
.nt-chip-del { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--bg); color: var(--hint); cursor: pointer; }
.nt-chip-del .i { width: 16px; height: 16px; }
.nt-food-confirm { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--accent); color: white; cursor: pointer; }
.nt-food-confirm[hidden] { display: none; }
.nt-food-confirm .i { width: 17px; height: 17px; }

/* Настройка плиток поиска */
.tiles-editor:not([hidden]) { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:10px 0; color:var(--hint); font-size:13px; }
.tiles-editor span { flex:1 1 100%; }
.tiles-editor button { border:0; border-radius:12px; padding:8px 12px; background:var(--accent-soft); color:var(--text); font:inherit; }
.tile-edit-wrap { position:relative; min-width:0; }
.tile-edit-wrap .tile { width:100%; }
.tile-edit-wrap .tile-selected .tile-ic { outline:3px solid var(--accent); }
.tile-remove { position:absolute; top:-10px; right:max(-5px, calc(50% - 48px)); width:40px; height:40px; border:0; background:transparent; color:var(--card); font-size:16px; line-height:1; display:grid; place-items:center; isolation:isolate; }
.tile-remove::before { content:""; position:absolute; width:22px; height:22px; border-radius:50%; background:var(--text); z-index:-1; }
.tile-edit-wrap .tile { touch-action:none; user-select:none; -webkit-user-select:none; }
.tile-edit-wrap:has(.tile-dragging) { z-index:10; }
.tile-edit-wrap .tile-dragging { position:relative; z-index:11; opacity:.85; }
.tile-drop-target .tile-ic { outline:2px dashed var(--accent); }

.tile-edit-wrap img { -webkit-user-drag:none; user-select:none; }

/* Search category accordion: fixed order and original icons, one visible label. */
#depts .dept-switch { display: flex; gap: 4px; padding: 5px; }
#depts .dept-tab {
  flex: 0 0 44px; min-width: 44px; min-height: 44px; padding: 0 8px;
  justify-content: center; gap: 0; overflow: hidden;
  transition: flex-grow .35s cubic-bezier(.2,.8,.2,1), background-color .25s ease, color .25s ease;
}
#depts .dept-tab.active { flex-grow: 1; padding-inline: 0; }
#depts .dept-tab .dept-label {
  display: block; min-width: 0; max-width: 0; opacity: 0; overflow: hidden;
  white-space: nowrap; margin-left: 0; transform: translateX(-4px);
  transition: max-width .35s cubic-bezier(.2,.8,.2,1), margin-left .35s ease, opacity .12s ease, transform .25s ease;
}
#depts .dept-tab.active .dept-label {
  max-width: 140px; margin-left: 8px; opacity: 1; transform: translateX(0);
  transition: max-width .35s cubic-bezier(.2,.8,.2,1), margin-left .35s ease, opacity .2s ease .1s, transform .3s ease .05s;
}
@media (prefers-reduced-motion: reduce) {
  #depts .dept-tab, #depts .dept-tab .dept-label, #depts .dept-tab.active .dept-label { transition: none; }
}

@media (max-width: 360px) {
  #depts .dept-tab { font-size: 12.5px; }
  #depts .dept-tab.active .dept-label { margin-left: 4px; }
}

/* Restaurant region, local source filter, and observed menu coverage. */
.restaurant-controls { margin: 0 0 10px; color: var(--hint); font-size: 12px; }
.restaurant-controls p { margin: 0 0 8px; }
.restaurant-stores { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0 0 10px; padding: 2px 1px 6px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
.restaurant-stores[hidden] { display: none; }
.restaurant-stores .st { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 36px; padding: 4px 11px 4px 5px; border: 1px solid var(--sep); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.restaurant-stores .st:active { transform: scale(.97); }
.restaurant-stores .st-ini { display: grid; width: 25px; height: 25px; flex: none; place-items: center; border-radius: 50%; background: #eef4f0; color: #2d7353; font-size: 11px; font-weight: 800; }
.restaurant-stores .st-logo { width: 25px; height: 25px; flex: none; border-radius: 50%; object-fit: contain; background: #fff; }
.restaurant-stores .st.active { border-color: transparent; background: linear-gradient(90deg, #8fe3a4, #a8d4ff); color: #16322a; }
.restaurant-stores .st.active .st-ini { background: #ffffff9c; }
@media (prefers-reduced-motion: reduce) { .restaurant-stores .st { transition: none; } }
.restaurant-sources { margin: 16px 0; color: var(--hint); font-size: 12px; }
.restaurant-sources summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.restaurant-sources ul { list-style: none; padding: 0; margin: 0; }
.restaurant-sources li { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-top: 1px solid var(--sep); }
.restaurant-sources strong { color: var(--text); }

/* Full nutrition history, grouped by food category. */
.nt-history-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin-top: 8px; padding: 4px 0; border: 0; background: transparent; color: var(--hint); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.nt-history-link .i { width: 20px; height: 20px; flex-shrink: 0; }
.nt-history-category { margin-bottom: 12px; }
.nt-history-category h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; }
.nt-history-category h2 .cnt { color: var(--hint); font-size: 13px; }
.nt-history-food { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 60px; padding: 12px 0; border: 0; border-top: 1px solid var(--line, #e5e7e2); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.nt-history-food > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.nt-history-food small { display: block; margin-top: 4px; color: var(--hint); font-size: 12px; }
.nt-history-protein { flex-shrink: 0; text-align: right; }

/* Compact individual food cards on a lavender history screen. */
.nt-history-screen { background: #eef0ff; border-radius: 24px; padding: 18px; }
.nt-history-screen .nt-note { margin: 12px 0 18px; }
.nt-history-category { margin: 0 0 20px; }
.nt-history-category h2 { margin: 0 0 10px; }
.nt-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.nt-history-card { min-width: 0; display: flex; flex-direction: column; background: #fff; border-radius: 17px; padding: 12px; box-shadow: 0 5px 18px #626cc51a; }
.nt-history-card .nt-history-food { flex: 1; display: block; min-height: 0; padding: 0; border: 0; }
.nt-history-name { display: block; min-height: 45px; font-weight: 700; line-height: 1.25; }
.nt-history-card .nt-history-protein { display: block; margin-top: 12px; text-align: left; }
.nt-history-protein b { color: #5965d9; }
.nt-history-add { width: 100%; margin-top: 12px; min-height: 38px; border: 0; border-radius: 12px; background: #646fe2; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.nt-history-add:disabled { opacity: .55; }
.nt-history-status { color: #4c568f; font-size: 13px; margin-top: 8px; }
@media (max-width: 320px) { .nt-history-grid { grid-template-columns: 1fr; } }

[data-theme="vv"] #results .card.restaurant-detail-card { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.rest-hero { position: relative; }
[data-theme="vv"] #results .restaurant-detail-card .rest-hero img.rest-photo, .restaurant-detail-card div.rest-photo { display: block; width: 100%; height: 170px; aspect-ratio: auto; object-fit: cover; padding: 0; border-radius: 18px; background: var(--field); }
#v-search #results .restaurant-detail-card .rest-hero .nutri { position: absolute; top: 8px; right: 8px; }
#v-search #results .restaurant-detail-card .rest-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
#v-search #results .restaurant-detail-card .rest-title { font-weight: 800; font-size: 17px; line-height: 1.2; }
#v-search #results .restaurant-detail-card .nutri { height: 30px; padding: 0 10px; border-radius: 999px; }
#v-search #results .restaurant-detail-card .rest-size { display: flex; gap: 4px; overflow-x: auto; }
#v-search #results .restaurant-detail-card .rest-size button { flex: none; padding: 6px 9px; border: 1px solid #c6e6ce; border-radius: 999px; background: #eef8ef; color: #245c36; font-weight: 700; font-size: 12px; }
#v-search #results .restaurant-detail-card .rest-size button.active { background: #23a34a; border-color: #23a34a; color: white; }
#v-search #results .restaurant-detail-card .rest-nodata { padding: 9px 12px; border-radius: 12px; background: var(--field); font-size: 12.5px; color: var(--hint); }
#v-search #results .restaurant-detail-card .rest-guess { font-size: 11.5px; line-height: 1.3; color: #8a6d1f; background: #fff6dc; border-radius: 12px; padding: 7px 9px; }
.rest-buy { display: flex; align-items: center; gap: 10px; }
#v-search #results .restaurant-detail-card .rest-price { font-weight: 900; font-size: 22px; white-space: nowrap; }
#v-search #results .restaurant-detail-card .rest-buy .add { flex: 1; width: auto; background: #ffd23f; color: #1d2b22; }
#v-search #results .restaurant-detail-card .rest-price small { display: block; margin-top: -2px; font-size: 12px; font-weight: 800; color: var(--hint); }
/* сколько кусочков съест: кружки-роллы, переключатель, крупно ккал и полоса БЖУ */
.restaurant-detail-card .rest-pieces { padding: 10px 12px 8px; border-radius: 18px; background: var(--field); }
.restaurant-detail-card .rest-pieces-t { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.restaurant-detail-card .rest-pieces-t span + span { color: var(--hint); }
.restaurant-detail-card .rest-dots { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; margin-top: 8px; }
.restaurant-detail-card .rest-dots button { aspect-ratio: 1; max-width: 44px; width: 100%; justify-self: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle, #ffb27a 0 22%, #fff 23% 55%, #2c3a33 56%); box-shadow: 0 2px 6px rgba(0, 0, 0, .15); transition: transform .15s; }
.restaurant-detail-card .rest-dots button.on { outline: 3px solid var(--accent); outline-offset: 2px; transform: scale(1.04); }
.restaurant-detail-card .rest-dots-hint { margin-top: 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--hint); }
.restaurant-detail-card .rest-seg { display: flex; padding: 3px; border-radius: 14px; background: var(--field); }
.restaurant-detail-card .rest-seg button { flex: 1; padding: 7px 0; border: 0; border-radius: 11px; background: none; color: var(--hint); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.restaurant-detail-card .rest-seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.restaurant-detail-card .rest-big { text-align: center; font-weight: 800; font-size: 16px; }
.restaurant-detail-card .rest-big b { font-size: 36px; font-weight: 900; line-height: 1.1; }
.restaurant-detail-card .rest-big small { display: block; font-size: 12.5px; color: var(--hint); }
.restaurant-detail-card .rest-macro { display: flex; height: 8px; border-radius: 5px; overflow: hidden; }
.restaurant-detail-card .rest-macro-l { display: flex; justify-content: space-between; gap: 6px; margin-top: -4px; font-size: 12px; font-weight: 800; }
.restaurant-detail-card .rest-macro-l span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: currentColor; }
.restaurant-detail-card .rest-macro .m0, .restaurant-detail-card .rest-macro-l .m0::before { background: #4a9eff; }
.restaurant-detail-card .rest-macro .m1, .restaurant-detail-card .rest-macro-l .m1::before { background: #ffb547; }
.restaurant-detail-card .rest-macro .m2, .restaurant-detail-card .rest-macro-l .m2::before { background: #9bd17a; }
.restaurant-detail-card .rest-comp-h { margin-bottom: 6px; font-weight: 900; font-size: 14px; }
.restaurant-detail-card .rest-comp p { font-size: 12.5px; line-height: 1.35; color: var(--hint); }
.restaurant-detail-card .rest-icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px 4px; text-align: center; font-size: 11px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.restaurant-detail-card .rest-icons span { display: grid; place-items: center; height: 38px; margin-bottom: 3px; border-radius: 50%; background: var(--field); font-size: 19px; }
#v-search #results .restaurant-detail-card .store-link { margin: 0; order: 9; }
#v-search #results .restaurant-detail-card .rest-title { order: -2; }
#v-search #results .restaurant-detail-card .rest-body > .store { order: -1; margin: -4px 0 0; }

/* долгое нажатие на «БЖУ» в меню — список ИИ-помощников над кнопкой, тап мимо закрывает */
.ai-menu { position: fixed; inset: 0; z-index: 60; background: rgba(30, 20, 50, .18); animation: aiMenuFade .18s ease-out; }
.ai-menu-list { position: absolute; right: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px); width: 250px; padding: 6px; border-radius: 22px;
  background: var(--card); box-shadow: 0 18px 40px -14px rgba(40, 20, 80, .55); transform-origin: 85% 100%; animation: aiMenuPop .22s cubic-bezier(.2, .9, .3, 1.2); }
.ai-menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px; border: none; border-radius: 15px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ai-menu-list button:active { background: rgba(120, 100, 180, .1); }
.ai-menu-list button > span:first-child { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; }
.ai-menu-list .i3d { width: 26px; height: 26px; }
.ai-menu-list b { display: block; font-size: 15px; font-weight: 800; }
.ai-menu-list small { display: block; font-size: 12px; font-weight: 600; color: var(--hint); }
@keyframes aiMenuFade { from { opacity: 0; } }
@keyframes aiMenuPop { from { opacity: 0; transform: scale(.85) translateY(10px); } }

/* «← Назад» из подборки сладостей, детского и готовой еды */
.coll-back {
  margin: 0 0 8px; padding: 6px 14px; border: none; border-radius: 14px; background: var(--card);
  color: var(--accent); font: inherit; font-weight: 700; cursor: pointer;
}
.coll-back[hidden] { display: none; }
/* Карточки «Сегодня ел» и «Вы считали»: круглая иконка слева, название и ккал/граммы двумя строками */
.nt-chip-card { display: inline-flex; align-items: center; flex: none; gap: 2px; padding: 7px 8px; border-radius: 16px; background: var(--card, #fff); box-shadow: inset 0 0 0 1px var(--sep); }
.nt-card-main { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.nt-card-pic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); }
.nt-card-pic .i { width: 22px; height: 22px; }
.nt-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nt-card-text .nt-recent-name { display: block; max-width: 130px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-card-text .cnt { margin: 0; opacity: 1; font-size: 12px; color: var(--hint); }
.nt-card-btn.nt-today-again, .nt-card-btn.nt-chip-del { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; min-height: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--hint); cursor: pointer; }
.nt-card-btn.nt-today-again { color: var(--accent); }
.nt-card-btn.nt-today-again.done { background: #e3f6e8; color: #1f9d55; }
.nt-card-btn .i { width: 16px; height: 16px; }

/* справка с карточки товара: возврат в поиск */
.nt-to-search { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 8px 14px 8px 10px; border: 0; border-radius: 999px;
  background: var(--chip-bg, rgba(0, 0, 0, .06)); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.nt-to-search .i { width: 18px; height: 18px; }

/* вес, ккал и доля нормы колонками под названием */
.card .facts { display: flex; gap: 6px; margin: 4px 0 6px; }
.card .facts > div { flex: 1; min-width: 0; padding: 5px 2px 4px; border-radius: 12px; text-align: center; background: var(--bg); }
.card .facts b { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.card .facts small { display: block; font-size: 10.5px; color: var(--hint); white-space: nowrap; }
.card .facts .sk { flex: 1; min-height: 44px; border-radius: 12px; background: linear-gradient(90deg, var(--bg) 25%, color-mix(in srgb, var(--bg) 55%, #fff) 50%, var(--bg) 75%); background-size: 200% 100%; animation: factsShimmer 1.2s linear infinite; }
@keyframes factsShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* настоящие ячейки проявляются мягко, а не выскакивают */
.card .facts > div:not(.sk) { animation: factsIn .3s ease both; }
@keyframes factsIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card .facts .sk, .card .facts > div:not(.sk) { animation: none; } }
.card .facts .fill { background: linear-gradient(90deg, var(--accent-soft) var(--f), var(--bg) var(--f)); }
.card .price-inline { display: none; }

/* «Протеин»: подпись, норма белка и категории под кнопкой режима */
.protein-cap{margin:6px 0 10px;display:flex;flex-direction:column;gap:6px}
.protein-cap[hidden]{display:none}
.protein-cap .pc-hint{font-size:12px;color:var(--hint)}
.protein-cap .pc-norm{font-size:13px;text-align:left;background:var(--accent-soft,rgba(255,90,31,.1));border-radius:10px;padding:7px 10px;color:var(--text)}
.protein-cap .pc-set{border:0;cursor:pointer;font-family:inherit;color:var(--accent)}
.protein-cap .pc-cats{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.protein-cap .pc-cat{flex:none;border:1px solid var(--border,rgba(0,0,0,.12));background:var(--card,#fff);color:var(--text);border-radius:999px;padding:5px 11px;font:inherit;font-size:13px;cursor:pointer}
.protein-cap .pc-cat span{opacity:.55;margin-left:2px}
.protein-cap .pc-cat.active{background:var(--accent);border-color:var(--accent);color:#fff}
.protein-cap .pc-cat.active span{opacity:.8}
/* Плашка «Доктор PRO» под плитками аптеки: открывает Доктора в напоминаниях */
.doctor-pro { position: relative; display: block; width: 100%; min-height: 128px; margin: 16px 0 4px; padding: 18px; border: 0; border-radius: 26px; overflow: hidden; text-align: left; font: inherit; color: #fff; cursor: pointer;
  background: radial-gradient(circle at 85% 20%, #3b4c8f 0, #1c2347 55%, #141a33 100%); box-shadow: 0 14px 28px rgba(20, 26, 51, .4); }
.doctor-pro[hidden] { display: none; }
.doctor-pro:active { transform: scale(.98); }
.doctor-pro::before, .doctor-pro::after { content: "✦"; position: absolute; color: #ffd76a; }
.doctor-pro::before { right: 120px; top: 16px; font-size: 16px; }
.doctor-pro::after { right: 22px; top: 12px; font-size: 11px; }
.doctor-pro-text { position: relative; z-index: 1; display: block; max-width: 64%; }
.doctor-pro b { display: block; font-size: 19px; font-weight: 900; letter-spacing: -.2px; }
.doctor-pro-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(90deg, #ffd76a, #f5a524); color: #3a2600; font-size: 11px; font-weight: 900; letter-spacing: .4px; vertical-align: 3px; }
.doctor-pro small { display: block; margin-top: 3px; color: #c8cff0; font-size: 13px; font-weight: 600; line-height: 1.3; }
.doctor-pro ul { margin: 8px 0 0; padding: 0; list-style: none; color: #e9ecff; font-size: 12.5px; font-weight: 700; }
.doctor-pro li::before { content: "✦ "; color: #ffd76a; }
.doctor-pro img { position: absolute; right: -8px; bottom: -10px; width: 130px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }

/* ---------- Обязательная активность (Тренировки → movement, js/nutritionMovement.js) ----------
   Своя фиолетовая палитра поверх оранжевой вкладки: плитки «+N», подход с таймером, серия. */
.nt-mv-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0 18px; padding: 13px 14px; border: 0; border-radius: 18px;
  background: linear-gradient(135deg, #7b6cff, #c36bff); color: #fff; text-align: left; font: inherit; cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(122, 92, 255, .6); }
.nt-mv-entry .nt-mv-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, .22); font-size: 24px; }
.nt-mv-entry .nt-mv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-mv-entry b { font: 800 16px/1.2 "Rubik", system-ui, sans-serif; }
.nt-mv-entry small { font-size: 12.5px; font-weight: 700; opacity: .9; }
.nt-mv-entry .i { width: 18px; height: 18px; flex: none; }

.mv { --mv-grad: linear-gradient(135deg, #7b6cff, #c36bff); --mv-accent: #7a5cff; --mv-tint: #f0ecff; --mv-ok: #1f9d55;
  --mv-soft: color-mix(in srgb, var(--mv-accent) 9%, #f2f2f5); padding-bottom: 8px; }
.mv-card { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.mv-grad { background: var(--mv-grad); color: #fff; box-shadow: 0 10px 22px -12px rgba(122, 92, 255, .7); }
.mv-row { display: flex; align-items: center; gap: 11px; }
.mv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mv-t b { font-size: 14.5px; font-weight: 800; }
.mv-t span { font-size: 12.5px; font-weight: 600; color: var(--hint); }
.mv-grad .mv-t span { color: #fff; opacity: .9; }
.mv-big { font: 800 17px/1.2 "Rubik", system-ui, sans-serif !important; }
.mv-em-big { font-size: 34px; line-height: 1; }
.mv-sec { font: 800 15px "Rubik", system-ui, sans-serif; margin: 6px 4px 9px; }
.mv-hint { color: var(--hint); font-size: 12px; font-weight: 600; }
.mv-lbl { font-size: 11.5px; font-weight: 800; color: var(--hint); text-transform: uppercase; letter-spacing: .4px; margin: 14px 2px 7px; }
.mv-intro { display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.mv-intro span:last-child { font-size: 13.5px; font-weight: 600; opacity: .92; }

/* подход идёт: таймер, крупное число, «Сделал» */
.mv-set { padding: 18px; }
.mv-cap { font-size: 11.5px !important; font-weight: 800 !important; letter-spacing: .4px; }
.mv-set .mv-t b { font: 800 20px "Rubik", system-ui, sans-serif; }
.mv-timer { font: 800 30px "Rubik", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.mv-count { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 2px; }
.mv-round { width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .22); color: #fff; font: 800 24px "Rubik", system-ui, sans-serif; cursor: pointer; }
.mv-count-n { width: 110px; border: 0; background: transparent; color: #fff; text-align: center; font: 800 54px/1 "Rubik", system-ui, sans-serif; -moz-appearance: textfield; }
.mv-count-n::-webkit-outer-spin-button, .mv-count-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mv-count-n:focus { outline: none; border-bottom: 2px solid rgba(255, 255, 255, .6); }
.mv-unit-hint { text-align: center; font-size: 12px; font-weight: 700; opacity: .85; margin-bottom: 12px; }
.mv-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 14px; }
.mv-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 13px 10px; border: 0; border-radius: 16px;
  background: var(--mv-grad); color: #fff; font: 800 15px "Nunito", system-ui, sans-serif; cursor: pointer; }
.mv-btn .i { width: 17px; height: 17px; }
.mv-btn.mv-ghost { background: rgba(255, 255, 255, .22); }
.mv-btn.mv-white { background: #fff; color: var(--mv-accent); }
.mv-btn.mv-soft { background: var(--mv-soft); color: var(--text); }
.mv-btn.mv-tint { background: var(--mv-tint); color: var(--mv-accent); margin-top: 14px; }

/* плитки: «+N» — подход сделан одним нажатием */
.mv-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mv-tile { margin: 0; padding: 13px; display: flex; flex-direction: column; cursor: pointer; }
.mv-tile-top { display: flex; justify-content: space-between; align-items: flex-start; }
.mv-plus { min-width: 40px; height: 38px; padding: 0 10px; border: 0; border-radius: 19px; background: var(--mv-grad); color: #fff;
  font: 800 15px "Rubik", system-ui, sans-serif; box-shadow: 0 5px 12px -5px var(--mv-accent); cursor: pointer; display: grid; place-items: center; }
.mv-plus:active { transform: scale(.94); }
.mv-plus.done { background: var(--mv-ok); box-shadow: none; }
.mv-plus .i { width: 18px; height: 18px; }
.mv-name { font-size: 14px; font-weight: 800; line-height: 1.2; margin-top: 8px; }
.mv-num { font: 800 22px "Rubik", system-ui, sans-serif; letter-spacing: -.5px; margin-top: 7px; }
.mv-num small { font: 700 13px "Nunito", system-ui, sans-serif; color: var(--hint); letter-spacing: 0; }
.mv-tile.ok .mv-num { color: var(--mv-ok); }
.mv-segs { display: flex; gap: 3px; margin-top: 8px; }
.mv-segs i { flex: 1; height: 6px; border-radius: 4px; background: var(--mv-soft); }
.mv-segs i.f { background: var(--mv-accent); }
.mv-tile.ok .mv-segs i.f { background: var(--mv-ok); }
.mv-tile-foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; }
.mv-st { font: 800 11.5px "Rubik", system-ui, sans-serif; border-radius: 8px; padding: 3px 7px; white-space: nowrap; }
.mv-st.ok { color: var(--mv-ok); background: color-mix(in srgb, var(--mv-ok) 14%, transparent); }
.mv-st.no { color: var(--mv-accent); background: var(--mv-tint); }
.mv-up { font: 800 11.5px "Rubik", system-ui, sans-serif; color: var(--mv-ok); background: color-mix(in srgb, var(--mv-ok) 12%, transparent); border-radius: 8px; padding: 3px 6px; }
.mv-edit { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--mv-soft); color: var(--mv-accent); font-size: 14px; cursor: pointer; }
.mv-dash { display: block; width: 100%; margin-bottom: 12px; padding: 14px; border: 1.5px dashed color-mix(in srgb, var(--mv-accent) 55%, transparent); border-radius: 16px;
  background: transparent; color: var(--mv-accent); font: 800 14px "Nunito", system-ui, sans-serif; cursor: pointer; }

/* итог дня и серия */
.mv-ring { position: relative; flex: none; display: block; }
.mv-ring > span { position: absolute; inset: 0; display: grid; place-items: center; }
.mv-ring b { font: 800 19px "Rubik", system-ui, sans-serif; }
.mv-bar { height: 7px; border-radius: 8px; background: var(--mv-soft); overflow: hidden; margin-top: 8px; }
.mv-bar i { display: block; height: 100%; border-radius: 8px; background: var(--mv-grad); }
.mv-week { display: flex; gap: 6px; margin-top: 12px; }
.mv-week span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); font: 800 12px "Rubik", system-ui, sans-serif; }
.mv-week span.on { background: #fff; color: var(--mv-accent); }
.mv-week span.now { background: rgba(255, 255, 255, .35); }

/* чипсы: наборы, частота, тон */
.mv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mv-chips + .mv-chips { margin-top: 7px; }
.mv-chips.mv-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 2px 14px 6px; scrollbar-width: none; }
.mv-chips.mv-even .mv-chip { flex: 1; }
.mv-chips.mv-grow { flex: 1; justify-content: flex-end; }
.mv-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 12px; border: 0; border-radius: 16px;
  background: var(--mv-soft); color: var(--text); font: 800 13px "Nunito", system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.mv-scroll .mv-chip { background: var(--card); box-shadow: var(--shadow); }
.mv-chip.on { background: var(--mv-grad); color: #fff; }

/* редактор активности */
.mv-h b { font: 800 16px "Rubik", system-ui, sans-serif; }
.mv-emojis { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.mv-emojis .mv-chip { width: 40px; height: 40px; padding: 0; font-size: 20px; }
.mv-input { width: 100%; padding: 11px 12px; border: 1.5px solid var(--sep); border-radius: 13px; background: var(--card); color: var(--text); font: 700 15px "Nunito", system-ui, sans-serif; }
.mv-input:focus { outline: none; border-color: var(--mv-accent); }
.mv-step { display: flex; align-items: center; background: var(--mv-soft); border-radius: 13px; overflow: hidden; flex: none; }
.mv-step button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--mv-accent); font: 800 20px "Rubik", system-ui, sans-serif; cursor: pointer; }
.mv-step b { min-width: 44px; text-align: center; font: 800 17px "Rubik", system-ui, sans-serif; }

/* настройки напоминаний */
.mv-line { padding: 4px 0; }
.mv-line + .mv-lbl { margin-top: 10px; }
.mv-tg { width: 46px; height: 28px; flex: none; border: 0; border-radius: 28px; background: var(--sep); position: relative; cursor: pointer; transition: background .2s; }
.mv-tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.mv-tg.on { background: var(--mv-accent); }
.mv-tg.on::after { transform: translateX(18px); }
.mv-hours { gap: 8px; }
.mv-hours label { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--hint); }
.mv-hours .mv-input { padding: 9px 10px; }
.mv-hours + .mv-hint { margin: 6px 2px 12px; }
