/* ==========================================================================
   account.css — Mercher partner cabinet (/account/*)
   Hand-authored plain CSS. NO Tailwind, NO @apply, NO CDN.
   Aesthetic: "Dark FW-style" — Fourthwall-tier dark theme.
   Almost-black bg, flat cards, 1px hairlines, FW-blue accent #0042ff.
   GPU-safe motion (transform/opacity).
   ========================================================================== */

/* ------------------------------------------------------------------ Fonts */
@font-face {
  font-family: "Onest";
  src: url("/static/fonts/Onest-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GeistMono";
  src: url("/static/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- Tokens
   Тёмная тема (FW-стиль): почти-чёрный фон, карточки чуть светлее,
   тонкие 1px-обводки, плоско. Акцент — FW-синий #0042ff (см. fw-tokens.css). */
:root {
  /* Нативные контролы (чекбоксы, скроллбары, select, спиннеры) — тёмные.
     Одна строка вместо кастомных .checkbox/скроллбар-правил: без неё браузер
     рисует их в светлой схеме и на почти-чёрном фоне они белые и грубые. */
  color-scheme: dark;

  /* ink / text — FW gray-ramp */
  --ink: var(--fw-text);
  --ink-2: var(--fw-text-2);
  --muted: var(--fw-muted);
  --faint: var(--fw-faint);

  /* hairlines */
  --line: var(--fw-line);
  --line-2: var(--fw-line-2);

  /* surfaces — тёплый near-black FW */
  --bg: var(--fw-bg);
  --surface: var(--fw-surface);
  --surface-2: var(--fw-surface-2);
  --well: #1d1e19;  /* инсет чуть светлее bg, тёплый в тон */

  /* brand — FW-синий (фиолетовый #7B2BFF ушёл, см. спеку) */
  --brand: var(--fw-blue);
  --brand-press: var(--fw-blue-hover);
  --brand-12: var(--fw-blue-12);
  --brand-24: var(--fw-blue-24);

  /* status */
  --ok: var(--fw-green);   --ok-bg: rgba(40, 189, 162, .14);
  --warn: var(--fw-yellow); --warn-bg: rgba(230, 170, 25, .14);
  --ship: var(--fw-blue-soft); --ship-bg: rgba(79, 142, 255, .16); /* был фиолетовый */
  --pend: #A1A1AA;  --pend-bg: rgba(161, 161, 170, .12);
  --danger: var(--fw-red); --danger-bg: rgba(208, 67, 67, .14);

  /* radii — FW: всё 4px */
  --r-xs: var(--fw-radius);
  --r-sm: var(--fw-radius);
  --r: var(--fw-radius);
  --r-lg: var(--fw-radius);
  --r-xl: var(--fw-radius);
  --r-pill: var(--fw-radius-full);

  /* shadows — минимальные на тёмном, без белых подсветок */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .40);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -12px rgba(0, 0, 0, .55);
  --shadow-lg: 0 16px 48px -16px rgba(0, 0, 0, .65);
  --hi: none;

  /* easings */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.22, 1, .36, 1);

  /* typefaces */
  --font-sans: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "GeistMono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* ---------------------------------------------------------------- Base / reset */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv01", "cv02", "ss01";
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--brand-24); color: var(--ink); }

:focus-visible {
  outline: 0;
  border-radius: var(--r-xs);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand-24);
}

/* ===================================================================
   SHELL / CHROME
   =================================================================== */
.app {
  min-height: calc(100dvh / var(--bo-zoom, 1));
  display: flex;
  flex-direction: row;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

.bg-aura {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(680px 460px at 12% -8%, rgba(0, 66, 255, .10), transparent 60%),
    radial-gradient(720px 520px at 100% 0%, rgba(0, 66, 255, .06), transparent 62%);
  opacity: .7;
}

/* ===== Sidebar ===== */
.side {
  position: sticky; top: 0; align-self: flex-start;
  width: 260px; flex: 0 0 260px; height: calc(100dvh / var(--bo-zoom, 1));
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 60;
}
.side__brand {
  display: flex; flex-direction: column; gap: 2px;
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.side__brand-mark { font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.side__brand-shop {
  font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side__nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; overflow-y: auto; }
.side__link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.side__link:hover { background: var(--surface-2); color: var(--ink); }
.side__link.is-active {
  /* FW: активный пункт — нейтральная светлее-серая плашка, без акцента */
  background: var(--fw-surface); color: var(--ink);
}
.side__ico { width: 18px; height: 18px; flex: 0 0 18px; }
/* Неактивный пункт «Скоро» (раздел временно закрыт): не кликается, приглушён */
.side__link--soon { cursor: default; color: var(--muted); }
.side__link--soon:hover { background: transparent; color: var(--muted); }
.side__link--soon .soon-badge { margin-left: auto; }
/* Разделитель: рабочие пункты сверху, «Скоро» под чертой (чтобы не шуметь) */
.side__navsep { height: 1px; margin: 12px 12px 8px; background: var(--line); }

/* ===== Товары → Коллекции (collapsible subitem) ===== */
.side__link--parent { position: relative; }
.side__chevron {
  width: 14px; height: 14px; flex: 0 0 14px; margin-left: auto;
  color: var(--faint); transition: transform .14s var(--ease);
}
.side__group.is-open .side__chevron { transform: rotate(90deg); }
.side__sub { display: flex; flex-direction: column; gap: 2px; padding-left: 20px; }
.side__sub[hidden] { display: none; }
.side__link--sub { font-size: 14px; }

/* ===== Account block (bottom) ===== */
.side__account { margin-top: auto; position: relative; padding: 10px; border-top: 1px solid var(--line); }
.side__account-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; background: transparent; cursor: pointer;
  border-radius: var(--r-sm); color: var(--ink); text-align: left;
  transition: background .14s var(--ease);
}
.side__account-btn:hover { background: var(--surface-2); }
.side__avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: var(--r-pill);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--brand); color: #fff;
}
.side__account-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side__account-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__account-mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__chev { width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: transform .16s var(--ease); }
.side__account-btn[aria-expanded="true"] .side__chev { transform: rotate(180deg); }
/* точка-статус магазина на аватаре (FW-паритет: зелёная = открыт) */
.side__avatar--shop { position: relative; overflow: visible; }
.side__dot {
  position: absolute; top: -2px; right: -2px; width: 9px; height: 9px;
  border-radius: var(--r-pill); border: 2px solid var(--surface-2);
}
.side__dot.is-live { background: #22c55e; }
.side__dot.is-soon { background: #f59e0b; }
/* бейдж PRO рядом с именем магазина в сайдбаре (Mercher Pro, апселл-точка) */
.pro-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em; vertical-align: middle;
  background: #0042ff; color: #fff;
}

/* шире сайдбара (FW-паритет): иначе «Скопировать ссылку магазина» ломается
   на две строки и пункты перестают читаться колонкой */
.side__account-pop {
  position: absolute; left: 10px; right: auto; width: 292px; max-width: calc(100vw - 24px);
  bottom: calc(100% - 4px);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 6px; display: flex; flex-direction: column; gap: 2px; z-index: 70;
}
.side__account-pop[hidden] { display: none; }

/* заголовок секции («Ваш аккаунт» / «Ваш магазин») */
.side__pop-cap {
  margin: 6px 11px 2px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
/* карточка сущности — некликабельная строка-инфо, не пункт меню */
.side__pop-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface);
  border: 1px solid var(--line);
}
.side__pop-status {
  margin-left: auto; flex: 0 0 auto; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap;
}
.side__pop-status.is-live { background: color-mix(in srgb, #22c55e 18%, transparent); color: #4ade80; }
.side__pop-status.is-soon { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #fbbf24; }

.side__pop-sep { display: block; height: 1px; margin: 5px 6px; background: var(--line); }

.side__pop-link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 11px; border: 0; background: transparent; cursor: pointer;
  color: var(--ink-2); font: inherit; font-size: 14px; border-radius: var(--r-sm);
  transition: background .12s var(--ease), color .12s var(--ease);
}
.side__pop-link:first-of-type { margin-top: 4px; }
.side__pop-ico { width: 17px; height: 17px; flex: 0 0 17px; color: var(--muted); transition: color .12s var(--ease); }
.side__pop-link:hover { background: var(--surface); color: var(--ink); }
.side__pop-link:hover .side__pop-ico { color: var(--ink); }
.side__pop-link--exit:hover { color: #f87171; }
.side__pop-link--exit:hover .side__pop-ico { color: #f87171; }

/* ===== Content column + topbar ===== */
.content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px; min-height: 60px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__spacer { flex: 1 1 auto; }

/* burger (mobile only; hidden on desktop) */
.side-burger { display: none; }

/* quick actions */
.qa { position: relative; }
.qa__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: 14px;
  border-radius: var(--r-sm); transition: background .14s var(--ease);
}
.qa__btn:hover { background: var(--brand-press); }
.qa__btn svg { width: 16px; height: 16px; }
.qa__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 6px; display: flex; flex-direction: column; gap: 2px; z-index: 70;
  text-align: left; /* меню в text-align:right ячейке — <a>-пункты иначе наследуют правое выравнивание */
}
.qa__menu[hidden] { display: none; }
.qa__item {
  padding: 9px 11px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink-2);
  transition: background .12s var(--ease), color .12s var(--ease);
}
.qa__item:hover { background: var(--surface); color: var(--ink); }
/* reset native <button> chrome when used as a .qa__item (fw-teardown №16 S3
   "Дублировать"/"Сменить URL" — flex column already stretches width) */
button.qa__item { display: block; width: 100%; text-align: left; background: none;
  border: 0; font: inherit; cursor: pointer; }

/* cart */
.cart {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  color: var(--ink-2); border: 1px solid var(--line); background: var(--surface);
  transition: background .14s var(--ease), color .14s var(--ease);
}
.cart:hover { background: var(--surface-2); color: var(--ink); }
.cart svg { width: 19px; height: 19px; }
.cart__badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}

/* mobile scrim */
.side__scrim { display: none; }

/* sparkline bar color on dark */
.spark__bar { fill: var(--brand); opacity: .85; }

/* ===== Mobile: sidebar becomes off-canvas ===== */
@media (max-width: 900px) {
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; height: calc(100dvh / var(--bo-zoom, 1));
    transform: translateX(-100%); transition: transform .26s var(--ease-out);
    box-shadow: var(--shadow-lg);
  }
  .side.is-open { transform: none; }
  .side-burger {
    display: inline-grid; place-items: center; width: 40px; height: 40px;
    border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
    cursor: pointer; gap: 4px;
  }
  .side-burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
  .side__scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0, 0, 0, .55);
  }
  .side__scrim[hidden] { display: none; }
  .topbar { padding: 10px 16px; }
}

/* Container + main */
.shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}
/* ===== Полноэкранный каталог (FW-паритет: /account/products/catalog и
   /discover идут без сайдбара, навигация переезжает в верхнюю панель —
   выбор носителя не должен соревноваться с меню кабинета) =====
   Ширина — по FW (замер 2026-09-23, research/fw-extract/catalog-pdp): во всю
   ширину экрана, поля 48px от 1280px, 24px ниже, 16px на мобильном (медиа —
   в конце файла). Оба брейкпоинта в этом файле — .shell--wide, второго
   правила с width ниже нет (память css_rule_order_beats_media_query). */
.shell--wide { width: 100%; max-width: none; padding-inline: 48px; box-sizing: border-box; }
.app--catalog .main { padding-block: 28px 56px; }
.topbar--catalog { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; padding-inline: 24px; }
.ctop__brand { display: flex; flex-direction: column; gap: 1px; flex: none; text-decoration: none; color: var(--ink); }
.ctop__brand-mark { font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.ctop__brand--apex { flex-direction: row; align-items: center; gap: 8px; }
.ctop__brand--apex svg { width: 22px; height: 22px; flex: none; }
.ctop__brand--apex .ctop__brand-mark { font-size: 18px; }
/* Кабинет и дизайнер: знак Мерчера + название магазина в одну строку (как у FW);
   длинное имя режется ellipsis. Один набор правил на оба экрана. */
.ctop__brand--shop { flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
.ctop__brand--shop svg { width: 22px; height: 22px; flex: none; }
.ctop__brand--shop .ctop__brand-shop { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); max-width: 240px; }
.ctop__brand-shop { font-size: 11.5px; color: var(--muted); line-height: 1.1; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.ctop__nav { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ctop__actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.ctop__nav::-webkit-scrollbar { display: none; }
.ctop__link { padding: 7px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; font-weight: 560; text-decoration: none; white-space: nowrap; transition: background .14s var(--ease), color .14s var(--ease); }
.ctop__link:hover { background: var(--surface-2); color: var(--ink); }
.ctop__link.is-active { background: var(--surface-2); color: var(--ink); }
.ctop__search { position: relative; flex: 0 1 260px; min-width: 0; display: flex; align-items: center; }
.ctop__search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.ctop__search input { width: 100%; padding: 8px 12px 8px 34px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; }
.ctop__search input::placeholder { color: var(--muted); }
.ctop__search input:focus { outline: none; border-color: var(--brand); }
@media (max-width: 900px) {
  .topbar--catalog { display: flex; flex-wrap: wrap; gap: 10px; }
  .ctop__actions { order: 3; flex: 1 1 100%; }
  .ctop__search { flex: 1 1 auto; }
  .ctop__nav { order: 4; flex: 1 1 100%; justify-content: flex-start; }
  /* ширина .shell--wide под 900px — брейкпоинты 1279/767 в конце файла */
}
.main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding-block: clamp(40px, 7vw, 96px);
}

.foot {
  position: relative;
  z-index: 1;
  padding: 28px 0 36px;
  text-align: center;
  color: var(--faint);
  font-size: .82rem;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink-2); }

/* ===================================================================
   TYPE / RHYTHM
   =================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  padding: 4px 11px;
  font-size: 10.5px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.h-display {
  margin: 16px 0 0;
  font-weight: 600;
  letter-spacing: -.02em;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.02;
  color: var(--ink);
}

.lede {
  margin: 14px 0 0;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.55;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: clamp(36px, 5vw, 56px) 0 18px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 600;
  color: var(--muted);
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* ===================================================================
   SURFACES — flat dark cards
   =================================================================== */
.panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: clamp(20px, 3vw, 28px);
}

.panel-lite {
  position: relative;
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: clamp(16px, 2.4vw, 22px);
}

.bezel {
  background: var(--surface-2);
  padding: 6px;
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}
.bezel__core {
  border-radius: calc(var(--r-lg) - 6px);
  background: var(--surface);
  overflow: hidden;
  box-shadow: none;
}

/* ===================================================================
   PROMO — asset gallery cards
   =================================================================== */
.promo-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.promo-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}
.promo-card .bezel { padding: 10px; }
.promo-card .bezel__core {
  display: grid;
  place-items: center;
  min-height: 180px;
  background:
    linear-gradient(45deg, var(--surface-2) 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%) -8px 0 / 16px 16px,
    var(--surface);
}
.promo-card img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 260px;
  border-radius: calc(var(--r-lg) - 16px);
}
.promo-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.promo-card__meta {
  font-size: .78rem;
  font-weight: 560;
  letter-spacing: .01em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ===================================================================
   BUTTONS — pill + button-in-button
   =================================================================== */
.btn {
  --_icon-bg: var(--surface-2);
  /* Фон обязателен на базовом классе: без него голый `.btn` у <button>
     получает браузерный ButtonFace (светло-серый) и белый var(--ink) текст
     становится нечитаемым на тёмной теме кабинета. */
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--r); /* FW: кнопки 4px, не пилюли */
  padding: 12px 14px 12px 22px;
  font-family: inherit;
  font-weight: 560;
  font-size: .95rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  will-change: transform;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background .3s var(--ease);
}
.btn:active { transform: scale(.975); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
  --_icon-bg: rgba(255, 255, 255, .16);
}
.btn--brand {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
  --_icon-bg: rgba(255, 255, 255, .16);
}
.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
  --_icon-bg: var(--surface-2);
}
/* Красная кнопка деструктивного действия (FW-паритет модалки «уйти со
   страницы», docs/2026-08-15-…-design.md). */
.btn--danger {
  background: var(--danger);
  color: #fff;
  box-shadow: var(--shadow);
}

@media (hover: hover) {
  .btn--primary:hover { background: var(--brand-press); box-shadow: var(--shadow-lg); }
  .btn--brand:hover { background: var(--brand-press); }
  .btn--ghost:hover { background: var(--surface-2); }
  .btn--danger:hover { filter: brightness(1.1); }
}

/* Nested circle for trailing arrow */
.btn__icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  background: var(--_icon-bg);
  transition: transform .5s var(--ease-spring);
}
.btn__icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
@media (hover: hover) {
  .btn:hover .btn__icon { transform: translate(2px, -1px) scale(1.06); }
}

.btn--sm {
  padding: 9px 11px 9px 16px;
  font-size: .88rem;
}
.btn--sm .btn__icon {
  width: 26px;
  height: 26px;
}

.btn--block { width: 100%; justify-content: center; }

/* disabled — НЕ просто opacity на brand/ghost-фоне (та полупрозрачная синяя
   кнопка всё равно читается как активный primary и провоцирует клик).
   Явно перекрываем фон/текст на нейтральные токены — визуально нейтральная
   плитка, не «притушенная кнопка». background НЕ убираем совсем (см. .btn
   комментарий выше — иначе белый текст на белом), просто меняем на другой
   определённый токен. */
.btn:disabled {
  background: var(--surface-2);
  color: var(--muted);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  --_icon-bg: var(--surface);
}

[x-cloak] { display: none !important; }

/* ===================================================================
   TABLES
   =================================================================== */
.table-wrap {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: 0;
  overflow: auto hidden; /* x: на телефоне широкая таблица скроллится, а не режется */
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 600;
  background: var(--well);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}
.table tbody tr {
  transition: background .3s var(--ease);
}
.table tbody tr:hover { background: var(--well); }
.table tbody tr:first-child td { border-top: 0; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ===================================================================
   BADGES — status pills with leading dot
   =================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-pill);
  padding: 5px 11px 5px 9px;
  font-size: .78rem;
  font-weight: 560;
  line-height: 1;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.badge--ok   { color: var(--ok);   background: var(--ok-bg); }
.badge--prod { color: var(--warn); background: var(--warn-bg); }
.badge--ship { color: var(--ship); background: var(--ship-bg); }
.badge--pend { color: var(--pend); background: var(--pend-bg); }
.badge--danger { color: var(--danger); background: var(--danger-bg); }

/* ===================================================================
   NPD YEAR LIMIT — progress bar (§C4, только СМЗ)
   =================================================================== */
.npd-bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--well);
  overflow: hidden;
}
.npd-bar__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--brand);
  transition: width .4s var(--ease);
}
.npd-bar__fill.is-warn { background: var(--warn); }
.npd-bar__fill.is-stop { background: var(--danger); }

/* fw-teardown — Products list (FW-parity): миниатюра, ⋯-меню строки, overflow-safe wrap */
.prod-thumb{width:40px;height:40px;flex:0 0 auto;border-radius:var(--r-sm);overflow:hidden;background:var(--well);border:1px solid var(--line);display:grid;place-items:center}
.prod-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.prod-thumb svg{width:18px;height:18px;color:var(--muted)}
.row-actions__btn{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:var(--r-sm);border:1px solid transparent;background:none;color:var(--ink-2);cursor:pointer;font-size:20px;line-height:1;transition:background .14s var(--ease),border-color .14s var(--ease),color .14s var(--ease)}
.row-actions__btn:hover{background:var(--well);border-color:var(--line);color:var(--ink)}
/* .table-wrap имеет overflow:hidden (клипал бы дропдаун) — scoped-модификатор снимает клип и сам скругляет углы */
.table-wrap--menus{overflow:visible}
.table-wrap--menus .table thead th:first-child{border-top-left-radius:calc(var(--r-lg) - 1px)}
.table-wrap--menus .table thead th:last-child{border-top-right-radius:calc(var(--r-lg) - 1px)}
.table-wrap--menus .table tbody tr:last-child td:first-child{border-bottom-left-radius:calc(var(--r-lg) - 1px)}
.table-wrap--menus .table tbody tr:last-child td:last-child{border-bottom-right-radius:calc(var(--r-lg) - 1px)}

/* ===================================================================
   FORMS
   =================================================================== */
.field {
  display: block;
  margin-bottom: 18px;
}
.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: .9rem;
  font-weight: 560;
  color: var(--ink);
}
.field__hint {
  margin-top: 7px;
  font-size: .8rem;
  color: var(--muted);
}
.field__error {
  margin-top: 7px;
  font-size: .8rem;
  color: var(--warn);
}

.input,
.textarea {
  width: 100%;
  background: var(--surface);
  border: 0;
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.4;
  color: var(--ink);
  transition: box-shadow .3s var(--ease);
}
.input::placeholder,
.textarea::placeholder { color: var(--faint); }
.input:focus,
.input:focus-visible,
.textarea:focus,
.textarea:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-12);
}
.textarea {
  min-height: 92px;
  resize: vertical;
}

/* Rich-text описание товара (S5 FW-паритет) — тулбар + contenteditable.
   FW-вёрстка: тулбар и редактор в ОДНОЙ рамке (.rt-wrap), кнопки — квадратные
   иконки без собственных рамок, «<>» прижат вправо. */
.rt-wrap {
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm);
}
.rt-wrap:focus-within { box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-12); }
.rt-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 8px;
}
.rt-wrap > .rt-toolbar {
  margin: 0;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line-2);
}
.rt-wrap > .rt-editor {
  box-shadow: none;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.rt-wrap > .rt-editor:focus,
.rt-wrap > .rt-editor:focus-visible { box-shadow: none; }
.rt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  box-shadow: none;
  color: var(--ink-2);
  font-family: inherit;
  font-size: .9rem;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.rt-btn svg { width: 17px; height: 17px; }
.rt-btn[data-rt-source] { margin-left: auto; font-size: .82rem; }
@media (hover: hover) {
  .rt-btn:hover { background: var(--surface-2); color: var(--ink); }
}
.rt-editor {
  min-height: 90px;
  cursor: text;
  overflow-wrap: anywhere;
}
.rt-editor:focus,
.rt-editor:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-12);
}
.rt-editor p { margin: 0 0 .6em; }
.rt-editor p:last-child { margin-bottom: 0; }
.rt-editor ul,
.rt-editor ol { margin: 0 0 .6em; padding-left: 1.4em; }

/* «<>» режим сырого HTML (fw-teardown №17 С10, FW: Source code) */
.rt-source {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
  white-space: pre;
}
.rt-toolbar.is-source-mode .rt-btn:not([data-rt-source]) {
  opacity: .4;
  pointer-events: none;
}
.rt-toolbar .rt-btn[aria-pressed="true"] {
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm);
  color: var(--brand);
}

/* Color swatch group */
.color-group {
  display: flex;
  gap: 10px;
  align-items: center;
}
.input--color {
  flex: 0 0 auto;
  width: 56px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
}
.input--color::-webkit-color-swatch-wrapper { padding: 4px; }
.input--color::-webkit-color-swatch { border: 0; border-radius: 8px; }
.input--color::-moz-color-swatch { border: 0; border-radius: 8px; }
.color-group .input {
  flex: 1;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* Radio cards */
.radio-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .radio-cards { grid-template-columns: 1fr 1fr; }
}

.radio-card {
  position: relative;
  display: block;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2);
  transition: box-shadow .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.radio-card input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.radio-card__title {
  font-weight: 560;
  font-size: .95rem;
  color: var(--ink);
}
.radio-card__desc {
  margin-top: 4px;
  font-size: .85rem;
  color: var(--muted);
}
.radio-card__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .3s var(--ease), transform .35s var(--ease-spring);
}
.radio-card__check svg { width: 11px; height: 11px; display: block; }
@media (hover: hover) {
  .radio-card:hover { background: var(--well); }
}
.radio-card:has(input:checked) {
  box-shadow: 0 0 0 1.5px var(--brand), var(--shadow);
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
  transform: translateY(-1px);
}
.radio-card:has(input:checked) .radio-card__check {
  opacity: 1;
  transform: scale(1);
}
.radio-card:has(input:focus-visible) {
  box-shadow: 0 0 0 1.5px var(--brand), 0 0 0 4px var(--brand-12);
}

/* File well — logo uploader: framed thumbnail + action row + hint */
.file-well {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.file-well__preview {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--line);
  background:
    linear-gradient(45deg, var(--surface-2) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%) 0 8px / 16px 16px,
    linear-gradient(45deg, transparent 75%, var(--surface-2) 75%) 8px -8px / 16px 16px,
    linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%) -8px 0 / 16px 16px,
    var(--surface);
}
.file-well__preview img {
  max-width: 76px;
  max-height: 76px;
  object-fit: contain;
}
.file-well__body {
  flex: 1 1 220px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.file-well__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.file-well__hint {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}
.file-well .field__error { margin: 0; }
/* visually-hidden native file input, triggered by styled label */
.file-well input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Checkbox row (fw-teardown №9 §5.4 — карточки товара) */
.field__check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-size: .88rem;
  color: var(--ink-2);
  cursor: pointer;
}
.field__check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--brand);
  cursor: pointer;
}
.field__check:last-of-type { margin-bottom: 18px; }

/* Range slider (fw-teardown №9 §5.4 — карточки/фото/кнопки) */
.range {
  display: block;
  width: 100%;
  accent-color: var(--brand);
  cursor: pointer;
}

/* Save bar */
.save-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 8px;
  margin-top: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: .82rem;
  font-weight: 560;
  line-height: 1;
  color: var(--muted);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color .3s var(--ease), background .3s var(--ease);
}
.status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status.is-saving { color: var(--brand); background: var(--brand-12); box-shadow: none; }
.status.is-saved  { color: var(--ok);    background: var(--ok-bg);   box-shadow: none; }
.status.is-error  { color: var(--warn);  background: var(--warn-bg); box-shadow: none; }

/* SERP preview */
.serp {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
  padding: 16px 18px;
}
.serp__title {
  font-size: 1.1rem;
  line-height: 1.3;
  color: #1a0dab;
}
.serp__url {
  margin-top: 3px;
  font-size: .82rem;
  color: #006621;
}
.serp__desc {
  margin-top: 6px;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ===================================================================
   PRODUCT EDIT — FW-parity шапка + 2-колоночная раскладка (fw-teardown №16 S1/S2)
   =================================================================== */
/* fw-teardown №21 §2.1 — шапка карточки: H1+URL слева, кнопки справа в ряд */
.pe-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pe-head__main { flex: 1 1 320px; min-width: 260px; }
.pe-head__actions { display: flex; align-items: center; gap: 8px; flex: none; padding-top: 26px; margin-left: auto; }
.pe-head__actions .pe-vis { margin: 0; }
/* кнопка у правого края шапки — поповер раскрываем влево, иначе уезжает за экран */
.pe-head__actions .pe-vis__pop { left: auto; right: 0; }

/* Оверлей модалок карточки. display:flex обязан быть в классе, не инлайном:
   Alpine x-show при показе очищает инлайновый display (flex терялся бы). */
.pe-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(24, 24, 27, .42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
/* «Сменить URL» — как FW: хост приглушённым префиксом, slug редактируется */
.pe-slug-field {
  display: flex; align-items: center; min-width: 0;
  padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface, transparent); cursor: text;
}
.pe-slug-field:focus-within { border-color: var(--brand, #4557ff); }
.pe-slug-field__host {
  flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; color: var(--ink-2); font-size: .9rem;
}
.pe-slug-field input {
  flex: 1 1 140px; min-width: 0; padding: 14px 0 14px 4px;
  border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-weight: 600;
}
.pe-slug-field input:focus,
.pe-slug-field input:focus-visible { outline: 0; box-shadow: none; border: 0; }

.pe-url {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}
.pe-url__link {
  color: var(--brand);
  font-size: .86rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.pe-url__link:hover { color: var(--brand-press); }
/* иконка-копирование как у FW (а не кнопка-плашка); подтверждение — цветом,
   потому что общий обработчик [data-copy-value] иначе затрёт SVG текстом */
.pe-url__copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--muted);
}
.pe-url__copy svg { width: 15px; height: 15px; }
.pe-url__copy:hover { color: var(--ink); background: var(--surface-2); }
.pe-url__copy.is-copied { color: var(--ok); }

.pe-vis { position: relative; display: inline-block; margin: 14px 0 0; }
/* статус видимости цветом, как у FW (Public — зелёный контур) */
.pe-vis__btn.is-published { color: var(--ok); box-shadow: 0 0 0 1px var(--ok); background: none; }
.pe-vis__btn.is-draft { color: var(--muted); }
.pe-vis__pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(340px, 86vw);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-lg);
}
.pe-vis__pop[hidden] { display: none; }

/* fw-teardown №16 S6 — свотчи в блоке "Фотографии и дизайн" (дисплейные, нет пикера) */
.pe-swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

/* Фильтр галереи по цвету: кнопки-свотчи + чип «Все цвета» */
.pe-swatch--btn { border: 0; padding: 0; cursor: pointer; }
/* зазор кольца и текст активного чипа — цветом фона, а не #fff: в тёмном кабинете --ink светлый */
.pe-swatch--btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 2px var(--bg, #fff), 0 0 0 4px var(--ink, #18181b); }
.pe-swatch-all {
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: transparent;
  padding: 2px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pe-swatch-all[aria-pressed="true"] { background: var(--ink, #18181b); color: var(--bg, #fff); border-color: transparent; }

/* fw-teardown №17 С9 — галерея фото карточки товара: dnd-грид, ховер-действия,
   тайл загрузки. Разделитель тайла — только --line-2 (hairline-ловушка). */
.pe-gallery {
  display: grid;
  /* FW: мелкая плотная сетка превью (~86px), а не крупные тайлы во всю колонку */
  grid-template-columns: repeat(auto-fill, 88px);
  gap: 8px;
}
.pe-gallery__item {
  position: relative;
  aspect-ratio: 1 / 1.15;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--well);
  cursor: grab;
}
.pe-gallery__item.sortable-chosen { opacity: .6; }
.pe-gallery__item.sortable-ghost { opacity: .3; }
/* Пустой список «Неактивные» — ненулевая высота, чтобы в него можно было уронить */
.pe-gallery--inactive { min-height: 48px; }
.pe-gallery--inactive .pe-gallery__img { opacity: .45; }
.pe-gallery__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: .82rem;
}
.pe-gallery__divider::before,
.pe-gallery__divider::after { content: ""; flex: 1; border-top: 1px solid var(--line-2); }
.pe-gallery__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: -4px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: .66rem;
  font-weight: 600;
  cursor: help;
}
/* Тайл «Добавить фото» — отдельный грид после «Неактивных»; между ними
   <template>, поэтому `+` не срабатывал и тайлы слипались. */
.pe-gallery-wrap > .pe-gallery--inactive ~ .pe-gallery { margin-top: 12px; }
.pe-gallery__drag { margin-right: auto; cursor: grab; }
.pe-gallery__img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Метка цвета на плитке (режим «Все цвета») */
.pe-gallery__dot {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-2);
  pointer-events: none;
}
/* на ховере верх плитки занят ручкой/кнопками — бейдж «Обложка» уступает */
.pe-gallery__item:hover .pe-gallery__cover { opacity: 0; }
.pe-gallery__cover {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: rgba(24, 24, 27, .68);
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.pe-gallery__actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(24, 24, 27, .5), transparent 45%);
  opacity: 0;
  transition: opacity .12s var(--ease);
}
.pe-gallery__item:hover .pe-gallery__actions,
.pe-gallery__item:focus-within .pe-gallery__actions { opacity: 1; }
.pe-gallery__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 24, 27, .68);
  color: #fff;
  cursor: pointer;
}
.pe-gallery__btn svg { width: 14px; height: 14px; }
.pe-gallery__btn:hover { background: rgba(24, 24, 27, .88); }
.pe-gallery__add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 1 / 1.15;
  border-radius: 8px;
  border: 1px dashed var(--line-2);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .12s var(--ease), color .12s var(--ease);
}
.pe-gallery__add:hover { border-color: var(--brand-24); color: var(--ink-2); }
.pe-gallery__add-plus { font-size: 1.6rem; line-height: 1; }
.pe-gallery__add-label { font-size: .72rem; text-align: center; padding: 0 6px; }

/* Модалка «Загрузить новое фото» (FW Upload new photo): превью целиком,
   вне рамки 3:4 — затемнение тенью рамки (frame режет overflow). */
.pe-crop {
  display: flex; align-items: center; justify-content: center;
  height: 400px; background: rgba(127, 127, 127, .18);
}
.pe-crop__frame { position: relative; overflow: hidden; max-width: 100%; line-height: 0; }
.pe-crop__frame img { display: block; max-width: 100%; max-height: 400px; user-select: none; -webkit-user-drag: none; }
.pe-crop__box {
  position: absolute; cursor: move; touch-action: none;
  outline: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 9999px rgba(24, 24, 27, .45);
}
.pe-crop__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* fw-teardown №17 С12 / №21 §2 — grid-areas: «Наличие» (.pe-inventory, в DOM
   после form и aside — контролы через form=-атрибут) лежит под обеими колонками
   на всю ширину, как у FW (его hairline доходит до правого края страницы);
   мобайл стекает по DOM-порядку: форма → aside → наличие, тоже как у FW. */
.pe-layout {
  /* воздух между шапкой (URL товара) и первой секцией — у FW ~60px */
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  grid-template-areas:
    "main aside"
    "inventory inventory";
  gap: 24px;
  align-items: start;
}
.pe-layout > form { grid-area: main; }
.pe-inventory { grid-area: inventory; }
.pe-aside {
  grid-area: aside;
  position: sticky;
  top: 84px;
}
/* FW: сайдбар — ОДНА карточка, блоки внутри разделены hairline'ом (--line-2:
   --line на --surface невидим), а не четыре отдельные панели с зазорами. */
.pe-card { padding: 0; }
.pe-card__row { padding: 16px 20px; }
.pe-card__row + .pe-card__row { border-top: 1px solid var(--line-2); }
.pe-aside__label {
  margin: 0 0 6px;
  font-size: .78rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
}
.pe-aside__val { margin: 0; color: var(--ink); font-size: .95rem; font-weight: 600; line-height: 1.35; }
.pe-aside__hint { margin: 6px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; font-weight: 400; }
.pe-aside .nav__link { display: inline-block; margin-top: 4px; text-decoration: underline; font-weight: 600; }

/* Готовый товар: «Наличие» — секция левой колонки (внутри .pe-main), а не
   полноширинная строка под aside. */
.pe-layout--ready { grid-template-areas: "main aside"; }
.pe-main { grid-area: main; min-width: 0; }
.pe-main > form { margin-bottom: 44px; }
.pe-variants { margin-top: 8px; }
/* «Неактивные фото» не занимают места, пока таких фото нет (класс ставит JS) */
.pe-gallery-wrap--auto-inactive:not(.has-inactive) > .pe-gallery__divider,
.pe-gallery-wrap--auto-inactive:not(.has-inactive) > .pe-gallery--inactive { display: none; }

@media (max-width: 880px) {
  .pe-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "aside" "inventory";
  }
  .pe-layout--ready { grid-template-areas: "main" "aside"; }
  .pe-aside { position: static; }
}

/* fw-teardown №17 С1 — sticky-бар несохранённых изменений (FW: Unsaved changes).
   Разделитель — только --line-2: --line невидим на --surface (ловушка hairline). */
.pe-savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* бар телепортирован в body: над виджетом «Обратная связь» (.beta-widget, 90),
     под модалками (1000) */
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 32px);
  background: var(--surface);
  border-top: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
}
/* Сайдбар (.account-workspace .side — 232px) виден шире 900px — бар после него */
@media (min-width: 901px) { .pe-savebar { left: 232px; } }
.pe-savebar__msg {
  margin-right: auto;
  color: var(--muted);
  font-size: .9rem;
}

/* fw-teardown №17 С13 — floating label в стиле FW (чистый CSS, без JS).
   Контракт: инпуту нужен placeholder=" ", лейбл .fl-label СРАЗУ ПОСЛЕ инпута.
   Скоуп — страницы редактора товара (название, цена, старая цена). */
.fl-field { position: relative; }
.fl-field > .input {
  padding-top: 22px;
  padding-bottom: 6px;
}
.fl-field > .input::placeholder { color: transparent; }
.fl-field > .fl-label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .95rem;
  line-height: 1;
  pointer-events: none;
  transition: top .15s var(--ease), font-size .15s var(--ease), transform .15s var(--ease);
}
.fl-field > .input:focus + .fl-label,
.fl-field > .input:not(:placeholder-shown) + .fl-label {
  top: 7px;
  transform: none;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* fw-teardown №17 С4 — инпут цены с префиксом валюты (FW: "$" слева).
   Совместим с .fl-field: префикс стоит ДО инпута, смежность input+label цела. */
.pe-price__prefix {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.pe-price > .input { padding-left: 34px; }
.pe-price > .fl-label { left: 34px; }

/* текстовая кнопка-ссылка ("Как это считается?") и тултип-маркер "?" */
.pe-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
/* ===================================================================
   fw-teardown №21 §2 — ВЁРСТКА карточки товара 1:1 с FW.
   У FW секции редактора НЕ карточки-панели: плоский фон страницы,
   заголовок sentence-case + hairline под ним. Класс отдельный (.pe-sec),
   чтобы не трогать .panel/.section-label остального кабинета.
   =================================================================== */
.pe-sec { margin: 0 0 44px; }
.pe-sec:last-child { margin-bottom: 0; }
.pe-sec__title {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--ink);
}
.pe-sec__note { margin: 0; color: var(--ink); font-size: .95rem; line-height: 1.5; }
/* ряд подчёркнутых текстовых ссылок под секцией (FW: Edit product design / Download art files) */
.pe-sec__links { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 16px; }
.pe-sec__links a {
  padding: 0;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Шапка: H1 у FW заметно скромнее дисплейного кегля лендинга и переносится */
.pe-head .h-display {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.05rem);
  font-weight: 700;
  line-height: 1.14;
  max-width: 22ch;
}
.pe-head__actions { padding-top: 4px; }

/* Спиннеры type=number в полях цены — визуальный мусор (у FW их нет), да и
   кликом по стрелке цену никто не набирает. Скоуп — карточка товара и её
   модалки (в остальном кабинете поведение не трогаем). */
.pe-layout input[type="number"],
.pe-overlay input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.pe-layout input[type="number"]::-webkit-outer-spin-button,
.pe-layout input[type="number"]::-webkit-inner-spin-button,
.pe-overlay input[type="number"]::-webkit-outer-spin-button,
.pe-overlay input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Цена: у FW узкий инпут и заработок В РЯД справа, а не строкой снизу */
.pe-price-row { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.pe-price-row > .pe-price { flex: none; width: 168px; margin: 0; }
.pe-price-row__earn { margin: 0; padding-top: 6px; font-size: .95rem; font-weight: 600; color: var(--ink); }
.pe-price-row__earn .pe-link { display: block; margin-top: 2px; font-weight: 400; color: var(--ink-2); }

/* Цена по размерам (FW «Customize price», дозаказ 18.08) */
.pe-price-hint {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: .88rem;
  line-height: 1.5;
  max-width: 62ch;
}
.pe-price-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}
.pe-price-table th {
  padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  font-size: .78rem;
  font-weight: 400;
  color: var(--muted);
}
.pe-price-table td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: .95rem;
  vertical-align: middle;
}
.pe-price-table tr:last-child td { border-bottom: 0; }
.pe-price-table td:first-child { font-weight: 600; width: 1%; white-space: nowrap; }

/* Модалка способа печати: буллеты внутри radio-карточки */
.pe-methods { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pe-methods__list { display: block; }
.pe-methods__list > span {
  display: list-item;
  margin-left: 16px;
  padding-left: 2px;
  line-height: 1.45;
}
.pe-methods__warn { display: block; margin-top: 8px; color: var(--warn); }

/* Чекбоксы: дефолтные 13px белым пятном на тёмном читались небрежно.
   FW — крупный прозрачный квадрат с hairline-рамкой, залитый брендом при check. */
.pe-layout input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  cursor: pointer;
  transition: background .12s var(--ease), box-shadow .12s var(--ease);
}
.pe-layout input[type="checkbox"]:hover { box-shadow: inset 0 0 0 1px var(--brand-24); }
.pe-layout input[type="checkbox"]:checked {
  background: var(--brand) center / 12px 12px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  box-shadow: none;
}
.pe-layout input[type="checkbox"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pe-layout .field__label > input[type="checkbox"] + span { font-size: .95rem; }

/* ===================================================================
   AUTH
   =================================================================== */
.auth {
  min-height: calc(100dvh / var(--bo-zoom, 1) - 96px);
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.auth__card {
  width: 100%;
  max-width: 420px;
  text-align: left;
  padding: clamp(28px, 4vw, 40px);
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: none;
}
.auth__lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-weight: 560;
  letter-spacing: -.01em;
}
.reasons {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reasons__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.4;
}
.reasons__item .badge { flex: none; }
.auth--login-error { grid-template-columns: minmax(0, 1fr); }
.auth--login-error .auth__card { min-width: 0; overflow-wrap: anywhere; }
.auth--login-error .reasons__text { min-width: 0; }
@media (max-width: 600px) {
  body:has(.auth--login-error) .topbar { flex-wrap: wrap; }
  body:has(.auth--login-error) .topbar > * { flex-shrink: 0; }
  .auth--login-error { padding: 0; }
  .auth--login-error .auth__card { padding: 24px 20px; }
  .auth--login-error .auth__lockup { flex-wrap: wrap; }
  .auth--login-error .reasons__item { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ===================================================================
   EMPTY STATES
   =================================================================== */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: clamp(28px, 5vw, 48px) 20px;
  color: var(--muted);
}
.empty svg {
  width: 40px;
  height: 40px;
  color: var(--faint);
  stroke-width: 1.5;
}
.empty p {
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
  max-width: 36ch;
}

/* ===================================================================
   LAYOUT HELPERS
   =================================================================== */
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ===================================================================
   MOTION — entrance reveal (GPU-safe)
   =================================================================== */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.reveal {
  opacity: 0;
  animation: reveal .72s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
  will-change: transform, opacity;
}

/* fw-teardown №16, баг стэка: .reveal (fill:both, анимирует transform) держит
   ПОСТОЯННЫЙ stacking-контекст и на header, и на форме. Форма позже в DOM →
   её контекст красится поверх header'а, и поповеры внутри header'а (видимость,
   меню «…» карточки товара) уходят ПОД форму, становятся некликабельными.
   Фикс: явно поднять header-контекст над формой. z-index:5 < чрома (topbar 50,
   side 60, account-pop 70) — конфликта со слоями оболочки нет. */
header.reveal { position: relative; z-index: 5; }

/* ===== /account/settings/* — саб-нав раздела (FW Settings) ===== */
.settings { display: flex; gap: 40px; align-items: flex-start; }
.settings__nav {
  flex: 0 0 200px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: clamp(40px, 7vw, 96px);
}
.settings__nav-link {
  padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.settings__nav-link:hover { background: var(--surface-2); color: var(--ink); }
.settings__nav-link.is-active { background: var(--fw-surface); color: var(--ink); }
.settings__content { flex: 1; min-width: 0; }
@media (max-width: 767px) {
  /* align-items:stretch — иначе в column-режиме flex-start даёт контенту
     max-content ширину и таблица (Тариф, DNS-записи) растягивает страницу вбок */
  .settings { flex-direction: column; gap: 20px; align-items: stretch; }
  .settings__nav { flex-direction: row; flex-wrap: wrap; position: static; width: 100%; }
}

/* ===================================================================
   RESPONSIVE — < 768px collapse
   =================================================================== */
@media (max-width: 767px) {
  .shell { width: calc(100% - 24px); }
  .main { padding-block: clamp(28px, 9vw, 56px); }

  .radio-cards { grid-template-columns: 1fr; }

  .save-bar .btn { flex: 1 1 auto; justify-content: center; }

  /* horizontal scroll guard for tables on small screens */
  .table-wrap { overflow-x: auto; }
  .table { min-width: 520px; }
}

/* ===================================================================
   REDUCED MOTION — near-instant, no blur
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
}

/* ----------------------------------------------------- Sales dashboard block */
.dash-sales-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.period-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--well);
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
}
.period-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.period-tab:hover { color: var(--ink-2); }
.period-tab--active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
}

.spark-wrap {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
}
.spark {
  display: block;
  width: 100%;
  height: 72px;
}

.dash-muted {
  margin: 0;
  padding: 18px 0;
  text-align: center;
  color: var(--faint);
  font-size: 14px;
}
.spark-caption {
  padding: 8px 0 0;
  text-align: right;
  font-size: 12px;
}

/* ===================================================================
   SITE-DESIGN — конструктор секций главной
   =================================================================== */
/* FAQ-айтемы внутри конструктора */
.faq-item {
  border: 1px solid var(--line-2); border-radius: var(--r-xs);
  padding: 12px; margin-bottom: 10px; background: var(--well);
}
.faq-item__remove {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12px; padding: 0; margin-top: 4px;
}
.faq-item__remove:hover { color: var(--ink); }

/* Пикер групп для «Хитов» */
.feat-picker { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.feat-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.feat-opt input { width: 16px; height: 16px; }

/* Тост сохранения секций */
.sec-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px);
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); padding: 10px 18px; border-radius: var(--r-pill);
  font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease); z-index: 50;
}
.sec-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.sec-toast.is-err { background: var(--warn); }

/* ===================================================================
   ONBOARDING — баннер запуска магазина (новый партнёр), /account
   =================================================================== */
.onb {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: clamp(20px, 3vw, 28px);
  /* Base (pre-workspace) rhythm fallback — `.account-workspace .onb`
     zeroes this margin (`.pw-stack` gap owns spacing instead). */
  margin-top: clamp(24px, 3.5vw, 36px);
  margin-bottom: clamp(24px, 3.5vw, 36px);
}
.onb__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.onb__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}
.onb__count {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 560;
  color: var(--muted);
  background: var(--well);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  white-space: nowrap;
}
/* ===== Onboarding (FW-стиль: прогресс + карточки) ===== */
.onb__bar {
  height: 8px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  overflow: hidden; margin: 4px 0 16px;
}
.onb__bar-fill {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: var(--ok); transition: width .4s var(--ease-out);
}
.onb__cards {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.onb-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.onb-card__marker {
  width: 28px; height: 28px; border-radius: var(--r-pill);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.onb-card__marker svg { width: 16px; height: 16px; }
.onb-card--done { opacity: .65; }
.onb-card--done .onb-card__marker { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.onb-card__name { font-weight: 600; color: var(--ink); }
.onb-card__hint { font-size: 13px; color: var(--muted); }
.onb-card__cta { margin-top: 4px; }

/* fw-teardown — Products bulk-select bar + пагинация + чекбоксы */
/* Плашка живёт в <thead> (строка .bulk-row) вместо шапки — высота строки та же, что у шапки */
.bulk-bar{display:flex;align-items:center;gap:6px;margin:0;text-transform:none;letter-spacing:0;font-size:12px;font-weight:500}
.bulk-bar__count{font-weight:500;color:var(--ink);margin-right:8px}
.bulk-row .bulk-bar .btn{min-height:23px;height:23px;padding:0 8px;font-size:12px;font-weight:600;border:0;background:var(--surface-2);color:var(--ink)}
.bulk-row .bulk-bar .btn:hover{background:var(--line-2)}
.bulk-row .bulk-bar .bulk-bar__danger{color:var(--danger)}
.pager{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:14px;color:var(--ink-2);font-size:.9rem}
.pager button{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--surface);color:var(--ink-2);cursor:pointer;font-size:16px;line-height:1;transition:background .14s var(--ease),color .14s var(--ease)}
.pager button:disabled{opacity:.4;cursor:default}
.pager button:not(:disabled):hover{background:var(--well);color:var(--ink)}
.table input[type=checkbox]{width:16px;height:16px;accent-color:var(--brand);cursor:pointer;vertical-align:middle}

/* ===== Products catalog (/account/products/catalog) — FW "Discover" clone ===== */
/* в полноэкранном режиме заголовок компактнее: он больше не соревнуется
   с шапкой кабинета за первый экран */
.pcat-head{margin-bottom:18px}
/* FW-строка шапки каталога: заголовок слева, сортировка справа. Отдельный
   модификатор — в Discover .pcat-head остаётся колонкой «заголовок + lede». */
.pcat-head--bar{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:26px}
.pcat-title{margin:0;font-size:24px;font-weight:600;letter-spacing:-.02em;line-height:1.15}
/* сортировка у FW — не поле в рамке, а строка текста со стрелкой */
.pcat-sort{display:inline-flex;align-items:center;gap:8px;font-size:15px;color:var(--ink)}
.pcat-sort__label{color:var(--muted)}
.pcat-sort select{appearance:auto;padding:0;border:0;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
.pcat-sort select:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.pcat-head .h-display{margin:0 0 4px}
.pcat-head .lede{margin:0}
/* FW: три колонки на 1440 (карточка 329px), крупный вертикальный шаг —
   ряды разделяет воздух, а не рамки карточек */
.pcat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));column-gap:32px;row-gap:38px}
/* Карточка FW — без подложки, рамки и тени. Цвета — отдельные кнопки,
   ссылка на товар содержит фото и описание. */
.pcat-card{display:flex;flex-direction:column;background:transparent;border:0;text-decoration:none;color:var(--ink)}
.pcat-card__link{display:flex;flex:1;flex-direction:column;text-decoration:none;color:inherit}
.pcat-card__link:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
/* Фото на СВЕТЛОЙ подложке — так у FW, и так же устроены наши исходники:
   и предметка ikongifts, и снимки бланков сняты на белом. На тёмном --well
   они лежали белым пятном в тёмной рамке. */
.pcat-card__photo{position:relative;aspect-ratio:3/4;background:#ecebe7;border-radius:var(--r);overflow:hidden}
/* Полный кадр без увеличения и цветовых фильтров: сохраняем края и цвет товара. */
.pcat-card__photo img{width:100%;height:100%;object-fit:contain;display:block}
/* бейдж лежит на СВЕТЛОМ фото: токены badge--pend рассчитаны на тёмную
   панель и на нём растворяются — красим в собственный тёмный чип */
/* Бейдж всегда поверх фото. */
.pcat-card__badge{position:absolute;z-index:1;top:10px;left:10px;padding:4px 10px;background:#17160f;color:#fdfcfb;font-size:13px;font-weight:500;border:0}
.pcat-card__badge::before{display:none}
.pcat-card__body{display:flex;flex-direction:column;gap:6px;padding:12px 0 0;flex:1}
/* строка «бренд · артикул» — у FW первая строка карточки; у части позиций
   заполнено только одно поле, шаблоны склеивают что есть */
.pcat-card__meta{font-size:14px;line-height:1.25;min-height:1.25em;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* две строки максимум: полные названия ikongifts («Бейсболка Impact с сеткой
   из переработанного хлопка AWARE™, 5 клиньев, 190 г») раздували карточку на
   4 строки и рвали сетку; полное имя остаётся в title= */
.pcat-card__title{font-weight:600;font-size:16px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* FW красит название в свой синий; наш --brand (#0042ff) на --surface даёт
   2.4:1 — нечитаемо. Ссылочность отдаём подчёркиванию при наведении. */
.pcat-card__link:hover .pcat-card__title{text-decoration:underline;text-underline-offset:2px}
/* методы нанесения — чипы с обводкой (FW: Printed / Embroidered), раньше
   были строкой через · и терялись в приглушённом тексте */
.pcat-card__tags{display:flex;flex-wrap:wrap;gap:5px}
.pcat-tag{display:inline-flex;align-items:center;padding:2px 7px;border:1px solid var(--line-2);border-radius:3px;font-size:11px;line-height:1.55;color:var(--ink-2);white-space:nowrap}
/* цена и всё под ней прижаты к низу: в ряду карточки одной высоты, и без
   этого блок цен «висел» на разной высоте у названий в 1 и 2 строки */
.pcat-card__price{display:flex;align-items:baseline;flex-wrap:wrap;margin-top:auto;padding-top:6px;font-size:14px}
.pcat-card__price-amount{font-weight:500;color:var(--ink-2)}
.pcat-card__price-caption{font-size:11.5px;color:var(--muted)}
.pcat-card__price-caption::before{content:"|";margin:0 7px;color:var(--line-2)}
.pcat-card__methods{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcat-dots{display:flex;align-items:center;flex-wrap:wrap;gap:0;margin-top:2px}
/* Видимая точка 15px, цель нажатия 32px; двухцветные значения поддерживают gradient. */
.pcat-dot{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer}
.pcat-dot::before{content:"";width:15px;height:15px;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px rgba(0,0,0,.12),0 0 0 1px var(--line-2)}
.pcat-dot:focus-visible{outline:2px solid var(--brand);outline-offset:0}
.pcat-dot[aria-pressed="true"]::before{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--brand)}
.pcat-dot:disabled{cursor:default}
.pcat-dot-more{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;font-size:11px;color:var(--muted)}
/* «Скоро» отмечаем бейджем и подписью, сохраняя настоящие цвета фото. */
.pcat-card--soon .pcat-card__title,
.pcat-card--soon .pcat-card__price-amount{color:var(--ink-2)}

/* ===== Discover (/account/products/discover) — обзор каталога: квиз (Alpine),
   категории и ряды коллекций (Jinja). Табы переиспользуются и в
   products_catalog.html; стрелки/края рядов — account-ui.js. ===== */
/* Плитка категории — широкий баннер по образцу FW: фото во всю плитку,
   подпись поверх снизу слева. Фон баннеров тёплый бежевый (не белый), поэтому
   светлого пятна-дыры в тёмном интерфейсе не получается; подпись тёмная —
   контраст к светлому фото, как у FW. */
.pcat-tile{position:relative;display:block;aspect-ratio:3/2;border-radius:var(--r);overflow:hidden;border:1px solid var(--line);text-decoration:none;color:#17160f;background:var(--well);transition:border-color .14s var(--ease),transform .14s var(--ease)}
.pcat-tile:hover{border-color:var(--brand);transform:translateY(-2px)}
.pcat-tile:hover .pcat-tile__photo{transform:scale(1.03)}
.pcat-tile__photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s var(--ease)}
.pcat-tile__body{position:absolute;left:18px;right:18px;bottom:14px;min-width:0;
  /* подпись держится в пустой левой части кадра (баннеры сняты с воздухом
     слева) — иначе длинный заголовок заезжает на модель и тонет */
  max-width:62%}
.pcat-tile__title{display:block;font-weight:600;font-size:20px;line-height:1.25;letter-spacing:-.01em}
.pcat-tile__count{color:rgba(23,22,15,.6);font-size:12.5px}
/* auto-fit, не auto-fill: при трёх категориях auto-fill оставлял пустые треки
   справа, и ряд читался как оборванный */
.pcat-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}
/* Баннер подборки — крупная фотография во всю ширину секции, как у FW между
   рядами карточек: полоса 5:2 (кадр 16:9 обрезается по верху и низу), поверх
   слева заголовок и pill-кнопка тёмным по светлому фото. Подпись держится в
   пустой левой половине кадра — там баннеры сняты с воздухом. */
.pcat-hero{position:relative;display:block;aspect-ratio:5/2;margin:32px 0 0;border-radius:var(--r);overflow:hidden;border:1px solid var(--line);text-decoration:none;color:#17160f;background:var(--well)}
.pcat-hero:hover{border-color:var(--brand)}
.pcat-hero:hover .pcat-hero__photo{transform:scale(1.02)}
.pcat-hero__photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 40%;display:block;transition:transform .5s var(--ease)}
.pcat-hero__body{position:absolute;left:40px;bottom:34px;max-width:44%;display:grid;justify-items:start;gap:10px}
.pcat-hero__title{margin:0;font-size:clamp(26px,3.2vw,44px);font-weight:600;line-height:1.04;letter-spacing:-.035em}
.pcat-hero__lede{font-size:14px;line-height:1.35;color:rgba(23,22,15,.68)}
.pcat-hero__cta{margin-top:2px;padding:7px 16px;border:1px solid rgba(23,22,15,.5);border-radius:var(--r-pill);font-size:14px;font-weight:500;transition:background .14s var(--ease),color .14s var(--ease)}
/* инверсия при наведении: тёмная пилюля со СВЕТЛЫМ текстом. Токен --well
   здесь не годится — он тёмный (#1d1e19), и текст пропадал на тёмном фоне
   кнопки; баннер лежит на светлом фото, поэтому цвет задаём явным литералом */
.pcat-hero:hover .pcat-hero__cta{background:#17160f;color:#fdfcfb;border-color:#17160f}
@media (max-width:720px){
  .pcat-hero{aspect-ratio:3/2}
  .pcat-hero__body{left:20px;bottom:20px;max-width:62%;gap:7px}
  .pcat-hero__lede{display:none}
}
.pcat-row-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:32px 0 14px}
/* шапка ряда под баннером: заголовок уехал в баннер, слева пусто —
   действия прижимаем вправо, иначе они болтались бы у левого края */
.pcat-row-head--hero{justify-content:flex-end;margin-top:14px}
.pcat-row-head h2{margin:0;font-size:18px;letter-spacing:-.01em}
.pcat-row-actions{display:flex;align-items:center;gap:12px;flex:none}
.pcat-row-all{padding-left:0;white-space:nowrap}
/* стрелки ряда: показываем только когда ряд реально переполнен (класс вешает
   account-ui.js), на тач-устройствах не нужны — там свайп */
.pcat-row-nav{display:none;gap:6px}
@media (hover:hover) and (pointer:fine){.pcat-row-head.is-scrollable .pcat-row-nav{display:flex}}
.pcat-row-btn{display:inline-grid;place-items:center;width:30px;height:30px;padding:0;border-radius:var(--r-pill);border:1px solid var(--line-2);background:var(--surface);color:var(--ink-2);cursor:pointer;transition:background .14s var(--ease),color .14s var(--ease),opacity .14s var(--ease)}
.pcat-row-btn svg{width:16px;height:16px}
.pcat-row-btn:not(:disabled):hover{background:var(--surface-2);color:var(--ink)}
.pcat-row-btn:disabled{opacity:.35;cursor:default}
.pcat-row{display:flex;gap:16px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity;scroll-behavior:smooth}
.pcat-row .pcat-card{flex:0 0 auto;width:240px;scroll-snap-align:start}
/* растворяющийся край вместо обрубленной карточки — маска только с той
   стороны, куда ряд ещё можно прокрутить */
.pcat-row.can-right{mask-image:linear-gradient(to right,#000 calc(100% - 72px),transparent)}
.pcat-row.can-left{mask-image:linear-gradient(to right,transparent,#000 72px)}
.pcat-row.can-left.can-right{mask-image:linear-gradient(to right,transparent,#000 72px,#000 calc(100% - 72px),transparent)}
@media (max-width:640px){.pcat-row .pcat-card{width:210px}}
@media (prefers-reduced-motion:reduce){
  .pcat-row{scroll-behavior:auto}
  .pcat-card:hover,.pcat-tile:hover,.pcat-podbor-option:active,
  .pcat-tile:hover .pcat-tile__photo,.pcat-hero:hover .pcat-hero__photo{transform:none}
}

/* FW-паритет с /tovary (дизайн-док 2026-08-21): сайдбар фасетных фильтров.
   Чекбоксы и подписи переиспользуют .field__check/.field__label из FORMS —
   отдельных .pcat-facet-option/.pcat-facet-label не заводим. */
.pcat-layout{display:grid;grid-template-columns:1fr;gap:24px;align-items:start}
@media (min-width:880px){.pcat-layout{grid-template-columns:245px 1fr}}
.pcat-facets{display:flex;flex-direction:column;gap:34px}
/* Alpine x-show — инлайн-стиль; на ширинах ≥880 форсируем видимость поверх
   него через !important (та же ловушка, что apex .ds-facets). */
@media (min-width:880px){.pcat-facets{display:flex!important}}
.pcat-facet-group + .pcat-facet-group{margin-top:26px}
.pcat-price-range{display:flex;align-items:center;gap:8px}

/* --- Сайдбар по FW: сначала НАВИГАЦИЯ (категории, коллекции — одиночный
   выбор, оформлены ссылками), потом h2 «Фильтры» с чекбоксовыми группами.
   Замеры FW: h2 20/600, пункт списка 16/400 с шагом 29px, заголовок группы
   16/600, опция 16/400 с шагом 32px, чекбокс 20px в 36px от края. --- */
.pcat-side-group{display:flex;flex-direction:column}
.pcat-side-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;font-size:20px;font-weight:600;letter-spacing:-.01em;color:var(--ink)}
.pcat-side-link{padding:4px 0;font-size:16px;line-height:1.35;color:var(--ink-2);text-decoration:none;transition:color .14s var(--ease)}
.pcat-side-link:hover{color:var(--ink)}
.pcat-side-link.is-on{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.pcat-side-reset{padding:0;border:0;background:none;font:inherit;font-size:13px;font-weight:400;color:var(--muted);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.pcat-side-reset:hover{color:var(--ink)}
.pcat-facet-title{margin-bottom:6px;font-size:16px;font-weight:600;color:var(--ink)}
/* Опция фасета: у FW это крупная строка с квадратным чекбоксом, а не
   компактный .field__check формы — своя строка, свой чекбокс. */
.pcat-check{display:flex;align-items:center;gap:12px;padding:5px 0;font-size:16px;line-height:1.35;color:var(--ink);cursor:pointer}
.pcat-check input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:none;width:20px;height:20px;margin:0;border:1px solid var(--line-2);border-radius:var(--r-sm);background:transparent;cursor:pointer;transition:background .14s var(--ease),border-color .14s var(--ease)}
.pcat-check:hover input[type=checkbox]{border-color:var(--muted)}
.pcat-check input[type=checkbox]:checked{background:var(--brand);border-color:var(--brand)}
/* галочка рисуется бордюрами: без SVG и без зависимости от шрифта */
.pcat-check input[type=checkbox]:checked::after{content:"";display:block;width:5px;height:9px;margin:2px auto 0;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.pcat-check input[type=checkbox]:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.pcat-more{align-self:flex-start;margin-top:4px;padding:0;border:0;background:none;font:inherit;font-size:14px;color:var(--ink-2);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.pcat-more:hover{color:var(--ink)}
/* Цвета = сетка круглых свотчей без подписей (FW: 7 в ряд, ~28px).
   Имя цвета остаётся в title/aria-label — иначе фасет недоступен без мыши. */
.pcat-swatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(28px,1fr));gap:9px}
.pcat-swatch{width:28px;height:28px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.22);cursor:pointer;transition:box-shadow .14s var(--ease)}
.pcat-swatch:hover{box-shadow:0 0 0 2px var(--line-2)}
.pcat-swatch.is-on{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--ink)}
.pcat-swatch:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
/* Двуручковый слайдер цены (FW «Base price»): два input[type=range] лежат друг
   на друге. События ловят ТОЛЬКО бегунки — иначе трек верхнего инпута
   перекрывает нижнюю ручку и она становится недоступной. */
.pcat-range{position:relative;height:22px;margin:6px 0 12px}
.pcat-range__track,.pcat-range__fill{position:absolute;top:9px;height:4px;border-radius:2px}
.pcat-range__track{left:0;right:0;background:var(--line-2)}
.pcat-range__fill{background:var(--brand)}
.pcat-range input[type=range]{position:absolute;left:0;top:0;width:100%;height:22px;margin:0;appearance:none;-webkit-appearance:none;background:transparent;pointer-events:none}
.pcat-range input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;width:16px;height:16px;border-radius:50%;background:var(--brand);border:2px solid var(--bg);cursor:grab}
.pcat-range input[type=range]::-moz-range-thumb{pointer-events:auto;width:16px;height:16px;border-radius:50%;background:var(--brand);border:2px solid var(--bg);cursor:grab}
.pcat-range input[type=range]:focus-visible{outline:none}
.pcat-range input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 3px var(--brand-12)}
/* поле цены с валютным префиксом — у FW «$» стоит внутри рамки слева */
.pcat-price-field{position:relative;flex:1 1 0;min-width:0}
.pcat-price-field i{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-style:normal;font-size:14px;color:var(--muted);pointer-events:none}
.pcat-price-field .input{width:100%;padding-left:26px}
/* ряд плиток категорий над сеткой каталога (первый ряд FW «All Products») */
.pcat-tiles--top{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:32px;margin-bottom:38px}
.pcat-empty{display:flex;flex-direction:column;align-items:center;gap:16px;padding:56px 20px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:var(--r)}
.pcat-mobile-filters-btn{display:flex}
@media (min-width:880px){.pcat-mobile-filters-btn{display:none}}
button.pcat-chip{font:inherit;cursor:pointer}

/* ===== Discover-квиз (инлайн на /account/products/discover, с 2026-08-22 —
   вопросы сразу + выдача сразу внизу, как у FW) — те же ds-podbor-* правила
   apex, кабинетный неймспейс pcat-podbor-* поверх токенов account.css. ===== */
.pcat-podbor-panel{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:22px 24px;margin-top:8px}
/* 36px: 32px не дотягивал до комфортной тач-цели */
.pcat-podbor-close{position:absolute;top:12px;right:12px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--line-2);background:transparent;color:var(--muted);cursor:pointer;transition:background .14s var(--ease),color .14s var(--ease)}
.pcat-podbor-close:hover{background:var(--surface-2);color:var(--ink)}
/* строка-мета: раньше здесь стоял .eyebrow — капслок с трекингом .2em на
   целом предложении не читался и спорил с вопросом за роль заголовка */
.pcat-podbor-meta{display:flex;align-items:center;gap:10px;margin:0;padding-right:44px;color:var(--muted);font-size:12.5px;line-height:1}
.pcat-podbor-dots{display:inline-flex;gap:5px}
.pcat-podbor-dots i{width:16px;height:3px;border-radius:2px;background:var(--line-2);transition:background .18s var(--ease)}
.pcat-podbor-dots i.is-on{background:var(--brand)}
/* --faint (#6e6e68) на surface даёт всего 3:1 — для 12.5px мало, держим --muted */
.pcat-podbor-step{color:var(--muted)}
.pcat-podbor-q{margin-top:14px}
.pcat-podbor-qhead{display:flex;align-items:center;gap:10px}
.pcat-podbor-title{margin:0;font-size:1.25rem;font-weight:600;letter-spacing:-.01em;line-height:1.25;color:var(--ink);text-wrap:balance}
/* FW-раскладка: варианты делят всю ширину поровну, содержимое по центру,
   слева — кружок выбора. Раньше стоял потолок 320px, потому что кнопки с
   текстом у левого края читались как поехавшая форма; центрирование
   снимает эту проблему без ограничения ширины. */
.pcat-podbor-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:14px}
.pcat-podbor-option{position:relative;display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;padding:18px 48px;border-radius:var(--r);border:1px solid var(--line-2);background:var(--surface-2);color:var(--ink);cursor:pointer;transition:border-color .14s var(--ease),background .14s var(--ease),transform .14s var(--ease)}
.pcat-podbor-option::before{content:"";position:absolute;left:18px;top:50%;transform:translateY(-50%);width:18px;height:18px;border-radius:50%;border:1px solid var(--line-2);transition:border-color .14s var(--ease)}
.pcat-podbor-option:hover::before{border-color:var(--brand)}
.pcat-podbor-option:hover{border-color:var(--brand);background:var(--brand-12)}
.pcat-podbor-option:active{transform:translateY(1px)}
/* иконка — единственная графика в квизе: она же отличает три посадки, которые
   словами («классическая/приталенная/свободная») различаются хуже, чем силуэтом */
.pcat-podbor-option-icon{flex:none;width:40px;height:40px;display:flex;align-items:center;justify-content:center;color:var(--ink-2);transition:color .14s var(--ease)}
.pcat-podbor-option:hover .pcat-podbor-option-icon{color:var(--brand)}
.pcat-podbor-option-text{display:flex;flex-direction:column;gap:3px;min-width:0;align-items:center}
.pcat-podbor-option-title{font-weight:600;font-size:.95rem;line-height:1.3}
.pcat-podbor-option-sub{font-size:.8rem;color:var(--muted);line-height:1.35}
.pcat-podbor-back{width:32px;height:32px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--line-2);background:transparent;color:var(--ink);cursor:pointer;transition:background .14s var(--ease)}
.pcat-podbor-back:hover{background:var(--surface-2)}
/* padding-right: без него кнопка «Пройти заново» подлезала под крестик */
.pcat-podbor-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-right:44px}
.pcat-podbor-answers{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pcat-podbor-answers .pcat-podbor-meta{padding-right:0}
.pcat-podbor-answer{display:inline-flex;align-items:center;padding:5px 11px;border-radius:var(--r-pill);border:1px solid var(--line-2);background:var(--surface-2);color:var(--ink-2);font-size:12.5px;line-height:1.2}
.pcat-podbor-answer:empty{display:none}
.pcat-podbor-panel .btn--ghost:not(:disabled){border-color:var(--line-2)}
.pcat-recommended{margin-top:8px}
.pcat-podbor-note{color:var(--muted);margin-top:20px}
@media (max-width:640px){
  .pcat-podbor-panel{padding:18px 16px}
  .pcat-podbor-title{font-size:1.1rem}
  /* кружок съедал бы половину узкой кнопки */
  .pcat-podbor-option{padding:16px 18px}
  .pcat-podbor-option::before{display:none}
}

/* ===================================================================
   CANVAS-ДИЗАЙНЕР (docs/2026-07-15-canvas-designer-design.md §4.1)
   Полноэкранное standalone-приложение (own <html>, не account/_layout.html —
   как account/design.html, тема-редактор). dz-* префикс.
   =================================================================== */
/* §1 полировки (docs/2026-08-15-…-polish-2.md): height (не min-height) +
   overflow:hidden — страница дизайнера НЕ скроллится сама (у FW скроллбара
   страницы нет вовсе); прокрутка живёт только внутри .dz-left/.dz-right/
   .dz-views ниже. */
.dz-app{height:calc(100dvh / var(--bo-zoom, 1));overflow:hidden;display:flex;flex-direction:column;background:var(--bg);color:var(--ink)}

.dz-topbar{display:flex;align-items:center;gap:16px;padding:14px 24px;border-bottom:1px solid var(--line);background:var(--surface)}
.dz-topbar__spacer{flex:1}
/* Компактная иконочная кнопка «Назад» слева от «Заказать образец» (FW-паритет,
   владелец 2026-08-14) — тот же ghost-скоуп ниже, квадратная ~34px. */
.dz-topbar__icon-btn{aspect-ratio:1;align-self:stretch;padding:0;justify-content:center;flex:0 0 auto}
.dz-topbar__icon-btn svg{width:15px;height:15px;display:block}
/* Ghost-кнопка на топбаре растворялась в фоне: .btn--ghost красится ТЕМ ЖЕ
   var(--surface), что и .dz-topbar (account.css ~605-610), а hairline
   var(--line) неотличим от var(--surface) — Δ1 по RGB, память
   dark_ui_hairline_line_vs_line2 (--line = #252621 vs --surface = #242521).
   Точечный фикс СКОУП .dz-topbar — глобальный .btn--ghost (весь /account
   и /admin) не трогаем. :not(:disabled) обязателен — иначе эта равная по
   специфичности, но более поздняя в файле пара побеждает .btn:disabled
   (см. комментарий там же, ~строка 654) и «пустой холст» читался бы как
   притушенная активная кнопка, а не нейтральная плитка. */
.dz-topbar .btn--ghost:not(:disabled){
  background:var(--surface-2);
  box-shadow:0 0 0 1px var(--line-2), var(--shadow-sm);
}
@media (hover: hover) {
  .dz-topbar .btn--ghost:not(:disabled):hover{background:var(--well)}
}

/* --- Холст: 3 колонки (рейл видов D5 — плавающий оверлей внутри .dz-center,
   не своя grid-колонка, FW-паритет — docs/2026-08-13-…-design-order.md п.1).
   Левая панель 360px (владелец 13.08: 300px «как будто ничего не изменилось») —
   правую (300px) не трогаем. */
.dz-shell{flex:1;display:grid;grid-template-columns:360px minmax(0,1fr) 300px;gap:0;min-height:0}
/* min-height:0 (не хрупкий calc(100dvh - 57px) от высоты топбара) — грид-ячейка
   по умолчанию растягивается на всю высоту .dz-shell (align-content:stretch
   у грида), min-height:0 разрешает панели схлопнуться НИЖЕ контента и отдать
   лишнее в overflow-y:auto, вместо того чтобы раздувать .dz-shell и всю
   страницу (§1 полировки). */
.dz-left,.dz-right{padding:20px;overflow-y:auto;min-height:0}
.dz-left{border-right:1px solid var(--line);display:flex;flex-direction:column;gap:20px}
.dz-right{border-left:1px solid var(--line)}


.dz-upload-btn{position:relative;cursor:pointer}
/* Группа действий панели — как у FW: кнопки идут плотной лестницей (8px),
   а не вразброс через общий gap:20px панели. Пунктирного поля «перетащите
   сюда» между ними больше нет (владелец 16.08). */
.dz-actions{display:flex;flex-direction:column;gap:8px}
/* Требования к файлу: у FW рядом с «Upload image» стоит квадратная кнопка
   «···» той же высоты и того же радиуса — копируем её форму 1:1 (владелец
   16.08: прежний круглый ⓘ ломал ряд и криво центрировал глиф). */
.dz-upload-row{position:relative;display:flex;align-items:stretch;gap:8px}
.dz-upload-row .dz-upload-btn{flex:1;margin:0}
.dz-upload-info-btn{
  flex:0 0 auto;width:44px;align-self:stretch;padding:0;
  border-radius:var(--r-sm);border:1px solid var(--line-2);
  background:var(--surface-2);color:var(--ink-2);font-size:16px;line-height:1;
  letter-spacing:.5px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  transition:color .14s var(--ease),border-color .14s var(--ease);
}
.dz-upload-info-btn:hover{color:var(--ink);border-color:var(--brand)}
.dz-upload-info-popover{
  position:absolute;top:calc(100% + 8px);right:0;z-index:20;width:240px;
  background:var(--surface);border:1px solid var(--line-2);border-radius:var(--r);
  padding:12px 14px;box-shadow:0 10px 30px rgba(0,0,0,.4);
  display:flex;flex-direction:column;gap:6px;
}
.dz-upload-info-popover p{margin:0;font-size:12.5px;color:var(--ink-2);line-height:1.4}
.dz-upload-info-popover strong{font-size:13px;color:var(--ink)}
.dz-upload-info-popover{width:280px;max-height:calc(100vh - 160px);overflow-y:auto}
/* Файл тащат на панель целиком — отдельного поля нет, подсвечиваем саму
   колонку внутренней рамкой (border сдвинул бы содержимое). */
.dz-left.is-drag{box-shadow:inset 0 0 0 2px var(--brand);background:var(--brand-12)}

.dz-uploads-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.dz-upload-tile{position:relative}
.dz-upload-thumb{width:100%;padding:0;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--well);aspect-ratio:1/1;overflow:hidden;cursor:grab;transition:border-color .14s var(--ease)}
.dz-upload-thumb:hover{border-color:var(--brand)}
.dz-upload-thumb img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.dz-recent-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:26px;font-weight:600}
/* D1: remove-кнопка появляется по hover/focus плитки, без JS-listener на hover */
.dz-upload-tile__remove{
  position:absolute;top:4px;right:4px;width:20px;height:20px;line-height:18px;padding:0;
  border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--muted);
  font-size:14px;cursor:pointer;opacity:0;transition:opacity .14s var(--ease),color .14s var(--ease),border-color .14s var(--ease);
}
.dz-upload-tile:hover .dz-upload-tile__remove,
.dz-upload-tile:focus-within .dz-upload-tile__remove{opacity:1}
.dz-upload-tile__remove:hover{color:#F87171;border-color:#F87171}

/* Недавние дизайны: 3 на главной / «папка» со всеми (FW-паритет).
   .dz-left-main — обёртка x-if БЕЗ собственного бокса (display:contents),
   иначе её дети слипаются в один flex-item .dz-left и теряют gap:20px. */
.dz-left-main{display:contents}
.dz-recent-header{
  display:flex;align-items:center;gap:6px;width:100%;margin:0 0 8px;padding:0;
  border:none;background:none;font:inherit;font-size:.9rem;font-weight:560;
  color:var(--ink);text-align:left;cursor:pointer;
}
.dz-recent-header:hover{text-decoration:underline}
.dz-recent-header__arrow{color:var(--muted);transition:color .14s var(--ease)}
.dz-recent-header:hover .dz-recent-header__arrow{color:var(--ink)}
.dz-uploads-grid--lg{gap:18px}
/* Главный вид «Недавних»: 3 мелкие плитки в ряд — «папка» остаётся 2-колоночной,
   поэтому её плитки в ~1.5 раза крупнее без отдельного размера у tile. */
.dz-uploads-grid--r3{grid-template-columns:repeat(3,1fr)}
.dz-upload-tile__name{margin:6px 0 0;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* --- Рейл миниатюр видов (D5) — плавает у левого края СЦЕНЫ (.dz-stage,
   владелец 13.08: раньше висел у края всей центральной колонки и оказывался
   далеко от футболки на широких экранах, где холст не растягивается на всю
   ширину). right:100% ставит правый край рейла ровно на левый край сцены,
   margin-right — зазор ~16px до холста; .dz-canvas-wrap по-прежнему
   резервирует место через padding-left (см. .dz-center--with-views ниже),
   чтобы холст не рисовался под рейлом. */
.dz-views{
  position:absolute;top:0;right:100%;margin-right:16px;z-index:6;width:104px;
  display:flex;flex-direction:column;align-items:center;gap:10px;
  max-height:100%;overflow-y:auto;overflow-x:hidden;
}
.dz-view-tile{display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px;border:none;background:none;cursor:pointer;width:100%}
.dz-view-tile__frame{
  position:relative;display:block;width:88px;height:88px;border-radius:var(--r-sm);
  border:1.5px solid var(--line);background-color:var(--well);
  /* stretch-to-fill, не contain: rect%-оверлей (zoneRectStyle) считает 0..1
     координаты как весь кадр без леттербоксинга — так же, как Fabric-канвас
     на десктопе (canvasW/H = размеры картинки вида, без crop/pad). Реальные
     виды не квадратные (напр. 1200×1500), contain даёт ~10% полей и рамка
     зоны на превью съезжает/растягивается мимо факта. */
  background-size:100% 100%;background-position:center;background-repeat:no-repeat;
  transition:border-color .14s var(--ease);
}
.dz-view-tile.is-active .dz-view-tile__frame{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-12)}
.dz-view-tile__rect{position:absolute;border:1px dashed var(--muted);border-radius:2px}
.dz-view-tile__rect.has-design{border-style:solid;border-color:var(--brand);background:var(--brand-12)}
.dz-view-tile__label{font-size:12px;color:var(--muted);text-align:center}
.dz-view-tile.is-active .dz-view-tile__label{color:var(--ink)}

/* Резиновый холст (FW-паритет, docs/2026-08-13-…-design.md «Задача владельца»):
   .dz-center — вся высота колонки (grid stretch даёт ей высоту .dz-shell),
   .dz-canvas-wrap — flex:1, растягивается на весь остаток, центрирует
   .dz-stage флексом; фактический размер fabric-канваса считает
   account-designer.js::fitTargetSize/applyViewSize из clientWidth/clientHeight
   wrap (contain-fit картинки вида), на ResizeObserver — applyViewSize также
   выставляет .dz-stage ровно в размер канваса (ОДНА точка истины, без
   дублирования математики). Подпись/чипы/рейл видов — position:absolute
   ВНУТРИ .dz-stage (не резервируют полосу, плавают поверх холста, как у FW);
   тулбар (undo/зум) тоже в .dz-stage, но стоит НАД холстом (bottom:100%) в полосе
   padding-top wrap — иначе перекрывал воротник изделия (партнёр 02.10) —
   их центр left:50%/translateX(-50%) считается от СЦЕНЫ, а не от wrap, поэтому
   совпадает с центром канваса при любом padding-left-резерве слева (владелец
   13.08: раньше центрировались по wrap и стояли левее футболки). */
.dz-center{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.dz-canvas-wrap{
  position:relative;flex:1;min-height:0;min-width:0;margin:16px;
  padding-top:72px; /* полоса под тулбар зума (.dz-toolbar); JS::fitTargetSize читает её */
  display:flex;align-items:center;justify-content:center;
  border-radius:var(--r-lg);background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);
  background-image:
    linear-gradient(45deg,var(--well) 25%,transparent 25%),
    linear-gradient(-45deg,var(--well) 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,var(--well) 75%),
    linear-gradient(-45deg,transparent 75%,var(--well) 75%);
  background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;
}
/* Рейл видов (.dz-views, 16+104+16px) наложен поверх левого края сцены — резервируем
   ему место, иначе холст рисуется под миниатюрами. JS::fitTargetSize читает
   этот padding через getComputedStyle, не дублирует число. */
.dz-center--with-views .dz-canvas-wrap{padding-left:136px}
/* Стек свотчей цвета ткани (.dz-colorways) наложен на правый край .dz-center —
   резервируем ему место так же, как рейлу видов слева. Правило стоит ПЕРЕД
   --with-thumb: у плитки резерв больше, и при обоих классах должна выигрывать
   она (равная специфичность — решает порядок, память css_rule_order_beats_media_query). */
.dz-center--with-colors .dz-canvas-wrap{padding-right:76px}
/* Плитка превью мокапа (.dz-mockup-thumb, 180px+16+16) сидит в правом нижнем
   углу .dz-center поверх канваса — тем же приёмом резервируем ей место справа,
   иначе центрированный по сцене нижний оверлей (чипы позиций) на узких
   экранах наезжает НА плитку, а не только «под» неё (владелец 13.08,
   docs/2026-08-13-…-design-order.md п.2). */
.dz-center--with-thumb .dz-canvas-wrap{padding-right:212px}

.dz-stage{position:relative;width:680px;height:680px;max-width:100%;max-height:100%}
.dz-stage canvas{display:block;border-radius:calc(var(--r-lg) - 8px)}
/* Тулбар стоит над холстом в полосе padding-top wrap (bottom:100%), в одну
   строку (nowrap): на узкой сцене (мало места из-за padding-left/right под
   рейл+плитку, ревью major к bdbcb1a2) сжимается слайдер, а не растёт высота —
   полоса фиксирована. max-width:100% не даёт вылезти на рейл видов слева. */
.dz-toolbar{
  position:absolute;bottom:100%;margin-bottom:8px;left:50%;transform:translateX(-50%);z-index:5;
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:8px;padding:8px 10px;border-radius:var(--r-pill);
  background:var(--surface);border:1px solid var(--line);box-shadow:0 6px 20px rgba(0,0,0,.35);
  /* width:max-content — без него absolute+flex-wrap схлопывается к
     shrink-to-fit МИНИМУМУ (по одной кнопке на строку, ~4 строки вместо 2):
     max-content просит «сколько нужно в один ряд», max-width обрезает
     это до сцены — внутри обрезанной ширины wrap раскладывает элементы
     оптимально по рядам, а не по одному. max-width:100% (не -32, как у
     .dz-canvas-bottom-overlay) — естественная ширина тулбара (~382px)
     впритык к -32 версии на 1440 (392px сцена), даёт лишний перенос
     на пустом месте; 100% всё равно не даёт перелезть за рейл — тот
     стоит с буфером ещё 16px левее самой сцены. */
  width:max-content;max-width:100%;min-width:0;overflow:hidden;
}
.dz-toolbar__spacer{flex:1}
/* §3 полировки: undo/redo/лупа — квадратные ~34px icon-ghost-кнопки, тот же
   приём и тот же ghost-скоуп-фикс, что у .dz-topbar__icon-btn (растворение
   ghost-кнопки в одинаковом var(--surface) фоне — dark_ui_hairline_line_vs_line2). */
.dz-toolbar__icon-btn{width:34px;height:34px;padding:0;flex:0 0 auto;justify-content:center}
.dz-toolbar__icon-btn svg{width:16px;height:16px;display:block}
.dz-toolbar .btn--ghost:not(:disabled){
  background:var(--surface-2);
  box-shadow:0 0 0 1px var(--line-2), var(--shadow-sm);
}
@media (hover: hover) {
  .dz-toolbar .btn--ghost:not(:disabled):hover{background:var(--well)}
}
/* Слайдер зума вместо кнопок −/Fit/+ (§3 полировки) — тонкий тёмный трек,
   круглый бегунок ~12px, как у FW. */
.dz-zoom-slider{-webkit-appearance:none;appearance:none;width:120px;min-width:40px;height:20px;background:transparent;cursor:pointer;flex:0 1 auto;margin:0 2px}
.dz-zoom-slider::-webkit-slider-runnable-track{height:2px;background:var(--line-2);border-radius:1px}
.dz-zoom-slider::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:12px;height:12px;margin-top:-5px;
  border-radius:50%;background:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.4);
}
.dz-zoom-slider::-moz-range-track{height:2px;background:var(--line-2);border-radius:1px}
.dz-zoom-slider::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.4)}
.dz-saved-flash{position:absolute;top:22px;right:20px;z-index:5;margin:0;font-size:12.5px;font-weight:560;color:var(--ok)}

/* Подпись физразмера/DPI + чипы позиций — общий оверлей ПОД зоной печати по
   центру сцены, как у FW «15" x 18" (150 dpi)» + preset-чипы под ней. Один
   позиционированный контейнер (flex-column, gap) вместо двух с ручными
   bottom-офсетами — самостоятельно не даёт им наехать друг на друга, сколько
   бы строк ни занял wrap чипов. max-width относительно сцены (=канвас) —
   больше не нужен магический вычет под плитку превью, плитка (.dz-mockup-thumb)
   висит в углу .dz-center отдельно; z-index держит оверлей НАД плиткой на
   случай геометрического пересечения на узких экранах (владелец 13.08). */
.dz-canvas-bottom-overlay{
  position:absolute;left:50%;bottom:16px;transform:translateX(-50%);z-index:7;
  display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;
  /* width:max-content — тот же приём, что у .dz-toolbar выше: без него
     чипы схлопываются в вертикальный столбец по одному вместо рядов. */
  width:max-content;max-width:calc(100% - 32px);
}
/* max-width:100% + white-space:normal (не nowrap) — на узкой сцене длинная
   строка (см/dpi/ступень/цена) переносится на 2 строки внутри границ
   родителя (.dz-canvas-bottom-overlay, сам уже ограничен max-width сцены),
   а не вылезает нетронутым nowrap-текстом поверх рейла видов слева
   (ревью major к bdbcb1a2 — тот же класс бага, что у .dz-toolbar выше). */
.dz-live-line{
  margin:0;padding:6px 14px;border-radius:var(--r-pill);
  background:rgba(10,12,20,.72);backdrop-filter:blur(2px);
  font-family:var(--font-mono);font-size:13px;color:var(--muted);
  white-space:normal;width:100%;text-align:center;
}
.dz-live-line.is-green{color:var(--ok)}
.dz-live-line.is-yellow{color:var(--warn)}
.dz-live-line.is-red{color:#F87171}

/* §6 полировки — пилюля выделения объекта (заменяет нижние чипы позиций):
   плавает ПОД bbox выбранного принта, координаты пишет JS (dz.updatePill,
   screen-space getBoundingRect — .dz-stage совпадает с канвасом 1:1, тот же
   инвариант, что у .dz-toolbar/.dz-canvas-bottom-overlay выше). */
.dz-pill{
  position:absolute;transform:translateX(-50%);z-index:8;
  display:flex;align-items:center;gap:4px;padding:6px 6px 6px 12px;border-radius:var(--r-pill);
  background:var(--surface);border:1px solid var(--line-2);box-shadow:0 6px 20px rgba(0,0,0,.35);
  white-space:nowrap;
}
.dz-pill__size{font-family:var(--font-mono);font-size:12px;color:var(--ink-2)}
.dz-pill__quality{position:absolute;right:calc(100% + 6px);top:50%;transform:translateY(-50%);padding:6px 10px;border-radius:6px;font-size:12px;font-weight:500;white-space:nowrap}
.dz-pill__quality.is-yellow{background:#F5B82E;color:#1a1400}
.dz-pill__quality.is-red{background:#EF4444;color:#fff}
.dz-pill__icon,.dz-pill__more{
  width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);
  display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px;line-height:1;
  transition:background .14s var(--ease),color .14s var(--ease);
}
.dz-pill__icon:hover{color:#F87171;background:var(--well)}
.dz-pill__more:hover,.dz-pill__more.is-open{color:var(--ink);background:var(--well)}
.dz-pill__more:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* Меню «…» — один дропдаун с шагами root/resize/fit/position (§6.2: вложенные
   «мини-поповеры» ТЗ — виды одного плавающего блока, не отдельные попапы). */
.dz-pill-menu{
  position:absolute;top:calc(100% + 6px);left:calc(100% - 31px);z-index:9;width:210px;
  background:var(--surface);border:1px solid var(--line-2);border-radius:var(--r);
  box-shadow:0 10px 30px rgba(0,0,0,.4);padding:6px;display:flex;flex-direction:column;gap:2px;
  text-align:left;white-space:normal;
}
.dz-pill-menu__item{
  display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;
  padding:8px 10px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--ink-2);
  font-size:13px;text-align:left;cursor:pointer;transition:background .14s var(--ease),color .14s var(--ease);
}
.dz-pill-menu__item:hover{background:var(--well);color:var(--ink)}
.dz-pill-menu__item:disabled{opacity:.4;cursor:default;background:transparent;color:var(--ink-2)}
.dz-pill-menu__item.is-active{color:var(--brand)}
.dz-pill-menu__item--danger:hover{color:#F87171}
.dz-pill-menu__hk{font-size:11px;color:var(--muted);font-family:var(--font-mono)}

.dz-pill-menu__sub{display:flex;flex-direction:column;gap:8px}
.dz-pill-menu__back{align-self:flex-start;padding:2px 4px;border:0;background:transparent;color:var(--muted);font-size:12px;cursor:pointer}
.dz-pill-menu__back:hover{color:var(--ink)}
.dz-pill-menu__field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--ink-2);padding:0 2px}
.dz-pill-menu{max-height:calc(100vh - 140px);overflow-y:auto}
.dz-pill-menu--above{top:auto;bottom:calc(100% + 6px)}
.dz-pill-menu--color{width:280px;padding:12px}
.dz-color-subtract{gap:12px;white-space:normal;flex-shrink:0}
.dz-color-subtract__heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;color:var(--ink)}
.dz-color-subtract__mode{border-radius:var(--r-sm);padding:2px 6px;background:var(--brand-12);color:var(--brand);font-size:10px;font-weight:600}
.dz-color-subtract__hint,.dz-color-subtract__shared{margin:0;font-size:12px;line-height:1.45;color:var(--ink-2)}
.dz-color-subtract__shared{font-size:11px;color:var(--muted)}
.dz-color-subtract__control{padding:10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--well)}
.dz-color-subtract__toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12.5px;color:var(--ink);cursor:pointer}
.dz-color-subtract__toggle>span{display:flex;align-items:center;gap:8px}
.dz-color-subtract__toggle input{appearance:none;width:30px;height:18px;border:1px solid var(--line-2);border-radius:20px;background:var(--surface-2);cursor:pointer;position:relative;flex:0 0 auto;transition:background .14s}
.dz-color-subtract__toggle input::after{content:"";position:absolute;left:2px;top:2px;width:12px;height:12px;border-radius:50%;background:var(--ink-2);transition:transform .14s}
.dz-color-subtract__toggle input:checked{background:var(--brand);border-color:var(--brand)}
.dz-color-subtract__toggle input:checked::after{transform:translateX(12px);background:white}
.dz-color-subtract__chip{width:14px;height:14px;border:1px solid var(--line-2);border-radius:50%;display:inline-block}
.dz-color-subtract__chip--black{background:#171717}
.dz-color-subtract__chip--white{background:#f5f5f5}
.dz-color-subtract__sensitivity{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px;color:var(--muted);font-size:11px}
.dz-color-subtract__sensitivity output{font-family:var(--font-mono);color:var(--ink-2)}
.dz-color-subtract__sensitivity input{grid-column:1/-1;width:100%;height:16px;margin:0;accent-color:var(--brand);cursor:pointer}
.dz-color-subtract__sensitivity input:disabled{opacity:.35;cursor:default}
.dz-color-subtract__active{color:var(--brand);font-size:8px;margin-left:4px}
.dz-color-subtract input:focus-visible{outline:2px solid var(--brand);outline-offset:3px}

.dz-pos-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:2px}
.dz-pos-dot{
  width:100%;aspect-ratio:1/1;border-radius:var(--r-sm);border:1px solid var(--line-2);background:var(--well);
  cursor:pointer;transition:border-color .14s var(--ease),background .14s var(--ease);position:relative;
}
.dz-pos-dot::after{content:"";position:absolute;inset:0;margin:auto;width:6px;height:6px;border-radius:50%;background:var(--muted)}
.dz-pos-dot:hover{border-color:var(--brand);background:var(--brand-12)}

.dz-dpi-list{display:flex;flex-direction:column;gap:8px}
.dz-dpi-row{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-2)}
.dz-dpi-row__val{margin-left:auto;font-family:var(--font-mono);font-size:12px;color:var(--muted)}
.dz-dpi-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:var(--pend)}
.dz-dpi-dot.is-green{background:var(--ok)}
.dz-dpi-dot.is-yellow{background:var(--warn)}
.dz-dpi-dot.is-red{background:#F87171}
.dz-dpi-dot.is-empty{background:var(--faint)}

/* --- Цвета бланка (фича B colorways, §2.5) --- */
.dz-color-row{display:flex;flex-wrap:wrap;gap:8px}
.dz-color-dot{
  width:26px;height:26px;border-radius:50%;padding:0;flex:0 0 auto;cursor:pointer;
  border:2px solid var(--line-2);display:flex;align-items:center;justify-content:center;
  color:#fff;transition:border-color .14s var(--ease),transform .14s var(--ease);
}
.dz-color-dot:hover{transform:scale(1.08)}
.dz-color-dot.is-selected{border-color:var(--brand)}
.dz-color-dot:disabled{cursor:default}
.dz-color-dot:disabled:hover{transform:none}
.dz-color-dot.is-readonly{cursor:default}

/* --- Цвет ткани у правого края сцены (FW-паритет: их вертикальный стек
   свотчей + «Add or remove fabric color options») ------------------------
   Стек прижат к правому краю .dz-center (владелец 02.10), а не к сцене:
   у сцены он висел посреди пустого поля справа от вещи. Точка красит чертёж на холсте и миниатюры рейла — перекраска идёт в тексте
   SVG (account-designer.js::tinted), потому что внутрь <img> CSS не достаёт. */
.dz-colorways{
  position:absolute;top:50%;right:24px;transform:translateY(-50%);
  z-index:6;display:flex;flex-direction:column;align-items:center;gap:10px;
}
.dz-colorways__item{position:relative;display:flex;align-items:center}
.dz-colorways__dot{width:32px;height:32px;border-width:1px}
/* FW: выбранный цвет — светлое кольцо через зазор цвета фона, без брендовой рамки */
.dz-colorways__dot.is-selected{border-color:var(--line-2);box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--ink)}
/* Плашка слева от свотча, по наведению (FW): название · ручка · корзина.
   ::after — мостик через зазор, иначе ховер теряется по пути к плашке. */
.dz-colorways__chip{
  position:absolute;right:100%;margin-right:10px;display:none;align-items:center;gap:10px;
  padding:7px 10px 7px 12px;border-radius:8px;white-space:nowrap;
  background:var(--surface);border:1px solid var(--line-2);box-shadow:0 6px 18px rgba(0,0,0,.28);
  font-size:13px;font-weight:500;color:var(--ink);
}
.dz-colorways__chip::after{content:"";position:absolute;left:100%;top:0;bottom:0;width:12px}
.dz-colorways__item:hover .dz-colorways__chip,
.dz-colorways__item:focus-within .dz-colorways__chip,
.dz-colorways__item.is-drag .dz-colorways__chip{display:flex}
.dz-colorways__name{display:inline-block;margin-right:2px}
.dz-colorways__name::first-letter{text-transform:uppercase}
.dz-colorways__grip,.dz-colorways__chip-x{
  display:flex;padding:0;border:none;background:none;color:var(--muted);
  transition:color .14s var(--ease);
}
.dz-colorways__grip{cursor:grab;touch-action:none}
.dz-colorways__item.is-drag .dz-colorways__grip{cursor:grabbing;color:var(--ink)}
.dz-colorways__grip:hover{color:var(--ink)}
.dz-colorways__chip-x{cursor:pointer}
.dz-colorways__chip-x:hover{color:var(--danger)}
.dz-colorways__add{
  width:28px;height:28px;border-radius:50%;padding:0;display:flex;align-items:center;
  justify-content:center;cursor:pointer;color:var(--muted);
  border:1.5px solid var(--muted);background:transparent;
  transition:color .14s var(--ease),border-color .14s var(--ease);
}
.dz-colorways__add:hover{color:var(--ink);border-color:var(--ink)}
/* Палитра — слева от стека: справа от него край окна. */
.dz-colorways__palette{
  position:absolute;top:0;right:100%;margin-right:12px;width:264px;z-index:7;
  padding:12px;border-radius:var(--r-md);
  background:var(--surface);border:1px solid var(--line-2);box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.dz-colorways__palette-title{margin:0 0 8px;font-size:12px;color:var(--muted)}
.dz-colorways__grid{display:flex;flex-wrap:wrap;gap:7px}
.dz-colorways__grid .dz-color-dot{width:22px;height:22px;border-width:1.5px}
.dz-colorways__hint{margin:10px 0 0;font-size:11px;line-height:1.4;color:var(--muted)}

/* --- Живое превью мокапа (фича A, docs/2026-08-13-…-design.md §1) ---
   Плитка — правый нижний угол ЭКРАНА центральной области (.dz-center,
   position:relative), не холста — FW-паритет раскладки. */
.dz-mockup-thumb{
  position:absolute;right:16px;bottom:16px;width:180px;padding:0;border:0;border-radius:var(--r);
  overflow:hidden;cursor:pointer;background:var(--well);box-shadow:0 4px 16px rgba(0,0,0,.35),0 0 0 2px var(--surface);
  transition:transform .14s var(--ease),box-shadow .14s var(--ease);z-index:6;
}
.dz-mockup-thumb:hover{transform:scale(1.03);box-shadow:0 6px 20px rgba(0,0,0,.45),0 0 0 2px var(--brand)}
.dz-mockup-thumb img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain}

/* Узкий лэптоп (1280px — распространённое разрешение, ревью major к
   bdbcb1a2): рейл (112) + плитка (212) резервируют 324px из ~588px wrap,
   fit.w схлопывается до ~232px — толкает тулбар/чипы наезжать на рейл.
   Плитку уменьшаем, её резерв сокращаем следом (16+96+16=128) — холсту
   возвращается ~80px ширины (и, за счёт сохранения аспекта в JS, высоты).
   Рейл не трогаем — навигация по видам важнее декоративной плитки. */
@media (max-width:1400px){
  .dz-mockup-thumb{width:96px}
  .dz-center--with-thumb .dz-canvas-wrap{padding-right:128px}
}

.dz-mockup-panel{position:fixed;inset:0;z-index:80;display:flex;justify-content:flex-end}
.dz-mockup-panel__backdrop{position:absolute;inset:0;background:rgba(6,7,12,.6);backdrop-filter:blur(2px)}
.dz-mockup-panel__sheet{
  position:relative;width:min(1100px,100%);height:100%;background:var(--surface);border-left:1px solid var(--line);
  display:flex;flex-direction:column;gap:16px;padding:24px;overflow-y:auto;
}
.dz-mockup-panel__close{
  position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);
  background:var(--surface-2);color:var(--ink-2);font-size:18px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:color .14s var(--ease),border-color .14s var(--ease);
}
.dz-mockup-panel__close:hover{color:var(--ink);border-color:var(--brand)}
.dz-mockup-panel__colors{display:flex;flex-wrap:wrap;gap:8px;padding-right:44px}
.dz-mockup-panel__body{flex:1;min-height:0;display:flex;gap:16px}
/* пока сервер рендерит набор мокапов (~1 с) — гасим панель, чтобы клик по рейлу не обгонял ответ */
.dz-mockup-panel__body.is-loading{opacity:.5;pointer-events:none}.dz-mockup-panel__rail{display:flex;flex-direction:column;gap:10px;overflow-y:auto;flex:0 0 auto}
.dz-mockup-panel__rail-tile{
  width:76px;padding:0;border-radius:var(--r-sm);border:1.5px solid var(--line);background:var(--well);
  overflow:hidden;cursor:pointer;transition:border-color .14s var(--ease);
}
.dz-mockup-panel__rail-tile img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain}
.dz-mockup-panel__rail-tile.is-active{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-12)}
.dz-mockup-panel__main{
  flex:1;min-width:0;display:flex;align-items:center;justify-content:center;
  border-radius:var(--r-lg);background:var(--well);box-shadow:inset 0 0 0 1px var(--line);overflow:hidden;
}
.dz-mockup-panel__main img{width:100%;height:100%;object-fit:contain}
.dz-mockup-panel__loader{position:absolute;--mload-size:44px;color:var(--brand)}

/* --- Модалка «Заказать дизайн» (фича C, docs/2026-08-13-…-design.md §3) --- */
.dz-order-modal{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:20px}
.dz-order-modal__backdrop{position:absolute;inset:0;background:rgba(6,7,12,.6);backdrop-filter:blur(2px)}
.dz-order-modal__sheet{
  position:relative;width:min(440px,100%);max-height:calc(100dvh / var(--bo-zoom, 1) - 40px);overflow-y:auto;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:28px 24px 24px;box-shadow:0 20px 60px rgba(0,0,0,.4);
}
.dz-order-modal__close{
  position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);
  background:var(--surface-2);color:var(--ink-2);font-size:18px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:color .14s var(--ease),border-color .14s var(--ease);
}
.dz-order-modal__close:hover{color:var(--ink);border-color:var(--brand)}
.dz-order-modal__title{margin:0 0 18px;font-size:17px;font-weight:650;color:var(--ink);padding-right:32px}
.dz-order-modal__success{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;padding:12px 4px}
.dz-order-modal__success svg{color:var(--ok)}
.dz-order-modal__success-title{margin:0;font-size:16px;font-weight:650;color:var(--ink)}
.dz-order-modal__success .btn{margin-top:6px}

/* --- Модалка «Сгенерировать дизайн» (docs/2026-08-16-designer-ai-generate-design.md §5) ---
   Оболочка (backdrop/close/title) — переиспользует dz-order-modal, здесь только
   контент: широкий sheet, чипы стилей, сетка результатов, скелетоны. */
/* Геометрия и ритм — по концепту (640px, padding 22/24/24, вертикальный шаг
   16px вместо разнобоя margin'ов у отдельных блоков). */
.dz-gen-modal__sheet{
  width:min(640px,100%);padding:22px 24px 24px;border-radius:10px;
  border-color:var(--line-2);display:flex;flex-direction:column;gap:16px;
}
.dz-gen-body{display:flex;flex-direction:column;gap:16px}
/* Шапка в потоке: заголовок тянется, справа бейдж и крестик — в концепте это
   одна строка, а не абсолютный кружок поверх угла. */
.dz-gen-head{display:flex;align-items:center;gap:10px}
.dz-gen-title{flex:1;margin:0;font-size:17px;font-weight:700;color:var(--ink)}
.dz-gen-close{
  flex:0 0 auto;padding:0 2px;border:none;background:none;cursor:pointer;
  color:var(--muted);font-size:18px;line-height:1;
  transition:color .14s var(--ease);
}
.dz-gen-close:hover{color:var(--ink)}
/* Вторичные кнопки внутри модалки: у концепта они видимые плитки
   (.ui-btn--ghost / --soft), а базовый .btn--ghost на тёмной панели
   растворяется — см. память ghost_button_dissolves_on_surface_panels.
   :not(:disabled) обязателен, иначе это правило перебивает .btn:disabled. */
.dz-gen-modal__sheet .btn--ghost:not(:disabled){
  background:var(--surface-2);border:1px solid var(--line-2);color:var(--ink);
}
.dz-gen-modal__sheet .btn--ghost:not(:disabled):hover{border-color:var(--brand)}
.dz-gen-attach-btn{
  padding:7px 12px;font-size:12.5px;font-weight:560;border-radius:4px;
  color:var(--ink-2);cursor:pointer;
}
/* Одно большое поле без лейбла (концепт, экран 2). */
.dz-gen-prompt{
  width:100%;min-height:74px;resize:vertical;
  background:var(--well);border:1px solid var(--line-2);border-radius:6px;
  padding:12px 14px;font:inherit;font-size:14px;line-height:1.45;color:var(--ink);
  transition:border-color .14s var(--ease);
}
.dz-gen-prompt::placeholder{color:var(--muted)}
.dz-gen-prompt:focus,.dz-gen-prompt:focus-visible{outline:0;border-color:var(--brand)}
.dz-gen-wait-btn{align-self:center}
.dz-badge-demo{
  flex:0 0 auto;padding:2px 7px;border-radius:999px;
  border:1px solid color-mix(in srgb,var(--ok) 45%,transparent);
  background:color-mix(in srgb,var(--ok) 14%,transparent);
  color:var(--ok);font-size:10.5px;font-weight:640;letter-spacing:.04em;
  text-transform:uppercase;line-height:1.5;
}
.dz-badge-demo--lg{font-size:11px;padding:3px 9px}
/* Кнопка «Сгенерировать дизайн» в панели: подпись слева, бейдж справа. */
.dz-gen-open-btn{display:flex;align-items:center;justify-content:center;gap:8px}

.dz-gen-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:-2px 0 0}
.dz-gen-tab{
  padding:6px 12px 9px;border:none;background:none;cursor:pointer;
  font:inherit;font-size:13px;color:var(--muted);
  border-bottom:2px solid transparent;margin-bottom:-1px;
  transition:color .14s var(--ease),border-color .14s var(--ease);
}
.dz-gen-tab:hover{color:var(--ink-2)}
.dz-gen-tab.is-on{color:var(--ink);border-bottom-color:var(--brand);font-weight:600}

/* Тумблер «Прозрачный фон» + счётчик лимита в одну строку (концепт, экран 2). */
.dz-gen-opts{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.dz-gen-toggle{
  display:inline-flex;align-items:center;gap:9px;padding:0;border:none;background:none;
  font:inherit;font-size:13px;color:var(--ink-2);cursor:pointer;
}
.dz-gen-toggle__track{
  width:34px;height:20px;border-radius:999px;background:var(--line-2);
  display:inline-flex;align-items:center;padding:2px;
  transition:background .16s var(--ease);
}
.dz-gen-toggle__knob{
  width:16px;height:16px;border-radius:50%;background:var(--ink);
  transition:transform .16s var(--ease);
}
.dz-gen-toggle.is-on{color:var(--ink)}
.dz-gen-toggle.is-on .dz-gen-toggle__track{background:var(--brand)}
.dz-gen-toggle.is-on .dz-gen-toggle__knob{transform:translateX(14px);background:#fff}

.dz-gen-history-item{display:flex;flex-direction:column;gap:8px}
.dz-gen-history-item__prompt{
  margin:0;font-size:12.5px;color:var(--muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

.dz-gen-ref-row{display:flex}

.dz-gen-ref-chip{
  display:inline-flex;align-items:center;gap:8px;padding:5px 10px 5px 5px;
  border:1px solid var(--line-2);border-radius:var(--r-pill);background:var(--surface-2);
  font-size:12.5px;color:var(--ink-2);
}
.dz-gen-ref-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover;background:var(--well)}
.dz-gen-ref-chip__remove{
  border:none;background:none;color:var(--muted);font-size:15px;line-height:1;cursor:pointer;padding:0 2px;
  transition:color .14s var(--ease);
}
.dz-gen-ref-chip__remove:hover{color:#F87171}

.dz-gen-chips{display:flex;flex-wrap:wrap;gap:8px}
.dz-gen-chip{
  font-size:12.5px;padding:5px 12px;border-radius:var(--r-pill);border:1px solid var(--line-2);
  background:var(--surface-2);color:var(--ink-2);cursor:pointer;transition:border-color .14s var(--ease),color .14s var(--ease),background .14s var(--ease);
}
.dz-gen-chip:hover{border-color:var(--brand)}
.dz-gen-chip.is-on{border-color:var(--brand);color:var(--fw-blue-soft);background:var(--brand-12)}

.dz-gen-quota{margin:0;font-family:var(--font-mono);font-size:12px;color:var(--muted)}
.dz-gen-quota b{color:var(--ok);font-weight:600}

.dz-gen-examples{display:flex;flex-direction:column;gap:5px;font-size:12.5px;color:var(--muted)}
.dz-gen-examples a{color:var(--ink-2);text-decoration:underline dotted;text-underline-offset:3px}

.dz-gen-status{display:flex;align-items:center;gap:10px;margin:0;font-size:13.5px;color:var(--ink-2)}
.dz-gen-status .mload{color:var(--brand)}

/* Лоадер «Заливка»: знак Мерчера (две створки) как маска, краска поднимается
   снизу вверх. Только transform → композитор, главный поток не грузит.
   Размер — --mload-size, цвет — currentColor. mask data: пускает CSP img-src. */
.mload{--mload-size:18px;position:relative;display:inline-block;flex:none;width:var(--mload-size);aspect-ratio:796/840;overflow:hidden;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 796 840'%3E%3Cpath d='M0 0L346 197L346 645L0 840ZM796 0L450 197L450 645L796 840Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 796 840'%3E%3Cpath d='M0 0L346 197L346 645L0 840ZM796 0L450 197L450 645L796 840Z'/%3E%3C/svg%3E") center/100% 100% no-repeat}
.mload::before,.mload::after{content:"";position:absolute;inset:0;background:currentColor}
.mload::before{opacity:.18}
.mload::after{animation:mload-ink 2.4s cubic-bezier(.6,0,.4,1) infinite}
@keyframes mload-ink{0%{transform:translateY(100%)}45%,60%{transform:translateY(0)}100%{transform:translateY(-100%)}}
@media (prefers-reduced-motion:reduce){.mload::after{animation:none;opacity:.6}}

.dz-gen-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.dz-gen-tile{position:relative;aspect-ratio:1;border-radius:6px;border:1px solid var(--line-2);background:var(--well);overflow:hidden}
.dz-gen-tile img{width:100%;height:100%;object-fit:contain;display:block}
.dz-gen-tile__overlay{
  position:absolute;inset:auto 0 0 0;padding:22px 8px 8px;display:flex;justify-content:center;
  background:linear-gradient(transparent,rgba(0,0,0,.78));opacity:0;transition:opacity .14s var(--ease);
}
.dz-gen-tile:hover .dz-gen-tile__overlay,.dz-gen-tile:focus-within .dz-gen-tile__overlay{opacity:1}
/* Блик едет через плитку целиком: стартует за левым краем, уходит за правый.
   Через background-position в процентах это считалось неверно (при
   background-size:220% шаг 0→-120% уводил блик мимо видимой области — он
   доползал до середины и дёргался назад), поэтому двигаем сам слой. */
.dz-gen-skeleton{position:absolute;inset:0;overflow:hidden;background:var(--well)}
.dz-gen-skeleton::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(100deg,transparent 35%,var(--surface-2) 50%,transparent 65%);
  animation:dz-gen-shimmer 1.4s infinite linear;
}
@keyframes dz-gen-shimmer{from{transform:translateX(-100%)}to{transform:translateX(100%)}}

/* --- Модалка «Уйти со страницы» (FW-паритет, docs/2026-08-15-…-design.md) --- */
.dz-leave-modal__actions{display:flex;flex-direction:column;gap:10px;margin-top:18px}

/* --- Мобила: холст недоступен --- */
.dz-mobile-banner{display:none}
@media (max-width:768px){
  .dz-shell{display:none}
  .dz-mobile-banner{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;padding:48px 24px}
}

/* ===================================================================
   ДЕТАЛИ ТОВАРА (docs/2026-07-16-product-details-page-design.md §3.3)
   Второй/последний шаг создания товара после холста — standalone страница
   (own <html>, как dz-app), НЕ account/_layout.html. pd-* префикс.
   =================================================================== */
.pd-app{min-height:calc(100dvh / var(--bo-zoom, 1));display:flex;flex-direction:column;background:var(--bg);color:var(--ink)}

.pd-topbar{display:flex;align-items:center;gap:16px;padding:14px 24px;border-bottom:1px solid var(--line);background:var(--surface)}
.pd-topbar__back{display:inline-flex;align-items:center;gap:6px;color:var(--muted);text-decoration:none;font-size:13.5px;font-weight:560;flex:0 0 auto}
.pd-topbar__back:hover{color:var(--ink)}
.pd-stepper{display:flex;align-items:center;gap:10px;flex:1;justify-content:center;font-size:13.5px;color:var(--muted)}
.pd-step{color:var(--muted);text-decoration:none;font-weight:560}
.pd-step:hover{color:var(--ink)}
.pd-step.is-active{color:var(--ink)}
.pd-step-sep{color:var(--faint)}
.pd-topbar__actions{display:flex;gap:10px;flex:0 0 auto}

.pd-shell{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:32px;padding:28px 24px;max-width:1200px;margin:0 auto;width:100%}

.pd-gallery{display:flex;flex-direction:column;gap:14px}
.pd-gallery__hero{
  border-radius:var(--r-lg);background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);
  aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.pd-gallery__hero img{width:100%;height:100%;object-fit:contain}
.pd-gallery__empty{
  border-radius:var(--r-lg);background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);
  aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;
  color:var(--muted);font-size:13.5px;text-align:center;padding:24px;
}
.pd-gallery__thumbs{display:flex;flex-wrap:wrap;gap:10px}
.pd-thumb{padding:0;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--well);width:64px;height:64px;overflow:hidden;cursor:pointer;transition:border-color .14s var(--ease)}
.pd-thumb:hover{border-color:var(--brand-24)}
.pd-thumb.is-active{border-color:var(--brand)}
.pd-thumb img{width:100%;height:100%;object-fit:contain;display:block}

.pd-form{display:flex;flex-direction:column}
.pd-retail-line{margin:-6px 0 0}
.pd-shipping-note{margin-top:4px}

@media (max-width:900px){
  .pd-shell{grid-template-columns:1fr;padding:20px 16px}
  .pd-topbar{flex-wrap:wrap;row-gap:10px}
  .pd-stepper{order:3;flex-basis:100%;justify-content:flex-start}
}

/* ===================================================================
   FW-DASHBOARD (Фаза 1): герой, метрики, подсказки, промо, карусель.
   Спека: docs/2026-07-16-fw-backoffice-restyle-design.md
   =================================================================== */

/* Единая центральная колонка дашборда (паритет с FW: весь контент — одной
   шириной, а не рваный правый край). ~840px по центру рабочей области .shell. */
.dash { max-width: 840px; margin-inline: auto; }

/* Единый вертикальный ритм между блоками дашборда. Часть секций (KPI-ряд,
   .panel-спарклайн) шли БЕЗ собственного margin и слипались с соседями в 0px,
   тогда как tips/promo/cap держат 16px. Задаём общий пол зазора; бо́льшие
   намеренные отступы (.fw-hero, .section-label) перебивают через
   схлопывание margin — иерархия сохраняется. */
.dash > * + * { margin-top: 16px; }

/* На дашборде панели рядом сливались в одну тёмную массу: базовый --line
   (#252621) почти неотличим от surface (#242521). Даём им заметную границу
   --line-2, как у metric-card. Скоуп — только .dash. */
.dash .panel { border-color: var(--line-2); }

/* Бейдж «Скоро» — единый для неактивных блоков-тизеров */
.soon-badge {
  display: inline-block; padding: 2px 10px;
  border: 1px solid var(--fw-line-2); border-radius: var(--fw-radius-full);
  font-size: 12px; font-weight: 600; color: var(--fw-muted);
  background: var(--fw-surface); white-space: nowrap;
}

/* --- 1. AI-герой: живой вход в ассистента (fw-teardown 5.8) --- */
.fw-hero { margin: 8px 0 28px; }
.fw-hero__head { display: flex; align-items: center; gap: 12px; }
.fw-hero__prompt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding: 6px 8px 6px 16px;
  background: var(--fw-surface); border: 1px solid var(--fw-line-2);
  border-radius: var(--fw-radius); transition: border-color .2s var(--ease);
}
.fw-hero__prompt:focus-within { border-color: var(--brand); }
.fw-hero__input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  font: inherit; font-size: .92rem; color: var(--fw-text); padding: 8px 0;
}
.fw-hero__input::placeholder { color: var(--fw-muted); }
.fw-hero__plus {
  flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-pill); background: var(--brand); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; transition: background .14s var(--ease);
}
.fw-hero__plus:hover { background: var(--brand-press); }
.fw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fw-chip {
  padding: 7px 12px; font-size: 13px; color: var(--fw-text-2);
  background: var(--fw-surface); border: 1px solid var(--fw-line-2);
  border-radius: var(--fw-radius); cursor: pointer; transition: box-shadow .2s var(--ease), color .2s var(--ease);
}
.fw-chip:hover { box-shadow: 0 0 0 1px var(--brand); color: var(--fw-text); }

/* --- 4. Тулбар: период + пилюля статуса --- */
.dash-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 4px 0 12px;
}
.shop-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--fw-line-2); border-radius: var(--fw-radius);
}
.shop-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.shop-pill--live { color: var(--fw-green); }
.shop-pill--soon { color: var(--fw-muted); }

/* --- 5. Метрики FW: карточка с синей линией снизу --- */
.metric-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 12px;
}
.metric-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 22px; background: var(--fw-surface);
  border: 1px solid var(--fw-line-2); border-radius: var(--fw-radius);
  overflow: hidden;
}
.metric-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--fw-blue-soft);
}
.metric-card__value { font-size: 28px; font-weight: 650; letter-spacing: -.01em; }
.metric-card__label { font-size: 13px; color: var(--fw-muted); }
.metric-card__sub { color: var(--fw-faint); }

/* --- 8. Подсказки --- */
.tips-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.tip-card {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 12px 40px 12px 14px;
  background: var(--fw-green-deep); border: 1px solid rgba(40, 189, 162, .25);
  border-radius: var(--fw-radius); font-size: 13.5px;
}
.tip-card p { margin: 0; color: var(--fw-text-2); }
.tip-card__link { color: var(--fw-green); font-weight: 600; white-space: nowrap; }
.tip-card__close {
  position: absolute; top: 6px; right: 8px; border: 0; background: none;
  color: var(--fw-muted); font-size: 16px; cursor: pointer; line-height: 1;
}
.tip-card[hidden] { display: none; }

/* --- 9. Referral-промо (неактивный тизер) --- */
.fw-promo {
  display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: center;
  padding: 20px; margin: 16px 0;
  background: var(--fw-surface); border: 1px solid var(--fw-line-2);
  border-radius: var(--fw-radius);
}
.fw-promo__title { margin: 0; font-size: 18px; }
.fw-promo__art { display: flex; justify-content: center; }
.fw-promo__mock {
  /* FW: белая мини-карточка — сильный визуальный якорь блока */
  width: 200px; padding: 18px 16px; display: flex; flex-direction: column;
  gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--fw-line-2);
  border-radius: var(--fw-radius);
}
.fw-promo__mockline { width: 80%; height: 8px; border-radius: 4px; background: #e1e0df; }
.fw-promo__mockline--short { width: 55%; }
.fw-promo__mockbtn {
  padding: 6px 14px; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--fw-green); border-radius: var(--fw-radius);
}

/* --- 10. Создать ещё товар: лента карточек --- */
.cap { margin: 16px 0; }
.cap__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cap__title { margin: 0; font-size: 18px; }
.cap__actions { display: flex; gap: 8px; }
.cap__row {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.cap-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px; background: var(--fw-surface);
  border: 1px solid var(--fw-line-2); border-radius: var(--fw-radius);
  transition: border-color .15s var(--ease);
}
.cap-card:hover { border-color: var(--fw-faint); }
.cap-card__img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--fw-radius); background: var(--fw-bg);
}
.cap-card__img--empty { display: block; }
.cap-card__name {
  font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cap-card__price { font-size: 12.5px; color: var(--fw-muted); }
.cap-card--cta { grid-column: 1 / -1; justify-content: center; text-align: center; }

/* --- Заголовок героя: плотнее, чтобы не выглядел жидким на тёмном --- */
.fw-hero .h-display { font-weight: 720; letter-spacing: -.025em; }

/* --- Промо-материалы: свёрнутый список вместо сетки из N карточек-балласта --- */
.promo-fold {
  background: var(--fw-surface); border: 1px solid var(--line-2);
  border-radius: var(--fw-radius);
}
.promo-fold__sum {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 14px 16px; font-size: 14px; font-weight: 600;
  list-style: none; user-select: none;
}
.promo-fold__sum::-webkit-details-marker { display: none; }
.promo-fold__count {
  min-width: 22px; height: 20px; padding: 0 7px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
  color: var(--fw-muted); background: var(--fw-bg);
  border: 1px solid var(--line-2); border-radius: var(--fw-radius-full);
}
.promo-fold__chev { width: 16px; height: 16px; margin-left: auto; color: var(--fw-muted); transition: transform .18s var(--ease); }
.promo-fold[open] .promo-fold__chev { transform: rotate(180deg); }
.promo-fold__list { padding: 0 8px 8px; display: flex; flex-direction: column; }
.promo-fold__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: var(--fw-radius); color: var(--ink-2);
}
.promo-fold__item:hover { background: var(--fw-bg); color: var(--ink); }
.promo-fold__name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-fold__go { font-size: 12.5px; color: var(--fw-blue-soft); white-space: nowrap; }

@media (max-width: 900px) {
  .metric-grid, .tips-row { grid-template-columns: 1fr; }
  .fw-promo { grid-template-columns: 1fr; }
  .fw-promo__art { display: none; }
}

/* Social sharing card preview (Настройки → Общие, этап B settings-restructure
   2026-07-19) — картинка + название + описание + домен, обновляется JS'ом
   при вводе (settings-general.js). НЕ .serp (тот — Google SERP-стиль без
   картинки, используется для другого превью). */
.share-card {
  display: flex;
  flex-direction: column;
  max-width: 360px;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
  background: var(--surface);
}
.share-card__image {
  position: relative;
  aspect-ratio: 1200 / 630;
  background: var(--surface-2);
}
/* Пока картинка не выбрана, блок — пустой тёмный прямоугольник во всю ширину
   карточки и читается как дыра в вёрстке. Подпись живёт под картинкой и
   перекрывается ею, когда картинка появляется (img выше по z-index). */
.share-card__image::after {
  content: "Картинка не выбрана";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: var(--muted);
}
.share-card__image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.share-card__body { padding: 10px 14px 14px; }
.share-card__domain {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
}
.share-card__title {
  margin-top: 3px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
}
.share-card__desc {
  margin-top: 3px;
  font-size: .82rem;
  line-height: 1.4;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sticky «есть несохранённые изменения» бар (Настройки → Общие, тот же
   приём, что у FW). Скрыт по умолчанию (hidden-атрибут), показывается JS'ом
   при первом изменении любого поля формы. */
.gen-savebar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-md, 0 8px 24px rgba(0,0,0,.35));
  color: var(--ink);
  font-size: .88rem;
}
.gen-savebar__actions { display: flex; gap: 10px; flex: none; }
/* `display:flex` выше перебивает браузерное [hidden]{display:none} (класс
   специфичнее атрибута) — без этого правила sticky-бар «Есть несохранённые
   изменения» виден сразу при загрузке, до единой правки. */
.gen-savebar[hidden] { display: none; }

/* ==== Analytics (этап 1) ==== */
.ana-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.ana-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .8rem;
  color: var(--muted);
}
.ana-field select,
.ana-field input[type=date] {
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  padding: 8px 10px;
  font-size: .86rem;
  font-family: inherit;
}
.ana-metrika {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ana-metrika p { margin: 0; color: var(--ink-2); font-size: .88rem; }
.ana-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.ana-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.ana-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ana-card__title { margin: 0; font-size: .95rem; font-weight: 600; color: var(--ink); }
.ana-card__link { font-size: .8rem; color: var(--brand); text-decoration: none; }
.ana-card__link:hover { text-decoration: underline; }
.ana-card__stat { display: flex; align-items: baseline; gap: 10px; }
.ana-card__big { font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.ana-card__sub { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.ana-card__period { margin: 10px 0 0; font-size: .74rem; color: var(--faint); }
.ana-delta { font-size: .82rem; font-weight: 600; }
.ana-delta--up { color: var(--ok); }
.ana-delta--down { color: var(--danger); }
.ana-chart { width: 100%; height: 160px; margin-top: 8px; }
.ana-line { stroke: var(--fw-blue); stroke-width: 2; }
.ana-line--cmp { stroke: currentColor; opacity: .35; stroke-dasharray: 4 3; color: var(--ink-2); }
.ana-chart__ytick { fill: var(--faint); font-size: 9px; }
.ana-chart__xlabels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: .74rem;
  color: var(--muted);
}
.ana-card--table .table-wrap { margin-top: 4px; }
.ana-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ana-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .84rem;
  text-decoration: none;
  background: var(--surface);
}
.ana-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ana-card--full { max-width: 900px; }
.ana-card--full .ana-chart { height: 260px; }
.ana-chart--full .ana-chart__ytick { font-size: 10px; }

/* ==========================================================================
   Blank PDP — карточка товара, классы pbl-*. FW-паритет (спека 2026-09-23
   §4.3, замеры research/fw-extract/catalog-pdp): контейнер 1472px по центру,
   галерея 1fr + инфо 357px, фото 2 колонки 3:4.
   ========================================================================== */
.pbl-page { max-width: 1376px; margin: 0 auto; }
.pbl-crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.pbl-crumbs a:hover { color: var(--ink); }
.pbl { display: grid; grid-template-columns: minmax(0, 1fr) 357px; gap: 32px; align-items: start; }
.pbl__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pbl__photo { aspect-ratio: 3 / 4; overflow: hidden; background: var(--well); border-radius: var(--r-sm); }
.pbl__photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Лупа как у FW: при наведении фото ×3, крупный кадр (Topaz, до 3000 px) подменяет hires() в pdp.html; точку приближения ведёт курсор
   (--zx/--zy ставит zoom() в pdp.html). Только мышь — на тач не мешает. */
@media (hover: hover) and (pointer: fine) {
  .pbl__photo img { transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform .25s var(--ease); }
  .pbl__photo { cursor: zoom-in; }
  .pbl__photo:hover img { transform: scale(3); }
}
@media (prefers-reduced-motion: reduce) { .pbl__photo img { transition: none; } }
.pbl__info { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.pbl__brandrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.pbl__title { margin: 0; }
.pbl__noreviews { margin: 0; color: var(--faint); font-size: 13px; }
.pbl__colorname { font-size: 13px; color: var(--ink-2); }
.pbl-dots { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.pbl-dots__more { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.pbl-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-block; cursor: pointer; padding: 0; }
.pbl-dot.is-on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.pbl-tip { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 10px; color: var(--muted); cursor: help; margin-left: 4px; }
.pbl-related, .pbl-reviews { margin-top: 64px; }
.pbl-h2 { font-size: 22px; font-weight: 600; margin: 0 0 20px; color: var(--ink); }
.pbl-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.pbl__sizes { color: var(--ink-2); font-size: 14px; }
.pbl__methods { display: grid; gap: 8px; margin-bottom: 16px; }
.pbl-method { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.pbl-method:has(input:checked) { border-color: var(--brand); background: var(--brand-12); }
.pbl-method input { margin-top: 3px; accent-color: var(--brand); }
.pbl-method__body { display: flex; flex-direction: column; gap: 2px; }
.pbl-method__label { color: var(--ink); font-weight: 600; font-size: 14px; }
.pbl-method__hint { color: var(--muted); font-size: 12.5px; }
.pbl__price { display: flex; flex-direction: column; gap: 2px; margin: 24px 0 6px; }
.pbl__price-amount { color: var(--ink); font-size: 24px; font-weight: 700; }
.pbl__price-caption { color: var(--muted); font-size: 12.5px; }
/* как у FW: крупная кнопка во всю колонку, отступ 24px от цены/срока */
.pbl__cta { width: 100%; justify-content: center; min-height: 52px; padding: 0 20px; font-size: 16px; margin-top: 24px; }
.pbl__desc { margin-top: 28px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.pbl__desc summary { cursor: pointer; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.pbl__desc p { margin: 0 0 8px; }
.pbl__bullets { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.pbl__bullets li { margin: 3px 0; }
.pbl__features { list-style: none; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14.5px; display: grid; gap: 12px; }
.pbl__reviews-empty { color: var(--muted); }
/* auto-fill: 1-2 похожих не растягиваются на всю ширину (auto-fit схлопывает пустые треки) */
.pcat-grid--fill { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* на телефоне карточка в одну колонку занимала весь экран одним фото —
   у FW там две. Правило стоит ПОСЛЕ .pcat-grid--fill намеренно: @media не
   даёт специфичности, побеждает то, что ниже (память css_rule_order_beats_media_query) */
@media (max-width: 560px) {
  .pcat-grid, .pcat-grid--fill { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
  .pcat-card__body { padding: 11px; gap: 5px; }
  .pcat-card__title { font-size: 13.5px; }
}
/* брейкпоинты PDP (1920/1023/767) — в конце файла, вместе с .shell--wide
   (память css_rule_order_beats_media_query) */

/* Итерация 2 (спека blank-pdp §10): иконки фич, срок, избранное */
.pbl__features li { display: flex; align-items: center; gap: 10px; }
.pbl__features li svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.pbl__ready { margin: 0; font-size: 15px; color: var(--ink-2); }
.pbl__fav { margin-top: 12px; }
.pbl__fav-btn { width: 100%; min-height: 48px; padding: 0 20px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pbl__fav-btn svg { width: 18px; height: 18px; flex: none; }
.pbl__fav-btn.is-fav { color: var(--ink); }

.fav { position: relative; }
.fav__pop { position: absolute; right: 0; top: calc(100% + 8px); width: 320px;
  max-height: calc(70vh / var(--bo-zoom, 1)); overflow: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  z-index: 40; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.fav-panel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fav-panel__row { display: flex; align-items: center; gap: 8px; }
.fav-panel__link { display: flex; gap: 10px; align-items: center; flex: 1;
  min-width: 0; color: inherit; text-decoration: none; }
.fav-panel__thumb { width: 44px; height: 55px; flex: none; background: #f4f4f2;
  border-radius: 8px; overflow: hidden; }
.fav-panel__thumb img { width: 100%; height: 100%; object-fit: contain; }
.fav-panel__info { display: grid; gap: 2px; min-width: 0; }
.fav-panel__brand { font-size: 11.5px; color: var(--muted); }
.fav-panel__name { font-size: 13.5px; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.fav-panel__price { font-size: 12.5px; color: var(--muted); }
.fav-panel__remove { flex: none; width: 28px; height: 28px; display: grid;
  place-items: center; background: none; border: 0; border-radius: 8px;
  color: var(--muted); cursor: pointer; }
.fav-panel__remove:hover { color: var(--ink); background: var(--brand-12); }
.fav-panel__remove svg { width: 14px; height: 14px; }
.fav-panel__empty { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ===================================================================
   CREATE PRODUCT MODAL (.cpm-*) — модалка «Создать продукт» (FW-грейд).
   Разметка: products_list.html. Иллюстрации — прозрачные PNG 480×320.
   =================================================================== */
@keyframes cpm-veil-in { from { opacity: 0; } }
@keyframes cpm-in { from { opacity: 0; transform: translateY(8px); } }
.cpm-veil {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(13, 13, 11, .56);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: cpm-veil-in .16s var(--ease-out) both;
}
.cpm {
  width: 100%; max-width: 800px; min-width: 0;
  max-height: calc(100dvh / var(--bo-zoom, 1) - 48px); overflow-y: auto;
  padding: 20px; gap: 24px; border-radius: 2px;
  animation: cpm-in .22s var(--ease-out) both;
}
.cpm-head { position: sticky; top: -20px; margin-top: -20px; padding-top: 20px; padding-bottom: 8px; margin-bottom: -8px; z-index: 1; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cpm-head .row-actions__btn { flex: 0 0 32px; border-radius: 2px; }
.cpm-title { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
.cpm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cpm-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line-2); border-radius: 2px;
  background: var(--surface); overflow: hidden; text-decoration: none; color: var(--ink);
}
a.cpm-card, button.cpm-card { transition: border-color .18s var(--ease), background .18s var(--ease); }
.cpm-card-form { display: contents; }
/* <button> ≡ <a>: сброс UA-стилей кнопки (padding 1px 6px сужал медиа-блок,
   центрирование сдвигало заголовок), та же высота грид-ячейки. */
button.cpm-card { font: inherit; color: var(--ink); text-align: left; cursor: pointer; width: 100%; height: 100%; padding: 0; margin: 0; align-items: stretch; justify-content: flex-start; appearance: none; }
.cpm-card__media { display: flex; align-items: center; aspect-ratio: 3 / 2; background: var(--well); border-bottom: 1px solid var(--line); }
.cpm-card__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cpm-card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px; }
.cpm-card__body strong { font-size: .95rem; font-weight: 650; line-height: 1.25; }
.cpm-card__body small { font-size: .8rem; line-height: 1.45; color: var(--ink-2); }
.cpm-card__status { display: flex; align-items: center; justify-content: flex-end; min-height: 20px; margin-top: auto; padding-top: 4px; }
.cpm-soon { padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--well); font-size: .72rem; line-height: 1.2; color: var(--ink-2); }
.cpm-card__arrow { width: 20px; height: 20px; color: var(--brand); }
@media (hover: hover) { a.cpm-card:hover, button.cpm-card:hover { border-color: var(--brand); background: var(--well); } }
a.cpm-card:focus-visible, button.cpm-card:focus-visible, .cpm-head button:focus-visible, button.cpm-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.cpm-more { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line-2); }
.cpm-more__label { font-size: .8rem; color: var(--muted); margin-right: 4px; }
.cpm-chip { display: inline-flex; align-items: baseline; gap: 7px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 2px; background: none; font-size: .8rem; line-height: 1.3; color: var(--ink-2); cursor: default; }
.cpm-chip i { font-style: normal; font-size: .72rem; color: var(--muted); }
button.cpm-chip { cursor: pointer; color: var(--ink); background: var(--well); }
@media (hover: hover) { button.cpm-chip:hover { border-color: var(--brand); } }
@media (min-width: 621px) and (max-width: 1000px) { .cpm-card__body strong { min-height: 2.5em; } }
@media (min-width: 621px) and (max-width: 767px) { .cpm-head { top: -16px; margin-top: -16px; padding-top: 16px; } }
@media (max-width: 620px) {
  .cpm-veil { padding: 16px; }
  .cpm { padding: 16px; gap: 20px; max-height: calc(100dvh / var(--bo-zoom, 1) - 32px); }
  .cpm-head { top: -16px; margin-top: -16px; padding-top: 16px; }
  .cpm-title { font-size: 1.2rem; }
  .cpm-grid { grid-template-columns: 1fr; gap: 10px; }
  .cpm-card { flex-direction: row; }
  .cpm-card__media { flex: 0 0 104px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .cpm-card__media img { height: auto; }
  .cpm-card__body { min-width: 0; gap: 5px; padding: 12px; }
  .cpm-card__body strong { min-height: 0; font-size: .9rem; }
  .cpm-card__status { padding-top: 3px; }
  .cpm-more { padding-top: 16px; }
  .cpm-more__label { flex-basis: 100%; }
}
@media (max-width: 360px) { .cpm { padding: 16px; } .cpm-head { top: -16px; margin-top: -16px; padding-top: 16px; } .cpm-card__media { flex-basis: 80px; } }
@media (prefers-reduced-motion: reduce) { .cpm, .cpm-veil { animation: none; } a.cpm-card { transition: none; } }

/* ==========================================================================
   Ассистент кабинета (fw-teardown 2026-09-03 §5.8) — .topbar__assist +
   <aside class="assist"> в _layout.html, встроенный таб «AI-сборка» в
   design.html (тот же партиал _assistant_panel.html, класс .bld на обёртке
   там прячет close/wide — см. правило в самом конце блока). Разделители
   внутри панели — только --line-2 (тёмная тема, hairline-ловушка). */

.topbar__assist {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--line-2); cursor: pointer;
  background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 600; font-size: 14px;
  border-radius: var(--r-sm); transition: border-color .14s var(--ease), color .14s var(--ease), background .14s var(--ease);
}
.topbar__assist svg { width: 16px; height: 16px; }
.topbar__assist:hover { border-color: var(--brand); color: var(--ink); }
.topbar__assist[aria-expanded="true"] { background: var(--brand-12); border-color: var(--brand); color: var(--ink); }

.assist {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 100vw;
  background: var(--bg); border-left: 1px solid var(--line-2);
  transform: translateX(100%); transition: transform .22s var(--ease), width .2s var(--ease);
  z-index: 90; display: flex; flex-direction: column;
}
body.assist-open .assist { transform: translateX(0); }
/* Floating feedback must not cover assistant controls or the mobile composer. */
body.assist-open .beta-widget { display: none; }
/* «Развернуть» = на весь экран, как у FW: панель занимает вьюпорт целиком,
   а лента и поле ввода держат читаемую колонку по центру — строка во всю
   ширину монитора не читается. */
.assist.assist--wide { left: 0; width: 100vw; border-left: none; }
/* 900px — та же граница, на которой сайдбар кабинета уходит в off-canvas.
   Шире неё навигацию не перекрываем: у FW в развёрнутом чате сайдбар виден. */
@media (min-width: 901px) {
  .assist.assist--wide { left: 260px; width: auto; border-left: 1px solid var(--line-2); }
}
.assist--wide .assist-viewing,
.assist--wide .assist-log,
.assist--wide .assist-inputrow { width: 100%; max-width: 780px; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) {
  .assist { width: 100vw; }
}
@media (min-width: 901px) {
  .main { transition: margin-right .22s var(--ease); }
  body.assist-open .main { margin-right: 400px; }
  /* Полноэкранная панель и так перекрывает контент — сдвигать его незачем. */
  body.assist-open:has(.assist.assist--wide) .main { margin-right: 0; }
}

/* flex:1, не height:100% — .assist-panel всегда единственный flex-item
   в flex-column родителе (.assist здесь же, .ed-pane[data-pane="ai"] в
   design-editor.css), а высота этого родителя не всегда точный процент
   (тонет молча, тот же класс ловушек, что и flex:1 у .bld-log раньше). */
.assist-panel { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.assist-panel.is-dragging { box-shadow: inset 0 0 0 2px var(--brand); }
.assist-drop {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  background: var(--surface); opacity: .94; color: var(--ink); font-size: .9rem;
  pointer-events: none;
}

.assist-panel__head {
  flex: none; display: flex; align-items: center; gap: 4px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
}
.assist-panel__sessions { position: relative; flex: 1; min-width: 0; }
.assist-panel__title-btn {
  display: flex; align-items: center; gap: 6px; max-width: 100%;
  border: 0; background: none; padding: 4px 2px; cursor: pointer;
  color: var(--ink); font: inherit; font-weight: 650; font-size: .92rem;
}
.assist-panel__title-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assist-panel__title-btn svg { flex: none; color: var(--faint); }
.assist-panel__sessmenu {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 240px; max-width: 320px;
  max-height: 320px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 6px; display: flex; flex-direction: column; gap: 2px; z-index: 5;
}
.assist-panel__sessempty { margin: 0; padding: 9px 11px; color: var(--muted); font-size: .82rem; }
.assist-panel__sesssearch {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .84rem;
}
.assist-panel__sessgroup {
  margin: 6px 11px 2px; color: var(--muted); font-size: .72rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .02em;
}
.assist-panel__sessgroup-wrap:first-child .assist-panel__sessgroup { margin-top: 2px; }
.assist-panel__sessrow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.assist-panel__sessrow > .assist-panel__sessitem,
.assist-panel__sessrow > .assist-panel__sessrename { flex: 1; min-width: 0; }
.assist-panel__sessitem {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: none; width: 100%; text-align: left; min-width: 0;
  padding: 9px 11px; border-radius: var(--r-sm); color: var(--ink-2); font: inherit; font-size: .84rem;
  cursor: pointer; transition: background .12s var(--ease), color .12s var(--ease);
}
.assist-panel__sessitem span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assist-panel__sessitem:hover { background: var(--surface); color: var(--ink); }
.assist-panel__sessdot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.assist-panel__sessrename {
  flex: 1; min-width: 0; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: var(--r-sm); padding: 8px 10px; color: var(--ink); font: inherit; font-size: .84rem;
}
.assist-panel__sessmore {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  border: 0; background: none; border-radius: var(--r-sm); color: var(--faint);
  font-size: .95rem; line-height: 1; cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.assist-panel__sessmore:hover { background: var(--surface); color: var(--ink); }
/* Действия раскрываются строкой под разговором, не поповером: поповер внутри
   прокручиваемого списка обрезался и рождал скролл в 2 строки. */
.assist-panel__sessactions {
  flex-basis: 100%; display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 4px 11px; padding-left: 8px; border-left: 1px solid var(--line-2);
}
.assist-panel__sessactions button {
  border: 0; background: none; text-align: left; padding: 7px 9px; border-radius: var(--r-sm);
  color: var(--ink-2); font: inherit; font-size: .82rem; cursor: pointer;
}
.assist-panel__sessactions button:hover { background: var(--surface); color: var(--ink); }
.assist-panel__sessactions button.is-danger { color: var(--danger); }
.assist-panel__sessactions button.is-danger:hover { background: var(--danger-bg); }
.assist-panel__iconbtn {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: none; border-radius: var(--r-sm); color: var(--faint); cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.assist-panel__iconbtn svg { width: 16px; height: 16px; }
.assist-panel__iconbtn:hover:not(:disabled) { background: var(--well); color: var(--ink); }
.assist-panel__iconbtn:disabled { opacity: .5; cursor: default; }

.assist-viewing {
  flex: none; padding: 8px 14px; background: var(--warn-bg); color: var(--warn);
  font-size: .78rem; border-bottom: 1px solid var(--line-2);
}

.assist-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.assist-empty { margin: auto; text-align: center; color: var(--muted); font-size: .85rem; }
.assist-empty p { margin: 0 0 12px; }
.assist-empty h2 { margin: 0 0 10px; color: var(--ink); font-size: 20px; font-weight: 600; }
.assist-chips.assist-next { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; }
.assist-next::-webkit-scrollbar { display: none; }
.assist-next .assist-chip { flex: none; }
.assist-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.assist-chip {
  border: 1px solid var(--line-2); background: var(--well); color: var(--ink-2);
  border-radius: var(--r-pill); padding: 6px 11px; font: inherit; font-size: .8rem; cursor: pointer;
  transition: box-shadow .2s var(--ease), color .2s var(--ease);
}
.assist-chip:hover { box-shadow: 0 0 0 1px var(--brand); color: var(--ink); }

/* ponytail: display:contents — x-for требует ОДИН корневой элемент (память
   alpine_xfor_single_root), align-self детей должен считаться от .assist-log. */
.assist-item { display: contents; }
.assist-turn { display: contents; }

.assist-msg {
  max-width: 92%; padding: 9px 12px; border-radius: var(--r-sm); font-size: .85rem;
  line-height: 1.45; white-space: pre-wrap; word-break: break-word;
  animation: assist-in .24s var(--ease-out) both;
}
.assist-msg--user { align-self: flex-end; background: var(--well); color: var(--ink); }
.assist-msg--assistant { align-self: stretch; max-width: 100%; padding: 4px 0; background: none; color: var(--ink); }
.assist-msg--error { align-self: flex-start; background: var(--danger-bg); color: var(--danger); }
@keyframes assist-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.assist-feedback { align-self: flex-start; display: flex; gap: 4px; margin-top: -4px; }
.assist-feedback__btn {
  border: 0; background: none; padding: 3px 5px; border-radius: var(--r-sm);
  font-size: .78rem; line-height: 1; cursor: pointer; opacity: .55; filter: grayscale(1);
  transition: opacity .12s var(--ease), filter .12s var(--ease);
}
.assist-feedback__btn:hover, .assist-feedback__btn.is-active { opacity: 1; filter: none; }

.assist-steps {
  align-self: stretch; padding: 2px 0; color: var(--muted); font-size: .78rem;
}
.assist-steps summary { cursor: pointer; }
.assist-steps[open] .assist-step { margin-top: 6px; }
.assist-step { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-2); animation: assist-in .2s var(--ease-out) both; }
.assist-step__mark { flex: 0 0 auto; width: 14px; text-align: center; color: var(--ok); }
.assist-step.is-fail { color: var(--danger); }
.assist-step.is-fail .assist-step__mark { color: var(--danger); }

.assist-navigate {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--brand-24);
  background: var(--brand-12); color: var(--ink); font-size: .8rem; text-decoration: none;
  transition: box-shadow .2s var(--ease);
}
.assist-navigate:hover { box-shadow: 0 0 0 1px var(--brand); }

.assist-picker { align-self: stretch; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.assist-picker__item {
  display: flex; flex-direction: column; gap: 6px; padding: 6px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--well);
  color: var(--ink-2); font-size: .74rem; text-align: center; cursor: pointer;
  transition: box-shadow .2s var(--ease), color .2s var(--ease);
}
.assist-picker__item:hover { box-shadow: 0 0 0 1px var(--brand); color: var(--ink); }
.assist-picker__img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.assist-picker__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.assist-preview-wrap { align-self: stretch; display: flex; flex-direction: column; gap: 8px; }
.assist-preview {
  align-self: stretch; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.assist-preview__img {
  flex: none; width: 168px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm);
  background: var(--surface-2); scroll-snap-align: start;
}
.assist-preview__zones { display: flex; flex-wrap: wrap; gap: 6px; }
.assist-preview__zone {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border-radius: var(--r-pill); font-size: .74rem; font-weight: 560;
}
.assist-preview__zone--green { color: var(--ok); background: var(--ok-bg); }
.assist-preview__zone--yellow { color: var(--warn); background: var(--warn-bg); }
.assist-preview__zone--red, .assist-preview__zone--bad { color: var(--danger); background: var(--danger-bg); }
.assist-preview__btn { align-self: flex-start; }
.assist-preview__title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.assist-picker__upload { cursor: pointer; }
.assist-picker__upload-icon { display: flex; align-items: center; justify-content: center; color: var(--muted); border: 1px dashed var(--line-2); box-sizing: border-box; }

.assist-confirm {
  align-self: stretch; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--well); border: 1px solid var(--line-2); border-radius: var(--r-sm);
}
.assist-confirm__summary { margin: 0; font-weight: 650; font-size: .86rem; color: var(--ink); }
.assist-confirm__action { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--ink-2); }
.assist-confirm__detail { color: var(--muted); font-size: .74rem; }
.assist-confirm__warn { color: var(--warn); font-size: .74rem; }
.assist-confirm__btns { display: flex; gap: 8px; margin-top: 2px; }
.assist-confirm__done { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }

/* §7.6 theme-draft-versions: карточка request_upload (дропзона логотипа/принта
   прямо в чате) — те же токены, что .assist-confirm/.assist-picker__item. */
.assist-uploadreq { align-self: stretch; display: flex; flex-direction: column; gap: 8px; }
.assist-uploadreq__zone {
  display: block; padding: 16px 12px; text-align: center; cursor: pointer;
  border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: var(--well);
  color: var(--ink-2); font-size: .82rem; transition: box-shadow .2s var(--ease);
}
.assist-uploadreq__zone:hover { box-shadow: 0 0 0 1px var(--brand); }
.assist-uploadreq__zone u { color: var(--brand); text-decoration: underline; }

/* Карточка «Черновик оформления» — вид как .assist-confirm (тот же well/
   line-2/r-sm), кнопка публикации переиспользует .btn--primary. */
.assist-draft {
  align-self: stretch; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--well); border: 1px solid var(--line-2); border-radius: var(--r-sm);
}
.assist-draft__text { margin: 0; font-size: .86rem; color: var(--ink-2); }
.assist-draft__btns { display: flex; align-items: center; gap: 12px; margin-top: 2px; flex-wrap: wrap; }
.assist-draft__link { font-size: .8rem; color: var(--brand); text-decoration: none; }
.assist-draft__link:hover { text-decoration: underline; }
.assist-draft__done { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }

.assist-product {
  align-self: stretch; display: flex; gap: 12px; padding: 12px;
  background: var(--well); border: 1px solid var(--line-2); border-radius: var(--r-sm);
}
.assist-product__img, .assist-product__img--empty {
  flex: none; width: 64px; height: 64px; border-radius: var(--r-sm);
  object-fit: cover; background: var(--surface-2);
}
.assist-product__info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.assist-product__name { margin: 0; font-weight: 650; font-size: .86rem; color: var(--ink); }
.assist-product__price { margin: 0; font-size: .8rem; color: var(--ink-2); }
.assist-product__links { display: flex; gap: 10px; margin-top: 2px; }
.assist-product__links a { font-size: .78rem; color: var(--brand); text-decoration: none; }
.assist-product__links a:hover { text-decoration: underline; }

.assist-thinking { align-self: flex-start; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .82rem; }
.assist-dots { display: inline-flex; gap: 4px; }
.assist-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: assist-bounce 1.2s var(--ease) infinite; }
.assist-dots i:nth-child(2) { animation-delay: .15s; }
.assist-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes assist-bounce { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
  .assist-dots i { animation: none; opacity: .6; }
  .assist-msg, .assist-step { animation: none; }
}

.assist-inputrow { flex: none; padding: 10px 14px 12px; }
.assist-archive-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.assist-archive-actions p { flex-basis: 100%; margin: 0 0 4px; color: var(--muted); font-size: .82rem; }
.assist-attachment { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: .8rem; }
.assist-attachment img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--r-sm); }
.assist-attachment span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assist-attachment button { width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.assist-panel button:disabled, .assist-panel label:has(input:disabled) { cursor: default; opacity: .6; }
.assist-selection { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.assist-selection span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.assist-selection button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-size: 18px; }
.assist-sync-error { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 12px; font-size: 12px; color: var(--danger); }
.assist-composer {
  position: relative; background: var(--surface-2); border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm); transition: box-shadow .2s var(--ease);
}
.assist-composer:focus-within { box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-12); }
.assist-composer__ta {
  display: block; width: 100%; min-height: 46px; max-height: 160px;
  box-sizing: border-box; background: transparent; border: 0; outline: 0; resize: none;
  padding: 12px 84px 12px 12px; font-family: inherit; font-size: .88rem; line-height: 1.5;
  color: var(--ink); overflow-y: auto;
}
.assist-composer__ta::placeholder { color: var(--faint); }
.assist-composer__ta:disabled { opacity: .6; }
.assist-composer__attach {
  position: absolute; right: 43px; bottom: 7px; width: 32px; height: 32px;
  display: grid; place-items: center; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--faint); cursor: pointer;
}
.assist-composer__attach:hover:not(:disabled) { background: var(--well); color: var(--ink); }
.assist-composer__attach svg { width: 16px; height: 16px; display: block; }
.assist-composer__send {
  position: absolute; right: 7px; bottom: 7px; width: 32px; height: 32px;
  display: grid; place-items: center; border: 0; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; cursor: pointer;
  transition: background .2s var(--ease), opacity .2s var(--ease);
}
.assist-composer__send:hover:not(:disabled) { background: var(--brand-press); }
.assist-composer__send:disabled { background: var(--well); color: var(--faint); cursor: default; }
.assist-composer__send svg { width: 16px; height: 16px; display: block; }
.assist-upload {
  align-self: flex-end; display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--faint);
}
.assist-upload__img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.assist-rollback {
  display: block; margin: 8px auto 0; padding: 0; border: 0; background: transparent;
  color: var(--faint); font: inherit; font-size: .75rem; cursor: pointer; text-decoration: underline;
}
.assist-rollback:hover:not(:disabled) { color: var(--ink-2); }
.assist-rollback:disabled { opacity: .5; cursor: default; }

/* B6: остаток дневной квоты — та же неброская подпись, что и у отката, но
   не кликабельна (не underline), поэтому отдельный класс. */
.assist-usage { margin: 8px 0 0; padding: 0; text-align: center; color: var(--faint); font-size: .75rem; }

/* ===================================================================
   ACCOUNT-WORKSPACE — партнёрский кабинет, визуальный язык админки
   Spec: docs/superpowers/specs/2026-09-19-partner-workspace-design.md
   Эталон значений: git show a26c6adf:app/static/admin.css + прототип
   docs/prototypes/partner-workspace.css

   Цвет и радиусы приходят каскадом из account-workspace-tokens.css; здесь
   живёт геометрия, типографика и словарь компонентов. Каждый селектор
   начинается с `.account-workspace` (класс на <body>), поэтому он старше
   безклассовых оригиналов выше по файлу независимо от порядка строк —
   ни одно старое правило не удалено, только затенено там, где spec просит
   другое число. МЕДИА-ЗАПРОСЫ — в самом конце блока: правило без @media,
   стоящее ПОСЛЕ него, перебило бы его при равной специфичности.

   Словарь (его переиспользуют остальные экраны кабинета):
     .pw-stack     колонка секций, gap 20px
     .pw-head      шапка страницы: eyebrow + H1 + описание + действия
     .pw-h1        заголовок 30/36, 620, tracking -1px
     .panel        карточка; .panel__head/__title/__link/__note — её шапка
     .table-card   карточка-таблица: .table-card__head + .table-wrap + .table
     .pw-kpis      ряд KPI; .pw-kpi__label/__value/__foot
     .pw-cols      две колонки 1.6fr / 1fr, на узком — одна
     .pw-todo      строка «следующего шага» со значком и скрытием
     .pw-def       строка «подпись — число»
     .pw-toolbar   строка фильтров над таблицей; .pw-search — поле поиска
     .pw-notice    предупреждение-полоса внутри контента
     .num-col      правое выравнивание числовой колонки таблицы
     .pw-form      колонка-форма 720px (spec §7 «формы 560–800px»);
                   вешается на .pw-stack целиком (общие настройки) либо
                   на один .panel внутри более широкой страницы (выплаты)
   =================================================================== */

/* -------------------------------------------------- База и типографика */
.account-workspace {
  font-size: 14px;
  line-height: 1.5;
}

/* Появление элементов кабинета НЕ копирует маркетинговую анимацию лендинга:
   таблицы и формы доступны сразу (spec §6, §8). `will-change` снимаем
   вместе с анимацией — иначе он продолжает создавать stacking-context и
   поповеры строк снова уезжают под соседние секции. */
.account-workspace .reveal {
  opacity: 1;
  animation: none;
  transform: none;
  filter: none;
  will-change: auto;
}

/* -------------------------------------------------- Каркас: сайдбар */
.account-workspace .side {
  width: 232px;
  flex: 0 0 232px;
  background: var(--pw-sidebar);
  border-right: 1px solid var(--pw-border);
  padding-bottom: 0;
}
.account-workspace .side__brand {
  display: flex;
  padding: 18px 20px 14px;
  border-bottom: 0;
}
.account-workspace .side__brand-top { display: flex; align-items: center; gap: 9px; }
.account-workspace .side__brand-mark { width: 21px; height: 22px; flex: none; color: var(--ink); }
.account-workspace .side__brand-mark svg { display: block; width: 100%; height: 100%; }
.account-workspace .side__brand-word {
  font-size: 19px; font-weight: 700; letter-spacing: -.03em; color: var(--ink);
}

/* Блок магазина под логотипом: название + тариф (spec §4). */
.account-workspace .side__shop {
  display: flex; align-items: center; gap: 9px;
  margin: 0 16px 14px; padding: 10px 0;
  border-top: 1px solid var(--pw-border);
  border-bottom: 1px solid var(--pw-border);
}
.account-workspace .side__shop-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.account-workspace .side__shop-name {
  font-size: 12px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-workspace .side__shop-sub { font-size: 10px; color: var(--muted); }
.account-workspace .side__shop .pro-badge { margin-left: auto; flex: none; }
.account-workspace .pro-badge {
  padding: 2px 7px; border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--pw-primary) 26%, var(--pw-sidebar));
  color: #a9b2ff; font-size: 9.5px; letter-spacing: .06em;
}

/* Плотность вертикального ритма меню посчитана под худший случай 1440×900:
   любая ОДНА раскрытая группа («Сайт» = 3 подпункта — самая длинная) должна
   уместиться вместе с «Настройками» и блоком аккаунта в 900px, иначе нижний
   пункт «Giveaway-ссылки» обрезался под .side__bottom на полстроки (было
   ~921px контента против 900px вьюпорта). Числа ниже дают ~853px. */
.account-workspace .side__nav { gap: 1px; padding: 0 12px 18px; flex: 1 1 auto; }
.account-workspace .side__cap {
  display: block; margin: 0 10px 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.account-workspace .side__nav > .side__cap:not(:first-child),
.account-workspace .side__nav .side__group + .side__cap { margin-top: 12px; }
/* Когда высоты всё-таки не хватает (маленький ноутбук, зум ОС), .side__nav
   (flex:1 1 auto + overflow-y:auto из базового правила выше) скроллится —
   маска гасит последнюю строку в цвет сайдбара вместо резкого обреза. Когда
   список помещается, нижние 24px маски приходятся на пустой остаток колонки
   и фейда не видно вовсе; padding-bottom:18px держит последний пункт вне
   зоны затухания и в состоянии «доскроллено до конца». */
.account-workspace .side__nav {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
}

.account-workspace .side__link {
  position: relative;
  gap: 10px; padding: 8px 12px; margin: 1px 0;
  border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 500; color: #c9c8c4;
}
.account-workspace .side__link:hover { background: #292b24; color: var(--ink); }
.account-workspace .side__link.is-active {
  background: #2a2f4c; color: #c4ccff; font-weight: 550;
}
/* Акцентная полоса активного пункта — как в прототипе. */
.account-workspace .side__link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  width: 3px; height: 22px; margin-top: -11px;
  background: var(--pw-primary); border-radius: 0 2px 2px 0;
}
.account-workspace .side__ico { width: 17px; height: 17px; flex: 0 0 17px; }
.account-workspace .side__link--sub { font-size: 12px; padding: 7px 12px; }
.account-workspace .side__link--sub.is-active::before { display: none; }
.account-workspace .side__link--sub.is-active { background: #25272f; color: #b9c2ff; }
.account-workspace .side__sub { padding-left: 27px; gap: 0; }
.account-workspace .side__chevron { width: 13px; height: 13px; flex: 0 0 13px; }
.account-workspace .side__navsep { margin: 10px 12px 8px; background: var(--pw-border); }
.account-workspace .side__link--soon { font-size: 12px; color: var(--muted); }
.account-workspace .side__link--soon .soon-badge {
  padding: 1px 7px; font-size: 9.5px; font-weight: 600; border-radius: var(--r-xs);
  border-color: var(--pw-border); background: transparent; color: var(--muted);
}

.account-workspace .side__bottom {
  padding: 8px 12px; border-top: 1px solid var(--pw-border);
}
.account-workspace .side__account { border-top: 1px solid var(--pw-border); padding: 8px 12px 10px; }
.account-workspace .side__account-btn { padding: 8px; }
.account-workspace .side__account-name { font-size: 12px; }
.account-workspace .side__account-mail { font-size: 11px; }
.account-workspace .side__avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: var(--r);
  font-size: 12px; background: #343947; color: #d7defc;
}

/* -------------------------------------------------- Каркас: топбар */
.account-workspace .topbar {
  min-height: 66px; padding: 0 34px; gap: 14px;
}
.account-workspace .crumbs {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.account-workspace .crumbs__root { color: var(--muted); }
.account-workspace .crumbs__root:hover { color: var(--ink); }
.account-workspace .crumbs__sep { color: var(--faint); }
.account-workspace .crumbs__here {
  color: var(--ink); font-weight: 550;
  overflow: hidden; text-overflow: ellipsis;
}
.account-workspace .topbar__assist,
.account-workspace .qa__btn,
.account-workspace .topbar__store {
  height: 38px; padding: 0 13px; font-size: 12px; font-weight: 550;
  border-radius: var(--r);
}
.account-workspace .topbar__assist { background: transparent; border-color: transparent; }
.account-workspace .topbar__assist:hover { background: var(--surface); border-color: var(--line); }
.account-workspace .topbar__store {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink-2); border: 1px solid transparent; background: transparent;
  transition: background .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
}
.account-workspace .topbar__store:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.account-workspace .topbar__store svg { width: 15px; height: 15px; flex: none; }
.account-workspace .cart { width: 38px; height: 38px; border-radius: var(--r); }
.account-workspace .cart svg { width: 18px; height: 18px; }

/* -------------------------------------------------- Каркас: контент */
.account-workspace .shell:not(.shell--wide) { width: calc(100% - 68px); }
/* `.main` — flex-элемент `.content` без собственного min-width: по умолчанию
   у flex-элемента min-width:auto, и широкая мобильная таблица
   (`.table{min-width:520px}` при <=767px, рассчитанная скроллиться ТОЛЬКО
   внутри `.table-wrap`) не даёт `.main`/body сжаться, выталкивая
   document.scrollWidth за вьюпорт (spec §8). */
.account-workspace .main { min-width: 0; padding-block: 34px 56px; }
.account-workspace .settings__nav { top: 34px; }
.account-workspace .foot { padding: 24px 0 32px; font-size: 11px; }

/* -------------------------------------------------- Шапка страницы */
.account-workspace .pw-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.account-workspace .pw-head__text { min-width: 0; flex: 1 1 380px; }
.account-workspace .pw-head__eyebrow {
  display: block; margin-bottom: 9px;
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.account-workspace .pw-h1 {
  margin: 0; font-size: 30px; line-height: 36px; font-weight: 620;
  letter-spacing: -1px; color: var(--ink);
}
.account-workspace .pw-head__desc {
  margin: 10px 0 0; max-width: 660px;
  font-size: 13px; line-height: 1.55; color: var(--muted);
}
.account-workspace .pw-head__actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none;
  padding-top: 18px;
}

/* Task 3: локальная навигация «Сайт» на /account/pages (spec §4, ordinary
   shell) — обычные ссылки с aria-current="page", НЕ ARIA tabs (нет
   role="tablist"/role="tab"). Тот же зрительный приём подчёркивания снизу,
   что и .side__link.is-active, но горизонтальный ряд под шапкой страницы. */
.account-workspace .pw-subnav {
  display: flex; gap: 4px; margin-top: 4px;
  border-bottom: 1px solid var(--pw-border);
  overflow-x: auto;
}
.account-workspace .pw-subnav__link {
  padding: 10px 4px; margin-right: 16px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.account-workspace .pw-subnav__link:hover { color: var(--ink); }
.account-workspace .pw-subnav__link.is-active,
.account-workspace .pw-subnav__link[aria-current="page"] {
  color: var(--ink); border-color: var(--pw-primary);
}

/* Экраны, ещё не переведённые на `.pw-head` (настройки, аналитика, промо),
   продолжают использовать лендинговую пару `.h-display`/`.lede` — приводим
   их к той же шкале заголовка, чтобы кабинет не жил в двух типографиках
   между этапами. */
.account-workspace .h-display {
  margin-top: 0; font-size: 30px; line-height: 36px;
  font-weight: 620; letter-spacing: -1px;
}
.account-workspace .lede { margin-top: 10px; font-size: 13px; max-width: 660px; }
.account-workspace .eyebrow { font-size: 10px; letter-spacing: .1em; padding: 4px 10px; }

/* -------------------------------------------------- Ритм и карточки */
.account-workspace .pw-stack {
  display: flex; flex-direction: column; gap: var(--pw-section-gap); min-width: 0;
}
.account-workspace .dash { max-width: none; margin-inline: 0; }
.account-workspace .dash > * + * { margin-top: 0; }
.account-workspace .prod-page > section { margin-top: 0; }
/* Онбординг/промо/подсказки несли собственные margin ради старого ритма —
   в .pw-stack их складывать с gap не нужно. */
.account-workspace .onb,
.account-workspace .fw-promo,
.account-workspace .cap,
.account-workspace .tips-row,
.account-workspace .dash-toolbar { margin: 0; }

.account-workspace .panel { padding: 20px; border-color: var(--pw-border); }
.account-workspace .dash .panel { border-color: var(--pw-border); }
.account-workspace .panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.account-workspace .panel__title {
  margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
}
.account-workspace .panel__link { font-size: 11.5px; font-weight: 550; color: var(--pw-link); }
.account-workspace .panel__link:hover { text-decoration: underline; }
.account-workspace .panel__note { font-size: 11px; color: var(--muted); }

.account-workspace .table-card {
  background: var(--surface); border: 1px solid var(--pw-border);
  border-radius: var(--r-lg); overflow: hidden; min-width: 0;
}
/* Карточка с .table-wrap--menus внутри держит открывающийся вниз ⋯-дропдаун
   (position:absolute, без x-teleport) — overflow:hidden на самой карточке
   клипал бы его тем же способом, каким .table-wrap клипал раньше (см. .table-wrap--menus
   выше). Скругление углов уже несёт .table-wrap--menus, так что здесь просто снимаем клип. */
.account-workspace .table-card:has(.table-wrap--menus) { overflow: visible; }
.account-workspace .table-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 16px 20px;
  border-bottom: 1px solid var(--pw-border);
}
.account-workspace .table-card .table-wrap {
  background: transparent; border: 0; border-radius: 0;
}
.account-workspace .table-card .empty { padding: 44px 20px; }

/* -------------------------------------------------- KPI */
.account-workspace .pw-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.account-workspace .pw-kpi {
  display: flex; flex-direction: column;
  padding: 17px 20px 18px;
  background: var(--surface); border: 1px solid var(--pw-border);
  border-radius: var(--r-lg); min-width: 0;
}
.account-workspace .pw-kpi__label { font-size: 12px; color: var(--muted); }
.account-workspace .pw-kpi__value {
  margin: 9px 0 5px;
  font-size: 31px; line-height: 1.12; font-weight: 550; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.account-workspace .pw-kpi__value--ok { color: var(--ok); }
.account-workspace .pw-kpi__foot { font-size: 11px; color: var(--muted); }
.account-workspace .pw-kpi__foot a { color: var(--pw-link); }
.account-workspace .pw-kpi__foot a:hover { text-decoration: underline; }

/* -------------------------------------------------- Две колонки */
/* align-items:stretch (дефолт грида) вместо start: соседние карточки ряда
   держат общую нижнюю кромку, иначе «Динамика продаж» с коротким пустым
   состоянием висела заметно выше «Следующих шагов». Внутри растянутой
   карточки контент раскладывается колонкой, пустое состояние занимает
   остаток и центрируется по вертикали, подпись графика прижата к низу. */
.account-workspace .pw-cols {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: var(--pw-section-gap); align-items: stretch;
}
.account-workspace .pw-cols > .panel { display: flex; flex-direction: column; }
.account-workspace .pw-cols > .panel > .empty {
  flex: 1 1 auto; justify-content: center;
}
.account-workspace .pw-cols > .panel > .spark-caption { margin-top: auto; }

/* -------------------------------------------------- Следующие шаги */
.account-workspace .pw-todo {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 28px 15px 0; border-top: 1px solid var(--pw-border);
}
.account-workspace .pw-todo:first-of-type { border-top: 0; padding-top: 0; }
.account-workspace .pw-todo[hidden] { display: none; }
.account-workspace .pw-todo__mark {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--pw-warning) 16%, transparent);
  color: var(--pw-warning);
}
.account-workspace .pw-todo__mark svg { width: 16px; height: 16px; }
.account-workspace .pw-todo__body { min-width: 0; }
.account-workspace .pw-todo__title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.account-workspace .pw-todo__body p { margin: 4px 0 8px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.account-workspace .pw-todo__link { font-size: 12px; font-weight: 550; color: var(--pw-link); }
.account-workspace .pw-todo__link:hover { text-decoration: underline; }
.account-workspace .pw-todo__close {
  position: absolute; top: 12px; right: 0;
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 0; background: none; color: var(--muted);
  font-size: 17px; line-height: 1; cursor: pointer; border-radius: var(--r-xs);
}
.account-workspace .pw-todo:first-of-type .pw-todo__close { top: -3px; }
.account-workspace .pw-todo__close:hover { background: var(--surface-2); color: var(--ink); }

.account-workspace .pw-def {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-top: 1px solid var(--pw-border); font-size: 12px;
}
.account-workspace .pw-def span { color: var(--muted); }
.account-workspace .pw-def strong { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------- Компактный помощник */
.account-workspace .pw-assist__head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 14px; }
.account-workspace .pw-assist__mark {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: var(--r-sm);
  background: #2a2f4c; color: var(--pw-link);
}
.account-workspace .pw-assist__mark svg { width: 18px; height: 18px; }
.account-workspace .pw-assist__sub { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.account-workspace .pw-assist .fw-hero__prompt {
  margin-top: 0; background: var(--pw-bg); border-color: var(--pw-input-border); border-radius: var(--r);
}
.account-workspace .fw-hero__input { font-size: 13px; }
.account-workspace .fw-hero__plus { width: 32px; height: 32px; border-radius: var(--r-sm); font-size: 18px; }
.account-workspace .fw-chip {
  padding: 7px 11px; font-size: 12px; border-radius: var(--r);
  background: var(--surface-2); border-color: #43463a; color: var(--ink-2);
}

/* -------------------------------------------------- Тулбар списка */
.account-workspace .pw-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: var(--pw-section-gap);
}
.account-workspace .pw-search { position: relative; display: block; flex: 0 1 320px; min-width: 200px; }
.account-workspace .pw-search svg {
  position: absolute; left: 11px; top: 50%; margin-top: -8px;
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.account-workspace .pw-search .input { padding-left: 34px; }
.account-workspace .pw-toolbar__note { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.account-workspace .pw-notice {
  border-color: color-mix(in srgb, var(--pw-warning) 34%, var(--pw-border));
  background: color-mix(in srgb, var(--pw-warning) 8%, var(--surface));
}
.account-workspace .pw-notice p { margin: 0; font-size: 13px; }

/* Сайтовый flash (`request.session["flash"]`, _layout.html) — тот же
   `.panel-lite`, что и везде, но с тем же amber-тоном, что у `.pw-notice`
   (предупреждения вроде ratio-warning на Вкладышах идут через этот канал,
   не через локальный `{% if error %}` каждой страницы). */
.account-workspace .panel-lite[role] {
  border-color: color-mix(in srgb, var(--pw-warning) 34%, var(--pw-border));
  background: color-mix(in srgb, var(--pw-warning) 8%, var(--surface));
}
.account-workspace .shell > .panel-lite[role="status"] { margin-bottom: var(--pw-section-gap); }

/* -------------------------------------------------- Task 5: настройки/выплаты */
/* Форма 560–800px внутри расширенного каркаса (spec §7) — узкая колонка
   читается легче на широком .shell (1560px), таблицы/KPI-грид рядом с ней
   (напр. история выплат) в этот класс не заворачиваются, остаются шириной
   страницы. */
.account-workspace .pw-form { max-width: 760px; }
/* Саб-нав раздела «Настройки»: было 200px общего .settings CSS — spec §7
   даёт точное число 170px. */
.account-workspace .settings__nav { flex: 0 0 170px; }

/* -------------------------------------------------- Кнопки */
.account-workspace .btn {
  gap: 8px; padding: 0 14px; min-height: 40px;
  border-radius: var(--r); font-size: 13px; font-weight: 550;
  box-shadow: none; border: 1px solid #45463e; background: var(--surface);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.account-workspace .btn:active { transform: none; }
.account-workspace .btn--sm { min-height: 38px; padding: 0 13px; font-size: 12px; }
.account-workspace .btn--primary,
.account-workspace .btn--brand {
  background: var(--pw-primary); border-color: var(--pw-primary); color: #fff; box-shadow: none;
}
.account-workspace .btn--ghost {
  background: var(--surface); border-color: #45463e; color: var(--ink); box-shadow: none;
}
.account-workspace .btn--danger { background: var(--pw-danger); border-color: var(--pw-danger); color: #22231f; box-shadow: none; }
.account-workspace .btn:disabled {
  background: var(--surface-2); border-color: var(--pw-border); color: var(--muted); box-shadow: none;
}
.account-workspace .btn__lead { display: inline-flex; flex: none; }
.account-workspace .btn__lead svg { width: 15px; height: 15px; display: block; }
/* Круглая «кнопка в кнопке» из лендингового стиля в кабинете не нужна:
   тут стрелка — просто иконка в ряду с текстом. */
.account-workspace .btn__icon {
  width: auto; height: auto; border-radius: 0; background: none;
}
.account-workspace .btn__icon svg { width: 15px; height: 15px; }

/* -------------------------------------------------- Поля */
.account-workspace .input,
.account-workspace .textarea,
.account-workspace select.input {
  min-height: 38px; padding: 9px 12px; font-size: 12px;
  background: var(--pw-input); border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px var(--pw-input-border);
}
.account-workspace .input:focus,
.account-workspace .input:focus-visible,
.account-workspace .textarea:focus,
.account-workspace .textarea:focus-visible { box-shadow: 0 0 0 1px var(--pw-primary); }
.account-workspace .field__label { font-size: 12px; }
.account-workspace .field__hint { font-size: 11px; }
/* Floating labels reserve a separate line; generic input padding must not
   put the entered title/price underneath its label or currency prefix. */
.account-workspace .fl-field > .input { padding-top: 22px; padding-bottom: 6px; }
.account-workspace .pe-price > .input { padding-left: 34px; }
.account-workspace .pe-url__link { color: var(--pw-link); }
/* Нативные чекбоксы/радио рисуются системным синим (#0a84ff/#0042ff) — это
   тот самый «старый синий», от которого ушли токены кабинета. */
.account-workspace input[type="checkbox"],
.account-workspace input[type="radio"] { accent-color: var(--pw-primary); }
/* Нативный file-input («Choose File / No file chosen») — единственный контрол
   кабинета, который до сих пор рисовался системным виджетом на светлой
   подложке: вкладыши и загрузка чека НПД. Кнопку выбора приводим к обычной
   ghost-кнопке, подпись — к тексту полей. */
.account-workspace input[type="file"] { font-size: 12px; color: var(--ink-2); }
.account-workspace input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 0 12px; min-height: 34px;
  border: 1px solid #45463e; border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 12px; font-weight: 550; cursor: pointer;
}
.account-workspace input[type="file"]::file-selector-button:hover { border-color: var(--pw-primary); }

/* Иконочная кнопка «скопировать ссылку» на карточке товара объявлена как
   `.btn` фиксированных 26×26 — общий `.account-workspace .btn` (2 класса)
   перебивал её padding: 0 14px, и при box-sizing:border-box на иконку не
   оставалось ширины: в кадре была пустая рамка без значка. */
.account-workspace .pe-url__copy {
  width: 30px; height: 30px; min-height: 0; padding: 0;
}

/* -------------------------------------------------- Таблицы */
.account-workspace .table { font-size: 12px; }
.account-workspace .table th {
  padding: 11px 18px; font-size: 10.5px; letter-spacing: .09em; font-weight: 500;
  background: #20211c; border-bottom: 1px solid var(--pw-border);
}
.account-workspace .table td { padding: 15px 18px; border-top: 1px solid var(--pw-border); }
.account-workspace .table tbody tr:hover { background: #292b24; }
.account-workspace .num-col { text-align: right; }
.account-workspace .num { font-family: var(--font-sans); }
.account-workspace .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
/* Row menus are positioned against their trigger in account-ui.js, outside
   the local scroll clip. Keep table scrolling at every viewport width. */
.account-workspace .table-wrap--menus .qa__menu {
  position: fixed; right: auto; overflow-y: auto; overscroll-behavior: contain;
}

.account-workspace .prod-cell {
  display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink);
}
.account-workspace .prod-cell__text { display: flex; flex-direction: column; min-width: 0; }
.account-workspace .prod-cell__name {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-workspace .prod-cell__slug {
  font-size: 10.5px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-workspace .prod-cell:hover .prod-cell__name { color: var(--pw-link); }
.account-workspace .prod-thumb { width: 42px; height: 46px; border-radius: var(--r-xs); }
/* Список товаров: крупнее и портретом, как у FW — квадратный мокап обрезается
   cover'ом по бокам, вещь читается крупнее. */
.account-workspace .prod-cell-wrap > .prod-cell .prod-thumb { width: 48px; height: 60px; }
/* Плитка светлее фона строки (как у FW) — чёрная вещь видна на тёмной теме. */
.account-workspace .prod-cell-wrap .prod-thumb, .account-workspace .pl-pick .prod-thumb { background: color-mix(in srgb, var(--surface-2) 85%, var(--ink)); }

/* -------------------------------------------------- Бейджи и статусы */
.account-workspace .badge {
  border-radius: var(--r-xs); padding: 4px 9px 4px 8px; gap: 6px;
  font-size: 10.5px; font-weight: 550;
}
.account-workspace .badge::before { width: 5px; height: 5px; }
.account-workspace .soon-badge {
  border-radius: var(--r-xs); border-color: var(--pw-border);
  background: var(--surface-2); color: var(--muted); font-size: 11px;
}
.account-workspace .shop-pill { border-radius: var(--r); font-size: 11.5px; padding: 6px 12px; border-color: var(--pw-border); }
.account-workspace .period-tabs {
  gap: 3px; padding: 3px; border-radius: var(--r);
  background: #20211c; box-shadow: inset 0 0 0 1px var(--pw-border);
}
.account-workspace .period-tab { padding: 6px 12px; font-size: 11.5px; border-radius: var(--r-xs); }
.account-workspace .period-tab--active { background: #393b33; color: #fff; box-shadow: none; }

/* -------------------------------------------------- Пустые состояния */
.account-workspace .empty { gap: 14px; padding: 44px 20px; }
.account-workspace .empty svg { width: 30px; height: 30px; }
.account-workspace .empty p { font-size: 13px; max-width: 46ch; }

/* -------------------------------------------------- Онбординг/лента товаров */
.account-workspace .onb { padding: 20px; border-color: var(--pw-border); }
.account-workspace .onb__title { font-size: 14px; }
.account-workspace .onb__count { font-family: var(--font-sans); font-size: 11px; border-radius: var(--r-xs); }
.account-workspace .onb-card { border-color: var(--pw-border); border-radius: var(--r); padding: 15px; }
.account-workspace .onb-card__name { font-size: 13px; }
.account-workspace .onb-card__hint { font-size: 11.5px; }
.account-workspace .cap__row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.account-workspace .cap-card { border-color: var(--pw-border); border-radius: var(--r); }
.account-workspace .cap-card__name { font-size: 12.5px; }
.account-workspace .cap-card__price { font-size: 11.5px; }
.account-workspace .cap__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-workspace .fw-promo { padding: 20px; border-color: var(--pw-border); border-radius: var(--r-lg); }
.account-workspace .fw-promo__title { font-size: 16px; font-weight: 600; }
/* `.dash-muted` — заглушка пустого графика, она по умолчанию по центру;
   в теле промо-блока это абзац, а не заглушка. */
.account-workspace .fw-promo .dash-muted {
  text-align: left; padding: 8px 0 14px; font-size: 12.5px;
}
.account-workspace .promo-fold { border-color: var(--pw-border); border-radius: var(--r-lg); }
.account-workspace .promo-fold__sum { font-size: 13px; padding: 15px 20px; }
.account-workspace .dash-muted { font-size: 12px; }
.account-workspace .spark { height: 150px; }
.account-workspace .spark-caption { text-align: left; font-size: 11px; padding-top: 12px; }

/* Счётчик в топбаре: `.cart__badge` объявлен `display:grid`, а класс
   специфичнее атрибута — браузерное `[hidden]{display:none}` он перебивал,
   и пустое избранное рисовало синюю точку «есть новое» без числа. */
.account-workspace .cart__badge[hidden] { display: none; }

/* Подборка бланков в онбординге — компактная лента-полка, а не каталожная
   сетка: `.pcat-grid` рассчитан на полноэкранный каталог (карточка 300px+,
   фото 3/4). Вертикальная карточка-каталог в баннере занимала ~290px высоты,
   а при ОДНОЙ рекомендации (тонкий каталог) оставляла пустой почти всю
   ширину ряда. Горизонтальная строка «миниатюра + текст» + `auto-fit`
   (а не `auto-fill`: пустые треки схлопываются) даёт одну строку на всю
   ширину при одной рекомендации и три равные колонки при трёх. */
.account-workspace .onb__suggest {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--pw-border);
}
.account-workspace .onb .pcat-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  column-gap: 12px; row-gap: 12px;
}
.account-workspace .onb .pcat-card {
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  align-items: center; gap: 13px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--pw-border); border-radius: var(--r);
  background: var(--surface-2);
}
.account-workspace .onb .pcat-card[href]:hover { border-color: var(--pw-primary); }
.account-workspace .onb .pcat-card__photo { border-radius: var(--r-xs); }
.account-workspace .onb .pcat-card__badge { top: 3px; left: 3px; padding: 1px 5px; font-size: 9px; }
.account-workspace .onb .pcat-card__body { padding: 0; gap: 3px; }
.account-workspace .onb .pcat-card__title { font-size: 13px; }
.account-workspace .onb .pcat-card__meta,
.account-workspace .onb .pcat-card__price,
.account-workspace .onb .pcat-card__price-caption,
.account-workspace .onb .pcat-card__methods { font-size: 11px; }
.account-workspace .onb .section-label {
  margin: 0 0 12px; font-size: 10px; letter-spacing: .1em;
}

/* -------------------------------------------------- Мелочь */
.account-workspace .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.account-workspace .pager { font-size: 11.5px; }
.account-workspace .qa__item { font-size: 12.5px; }
.account-workspace .settings__nav-link { font-size: 12.5px; }
.account-workspace .side__pop-link { font-size: 12.5px; }
.account-workspace .side__pop-cap { font-size: 10px; }

/* -------------------------------------------------- Аналитика/промо/подписчики/OBS (Task 4)
   Цвета уже приходят каскадом (--ink/--muted/--surface/--line/--brand
   заалиасены на --pw-* в account-workspace-tokens.css) — эти правила только
   про геометрию/типографику `_analytics_widgets.html` (общий с админкой,
   не редактируется) и локальных page-only классов из analytics/promo/
   newsletter/obs шаблонов. */
.account-workspace .section-label { margin: 0 0 12px; font-size: 10px; letter-spacing: .1em; }
.account-workspace .ana-filters { padding: 16px 20px; gap: 16px; border-color: var(--pw-border); border-radius: var(--r-lg); }
.account-workspace .ana-field { font-size: 11px; }
.account-workspace .ana-field select,
.account-workspace .ana-field input[type=date] {
  background: var(--pw-input); border: 0; box-shadow: 0 0 0 1px var(--pw-input-border);
  border-radius: var(--r-sm); font-size: 12px; padding: 8px 10px;
}
.account-workspace .ana-grid { gap: 14px; }
.account-workspace .ana-card { padding: 18px 20px; border-color: var(--pw-border); border-radius: var(--r-lg); }
.account-workspace .ana-card__title { font-size: 13.5px; font-weight: 600; }
.account-workspace .ana-card__link { font-size: 11.5px; color: var(--pw-link); }
.account-workspace .ana-card__big {
  font-family: var(--font-sans); font-size: 26px; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.account-workspace .ana-card__period { font-size: 11px; }
.account-workspace .ana-line { stroke: var(--pw-primary); }
.account-workspace .ana-tabs { gap: 6px; }
.account-workspace .ana-tab {
  border-radius: var(--r); border-color: var(--pw-border); background: var(--surface);
  color: var(--muted); font-size: 12px; padding: 7px 14px;
}
.account-workspace .ana-tab.is-active { background: var(--pw-primary); border-color: var(--pw-primary); color: #fff; }
.account-workspace .rep-csv { border-radius: var(--r); border-color: #45463e; }
.account-workspace .rep-csv:hover { border-color: var(--pw-primary); }

/* Таблица ВНУТРИ виджета — не вторая карточка (spec §6 «не делать вложенных
   карточек»): у `.table-wrap` из общей части файла своя подложка, рамка и
   скругление, и внутри `.ana-card` она читалась как карточка в карточке.
   Здесь остаются только разделители строк; сама таблица идёт в край карточки
   (padding `.ana-card` — 18px 20px), поэтому отрицательные поля по 20px и
   такие же внутренние отступы ячеек. `_analytics_widgets.html` общий с
   админкой и не редактируется — правка только в account-scope. */
.account-workspace .ana-card--table .table-wrap {
  background: transparent; border: 0; border-radius: 0;
  margin-inline: -20px;
}
.account-workspace .ana-card--table .table th {
  background: transparent; padding: 0 20px 9px;
  border-bottom: 1px solid var(--pw-border);
}
.account-workspace .ana-card--table .table td { padding: 12px 20px; }
.account-workspace .ana-card--table .table tbody tr:hover { background: transparent; }
.account-workspace .ana-card--table .empty { padding: 28px 0; }
.account-workspace .ana-card--table .ana-card__period { margin-top: 14px; }

/* ===================== МЕДИА-ЗАПРОСЫ — только в конце ===================== */

/* Сплошная колонка сайдбара на всю длину документа: сам `.side` — sticky
   высотой 100dvh, и на длинной странице (или на full-page-скриншоте) под
   ним виднелся бы основной фон. Градиент на `.app` докрашивает эту полосу
   и её hairline, не мешая sticky-поведению. */
@media (min-width: 901px) {
  .account-workspace .app:has(.side) {
    background-image: linear-gradient(90deg,
      var(--pw-sidebar) 0 231px,
      var(--pw-border) 231px 232px,
      var(--pw-bg) 232px);
  }
  .account-workspace .assist.assist--wide:not(.ed-assist) { left: 232px; }
}

/* Assistant panel width: spec §5 "400-440px справа" (base rule was 380px,
   pre-dating this spec number). >=900px is where the base file already
   switches the panel from full-screen to a fixed-width overlay
   (`@media (max-width:900px){.assist{width:100vw}}`); >=901px avoids the
   exact-900px tie between that mobile rule and this one (same element,
   different specificity) instead of relying on which wins at the boundary.
   :not(.assist--wide) обязателен: без него эта запись (0,2,0, ниже по файлу)
   перебивала `width:auto` у `.assist.assist--wide` (0,2,0, выше) — кнопка
   «Развернуть» оставляла панель шириной 420px и только сдвигала её к левому
   краю контента (поймано 21.09). */
@media (min-width: 901px) {
  .account-workspace .assist:not(.assist--wide):not(.ed-assist) { width: 420px; }
  .account-workspace.assist-open:not(:has(.assist--wide)) .main { margin-right: 420px; }
}

@media (max-width: 1100px) {
  .account-workspace .pw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-workspace .pw-cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .account-workspace .topbar { min-height: 60px; padding: 0 14px; gap: 6px; }
  .account-workspace .main { padding-block: 24px 40px; }
  .account-workspace .settings__nav { top: 24px; }
  /* Мобильная шапка: вторичные действия — компактные иконки с именем в
     aria-label/`.sr-only`, подписи скрыты (spec §4). */
  .account-workspace .topbar__assist span:not([class]),
  .account-workspace .qa__btn span:not([class]),
  .account-workspace .topbar__store span:not([class]) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  }
  .account-workspace .topbar .topbar__assist,
  .account-workspace .qa__btn,
  .account-workspace .topbar__store {
    width: 38px; padding: 0; justify-content: center;
  }
  .account-workspace .side-burger { width: 38px; height: 38px; border-radius: var(--r); }
  .account-workspace .crumbs { font-size: 11px; min-width: 0; overflow: hidden; }
}

@media (max-width: 767px) {
  .account-workspace .shell:not(.shell--wide) { width: calc(100% - 32px); }
  .account-workspace .pw-h1 { font-size: 27px; line-height: 33px; }
  .account-workspace .pw-head__actions { padding-top: 4px; width: 100%; }
  .account-workspace .pw-head__actions .btn { flex: 1 1 auto; justify-content: center; }
  .account-workspace .panel { padding: 16px; }
  .account-workspace .onb { padding: 16px; }
  .account-workspace .table-card__head { padding: 14px 16px; }
  .account-workspace .table th { padding: 10px 14px; }
  .account-workspace .table td { padding: 13px 14px; }
  .account-workspace .pw-search { flex: 1 1 100%; }
  /* Саб-нав настроек на узком: строчный список переносился в три ряда, и
     подсветка активного пункта читалась как случайно выросшая строка. Тот же
     набор чипов, что у `.ana-tab` на аналитике/отчётах — один ритм, активный
     пункт отличается заливкой, а не высотой. */
  .account-workspace .settings__nav { gap: 6px; }
  .account-workspace .settings__nav-link {
    padding: 7px 12px; border: 1px solid var(--pw-border);
    border-radius: var(--r); background: var(--surface); color: var(--muted);
  }
  .account-workspace .settings__nav-link.is-active {
    background: var(--pw-primary); border-color: var(--pw-primary); color: #fff;
  }
  /* Шапка standalone-редакторов (`page_edit`, `design`): back-ссылка + две
     кнопки не помещались в 390px и «Сохранить» обрезалась правым краем
     (scrollWidth 395 > 390). */
  .account-workspace .ed-topbar { gap: 8px; padding-inline: 12px; }
  .account-workspace .ed-topbar .btn--sm { padding: 0 10px; font-size: 11.5px; }
  .account-workspace .ed-topbar__back { min-width: 0; overflow: hidden; }
}

@media (max-width: 560px) {
  .account-workspace .pw-kpis { grid-template-columns: minmax(0, 1fr); }
  .account-workspace .dash-toolbar { flex-wrap: wrap; row-gap: 10px; }
  .account-workspace .period-tabs { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .account-workspace .side { transition: none; }
}

/* ── Баннер «тестовый режим до релиза» (account/_prelaunch_banner.html) ──
   Фон = фон иллюстрации (#0e0e0d), картинка справа растворяется в него маской —
   шва между фото и плашкой нет ни на какой ширине. */
.prelaunch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(180px, 30%, 320px);
  align-items: center;
  overflow: hidden;
  margin-bottom: 20px;
  background: #0e0e0d;
  border: 1px solid var(--brand-24);
  border-radius: var(--r);
}
.prelaunch__text { padding: clamp(16px, 2.4vw, 24px); }
.prelaunch__text p { margin: 0; max-width: 62ch; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.prelaunch__text strong { color: var(--ink); }
.prelaunch__eyebrow.prelaunch__eyebrow {
  margin-bottom: 6px; font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ship);
}
.prelaunch__title { margin: 0 0 8px; font-size: clamp(17px, 2vw, 20px); font-weight: 700; color: var(--ink); }
.prelaunch__close {
  margin-top: 12px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline;
}
.prelaunch__close:hover { color: var(--ink); }
.prelaunch__art {
  width: 100%; height: 100%; min-height: 168px; max-height: 220px;
  object-fit: cover; object-position: center 15%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 38%);
          mask-image: linear-gradient(to right, transparent, #000 38%);
}
@media (max-width: 640px) {
  .prelaunch { grid-template-columns: 1fr; }
  .prelaunch__art { display: none; }
}

/* Каталог во всю ширину, поля как у FW (замер 2026-09-23,
   research/fw-extract/catalog-pdp): 48px от 1280px, 24px ниже, 16px на
   мобильном — база .shell--wide стр. ~362. */
@media (max-width: 1279px) { .shell--wide { padding-inline: 24px; } }
@media (max-width: 767px)  { .shell--wide { padding-inline: 16px; } }

/* PDP по FW (замер 2026-09-23, research/fw-extract/catalog-pdp) — брейкпоинты
   для .pbl (база — секция Blank PDP выше, стр. ~3187). */
@media (min-width: 1920px) { .pbl { gap: 48px; } }
@media (max-width: 1023px) { .pbl { grid-template-columns: 1fr; } .pbl__info { position: static; } }
@media (max-width: 767px) {
  .pbl__gallery { grid-template-columns: 1fr; }
  .pbl-related__grid { grid-template-columns: repeat(4, 220px); overflow-x: auto; }
}

/* Выбор цвета на «Детали товара»: вертикальный стек кружков в правом верхнем углу фото, как у FW */
.pd-gallery__hero{position:relative}
.pd-swatches{position:absolute;top:14px;right:14px;display:flex;flex-direction:column;gap:10px}
.pd-swatches .pe-swatch{width:22px;height:22px}
