/* ============================================================
   LUGELA PWA — дизайн-система

   Токены сняты с утверждённого макета
   design-src/LUGELA Final.dc.html (рамка 340×720).
   Целевая ширина 390 → коэффициент пересчёта 1,147.
   Проверка на 360.

   Одно отступление от буквального пересчёта: основной текст
   материалов поднят до 15,5px вместо 14,3px. Аудитория старше 45,
   а сплошной текст статьи читается иначе, чем подпись в макете.
   Заголовки, кнопки и списки оставлены в пропорциях макета.
   ============================================================ */

:root {
  /* Цвет — по частоте в исходнике макета */
  --ink:       #1C1A16;
  --ink-70:    rgba(28, 26, 22, .70);
  --ink-55:    rgba(28, 26, 22, .55);
  --ink-45:    rgba(28, 26, 22, .45);
  --green:     #2E4322;
  --green-dk:  #243619;
  --green-lt:  #3E5633;
  --gold:      #C8A253;
  --gold-ink:  #8A6A24;
  --gold-soft: #E8D6A9;
  --muted:     #8A857B;
  --line:      #D5D0C6;
  --hair:      rgba(0, 0, 0, .09);
  --hair-soft: rgba(0, 0, 0, .06);
  --paper:     #FBFAF6;
  --white:     #FFFFFF;
  --sage:      #EAF0E4;
  --sand:      #F5EDDC;
  --clay:      #EFE9DC;
  --mint:      #EFF3EA;
  --dark:      #16210F;
  --danger:    #A33A2A;

  /* Шрифт */
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Форма */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 16px;
  --r-pill: 26px;
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .05);
  --shadow-md: 0 10px 26px rgba(0, 0, 0, .09);
  --shadow-up: 0 -6px 20px rgba(0, 0, 0, .05);

  /* Сетка */
  --pad: 22px;
  --tab-h: 62px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--paper);
}

body {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

/* Кнопки и навигация ведут себя как в нативном приложении:
   без выделения текста и без задержки двойного тапа */
.btn, .tab, .chip, .row, .seg__btn, .stepper button,
.lang-pill, .lang-row__opt, .cab-code, .cab-exit {
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* Мягкий кроссфейд между экранами — там, где браузер умеет */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: .22s; }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* --- Каркас экрана ---------------------------------------- */

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  position: relative;
}

.scr {
  flex: 1;
  padding-bottom: calc(var(--tab-h) + 26px + env(safe-area-inset-bottom, 0px));
}

.pad { padding-left: var(--pad); padding-right: var(--pad); }

/* --- Верхняя строка --------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 var(--pad);
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(251, 250, 246, .88);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hair-soft);
}

/* Прозрачный вариант шапки: главная, где логотип уже в обложке */
.topbar--flat {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
}

.topbar--flat > * { pointer-events: auto; }

.topbar__back {
  flex: none;
  width: 32px;
  height: 32px;
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.topbar__logo { flex: none; height: 22px; width: auto; }

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar__btn,
.topbar__cart {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.topbar__eyebrow {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.topbar__badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}

.topbar__badge[hidden] { display: none; }

/* --- Типографика ------------------------------------------ */

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.display {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.005em;
  color: var(--ink);
}

.display--xl { font-size: 31px; }
.display--lg { font-size: 27px; line-height: 1.1; }
.display--md { font-size: 22px; line-height: 1.15; }

.lede {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-55);
}

.rule-gold {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--gold), rgba(200, 162, 83, 0) 82%);
}

/* Три слова-опоры */
.pillars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.pillars i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* --- Обложка главной -------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  height: 34vh;
  min-height: 244px;
  max-height: 320px;
  padding: 12px var(--pad) 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(120% 90% at 50% 0%, var(--mint) 0%, var(--paper) 72%);
}

.hero__logo { height: 29px; width: auto; margin-top: 4px; }

.hero__tagline {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-ink);
  text-align: center;
}

.hero__shot {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  width: auto;
  max-width: 100%;
  margin-top: 6px;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .18));
}

.hero__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200, 162, 83, .5);
  animation: ring 4s ease-out infinite;
  pointer-events: none;
}

.hero__ring--a { left: 44px; bottom: 40px; width: 72px; height: 72px; }
.hero__ring--b { left: 28px; bottom: 24px; width: 106px; height: 106px; border-color: rgba(200, 162, 83, .26); animation-delay: .9s; }

@keyframes ring {
  0%   { transform: scale(.75); opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* --- Стартовый экран приложения (экран 2 макета) -----------

   Первое, что видит человек после обложки: знак, обещание, снимок
   продукта, четыре плитки и две кнопки. Шапки нет — знак стоит в
   содержимом, как в макете. «Начать» уводит на список шести
   разделов, плитки — в те же разделы напрямую.
   ---------------------------------------------------------- */

.scr--start { padding-bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom, 0px)); }

.start {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
}

.start__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
}

.start__mark { width: 42px; height: 50px; flex: none; }

.start__word { display: flex; flex-direction: column; align-items: flex-start; }

.start__eyebrow {
  font-family: 'Times New Roman', Times, serif;
  font-size: 9px;
  letter-spacing: .24em;
  color: var(--green-lt);
  padding-left: 2px;
}

.start__name {
  font-family: 'Times New Roman', Times, serif;
  font-size: 38px;
  line-height: .95;
  letter-spacing: .01em;
}

.start__claim {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--green);
  /* В переводе строка разбита переносом — как в макете */
  white-space: pre-line;
}

/* Снимок продукта. Высота отдана остатку экрана, чтобы на низких
   аппаратах ужимался он, а не кнопки: их размер трогать нельзя. */
.start__hero {
  width: 100%;
  max-width: 340px;
  height: auto;
  max-height: min(38vh, 300px);
  object-fit: contain;
  margin: 6px 0 4px;
}

.start__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.start-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  padding: 14px 10px;
  border-radius: var(--r-lg);
  background: var(--mint);
  color: var(--ink);
  text-align: center;
  transition: transform .16s var(--ease), background .16s var(--ease);
}

.start-tile:active { transform: scale(.985); background: var(--sage); }

.start-tile__ico { display: flex; color: var(--green); }
.start-tile__ico svg { width: 28px; height: 28px; }

.start-tile__title {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.start__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}

.start__actions .btn { min-height: 50px; font-size: 16px; }

/* «Начать» в макете — светлая кнопка с зелёной обводкой, не ссылка */
.start__actions .btn--ghost {
  background: var(--paper);
  border-color: rgba(46, 67, 34, .3);
  color: var(--green);
}

.start__actions .btn--ghost:active { background: var(--mint); }

/* Низкие экраны: ужимаем снимок и воздух, кнопки остаются как есть */
@media (max-height: 700px) {
  .start__hero { max-height: 26vh; }
  .start__name { font-size: 32px; }
  .start__mark { width: 36px; height: 43px; }
  .start__claim { margin-top: 8px; font-size: 15px; }
  .start-tile { min-height: 78px; }
}

/* --- Стартовый экран (обложка) -----------------------------

   Обложка воспроизводит макет клиента от 18.08 один в один: фон —
   снимок сцены без надписей, весь текст и иконки живые. Координаты
   макета 2160×3840 переведены в cqw (доли ширины кадра), поэтому
   вся композиция масштабируется вместе с экраном и совпадает с
   макетом на любой ширине. Ничего не досочинено: разметка внутри
   .cover перенесена из макета как есть.
   ---------------------------------------------------------- */

.scr--cover {
  position: relative;
  padding: 0;
  flex: none;
  height: 100svh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #e1e1d8;
}

/* Кадр всегда целиком в экране: страница не прокручивается ни на
   телефоне, ни в окне браузера на компьютере. По умолчанию высота
   кадра ограничена высотой экрана. */
.cover {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  flex: none;
  width: min(100%, calc(100svh * 2160 / 3840));
  width: min(100%, calc(100dvh * 2160 / 3840));
  aspect-ratio: 2160 / 3840;
  background: #e1e1d8;
  font-family: system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: #2b2b26;
}

/* Снимок нарисован на холсте шире кадра: по краям сцена продолжена
   растяжением крайних пикселей. Он свободно выходит за кадр и доходит
   до краёв экрана, поэтому полос вокруг композиции не остаётся. */
.cover__bg {
  display: block;
  max-width: none;   /* общий сброс img ужимал снимок до ширины кадра */
}

/* Сцена — снимок и всё, что стоит на нём. Прижата к верху кадра и
   уменьшена на девять процентов: макет клиента нарисован как плакат
   9:16, и в нём под продуктом остаётся ровно 24% высоты на заголовок,
   две кнопки, ссылку и подпись. На телефоне это кнопки в 22 пикселя.
   Девяти процентов хватает, чтобы кнопки стали нормальными, а сама
   композиция при этом заметно не меняется. */
.cover__scene {
  position: absolute;
  inset: 0;
  transform: scale(.87);
  transform-origin: 50% 0;
}

/* Обрезает по кадру только слой текста и иконок: снимок под ним
   расширен и выходит за кадр намеренно. */
.cover__clip {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

/* Низ обложки: заголовок, кнопки, вход без регистрации, подпись.
   Размеры в долях ширины кадра, а ширина кадра на телефоне равна
   ширине экрана — поэтому 10.8cqw кнопки дают 42–46 пикселей на
   ходовых аппаратах. Сдвиг вправо на 1.4cqw взят из макета: низ там
   выровнен по центру композиции, а не по центру кадра. */
.cover__actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: max(3.6cqw, env(safe-area-inset-bottom, 0px));
  transform: translateX(1.4cqw);
  text-align: center;
}

.cover__title {
  font-size: 4.5cqw;
  line-height: 1.25;
  letter-spacing: .01em;
  color: #2b2b24;
}

.cover__leaf {
  width: 2cqw;
  height: 2cqw;
  margin: 1.4cqw 0 1.8cqw;
}

.cover__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66.5cqw;
  height: 11.8cqw;
  border-radius: 5.9cqw;
  background: #fdfdfb;
  border: 0.16cqw solid rgba(96, 116, 74, .3);
  box-shadow: 0 0.6cqw 1.5cqw rgba(90, 88, 72, .12);
  font-size: 4.35cqw;
  color: #2b3a24;
  transition: transform .16s var(--ease);
}

.cover__btn--go {
  background: linear-gradient(180deg, #41522f, #33421f);
  border-color: transparent;
  box-shadow: 0 0.8cqw 1.8cqw rgba(52, 66, 40, .26);
  color: #fbfaf4;
}

.cover__btn + .cover__btn { margin-top: 2.8cqw; }
.cover__btn:active { transform: scale(.985); }

.cover__guest {
  margin-top: 3.3cqw;
  font-size: 3.8cqw;
  color: #7a6a3f;
}

.cover__guest span {
  text-decoration: underline;
  text-underline-offset: 0.5cqw;
  text-decoration-color: rgba(122, 106, 63, .6);
}

.cover__pillars {
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  margin-top: 2.9cqw;
  font-size: 3.8cqw;
  color: #95793f;
}

.cover__pillars i {
  font-style: normal;
  font-size: 2.6cqw;
  color: #a89258;
}

/* Стеклянные плашки нарисованы в фоне — здесь только области нажатия.
   Их место в кадре: по вертикали 1560–1900 из 3840. */
.cover-hit {
  position: absolute;
  top: 72.2cqw;
  height: 15.7cqw;
  z-index: 2;
  border-radius: 2.4cqw;
  background: transparent;
  transition: background .16s var(--ease);
}

.cover-hit:active { background: rgba(255, 255, 255, .24); }

/* Метка «Готовится» вместо стрелки: подпись раздела при этом
   остаётся видна — она из макета и сама по себе полезна */
.card__soon {
  align-self: flex-start;
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--clay);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
}

/* Библиотека: строка фильтров и закладка на карточке материала —
   оба из макета клиента (экран 7). */
.chips.chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: calc(var(--pad) * -1);
  margin-right: calc(var(--pad) * -1);
  padding: 2px var(--pad);
}

.chips.chips--scroll::-webkit-scrollbar { display: none; }
.chips.chips--scroll .chip { flex: none; }

.chip.chip--on {
  background: var(--green);
  border-color: transparent;
  color: #fff;
}

.source-row { position: relative; display: block; }
.source-row .source { padding-right: 44px; }

.source-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-45);
  transition: background .16s var(--ease), color .16s var(--ease);
}

.source-fav svg { width: 20px; height: 20px; }
.source-fav:active { background: var(--sage); }
.source-fav.is-on { background: var(--sage); color: var(--green); }

/* --- Список строк (главный навигационный узор) ------------- */

.rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--white);
  padding: 14px 16px;
  min-height: 62px;
  transition: background .16s var(--ease);
}

.row:active { background: var(--mint); }

.row__ico {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.row__ico--sage { background: var(--sage); }
.row__ico--sand { background: var(--sand); color: var(--gold-ink); }
.row__ico--clay { background: var(--clay); color: var(--gold-ink); }

.row__body { display: block; flex: 1; min-width: 0; }

.row__title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

.row__sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-45);
}

.row__go { flex: none; color: var(--gold); }

.row__num {
  flex: none;
  width: 22px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
}

/* --- Строка AI -------------------------------------------- */

.ai-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: var(--r-pill);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}

.ai-bar__dot {
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
}

.ai-bar__text {
  display: block;
  flex: 1;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-45);
}

.ai-bar__tag {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gold-ink);
}

/* --- Кнопки ----------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 25px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.005em;
  text-align: center;
  transition: transform .16s var(--ease), background .16s var(--ease);
}

.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn--primary { background: var(--green); color: #fff; }
.btn--primary:active { background: var(--green-dk); }
.btn--gold { background: var(--gold); color: var(--dark); }
.btn--ghost { background: var(--white); border: 1px solid rgba(0, 0, 0, .12); color: var(--ink); }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn--primary { flex: 1; }

.link-gold {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold-soft);
}

/* --- Фишки направлений ------------------------------------ */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transition: background .16s var(--ease), border-color .16s var(--ease);
}

.chip:active, .chip[aria-current="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* --- Карточки --------------------------------------------- */

.card {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: 16px;
}

.card--flat { box-shadow: none; }
.card--pad0 { padding: 0; overflow: hidden; }

.tint-sage { background: var(--sage); }
.tint-sand { background: var(--sand); }
.tint-clay { background: var(--clay); }

/* --- Материал --------------------------------------------- */

.article { font-size: 15.5px; line-height: 1.68; color: var(--ink-70); }
.article p { margin: 0 0 16px; }
.article p:last-child { margin-bottom: 0; }

.article .lead {
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
}

/* Буквица — как на экране 05 макета */
.article .lead::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 52px;
  line-height: .82;
  font-weight: 600;
  margin: 4px 8px 0 0;
  color: var(--green);
}

.note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-45);
}

/* --- Деньги ----------------------------------------------- */

.money {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.money--lg { font-size: 30px; line-height: 1; }
.money--md { font-size: 21px; line-height: 1; }
.money--gold { color: var(--gold-ink); }

.money__alt {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-45);
  white-space: nowrap;
}

/* Лари всегда справочно, отделяем от основной цены */
.money__alt::before { content: "· "; }

.price-note {
  font-size: 12px;
  color: var(--ink-45);
}

/* --- Счётчик количества ----------------------------------- */

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px;
}

.stepper button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.stepper button:active { background: var(--mint); }
.stepper button[disabled] { color: var(--line); pointer-events: none; }

.stepper output {
  min-width: 30px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --- Формы ------------------------------------------------ */

.field { display: block; margin-bottom: 12px; }

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-55);
}

.field__label span { color: var(--gold-ink); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 16px;   /* меньше 16px — iOS приближает экран при фокусе */
  transition: border-color .16s var(--ease);
}

.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green);
  outline: none;
}
.field.is-bad input, .field.is-bad select { border-color: var(--danger); }

.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* --- Способы оплаты --------------------------------------- */

.pay { display: flex; flex-direction: column; gap: 9px; }

.pay__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
}

.pay__opt input { position: absolute; opacity: 0; pointer-events: none; }

.pay__mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay__opt:has(input:checked) { border-color: var(--green); background: var(--mint); }
.pay__opt:has(input:checked) .pay__mark { border-color: var(--green); }
.pay__opt:has(input:checked) .pay__mark::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.pay__name { font-size: 14.5px; font-weight: 700; }
.pay__note { font-size: 12px; color: var(--ink-45); margin-top: 1px; }

/* --- Итоговые суммы --------------------------------------- */

.sums { display: flex; flex-direction: column; gap: 9px; }

.sums__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-55);
}

.sums__row b { font-weight: 700; color: var(--ink); }

.sums__row--total {
  padding-top: 11px;
  border-top: 1px solid var(--hair);
  font-size: 15px;
  color: var(--ink);
}

/* --- Пустое состояние и ошибки ---------------------------- */

.empty {
  text-align: center;
  padding: 46px 10px;
}

.empty__ico {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.empty__title { font-family: var(--display); font-size: 23px; font-weight: 600; }
.empty__text { margin: 8px auto 20px; max-width: 260px; font-size: 13.5px; color: var(--ink-55); }

/* --- Скелетон --------------------------------------------- */

.sk {
  background: linear-gradient(90deg, rgba(0,0,0,.045) 25%, rgba(0,0,0,.075) 37%, rgba(0,0,0,.045) 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  border-radius: var(--r-sm);
}

@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* --- Нижняя навигация ------------------------------------- */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  border-top: 1px solid var(--hair-soft);
  box-shadow: var(--shadow-up);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 3px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.tab__ico { color: var(--line); transition: color .16s var(--ease); }
.tab[aria-current="page"] { color: var(--green); }
.tab[aria-current="page"] .tab__ico { color: var(--green); }

.tab--ai .tab__ico {
  width: 30px;
  height: 30px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab--ai { color: var(--gold-ink); font-weight: 700; }
.tab--ai[aria-current="page"] { color: var(--gold-ink); }

/* --- Нижняя панель действия (корзина, товар) -------------- */

.actionbar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--pad);
  background: rgba(251, 250, 246, .96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--hair-soft);
}

.actionbar .btn { flex: 1; }

/* --- Подсказка установки ---------------------------------- */

.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(22, 33, 15, .48);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s var(--ease), visibility .26s;
}

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px var(--pad) calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -14px 44px rgba(22, 33, 15, .3);
  transform: translateY(102%);
  transition: transform .32s var(--ease);
}

body.sheet-open .sheet-scrim { opacity: 1; visibility: visible; }
body.sheet-open .sheet { transform: translateY(0); }

.sheet__grip {
  width: 40px; height: 4px;
  margin: 0 auto 16px;
  border-radius: 2px;
  background: var(--line);
}

.steps { display: flex; flex-direction: column; gap: 11px; margin: 16px 0 20px; }

.step { display: flex; align-items: center; gap: 12px; font-size: 14px; }

.step i {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Всплывающее сообщение -------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + 76px);
  transform: translate(-50%, 14px);
  z-index: 80;
  padding: 12px 18px;
  border-radius: 22px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}

.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Ссылка-действие внутри сообщения: «Добавлено в корзину → Перейти».
   Отделена чертой, чтобы читалась как действие, а не часть текста. */
.toast__go {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .38);
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* --- Появление -------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.rise { animation: rise .5s var(--ease) backwards; animation-delay: var(--d, 0s); }

/* --- 360px ------------------------------------------------ */

@media (max-width: 374px) {
  :root { --pad: 17px; }
  .display--xl { font-size: 28px; }
  .display--lg { font-size: 25px; }
  .row { padding: 13px 14px; gap: 11px; }
  .row__title { font-size: 14px; }
  .chip { font-size: 12.5px; padding: 9px 12px; }
  .money--lg { font-size: 27px; }
  .btn { font-size: 14px; padding: 12px 15px; }
  .tab { font-size: 10.5px; }
  .article { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .sk, .hero__ring, .cover-scene__img--in { animation: none; }
  .sheet, .sheet-scrim, .toast, .btn, .row { transition: none; }
  .btn:active { transform: none; }
}

/* --- Фигура тела на экране «Здоровье» --------------------- */

.body-map {
  position: relative;
  height: 258px;
  margin: 18px 0 20px;
}

.body-map__fig {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  fill: #DDE3D6;
}

.body-map__tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  /* 152px: «Пищеварительная» должна помещаться в одну строку,
     иначе overflow-wrap: anywhere рвёт слово посередине */
  max-width: 152px;
  padding: 7px 11px;
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  animation: rise .5s var(--ease) backwards;
  animation-delay: var(--d, 0s);
}

.body-map__tag span { min-width: 0; overflow-wrap: anywhere; }

.body-map__tag i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.body-map__tag--left { left: 0; }
.body-map__tag--right { right: 0; }
.body-map__tag--left i { order: 2; }
.body-map__tag:active { background: var(--mint); }

/* --- Хлебные крошки --------------------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--ink-45);
}

.crumbs span { color: var(--gold); }
.crumbs b { color: var(--ink); font-weight: 700; }

/* --- Одиночная строка вне группы -------------------------- */

.row--solo {
  margin-top: 12px;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
}

/* --- Четыре перехода внизу материала ---------------------- */

.quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
}

.quad .btn { min-height: 46px; padding: 11px 12px; font-size: 13.5px; }

/* --- Карточка контекста AI (макет 05) --------------------- */

.ai-card {
  margin-top: 22px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--dark);
  color: #F1EFE7;
}

.ai-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
}

.ai-card__dot {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ai-chip {
  padding: 8px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #F1EFE7;
  font-size: 12.5px;
  font-weight: 600;
}

.ai-chip--gold { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.ai-chip:active { opacity: .8; }

/* --- Карточка товара в каталоге --------------------------- */

.prod {
  display: block;
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 14px;
}

.prod__shot {
  display: block;
  padding: 18px 0 10px;
  text-align: center;
  background: linear-gradient(180deg, var(--sage), var(--white));
}

.prod__shot img {
  display: inline-block;
  width: 54%;
  max-width: 190px;
  height: auto;
}

.prod__body { display: block; padding: 16px; }

.prod__price {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 10px;
}

.prod__hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gold-ink);
  font-weight: 600;
}

/* --- Экран товара ----------------------------------------- */

.shot {
  padding: 16px 0 6px;
  text-align: center;
  background: linear-gradient(180deg, var(--sage), var(--paper));
}

.shot img {
  display: inline-block;
  width: 58%;
  max-width: 230px;
  height: auto;
}

.spec {
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.spec__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  background: var(--white);
  font-size: 13.5px;
  color: var(--ink-70);
}

.spec__row + .spec__row { border-top: 1px solid var(--hair); }
.spec__row b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.spec__row:last-child { background: var(--sage); }

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.qty-row__label { font-size: 14px; font-weight: 700; }

.promo {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  padding: 14px 15px;
  border-radius: var(--r-md);
  background: var(--sand);
  font-size: 14px;
}

.promo__dot {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 1px;
}

.promo b { font-weight: 800; }
.promo s { color: var(--ink-45); }

.promo__note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--gold-ink);
  font-weight: 600;
}

/* --- Строки корзины --------------------------------------- */

.lines {
  margin-top: 16px;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}

.line {
  display: flex;
  gap: 12px;
  padding: 14px 15px;
}

.line + .line { border-top: 1px solid var(--hair); }

.line__shot {
  flex: none;
  width: 56px;
  height: 66px;
  border-radius: var(--r-sm);
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.line__shot img { width: 74%; height: auto; }

.line__body { flex: 1; min-width: 0; }

.line__name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.line__price {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-45);
}

.line__right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.line__del {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-45);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Экран результата оплаты ------------------------------ */

.result { text-align: center; padding: 34px 0 4px; }

.result__ico {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.result__ico svg { width: 30px; height: 30px; }

/* --- Кабинет ---------------------------------------------- */

.cab-hero { text-align: center; padding: 26px 0 4px; }

.cab-hero__ico {
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cab-hero__ico svg { width: 30px; height: 30px; }

.cab-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 17px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, #3E5633, var(--green));
  color: #F1EFE7;
}

.cab-card__ava {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(232, 214, 169, .16);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cab-card__letter {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

/* --- Строка выбора языка ---------------------------------- */

.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 13px 16px;
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
}

.lang-row__label { font-size: 14px; font-weight: 700; }

.lang-row__opts { display: flex; gap: 6px; }

.lang-row__opt {
  padding: 8px 14px;
  border-radius: 17px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-55);
  transition: background .16s var(--ease), color .16s var(--ease);
}

.lang-row__opt[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.cab-card__who { display: block; min-width: 0; }

.cab-card__name {
  display: block;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.1;
}

.cab-card__status {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

.cab-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 15px 16px;
  border-radius: var(--r-lg);
  background: var(--sand);
  text-align: left;
}

.cab-code__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--gold-ink);
}

.cab-code__value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
}

.cab-code:active { background: var(--clay); }

/* --- Переключатель «Вход / Регистрация» ------------------- */

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 18px;
  padding: 3px;
  background: var(--sage);
  border-radius: 22px;
}

.seg__btn {
  padding: 11px 10px;
  border-radius: 19px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-55);
  transition: background .16s var(--ease), color .16s var(--ease);
}

.seg__btn[aria-pressed="true"] {
  background: var(--white);
  color: var(--green);
  box-shadow: var(--shadow-sm);
}

/* --- Поле пароля ------------------------------------------ */

.pass { position: relative; display: block; }
.pass input { padding-right: 48px; }

.pass__eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.field__hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-45);
}

/* --- Выход ------------------------------------------------ */

.cab-exit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 26px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.cab-exit:active { background: var(--sage); }

/* --- Доказательства: лента первоисточников (экран 07) ------ */

.timeline {
  position: relative;
  margin-top: 18px;
  padding-left: 18px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(200, 162, 83, .55);
}

.source {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 10px;
}

.source::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.source--muted::before { background: rgba(200, 162, 83, .45); }

.source__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.source__tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.source__year { font-size: 12px; font-weight: 800; color: var(--ink); }

.source__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17.5px;
  line-height: 1.25;
  color: var(--ink);
}

.source__meta { margin-top: 6px; font-size: 11px; color: var(--ink-45); }

.source__badges { display: flex; gap: 6px; margin-top: 8px; }

.minichip {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--green);
  background: var(--sage);
  border-radius: 6px;
  padding: 4px 7px;
}

a.source:active { background: var(--mint); }

/* --- Документ 1820: цитата и переключатель (экран 08) ------ */

.seg--doc { margin-top: 12px; margin-bottom: 4px; }

.doc-quote {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: var(--sand);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.doc-quote .eyebrow { display: block; margin-bottom: 6px; }

/* --- Оригинал документа: тёмный экран (09) ----------------- */

body.page--dark { background: var(--ink); }
.page--dark .scr { background: var(--ink); }

.page--dark .topbar {
  background: var(--ink);
  border-bottom-color: rgba(255, 255, 255, .1);
}

.page--dark .topbar__back,
.page--dark .topbar__btn,
.page--dark .topbar__eyebrow { color: rgba(255, 255, 255, .85); }

.page--dark .seg { background: rgba(255, 255, 255, .12); }
.page--dark .seg__btn { color: rgba(255, 255, 255, .6); }
.page--dark .seg__btn[aria-pressed="true"] { background: var(--white); color: var(--ink); }

.page--dark .note,
.page--dark .fax__caption { color: rgba(255, 255, 255, .55); }

.page--dark .tabbar {
  background: #12110E;
  border-top-color: rgba(255, 255, 255, .08);
}
.page--dark .tab { color: rgba(255, 255, 255, .5); }
.page--dark .tab[aria-current="page"] { color: var(--gold); }
.page--dark .tab--ai .tab__ico { background: var(--white); color: var(--ink); }

.fax {
  position: relative;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #EFEDE7;
}

.fax img { display: block; width: 100%; height: auto; }

.fax__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #3C2E06;
  background: rgba(200, 162, 83, .92);
  border-radius: 5px;
  padding: 4px 8px;
}

.fax__caption { margin-top: 10px; font-size: 11.5px; line-height: 1.5; }

.doc-page { font-size: 10.5px; font-weight: 600; color: var(--ink-45); }
.page--dark .doc-page { color: rgba(255, 255, 255, .55); }

/* --- Экран AI-консультанта (каркас 06) --------------------- */

.ai-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--hair);
}

.ai-head__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  flex: none;
}

.ai-head__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.ai-head__ctx { margin-top: 2px; font-size: 11px; color: var(--ink-45); }

.ai-acts {
  margin-top: 14px;
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
}

.ai-act {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.ai-act + .ai-act { border-top: 1px solid var(--hair); }

.ai-act__n {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-ink);
  width: 18px;
  flex: none;
}

.ai-act__go { margin-left: auto; color: var(--gold); display: flex; }
.ai-act:active { background: var(--mint); }
.ai-act__sub { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--ink-45); }

.ai-ask {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 13px 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  color: var(--ink-45);
  text-align: left;
}

.ai-ask:active { background: var(--mint); }

.ai-ask__send {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  flex: none;
}

/* --- Диалог AI-консультанта (экран 06) --------------------
   Реплики намеренно не «пузырьки мессенджера»: приложение
   медицинско-научное, разговор должен читаться как ответ
   специалиста, а не как переписка. Своя реплика — золотой
   штрих слева, ответ — карточка на бумаге. */

.ai-dialog { margin-top: 14px; }
.ai-dialog:empty { display: none; }

.ai-msg { margin-top: 12px; font-size: 14px; line-height: 1.55; }

.ai-msg--me {
  padding-left: 12px;
  border-left: 2px solid var(--gold);
  color: var(--ink-70);
}

.ai-msg--ai {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
}

.ai-msg--wait { color: var(--ink-45); font-style: italic; }
.ai-msg--error { color: var(--ink-70); }
.ai-msg--error .link-gold { display: inline-block; margin-top: 8px; }
.ai-msg__clarify { margin-top: 8px; color: var(--ink-70); }
.ai-msg--ai .ai-card__chips { margin-top: 11px; }

/* Чипы подсказок нарисованы для тёмной карточки статьи; в диалоге
   подложка светлая, поэтому здесь у них своя раскраска. */
.ai-msg--ai .ai-chip {
  background: var(--sand);
  border-color: var(--gold-soft);
  color: var(--gold-ink);
}

.ai-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 6px 6px 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.ai-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  padding: 9px 0;
}

.ai-form input::placeholder { color: var(--ink-45); }
.ai-form input:focus { outline: none; }

.ai-form__send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.ai-form__send:active { opacity: .85; }

/* Партнёрская ссылка под кодом: та же карточка, но адрес длинный —
   поэтому мельче и с переносом по любому символу. */
.cab-link {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: 14px;
}

.cab-link__value {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--gold-ink);
  overflow-wrap: anywhere;
}

.cab-link:active { background: var(--mint); }

/* Готовые наборы на карточке товара — те же плитки-чипы, но с
   суммой второй строкой при тесноте (5 плиток на 360 px) */
.chip--set { gap: 6px; }
.chip--set b { font-weight: 800; }

/* --- Научная энциклопедия (13–14) -------------------------

   Оглавление структуры сайта: три раздела, внутри — страницы, а у
   направлений Раздела II ещё и темы. Строка ведёт на lugela.pro,
   поэтому выглядит как переход, а не как статья приложения. */

.enc-stat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 16px 0 4px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
}

.enc-stat__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 11px 6px;
  background: var(--white);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.enc-stat__cell b {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--green);
}

.enc-sec { margin-top: 22px; }

.enc-sec__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

/* Римская цифра раздела — единственное, что осталось от «полки
   томов» из макета: сама полка вела в разделы, которых на сайте нет */
.enc-sec__roman {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sage);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
}

.enc-sec__names { flex: 1; min-width: 0; }

.enc-sec__title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

.enc-sec__sub {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ink-45);
}

.enc-sec__count {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-ink);
}

.enc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
}

.enc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--white);
  text-align: left;
}

a.enc-item:active { background: var(--mint); }

/* Строка без адреса остаётся в оглавлении, но не притворяется
   ссылкой — приглушена и не нажимается */
span.enc-item { opacity: .55; }

.enc-item__body { flex: 1; min-width: 0; }

.enc-item__title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--ink);
}

.enc-item__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.enc-item__go {
  flex: none;
  font-size: 17px;
  line-height: 1;
  color: var(--gold);
}

@media (max-width: 360px) {
  .enc-stat__cell b { font-size: 20px; }
  .enc-item__title { font-size: 13px; }
}

/* --- Разделы главной (макет клиента 17.08) -----------------

   Шесть карточек: крупная зелёная иконка без подложки, название и
   пояснение в две строки. Отличается от .row тем, что карточки стоят
   отдельно друг от друга, а не слитным списком. */

.section-head {
  position: relative;
  padding-top: 6px;
  padding-bottom: 14px;
}

.section-head__title {
  /* Справа лежит ветка или иконка органа — заголовок под них не лезет */
  padding-right: 76px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--green);
  text-wrap: pretty;
}

.section-head__lede {
  margin-top: 6px;
  max-width: 62%;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-70);
}

/* Ветка в правом верхнем углу — как в макете. Рисуется фоном, чтобы
   не тащить ещё один файл ради украшения. */
.section-head__sprig {
  position: absolute;
  top: 4px;
  right: calc(var(--pad) - 14px);
  width: 96px;
  height: 78px;
  pointer-events: none;
  opacity: .5;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' fill='none' stroke='%232E4322' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M14 92C34 78 58 60 78 38 88 27 96 17 102 8'/%3E%3Cpath d='M92 20c-8-2-16 1-20 8-2 4-2 9 0 13 5-1 10-4 13-8 3-4 5-9 7-13z' fill='%23EAF0E4'/%3E%3Cpath d='M74 40c-9-1-17 3-20 10-2 4-1 9 1 13 5-2 9-6 12-10 3-4 5-9 7-13z' fill='%23EAF0E4'/%3E%3Cpath d='M56 60c-9 0-17 4-20 11-2 4-1 9 1 12 5-2 9-5 12-10 3-4 5-9 7-13z' fill='%23EAF0E4'/%3E%3Cpath d='M100 34c6-6 9-14 8-22-7 1-14 6-17 13-2 4-2 8-1 12 4-1 7-2 10-3z' fill='%23EAF0E4'/%3E%3C/svg%3E");
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--hair-soft);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform .16s var(--ease), background .16s var(--ease);
}

.card:active { transform: scale(.99); background: var(--mint); }

.card__ico {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--green);
}

.card__ico svg { width: 30px; height: 30px; }

.card__body { flex: 1; min-width: 0; }

.card__title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
}

.card__sub {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-55);
}

.card__go {
  flex: none;
  display: flex;
  align-items: center;
  color: var(--gold);
}

@media (max-width: 360px) {
  .section-head__title { font-size: 23px; }
  .section-head__lede { font-size: 13.5px; max-width: 66%; }
  .card { padding: 13px 14px; gap: 12px; }
  .card__ico { width: 34px; height: 34px; }
  .card__ico svg { width: 26px; height: 26px; }
  .card__title { font-size: 15px; }
  .card__sub { font-size: 12.5px; }
}

/* --- Научная библиотека и Инструкция (макет 17.08) ---------- */

.lib-sec { margin-top: 22px; }

.lib-sec__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.lib-sec__ico {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--green);
}

.lib-sec__ico svg { width: 26px; height: 26px; }

.lib-sec__names { flex: 1; min-width: 0; }

.lib-sec__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
}

.lib-sec__sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-45);
}

.lib-sec__count {
  flex: none;
  min-width: 26px;
  text-align: right;
  font-size: 17px;
  font-weight: 700;
  color: var(--green);
}

/* Ноль не красим в цвет действия: раздел пока пуст, и это честно */
.lib-sec__count--none { color: var(--line); }

.lib-sec__empty {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  font-size: 12.5px;
  color: var(--ink-45);
}

/* Дозировка: сумма крупно, кому и как — под ней */
.doses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  overflow: hidden;
}

.dose {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 13px 8px;
  background: var(--white);
  text-align: center;
}

.dose__amount {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  color: var(--green);
}

.dose__who {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.dose__note {
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--ink-45);
}

.steps { display: flex; flex-direction: column; gap: 1px; background: var(--hair);
         border: 1px solid var(--hair); border-radius: var(--r-md); overflow: hidden; }

.step {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  background: var(--white);
}

.step__num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sage);
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}

.step__body { flex: 1; min-width: 0; }

.step__title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.step__text {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-70);
}

/* Предупреждение над дозировками — заметнее обычной сноски */
.note-box {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--sand);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-70);
}

.bullets {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-70);
}

.bullets li { margin-bottom: 6px; }

/* --- Списки направлений и заболеваний (макет 17.08) --------- */

.section-head__count {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-45);
}

/* Иконка органа в шапке направления — на месте картинки из макета */
.section-head__organ {
  position: absolute;
  top: 2px;
  right: var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: var(--green);
  opacity: .9;
}

.section-head__organ svg { width: 46px; height: 46px; }

/* Строка списка: круглая иконка, название, шеврон */
.lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--hair-soft);
  text-align: left;
}

a.line:active { background: var(--mint); }

/* Раздел без материалов остаётся в списке, но не нажимается */
.line--soon { opacity: .5; }

.line__ico {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.line__ico svg { width: 20px; height: 20px; }

.line__body { flex: 1; min-width: 0; }

.line__title {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}

.line__body .line__title { display: block; flex: none; }

.line__sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-45);
}

.line__count {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}

.line__soon {
  flex: none;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-45);
}

.line__go { flex: none; display: flex; color: var(--gold); }

/* Поиск по списку — как в макете */
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 12px;
  padding: 0 14px;
  height: 46px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--hair);
}

.search__ico { flex: none; display: flex; color: var(--ink-45); }
.search__ico svg { width: 19px; height: 19px; }

.search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
}

.search__input::placeholder { color: var(--ink-45); }

.section-head + .search { margin-top: 4px; }

/* Пояснение внизу экрана — серая плашка со значком из макета */
.info-box {
  position: relative;
  margin-top: 18px;
  padding: 12px 14px 12px 40px;
  border-radius: var(--r-md);
  background: var(--clay);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-70);
}

.info-box::before {
  content: 'i';
  position: absolute;
  left: 13px;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--ink-45);
  font-family: var(--display);
  font-size: 12px;
  color: var(--ink-70);
}

.alert-box {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--sand);
  border-left: 3px solid var(--gold);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-70);
}

/* Сетка фактов: симптомы, подходы к лечению */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 9px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--hair-soft);
  text-align: center;
}

.fact__title {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.fact__text {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-45);
}

.support {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 18px;
  padding: 14px 15px;
  border-radius: var(--r-lg);
  background: var(--sage);
}

.support__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.support__text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-70);
}

.card--tight { padding: 13px 15px; }
.card--tight .card__ico { width: 34px; height: 34px; }
.card--tight .card__ico svg { width: 26px; height: 26px; }
.card--soon { opacity: .5; }

@media (max-width: 360px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .line__title { font-size: 13.5px; }
  .section-head__organ { width: 48px; height: 48px; }
  .section-head__organ svg { width: 38px; height: 38px; }
}
