/* ============================================================
   app.css — Verona. Токены (DESIGN.md → Бриф) → база → компоненты → экраны → движение.
   Цвет: замер фото магазина и баннера бонусов verona.kz. Шрифты: Montserrat (капс, бренды) + Onest (текст).
   ============================================================ */

:root {
  /* ---------- Цвет: роли ---------- */
  --surface: #FAF8F6;      /* фон страницы — светлый тон серо-тёплых натюрмортов магазина */
  --tile: #F0EDEA;         /* плитка товара; фото смешиваются multiply, белый фон упаковок растворяется */
  --raise: #FFFFFF;        /* шторки, поля, карточки поверх фона */
  --sunk: #E8E4E0;         /* нажатое, чипы, дорожки */
  --ink: #1E1A1B;          /* текст; почти-чёрный из фото и логотипа — 16.3:1 */
  --ink-2: #6A6462;        /* вторичный текст — 5.5:1 на фоне, 5.0:1 на плитке */
  --line: rgb(30 26 27 / .11);
  --signal: #1E1A1B;       /* главное действие — чёрная кнопка */
  --on-signal: #FFFFFF;
  --rose: #B3364C;         /* акция, счётчик корзины — 5.6:1; белый на нём 5.9:1 */
  --bonus-a: #FFA0AA;      /* градиент бонусной программы — из баннера сайта */
  --bonus-b: #FEAA7E;
  --on-bonus: #1E1A1B;
  --positive: #2E6B4E;
  --warning: #8A5300;
  --danger: #B3261E;
  --focus: #2563EB;
  --glass: rgb(250 248 246 / .94);
  --shadow-1: 0 1px 2px rgb(30 26 27 / .06), 0 4px 14px rgb(30 26 27 / .06);
  --shadow-2: 0 -8px 30px rgb(30 26 27 / .12);

  /* ---------- Шрифт ---------- */
  --font-display: "Montserrat", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Шкала 1.2 — плотный интерфейс */
  --fs-xs: 11px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 29px;
  --track: .09em;

  /* ---------- Пространство и форма ---------- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 48px;
  --gutter: 16px;
  --r-chip: 10px; --r-tile: 14px; --r-card: 20px; --r-sheet: 22px; --r-pill: 999px;
  --tap: 44px;
  --tab-h: 62px;
  --buy-h: 0px;

  /* ---------- Движение (ровный характер, без отскоков) ---------- */
  --dur-instant: 90ms; --dur-quick: 160ms; --dur-base: 260ms; --dur-slow: 420ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --ease-emph: cubic-bezier(.3, 0, 0, 1);
  --move-sm: 6px; --move-md: 16px; --move-lg: 24px;
}

/* Тёмная тема — не инверсия: поверхности светлеют с высотой; плитки товара остаются светлыми — «подсвеченная полка» */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #141112; --raise: #1E1A1B; --sunk: #2A2526; --tile: #DCD7D3; --ink: #F3EFEC; --ink-2: #B1AAA7; --line: rgb(243 239 236 / .12);
    --signal: #F3EFEC; --on-signal: #141112; --rose: #FF8A9B; --positive: #7FD1A6; --warning: #F2B35E; --danger: #FF8A80;
    --glass: rgb(20 17 18 / .94); --shadow-1: 0 0 0 1px var(--line); --shadow-2: 0 -1px 0 var(--line);
  }
}
:root[data-theme="dark"] {
  --surface: #141112; --raise: #1E1A1B; --sunk: #2A2526; --tile: #DCD7D3; --ink: #F3EFEC; --ink-2: #B1AAA7; --line: rgb(243 239 236 / .12);
  --signal: #F3EFEC; --on-signal: #141112; --rose: #FF8A9B; --positive: #7FD1A6; --warning: #F2B35E; --danger: #FF8A80;
  --glass: rgb(20 17 18 / .94); --shadow-1: 0 0 0 1px var(--line); --shadow-2: 0 -1px 0 var(--line);
}
@media (prefers-reduced-motion: reduce) {
  :root { --move-sm: 0px; --move-md: 0px; --move-lg: 0px; --dur-slow: 160ms; }
}

/* ============================================================ База */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--surface); }
body {
  margin: 0; min-height: 100svh; background: var(--surface); color: var(--ink);
  font: 400 var(--fs-md)/1.45 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.pad { padding-inline: var(--gutter); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.ic { width: 22px; height: 22px; flex: none; }
img.is-broken { visibility: hidden; }
.ic--fill { fill: currentColor; }
.ic--dim { opacity: .28; fill: currentColor; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Отклик на нажатие — у всего, что нажимается */
:where(button, .btn, .chip, .row, .circ, .concern, .opt, .tool, .seg__b, .art) { transition: transform var(--dur-instant) var(--ease-out), background-color var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out); }
:where(button, .btn, .chip, .row, .circ, .concern, .opt, .tool, .seg__b, .art):active { transform: scale(.97); }

.app { max-width: 640px; margin: 0 auto; min-height: 100svh; }
.screen { padding-bottom: calc(var(--tab-h) + var(--buy-h) + env(safe-area-inset-bottom) + 24px); }
.screen:has(.buybar) { --buy-h: 76px; }

/* ============================================================ Типографика ролей */
.caps-h { font: 600 var(--fs-sm)/1.2 var(--font-display); letter-spacing: var(--track); text-transform: uppercase; }
.caps-s { font: 600 var(--fs-xs)/1.2 var(--font-display); letter-spacing: var(--track); text-transform: uppercase; opacity: .8; }
.h1 { font: 600 var(--fs-2xl)/1.15 var(--font-display); letter-spacing: -.005em; }

/* ============================================================ Шапки */
.hd { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) 10px; }
.hd--title { justify-content: flex-start; align-items: baseline; padding-top: calc(env(safe-area-inset-top) + 18px); padding-bottom: 14px; }
.hd__sub { color: var(--ink-2); font-size: var(--fs-sm); }
.logo { display: inline-flex; align-items: center; min-height: var(--tap); }
.logo img { width: 152px; height: auto; }   /* у файла логотипа прозрачные поля сверху, снизу и справа; слева — ровно */
[data-theme="dark"] .logo img { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo img { filter: invert(1); } }
.bonus-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 10px; border-radius: var(--r-pill); background: linear-gradient(100deg, var(--bonus-a), var(--bonus-b)); color: var(--on-bonus); font-weight: 600; font-size: var(--fs-sm); }
.bonus-chip .ic { width: 18px; height: 18px; }

/* Липкая шапка внутренних экранов: стекло после первого экрана */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-1); min-height: 56px; padding: calc(env(safe-area-inset-top) + 6px) 6px 6px; background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--line); }
.bar__t { flex: 1; min-width: 0; }
.bar__t h1 { font: 600 var(--fs-md)/1.2 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__sub { display: block; font-size: var(--fs-xs); color: var(--ink-2); }
.bar__a { display: flex; }
.bar--search { gap: var(--s-2); padding-inline: var(--gutter) 10px; }
.bar--search .field { flex: 1; }
.icon-btn { display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-pill); }
.icon-btn:active { background: var(--sunk); }
.pdp-fav.is-on .ic { fill: var(--rose); stroke: var(--rose); }

.search-pill, .field { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink-2); }
.search-pill .ic, .field .ic { width: 20px; height: 20px; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; padding: 10px 0; }
.field input::placeholder { color: var(--ink-2); }
.field:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.field--bar { min-height: 44px; }

.trust { display: flex; align-items: center; gap: 8px; margin: 10px var(--gutter) 4px; font-size: var(--fs-sm); color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); flex: none; }

/* ============================================================ Разделы и ленты */
.sec { margin-top: 26px; }
.sec__h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 0 var(--gutter); margin-bottom: 12px; }
.sec__more { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; min-height: var(--tap); min-width: var(--tap); margin: -12px 0; color: var(--ink-2); font-size: var(--fs-sm); }
.sec__more .ic { width: 16px; height: 16px; }
.rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: var(--gutter); padding: 0 var(--gutter) 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }

.circles { display: flex; gap: 14px; overflow-x: auto; padding: 16px var(--gutter) 4px; scrollbar-width: none; }
.circles::-webkit-scrollbar { display: none; }
.circ { flex: none; width: 70px; display: grid; justify-items: center; gap: 6px; text-align: center; }
.circ__i { width: 66px; height: 66px; border-radius: 50%; background: var(--tile); display: grid; place-items: center; overflow: hidden; padding: 8px; }
.circ__i img { width: 50px; height: 50px; object-fit: contain; mix-blend-mode: multiply; }
.circ__i b { font: 700 22px var(--font-display); color: var(--ink); opacity: .75; }
.circ__t { font-size: 12px; line-height: 1.2; }

/* ============================================================ Плитка товара */
.pc { position: relative; width: var(--w, auto); min-width: 0; }
.pc__tile { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: var(--r-tile); background: var(--tile); padding: 12px; overflow: hidden; }
.pc__tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; opacity: 0; transition: opacity var(--dur-quick) var(--ease-out); }
.pc__tile img.is-in, .pc__tile img[src^="data"] { opacity: 1; }
.no-js .pc__tile img { opacity: 1; }
.pc.is-out .pc__tile img { opacity: .55; }
.badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 6px; font: 600 11px/1.3 var(--font-body); background: var(--raise); color: var(--ink); }
.badge--sale { background: var(--rose); color: #fff; }
.badge--new { background: var(--ink); color: var(--surface); }
.badge--hit { background: #FFB4A2; color: #1E1A1B; }
.badge--out { top: auto; bottom: 8px; background: var(--raise); color: var(--ink-2); }
.badge--inline { position: static; display: inline-block; vertical-align: middle; }
.pc__fav, .pc__add { position: relative; display: grid; place-items: center; width: var(--tap); height: var(--tap); }
.pc__fav { color: #1E1A1B; }
.pc__fav .ic { width: 20px; height: 20px; }
.pc__fav.is-on .ic { fill: var(--rose); stroke: var(--rose); }
.pc__add::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--raise); box-shadow: var(--shadow-1); }
.pc__add .ic, .pc__add .num { position: relative; width: 18px; height: 18px; }
.pc__add.is-in::before { background: var(--ink); }
.pc__add.is-in { color: var(--surface); font-weight: 600; font-size: var(--fs-sm); }
.pc__add.is-in .num { width: auto; height: auto; }
.pc__body { display: grid; gap: 2px; padding: 8px 2px 0; }
.pc__brand { font: 600 10.5px/1.25 var(--font-display); letter-spacing: var(--track); text-transform: uppercase; }
.pc__title { font-size: var(--fs-sm); line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; opacity: .86; }
.pc__rate { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-2); }
.pc__rate .ic { width: 13px; height: 13px; color: var(--ink); }
.pc__rate b { color: var(--ink); font-weight: 600; }
.pc__price { font-weight: 600; font-size: var(--fs-md); margin-top: 2px; }
.pc__low { font-size: 12px; color: var(--warning); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid__more { height: 1px; }

/* Плитка, сердце и «+» лежат в одной ячейке сетки: сердце — сверху справа, «+» — снизу справа */
.pc { display: grid; grid-template-rows: auto 1fr; }
.pc__tile, .pc__fav, .pc__add { grid-row: 1; grid-column: 1; }
.pc__fav { align-self: start; justify-self: end; }
.pc__add { align-self: end; justify-self: end; margin: 0 2px 2px 0; }
.pc__body { grid-row: 2; grid-column: 1; }

/* ============================================================ Чипы, сегменты, строки */
.chips { display: flex; gap: 8px; padding: 0 var(--gutter); }
.chips--wrap { flex-wrap: wrap; }
.chips--scroll { overflow-x: auto; scrollbar-width: none; padding-block: 4px 10px; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips.is-clamped { max-height: 148px; overflow: hidden; }   /* три ряда чипов по 44px */
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); background: var(--raise); border: 1px solid var(--line); font-size: var(--fs-sm); white-space: nowrap; }
.chip.is-on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip__n { color: var(--ink-2); font-size: 12px; }
.chip.is-on .chip__n { color: inherit; opacity: .7; }
.chips--lg .chip { min-height: 48px; font-size: var(--fs-md); }
.seg { display: flex; gap: 4px; margin: 14px var(--gutter) 6px; padding: 4px; border-radius: var(--r-pill); background: var(--sunk); }
.seg__b { flex: 1; display: grid; place-items: center; min-height: 44px; border-radius: var(--r-pill); font-weight: 500; font-size: var(--fs-sm); color: var(--ink-2); }
.seg__b.is-on { background: var(--raise); color: var(--ink); box-shadow: var(--shadow-1); }
.seg--sm { margin-inline: 0; }
.row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px var(--gutter); border-bottom: 1px solid var(--line); }
.row > .ic:last-child { width: 18px; height: 18px; color: var(--ink-2); }
.row__img { width: 48px; height: 48px; border-radius: 12px; background: var(--tile); display: grid; place-items: center; padding: 5px; flex: none; }
.row__img img { width: 38px; height: 38px; object-fit: contain; mix-blend-mode: multiply; }
.row__t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row__t b { font-weight: 500; }
.row__t span { font-size: var(--fs-sm); color: var(--ink-2); }
.row--brand { min-height: 56px; }
.row--card { margin: 24px var(--gutter) 0; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--raise); }
.letter { position: sticky; top: 0; padding: 14px var(--gutter) 4px; font: 600 var(--fs-sm) var(--font-display); color: var(--ink-2); background: var(--surface); }
.menu { margin-top: 18px; border-top: 1px solid var(--line); }

/* ============================================================ Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: var(--r-pill); background: var(--signal); color: var(--on-signal); font-weight: 600; font-size: var(--fs-md); white-space: nowrap; }
.btn:disabled { opacity: .45; }
.btn .ic { width: 20px; height: 20px; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--light { background: var(--surface); color: var(--ink); }
.btn--wide { width: 100%; }
.btn--grow { flex: 1; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: var(--fs-sm); font-weight: 500; }
.btn__sub { font-weight: 500; opacity: .75; }
.btn--wide .btn__sub::before { content: "·"; margin-right: 8px; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; min-height: var(--tap); padding: 0 4px; font-size: var(--fs-sm); }

/* ============================================================ Главная */
.quiz-card { margin: 28px var(--gutter) 0; padding: 22px 20px 20px; border-radius: var(--r-card); background: var(--ink); color: var(--surface); display: grid; gap: 8px; justify-items: start; }
.quiz-card h2 { font: 600 var(--fs-xl)/1.2 var(--font-display); }
.quiz-card p { opacity: .82; font-size: var(--fs-sm); }
.quiz-card .btn { margin-top: 8px; }
.concerns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 var(--gutter); }
.concern { display: grid; align-content: space-between; gap: 10px; min-height: 84px; padding: 12px; border-radius: var(--r-tile); background: var(--tile); color: #1E1A1B; font-size: var(--fs-sm); font-weight: 500; line-height: 1.25; }
.concern .ic { width: 18px; height: 18px; opacity: .6; }
.bonus-card { display: grid; gap: 6px; margin: 28px var(--gutter) 0; padding: 20px; border-radius: var(--r-card); background: linear-gradient(120deg, var(--bonus-a), var(--bonus-b)); color: var(--on-bonus); }
.bonus-card b { font: 600 var(--fs-lg)/1.25 var(--font-display); }
.bonus-card > span:not(.caps-s) { font-size: var(--fs-sm); }
.bonus-card__go { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-weight: 600; }
.bonus-card__go .ic { width: 16px; height: 16px; }
/* Карточка игры «Три в ряд»: конфетный градиент игры, четыре баночки, чёрная кнопка «Играть» */
.m3-promo { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 6px 14px; margin: 28px var(--gutter) 0; padding: 16px 18px 18px 12px; border-radius: var(--r-card); background: radial-gradient(90% 120% at 0% 0%, #FFD6E2 0, transparent 60%), linear-gradient(120deg, #FF8FB0, #FFB08A); color: #2A0B1F; }
.m3-promo__jars { grid-row: 1 / 3; display: grid; grid-template-columns: repeat(2, 40px); grid-auto-rows: 40px; gap: 2px; min-height: 82px; }
.m3-promo__jars i { display: block; }
.m3-promo__jars svg { display: block; }
.m3-promo__t { display: grid; gap: 4px; }
.m3-promo__t .caps-s { color: #9E1450; opacity: 1; }
.m3-promo__t b { font: 600 var(--fs-lg)/1.2 var(--font-display); }
.m3-promo__t > span:last-child { font-size: var(--fs-sm); }
.m3-promo__go { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: 40px; margin-top: 4px; padding: 0 14px 0 18px; border-radius: var(--r-pill); background: #1E1A1B; color: #fff; font-weight: 600; font-size: var(--fs-sm); }
.m3-promo__go .ic { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion-paused]) .m3-promo__jars i { animation: m3-drop 520ms cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(var(--k) * 70ms); }
}
@keyframes m3-drop { from { opacity: 0; transform: translateY(-18px) scale(.8); } to { opacity: 1; transform: none; } }
.rail--art { gap: 12px; }
.art { width: 220px; display: grid; gap: 4px; align-content: start; }
.art__img { aspect-ratio: 4 / 3; border-radius: var(--r-tile); overflow: hidden; background: var(--sunk); margin-bottom: 4px; }
.art__img img { width: 100%; height: 100%; object-fit: cover; }
.art b { font-weight: 600; }
.art > span:last-child { font-size: var(--fs-sm); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store { margin: 28px var(--gutter) 0; padding: 18px; border-radius: var(--r-card); background: var(--raise); border: 1px solid var(--line); display: grid; gap: 10px; }
.store__row { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); }
.store__row .ic { width: 18px; height: 18px; color: var(--ink-2); margin-top: 1px; }
.store__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.store__btns .btn { min-height: 46px; padding: 0 10px; font-size: var(--fs-sm); }
.foot { margin: 28px var(--gutter) 0; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.foot a { display: inline-block; min-height: 24px; padding: 2px 0; text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================ Список: инструменты */
.tools { display: flex; gap: 8px; padding: 10px var(--gutter) 14px; overflow-x: auto; scrollbar-width: none; }
.tool { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); background: var(--raise); border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 500; }
.tool .ic { width: 18px; height: 18px; }
.tool__n:not(:empty) { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 11px; }
.sw { position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--sunk); flex: none; transition: background-color var(--dur-quick) var(--ease-out); box-shadow: inset 0 0 0 1px var(--line); }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--raise); box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform var(--dur-base) var(--ease-out); }
[aria-checked="true"] > .sw, input:checked + .sw { background: var(--positive); }
[aria-checked="true"] > .sw::after, input:checked + .sw::after { transform: translateX(14px); }
.fswitch { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-weight: 500; }
.fswitch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fswitch:focus-within .sw { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ============================================================ Шторка */
.sheet { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet.is-open { pointer-events: auto; }
.sheet__back { position: absolute; inset: 0; background: rgb(20 17 18 / .42); opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.sheet.is-open .sheet__back { opacity: 1; }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 86svh; display: flex; flex-direction: column; background: var(--raise); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--shadow-2); transform: translateY(100%); transition: transform 200ms var(--ease-in); outline: 0; }
.sheet.is-open .sheet__panel { transform: none; transition: transform 300ms var(--ease-out); }
.sheet--tall .sheet__panel { height: 86svh; }
.sheet__grab { display: grid; place-items: center; height: 22px; touch-action: none; flex: none; }
.sheet__grab i { width: 40px; height: 4px; border-radius: 2px; background: var(--sunk); }
.sheet__h { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 6px var(--gutter); flex: none; }
.sheet__h h2 { font: 600 var(--fs-lg) var(--font-display); }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gutter) calc(env(safe-area-inset-bottom) + 18px); flex: 1; }
.sheet__body .chips { padding: 0; }
.sheet__foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto 1fr; gap: 8px; margin: 12px calc(-1 * var(--gutter)) calc(-18px - env(safe-area-inset-bottom)); padding: 12px var(--gutter) calc(env(safe-area-inset-bottom) + 12px); background: var(--raise); border-top: 1px solid var(--line); }
.has-sheet { overflow: hidden; }
.fsec { padding: 14px 0 4px; border-top: 1px solid var(--line); }
.fsec h3 { font: 600 var(--fs-sm) var(--font-display); letter-spacing: var(--track); text-transform: uppercase; margin-bottom: 10px; }
.opts { display: grid; gap: 2px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 4px; border-bottom: 1px solid var(--line); text-align: left; }
.opt span { display: grid; }
.opt small { color: var(--ink-2); font-size: var(--fs-sm); }
.opt .ic { opacity: 0; color: var(--positive); }
.opt.is-on .ic { opacity: 1; }
.opt.is-on { font-weight: 600; }
.opts--grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.opt--card { min-height: 64px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--raise); }
.opt--card.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* ============================================================ Тост */
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px); z-index: 70; max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 6px 6px 6px 16px; border-radius: 14px; background: var(--ink); color: var(--surface); font-size: var(--fs-sm); box-shadow: 0 8px 30px rgb(0 0 0 / .2); transform: translateY(12px); opacity: 0; pointer-events: none; transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out); }
.toast.is-on { transform: none; opacity: 1; pointer-events: auto; }
.screen:has(.buybar) ~ .toast, .has-buy .toast { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 84px); }
.toast__btn { min-height: 44px; padding: 0 14px; border-radius: 10px; background: rgb(255 255 255 / .14); font-weight: 600; }

/* ============================================================ Нижняя панель */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(6, 1fr); max-width: 640px; margin: 0 auto; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); border-top: 1px solid var(--line); }
.tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--ink-2); font-size: 10.5px; font-weight: 500; }
.tab .ic { width: 24px; height: 24px; }
.tab.is-on { color: var(--ink); }
.tab.is-on .ic { stroke-width: 2.1; }
.tab__badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: #fff; font: 600 11px/18px var(--font-body); text-align: center; }
.tab__badge[hidden] { display: none; }

/* ============================================================ Карточка товара */
.gallery { position: relative; background: var(--tile); }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__f { flex: none; width: 100%; aspect-ratio: 1 / 1; margin: 0; display: grid; place-items: center; padding: 28px; scroll-snap-align: center; }
.gallery__f img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery__n:not(:empty) { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: var(--r-pill); background: rgb(255 255 255 / .8); color: #1E1A1B; font-size: 12px; font-weight: 600; }
.pdp { display: grid; gap: 10px; padding-top: 18px; }
.pdp__brand { justify-self: start; display: inline-flex; align-items: center; font: 600 var(--fs-sm)/1.2 var(--font-display); letter-spacing: var(--track); text-transform: uppercase; min-height: var(--tap); margin: -10px 0; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.pdp__t { font: 500 var(--fs-xl)/1.3 var(--font-body); }
.pdp__rate { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); margin: -6px 0; font-size: var(--fs-sm); color: var(--ink-2); }
.pdp__rate b { color: var(--ink); }
.stars { display: inline-flex; gap: 1px; color: var(--ink); }
.stars .ic { width: 15px; height: 15px; }
.pdp__price { display: flex; align-items: center; gap: 10px; font: 600 var(--fs-3xl)/1.1 var(--font-body); }
.bonus-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill); background: linear-gradient(100deg, var(--bonus-a), var(--bonus-b)); color: var(--on-bonus); font-size: var(--fs-sm); font-weight: 600; }
.bonus-line .ic { width: 18px; height: 18px; }
.bonus-line .muted { color: inherit; opacity: .75; font-weight: 500; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 500; }
.st .ic { width: 18px; height: 18px; }
.st--ok { color: var(--positive); } .st--low { color: var(--warning); } .st--out { color: var(--ink-2); }
.pdp__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deliv { display: grid; gap: 10px; margin-top: 8px; padding: 14px; border-radius: var(--r-tile); background: var(--raise); border: 1px solid var(--line); font-size: var(--fs-sm); }
.deliv p { display: flex; gap: 10px; }
.deliv .ic { width: 20px; height: 20px; color: var(--ink-2); }
.acc { border-top: 1px solid var(--line); }
.acc:empty { display: none; }
.acc__d summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; list-style: none; cursor: pointer; }
.acc__d summary::-webkit-details-marker { display: none; }
.acc__d summary h2 { font: 600 var(--fs-sm) var(--font-display); letter-spacing: var(--track); text-transform: uppercase; }
.acc__d summary .ic { width: 18px; height: 18px; transition: transform var(--dur-base) var(--ease-out); }
.acc__d[open] summary .ic { transform: rotate(180deg); }
.acc__d--plain summary { min-height: 44px; font-size: var(--fs-sm); }
.rich { font-size: var(--fs-md); line-height: 1.55; padding-bottom: 8px; }
.rich > * + * { margin-top: .7em; }
.rich ul, .rich ol { padding-left: 1.2em; margin: .5em 0; }
.rich li + li { margin-top: .3em; }
.rich h2, .rich h3 { font: 600 var(--fs-lg)/1.3 var(--font-body); margin-top: 1.2em; }
.rich img { border-radius: var(--r-tile); margin: 12px 0; }
.rich a { text-decoration: underline; text-underline-offset: 3px; }
.rich table { border-collapse: collapse; font-size: var(--fs-sm); }
.rich td, .rich th { border: 1px solid var(--line); padding: 6px; }
.rich--clamp { max-height: 9.3em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.dl { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 10px 14px; margin: 0 0 16px; font-size: var(--fs-sm); }
.dl dt { color: var(--ink-2); }
.dl dd { margin: 0; }
.rev-sum { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.rev-sum b { color: var(--ink); font-size: var(--fs-lg); }
.rev { padding: 14px 0; border-top: 1px solid var(--line); }
.rev header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: var(--fs-sm); }
.rev time { margin-left: auto; color: var(--ink-2); font-size: 12px; }
.rev p { font-size: var(--fs-sm); line-height: 1.5; }
.acc .btn--wide { margin: 6px 0 14px; }

/* Ритуал — шаги ухода в карточке */
.ritual { margin-top: 10px; padding: 18px 14px 14px; border-radius: var(--r-card); background: var(--tile); color: #1E1A1B; display: grid; gap: 12px; }
.ritual h2 { font: 600 var(--fs-lg)/1.25 var(--font-display); margin-top: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.step { display: flex; align-items: center; gap: 10px; }
.step__n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1E1A1B; color: #FAF8F6; font-size: 12px; font-weight: 600; flex: none; }
.step.is-self .mini { box-shadow: inset 0 0 0 1.5px #1E1A1B; }
.mini { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; background: #fff; }
.mini img { width: 52px; height: 52px; object-fit: contain; flex: none; }
.mini > span { min-width: 0; display: grid; gap: 1px; font-size: 12.5px; line-height: 1.3; }
.mini em { font-style: normal; font: 600 10.5px var(--font-display); letter-spacing: var(--track); text-transform: uppercase; color: #6A6462; }
.mini b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .num { font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.mini .ic { width: 12px; height: 12px; }
.ritual .btn { background: #1E1A1B; color: #FAF8F6; }
.ritual .note { color: #2E6B4E; }

/* Кнопка покупки над нижней панелью */
.buybar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); z-index: 30; max-width: 640px; margin: 0 auto; display: flex; gap: 8px; padding: 10px var(--gutter); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.buybar:empty { display: none; }
.stepper { display: inline-flex; align-items: center; min-height: 50px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1.5px var(--line); }
.stepper button { display: grid; place-items: center; width: 46px; height: 50px; }
.stepper button:disabled { opacity: .3; }
.stepper b { min-width: 44px; text-align: center; font-weight: 600; }
.stepper--sm { min-height: 44px; }
.stepper--sm button { width: 44px; height: 44px; }
.stepper--sm b { min-width: 24px; }
.stepper--sm .ic { width: 18px; height: 18px; }

/* ============================================================ Корзина */
.free { margin: 0 var(--gutter); padding: 14px; border-radius: var(--r-card); background: var(--raise); border: 1px solid var(--line); display: grid; gap: 10px; }
.free__t { display: flex; align-items: center; gap: 6px; font-size: var(--fs-md); }
.free__t .ic { color: var(--positive); }
.bar-p { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.bar-p i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--bonus-a), var(--bonus-b)); transform-origin: left; transition: transform var(--dur-slow) var(--ease-out); }
.banner { display: flex; align-items: center; gap: 10px; margin: 0 var(--gutter) 12px; padding: 10px 12px; border-radius: var(--r-tile); background: var(--sunk); font-size: var(--fs-sm); }
.banner .ic { flex: none; }
.lines { list-style: none; margin: 8px 0 0; padding: 0; }
.line { display: flex; gap: 12px; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
.line__img { width: 78px; height: 96px; border-radius: 12px; background: var(--tile); padding: 6px; flex: none; display: grid; place-items: center; }
.line__img img { width: 66px; height: 84px; object-fit: contain; mix-blend-mode: multiply; }
.line__b { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: start; }
.line__t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-sm); line-height: 1.3; }
.line__row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.line__sum { font-weight: 600; }
.line__note { font-size: 12px; color: var(--warning); }
.line__note--out { color: var(--danger); }
.line__note a { text-decoration: underline; }
.line.is-out .line__img, .line.is-out .line__sum { opacity: .45; }
.sum { margin: 22px var(--gutter) 0; display: grid; gap: 10px; }
.sum p { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); }
.sum p.muted { display: block; }
.sum__bonus span { display: inline-flex; align-items: center; gap: 6px; }
.sum__bonus .ic { width: 18px; height: 18px; }
.sum__total { padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-lg) !important; font-weight: 600; }
.checkout { display: grid; gap: 8px; margin: 18px var(--gutter) 0; }

/* ============================================================ Бонусы */
.loyal { margin: 0 var(--gutter); padding: 22px 20px; border-radius: var(--r-card); background: linear-gradient(125deg, var(--bonus-a), var(--bonus-b)); color: var(--on-bonus); display: grid; gap: 6px; aspect-ratio: auto; min-height: 196px; align-content: end; position: relative; overflow: hidden; }
.loyal::before { content: "Λ"; position: absolute; right: -6px; top: -34px; font: 700 160px/1 var(--font-display); opacity: .12; }
.loyal--bh, .loyal--bk { background: linear-gradient(125deg, #1E1A1B, #4A3A36 60%, #B3364C); color: #FAF8F6; }
.loyal__t { font: 600 var(--fs-2xl)/1.15 var(--font-display); }
.loyal__p { font-size: var(--fs-sm); opacity: .85; }
.loyal__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.loyal .btn { min-height: 44px; font-size: var(--fs-sm); }
.loyal--bh .btn--light, .loyal--bk .btn--light { background: rgb(255 255 255 / .14); color: inherit; }
.tiers { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 8px; }
.tiers li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-tile); background: var(--raise); border: 1px solid var(--line); font-size: var(--fs-sm); }
.tiers li > b { font: 700 var(--fs-xl) var(--font-display); min-width: 52px; }
.tiers li span { display: grid; color: var(--ink-2); }
.tiers li strong { color: var(--ink); font-weight: 600; }
.tiers li.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sec.pad > .caps-h { margin-bottom: 0; }

/* ============================================================ Подбор */
.quiz { padding-top: 22px; }
.quiz__n { font-size: var(--fs-sm); color: var(--ink-2); }
.quiz__q { font: 600 var(--fs-3xl)/1.15 var(--font-display); margin: 6px 0 8px; }
.quiz .chips { padding: 0; margin-top: 18px; }
.quiz__foot { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); display: flex; gap: 8px; margin-top: 22px; padding: 12px 0; background: var(--surface); }
.quiz .muted.small { margin-top: 18px; }
.shelf { padding-top: 14px; }
.shelf__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
.shelf__steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.shelf__s { padding: 14px 12px 12px; border-radius: var(--r-card); background: var(--tile); color: #1E1A1B; display: grid; gap: 10px; }
.shelf__s header { display: flex; align-items: baseline; gap: 10px; }
.shelf__s header b { font: 600 var(--fs-md) var(--font-display); letter-spacing: .02em; }
.shelf__s header .muted { color: #6A6462; }
.shelf__s .step__n { align-self: center; }
.alts { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.alts::-webkit-scrollbar { display: none; }
.alt { flex: none; width: var(--tap); height: 52px; border-radius: 10px; background: #fff; padding: 4px; box-shadow: inset 0 0 0 1px rgb(30 26 27 / .08); }
.alt img { width: 100%; height: 100%; object-fit: contain; }
.alt.is-on { box-shadow: inset 0 0 0 2px #1E1A1B; }
.shelf__foot { display: grid; gap: 10px; margin-top: 18px; }
.shelf__foot a:not(.btn) { text-decoration: underline; }

/* ============================================================ Статья и информация */
.article { padding-top: 14px; }
.article__img { margin: 0 0 10px; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sunk); }
.article__img img { width: 100%; height: 100%; object-fit: cover; }
.article__t { font: 600 var(--fs-2xl)/1.2 var(--font-display); margin: 8px 0 14px; }
.article__cta { margin-top: 24px; }
.info { padding-top: 16px; }
.info h2 { font: 600 var(--fs-sm) var(--font-display); letter-spacing: var(--track); text-transform: uppercase; margin-top: 1.6em; }
.info + .pad { margin-top: 20px; }

/* ============================================================ Пусто, заметки, скелетоны */
.empty { display: grid; justify-items: center; gap: 10px; padding: 48px 28px; text-align: center; }
.empty > .ic { width: 40px; height: 40px; color: var(--ink-2); stroke-width: 1.4; }
.empty h2 { font: 600 var(--fs-lg) var(--font-display); }
.empty p { color: var(--ink-2); font-size: var(--fs-sm); max-width: 34ch; }
.empty .btn { margin-top: 6px; }
.note { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); padding: 8px 0; }
.note .ic { width: 18px; height: 18px; }
.note--ok { color: var(--positive); font-weight: 500; }
.count { font-size: var(--fs-sm); color: var(--ink-2); margin: 2px 0 10px; }
.count:empty { display: none; }
.sk { background: linear-gradient(90deg, var(--sunk) 25%, var(--tile) 50%, var(--sunk) 75%); background-size: 300% 100%; animation: sk 1.2s linear infinite; border-radius: 10px; }
.sk--line { height: 14px; margin: 10px 0; }
.sk--short { width: 60%; }
.sk--chip { display: inline-block; width: 90px; height: 44px; border-radius: var(--r-pill); }
.sk--row { height: 56px; margin: 8px var(--gutter); border: 0; }
.sk--hero { width: 100%; aspect-ratio: 1; border-radius: 0; }
.pc--sk .pc__tile { background: none; }
.pdp-sk { padding: 0; }
@keyframes sk { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ============================================================ Движение: полёт в корзину и переходы экранов */
.fly { position: fixed; z-index: 90; pointer-events: none; }
.fly img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; background: var(--tile); padding: 8px; box-shadow: 0 10px 30px rgb(0 0 0 / .18); }

/* View Transitions: шапка и панель стоят, экран входит справа (вглубь) или слева (назад); вкладки — проявлением */
#view { view-transition-name: view; }
.tabbar { view-transition-name: tabbar; }
::view-transition-group(tabbar) { animation: none; }
::view-transition-old(view), ::view-transition-new(view) { animation-duration: var(--dur-base); animation-timing-function: var(--ease-out); }
html[data-nav="push"]::view-transition-old(view) { animation-name: vt-out-left; animation-duration: 200ms; animation-timing-function: var(--ease-in); }
html[data-nav="push"]::view-transition-new(view) { animation-name: vt-in-right; }
html[data-nav="pop"]::view-transition-old(view) { animation-name: vt-out-right; animation-duration: 200ms; animation-timing-function: var(--ease-in); }
html[data-nav="pop"]::view-transition-new(view) { animation-name: vt-in-left; }
html[data-nav="tab"]::view-transition-old(view) { animation-name: vt-fade-out; animation-duration: 120ms; }
html[data-nav="tab"]::view-transition-new(view) { animation-name: vt-fade-in; animation-duration: 160ms; }
::view-transition-group(hero) { animation-duration: var(--dur-base); animation-timing-function: var(--ease-out); }
@keyframes vt-in-right { from { transform: translateX(24%); opacity: 0; } }
@keyframes vt-out-left { to { transform: translateX(-8%); opacity: 0; } }
@keyframes vt-in-left { from { transform: translateX(-8%); opacity: 0; } }
@keyframes vt-out-right { to { transform: translateX(24%); opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .pc__tile img { transition: none; }
}

/* Широкий экран (планшет, десктоп): та же колонка приложения по центру */
@media (min-width: 700px) {
  body { background: var(--sunk); }
  .app { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
}
