/* =========================================================
   MFORN — дизайн-система 2026
   Один файл вместо шести. Старые style.css / style-add.css /
   style-home.css / style-mobile.css / catalog.css / product.css
   больше не подключаются.

   Мобильная адаптация живёт рядом с компонентом, а не отдельным
   файлом на 34 КБ — поэтому «поправил десктоп, сломал мобилу»
   больше не случается.
   ========================================================= */

/* ---------- ТОКЕНЫ ---------- */
:root {
  --paper:      #F2F1EE;   /* фон страницы — тёплый светлый */
  --paper-2:    #E9E7E2;   /* подложка под фото */
  --ink:        #121211;   /* основной текст */
  --ink-2:      #4A4845;   /* вторичный текст */
  --muted:      #8C8983;   /* подписи */
  --line:       #DAD7D1;   /* линии */
  --dark:       #171614;   /* тёмные секции и футер */
  --stock-ok:   #2F6B45;
  --stock-low:  #9A6B1F;
  --stock-none: #A09D97;

  --font: 'Inter Tight', 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;

  --page:   1360px;
  --gutter: clamp(1.15rem, 4vw, 3rem);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: 'ss01', 'cv11';
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

.container { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- ТИПОГРАФИКА ---------- */
.eyebrow {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.08; }

.h-page  { font-size: clamp(2rem, 5vw, 3.4rem); text-transform: uppercase; }
.h-block { font-size: clamp(1.5rem, 3.2vw, 2.2rem); text-transform: uppercase; }

/* ---------- ШАПКА ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 241, 238, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--page); margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.nav__brand {
  grid-column: 2;
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  justify-self: center;
}
.nav__links { display: flex; gap: clamp(.9rem, 1.6vw, 1.75rem); align-items: center; }
/* Пункты меню НЕ переносим: при переносе «Каталог» превращается
   в «КАТАЛ/ОГ», и шапка выглядит набором полос. Если места мало —
   сжимаем интервалы, а на узких экранах меню уходит под бургер. */
.nav__links a { white-space: nowrap; }
/* «Личный кабинет» в списке нужен только на мобиле — на десктопе он
   уже есть справа, дублировать незачем. */
.nav__links-account { display: none; }
.nav__links a {
  font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 500;
  padding: .35rem 0; border-bottom: 1px solid transparent;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { border-color: var(--ink); }
.nav__actions { justify-self: end; display: flex; gap: 1.25rem; align-items: center; }
.nav__actions a { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .35rem; position: relative; }
.nav__actions a:hover { opacity: .65; }

/* На десктопе — словами, на мобиле — значками. Текст «Кабинет» и «Корзина»
   рядом не помещаются на узком экране и наезжают на логотип. */
.nav__icon { display: none; width: 22px; height: 22px; fill: none;
  stroke: currentColor; stroke-width: 1.5; stroke-linecap: round;
  stroke-linejoin: round; }
.nav__count {
  display: inline-block; min-width: 1.1rem; text-align: center;
  font-size: .68rem; font-variant-numeric: tabular-nums;
}
.nav__count:empty, .nav__count[data-empty="1"] { display: none; }

.nav__burger { display: none; }

@media (max-width: 860px) {
  /* Три колонки: бургер — марка — корзина.
     «Кабинет» с мобильной шапки убран и живёт в меню: вместе с корзиной
     два текстовых пункта не помещались и наезжали на логотип. */
  .nav__inner {
    grid-template-columns: 44px 1fr auto;
    height: 56px;
    gap: .5rem;
  }
  .nav__brand { font-size: 1rem; letter-spacing: .14em; }
  .nav__actions { gap: .75rem; }
  .nav__actions a { font-size: .7rem; letter-spacing: .08em; white-space: nowrap; }
  /* Ссылка на кабинет — только в раскрытом меню */
  .nav__actions .nav__account { display: none; }
  /* Кнопка 44×44 — минимум, в который уверенно попадают пальцем.
     ТРИ полоски, а не две: две читаются как случайные линии, а не как
     меню — именно на это и пожаловались. Три — привычный знак, который
     узнают без объяснений. */
  .nav__burger {
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-left: -10px;
    position: relative;
  }
  .nav__burger span {
    position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink);
    border-radius: 2px;
    transition: transform .28s var(--ease), opacity .18s;
  }
  .nav__burger span:nth-child(1) { top: 15px; }
  .nav__burger span:nth-child(2) { top: 21px; }
  .nav__burger span:nth-child(3) { top: 27px; }
  /* Открыто — превращается в крестик: верхняя и нижняя сходятся, средняя гаснет */
  .nav[data-open="1"] .nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav[data-open="1"] .nav__burger span:nth-child(2) { opacity: 0; }
  .nav[data-open="1"] .nav__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* Кабинет остаётся в шапке, но значком — так помещаются оба пункта */
  .nav__actions .nav__account { display: inline-flex; }
  .nav__label { display: none; }
  .nav__icon  { display: block; }
  .nav__actions { gap: 1.1rem; }
  .nav__cart .nav__count {
    position: absolute; top: -6px; right: -8px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--ink); color: var(--paper);
    border-radius: 999px; font-size: .6rem; line-height: 16px;
    text-align: center;
  }

  .nav__brand { grid-column: 2; }
  .nav__links {
    position: fixed; inset: 56px 0 auto; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem;

    /* ЗАКРЫТОЕ МЕНЮ ДОЛЖНО ИСЧЕЗАТЬ ПОЛНОСТЬЮ.
       Раньше стоял только сдвиг translateY(-120%). Меню высотой 182px
       уезжало на 218px вверх от отметки 56px — и нижние 20 пикселей
       оставались на экране. Фон шапки полупрозрачный, поэтому этот край
       просвечивал сквозь неё двумя полосками над логотипом.
       Сдвиг оставляем ради плавности, но видимость гасим явно —
       тогда не важно, какой высоты меню окажется. */
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s linear .3s;
  }
  .nav[data-open="1"] .nav__links {
    transform: none;
    visibility: visible;
    transition: transform .3s var(--ease), visibility 0s;
  }
  /* Ссылка занимает всю строку меню.
     Раньше она оставалась строчной, и подчёркивание тянулось только
     по ширине слова — получались обрывки разной длины, похожие
     на случайные полоски. */
  .nav__links li { display: block; }
  .nav__links a {
    display: block; width: 100%;
    padding: .95rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .82rem;
  }
  .nav__links li:last-child a { border-bottom: 0; }
  .nav__links a:hover { border-color: var(--line); }
  .nav__links-account { display: block; }
  .nav__links-account a { font-weight: 600; }
}

/* ---------- ЗАЩИТА ОТ ВЫЛЕЗАНИЯ ЗА КРАЙ ----------
   Одна широкая картинка или длинное слово тянут всю страницу вбок,
   и появляется горизонтальная прокрутка. Ищется такое тяжело, поэтому
   перекрываем сразу все обычные источники. */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas, iframe { max-width: 100%; }

/* Длинные адреса и артикулы переносим, а не растягиваем страницу */
p, li, h1, h2, h3, dd, dt, .card__title, .product__title,
.line__title, .legal__body { overflow-wrap: anywhere; }

/* Широкое содержимое — таблицы и блоки кода — прокручивается внутри себя */
.legal__body table, .sizechart table, pre { display: block; overflow-x: auto; max-width: 100%; }

/* Поля ввода не должны выходить за контейнер вместе со своими отступами */
input, textarea, select { max-width: 100%; }

/* ---------- КАРТОЧКА ТОВАРА В СЕТКЕ ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem) clamp(.75rem, 1.6vw, 1.4rem);
}

.card { display: block; position: relative; }

.card__media {
  position: relative;
  aspect-ratio: 4 / 5;               /* один кроп на весь каталог */
  background: var(--paper-2);
  overflow: hidden;
}
.card__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.card__media img + img { opacity: 0; }          /* второй кадр — на ховер */
@media (hover: hover) {
  .card:hover .card__media img       { opacity: 0; }
  .card:hover .card__media img + img { opacity: 1; }
  .card:hover .card__media img       { transform: scale(1.02); }
}

.card__badge {
  position: absolute; left: 0; top: 0; z-index: 2;
  background: var(--ink); color: var(--paper);
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .4rem .6rem; font-weight: 500;
}
.card__badge--low  { background: var(--stock-low); }
.card__badge--none { background: var(--stock-none); }

.card__info { padding-top: .85rem; display: flex; flex-direction: column; gap: .3rem; }
.card__title { font-size: .95rem; font-weight: 500; letter-spacing: -.01em; }
.card__meta  { font-size: .75rem; color: var(--muted); }

.card__price { display: flex; align-items: baseline; gap: .5rem; font-size: .95rem; }
.card__price s { color: var(--muted); font-size: .82rem; text-decoration-thickness: 1px; }

.card__colors { display: flex; gap: .3rem; padding-top: .15rem; }
.card__dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .18);
}
.card__more { font-size: .7rem; color: var(--muted); align-self: center; }

/* ---------- СТРАНИЦА ТОВАРА ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(3rem, 7vw, 6rem);
  align-items: start;
}
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Галерея: на десктопе колонка кадров, на мобиле — свайп */
.gallery { display: flex; flex-direction: column; gap: .5rem; }
.gallery figure { aspect-ratio: 4 / 5; background: var(--paper-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .gallery {
    flex-direction: row;
    gap: .35rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery figure { flex: 0 0 86%; scroll-snap-align: center; }
}

.panel { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 1.6rem; }
@media (max-width: 900px) { .panel { position: static; } }

.crumbs { font-size: .72rem; color: var(--muted); display: flex; gap: .4rem; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }

.product__head { display: flex; flex-direction: column; gap: .5rem; }
.product__title { font-size: clamp(1.5rem, 3vw, 2.1rem); text-transform: uppercase; }
.product__sku { font-size: .72rem; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }

.product__price { display: flex; align-items: baseline; gap: .65rem; font-size: 1.35rem; font-weight: 500; }
.product__price s { font-size: .95rem; color: var(--muted); font-weight: 400; }

.product__text { color: var(--ink-2); font-size: .92rem; line-height: 1.65; white-space: pre-line; }

/* Блок выбора */
.option { display: flex; flex-direction: column; gap: .6rem; }
.option__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.option__label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.option__value { color: var(--ink); }
.option__link {
  font-size: .72rem; text-decoration: underline; text-underline-offset: 3px;
  color: var(--ink-2);
}

.swatches { display: flex; flex-wrap: wrap; gap: .15rem; }
/* Кружок цвета рисуем 30px, но зону нажатия расширяем полем до 44px —
   иначе на телефоне выбор цвета превращается в целование экрана.
   Отрицательный отступ по краям, чтобы ряд визуально не разъезжался. */
.swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .16);
  position: relative; transition: transform .2s var(--ease);
  background-clip: padding-box;
  box-sizing: content-box;
  margin: 7px;
}
.swatches { margin: -7px; }
.swatch::before {
  content: ''; position: absolute; inset: -7px;    /* невидимая зона 44×44 */
}
.swatch[aria-pressed="true"] { transform: scale(1.04); }
.swatch[aria-pressed="true"]::after {
  content: ''; position: absolute; inset: -4px;
  border: 1px solid var(--ink); border-radius: 50%;
}

/* Выбор номинала сертификата — кнопки с суммами вместо кружков цвета */
.denoms { display: flex; flex-wrap: wrap; gap: .5rem; }
.denom {
  padding: .85rem 1.15rem;
  border: 1px solid var(--line); background: transparent;
  font-size: .92rem; font-weight: 500; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: border-color .18s, background .18s, color .18s;
}
.denom:hover { border-color: var(--ink); }
.denom[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.sizes { display: flex; flex-wrap: wrap; gap: .4rem; }
.size {
  min-width: 52px; padding: .6rem .35rem;
  border: 1px solid var(--line); background: transparent;
  font-size: .85rem; text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color .18s, background .18s;
}
.size:hover:not(:disabled) { border-color: var(--ink); }
.size[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.size:disabled {
  color: var(--stock-none); border-style: dashed; cursor: not-allowed;
  text-decoration: line-through; text-decoration-thickness: 1px;
}
/* Под заказ — размер доступен, но приедет позже. Пунктир без зачёркивания. */
.size[data-state="order"]:not(:disabled),
.size[data-state="soon"]:not(:disabled) { border-style: dashed; }
.size[data-state="order"]:not(:disabled)::after,
.size[data-state="soon"]:not(:disabled)::after {
  content: ''; position: absolute; top: 4px; right: 4px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--stock-low);
}
.size { position: relative; }
.size[aria-pressed="true"]::after { background: var(--paper); }
.size small { display: block; font-size: .6rem; color: var(--muted); letter-spacing: .06em; }
.size[aria-pressed="true"] small { color: rgba(242, 241, 238, .6); }

.stock-note { font-size: .78rem; display: flex; align-items: center; gap: .4rem; }
.stock-note[data-level="ok"]    { color: var(--stock-ok); }
.stock-note[data-level="low"]   { color: var(--stock-low); }
.stock-note[data-level="order"] { color: var(--stock-low); }
.stock-note[data-level="none"]  { color: var(--stock-none); }
.stock-note[data-level="unknown"] { color: var(--muted); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 1rem 1.5rem;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  border: 1px solid var(--ink);
  transition: background .2s, color .2s, opacity .2s;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn--done { background: var(--stock-ok); border-color: var(--stock-ok); color: #fff; }

.actions { display: flex; flex-direction: column; gap: .6rem; }

/* Характеристики */
.specs { border-top: 1px solid var(--line); }
.spec {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
  font-size: .85rem;
}
.spec dt { color: var(--muted); }

/* Гарантии */
.assur { display: grid; gap: .9rem; font-size: .82rem; color: var(--ink-2); }
.assur strong { display: block; color: var(--ink); font-weight: 500; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: .15rem; }

/* Липкая панель покупки на мобиле */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; gap: .75rem; align-items: center;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(242, 241, 238, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.buybar__price { font-size: 1rem; font-weight: 500; white-space: nowrap; }
.buybar .btn { flex: 1; padding: .85rem 1rem; }
@media (max-width: 900px) {
  .buybar { display: flex; }
  body.has-buybar { padding-bottom: 4.5rem; }
}

/* ---------- ТАБЛИЦА РАЗМЕРОВ ---------- */
dialog.sizechart {
  border: 0; padding: 0; max-width: 640px; width: calc(100% - 2rem);
  background: var(--paper); color: var(--ink);
}
dialog.sizechart::backdrop { background: rgba(18, 18, 17, .55); }
.sizechart__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line);
}
.sizechart__body { padding: 1.25rem; overflow-x: auto; }
.sizechart table { width: 100%; border-collapse: collapse; font-size: .85rem;
  font-variant-numeric: tabular-nums; }
.sizechart th, .sizechart td { padding: .55rem .4rem; text-align: center;
  border-bottom: 1px solid var(--line); }
.sizechart th { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; }
.sizechart td:first-child { font-weight: 600; }
.sizechart__note { padding: 0 1.25rem 1.25rem; font-size: .78rem; color: var(--muted); }

/* ---------- КАТАЛОГ ---------- */
.cat-head {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(1.25rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: .6rem;
}
.cat-head p { color: var(--ink-2); max-width: 54ch; font-size: .92rem; }

.filters {
  display: flex; gap: .4rem; flex-wrap: wrap;
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.chip {
  padding: .5rem .9rem; border: 1px solid var(--line);
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 999px; transition: border-color .18s, background .18s, color .18s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.count { font-size: .78rem; color: var(--muted); margin-bottom: 1.25rem; }

.empty { grid-column: 1/-1; padding: 4rem 0; text-align: center; color: var(--muted); }

/* ---------- ГЛАВНАЯ ---------- */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end;
  background: var(--paper-2); overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Вертикальные отступы задаём отдельным свойством, а НЕ сокращённым
   padding: X 0 — иначе оно затирает боковые отступы .container,
   и заголовок баннера прилипает к краю экрана. */
.hero__inner { position: relative; z-index: 2; width: 100%;
  padding-top: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 6vw, 5rem); }
.hero__title { font-size: clamp(2.2rem, 7vw, 5rem); text-transform: uppercase; line-height: .96; }
.hero__sub { margin: 1rem 0 1.75rem; max-width: 42ch; color: var(--ink-2); }
.hero__cta { display: flex; gap: .6rem; flex-wrap: wrap; }

/* Только вертикальные отступы. Сокращённая запись «padding: X 0» здесь
   недопустима: класс .section вешается на тот же элемент, что и .container,
   и обнуляет его боковые отступы — заголовки прилипают к краю экрана.
   Та же ошибка была в баннере. */
.section {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.section__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.section__link { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: .15rem; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.tile strong { display: block; font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: .4rem; }
.tile p { font-size: .88rem; color: var(--ink-2); }

/* ---------- ПОДВАЛ ---------- */
.footer { background: var(--dark); color: var(--paper); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  margin-top: clamp(2rem, 5vw, 4rem); }
/* ВНИМАНИЕ: не писать сюда `1.6fr repeat(auto-fit, ...)`.
   auto-fit нельзя ставить рядом с обычной fr-колонкой — браузер признаёт
   всё правило невалидным и молча роняет сетку в одну колонку. Подвал
   от этого вытягивался на 844 пикселя. Только явные брейкпоинты. */
.footer__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 2.5rem 2rem;
  align-items: start;
}
@media (max-width: 1000px) { .footer__grid { grid-template-columns: 1fr 1fr 1fr; } }

/* На узких экранах блок бренда занимает всю ширину, а списки ссылок
   встают в две колонки. Если пустить всё в один столбик, подвал
   растягивается почти на 900 пикселей — это целый лишний экран прокрутки. */
@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.5rem; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .footer__note { max-width: none; }
}
.footer h5 { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: .9rem; color: rgba(242, 241, 238, .55); font-weight: 500; }
.footer li { margin-bottom: .5rem; }
.footer a { font-size: .82rem; color: rgba(242, 241, 238, .85); }
.footer a:hover { color: var(--paper); }
.footer__brand { font-size: 1.1rem; font-weight: 700; letter-spacing: .18em; }
.footer__note { font-size: .8rem; color: rgba(242, 241, 238, .6); max-width: 34ch;
  margin-top: .75rem; line-height: 1.55; }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(242, 241, 238, .14);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .74rem; color: rgba(242, 241, 238, .55); }

/* ---------- ЗАСТАВКА ---------- */
/* Логотип «прошивается» строчкой, как изделие в цеху, потом полотно
   расходится и открывает сайт. Показывается один раз за визит.

   ГЛАВНОЕ ПРАВИЛО: заставка обязана уйти САМА, без участия скрипта.
   Она лежит поверх всей страницы и ловит клики — если бы её убирал
   только JS, любая ошибка в скрипте намертво запирала бы сайт за
   тёмным экраном с логотипом. Поэтому весь цикл — на CSS-анимациях,
   а скрипт лишь ускоряет уход и убирает узел из разметки. */

.intro {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  /* Кликом можно пропустить, пока заставка видна */
  pointer-events: auto;
  /* Страховка: в 2.6 с гасим независимо ни от чего */
  animation: intro-dismiss 1ms linear 2.6s forwards;
}
/* Гасим именно так, а не display:none — display прервал бы анимацию
   расхождения полотна на середине. */
@keyframes intro-dismiss {
  to { visibility: hidden; pointer-events: none; }
}
/* Второй заход в этом же визите — заставки нет вовсе, без проблеска.
   Класс ставит встроенный скрипт в <head>, до отрисовки. */
.no-intro .intro { display: none; }
.intro__half {
  position: absolute; left: 0; right: 0; height: 50%;
  background: var(--dark);
  transition: transform .75s cubic-bezier(.76, 0, .24, 1);
  will-change: transform;
}
.intro__half--top    { top: 0; }
.intro__half--bottom { bottom: 0; }

.intro__mark {
  position: relative; z-index: 2;
  width: min(320px, 62vw);
  overflow: visible;
}
.intro__mark text {
  font-family: var(--font);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: .22em;
  fill: none;
  stroke: var(--paper);
  stroke-width: .9;
  /* Буквы «прошиваются» контуром слева направо */
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: intro-stitch 1.15s cubic-bezier(.45, 0, .15, 1) forwards;
}
.intro__mark .fill {
  fill: var(--paper);
  opacity: 0;
  animation: intro-fill .5s ease-out .95s forwards;
}
/* Строчка-иголка, что ведёт под логотипом */
.intro__seam {
  stroke: var(--paper); stroke-width: 1.2; opacity: .55;
  stroke-dasharray: 4 6;
  stroke-dashoffset: 240;
  animation: intro-seam 1.25s linear forwards;
}
.intro__tag {
  position: absolute; z-index: 2;
  bottom: calc(50% - 82px);
  font-size: .62rem; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(242, 241, 238, .5);
  opacity: 0;
  animation: intro-fill .55s ease-out 1.15s forwards;
}

@keyframes intro-stitch { to { stroke-dashoffset: 0; } }
@keyframes intro-fill   { to { opacity: 1; } }
@keyframes intro-seam   { to { stroke-dashoffset: 0; } }

/* Расход полотна */
.intro[data-open="1"] .intro__half--top    { transform: translateY(-101%); }
.intro[data-open="1"] .intro__half--bottom { transform: translateY(101%); }
.intro[data-open="1"] .intro__mark,
.intro[data-open="1"] .intro__tag { opacity: 0; transition: opacity .3s; }
.intro[data-done="1"] { display: none; }

/* Полотно расходится само на 1.85 с — ровно после того, как логотип
   дошился (1.15 с) и его дали рассмотреть. Скрипт может увести раньше
   через data-open, но если скрипта нет — уедет всё равно. */
.intro__half--top    { animation: intro-lift-up   .75s cubic-bezier(.76,0,.24,1) 1.85s forwards; }
.intro__half--bottom { animation: intro-lift-down .75s cubic-bezier(.76,0,.24,1) 1.85s forwards; }
@keyframes intro-lift-up   { to { transform: translateY(-101%); } }
@keyframes intro-lift-down { to { transform: translateY(101%); } }

/* Пока заставка на экране — страница не скроллится.
   Класс снимает скрипт; если его нет, срабатывает правило ниже. */
body.intro-lock { overflow: hidden; }
/* Без JS блокировку скролла не ставим вовсе — иначе она осталась бы навсегда */
html.no-js body.intro-lock { overflow: auto; }

/* ---------- ЛУКБУК ---------- */
.lookbook { padding-bottom: clamp(3rem, 7vw, 6rem); }
.lookbook__soon { padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; }

.lb-block { margin-bottom: clamp(3rem, 7vw, 6rem); }
.lb-head { margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
  display: flex; flex-direction: column; gap: .5rem; }
.lb-head p { color: var(--ink-2); font-size: .92rem; max-width: 56ch; }

/* Широкий — один кадр во всю ширину, кинематографичный кроп */
.lb-wide figure { aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.lb-wide figure + figure { margin-top: .5rem; }
.lb-wide img { width: 100%; height: 100%; object-fit: cover; }

/* Сетка — много мелких, портретный кроп */
.lb-grid { display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lb-grid figure { aspect-ratio: 4 / 5; background: var(--paper-2); overflow: hidden; }
.lb-grid img { width: 100%; height: 100%; object-fit: cover; }

/* Пара — два кадра рядом, на мобиле друг под другом */
.lb-pair { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; }
.lb-pair figure { aspect-ratio: 3 / 4; background: var(--paper-2); overflow: hidden; }
.lb-pair img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) {
  .lb-pair { grid-template-columns: 1fr; }
  .lb-wide figure { aspect-ratio: 4 / 3; }
}

/* ---------- КОРЗИНА И ОФОРМЛЕНИЕ ---------- */
.cart, .checkout { padding-bottom: clamp(3rem, 7vw, 6rem); }

.cart__layout, .checkout__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) {
  .cart__layout, .checkout__layout { grid-template-columns: 1fr; }
}

.cart__empty, .checkout__done { padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; }

/* Строка товара */
.line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto auto auto;
  gap: 1rem; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.line:first-child { border-top: 1px solid var(--line); }
.line__pic { aspect-ratio: 4/5; background: var(--paper-2); overflow: hidden; }
.line__pic img { width: 100%; height: 100%; object-fit: cover; }
.line__info { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.line__title { font-size: .95rem; font-weight: 500; }
.line__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.line__meta { font-size: .8rem; color: var(--muted); }
.line__tag {
  align-self: flex-start; font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--stock-low);
  border: 1px solid var(--stock-low); padding: .15rem .4rem;
}
.line__qty {
  display: flex; align-items: center; gap: .1rem;
  border: 1px solid var(--line);
}
.line__qty button { width: 32px; height: 34px; font-size: 1rem; line-height: 1; }
.line__qty button:hover { background: var(--paper-2); }
.line__qty span { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums;
  font-size: .9rem; }
.line__price { font-size: .95rem; font-weight: 500; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.line__remove { color: var(--muted); font-size: .9rem; padding: .35rem; }
.line__remove:hover { color: var(--ink); }

@media (max-width: 600px) {
  .line {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas: 'pic info remove' 'pic qty price';
    row-gap: .6rem;
  }
  .line__pic    { grid-area: pic; }
  .line__info   { grid-area: info; }
  .line__remove { grid-area: remove; align-self: start; }
  .line__qty    { grid-area: qty; justify-self: start; }
  .line__price  { grid-area: price; justify-self: end; }
}

/* Итоги */
.summary {
  border: 1px solid var(--line); background: #fff;
  padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem;
}
.summary--sticky { position: sticky; top: 88px; }
@media (max-width: 860px) { .summary--sticky { position: static; } }

.summary__items { display: flex; flex-direction: column; gap: .4rem;
  padding-bottom: .9rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line); }
.summary__item { display: flex; justify-content: space-between; gap: 1rem;
  font-size: .82rem; color: var(--ink-2); }
.summary__item span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

.summary__row { display: flex; justify-content: space-between; gap: 1rem;
  font-size: .88rem; color: var(--ink-2); }
.summary__row span:last-child { font-variant-numeric: tabular-nums; color: var(--ink); }
.summary__hint { font-size: .76rem; color: var(--stock-low); }
.summary__total {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: .8rem; margin-top: .3rem; border-top: 1px solid var(--line);
  font-size: 1.1rem; font-weight: 600;
}
.summary__total span:last-child { font-variant-numeric: tabular-nums; }
.summary .btn { margin-top: .6rem; }
.summary__back { text-align: center; font-size: .8rem; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; }
.summary__note { font-size: .74rem; color: var(--muted); line-height: 1.5; }
.summary__error {
  font-size: .84rem; color: #9a2b25;
  background: #fdf0ef; border-left: 2px solid #9a2b25; padding: .6rem .75rem;
}

/* Форма */
.field-group { border: 0; padding: 0 0 1.75rem; margin: 0 0 1.75rem;
  border-bottom: 1px solid var(--line); }
.field-group:last-child { border-bottom: 0; }
.field-group legend { padding: 0 0 1rem; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--wide { grid-column: 1 / -1; }
.field > span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); }
.field input, .field textarea, .mn-row input {
  font: inherit; font-size: .95rem; padding: .8rem .9rem;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--ink); outline-offset: -1px;
}
.field textarea { resize: vertical; }
.field__hint { font-size: .78rem; color: var(--muted); }

.mn-row { display: flex; gap: .5rem; }
.mn-row .btn { padding: .8rem 1rem; white-space: nowrap; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  margin-bottom: 1rem; }
@media (max-width: 600px) { .choices { grid-template-columns: 1fr; } }
.choice {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .9rem 1rem; border: 1px solid var(--line); cursor: pointer;
  transition: border-color .18s, background .18s;
}
.choice:hover { border-color: var(--ink); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--paper-2); }
.choice__title { font-size: .9rem; font-weight: 500; }
.choice__meta { font-size: .78rem; color: var(--muted); }

.checkbox { display: flex; gap: .6rem; align-items: flex-start;
  font-size: .85rem; color: var(--ink-2); line-height: 1.5; cursor: pointer; }
.checkbox input { margin-top: .25rem; flex: 0 0 auto; width: 16px; height: 16px;
  accent-color: var(--ink); }
.checkbox a { border-bottom: 1px solid var(--line); }
.checkbox a:hover { border-color: var(--ink); }

/* ---------- ТЕКСТОВЫЕ СТРАНИЦЫ ---------- */
.legal { max-width: 76ch; padding-bottom: clamp(3rem, 7vw, 6rem); }
.legal__head { padding: clamp(2rem, 5vw, 4rem) 0 clamp(1.25rem, 3vw, 2rem); }
.legal__head .h-page { margin-top: .5rem; }
.legal__meta { margin-top: .9rem; font-size: .82rem; color: var(--muted); }

.legal__body { font-size: .95rem; line-height: 1.7; color: var(--ink-2); }
.legal__body h2 {
  font-size: 1.05rem; color: var(--ink); text-transform: none;
  letter-spacing: -.01em; margin: 2.25rem 0 .75rem;
  padding-top: 1.25rem; border-top: 1px solid var(--line);
}
.legal__body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.legal__body h3 { font-size: .95rem; color: var(--ink); margin: 1.5rem 0 .5rem; }
.legal__body p { margin-bottom: .9rem; }
.legal__body ul, .legal__body ol { margin: 0 0 1rem 1.1rem; }
.legal__body ul li { list-style: none; position: relative; padding-left: 1rem;
  margin-bottom: .45rem; }
.legal__body ul li::before { content: ''; position: absolute; left: 0; top: .65em;
  width: 4px; height: 4px; background: var(--muted); }
.legal__body ol { list-style: decimal; }
.legal__body ol li { margin-bottom: .45rem; padding-left: .25rem; }
.legal__body strong { color: var(--ink); font-weight: 600; }
.legal__body a { border-bottom: 1px solid var(--line); }
.legal__body a:hover { border-color: var(--ink); }
.legal__body table { width: 100%; border-collapse: collapse; margin: 1rem 0;
  font-size: .88rem; }
.legal__body th, .legal__body td { padding: .6rem .5rem; text-align: left;
  border-bottom: 1px solid var(--line); }

/* Проза на странице «О бренде» */
.prose { max-width: 68ch; }
.prose p { font-size: .98rem; line-height: 1.7; color: var(--ink-2);
  margin-bottom: 1rem; }
.prose .h-block { margin-bottom: 1.25rem; }
.section--dark { background: var(--dark); color: var(--paper);
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.prose--invert p { color: rgba(242, 241, 238, .78); }
.prose--invert .h-block { color: var(--paper); }

.hero--about { min-height: min(56vh, 520px); }

.stats { display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line); }
.stat-item { background: var(--paper); padding: 1.5rem 1.25rem; }
.stat-num { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600; letter-spacing: -.02em; }
.stat-cap { display: block; margin-top: .35rem; font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- ЛИЧНЫЙ КАБИНЕТ ---------- */
.account { padding-bottom: clamp(3rem, 7vw, 6rem); }
.account__enter { display: flex; flex-direction: column; gap: .75rem;
  align-items: flex-start; margin-bottom: 2.5rem; }
.account__hint { font-size: .82rem; color: var(--muted); }

.account__fallback, .account__email {
  border-top: 1px solid var(--line); padding-top: 1.25rem;
  margin-top: .5rem; width: 100%; max-width: 460px;
}
.account__ways { display: flex; flex-direction: column; gap: .5rem;
  margin-top: .5rem; font-size: .85rem; color: var(--ink-2); }
.account__ways code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .82rem; background: #fff; border: 1px solid var(--line);
  padding: .15rem .4rem;
}
.account__email .option__label { display: block; margin-bottom: .3rem; }
.account__email-form { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.account__email-form input {
  flex: 1; min-width: 180px; font: inherit; font-size: .88rem;
  padding: .75rem .85rem; border: 1px solid var(--line); background: #fff;
}
.account__email-form input:focus { outline: none; border-color: var(--ink); }
.account__email-form .btn { padding: .75rem 1.1rem; white-space: nowrap; }

.account__perks { display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-top: 2rem; border-top: 1px solid var(--line); }
.account__perks strong { display: block; font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: .4rem; }
.account__perks p { font-size: .88rem; color: var(--ink-2); }

.account__stats { display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--line); margin-bottom: 2rem; }
.stat { background: var(--paper); padding: 1.25rem; }
.stat__label { display: block; font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.stat__value { font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.account__ref { display: flex; flex-direction: column; gap: .5rem; }
.account__ref-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.account__ref-row input {
  flex: 1; min-width: 220px; font: inherit; font-size: .88rem;
  padding: .8rem .9rem; border: 1px solid var(--line); background: #fff;
}
.account__ref-row .btn { padding: .8rem 1.1rem; white-space: nowrap; }

.order { border: 1px solid var(--line); padding: 1.1rem 1.25rem; margin-bottom: .75rem;
  background: #fff; }
.order__head { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap;
  margin-bottom: .6rem; }
.order__id { font-weight: 600; font-size: .92rem; }
.order__date { font-size: .78rem; color: var(--muted); }
.order__status { margin-left: auto; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .25rem .6rem; border: 1px solid var(--line); }
.order__status[data-s="paid"]    { color: var(--stock-ok); border-color: var(--stock-ok); }
.order__status[data-s="pending"] { color: var(--stock-low); border-color: var(--stock-low); }
.order__items { display: flex; flex-direction: column; gap: .2rem;
  font-size: .85rem; color: var(--ink-2); margin-bottom: .75rem; }
.order__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.order__foot .btn { padding: .6rem 1rem; margin-left: auto; }

/* ---------- БЛОК ПРО БОТА ---------- */
.botcta {
  background: var(--dark); color: var(--paper);
  padding: clamp(1.75rem, 4vw, 3.25rem);
}
.botcta__text { max-width: 62ch; display: flex; flex-direction: column; gap: 1rem; }
.botcta .eyebrow { color: rgba(242, 241, 238, .5); }
.botcta h2 { color: var(--paper); }
.botcta p { color: rgba(242, 241, 238, .78); font-size: .92rem; }
.botcta__list { display: flex; flex-direction: column; gap: .6rem; margin: .25rem 0 .5rem; }
.botcta__list li {
  font-size: .9rem; color: rgba(242, 241, 238, .78);
  padding-left: 1.1rem; position: relative; line-height: 1.5;
}
.botcta__list li::before {
  content: ''; position: absolute; left: 0; top: .6em;
  width: 5px; height: 5px; background: var(--paper); opacity: .6;
}
.botcta__list strong { color: var(--paper); font-weight: 500; }
.botcta .btn--primary {
  background: var(--paper); color: var(--dark); border-color: var(--paper);
  align-self: flex-start;
}
.botcta .btn--primary:hover { background: transparent; color: var(--paper); }
.botcta__note { font-size: .78rem !important; color: rgba(242, 241, 238, .45) !important; }

.botcta--compact {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; flex-wrap: wrap;
  padding: 1.1rem 1.25rem;
}
.botcta--compact strong { display: block; font-size: .88rem; margin-bottom: .2rem; }
.botcta--compact p { font-size: .82rem; margin: 0; }
.botcta--compact .btn {
  border-color: rgba(242, 241, 238, .45); color: var(--paper);
  padding: .7rem 1.1rem; white-space: nowrap;
}
.botcta--compact .btn:hover { background: var(--paper); color: var(--dark); }

/* ---------- КОНСУЛЬТАНТ ЛУИЗА ---------- */
.chat { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 45; }
@media (max-width: 900px) { .chat { right: 1rem; bottom: 5.25rem; } }

/* КРИТИЧНО: display у .chat__panel перебивает атрибут hidden, поэтому
   правило ниже обязательно. Без него окно висит открытым и не закрывается —
   ровно так и было в первой версии. */
.chat__panel[hidden] { display: none; }

/* Свёрнутая кнопка — пульсирующий кружок.
   Подпись с именем выезжает при наведении, чтобы в покое ничто
   не спорило с товаром на странице. */
.chat__toggle {
  display: flex; align-items: center; gap: 0;
  background: transparent; border: 0; padding: 0;
}
.chat[data-open="1"] .chat__toggle { opacity: 0; pointer-events: none; }

.chat__orb {
  position: relative; display: grid; place-items: center;
  width: 56px; height: 56px; flex: 0 0 56px;
}
.chat__core {
  position: relative; z-index: 2;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--dark); color: var(--paper);
  box-shadow: 0 10px 28px rgba(18, 18, 17, .3);
  transition: transform .3s var(--ease);
  overflow: hidden;
}
.chat__toggle:hover .chat__core { transform: scale(1.06); }

.chat__face { width: 34px; height: 34px; display: block; }
.chat__avatar .chat__face { width: 26px; height: 26px; }

/* Два кольца расходятся волнами — «на связи», без навязчивости */
.chat__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--dark);
  opacity: 0;
  animation: chat-pulse 2.8s cubic-bezier(.2, .6, .3, 1) infinite;
}
.chat__ring:nth-child(2) { animation-delay: 1.4s; }

@keyframes chat-pulse {
  0%   { transform: scale(.85); opacity: .45; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.chat__label {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-size: .82rem; font-weight: 500; color: var(--ink);
  transition: max-width .32s var(--ease), padding .32s var(--ease);
}
@media (hover: hover) {
  .chat__toggle:hover .chat__label,
  .chat__toggle:focus-visible .chat__label { max-width: 120px; padding: 0 .85rem 0 .5rem; }
  .chat__toggle:hover, .chat__toggle:focus-visible {
    background: var(--paper); border-radius: 999px;
    box-shadow: 0 8px 30px rgba(18, 18, 17, .14);
  }
}

.chat__avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); color: var(--dark);
  font-size: .9rem; font-weight: 600;
}
.chat__avatar--lg { width: 38px; height: 38px; flex-basis: 38px; }

/* Уважаем настройку «меньше движения» — кольца не пульсируют */
@media (prefers-reduced-motion: reduce) {
  .chat__ring { animation: none; opacity: .3; }
}

/* Панель */
.chat__panel {
  position: absolute; right: 0; bottom: 0;
  width: min(370px, calc(100vw - 2rem));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(18, 18, 17, .24);
  display: flex; flex-direction: column;
  animation: chat-in .32s var(--ease);
  transform-origin: bottom right;
}
@keyframes chat-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.chat__head {
  display: flex; align-items: center; gap: .7rem;
  padding: .85rem 1rem;
  background: var(--dark); color: var(--paper);
}
.chat__who { display: flex; flex-direction: column; line-height: 1.25; }
.chat__who strong { font-size: .92rem; font-weight: 600; }
.chat__status { display: flex; align-items: center; gap: .35rem;
  font-size: .68rem; color: rgba(242, 241, 238, .6); }
.chat__status i { width: 6px; height: 6px; border-radius: 50%; background: var(--stock-ok); }
.chat__head .chat__avatar { background: var(--paper); color: var(--dark); }
.chat__close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: rgba(242, 241, 238, .75);
  transition: background .2s, color .2s;
}
.chat__close:hover { background: rgba(242, 241, 238, .12); color: var(--paper); }

.chat__log {
  height: min(52vh, 360px); overflow-y: auto;
  padding: 1rem; display: flex; flex-direction: column; gap: .5rem;
  background: #fbfaf8;
}
.chat__msg {
  font-size: .87rem; line-height: 1.5; padding: .65rem .85rem;
  max-width: 86%; white-space: pre-wrap; border-radius: 14px;
}
.chat__msg--bot {
  background: #fff; border: 1px solid var(--line);
  align-self: flex-start; border-bottom-left-radius: 5px;
}
.chat__msg--user {
  background: var(--ink); color: var(--paper);
  align-self: flex-end; border-bottom-right-radius: 5px;
}

/* Три точки, пока Луиза думает */
.chat__msg--typing { display: flex; gap: 4px; padding: .8rem .85rem; }
.chat__msg--typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: chat-dot 1.1s infinite ease-in-out;
}
.chat__msg--typing i:nth-child(2) { animation-delay: .16s; }
.chat__msg--typing i:nth-child(3) { animation-delay: .32s; }
@keyframes chat-dot {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

.chat__chips { display: flex; gap: .35rem; flex-wrap: wrap; padding: 0 .8rem .6rem; background: #fbfaf8; }
.chat__chips button {
  font-size: .74rem; padding: .4rem .7rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  transition: border-color .18s, color .18s;
}
.chat__chips button:hover { border-color: var(--ink); color: var(--ink); }

.chat__form { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid var(--line); }
.chat__form input {
  flex: 1; font: inherit; font-size: .88rem; padding: .7rem .85rem;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
}
.chat__form input:focus { outline: none; border-color: var(--ink); }
.chat__send {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
}
.chat__send:hover { opacity: .85; }
.chat__note { padding: 0 1rem .8rem; font-size: .68rem; color: var(--muted); }

/* ---------- ПОДПИСЬ СТУДИИ ---------- */
.footer__studio {
  display: flex; align-items: center; gap: .45rem;
  font-size: .74rem; color: rgba(242, 241, 238, .55);
}
.footer__studio a {
  color: rgba(242, 241, 238, .8);
  border-bottom: 1px solid rgba(242, 241, 238, .3);
  padding-bottom: 1px; font-size: .74rem;
}
.footer__studio a:hover { color: var(--paper); border-color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  /* Заставку в этом режиме не показываем вовсе */
  .intro { display: none; }
}
