/* Витрина по макету «Furniture Shopping — Minimal UI Kit»: заголовки с засечками (Gelasio, кириллица — PT Serif),
   текст — Nunito Sans; белый фон, графитовый текст, чёрные кнопки с мягкой тенью, плитки #F5F5F5 радиусом 10–12,
   карточки без подложки, белые панели с размытой тенью. Тёмная тема — то же наоборот.
   Палитры светлой и тёмной темы приходят из админки (templates/ui.html → theme_vars): --bg, --surface, --accent…
   Вид сайта — атрибуты на <html>: data-theme (light | dark | нет — как в системе), data-type (шрифты),
   data-radius, data-density. Поведение (шторки, бегунки, лента) — site.js, классы те же. */

/* ------------------------------------------------------------ шрифты (свои файлы: без внешних запросов) */
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 300; font-display: swap;
  src: url(/static/fonts/nunito-sans-latin-300-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 300; font-display: swap;
  src: url(/static/fonts/nunito-sans-cyrillic-300-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/nunito-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/nunito-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/nunito-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/nunito-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/nunito-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/nunito-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/static/fonts/nunito-sans-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/static/fonts/nunito-sans-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/static/fonts/nunito-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+20A0-20AB, U+20AD-20C0, U+2113; }
/* Gelasio — латиница заголовков; у него нет кириллицы, русские буквы берёт PT Serif того же склада */
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/gelasio-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(/static/fonts/gelasio-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/static/fonts/gelasio-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/static/fonts/pt-serif-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(/static/fonts/pt-serif-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ------------------------------------------------------------ токены */
:root {
  --bg: #121212; --surface: #1c1c1c; --surface-2: #262626; --line: #333333;
  --text: #f2f2f2; --muted: #a3a3a3; --accent: #f2f2f2; --accent-2: #ffffff; --accent-ink: #121212;
  color-scheme: dark;

  --sys: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ui: "Nunito Sans", var(--sys);
  --display: "Gelasio", "PT Serif", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* радиусы макета: картинки и карточки 10, плитки 12, кнопки 10, мелкие кнопки 8 */
  --r-card: 10px; --r-art: 10px; --r-ctl: 10px; --r-tile: 12px; --r-group: 10px; --r-sheet: 24px; --r-btn: 10px; --r-sm: 8px;
  --card-min: 210px; --gap: 16px; --gap-y: 24px;
  --gutter: 20px; --maxw: 1280px; --nav-h: 64px; --tab-h: 64px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --spring: cubic-bezier(.2, .9, .25, 1.12);
}
/* шрифты: как в макете или системный (админка → «Оформление») */
[data-type="system"] { --ui: var(--sys); --display: var(--sys); }
/* скругления */
[data-radius="medium"] { --r-card: 16px; --r-art: 16px; --r-ctl: 14px; --r-tile: 16px; --r-group: 16px; --r-sheet: 28px; --r-btn: 14px; --r-sm: 10px; }
[data-radius="small"] { --r-card: 4px; --r-art: 4px; --r-ctl: 6px; --r-tile: 6px; --r-group: 6px; --r-sheet: 12px; --r-btn: 6px; --r-sm: 4px; }
/* размер карточек */
[data-density="large"] { --card-min: 260px; --gap: 20px; }
[data-density="compact"] { --card-min: 168px; --gap: 12px; --gap-y: 18px; }

/* Цвета, которые зависят от темы, но не от палитры владельца: статусы, тени, затемнение. */
:root, .scheme-dark {
  --ok: #3ccf7d; --warn: #f2a65a; --bad: #ff6b6b; --star: #f2c94c; --scrim: rgba(0, 0, 0, .6);
  --soft-shadow: 0 0 0 transparent;
  --btn-shadow: 0 10px 20px rgba(0, 0, 0, .35);
  --pop-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  --panel: var(--surface); --panel-edge: inset 0 0 0 1px var(--line);
}
:root[data-theme="light"], .scheme-light {
  --ok: #27ae60; --warn: #c26a1b; --bad: #eb5757; --star: #f2c94c; --scrim: rgba(30, 30, 30, .32);
  --soft-shadow: 0 8px 40px rgba(138, 149, 158, .2);
  --btn-shadow: 0 10px 20px rgba(48, 48, 48, .25);
  --pop-shadow: 0 20px 60px rgba(48, 48, 48, .18), 0 2px 8px rgba(48, 48, 48, .06);
  --panel: var(--surface); --panel-edge: 0 0 0 transparent;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --ok: #27ae60; --warn: #c26a1b; --bad: #eb5757; --star: #f2c94c; --scrim: rgba(30, 30, 30, .32);
    --soft-shadow: 0 8px 40px rgba(138, 149, 158, .2);
    --btn-shadow: 0 10px 20px rgba(48, 48, 48, .25);
    --pop-shadow: 0 20px 60px rgba(48, 48, 48, .18), 0 2px 8px rgba(48, 48, 48, .06);
    --panel: var(--surface); --panel-edge: 0 0 0 transparent;
  }
}
/* Производные цвета пересчитываются там, где задана палитра (на странице и в предпросмотре админки). */
:root, .theme-scope {
  --fill: var(--surface-2);                                                    /* плитки и поля, #F5F5F5 макета */
  --fill-2: color-mix(in srgb, var(--surface-2) 88%, var(--text));               /* нажатая плитка, ступеньки «+ −» */
  --fill-3: color-mix(in srgb, var(--muted) 45%, transparent);                   /* рамки, ручка шторки */
  --tint: color-mix(in srgb, var(--accent) 10%, transparent);
  --tint-2: color-mix(in srgb, var(--accent) 18%, transparent);
  --hairline: var(--line);
  /* белая панель макета: в светлой теме — размытая тень, в тёмной — тонкая рамка */
  --card: var(--soft-shadow), var(--panel-edge);
  --float: var(--pop-shadow);
  --edge: var(--panel-edge);
  --ink-2: color-mix(in srgb, var(--text) 78%, var(--bg));                       /* #606060 макета — названия на карточках */
}

/* ------------------------------------------------------------ основа */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); -webkit-tap-highlight-color: transparent; scrollbar-gutter: stable; }
body {
  margin: 0; min-height: 100dvh; color: var(--text); background: var(--bg);
  font: 400 16px/1.5 var(--ui); letter-spacing: 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom, 0px));
  position: relative; isolation: isolate;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--fill-3); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button, a, [role="button"], .card { touch-action: manipulation; }
button, [role="button"], .tab, .chip, .filter-btn, .tag, .seg-btn, .grabber, .nav-btn { -webkit-user-select: none; user-select: none; }
svg { display: block; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
::selection { background: var(--tint-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; flex: none; fill: none; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.price-btn, .gm-price, .pr-field input, .badge, .fb-n, .order-price { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ кнопки и поля */
/* Чёрная кнопка макета: радиус 10, полужирный текст, мягкая тень. Нажатие видно сразу — :active на касание. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: var(--r-btn); font: 600 16px/1.2 var(--ui); text-align: center;
  text-decoration: none; transition: transform 160ms var(--ease-out), opacity 160ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(.97); transition-duration: 80ms; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--btn-shadow); }
/* второстепенная — как «BACK TO HOME»: без заливки, тонкая рамка цвета текста */
.btn-gray { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 70%, transparent); }
.btn-tinted { background: var(--fill); color: var(--text); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); white-space: nowrap; }
.btn-sm.btn-primary { box-shadow: none; }
.btn-lg { min-height: 56px; font-size: 18px; }
.btn-wide { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--bg)); }
  .btn-gray:hover { background: var(--fill); }
  .btn-tinted:hover { background: var(--fill-2); }
}
/* поле как «промокод» макета: белое с мягкой тенью (в тёмной теме — серая плитка) */
.input {
  width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: var(--r-ctl);
  background: var(--fill); color: var(--text); font-size: 16px; outline: none;
  transition: box-shadow 160ms ease, background-color 160ms ease;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { box-shadow: 0 0 0 1.5px var(--text); }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* «закрыть» — просто значок, как «назад» в шапках макета */
.x-btn {
  width: 36px; height: 36px; flex: none; border: 0; border-radius: var(--r-sm); padding: 0; display: grid; place-items: center;
  background: transparent; color: var(--text); transition: transform 140ms var(--ease-out), background-color 160ms ease;
}
.x-btn .ico { width: 14px; height: 14px; }
.x-btn:active { transform: scale(.88); background: var(--fill); }
@media (hover: hover) and (pointer: fine) { .x-btn:hover { background: var(--fill); } }

/* ------------------------------------------------------------ шапка */
.navbar {
  position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top, 0px);
  background-color: var(--bg); box-shadow: 0 1px 0 transparent; transition: box-shadow 250ms ease;
}
.navbar.scrolled { box-shadow: 0 1px 0 var(--hairline), 0 6px 24px -12px rgba(48, 48, 48, .18); }
.navbar-in { display: flex; align-items: center; gap: 12px; height: var(--nav-h); max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto; padding: 0 var(--gutter); }

.brand {
  display: inline-flex; align-items: center; gap: 12px; min-width: 0; margin-left: -6px; padding: 6px 12px 6px 6px; border-radius: var(--r-tile);
  color: var(--text); text-decoration: none; transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.brand:active { transform: scale(.97); }
.brand-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--fill); }
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-name { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font: 700 18px/1.25 var(--display); }
.brand-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-check { width: 16px; height: 16px; flex: none; color: var(--accent); --ico-2: var(--accent-ink); }
.brand-meta { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.brand-meta b { color: var(--text); font-weight: 700; }
.bm-star { width: 13px; height: 13px; color: var(--star); }
.bm-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--fill-3); margin: 0 3px; }
/* счётчики продаж: в шапке — на широком экране, на узком — строкой под заголовком страницы */
.bm-stat { display: inline-flex; align-items: center; gap: 3px; }
.bm-bolt { width: 12px; height: 12px; flex: none; color: var(--star); }
.stats-row { display: none; align-items: center; gap: 4px; margin: -4px 0 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.stats-row span { display: inline-flex; align-items: center; gap: 3px; }
@media (max-width: 759px) { .bm-x { display: none; } .stats-row { display: flex; flex-wrap: wrap; } }
@media (hover: hover) and (pointer: fine) { .brand:hover { background: var(--fill); } }

/* значки справа — как «поиск» и «корзина» в шапке макета: без подложки */
.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.nav-btn {
  position: relative; display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text); font: 700 14px/1 var(--ui); letter-spacing: .04em;
  transition: transform 150ms var(--ease-out), background-color 200ms ease;
}
.nav-btn:active { transform: scale(.9); background: var(--fill); }
@media (hover: hover) and (pointer: fine) { .nav-btn:hover { background: var(--fill); } }
.theme-btn { padding: 0; width: 40px; }
.theme-btn .ico { grid-area: 1 / 1; width: 22px; height: 22px; transition: transform 380ms var(--spring), opacity 220ms ease; }
/* в тёмной теме видна луна, в светлой — солнце; при смене одна уходит поворотом, другая выходит */
.theme-btn .ic-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="light"] .theme-btn .ic-sun, .scheme-light .theme-btn .ic-sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-btn .ic-moon, .scheme-light .theme-btn .ic-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-btn .ic-sun { opacity: 1; transform: none; }
  :root:not([data-theme]) .theme-btn .ic-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
}
.lang-btn { min-width: 44px; }

/* сегментированный выбор (длина юзернейма, админка): серая плитка, выбранное — белая клавиша, бегунок едет пружиной */
.seg { position: relative; display: flex; align-items: center; padding: 3px; border-radius: var(--r-tile); background: var(--fill); isolation: isolate; }
.seg-pill { position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: calc(var(--r-tile) - 3px); background: var(--bg);
  box-shadow: 0 2px 8px rgba(48, 48, 48, .12); opacity: 0; will-change: transform, width; }
.seg.js .seg-pill { opacity: 1; }
.seg > a, .seg-btn {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px;
  border: 0; border-radius: calc(var(--r-tile) - 3px); background: none; color: var(--muted); font: 600 15px/1 var(--ui);
  white-space: nowrap; text-decoration: none; transition: color 200ms ease;
}
.seg > a[aria-current="page"], .seg-btn[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.seg:not(.js) > a[aria-current="page"], .seg:not(.js) .seg-btn[aria-pressed="true"] { background: var(--bg); box-shadow: 0 2px 8px rgba(48, 48, 48, .12); }
/* разделы в шапке компьютера — вкладки макета («Delivered · Processing»): выбранная тёмная, под ней полоска */
.topnav { display: none; }
.topnav.seg { padding: 0; background: none; border-radius: 0; gap: 4px; }
.topnav .seg-pill { top: auto; bottom: 6px; height: 4px; border-radius: 4px; background: none; box-shadow: none; }
.topnav .seg-pill::after { content: ""; position: absolute; left: 16px; right: 16px; top: 0; bottom: 0; border-radius: inherit; background: var(--text); }
.topnav > a { height: var(--nav-h); padding: 0 16px; border-radius: 0; font-size: 17px; font-weight: 600; color: var(--muted); }
.topnav > a[aria-current="page"] { color: var(--text); font-weight: 700; }
.topnav:not(.js) > a[aria-current="page"] { background: none; box-shadow: inset 0 -4px 0 -0px var(--text); }
@media (hover: hover) and (pointer: fine) { .topnav > a:hover { color: var(--text); } }

/* ------------------------------------------------------------ заголовок и плашки */
.hero { padding: 12px 0 4px; }
.large-title { font: 700 32px/1.15 var(--display); margin: 0 0 18px; overflow-wrap: anywhere; }
/* плашка — белая панель макета («My orders · Already have 10 orders») */
.trust {
  display: flex; align-items: center; gap: 16px; width: 100%; margin: 0 0 18px; padding: 16px 18px;
  border-radius: var(--r-group); background: var(--panel); box-shadow: var(--card);
}
.trust-ico { width: 32px; height: 32px; color: var(--accent); --ico-2: var(--accent-ink); }
.trust p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.trust b { display: block; color: var(--text); font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.note { margin: 0 0 18px; padding: 14px 18px; border-radius: var(--r-group); font-size: 14px; line-height: 1.45; color: var(--muted);
  background: var(--fill); }
.note-warn { color: var(--text); background: color-mix(in srgb, var(--warn) 14%, var(--bg)); }
.note-warn b { font-weight: 700; color: var(--warn); }

/* ------------------------------------------------------------ лента продаж — строки «Избранного» макета */
.sales { margin: 0 0 22px; }
.sales-title { margin: 0 0 10px; font: 600 15px/1.2 var(--ui); color: var(--muted); }
.sales-list { list-style: none; display: flex; gap: 12px; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 18px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch; }
.sales-list::-webkit-scrollbar { display: none; }
.sale { flex: none; display: flex; align-items: center; gap: 12px; width: 252px; padding: 10px 14px 10px 10px; border-radius: var(--r-card);
  background: var(--panel); box-shadow: var(--card); scroll-snap-align: start; }
.sale-art { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-art); overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--c1, var(--fill-2)), var(--c2, var(--fill)) 90%); }
.sale-art img { width: 50px; height: 50px; object-fit: contain; }
.sale-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.sale-txt > b { font-size: 14px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-txt > b small { color: var(--muted); font-weight: 400; font-size: 12px; }
.sale-txt > span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-meta b { color: var(--text); font-weight: 800; }

/* ------------------------------------------------------------ поиск и фильтры */
.toolbar { margin-bottom: 22px; }
.searchrow { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: column; grid-auto-columns: 48px; gap: 10px; align-items: center; }
.search { position: relative; display: block; }
.search-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search .input { height: 48px; padding: 0 42px 0 46px; border-radius: var(--r-ctl); font-size: 16px; background: var(--panel); box-shadow: var(--card); }
.search .input:focus { box-shadow: var(--card), 0 0 0 1.5px var(--text); }
.search .input:placeholder-shown { padding-right: 12px; }    /* пока пусто, крестика нет — подсказке больше места */
.search-clear {
  position: absolute; right: 12px; top: 0; bottom: 0; margin: auto 0; width: 22px; height: 22px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; background: var(--fill-2); color: var(--text);
}
.search-clear .ico { width: 9px; height: 9px; }
/* значки рядом с поиском — плитки категорий макета: серые, выбранная — тёмная */
.icon-btn {
  position: relative; width: 48px; height: 48px; border-radius: var(--r-tile); border: 0; padding: 0; display: grid; place-items: center;
  background: var(--fill); color: var(--muted); transition: transform 150ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.icon-btn .ico { width: 22px; height: 22px; }
.icon-btn:active { transform: scale(.92); }
.icon-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.icon-btn[aria-pressed="true"] .ico { fill: currentColor; }
.badge:empty { display: none; }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font: 800 11px/20px var(--ui); font-style: normal; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.icon-btn[aria-pressed="true"] .badge { background: var(--bg); color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--fill); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: var(--fill-2); color: var(--text); }
  .icon-btn[aria-pressed="true"]:hover { background: var(--accent); color: var(--accent-ink); }
}
/* автообновление: включено — плитка тёмная, кольцо заполняется к следующему обновлению, в значке — секунды */
.live-btn.on { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .live-btn.on:hover { background: var(--accent); color: var(--accent-ink); } }
.live-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.live-ring circle { fill: none; stroke: var(--accent-ink); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 116.9;
  stroke-dashoffset: 116.9; opacity: 0; transition: opacity 200ms ease; transform-origin: 50% 50%; transform: scale(.78); }
.live-btn.on .live-ring circle { opacity: .55; }
.live-btn.tick .live-ring circle { animation: liveRing var(--live-dur, 5s) linear forwards; }
@keyframes liveRing { from { stroke-dashoffset: 116.9; } to { stroke-dashoffset: 0; } }
/* «Новые предложения» — тёмная капсула под шапкой, когда посетитель пролистал вниз */
.live-pill {
  position: fixed; z-index: 45; left: 50%; top: calc(env(safe-area-inset-top, 0px) + var(--nav-h) + 12px);
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 18px 0 14px; border: 0; border-radius: var(--r-btn);
  background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--ui); white-space: nowrap;
  box-shadow: var(--btn-shadow); transform: translateX(-50%); animation: pillIn 260ms var(--ease-out);
  transition: transform 140ms var(--ease-out);
}
.live-pill .ico { width: 16px; height: 16px; }
.live-pill:active { transform: translateX(-50%) scale(.95); }
@keyframes pillIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.96); } }

/* подсказки поиска — белая панель под полем */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; margin: 0; padding: 6px; list-style: none;
  border-radius: var(--r-ctl); background: var(--panel); box-shadow: var(--float), var(--panel-edge);
  max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain;
}
.suggest li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.suggest li[aria-selected="true"] { background: var(--fill); }
@media (hover: hover) and (pointer: fine) { .suggest li:hover { background: var(--fill); } }
.suggest img, .suggest .sg-ph { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: contain; padding: 2px; flex: none; background: var(--fill); }
.sg-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sg-txt b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-txt span { font-size: 13px; color: var(--muted); }
.sg-pr { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }

/* фильтры — плитки категорий макета в одну строку с прокруткой: серые, выбранная — тёмная */
.filterrow { display: flex; gap: 10px; margin: 14px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filterrow::-webkit-scrollbar { display: none; }
.filter-btn, .tag {
  flex: none; display: inline-flex; align-items: center; gap: 8px; max-width: 240px; height: 44px; padding: 0 14px 0 16px;
  border: 0; border-radius: var(--r-tile); background: var(--fill); color: var(--muted); font: 600 15px/1 var(--ui);
  transition: transform 150ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.tag { padding: 0 16px; }
.filter-btn:active, .tag:active { transform: scale(.95); }
.filter-btn.on, .tag[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.filter-btn.off { opacity: .55; }          /* модели — только после выбора коллекции */
.fb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-n:empty { display: none; }
.fb-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-ink); color: var(--accent);
  font: 800 11px/20px var(--ui); font-style: normal; text-align: center; }
.fb-chev { width: 12px; height: 12px; opacity: .7; }
.fb-lead { flex: none; width: 24px; height: 24px; margin-left: -6px; border-radius: 6px; object-fit: contain; }
.fb-lead.round { border-radius: 50%; }
@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover, .tag:hover { background: var(--fill-2); color: var(--text); }
  .filter-btn.on:hover, .tag[aria-pressed="true"]:hover { background: var(--accent); color: var(--accent-ink); }
}

/* разделы каталога: «Все подарки» · «Монохромные» — сегменты с бегунком над поиском */
.sections { display: inline-flex; max-width: 100%; margin-bottom: 14px; }
.sections .seg-btn { flex: none; gap: 8px; height: 40px; padding: 0 18px 0 14px; }
.sections .seg-btn .ico { flex: none; width: 18px; height: 18px; }
.sections .seg-btn span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) {
  .sections { display: flex; }
  .sections .seg-btn { flex: 1 1 0; padding: 0 10px; }
}

/* «Монохромные» по цветам: плитка с кнопками цветов (выбранная — тёмная, как фильтры), у каждой — счётчик */
.mono-panel { margin-top: 14px; padding: 14px 16px 16px; border-radius: var(--r-tile); background: var(--fill); }
.mono-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 15px/1.2 var(--ui); color: var(--text); }
.mono-head .ico { flex: none; width: 18px; height: 18px; }
.mono-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.mc {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 0;
  border-radius: var(--r-sm); background: var(--bg); color: var(--text); font: 600 14px/1 var(--ui); white-space: nowrap;
  transition: transform 150ms var(--ease-out), background-color 200ms ease, color 200ms ease, opacity 200ms ease;
}
.mc:active { transform: scale(.95); }
.mc[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.mc.zero:not([aria-pressed="true"]) { opacity: .5; }
.mc-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.mc-n:empty { display: none; }
.mc-n::before { content: "·"; margin-right: 5px; }
.mc[aria-pressed="true"] .mc-n { color: inherit; opacity: .7; }
@media (hover: hover) and (pointer: fine) { .mc:not([aria-pressed="true"]):hover { background: var(--fill-2); } }
/* на телефоне цвета — одной строкой с прокруткой, как фильтры */
@media (max-width: 599px) {
  .mono-panel { padding: 12px 0 14px; }
  .mono-head { padding: 0 14px; }
  .mono-colors { flex-wrap: nowrap; overflow-x: auto; padding: 0 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mono-colors::-webkit-scrollbar { display: none; }
}
/* кружок цвета: у «Все цвета» — все цвета по кругу */
.mc-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, #9a9ea6);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.mc-dot[data-c="gray"] { --dot: #9a9ea6; }
.mc-dot[data-c="purple"] { --dot: #a36ee6; }
.mc-dot[data-c="pink"] { --dot: #e47cb0; }
.mc-dot[data-c="red"] { --dot: #e5534b; }
.mc-dot[data-c="orange"] { --dot: #ef8a3c; }
.mc-dot[data-c="yellow"] { --dot: #e5b53e; }
.mc-dot[data-c="green"] { --dot: #5bbf72; }
.mc-dot[data-c="teal"] { --dot: #36b8ad; }
.mc-dot[data-c="blue"] { --dot: #4c8fe6; }
.mc-dot[data-c="brown"] { --dot: #9b6a4e; }
.mc-dot[data-c="all"] { background: conic-gradient(#e5534b, #ef8a3c, #e5b53e, #5bbf72, #36b8ad, #4c8fe6, #a36ee6, #e47cb0, #e5534b); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 14px; border-radius: var(--r-sm); border: 0;
  background: var(--fill); color: var(--text); font: 600 14px/1 var(--ui);
  transition: transform 150ms var(--ease-out), background-color 200ms ease;
}
.chip:active { transform: scale(.95); }
.chip i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); }
.chip .ico { width: 8px; height: 8px; }
.chip-reset { padding: 0 12px; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .chip:hover { background: var(--fill-2); } .chip-reset:hover { background: none; color: var(--text); } }

/* длина юзернейма */
.len-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.len-label { flex: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.seg-len { flex: 1; min-width: 0; }
.seg-len .seg-btn { padding: 0 6px; }

/* ------------------------------------------------------------ лента и карточки */
/* Карточка товара макета: без подложки — картинка с радиусом 10, под ней название серым и цена жирным,
   справа тёмная кнопка-пакет. */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-y) var(--gap); }
[data-density="compact"] .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border-radius: var(--r-card);
  background: none; cursor: pointer; text-align: left; transition: transform 220ms var(--ease-out);
}
/* длинная лента (сотни карточек): браузер рисует только то, что рядом с экраном */
.grid > .card { content-visibility: auto; contain-intrinsic-size: auto 300px; }
/* автообновление: новые карточки проявляются, у изменившейся цены — короткая подсветка (дешевле — зелёным) */
.card.card-in { animation: cardIn 300ms var(--ease-out) both; }
@keyframes cardIn { from { opacity: 0; transform: scale(.96); } }
.price-btn.bump-down { animation: bumpDown 1.6s ease-out; }
.price-btn.bump-up { animation: bumpUp 1.6s ease-out; }
@keyframes bumpDown { 0%, 35% { color: var(--ok); } }
@keyframes bumpUp { 0%, 35% { color: var(--bad); } }
.card:active { transform: scale(.97); transition-duration: 90ms; }
.art {
  position: relative; aspect-ratio: 1; border-radius: var(--r-art); overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, var(--c1, #e8e8e8), var(--c2, #c9c9c9) 82%); isolation: isolate;
}
/* узор: значки-маски, залитые цветом узора фона */
.art .pat { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms ease; pointer-events: none; }
.art .pat.on { opacity: 1; }
.art .pat i { position: absolute; transform: translate(-50%, -50%); background: var(--cp, rgba(0, 0, 0, .45));
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center; }
/* модель — по центру, без фона */
.art img.model, .art .lottie { position: absolute; left: 50%; top: 50%; width: 70%; height: 70%; transform: translate(-50%, -50%);
  object-fit: contain; -webkit-touch-callout: none; user-select: none; }
.art img.model { opacity: 0; transition: opacity 300ms ease, transform 420ms var(--ease-out); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .28)); }
.art.ready img.model { opacity: 1; }
.art.animated img.model { visibility: hidden; }
/* запасной вариант — готовая картинка Fragment на всю карточку, свой узор не нужен */
.art.full .pat { display: none; }
.art.full img.model { left: 0; top: 0; width: 100%; height: 100%; transform: none; object-fit: cover; filter: none; }
.art .ph { width: 40%; height: 40%; color: rgba(255, 255, 255, .85); }
.art .lottie svg { width: 100% !important; height: 100% !important; }
.art .lottie.scene { left: 0; top: 0; width: 100%; height: 100%; transform: none; }

/* значок крафта — в левом нижнем углу картинки: затемнённый круг и белая наковальня */
.craft {
  position: absolute; z-index: 2; left: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .28); cursor: help;
}
.craft .ico { width: 16px; height: 16px; }
.craft.mini, .craft-legend .craft { position: relative; left: auto; bottom: auto; display: inline-grid; vertical-align: -6px; cursor: default; }
.craft.mini { width: 22px; height: 22px; margin: 0 2px; border-radius: 6px; }
.craft.mini .ico { width: 13px; height: 13px; }
.craft.mini.craftable, .craft-legend .craftable { background: #6a5cf0; }
.craft.mini.crafted, .craft-legend .crafted { background: #2f9e95; }

/* «Монохромные»: цвет подарка — плашка в левом верхнем углу картинки */
.mono-tag {
  position: absolute; z-index: 2; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 56px);
  height: 24px; padding: 0 9px 0 7px; border-radius: 12px; background: rgba(0, 0, 0, .32); color: #fff;
  font: 700 12px/1 var(--ui); white-space: nowrap; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mono-tag span { overflow: hidden; text-overflow: ellipsis; }
.mono-tag .mc-dot { width: 8px; height: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
[data-density="compact"] .mono-tag { left: 6px; top: 6px; height: 22px; font-size: 11px; }

/* «В избранное» поверх картинки — белая квадратная кнопка, как «назад» на странице товара макета */
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: var(--r-sm); border: 0; padding: 0;
  display: grid; place-items: center; color: #303030; background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12); transition: background-color 200ms ease, color 200ms ease, transform 150ms var(--ease-out);
}
.fav-btn:active { transform: scale(.9); }
.fav-btn .ico { width: 16px; height: 16px; }
.fav-btn[aria-pressed="true"], .fav-btn.on { background: #242424; color: #fff; }
.fav-btn[aria-pressed="true"] .ico, .fav-btn.on .ico { fill: currentColor; }

.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 10px 0 0; }
.c-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; font: 600 15px/1.35 var(--ui); color: var(--ink-2); }
.c-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-title small { flex: none; color: var(--muted); font-weight: 400; font-size: 13px; }
.c-attr { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.4; white-space: nowrap; }
.c-attr span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-attr .sw { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c1); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15); }
/* цена жирным слева, справа — тёмная кнопка «в пакет»: вся строка — кнопка покупки */
.price-btn {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 34px;
  margin-top: auto; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text); font: 800 17px/1 var(--ui); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 200ms ease;
}
.price-btn::before { content: ""; order: 2; flex: none; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--accent);
  transition: transform 150ms var(--ease-out), background-color 200ms ease; }
.price-btn::after { content: ""; position: absolute; right: 8px; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: var(--accent-ink);
  -webkit-mask: var(--bag) center / contain no-repeat; mask: var(--bag) center / contain no-repeat; transition: transform 150ms var(--ease-out); }
:root { --bag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.2 8h13.6l-1.1 11.3a1.6 1.6 0 0 1-1.6 1.5H7.9a1.6 1.6 0 0 1-1.6-1.5z'/%3E%3Cpath d='M9 10.5V7a3 3 0 0 1 6 0v3.5'/%3E%3C/svg%3E"); }
.price-btn:active::before, .price-btn:active::after { transform: scale(.9); }
.price-btn.na { color: var(--muted); font-weight: 600; }
.price-btn.na::before, .price-btn.na::after { display: none; }
.card-body > :nth-last-child(2) { margin-bottom: 10px; }   /* отступ над ценой; сама строка прижата к низу */
@media (hover: hover) and (pointer: fine) {
  .card:hover .art img.model { transform: translate(-50%, -50%) scale(1.06); }
  .card:hover .art.full img.model { transform: scale(1.04); }
  .card:hover .art { box-shadow: 0 14px 30px -16px var(--c2, rgba(0, 0, 0, .5)); }
  .card .art { transition: box-shadow 260ms ease; }
  .card:active { transform: scale(.98); }
  .price-btn:hover::before { background-color: color-mix(in srgb, var(--accent) 82%, var(--bg)); }
}
[data-density="compact"] .c-title { font-size: 14px; }
[data-density="compact"] .price-btn { font-size: 15px; min-height: 30px; }
[data-density="compact"] .price-btn::before { width: 30px; height: 30px; }
[data-density="compact"] .price-btn::after { right: 7px; width: 16px; height: 16px; margin-top: -8px; }
[data-density="compact"] .fav-btn { top: 6px; right: 6px; width: 28px; height: 28px; }
[data-density="compact"] .craft { left: 6px; bottom: 6px; width: 24px; height: 24px; }
[data-density="compact"] .craft .ico { width: 14px; height: 14px; }

.skeleton { border-radius: var(--r-card); aspect-ratio: .74; background:
  linear-gradient(var(--fill), var(--fill)) top / 100% 74% no-repeat,
  linear-gradient(var(--fill), var(--fill)) 0 82% / 70% 6% no-repeat,
  linear-gradient(var(--fill), var(--fill)) 0 96% / 40% 7% no-repeat;
  position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 55%, transparent), transparent); animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* пустое состояние */
.empty { margin: 24px 0; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.5; }
.empty b { display: block; color: var(--text); font: 700 24px/1.25 var(--display); margin-bottom: 8px; }
.empty .btn { margin-top: 20px; }
/* индикатор загрузки */
.more { display: flex; justify-content: center; padding: 28px; }
.more::before { content: ""; width: 24px; height: 24px; border-radius: 50%;
  border: 2.5px solid var(--fill-2); border-top-color: var(--text); animation: spin .7s linear infinite; }
.sentinel { height: 1px; }

/* ------------------------------------------------------------ юзернеймы */
.u-art { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--text) 18%, var(--fill)), var(--fill) 86%); }
.u-plate {
  max-width: 86%; padding: 9px 14px; border-radius: var(--r-sm); color: var(--text);
  background: var(--bg); box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  font: 700 15px/1.15 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.u-art-lg .u-plate { font: 700 24px/1.2 var(--display); padding: 14px 20px; white-space: normal; word-break: break-all; text-align: center; }
.c-domain { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ шторки и окна (site.js двигает их пружиной и пальцем) */
.sheet, .modal { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop, .modal-backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; will-change: opacity; }
.sheet-panel, .modal-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; gap: 16px; padding: 8px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--bg); box-shadow: 0 -10px 40px rgba(0, 0, 0, .12), var(--panel-edge);
  transform: translate3d(0, 110%, 0); will-change: transform; overscroll-behavior: contain;
}
.modal-card { display: block; overflow-y: auto; padding: 8px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px)); }
.sheet-compact { overflow-y: auto; }
.sheet-panel:not(.sheet-compact) { height: calc(100dvh - 40px - env(safe-area-inset-top, 0px)); }
.grabber { position: relative; flex: none; width: 40px; height: 4px; margin: 2px auto 0; border-radius: 4px; background: var(--fill-3); touch-action: none; cursor: grab; }
.grabber::before { content: ""; position: absolute; inset: -10px -40px -14px; }   /* зона хвата больше самой полоски */
[data-drag] { touch-action: none; }
/* шапка шторки — как шапки экранов макета: заголовок с засечками по центру */
.sheet-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 8px; min-height: 40px; }
.sheet-head h2 { grid-column: 2; text-align: center; font: 700 19px/1.3 var(--display); }
.sheet-head .x-btn { grid-column: 3; }
.search-sm .input { height: 44px; padding-left: 44px; box-shadow: none; background: var(--fill); }
.search-sm .search-ico { left: 14px; }
.sheet-hint { margin: -6px 2px 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* списки — строки на одной подложке, разделители с отступом */
.group-label { margin: 4px 2px -8px; font: 600 15px/1.3 var(--ui); color: var(--muted); }
.group { background: var(--panel); border-radius: var(--r-group); overflow: hidden; box-shadow: var(--card); }
.sheet-panel .group, .modal-card .group { box-shadow: none; background: var(--fill); }
.opt-list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-panel .opt-list { background: none; border-radius: 0; }
.opt-list > li { position: relative; }
.opt-list > li:not(:last-child)::after { content: ""; position: absolute; left: 64px; right: 0; bottom: 0; height: 1px; background: var(--hairline); pointer-events: none; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 4px; cursor: pointer; border-radius: var(--r-sm); transition: background-color 150ms ease; }
.opt:active { background: var(--fill); }
@media (hover: hover) and (pointer: fine) { .opt:hover { background: var(--fill); } }
.opt-lead { flex: none; width: 44px; height: 44px; border-radius: var(--r-art); object-fit: cover; background: var(--fill); display: grid; place-items: center;
  font: 700 18px/1 var(--display); color: var(--muted); }
img.opt-lead { object-fit: contain; padding: 3px; }
.opt-lead.round { width: 32px; height: 32px; margin: 0 6px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.opt-txt b { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-txt span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; }
.opt-meta .rar { color: var(--muted); }
.opt-meta .pr { color: var(--text); font-weight: 700; }
/* выбор — квадратный флажок макета («Use as the shipping address»): тёмный с белой галочкой */
.opt input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0 4px 0 0; border-radius: 5px;
  border: 1.5px solid var(--fill-3); display: grid; place-items: center; transition: background-color 150ms ease, border-color 150ms ease; }
.opt input:checked { background: var(--accent); border-color: var(--accent); }
.opt input:checked::after { content: ""; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2.2px 2.2px 0; transform: translateY(-1px) rotate(45deg); }
.opt-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 15px; }
/* фоны группами по цвету: заголовок группы прилипает к верху списка */
.opt-list > li.opt-group { position: sticky; top: 0; z-index: 1; padding: 14px 4px 6px; background: var(--bg);
  font-size: 14px; font-weight: 700; color: var(--muted); }
.opt-list > li.opt-group::after { left: 4px; }
.radio-hint { margin: 0 auto 0 8px; font-size: 13px; color: var(--muted); }
.sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.sheet-foot .btn { min-height: 52px; }

/* сортировка: строка с галочкой у выбранной */
.radio-list { display: flex; flex-direction: column; }
.radio { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px;
  border: 0; background: none; color: var(--text); font-size: 16px; font-weight: 600; text-align: left; transition: background-color 150ms ease; }
.radio:active { background: var(--fill-2); }
.radio:not(:last-child)::before { content: ""; position: absolute; left: 16px; right: 0; bottom: 0; height: 1px; background: var(--hairline); }
.radio::after { content: ""; flex: none; width: 7px; height: 13px; margin-right: 4px; border: solid var(--text); border-width: 0 2.5px 2.5px 0;
  transform: translateY(-2px) rotate(45deg); opacity: 0; transition: opacity 150ms ease; }
.radio[aria-checked="true"]::after { opacity: 1; }
.price-range { display: flex; flex-direction: column; gap: 16px; }
.pr-row { display: flex; align-items: center; gap: 10px; }
.pr-field { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border-radius: var(--r-ctl);
  background: var(--fill); cursor: text; transition: box-shadow 160ms ease; }
.pr-field:focus-within { box-shadow: 0 0 0 1.5px var(--text); }
.pr-field span { color: var(--muted); font-size: 15px; }
.pr-field input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; outline: none; font-size: 17px; font-weight: 700; caret-color: var(--text); }
.pr-field input::placeholder { color: var(--muted); font-weight: 400; }
.pr-dash { flex: none; width: 10px; height: 2px; background: var(--muted); border-radius: 2px; }

/* ------------------------------------------------------------ карточка подарка — страница товара макета */
.modal-x { position: absolute; top: 18px; right: calc(var(--gutter) + 8px); z-index: 4; width: 40px; height: 40px;
  background: var(--bg); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .14); }
@media (hover: hover) and (pointer: fine) { .modal-x:hover { background: var(--bg); } }
.gm-stage { position: relative; width: 100%; max-width: 420px; margin: 10px auto 20px; }
/* картинка с большим скруглением слева внизу — фирменная деталь макета */
.gm-art { border-radius: var(--r-art) var(--r-art) var(--r-art) calc(var(--r-art) * 5); box-shadow: 0 28px 60px -30px var(--c1, rgba(0, 0, 0, .6)); }
.gm-art .craft { left: auto; right: 14px; bottom: 14px; width: 34px; height: 34px; }
.gm-art .craft .ico { width: 18px; height: 18px; }
.gm-title { text-align: left; font: 700 26px/1.2 var(--display); overflow-wrap: anywhere; }
.gm-title small { font: 400 16px var(--ui); color: var(--muted); margin-left: 8px; }
.gm-craft { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.gm-craft .craft { position: static; width: 24px; height: 24px; }
.gm-craft .craft .ico { width: 14px; height: 14px; }
.gm-craft.craftable .craft { background: #6a5cf0; }
.gm-craft.crafted .craft { background: #2f9e95; }
.um-domain { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.traits { margin: 18px 0 0; }
.modal-card .traits { background: none; border-radius: 0; }
.traits div { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0; }
.traits div:not(:last-child)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hairline); }
.traits dt { flex: none; width: 84px; color: var(--muted); font-size: 15px; }
.traits dd { flex: 1; min-width: 0; margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.traits dd span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.traits .sw { flex: none; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.traits .rar { flex: none; margin-left: auto; padding: 4px 8px; border-radius: 6px; font: 700 12px/1.2 var(--ui); font-style: normal;
  color: var(--text); background: var(--fill); }
/* цена — как «$ 50» на странице товара: крупно и жирно */
.gm-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.gm-price { margin: 0; font: 800 32px/1 var(--ui); white-space: nowrap; }
.gm-status { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border-radius: 6px; font-size: 13px; font-weight: 700;
  color: var(--muted); background: var(--fill); }
.gm-status:empty { display: none; }
.gm-status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.gm-status.ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gm-status.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.fee-note { margin: 10px 0 20px; font-size: 14px; line-height: 1.5; color: var(--muted); font-weight: 300; }
.fee-note.center { text-align: center; margin: 4px 0 0; }
/* ход заказа — белая панель с шагами, как итог в «Check out» */
.lot-box { margin: 16px 0 0; padding: 16px 18px; border-radius: var(--r-group); background: var(--panel); box-shadow: var(--card); }
.lot-box.ok { box-shadow: var(--card), inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 55%, transparent); }
.lot-box.bad { box-shadow: var(--card), inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 55%, transparent); }
.lot-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.lot-steps li { display: flex; align-items: center; gap: 10px; }
.lot-steps li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--fill-3); box-sizing: border-box; }
.lot-steps li.now { color: var(--text); font-weight: 600; }
.lot-steps li.now::before { border-color: var(--text); border-top-color: transparent; animation: spin .8s linear infinite; }
.lot-steps li.done { color: var(--text); }
.lot-steps li.done::before { border: 0; background: var(--ok) no-repeat center / 12px 12px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.lot-msg { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.lot-box.bad .lot-msg { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }
/* кнопки — как низ страницы товара: квадратная «в избранное» слева и большая тёмная кнопка справа */
.modal-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.modal-actions:has(> .gm-fav) { grid-template-columns: 56px minmax(0, 1fr); }
.modal-actions > :not(.gm-fav) { grid-column: -2; }
.modal-actions .gm-fav { position: static; grid-column: 1; grid-row: 1; width: 56px; height: 56px; border-radius: var(--r-btn);
  background: var(--fill); color: var(--text); box-shadow: none; }
.modal-actions .gm-fav .ico { width: 22px; height: 22px; }
.modal-actions .gm-fav[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .modal-actions .gm-fav:hover { background: var(--fill-2); } .modal-actions .gm-fav[aria-pressed="true"]:hover { background: var(--accent); } }

/* ------------------------------------------------------------ страница заказа (/order/<id>): вкладка после «Купить» */
.order-page { padding: 0; }
.order-wrap { min-height: 100dvh; display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); }
.order-card { width: 100%; max-width: 440px; padding: 32px 24px 24px; border-radius: calc(var(--r-group) + 6px); background: var(--panel); box-shadow: var(--card); }
.order-kicker { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--muted); }
.order-title { margin: 0; font: 700 28px/1.2 var(--display); overflow-wrap: anywhere; }
.order-price { margin: 12px 0 0; font: 800 30px/1 var(--ui); }
.order-card .lot-box { margin: 22px 0 22px; background: var(--fill); box-shadow: none; }
.order-card .lot-box.ok { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 55%, transparent); }
.order-card .lot-box.bad { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 55%, transparent); }
/* выдан — как «Success!» макета: по центру, заглавные с засечками, рисунок на серой капле, зелёная галочка */
.order-done { text-align: center; margin: 0 0 18px; }
.od-title { margin: 0 0 14px; font: 700 34px/1.15 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.od-art { width: 200px; height: auto; margin: 0 auto; }
.od-blob { fill: var(--fill); }
.od-line { stroke: var(--text); }
.od-ok { fill: var(--ok); }
.order-card.is-done { text-align: center; }
.order-card.is-done .order-kicker { display: none; }
.order-card.is-done .order-title { font-size: 20px; }
.order-card.is-done .order-price { margin-top: 6px; font-size: 18px; font-weight: 700; color: var(--muted); }
.order-card.is-done #ord-steps { display: none; }
.order-card.is-done .lot-box { background: none; box-shadow: none; padding: 0; margin: 16px 0 24px; }
.order-card.is-done .lot-msg { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); }
.order-card.is-done #ord-back { background: var(--accent); color: var(--accent-ink); box-shadow: var(--btn-shadow); }

/* ------------------------------------------------------------ таб-бар — нижняя панель макета: значки без подписей */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; padding: 0 12px env(safe-area-inset-bottom, 0px); isolation: isolate;
  background: var(--bg); box-shadow: 0 -1px 0 var(--hairline), 0 -8px 30px rgba(48, 48, 48, .06);
}
/* бегунок — короткая полоска под выбранным значком, едет пружиной (site.js) */
.tab-pill { position: absolute; z-index: -1; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); left: 0; width: 0; height: 4px; opacity: 0;
  will-change: transform, width; }
.tab-pill::after { content: ""; position: absolute; left: 50%; top: 0; width: 18px; height: 4px; margin-left: -9px; border-radius: 4px; background: var(--text); }
.tabbar.js .tab-pill { opacity: 1; }
.tab {
  position: relative; flex: 1 1 0; max-width: 140px; min-width: 0; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none; transition: transform 160ms var(--ease-out), color 200ms ease;
}
.tab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tab:active { transform: scale(.9); }
.tab .ico { width: 26px; height: 26px; margin-bottom: 6px; }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] .ico { stroke-width: 2.2; }
.tabbar:not(.js) .tab[aria-current="page"]::after { content: ""; position: absolute; bottom: 10px; width: 18px; height: 4px; border-radius: 4px; background: var(--text); }

/* уведомление — тёмная капсула сверху, въезжает пружиной */
.toast {
  position: fixed; left: 0; right: 0; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 90;
  width: fit-content; max-width: min(calc(100% - 32px), 460px); margin: 0 auto; padding: 13px 20px; border-radius: var(--r-btn); transform: translate3d(0, -150%, 0);
  background: var(--accent); color: var(--accent-ink); box-shadow: var(--btn-shadow);
  font-size: 15px; font-weight: 600; line-height: 1.35; text-align: center; will-change: transform;
}

/* ------------------------------------------------------------ «Как купить» */
.help-intro p { max-width: 62ch; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; font-weight: 300; }
.help-tabs { display: flex; gap: 10px; margin: 18px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter); max-width: none; overflow-x: auto; scrollbar-width: none; }
.help-tabs::-webkit-scrollbar { display: none; }
.help-tabs a { flex: none; display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: var(--r-tile); background: var(--fill);
  color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.help-tabs a:active { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .help-tabs a:hover { background: var(--fill-2); color: var(--text); } }
.help-h { font: 700 24px/1.25 var(--display); margin: 36px 0 14px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 18px 18px 18px 72px; border-radius: var(--r-group); background: var(--panel); box-shadow: var(--card); }
.steps li::before { content: "0" counter(step); position: absolute; left: 18px; top: 18px; width: 38px; height: 38px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 15px/1 var(--ui); }
.steps h3 { font: 700 17px/1.35 var(--ui); margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 62ch; }
/* вопросы — строки «Настроек» макета: белые панели со стрелкой */
.faq { display: grid; gap: 12px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.faq details { position: relative; padding: 0 18px; border-radius: var(--r-group); background: var(--panel); box-shadow: var(--card); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border: solid var(--text); border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform 280ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg) translateY(-2px); }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 62ch; }
.craft-legend { display: flex; align-items: center; gap: 12px; }
.craft-legend .craft { flex: none; width: 28px; height: 28px; }
.craft-legend .craft .ico { width: 16px; height: 16px; }

/* ------------------------------------------------------------ переход между разделами */
.view { min-height: 60vh; }
/* полоска загрузки раздела, если ответ задержался */
.loadbar { position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 3px; background: var(--text);
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0; pointer-events: none; }
.loadbar.on { opacity: 1; transform: scaleX(.8); transition: transform 2.6s cubic-bezier(.08, .6, .2, 1), opacity 120ms ease; }
.loadbar.done { opacity: 0; transform: scaleX(1); transition: transform 180ms ease-out, opacity 260ms ease 140ms; }

/* ------------------------------------------------------------ узкие телефоны (320–360 px) */
@media (max-width: 400px) {
  .searchrow { grid-auto-columns: 44px; gap: 8px; }
  .searchrow .icon-btn { width: 44px; height: 44px; }
  .search .input { height: 44px; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; --gap: 12px; }
  .search .input { padding: 0 36px 0 40px; font-size: 16px; }
  .search .input:placeholder-shown { padding-right: 8px; }
  .search-ico { left: 12px; }
  .large-title { font-size: 28px; }
  .brand-name { font-size: 16px; }
}

/* ------------------------------------------------------------ планшет и компьютер */
@media (min-width: 560px) {
  [data-density="large"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-density="compact"] .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .grid, [data-density] .grid { grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: calc(var(--gap-y) + 4px) calc(var(--gap) + 4px); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .large-title { font-size: 40px; }
}
@media (min-width: 960px) {
  :root { --gutter: 40px; --nav-h: 76px; }
  body { padding-bottom: 64px; }
  .tabbar { display: none; }
  .topnav { display: flex; flex: none; margin-left: auto; }
  .nav-actions { margin-left: 8px; }
  .hero { padding-top: 28px; }
  .large-title { font-size: 52px; line-height: 1.08; margin-bottom: 26px; }
  .trust { padding: 18px 22px; margin-bottom: 22px; }
  .trust b { display: inline; margin: 0 6px 0 0; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 14px 18px; align-items: center; margin-bottom: 28px; }
  .filterrow { margin: 0; padding: 0; overflow: visible; flex-wrap: wrap; }
  .chips { grid-column: 1 / -1; margin-top: 0; }
  .toolbar .sections { grid-column: 1 / -1; justify-self: start; margin-bottom: 0; }
  .mono-panel { grid-column: 1 / -1; margin-top: 0; }
  .len-row { margin-top: 0; max-width: 520px; }
  .toolbar .len-row + .filterrow { grid-column: 1 / -1; }
  /* шторки на компьютере — окно по центру, появляется «материализуясь» (масштаб + прозрачность) */
  .sheet-panel, .modal-card { left: 0; right: 0; top: 0; bottom: 0; margin: auto; width: 460px; height: fit-content; padding: 20px 24px 24px;
    max-height: min(740px, calc(100dvh - 64px)); border-radius: calc(var(--r-group) + 10px); transform: none; opacity: 0; background: var(--bg);
    box-shadow: var(--float); }
  .sheet-panel:not(.sheet-compact) { height: min(680px, calc(100dvh - 64px)); }
  .modal-card { width: 480px; }
  .grabber { display: none; }
  [data-drag] { touch-action: auto; }
  /* карточка подарка — картинка слева, описание и кнопки справа; ход создания лота — во всю ширину под ними */
  .gift-card { width: min(920px, calc(100vw - 64px)); display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
    grid-template-rows: repeat(6, auto) 1fr auto; gap: 0 40px; padding: 36px; align-items: start; }
  .gift-card .gm-stage { grid-column: 1; grid-row: 1 / 8; width: 100%; max-width: none; margin: 0; position: sticky; top: 0; }
  .gift-card .gm-info { display: contents; }
  .gift-card .gm-info > * { grid-column: 2; }
  .gift-card .gm-title { grid-row: 1; margin-top: 4px; padding-right: 48px; font-size: 30px; }
  .gift-card .gm-craft { grid-row: 2; }
  .gift-card .traits { grid-row: 3; }
  .gift-card .gm-price-row { grid-row: 4; }
  .gift-card .fee-note { grid-row: 5; }
  .gift-card .modal-actions { grid-row: 6; }
  .gift-card .gm-info > .lot-box { grid-column: 1 / -1; grid-row: 8; margin: 28px 0 0; }
  .gift-card .lot-steps { display: flex; flex-wrap: wrap; gap: 8px 28px; }   /* шаги в строку — места теперь хватает */
  .modal-x { top: 20px; right: 20px; box-shadow: none; background: var(--fill); }
  @media (hover: hover) and (pointer: fine) { .modal-x:hover { background: var(--fill-2); } }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 74px 20px 22px; }
  .steps li::before { top: 22px; left: 20px; }
  .help-tabs { margin: 22px 0 0; padding: 0; }
}
@media (min-width: 1240px) { .large-title { font-size: 56px; } }

/* ------------------------------------------------------------ доступность */
@media (prefers-contrast: more) {
  :root { --muted: color-mix(in srgb, var(--text) 80%, var(--bg)); }
  .card .art, .trust, .group, .steps li, .faq details, .note, .lot-box, .order-card { box-shadow: inset 0 0 0 1px var(--text); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .lot-steps li.now::before { border-top-color: var(--text); }
  .card:hover .art img.model { transform: translate(-50%, -50%); }
}
