/* Вариант B «Ч/Б», круг 2. Чёрно-белый минимализм, всё по центру, цвет только в кружках цветов.
   Секции простые и независимые (hero / about / catalog / foot) — их можно переносить в Тильду
   по одной (Zero Block / T123). Зависимостей нет. */

@font-face { font-family: "PT Root UI"; src: url("../shared/fonts/PTRootUI-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PT Root UI"; src: url("../shared/fonts/PTRootUI-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PT Root UI"; src: url("../shared/fonts/PTRootUI-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --mute: #6b6b6b;
  --line: #0a0a0a;
  --hair: #dcdcdc;
  --plate: #ececec;
  --gut: 16px;
  --vh: 100vh;   /* высота фонового слоя: самая большая высота экрана, чтобы снизу не было щели */
  --svh: 100vh;  /* высота первого экрана: видимая часть при открытой адресной строке */
  --t: .2s;
}
@supports (height: 100lvh) { :root { --vh: 100lvh; --svh: 100svh; } }
@media (min-width: 760px) { :root { --gut: 32px; } }

* { box-sizing: border-box; }
/* iOS: двойной тап по кнопкам (+, размеры, цвета…) не должен увеличивать страницу; щипок остаётся.
   В полноэкранном фото touch-action: none (свой зум) — у дочерних элементов он сильнее. */
html, button, a, label, input, .dot, .ob__size, .ob__qb, .ob__go { touch-action: manipulation; }
/* поле с кеглем < 16px iOS увеличивает при фокусе */
input, select, textarea { font-size: 16px; }
html { -webkit-text-size-adjust: 100%; }
html.locked { overflow: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.45 "PT Root UI", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-align: center;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { -webkit-appearance: none; appearance: none; font: inherit; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 8px; }

/* ---------- Корзина сверху (единственный элемент шапки) ---------- */
.cartbtn {
  position: fixed; z-index: 30; top: calc(12px + env(safe-area-inset-top)); right: 12px;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--line);
}
.cartbtn__count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--ink); color: var(--paper); border: 1px solid var(--paper);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.cartbtn__count[data-empty="true"] { display: none; }

/* ---------- Фото с индикатором загрузки ----------
   .ph — серая плашка с подписью «Загружаем фото» (без анимации).
   Внутри: .lo (маленькое, уже в кеше или лёгкое) и .hi (большое, показывается по onload). */
.ph { position: absolute; inset: 0; overflow: hidden; background: var(--plate); }
.ph::before {
  content: "Загружаем фото"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #9a9a9a;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .hi { opacity: 0; }
.ph .hi.is-ready { opacity: 1; }
.ph.is-error::before { content: "Фото не загрузилось"; }

/* ---------- Sticky-сцена ---------- */
.stage { position: relative; }
.stage__bg { position: sticky; top: 0; height: var(--vh); overflow: hidden; background: var(--ink); z-index: 0; }
/* hero-v3: белое худи на ~53% ширины — держим его по центру экрана */
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
/* без z-index: так текст первого экрана может смешиваться с фото (вариант 3) */
.stage__over { position: relative; margin-top: calc(-1 * var(--vh)); }

/* ---------- Первый экран: общее ---------- */
.hero {
  position: relative; height: var(--svh); min-height: 520px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: calc(76px + env(safe-area-inset-top)) var(--gut) calc(40px + env(safe-area-inset-bottom));
  color: #fff;
}
.hero__title { margin: 0; font-weight: 700; text-transform: uppercase; line-height: .9; }
.hero__merch { font-weight: 400; }
.hero__name { white-space: nowrap; }
.hero__slogan { margin: 0; font-weight: 700; text-transform: uppercase; line-height: .95; letter-spacing: -.01em; }
.hero__slogan span { display: block; }
.hero__slogan .hero__dash { display: inline; }   /* тире всегда в строке со словами */

/* Вариант «1» (адрес ?hero=2) — «Во весь экран».
   Фото чуть крупнее и прижато к верху (высота 125%) — над головами больше неба.
   Наверху, на небе над головами: «ЖИВИ ЯРКО / ОСТАВЬ СЛЕД» в две строки, тем же кеглем и жирностью, что «ВЕЧНО МОЛОДОЙ».
   Внизу «М Е Р Ч / ВЕЧНО МОЛОДОЙ» на тёмной полосе: там белое худи, белый текст по нему не читается,
   поэтому фото плавно уходит в чёрную полосу, а надпись стоит уже на ней. */
[data-hero="1"] .stage__img { height: 125%; object-position: 55% 0; }
[data-hero="1"] .hero {
  justify-content: space-between; padding: calc(64px + env(safe-area-inset-top)) 0 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.5) 0, rgba(0,0,0,.25) 22%, rgba(0,0,0,0) 38%);
}
[data-hero="1"] .hero__slogan {
  order: 1; padding: 0 var(--gut); font-size: min(calc((100vw - 2 * var(--gut)) * .1213), 110px); line-height: .95; letter-spacing: -.02em;
  text-shadow: 0 1px 14px rgba(0,0,0,.45);
}
[data-hero="1"] .hero__slogan > span { display: block; }
[data-hero="1"] .hero__slogan .hero__dash { display: none; }
[data-hero="1"] .hero__title {
  order: 2; align-self: stretch; display: flex; flex-direction: column; align-items: center;
  padding: 64px var(--gut) calc(30px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(10,10,10,0) 0, rgba(10,10,10,.85) 34px, #0a0a0a 64px);
}
[data-hero="1"] .hero__merch { font-size: min(6vw, 30px); font-weight: 400; letter-spacing: .5em; margin-right: -.5em; line-height: 1; }
[data-hero="1"] .hero__name { display: block; margin-top: 12px; font-size: min(calc((100vw - 2 * var(--gut)) * .1213), 110px); letter-spacing: -.02em; line-height: .9; }

/* Вариант 2 — «Кадр целиком»: на телефоне снимок квадратом, видно всех троих.
   Небо и лица чистые, весь текст идёт по берегу внизу кадра: слоган, под ним строка-лого. */
[data-hero="2"] .hero { justify-content: flex-end; gap: 12px; background: linear-gradient(to bottom, rgba(0,0,0,0) 45%, rgba(0,0,0,.62) 100%); }
[data-hero="2"] .hero__title { order: 2; font-size: min(5.6vw, 52px); letter-spacing: .02em; }
/* слоган без тире, одной строкой во всю ширину, посередине кадра — на уровне лиц/плеч; «ВЕЧНО МОЛОДОЙ» внизу как было */
[data-hero="2"] .hero__slogan {
  position: absolute; left: var(--gut); right: var(--gut); top: 50%; transform: translateY(-50%);
  font-size: min(calc((100vw - 2 * var(--gut)) * .0806), 64px); white-space: nowrap; letter-spacing: -.01em;
  text-shadow: 0 1px 12px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.35);
}
[data-hero="2"] .hero__slogan span { display: inline; }
[data-hero="2"] .hero__slogan .hero__dash { display: none; }
@media (max-aspect-ratio: 1/1) {
  [data-hero="2"] .stage__img { inset: auto 0 auto 0; top: 0; height: 100vw; object-position: 57% 50%; }
  [data-hero="2"] .hero { height: 100vw; min-height: 0; padding-bottom: 20px; }
}

/* Вариант 3 — «Буквы по фото», круг 2 (новое фото Игоря hero-v2).
   Сверху одним блоком по центру: тонкое разреженное МЕРЧ и под ним ВЕЧНО МОЛОДОЙ в одну строку — пара-лого.
   Читаемость на светлом небе: мягкое затемнение верха кадра + тень у букв; белые буквы остаются «на фото».
   Внизу — слоган разрядкой. */
[data-hero="3"] .stage__img, [data-hero="7"] .stage__img, [data-hero="9"] .stage__img { object-position: 55% 50%; }
[data-hero="3"] .hero, [data-hero="7"] .hero, [data-hero="9"] .hero {
  padding-top: calc(78px + env(safe-area-inset-top)); padding-bottom: calc(30px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0, rgba(0,0,0,.28) 22%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 72%, rgba(0,0,0,.5) 100%);
}
[data-hero="3"] .hero__title, [data-hero="7"] .hero__title, [data-hero="9"] .hero__title { display: flex; flex-direction: column; align-items: center; text-shadow: 0 1px 14px rgba(0,0,0,.45); }
[data-hero="3"] .hero__merch, [data-hero="7"] .hero__merch, [data-hero="9"] .hero__merch { font-size: min(6vw, 30px); font-weight: 400; letter-spacing: .5em; margin-right: -.5em; line-height: 1; }
[data-hero="3"] .hero__name, [data-hero="7"] .hero__name, [data-hero="9"] .hero__name { display: block; margin-top: 14px; font-size: min(10.6vw, 92px); font-weight: 700; letter-spacing: -.03em; line-height: .9; }
[data-hero="3"] .hero__slogan, [data-hero="7"] .hero__slogan, [data-hero="9"] .hero__slogan { font-size: 15px; font-weight: 400; letter-spacing: .3em; margin-right: -.3em; line-height: 1.6; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
[data-hero="3"] .hero__slogan span, [data-hero="7"] .hero__slogan span, [data-hero="9"] .hero__slogan span { display: inline; }

/* Вариант 4 — без фото, одной композицией на один экран, как в 3: тонкое «М Е Р Ч»,
   жирное «ВЕЧНО МОЛОДОЙ» одним блоком, слоган разрядкой, ниже текст про цех.
   Первый экран (52%) + блок про цех (48%) = ровно экран; группа стоит по центру. */
[data-hero="4"] body { background: var(--paper); }
[data-hero="4"] .stage__bg { display: none; }
[data-hero="4"] .stage__over { margin-top: 0; }
[data-hero="4"] .hero {
  height: auto; min-height: calc(var(--svh) * .52); color: var(--ink); justify-content: flex-end;
  padding: calc(72px + env(safe-area-inset-top)) var(--gut) 34px;
}
[data-hero="4"] .hero__title { display: flex; flex-direction: column; align-items: center; }
[data-hero="4"] .hero__merch { font-size: min(6vw, 30px); font-weight: 400; letter-spacing: .5em; margin-right: -.5em; line-height: 1; }
[data-hero="4"] .hero__name { display: block; margin-top: 14px; font-size: min(10.6vw, 92px); font-weight: 700; letter-spacing: -.03em; line-height: .9; }
[data-hero="4"] .hero__slogan { margin-top: 26px; font-size: 15px; font-weight: 400; letter-spacing: .3em; margin-right: -.3em; line-height: 1.6; }
[data-hero="4"] .hero__slogan span { display: inline; }
[data-hero="4"] .about { min-height: calc(var(--svh) * .48); padding-top: 0; }
[data-hero="4"] .about p::before { content: ""; display: block; width: 28px; height: 1px; margin: 0 auto 26px; background: currentColor; }

/* ?hero=1 — основа (по скрину Дилары; поверх «4», копия ?hero=2 без data-alt не меняется).
   «МЕРЧ» и слоган поменялись местами, «ВЕЧНО МОЛОДОЙ» посередине без изменений:
   сверху «ЖИВИ ЯРКО / ОСТАВЬ СЛЕД» стилем прежнего «М Е Р Ч» (разрядка .5em, тот же кегль),
   снизу «МЕРЧ» мелко стилем текста про цех (15px, разрядка .3em). */
[data-alt="swap"] .hero__slogan {
  order: -1; margin: 0 -.5em 18px 0; font-size: min(6vw, 30px); font-weight: 400; letter-spacing: .5em;
  line-height: 1.5; text-align: center;
}
[data-alt="swap"] .hero__slogan > span { display: block; }
[data-alt="swap"] .hero__slogan .hero__dash { display: none; }
/* «МЕРЧ» принадлежит «ВЕЧНО МОЛОДОЙ»: Medium (500 — между тонким слоганом и жирным названием),
   чуть крупнее текста про цех, вплотную под названием; от текста про цех — заметный отступ. */
[data-alt="swap"] .hero { padding-bottom: 60px; }
[data-alt="swap"] .hero__merch { order: 1; margin: 12px -.4em 0 0; font-size: 19px; font-weight: 500; letter-spacing: .4em; line-height: 1; }
@media (min-width: 760px) { [data-alt="swap"] .hero__merch { font-size: 24px; margin-top: 18px; } }

/* Первый экран 8 — без фото: пара-лого, линия, слоган */
[data-hero="8"] .stage__bg { display: none; }
[data-hero="8"] .stage__over { margin-top: 0; }
[data-hero="8"] .hero {
  color: var(--ink); height: auto; min-height: var(--svh); justify-content: center; gap: 0;
  padding: calc(84px + env(safe-area-inset-top)) var(--gut) 90px;
}
[data-hero="8"] .hero__title { display: flex; flex-direction: column; align-items: center; }
[data-hero="8"] .hero__merch { font-size: min(6vw, 30px); font-weight: 400; letter-spacing: .5em; margin-right: -.5em; line-height: 1; }
[data-hero="8"] .hero__name { display: block; margin-top: 14px; font-size: min(10.6vw, 92px); font-weight: 700; letter-spacing: -.03em; line-height: .9; }
[data-hero="8"] .hero__slogan { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); width: min(100%, 420px);
  font-size: 15px; font-weight: 400; letter-spacing: .3em; margin-right: -.3em; line-height: 1.6; }
[data-hero="8"] .hero__slogan span { display: inline; }

/* Первый экран 7 — как в 3 (фото на весь экран, затемнение, пара-лого, слоган внизу).
   Фото не sticky: прозрачный каталог иначе ехал бы поверх фото. Оно уходит вверх вместе с первым экраном
   и низом растворяется в бумаге (mask), так что стык мягкий. */
[data-hero="7"] .stage__bg {
  position: absolute; top: 0; left: 0; right: 0; height: var(--svh); min-height: 520px; background: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}
[data-hero="7"] .stage__over { margin-top: 0; }
/* затемнение внизу кадра заканчивается до стыка, чтобы на фоне не оставалось тёмной полосы */
[data-hero="7"] .hero { background: linear-gradient(to bottom, rgba(0,0,0,.55) 0, rgba(0,0,0,.28) 22%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 60%, rgba(0,0,0,.42) 84%, rgba(0,0,0,0) 100%); }

/* ---------- Варианты 7 и 8: вся страница на серой бумаге «Плаката» ----------
   Значения фона из сайта Сергея (ветка gray): #bebdb8 + --grain (мелкое зерно) + --paper (пятна и волокна),
   inline SVG feTurbulence. Тайлы 220/480px в родном размере — ничего не растягивается.
   Один fixed-слой под контентом (не background-attachment: fixed — на iOS не работает).
   Стиль остаётся ч/б: тёмный текст, тёмные линии; акцент «Плаката» — только счётчик корзины и линия под лого. */
html[data-skin="paper"] {
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  --tex-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.6 -.55'/%3E%3C/filter%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .5' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 -.6'/%3E%3C/filter%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.02' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.5 -.7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='.13'/%3E%3Crect width='100%25' height='100%25' filter='url(%23w)' opacity='.16'/%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='.04'/%3E%3C/svg%3E");
  --ink: #141414;
  --paper: #bebdb8;
  --mute: #454542;          /* 5.1:1 на #bebdb8 */
  --line: #141414;
  --hair: #8e8d88;
  --plate: rgba(20,20,20,.07);
  --accent: #c12c45;        /* только заливки и крупное */
  --accent-ink: #861a2f;    /* мелкий цветной текст, 5.1:1 */
  background: #bebdb8;
}
html[data-skin="paper"] body { background: transparent; }
html[data-skin="paper"] body::before {
  content: ""; position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1;
  background: var(--tex-grain), var(--tex-paper), #bebdb8;
}
[data-skin="paper"] .sheet, [data-skin="paper"] .cart, [data-skin="paper"] .buy { background: var(--tex-grain), var(--tex-paper), #bebdb8; }
[data-skin="paper"] .about, [data-skin="paper"] .catalog { background: transparent; }
[data-skin="paper"] .foot { background: transparent; color: var(--ink); }
[data-skin="paper"] .foot__legal, [data-skin="paper"] .foot__offer a { color: var(--mute); }
[data-skin="paper"] .foot :focus-visible { outline-color: var(--ink); }
[data-skin="paper"] .ph::before { color: var(--mute); }
[data-skin="paper"] .soon { background: rgba(20,20,20,.06); border: 1px dashed #8e8d88; }
[data-skin="paper"] .qty button:disabled { color: #8e8d88; }
[data-skin="paper"] .card__media::after { border-color: rgba(20,20,20,.18); }
[data-skin="paper"] .cartbtn { background: #bebdb8; }
[data-skin="paper"] .cartbtn__count { background: var(--accent); color: #fff; border-color: #bebdb8; }
[data-hero="8"] .hero__slogan { border-top-color: var(--accent); }
[data-hero="7"] .hero__slogan { border-top: 0; }
[data-skin="paper"] .stub a, [data-skin="paper"] .opt__hint a { color: var(--accent-ink); }

/* ---------- О цехе ---------- */
.about { background: var(--paper); padding: 56px var(--gut) 52px; border-bottom: 1px solid var(--line); }
/* Тем же начертанием и трекингом, что «МЕРЧ»: Regular, капс, широкая разрядка (чуть меньше, чтобы абзац читался). */
.about p { margin: 0 auto; max-width: 30em; font-size: 14px; line-height: 2; font-weight: 400; text-transform: uppercase; letter-spacing: .3em; margin-right: auto; padding-left: .3em; }
@media (min-width: 760px) { .about { padding: 96px var(--gut); } .about p { font-size: 17px; max-width: 34em; } }

/* ---------- Каталог ---------- */
.catalog { background: var(--paper); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.grid__loading { padding: 40px var(--gut); color: var(--mute); }

.group { border-bottom: 1px solid var(--line); padding: 26px var(--gut) 34px; }
.group__head { margin: 0 0 18px; }
.group__title { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.group__cards { display: grid; gap: 12px; }
.group--pair .group__cards { grid-template-columns: 1fr 1fr; }

@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .group { border-right: 1px solid var(--line); }
  .group--pair { grid-column: span 2; }
}
/* Позиция 9 (коллаборация): тип, под ним одной строкой «Коллаборация с Check Ya Head» мелко. */
.group--collab .group__title { white-space: nowrap; font-size: min(3.3vw, 12px); }
.group--collab .card .card__name { font-size: min(3.05vw, 14px); font-weight: 500; letter-spacing: 0; white-space: nowrap; max-width: none; }
.group--collab .card .card__type { font-size: 13px; color: var(--ink); font-weight: 700; letter-spacing: .1em; margin-right: -.1em; }
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  /* 9 позиций = ровно 3 ряда по 3: пара 9 занимает одну колонку, порядок 1→9 слева направо. */
  .group--pair { grid-column: auto; }
  .group--collab .card .card__name { font-size: 12px; }
  .group { padding: 28px 24px 36px; }
}

/* Карточка */
.card { position: relative; }
.card__open { position: absolute; inset: 0; z-index: 1; }
.card__open:focus-visible { outline-offset: 4px; }
/* Фото из архива 3:4 — кадр 3:4, ничего не режем. Тонкая рамка поверх: светлые студийные
   снимки (шапка, кепка) не сливаются с белой страницей. */
.card__media { position: relative; aspect-ratio: 3 / 4; background: var(--plate); }
.card__media::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(0,0,0,.1); pointer-events: none; }
@media (hover: hover) {
  .card:hover .card__name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
}
.card__info { padding-top: 14px; }
.card__type { margin: 0; font-size: 12px; letter-spacing: .16em; margin-right: -.16em; text-transform: uppercase; color: var(--mute); }
.card__name { margin: 5px auto 0; max-width: 18em; font-size: 21px; font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
.group--pair .card__name { font-size: 16px; }
.card__price { margin: 8px 0 0; font-size: 15px; font-weight: 500; }
.card__price--soon { color: var(--mute); font-weight: 400; }
.dots { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: 4px; }
.dot { width: 32px; height: 34px; display: grid; place-items: center; }
.dot i { width: 16px; height: 16px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.28); }
.dot i.is-num, .swatch i.is-num { display: grid; place-items: center; background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); font-style: normal; font-weight: 700; color: var(--ink); }
.dot i.is-num { width: 22px; height: 22px; font-size: 12px; }
.swatch i.is-num { font-size: 15px; }
.dot[aria-pressed="true"] i { box-shadow: inset 0 0 0 1px rgba(0,0,0,.28), 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }

/* ---------- Сетка заказа: быстрая покупка в карточке («3», «8») и окно «Купить» ----------
   Одна сетка на 5 равных колонок: размеры (по ячейке), ниже количество (2 ячейки) + «В корзину» (3 ячейки).
   Одна ширина у всех строк, высота строк 44px, общие тонкие линии 1px, без разнобоя рамок. */
.card--quick .card__media .card__open, .card--buy .card__media .card__open { position: absolute; inset: 0; z-index: 1; }
.card--quick .dot { width: 44px; height: 44px; }
.quick { margin-top: 12px; }
/* ---------- Блок заказа: 4 стиля для сравнения (см. orderBox в app.js) ---------- */
.ob { display: flex; flex-direction: column; gap: 14px; }
.ob__row { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.ob__sizes, .ob__qty { display: flex; align-items: center; }
.ob__size, .ob__qb, .ob__go { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ob__qv { min-width: 32px; text-align: center; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ob__qb { font-size: 20px; }
.ob__qb:disabled { color: var(--hair); cursor: default; }
.ob__go { gap: 8px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ob__go.is-done { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ob__go:disabled { cursor: default; }
.ob.is-need .ob__size { color: var(--accent, #c12c45); }
.ob__sep { flex: none; width: 1px; height: 28px; background: var(--hair); }
.ob .buy__colors { margin: 0; gap: 0; flex: none; }
.ob .buy__colors .dot { width: 32px; height: 40px; }
.ob .buy__colors .dot i { width: 18px; height: 18px; }
.buy__colors:empty { display: none; }

/* «КРУГИ» (окно): кружки размеров в строке с цветом; степпер-пилюля и кнопка-пилюля */
.ob--circles .ob__row--pick { justify-content: space-between; gap: 6px; }
.ob--circles .ob__sizes { gap: 4px; }
.ob--circles .ob__size { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); font-size: 12px; font-weight: 500; }
.ob--circles .ob__size.is-one { width: auto; padding: 0 16px; border-radius: 18px; }
.ob--circles .ob__size[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ob--circles .ob__row--act { gap: 10px; }
.ob--circles .ob__qty { height: 48px; padding: 0 4px; border: 1px solid var(--line); border-radius: 24px; }
.ob--circles .ob__qb { width: 40px; height: 46px; }
.ob--circles .ob__go { flex: 1; height: 48px; border-radius: 24px; }

/* «БЕЗ РАМОК» — общее для окна и карточки: размеры буквами, выбранный жирнее с тонким подчёркиванием */
.ob--barewin .ob__size, .ob--bare .ob__size {
  position: relative; min-width: 40px; height: 40px; padding: 0 6px; font-size: 15px; font-weight: 400; color: var(--mute);
}
.ob--barewin .ob__size[aria-pressed="true"], .ob--bare .ob__size[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.ob--barewin .ob__size[aria-pressed="true"]::after, .ob--bare .ob__size[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: 6px; width: 16px; height: 1.5px; margin-left: -8px; background: currentColor;
}
.ob--barewin .ob__size.is-one, .ob--bare .ob__size.is-one { color: var(--ink); }
.ob--barewin .ob__size.is-one::after, .ob--bare .ob__size.is-one::after { display: none; }
.ob--barewin .ob__qb, .ob--bare .ob__qb { width: 44px; height: 40px; font-size: 22px; }

/* «БЕЗ РАМОК В ОКНЕ»: цвет и размеры в одной строке; ниже количество и «Подтвердить» */
.ob--barewin .ob__row--pick { justify-content: space-between; gap: 6px; }
.ob--barewin .ob__sizes { gap: 0; }
.ob--barewin .ob__size { min-width: 38px; }
.ob--barewin .ob__row--act { justify-content: space-between; gap: 14px; }
.ob--barewin .ob__go { flex: 1; height: 48px; }

/* «БЕЗ РАМОК» в карточке: компактно, по центру; небольшая подсвеченная кнопка с иконкой */
.ob--bare { gap: 6px; }
.ob--bare .ob__sizes { gap: 4px; }
.ob--bare .ob__go { height: 40px; padding: 0 22px; margin-top: 6px; border-radius: 20px; font-size: 12px; }

/* «КВАДРАТЫ КОМПАКТНЫЕ» в карточке: три отдельных ряда с зазорами */
.ob--squares { gap: 10px; }
.ob--squares .ob__sizes, .ob--squares .ob__qty { gap: 6px; }
.ob--squares .ob__size, .ob--squares .ob__qb, .ob--squares .ob__qv {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line);
}
.ob--squares .ob__size { font-size: 13px; font-weight: 500; }
.ob--squares .ob__size.is-one { width: auto; padding: 0 14px; }
.ob--squares .ob__size[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ob--squares .ob__qv { min-width: 40px; border-color: var(--hair); }
.ob--squares .ob__go { width: 224px; height: 44px; } /* 5 × 40 + 4 × 6 — ровно по ряду размеров */
.qmsg { margin: 8px 0 0; min-height: 1.3em; font-size: 13px; color: var(--mute); }
/* шапка и кепка в режиме быстрой покупки — одна под другой, чтобы сетка была той же ширины */
[data-hero="3"] .group--pair .group__cards, [data-hero="8"] .group--pair .group__cards { grid-template-columns: minmax(0, 1fr); gap: 34px; }
[data-hero="3"] .group--collab .card .card__name, [data-hero="8"] .group--collab .card .card__name { font-size: 16px; font-weight: 700; }

/* кнопка «Купить» в карточке («4», «9») */
.card--buy .card__row { margin-top: 4px; }
.buybtn {
  display: block; width: 100%; height: 44px; margin-top: 10px; border: 1px solid var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: .16em; margin-right: -.16em; text-transform: uppercase;
}
.buybtn:hover { background: var(--ink); color: var(--paper); }

/* окно «Купить»: нижняя шторка на телефоне, окно по центру на широком экране */
.buy {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid var(--line);
}
.buy .grab { background: var(--hair); box-shadow: none; top: 8px; }
.buy__inner { max-width: 520px; margin: 0 auto; padding: 26px var(--gut) calc(18px + env(safe-area-inset-bottom)); text-align: left; }
.buy__head { display: grid; grid-template-columns: 72px minmax(0, 1fr) 44px; gap: 14px; align-items: start; }
.buy__thumb { position: relative; width: 72px; aspect-ratio: 3 / 4; background: var(--plate); overflow: hidden; }
.buy__thumb .soon { padding: 4px; gap: 4px; } .buy__thumb .soon b { font-size: 8px; letter-spacing: .1em; } .buy__thumb .ph::before { content: none; }
.buy__type { margin: 2px 0 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.buy__name { margin: 4px 0 0; font-size: 18px; line-height: 1.1; font-weight: 700; }
.buy__price { margin: 6px 0 0; font-size: 15px; font-weight: 500; }
.buy__price.is-soon { color: var(--mute); font-weight: 400; }
.buy__color { margin: 2px 0 0; font-size: 13px; color: var(--mute); }
.buy .x { border: 1px solid var(--line); }
.buy__colors { justify-content: flex-start; margin: 12px 0 0 -6px; }
.buy__colors .dot { width: 44px; height: 44px; }
#buyGrid { margin-top: 12px; }
.buy__msg { margin: 8px 0 0; min-height: 1.3em; font-size: 13px; text-align: center; color: var(--mute); }
@media (min-width: 700px) {
  .buy { inset: 0; margin: auto; width: 460px; height: fit-content; border: 1px solid var(--line); }
  .buy .grab { display: none; }
}

/* ---------- Каталог по 2 в ряд («9», адрес ?hero=7) ---------- */
@media (max-width: 759px) {
  [data-hero="9"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-hero="9"] .group { padding: 16px 10px 22px; }
  [data-hero="9"] .group:nth-child(odd):not(.group--pair) { border-right: 1px solid var(--line); }
  [data-hero="9"] .group--pair { grid-column: 1 / -1; padding-left: 0; padding-right: 0; }
  [data-hero="9"] .group--pair .group__head { padding: 0 10px; }
  [data-hero="9"] .group--pair .group__cards { gap: 0; }
  [data-hero="9"] .group--pair .card { padding: 0 10px; }
  [data-hero="9"] .group--pair .card:first-child { border-right: 1px solid var(--line); }
}
[data-hero="9"] .card__media, [data-hero="9"] .group--pair .card__media { aspect-ratio: 3 / 4; }
[data-hero="9"] .card__info { padding-top: 10px; }
[data-hero="9"] .card__type { font-size: 10px; letter-spacing: .12em; }
[data-hero="9"] .card .card__name { font-size: 15px; line-height: 1.15; }
[data-hero="9"] .group--collab .card .card__name { font-size: 11px; font-weight: 500; white-space: normal; }
[data-hero="9"] .card__price { font-size: 14px; margin-top: 4px; }
[data-hero="9"] .dot { width: 34px; height: 36px; }
[data-hero="9"] .buybtn { height: 42px; font-size: 12px; letter-spacing: .14em; margin-right: 0; }

/* ---------- Вариант «9» (адрес ?hero=7): без линий и рамок ----------
   Каталог, карточки, кнопка «Купить», окно выбора — без обводок и разделителей.
   Выделение — только заливкой: светло-серая подложка у невыбранного, тёмная у выбранного.
   Подвал и переключатель не трогаем. */
[data-hero="9"] .about, [data-hero="9"] .group, [data-hero="9"] .group--pair .card { border: 0 !important; }
[data-hero="9"] .card__media::after { display: none; }
[data-hero="9"] .buybtn { border: 0; background: #eeeeec; color: #141414; border-radius: 6px; }
[data-hero="9"] .buybtn:hover { background: #e2e2df; color: #141414; }
/* кружки цвета: подложка-ореол вместо обводки (иначе молочный цвет теряется на белом) */
[data-hero="9"] .dot i { box-shadow: 0 0 0 3px #eeeeec; }
[data-hero="9"] .dot[aria-pressed="true"] i { box-shadow: 0 0 0 3px #8f8f8b; }
/* окно «Купить» */
[data-hero="9"] .buy { border: 0; }
.buy:focus { outline: none; }
[data-hero="9"] .buy .x { border: 0; background: transparent; border-radius: 0; }
[data-hero="9"] .ob--circles .ob__size { border: 0; background: #eeeeec; }
[data-hero="9"] .ob--circles .ob__size[aria-pressed="true"] { background: #141414; color: #fff; }
[data-hero="9"] .ob--circles .ob__qty { border: 0; }
[data-hero="9"] .ob--circles .ob__go { background: #e6e6e3; color: #141414; }
[data-hero="9"] .ob--circles .ob__go.is-done { background: #d6d6d2; color: #141414; box-shadow: none; }
[data-hero="9"] .ob__sep { display: none; }
[data-hero="9"] .ob.is-need .ob__size { color: var(--accent, #c12c45); background: #f6e8eb; }
@media (min-width: 700px) { [data-hero="9"] .buy { border: 0; } }

/* ---------- Лента фото в карточке каталога (scroll-snap, без библиотек) ---------- */
.card__media.has-cs { overflow: hidden; }
.cs {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;            /* вбок — листаем фото, вверх-вниз — прокручивается страница */
  scrollbar-width: none;
}
.cs::-webkit-scrollbar { display: none; }
.cs__slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; padding: 0; display: block; scroll-snap-align: center; scroll-snap-stop: always; cursor: pointer; }
/* точки на маленькой полупрозрачной капсуле — видны и на белой футболке, и на тёмном фоне */
.cs__dots { position: absolute; z-index: 2; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 5px; padding: 4px 6px; border-radius: 8px; background: rgba(0,0,0,.22); pointer-events: none; }
.cs__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.cs__dots i.is-on { background: #fff; }
[data-hero="9"] .cs__dots { bottom: 7px; gap: 4px; padding: 3px 5px; border-radius: 6px; }
[data-hero="9"] .cs__dots i { width: 4px; height: 4px; }
.cs__arr { display: none; position: absolute; z-index: 2; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: rgba(255,255,255,.85); color: #141414; font-size: 22px; line-height: 1; }
.cs__arr--prev { left: 8px; }
.cs__arr--next { right: 8px; }
@media (hover: hover) and (pointer: fine) { .card__media.has-cs:hover .cs__arr { display: grid; place-items: center; } }

/* Плашка «Фото скоро» */
.soon {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: var(--plate); color: var(--mute); text-align: center; padding: 16px;
}
.soon b { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.soon small { font-size: 13px; max-width: 14em; }
.soon i { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.28); }

/* ---------- Диалоги ---------- */
dialog { padding: 0; border: 0; color: var(--ink); background: var(--paper); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(0,0,0,.5); }
.x { width: 44px; height: 44px; display: grid; place-items: center; background: var(--paper); border-radius: 50%; }
.x--light { background: rgba(0,0,0,.4); color: #fff; }

/* Лист товара и корзина — на весь экран (100dvh), не частичной шторкой */
.sheet, .cart {
  position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none;
  margin: 0; border: 0; overscroll-behavior: contain;
}
.sheet__inner { height: 100%; overflow-y: auto; overscroll-behavior: contain; position: relative; }
/* крестик всегда на месте, даже когда лист прокручен */
.sheet .x { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 3; border: 1px solid var(--line); }
/* «ручка» сверху — подсказка, что лист можно смахнуть вниз */
.grab { position: absolute; z-index: 3; top: calc(8px + env(safe-area-inset-top)); left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,0,0,.18); pointer-events: none; }
.cart .grab { background: var(--hair); box-shadow: none; top: 6px; }
@media (min-width: 900px) {
  .grab { display: none; }
  .sheet__inner { display: grid; grid-template-columns: 1.1fr 1fr; }
  .sheet .gal, .sheet .gal__track { height: 100%; }
  .sheet .gal__slide { aspect-ratio: auto; height: 100%; }
}

.gal { position: relative; background: var(--plate); }
.gal__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gal__track::-webkit-scrollbar { display: none; }
/* Высота слайда задаётся aspect-ratio, всё внутри — абсолютно. Никаких процентных высот:
   на iOS Safari цепочка height:100% внутри flex-слайда давала картинку нулевой высоты. */
.gal__slide { position: relative; flex: 0 0 100%; width: 100%; aspect-ratio: 3 / 4; scroll-snap-align: center; scroll-snap-stop: always; }
.gal__zoom { position: absolute; inset: 0; display: block; width: 100%; cursor: zoom-in; }
.gal__count {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; margin: 0; padding: 3px 10px;
  background: var(--paper); font-size: 12px; letter-spacing: .1em; font-variant-numeric: tabular-nums;
}
.gal__count:empty { display: none; }
.gal__arrow { display: none; position: absolute; bottom: 10px; width: 40px; height: 40px; background: var(--paper); border: 1px solid var(--line); font-size: 18px; }
.gal__arrow--prev { left: 12px; }
.gal__arrow--next { right: 12px; }
@media (pointer: fine) { .gal[data-many="true"] .gal__arrow { display: block; } }

.sheet__body { padding: 26px var(--gut) calc(32px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .sheet__body { padding: 64px 40px 40px; overflow-y: auto; } }
.sheet__type { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.sheet__name { margin: 6px auto 0; max-width: 14em; font-size: 28px; line-height: 1.05; font-weight: 700; letter-spacing: -.015em; }
.sheet__price { margin: 12px 0 0; font-size: 18px; font-weight: 500; }
.sheet__price.is-soon { color: var(--mute); font-weight: 400; }

.opt { border: 0; padding: 0; margin: 26px 0 0; min-width: 0; }
.opt legend, .opt__label { padding: 0; margin: 0 auto 10px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.opt legend span { color: var(--ink); letter-spacing: .04em; text-transform: none; font-size: 14px; }
.opt__hint { margin: 10px 0 0; font-size: 13px; color: var(--mute); }
.opt__hint:not(:has(a:not([hidden]))) { display: none; }
.opt__hint a { color: var(--ink); text-underline-offset: 3px; }

.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.swatch { position: relative; }
.swatch input, .size input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; }
.swatch i { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.28); }
.swatch input:checked + span { box-shadow: inset 0 0 0 1px var(--ink); }
.swatch input:focus-visible + span, .size input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Пять размеров S–2XL в одну строку даже на 320px. */
.sizes { display: flex; flex-wrap: nowrap; justify-content: center; padding-left: 1px; }
.size { flex: 0 1 64px; min-width: 0; }
.size:only-child { flex: 0 0 auto; }
.size span { white-space: nowrap; }
.size span {
  min-width: 0; height: 44px; padding: 0 6px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); margin: 0 0 -1px -1px; font-weight: 500; font-size: 15px;
}
.size input:checked + span { background: var(--ink); color: var(--paper); }

.qty { display: inline-flex; border: 1px solid var(--line); }
.qty button { width: 44px; height: 44px; font-size: 20px; }
.qty button:disabled { color: #bbb; cursor: default; }
.qty output { min-width: 44px; display: grid; place-items: center; font-weight: 500; font-variant-numeric: tabular-nums; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

.fabric { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--hair); }
.fabric .fabric__val { margin: 0; font-size: 16px; }
.fabric .fabric__val--small { font-size: 14px; color: var(--mute); }
#printRow { margin-top: 16px; }
#fabricRow[hidden] + #printRow { margin-top: 0; }

.btn {
  display: block; width: 100%; margin-top: 28px; height: 56px;
  background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.btn:hover { background: #2a2a2a; }
.added { margin: 10px 0 0; min-height: 1.4em; font-size: 14px; }
.added button { text-decoration: underline; text-underline-offset: 3px; }

/* Полноэкранное фото: свой слайдер + зум (см. app.js). touch-action: none — жесты целиком наши. */
.viewer { width: 100%; height: 100%; background: #000; color: #fff; overflow: hidden; overscroll-behavior: contain; touch-action: none; }
.viewer::backdrop { background: #000; }
.viewer__track {
  /* без overflow: лента едет transform-ом, обрезает сам .viewer (иначе 2-й слайд оказывается вне ленты и не ловит касания) */
  position: absolute; inset: 0; display: flex;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  will-change: transform; cursor: zoom-in;
}
.viewer.is-zoomed .viewer__track { cursor: grab; }
.viewer__slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; overflow: hidden; }
.viewer__zoom { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.viewer img { -webkit-user-drag: none; pointer-events: none; }
.viewer .ph { background: #000; }
.viewer .ph::before { color: #777; }
.viewer .ph img { object-fit: contain; }
.viewer .x { position: absolute; z-index: 2; top: calc(10px + env(safe-area-inset-top)); right: 10px; }
.viewer__count { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); margin: 0; font-size: 13px; letter-spacing: .12em; }

/* Корзина-шторка */
.cart { text-align: left; }
.cart__inner { height: 100%; display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; }
.cart__head { position: relative; display: flex; justify-content: center; align-items: center; min-height: 56px; padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); }
.cart__head h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .4em; margin-right: -.4em; text-transform: uppercase; }
.cart__head .x { position: absolute; right: 6px; bottom: 6px; }
.cart__list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.cart__empty { margin: 0; padding: 40px var(--gut); color: var(--mute); flex: 1; text-align: center; }
.cart.is-empty .cart__list, .cart.is-empty .cart__foot { display: none; }
.cart:not(.is-empty) .cart__empty { display: none; }

.line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 16px var(--gut); border-bottom: 1px solid var(--hair); }
.line__img { width: 72px; aspect-ratio: 3 / 4; background: var(--plate); overflow: hidden; position: relative; }
.line__img .ph::before { content: none; }
.line__img .soon { padding: 4px; gap: 4px; }
.line__img .soon b { font-size: 8px; letter-spacing: .1em; }
.line__type { margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.line__name { margin: 2px 0 0; font-weight: 700; line-height: 1.15; }
.line__meta { margin: 4px 0 0; font-size: 14px; color: var(--mute); }
.line__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.line .qty button { width: 36px; height: 36px; font-size: 18px; }
.line .qty output { min-width: 36px; }
.line__price { font-weight: 500; white-space: nowrap; }
.line__del { font-size: 13px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; height: 36px; padding: 0 2px; }

.cart__foot { padding: 16px var(--gut) calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; }
.cart__sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; text-align: left; }
.cart__sum span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.cart__sum strong { font-size: 18px; }
.cart__sum strong.is-soon { font-size: 14px; font-weight: 400; color: var(--mute); text-align: right; max-width: 15em; }
.cart__foot .btn { margin-top: 14px; }
/* Оформление заказа (шаг шторки корзины) */
.cart [hidden] { display: none !important; }
.order { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.order__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px var(--gut) 20px; }
.order__back { height: 44px; padding: 0; font-size: 14px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.order__items { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.order__item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.order__item b { display: block; font-size: 15px; font-weight: 500; line-height: 1.25; }
.order__item small { display: block; margin-top: 2px; font-size: 13px; color: var(--mute); }
.order__price { white-space: nowrap; font-weight: 500; }
.order__sum { margin: 14px 0 6px; }
.field { display: block; margin-top: 20px; }
.field__label { display: block; margin-bottom: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.field__label i { font-style: normal; letter-spacing: 0; text-transform: none; }
.field__input {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0;
  background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.35; -webkit-appearance: none; appearance: none;
}
textarea.field__input { resize: vertical; min-height: 76px; }
.field__input:focus { outline: 2px solid var(--ink); outline-offset: -2px; }
.field.is-bad .field__input { border-color: #b3261e; outline-color: #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.consent a { color: inherit; text-underline-offset: 3px; }
.consent.is-bad span { color: #b3261e; }
.order__err { margin: 14px 0 0; min-height: 1.4em; font-size: 14px; color: #b3261e; }
.order__err a { color: inherit; font-weight: 700; }
.order__foot { padding: 12px var(--gut) calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.order__foot .btn { margin-top: 0; }
.order__foot .btn:disabled { opacity: .6; }
.order-done { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px var(--gut) calc(32px + env(safe-area-inset-bottom)); text-align: center; outline: none; }
.order-done p { margin: 6px 0 0; }
.order-done__title { margin: 0 !important; font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.order-done__id { margin-top: 18px !important; font-size: 15px; }
.order-done .btn { max-width: 320px; margin-top: 32px; }

/* ---------- Подвал: без линий и заголовков, всё столбиком по центру ---------- */
.foot { background: var(--ink); color: var(--paper); padding: 64px var(--gut) calc(36px + env(safe-area-inset-bottom)); }
/* «СТИРАТЬ БЕРЕЖНО / — / НОСИТЬ ВЕЧНО» — над подвалом, на фоне страницы (не в тёмном подвале), с «воздухом»
   сверху и снизу. На серой бумаге (подвал светлый) встаёт ровно туда, где был: подвал без верхнего поля. */
.care { background: var(--paper); color: var(--ink); padding: 56px var(--gut); }
[data-skin="paper"] .care { background: transparent; padding: 64px var(--gut) 0; }
[data-skin="paper"] .foot { padding-top: 0; }
.foot { padding-top: 20px; }   /* надписи в подвале больше нет: первая строка «Наши группы» ≈ 64px от верха */
[data-skin="paper"] .foot { padding-top: 0; }
@media (min-width: 760px) { .care { padding: 80px var(--gut); } }
/* «СТИРАТЬ БЕРЕЖНО / — / НОСИТЬ ВЕЧНО» тонким разреженным, как «М Е Р Ч» */
.foot__care { margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-weight: 400; text-transform: uppercase; font-size: min(5.2vw, 24px); line-height: 1.2; letter-spacing: .5em; }
.foot__care span { margin-right: -.5em; }
.foot__care i { display: block; width: 28px; height: 1px; background: currentColor; }
/* В 3, 7, 8 — одной строкой во всю ширину (поля 16px), без переноса: кегль от ширины экрана.
   Замер PT Root UI Regular, капс, разрядка .2em: ширина строки ≈ 23.8 × кегль. */
[data-hero="3"] .foot__care, [data-hero="7"] .foot__care, [data-hero="8"] .foot__care, [data-hero="9"] .foot__care {
  flex-direction: row; justify-content: center; gap: .55em; white-space: nowrap;
  font-size: min(calc((100vw - 2 * var(--gut)) * .0415), 30px); letter-spacing: .2em;
}
[data-hero="3"] .foot__care span, [data-hero="7"] .foot__care span, [data-hero="8"] .foot__care span, [data-hero="9"] .foot__care span { margin-right: -.2em; }
[data-hero="3"] .foot__care i, [data-hero="7"] .foot__care i, [data-hero="8"] .foot__care i, [data-hero="9"] .foot__care i { width: .9em; flex: none; }
.foot__label { margin: 44px 0 6px; font-size: 10px; font-weight: 500; letter-spacing: .4em; margin-right: -.4em; text-transform: uppercase; opacity: .6; }
.foot__icons { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 8px; }
.foot__icons a { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: inherit; }
.foot__icons a:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.foot__legal { margin: 32px auto 0; max-width: 24em; font-size: 13px; color: #9a9a9a; }
.foot__offer { margin: 8px 0 0; font-size: 13px; }
.foot__offer a { color: #d6d6d6; text-underline-offset: 3px; }
.foot :focus-visible { outline-color: #fff; }

/* ===== СЛУЖЕБНОЕ (прототип): боковой переключатель вариантов первого экрана 1…8. Удалить перед запуском. =====
   Узкая колонка у правого края, по центру высоты. Полупрозрачная, при наведении/тапе заметнее.
   Цвет — из переменных темы: на белом и сером тёмный, на синем светлый.
   Диалоги (лист, фото, корзина) лежат в top layer — переключатель под ними не виден. */
.proto-switch {
  /* статичная колонка: всегда видна, постоянная прозрачность, без раскрытия, hover и active — нажал и перешёл */
  position: fixed; z-index: 25; right: 2px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; opacity: .8;
}
.proto-switch a {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font-size: 12px; font-weight: 500; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.55); background: color-mix(in srgb, var(--paper) 55%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
/* текущий вариант — плотная заливка и светлый ободок (виден и на чёрном подвале) */
.proto-switch a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 0 0 0 1.5px var(--paper); }
/* ===== /СЛУЖЕБНОЕ ===== */

/* ---------- Движение: только лист товара и корзина ----------
   Открытие: подъём снизу + лёгкий fade, 240 мс, ease-out; закрытие — обратно, 200 мс.
   Только transform/opacity — GPU, без перерасчёта раскладки. */
.sheet[open], .cart[open] { animation: vm-in .24s ease-out; }
.sheet.is-closing, .cart.is-closing { animation: vm-out .2s ease-in forwards; }
@keyframes vm-in { from { transform: translateY(7vh); opacity: 0; } }
/* окно «Купить» — шторка поднимается снизу целиком; на широком экране — окно с лёгким подъёмом */
.buy[open] { animation: buy-in .26s ease-out; }
.buy.is-closing { animation: buy-out .2s ease-in forwards; }
@keyframes buy-in { from { transform: translateY(100%); } }
@keyframes buy-out { to { transform: translateY(100%); } }
@media (min-width: 700px) {
  .buy[open] { animation: vm-in .24s ease-out; }
  .buy.is-closing { animation: vm-out .2s ease-in forwards; }
}
@keyframes vm-out { to { transform: translateY(7vh); opacity: 0; } }
/* «Уменьшение движения» (часто включено на iPhone, в т. ч. в энергосбережении):
   не выключаем совсем, а даём мягкий fade 150 мс — иначе лист появляется рывком. */
@media (prefers-reduced-motion: reduce) {
  *:not(.sheet):not(.cart):not(.buy), *::before, *::after { animation: none !important; transition: none !important; }
  .sheet[open], .cart[open], .buy[open] { animation: vm-fade-in .15s ease-out; }
  .sheet.is-closing, .cart.is-closing, .buy.is-closing { animation: vm-fade-out .15s ease-in forwards; }
}
@keyframes vm-fade-in { from { opacity: 0; } }
@keyframes vm-fade-out { to { opacity: 0; } }
