/*
 * Токены — из дизайн-системы админки UDS Business (@gamma-ui/core 1.1.92 поверх Taiga UI v4):
 * палитра, радиусы, тени и типографика взяты значениями как есть, а не пересказом.
 */
:root {
  --primary: #5169f3;
  --primary-hover: #7b8fff;
  --primary-active: #455bd9;
  --primary-soft: #ebefff;
  --primary-line: #dce1ff;
  --ink: #2a2d32;
  --ink-soft: #49505e;
  --ink-muted: #8c94a5;
  --page: #eef0f4;
  --bg: #f8f9fc;
  --card: #ffffff;
  --border: #d2d7e3;
  --border-soft: #ebeef3;
  --success: #52a572;
  --success-soft: #e8f6d4;
  --warning: #94740a;
  --warning-soft: #fffae8;
  --danger: #e01f58;
  --danger-soft: #ffe6ea;
  --radius-control: 4px;
  --radius-card: 6px;
  --radius-section: 10px;
  --radius-panel: 16px;
  /* Шкала типографики @gamma-ui: text-50 / 100 / 200 / 300 / 500 / 600. */
  --text-50: 13px;
  --text-50-lh: 18px;
  --text-100: 15px;
  --text-100-lh: 22px;
  --text-300: 17px;
  --text-300-lh: 24px;
  --text-500: 22px;
  --text-500-lh: 30px;
  --text-600: 24px;
  --text-600-lh: 30px;
  --control-height: 38px;
  --shadow-card: 0 3px 5px rgba(0, 0, 0, 0.05);
  --shadow-raised: 0 1px 12px rgba(0, 0, 0, 0.12);
  /* Фон карточки компании на витрине UDS (game-pages, --violet-blue-500). */
}

* {
  box-sizing: border-box;
}

/* Раскладочные display перебивают hidden, поэтому он задан явно. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--text-100);
  line-height: var(--text-100-lh);
}

/* ---- Шапка: остаётся на месте при прокрутке — длинный чек-лист не должен её уносить ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  background: var(--card);
  border-bottom: 1px solid var(--border-soft);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__mark {
  width: 30px;
  height: 30px;
  display: block;
}

.topbar__name {
  position: relative;
  font-size: 17px;
  font-weight: 700;
}

/* Бейдж закреплён у нижнего угла названия и не сдвигает шапку. */
.topbar__tariff {
  position: absolute;
  left: calc(100% - 2px);
  bottom: -8px;
  white-space: nowrap;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- Раскладка: фазы, сцена, предпросмотр ---- */
.wizard {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  /* Ширина колонки чтения: на широком мониторе строка иначе растягивается через весь экран,
     и карточка выглядит пустой. */
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 22px 60px;
}

/* Шаги остаются на месте при прокрутке — как и предпросмотр справа: обе колонки
   служат ориентиром, и уезжать вверх им незачем. */
.phases {
  position: sticky;
  top: 76px;
}

.phases__title {
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.phases__list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phase {
  display: flex;
  gap: 12px;
}

.phase__num {
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

/* min-width: 0 обязателен: без него флекс-элемент не сжимается ниже своего содержимого, и
   обрезка названия многоточием на узком экране не срабатывает — текст лезет на соседний шаг. */
.phase__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.phase__name {
  color: var(--ink-muted);
  font-size: var(--text-100);
  font-weight: 600;
  line-height: 1.3;
}

.phase__note {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: var(--text-50);
}

.phase--current .phase__num {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.phase--current .phase__name {
  color: var(--ink);
}

.phase--done .phase__num {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
  font-size: 0;
}

.phase--done .phase__num::after {
  content: '✓';
  font-size: var(--text-50);
}

.phase--done .phase__name {
  color: var(--ink-soft);
}

/* Подшаги идущей фазы: линия слева держит их вместе под её номером. */
.stages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 0;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--border-soft);
  list-style: none;
}

.stage-step {
  position: relative;
  padding-left: 28px;
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: 20px;
}

.stage-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
}

.stage-step--current {
  color: var(--ink);
  font-weight: 600;
}

.stage-step--current::before {
  border: 2px solid var(--primary);
  background: radial-gradient(circle, var(--primary) 0 4px, transparent 4.5px);
}

.stage-step--done {
  color: var(--ink-soft);
}

.stage-step--done::before {
  content: '✓';
  border-color: var(--success);
  background: var(--success);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.promo {
  display: block;
  margin-top: 28px;
  overflow: hidden;
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease;
}

.promo:hover {
  box-shadow: var(--shadow-raised);
}

/* Фокус кольцом-тенью, как у кнопок: контур браузера не повторяет скругление. */
.promo:focus-visible {
  outline: none;
  box-shadow: var(--shadow-card), 0 0 0 3px var(--primary-soft);
}

.promo__pic {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Центральная сцена ---- */
.stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.panel {
  padding: 22px 24px;
  background: var(--card);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: var(--text-50);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.display {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.01em;
}

.title {
  margin: 0 0 12px;
  font-size: var(--text-500);
  font-weight: 600;
}

.lead {
  margin: 0 0 18px;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: var(--text-100);
  line-height: 1.55;
}

/* ---- Что останется несделанным, если закрыть настройку сейчас ---- */
/* Строка «осталось:» и сам список — одна фраза, поэтому между ними отступ абзаца, а не разделов. */
.lead:has(+ .outstanding) {
  margin-bottom: 8px;
}

/* Перечисление недоделанного — справка, а не сам разговор: голосом тише строки над ним. */
.outstanding {
  margin: 0 0 18px;
  padding-left: 18px;
  max-width: 620px;
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: var(--text-50-lh);
}

/* Кнопки под списком нет, пока публиковать нельзя, — и нижний отступ повисал пустотой. */
.outstanding:last-child {
  margin-bottom: 0;
}

.outstanding li + li {
  margin-top: 4px;
}

/* Фокус на панель ставит отказ запуска. Кольцо тенью, как у кнопок, поверх её собственной тени:
   браузерный контур скругления не повторяет. */
#launchPanel:focus {
  outline: none;
}

#launchPanel:focus-visible {
  box-shadow: var(--shadow-card), 0 0 0 3px var(--primary-soft);
}

/* ---- Факты о подключённом магазине ---- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.fact {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-section);
}

.fact__label {
  display: block;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fact__value {
  display: block;
  margin-top: 4px;
  font-size: var(--text-100);
  font-weight: 600;
}

/* ---- Кто пригласил селлера ---- */
.curator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-section);
}

/* Фото лежит поверх инициалов: не загрузилось — остаются инициалы. */
.curator__avatar {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: var(--primary-soft);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  color: var(--primary);
  font-size: var(--text-100);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.curator__avatar--mark {
  background: var(--ink) url("/static/seller/img/uds-icon-a6fe54f98b1dc3cc2b76c38b921e2105.svg") center / cover no-repeat;
}

.curator__photo {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
}

.curator__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.curator__name {
  margin-top: 2px;
  overflow: hidden;
  font-size: var(--text-300);
  font-weight: 700;
  line-height: var(--text-300-lh);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curator__id {
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: var(--text-50-lh);
}

/* ---- Формы ---- */
.form {
  display: flex;
  flex-direction: column;
  /* Ритм формы задаёт только gap: маргины у полей складывались с ним и разъезжались. */
  gap: 18px;
  max-width: 620px;
}

.field {
  display: block;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-100);
  font-weight: 500;
}

.field__input {
  display: block;
  width: 100%;
  height: var(--control-height);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-100);
}

.field__input--area {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.field__input:focus {
  border-color: var(--primary);
  outline: none;
}

.field__input::placeholder {
  color: var(--ink-muted);
}

.field__hint {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: var(--text-50);
}

/* Объяснение у поля: тем же ритмом, что подсказка, но цветом отказа. */
.field__error {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: var(--text-50);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.src {
  margin-left: 6px;
  color: var(--ink-muted);
  font-weight: 400;
  font-size: 12px;
}

.consents {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.consent-group {
  display: flex;
  flex-direction: column;
}

/* Объяснение принадлежит галочке, поэтому встаёт под её текстом, а не под всей строкой. */
.consent-group .field__error {
  margin-top: 4px;
  margin-left: 26px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: var(--text-50);
}

.consent input {
  margin: 2px 0 0;
  accent-color: var(--primary);
}

/* Ссылка внутри фразы: без своего стиля браузер красит посещённую фиолетовым и обводит системной
   рамкой после клика — посреди текста мастера это выглядит чужим. */
.doclink,
.inlink {
  color: var(--primary);
  text-decoration: none;
  border-radius: 4px;
}

.inlink {
  font-weight: 600;
}

.doclink:hover,
.inlink:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doclink:focus,
.inlink:focus {
  outline: none;
}

.doclink:focus-visible,
.inlink:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.button {
  /* Флекс, а не блок: ссылка-кнопка с заданной высотой иначе прижимает текст к верху —
     <button> браузер центрирует сам, <a> нет. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  /* Своих внешних отступов у кнопки нет: они складывались с gap контейнеров, и каждое новое
     место приходилось латать обнулением. Отступ задаёт тот, кто кнопку ставит. */
  padding: 13px 28px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: var(--text-100);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.button:hover {
  background: var(--primary-active);
}

/* Ожидание ответа показывает любая кнопка, а не только отправка формы: правку профиля и переход
   к пункту тоже возит сервер, и без признака работы селлер жмёт второй раз. Внутри формы кружок
   получает только отправка: htmx метит запросом саму форму, а «Отмена» рядом ничего не ждёт. */
.htmx-request.button,
.htmx-request button[type="submit"].button,
.button.is-busy {
  position: relative;
  padding-right: 46px;
  cursor: progress;
}

/* На время запроса htmx гасит кнопку атрибутом, а погашенный вид означает «нельзя» — здесь же
   означает «идёт». Поэтому цвет кнопка сохраняет свой, чтобы кружок ожидания было видно. */
.button.htmx-request:disabled {
  background: var(--primary);
  color: #fff;
}

.button--ghost.htmx-request:disabled {
  background: var(--card);
  color: var(--ink-soft);
}

.htmx-request.button::after,
.htmx-request button[type="submit"].button::after,
.button.is-busy::after {
  content: "";
  position: absolute;
  right: 20px;
  width: 14px;
  height: 14px;
  /* Цветом текста кнопки: на синей заливке кружок белый, на светлой — тёмный, и виден на обеих. */
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0.85;
  animation: button-spin 0.7s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .htmx-request.button::after,
  .htmx-request button[type="submit"].button::after,
  .button.is-busy::after,
  .pricing-spin.htmx-request {
    animation-duration: 2.4s;
  }
}

/* Место под то, что приносит опрос переноса: карточка товаров и число в плашке появляются и
   исчезают, а гнездо под них стоит всегда — положить по имени можно только в то, что в разметке
   есть. Из раскладки гнездо выпадает целиком, иначе пустое занимало бы промежуток колонки. */
.slot {
  display: contents;
}

/* ---- Плашки ---- */
.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: var(--text-50);
  font-weight: 600;
}

/* Метка над заголовком панели: без своего отступа она прилипает к нему вплотную, потому что у
   заголовков верхнего поля нет. Внутри телефона-предпросмотра метка стоит в строке текста, и
   отступ ей там не нужен — поэтому правило только для прямых детей панели. */
.panel > .chip {
  margin-bottom: 10px;
}

.chip--success {
  background: var(--success-soft);
  color: var(--success);
}

.chip--soft {
  background: var(--primary-soft);
  color: var(--primary);
}

.notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-section);
  font-size: var(--text-100);
}

.notice--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* Отказ без поля бывает из нескольких фраз: строкой подряд они сливаются в одну. */
.notice__line {
  display: block;
}

.notice--success {
  background: var(--success-soft);
  color: var(--success);
}

.notice--info {
  margin: 16px 0 0;
  background: var(--primary-soft);
  color: var(--ink);
}


/* ---- Предпросмотр витрины: повторяет карточку компании из game-pages ---- */
.preview {
  position: sticky;
  /* Ниже закреплённой шапки, иначе телефон подлезает под неё при прокрутке. */
  top: 76px;
}

.preview__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* Телефон свёрстан в размер настоящего — 390×844 плюс рамка — и уменьшается целиком, как эмуляция
   устройства в DevTools: витрина внутри раскладывается так же, как у покупателя, и не сжимается
   под колонку или высоту окна. Масштаб считает wizard.js; подложка занимает уже уменьшенный
   размер, потому что transform место в потоке не освобождает. */
.phone-fit {
  --phone-scale: 0.78;
  width: calc(410px * var(--phone-scale));
  height: calc(864px * var(--phone-scale));
}

.phone {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 410px;
  height: 864px;
  transform: scale(var(--phone-scale));
  transform-origin: top left;
  border: 10px solid #111319;
  border-radius: 32px;
  background: #111319;
  box-shadow: var(--shadow-raised);
}

.phone__bar {
  flex: none;
  padding: 8px;
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 12px;
  text-align: center;
}

.phone__screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: #fff;
}

.phone__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 10px 14px 14px;
}



.phone__head {
  display: flex;
  z-index: 2;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 52px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(115, 133, 168, 0.12);
}

.phone__menu {
  flex: none;
  width: 18px;
  height: 14px;
  opacity: 0.55;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 12px / 100% 2px no-repeat;
}

.phone__logo {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}

.phone__logo--picture {
  background-position: center;
  background-size: cover;
}

/* ---- Логотип: плитка вместо системного выбора файла ---- */
.logo-pick {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.logo-pick__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.logo-pick__tile {
  position: relative;
  flex: none;
  width: 88px;
  height: 88px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-section);
  background: var(--bg) center / cover no-repeat;
  transition: border-color 0.15s;
}

.logo-pick:hover .logo-pick__tile,
.logo-pick__input:focus-visible + .logo-pick__tile {
  border-color: var(--primary);
}

.logo-pick__plus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.logo-pick--filled .logo-pick__tile {
  border-style: solid;
}

.logo-pick--filled .logo-pick__plus {
  display: none;
}

.logo-pick__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo-pick__text b {
  color: var(--primary);
  font-weight: 600;
}

.logo-pick__text .field__hint {
  margin-top: 0;
}

.phone__name {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone__about {
  flex: none;
  padding: 10px 14px 0;
}

.phone__about .chip--soft {
  margin-top: 8px;
}


.phone__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 16px;
  color: var(--ink-muted);
  font-size: var(--text-50);
  text-align: center;
}

/* Коробка спит и дышит: два кадра из дизайн-системы сменяют друг друга, второй — со сдвигом на
   полпериода. Кадры прозрачные, поэтому гаснет тот, что сейчас не виден, а не просто лежит под. */
.empty-box {
  position: relative;
  width: 110px;
  height: 85px;
}

.empty-box__frame {
  position: absolute;
  inset: 0;
  animation: empty-box-breath 2s steps(1, end) infinite;
}

.empty-box__frame--breath {
  animation-delay: -1s;
}

@keyframes empty-box-breath {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .empty-box__frame {
    animation: none;
  }

  .empty-box__frame--breath {
    display: none;
  }
}

.phone__goods {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, 1fr);
  /* Ряды по содержимому: растянутая сетка иначе сжимает плитки и срезает названия. */
  grid-auto-rows: max-content;
  gap: 12px;
  min-height: 0;
  align-content: start;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.phone__skeleton {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px;
}

/* Приехала первая плитка — контурам больше нечего держать, и заглушке тоже. Заглушка приходит с
   сервера по счётчику прогона, а плитки — своим запросом к каталогу, и счётчик о них не знает:
   повтор, которому нечего было отправлять, возвращал «товаров пока нет» поверх полной витрины.
   Кто здесь прав, видно по самим плиткам, поэтому решает разметка, а не счётчик. Оба живут в
   гнёздах для точечной подмены, соседним селектором их не достать — спрашиваем родителя. */
.phone__body:has(.phone__goods:not(:empty)) .phone__empty,
.phone__body:has(.phone__goods:not(:empty)) .phone__skeleton {
  display: none;
}

/* Пустая сетка не забирает высоту себе: иначе контуры уезжают из-под шапки вниз. */
.phone__goods:empty {
  flex: none;
  padding: 0;
}

.skeleton-good {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.skeleton-good__pic {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

.skeleton-good__line {
  height: 10px;
  border-radius: 6px;
}

.skeleton-good__line--short {
  width: 55%;
}

.skeleton-good__pic,
.skeleton-good__line {
  background: linear-gradient(90deg, #eef1f6 25%, #e3e8f0 37%, #eef1f6 63%);
  background-size: 400% 100%;
  animation: skeleton-sheen 1.4s ease-in-out infinite;
}

@keyframes skeleton-sheen {
  from {
    background-position: 100% 50%;
  }

  to {
    background-position: 0 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-good__pic,
  .skeleton-good__line {
    animation: none;
  }
}

.good {
  animation: good-appear 0.24s ease-out both;
}

@keyframes good-appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .good {
    animation: none;
  }
}

.good {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 4px 12px rgba(115, 133, 168, 0.14);
  color: inherit;
  text-decoration: none;
}

.good__pic {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--border-soft);
  object-fit: cover;
}

.good__pic--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}

/* Две строки ровной высоты: иначе соседние плитки в сетке разъезжаются по вертикали. */
.good__title {
  display: -webkit-box;
  overflow: hidden;
  height: 32px;
  margin: 8px 10px 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 16px;
}

/* Цена на подложке и старая под ней — так карточку видит покупатель на витрине. */
.good__prices {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin: 6px 10px 10px;
}

.good__price {
  padding: 2px 6px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.good__was {
  padding-left: 6px;
  color: var(--ink-muted);
  font-size: 11px;
  text-decoration: line-through;
}

/* ---- Служебные экраны ---- */
.card {
  width: calc(100% - 32px);
  max-width: 520px;
  margin: 60px auto;
  padding: 24px 28px;
  background: var(--card);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.card--narrow {
  max-width: 440px;
  text-align: center;
}

.card h1 {
  margin: 0 0 8px;
  font-size: var(--text-500);
  font-weight: 700;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--ink-muted);
}

.muted {
  color: var(--ink-muted);
  font-size: var(--text-50);
}

.status-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 48px;
}

.status-icon--success {
  background: var(--success-soft);
  color: var(--success);
}

.status-icon--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* Предпросмотр уходит только когда для него правда нет места: на 13" с открытой панелью
   разработчика витрина ещё нужна. */
@media (max-width: 1120px) {
  .wizard {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
  }

  .preview {
    display: none;
  }
}

/* На узком экране колонка фаз превращается в компактную полосу над карточкой:
   оглавление не должно занимать первый экран целиком. */
@media (max-width: 860px) {
  .wizard {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px 12px 40px;
  }

  .phases__title {
    display: none;
  }

  /* Полоса шагов липнет под топбаром, и контент уезжает под неё, поэтому фон нужен самой полосе,
     а не только списку внутри: иначе страница просвечивает по краям. Растягивать её за поля
     колонки отрицательными отступами нельзя — в гриде это даёт ширину больше колонки и
     горизонтальную прокрутку всей страницы. */
  .phases {
    z-index: 40;
    /* Ровно под топбаром: 14px отступа сверху и снизу вокруг знака в 30px. */
    top: 58px;
    padding: 10px 0;
    background: var(--page);
  }

  .phases__list {
    flex-direction: row;
    gap: 8px;
    padding: 12px;
    background: var(--card);
    border-radius: var(--radius-section);
    box-shadow: var(--shadow-card);
  }

  /* Названия всех трёх шагов в строку телефона не помещаются, и обрезка многоточием только
     прячет это: «Маркетпл…» не говорит ничего. Поэтому подписан текущий шаг, а пройденные и
     будущие остаются номерами — они и так узнаются по месту и цвету. */
  .phase {
    flex: 0 0 auto;
    min-width: 0;
    gap: 8px;
    align-items: center;
  }

  .phase--current {
    flex: 1;
  }

  .phase__num {
    width: 22px;
    height: 22px;
    line-height: 20px;
    font-size: 11px;
  }

  .phase__name {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .phase:not(.phase--current) .phase__name {
    display: none;
  }

  .phase__note {
    display: none;
  }

  /* Места «слева под шагами» здесь нет: полоса шагов липнет под топбаром, и квадрат во всю ширину
     занял бы первый экран и ехал бы поверх карточки. */
  .promo {
    display: none;
  }

  .panel {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .display {
    font-size: 22px;
    line-height: 28px;
  }

  .display br {
    display: none;
  }

  .lead {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 20px;
  }

  .facts {
    gap: 8px;
    margin-bottom: 20px;
  }

  .fact {
    padding: 10px 12px;
  }

  .curator {
    gap: 12px;
    margin-bottom: 8px;
    padding: 10px 12px;
  }

  .curator__avatar {
    width: 40px;
    height: 40px;
    font-size: var(--text-50);
  }

  .curator__name {
    font-size: var(--text-100);
    line-height: var(--text-100-lh);
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Палец попадает по контролу заметно хуже мыши. */
  .field__input {
    height: 44px;
    font-size: 16px;
  }

  .button {
    width: 100%;
    padding: 14px 20px;
    text-align: center;
  }

}

a.button {
  text-decoration: none;
}

.consent-note {
  margin: 14px 0 0;
  max-width: 420px;
}

/* ---- Локальный мок согласия ---- */
.scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.scope {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 12px;
}

.button--ghost {
  background: var(--card);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.button--ghost:hover {
  background: var(--bg);
}

/* Второстепенное действие рядом с главной кнопкой: вторая кнопка той же тяжести спорила бы с ней. */
.button--text {
  background: transparent;
  color: var(--primary);
}

.button--text:hover {
  background: var(--primary-soft);
}

.button--text.htmx-request:disabled {
  background: transparent;
  color: var(--primary);
}

/* Обводка фокуса своя: браузерная рисуется поверх скругления и выглядит чужой.
   Кольцо тенью повторяет скругление и не читается как вторая рамка. */
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ---- Пометки локального прогона: что подменено и что не доделано ----
   Служебная приписка, а не блок контента: тонкая полоса и мелкий текст. */
.flag {
  display: inline;
  margin-right: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.flag--mock {
  background: var(--warning-soft);
  color: var(--warning);
}

.flag--todo {
  background: var(--danger-soft);
  color: var(--danger);
}

.flagnote {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--border);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 17px;
  text-align: left;
}

.flagnote--mock {
  border-left-color: var(--warning);
}

.flagnote--todo {
  border-left-color: var(--danger);
}

.flagnote b {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---- Выбор магазина на заглушке согласия ---- */
.pick {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-section);
  cursor: pointer;
}

.pick:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.pick input {
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.pick__name {
  display: block;
  font-weight: 600;
}

.pick__note {
  display: block;
  color: var(--ink-muted);
  font-size: var(--text-50);
}

.pick-title {
  margin-top: 20px;
}

/* ---- Окно доставки: схемы плитками, как на странице настроек мерчанта ---- */
.schemes-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.schemes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.scheme {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-section);
  background: var(--card);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.scheme:hover {
  border-color: var(--primary-line);
}

.scheme:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* Фокус кольцом-тенью, как у кнопок: контур поверх рамки выбранной плитки читался как вторая. */
.scheme:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Радио скрыто визуально, но остаётся в дереве: клавиатура и скринридер работают с ним. */
.scheme input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scheme__code {
  font-size: var(--text-500);
  line-height: var(--text-500-lh);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.scheme__note {
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: var(--text-50-lh);
}

/* Текст чипа тёмный: цвет --warning на своём фоне не дотягивает до контраста AA для мелкого шрифта. */
.scheme__chip {
  margin-top: 8px;
  padding: 2px 8px;
  color: var(--ink-soft);
}

.dfact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-section);
}

.dfact b {
  display: block;
  font-weight: 600;
}

.dfact__note {
  color: var(--ink-muted);
  font-size: var(--text-50);
}

.dsave-hint {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

/* Плашка ответа Ozon: заголовок — что случилось, строка — что сделать, кнопки — где. */
.dnotice {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-section);
  border: 1px solid transparent;
  font-size: var(--text-100);
  line-height: var(--text-100-lh);
}

.dnotice p {
  margin: 0;
}

/* Цвет — полосой слева, а не текстом: --danger и --warning на своих фонах ниже контраста AA. */
.dnotice--danger {
  background: var(--danger-soft);
  border-left: 3px solid var(--danger);
  color: var(--ink);
}

.dnotice--warning {
  background: var(--warning-soft);
  border-left: 3px solid var(--warning);
  color: var(--ink);
}

.dnotice--info {
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  color: var(--ink);
}

.dnotice__title {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}

.dnotice .dnotice__quote {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: var(--text-50);
  line-height: var(--text-50-lh);
}

.dnotice__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.dnotice__recheck {
  margin: 0;
}

/* На телефоне кнопки мастера растягиваются во всю ширину; форма «Проверить» — тоже, иначе её
   кнопка оставалась узкой под широкой главной. */
@media (max-width: 860px) {
  .dnotice__acts {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .dnotice__acts .button {
    height: 44px;
  }

  .dnotice__recheck {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .schemes {
    grid-template-columns: 1fr;
  }

  .scheme {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 12px;
    padding: 12px 14px;
    text-align: left;
  }

  .scheme__code {
    font-size: var(--text-300);
    line-height: var(--text-300-lh);
  }

  .scheme__chip {
    margin: 0 0 0 auto;
  }
}

/* Полоса действий: отступ от текста над ней держит она, а не сами кнопки. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

/* В узкой карточке всё выровнено по центру, а флекс-полоса о text-align не знает. */
.card--narrow .actions {
  justify-content: center;
}

.chip--warn {
  background: var(--warning-soft);
  color: var(--warning);
}

/* Адрес витрины: главное, что селлер уносит с финального экрана. */
.sitelink {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 10px 10px 10px 16px;
  max-width: 100%;
  background: var(--card);
  border: 1.5px dashed var(--primary-line);
  border-radius: 12px;
}

.sitelink__url {
  overflow: hidden;
  font-weight: 600;
  font-size: var(--text-100);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Финальный экран: адрес и обе кнопки — одной колонкой во всю ширину карточки, чтобы читались как
   один набор действий над запущенным магазином. */
.launched {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.launched .sitelink {
  display: flex;
  justify-content: space-between;
  text-align: left;
}

.actions--stacked {
  flex-direction: column;
  align-items: stretch;
  margin-top: 0;
}

.actions--stacked .button {
  align-self: stretch;
}

/* Финальный экран узкий, а адрес — то, за чем селлер на него и пришёл: он переносится по
   символам, а не обрезается многоточием — прочитать и продиктовать обрезанный адрес нельзя. */
.launched .sitelink__url {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.field__input--invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.phone__note {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

/* ---- Пункты настройки: карточка на пункт, как в макете ---- */
/* Записка о товарах: сообщение с одним действием, а не раздел страницы. Вес взят у пунктов
   настройки, а не у панелей — в весе панели она спорила с «сайт готов» за главное место. */
.goodsnote {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.goodsnote__body {
  min-width: 260px;
  flex: 1;
}

.goodsnote__body b {
  display: block;
  margin-bottom: 2px;
  font-size: var(--text-100);
  font-weight: 600;
}

.goodsnote__body p {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: var(--text-50-lh);
}

/* Полоса идущего переноса: тоньше той, что у настройки, — здесь она сопровождает строку, а не
   держит на себе целый раздел. */
.goodsnote__track {
  display: block;
  overflow: hidden;
  margin-top: 10px;
  height: 6px;
  background: var(--page);
  border-radius: 999px;
}

.goodsnote__track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8ea2ff);
  border-radius: 999px;
  transition: width 0.8s ease;
}

@media (prefers-reduced-motion: reduce) {
  .goodsnote__track i {
    transition: none;
  }
}

/* Расстояние сверху держит gap колонки — свой отступ сложился бы с ним. Снизу заголовок,
   наоборот, подтягивает к себе то, что называет: у раздела и его прогресса общий разговор. */
.clist__title {
  margin: 0 4px -8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clist {
  counter-reset: clitem;
}

.clitem {
  counter-increment: clitem;
  /* Сетка, а не флекс: у пункта без кнопки колонка действия остаётся пустой, и статусы
     всех пунктов стоят в один столбец. */
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.clitem--done {
  border-color: #cbe9d8;
}

.clitem__icon {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}

/* Номер пункта считает браузер: вписанные руками цифры разъезжаются, стоит поменять пункты
   местами или добавить пятый. Закрытый пункт показывает галочку вместо номера. */
.clitem__icon::before {
  content: counter(clitem);
}

.clitem--done .clitem__icon::before {
  content: '✓';
}

.clitem--done .clitem__icon {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* Пункт, который проверка вернула на правку: тем же тёплым цветом, что и плашка её отказа —
   это не ошибка селлера, а работа, к которой нужно вернуться. */
.clitem--attention {
  border-color: #f0e3b4;
}

.clitem--attention .clitem__icon::before {
  content: '!';
}

.clitem--attention .clitem__icon {
  background: #edb230;
  color: #fff;
  border-color: #edb230;
}

.clitem__body {
  flex: 1;
  min-width: 0;
}

.clitem__body b {
  font-size: var(--text-100);
}

.clitem__body p {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* У доставки действий два — спросить Ozon за селлера и уйти в его кабинет; на узком экране они
   встают друг под друга, а не выдавливают текст пункта. */
.clitem__act {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  justify-self: end;
}

.clitem__act .button {
  white-space: nowrap;
}

/* Настройка пункта открывается окном поверх списка: список остаётся на месте, а внимание — на одном. */
/* Фон под открытым диалогом не прокручивается: колесо над модалкой иначе уводит страницу, и
   диалог остаётся висеть над содержимым, которого рядом уже нет. */
.is-modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 23, 28, 0.42);
}

/* Скроллится тело, а не карточка целиком: заголовок и подвал остаются на виду, иначе на длинной
   форме и то и другое уезжает — а подвал нужен именно тому, кто до низа не доберётся. */
.modal__card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: var(--card);
  border-radius: var(--radius-panel);
  box-shadow: 0 24px 60px rgba(21, 23, 28, 0.28);
  animation: modal-rise 0.2s ease;
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Зазор под заголовком принадлежит шапке, а не телу: тело прокручивается, и его верхний отступ
   уезжает вместе с первой строкой — дальше текст идёт впритык к заголовку. */
.modal__head {
  flex: none;
  padding: 22px 24px 14px;
}

/* Подвал карточки: не уезжает со скроллом и не участвует в ритме тела. */
.modal__foot {
  flex: none;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border-soft);
}

.modal__head .eyebrow {
  margin-bottom: 8px;
}

.modal__title {
  margin: 0;
  font-size: var(--text-500);
  font-weight: 700;
}

.modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 24px 24px;
}

.modal__body .form {
  max-width: none;
}

.hint {
  color: var(--ink-muted);
  font-size: var(--text-50);
}

/* Адрес, который селлер переносит в чужой кабинет: длинный, потому переносится по символам, а не
   уезжает за край. */
/* Где взять ключи: путь в чужом кабинете, который иначе селлер ищет сам. Держится рядом с полями
   и на фоне, чтобы читаться как сноска к ним, а не как ещё одно поле. */
.keyhelp {
  margin: 6px 0 0;
  padding: 10px 13px;
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: 1.55;
}

.keyhelp b {
  color: var(--ink);
}

/* Параметры чека — вторая половина формы, и линия отделяет их от ключей: ключи селлер несёт из
   ЮKassa, а это его собственные настройки, которые заполняются один раз.
   Ритм внутри тот же, что у формы: без него подпись поля прилипает к предыдущему селекту. */
.receipt {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

/* Заголовок с подписью — один участник ритма, иначе между ними встаёт весь gap секции. */
.receipt__intro {
  display: grid;
  gap: 4px;
}

.receipt__intro p {
  margin: 0;
}

.receipt__head {
  color: var(--ink);
  font-size: var(--text-100);
  font-weight: 600;
}

/* Заголовок раздела внутри чека: мельче заголовка секции, но заметнее подписи поля — иначе
   читается как ещё одно поле без селекта. */
.receipt__group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink);
  font-size: var(--text-50);
  font-weight: 600;
}

.hintdot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
}

/* Подсказка раскрывается вниз: оба «?» стоят в верхней половине формы, а тело модалки
   прокручивается — сверху её обрезало бы краем. */
.hintdot::after {
  content: attr(data-hint);
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  z-index: 10;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: var(--radius-card);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.hintdot:hover::after,
.hintdot:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

/* Колонкой, а не строкой: при space-between вопрос и кнопка разъезжались по краям модалки и
   читались как несвязанные. Отступы и черту даёт .modal__foot — здесь только раскладка. */
.regblock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.regblock span {
  color: var(--ink-soft);
  font-size: var(--text-50);
}

/* Внутри модалки это не карточка, а один из её блоков: .panel добавил бы вторую тень и отступы
   вдвое больше соседних полей — от этого блок и распухал. */
.webhook {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
}

.webhook .hint {
  margin: 2px 0 0;
}

/* Внутри карточки блока подсказке не нужны ни свой фон — он слился бы с фоном карточки, ни свои
   боковые поля: они сдвигали бы её относительно адреса, стоящего прямо над ней. */
.webhook__help {
  margin-bottom: 0;
  padding: 10px 0 0;
  background: none;
}

/* Адрес занимает всю ширину и не переносится: разорванный посередине url читается как два, а
   копируют его выделением — поэтому одна строка с прокруткой, если не влез. */
.webhook__value {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: nowrap;
  overflow-x: auto;
  user-select: all;
}

.webhook__box {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

/* min-width: 0 — иначе флекс-элемент не сжимается уже адреса и прокрутка внутри не наступает. */
.webhook__box .webhook__value {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.copy {
  display: inline-flex;
  flex: none;
}

/* Текст для экранного читателя: в раскладке места не занимает, но читается. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.copy-icon {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-card);
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
}

.copy-icon:hover {
  background: var(--bg);
  color: var(--primary);
}

.copy-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.copy-icon.is-copied {
  color: var(--success);
}

/* Та же тёмная подсказка, что у «?» в формах: у иконки нет подписи, и без неё нажатие ничего не
   говорит о том, что адрес уже в буфере. Над иконкой, а не под ней — под ней в окне оплаты стоит
   сноска, которую подсказка закрыла бы; и влево от её края: иконка стоит у правой кромки, и
   подсказка по центру упиралась бы в край окна. */
.copy-icon::after {
  content: attr(data-copied);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 10;
  width: max-content;
  padding: 6px 10px;
  border-radius: var(--radius-card);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  pointer-events: none;
}

.copy-icon.is-copied::after {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .copy-icon::after {
    transition: none;
  }
}

.button:disabled {
  background: var(--bg);
  color: var(--ink-muted);
  cursor: default;
}

/* Полоса готовности: сколько пунктов закрыто — видно, не считая их глазами. Колонкой, а не
   строкой: в строке полосу сдавливал соседний текст, вплоть до нулевой ширины. */
/* Стоит под заголовком раздела, к которому относится, а не внутри карточки «сайт готов».
   Своих внешних отступов не имеет: расстояние держат gap колонки и заголовок над ним. */
.ready {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.ready b {
  font-size: var(--text-50);
}

/* Приписка: тише и счётчика, и полосы — она успокаивает, а не сообщает. */
.ready__note {
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.45;
}

.ready__track {
  overflow: hidden;
  height: 8px;
  background: var(--page);
  border-radius: 999px;
}

.ready__track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--success), #7fc79b);
  border-radius: 999px;
}

/* Ага-карточка шага настройки: мягкий акцент, чтобы перенесённые товары читались как результат. */
.panel--aha {
  background: linear-gradient(180deg, var(--card), #fbfaf6);
}

.panel--aha .chip {
  margin-bottom: 14px;
}

/* Адрес до запуска — строкой, а не рамкой: длинный переносится по символам и на телефоне. */
.aha__address {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-100);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.aha__address b {
  color: var(--ink);
}

/* Кэшбэк и оплата баллами — доли, а не числа: ползунок понятнее поля ввода. */
.range {
  display: flex;
  gap: 14px;
  align-items: center;
}

.range input[type='range'] {
  flex: 1;
  accent-color: var(--primary);
}

.range__value {
  min-width: 52px;
  color: var(--primary);
  font-size: var(--text-300);
  font-weight: 600;
  text-align: right;
}

/* Узкое поле, но не узкая подсказка: ограничение только на ввод. */
.field--narrow .field__input {
  max-width: 220px;
}

.button--sm {
  height: var(--control-height);
  padding: 0 18px;
  font-size: var(--text-50);
}

/* Кнопка и отход назад стоят в одну строку: правка пройденного шага всегда отменяема. */
.form__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

select.field__input {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238c94a5' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Поле скидки: объяснение слева, число справа. Сложено так же, как записка о товарах, — в
   визарде это один приём «текст и управление в строке», и второго вида у него быть не должно. */
.pricefield {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.pricefield__text {
  min-width: 240px;
  flex: 1;
  cursor: pointer;
}

.pricefield__text b {
  display: block;
  font-size: var(--text-100);
  font-weight: 600;
}

.pricefield__text span {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: var(--text-50-lh);
}

/* Рамка у обёртки, а не у поля: знак процента тогда стоит внутри, суффиксом, и пара читается
   одним полем ввода. Отдельный символ сбоку выглядит потерянным, особенно на узком экране. */
.pricefield__control {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 0 14px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
}

.pricefield__control:focus-within {
  border-color: var(--primary);
}

.pricefield__control input {
  width: 46px;
  height: var(--control-height);
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: right;
}

.pricefield__control input:focus-visible {
  outline: none;
}

.pricefield__control i {
  color: var(--ink-muted);
  font-size: var(--text-100);
  font-style: normal;
}

/* Пересчёт идёт на сервере и занимает заметное время: пример считает сама площадка. Пока он идёт,
   у поля крутится кружок, а таблица гаснет — одно говорит «работаем», другое «эти числа уже не
   те». По отдельности ни того, ни другого не хватает. */
#importPreview {
  transition: opacity 0.15s ease;
}

#importPreview.htmx-request {
  opacity: 0.4;
}

/* Кружок тот же, что у занятой кнопки, — и рисуется тем же способом. */
.pricing-spin {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
}

.pricing-spin.htmx-request {
  display: block;
  animation: button-spin 0.7s linear infinite;
}

/* Оговорка над таблицей: без неё три строки читаются как весь список переносимого. Отступ сверху
   отрывает её от поля — иначе она читается подсказкой к нему, а не к таблице. */
.prices__note {
  margin: 0 0 8px;
  color: var(--ink-muted);
  font-size: var(--text-50);
  line-height: var(--text-50-lh);
}

/* Пример цен перед переносом: четыре колонки, из которых читают правые две — было и стало. */
.prices {
  width: 100%;
  margin: 14px 0 8px;
  border-collapse: collapse;
  font-size: var(--text-100);
}

.prices th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: var(--text-50);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.prices td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

.prices__sku {
  color: var(--ink-muted);
  white-space: nowrap;
}

.prices__num {
  text-align: right;
  white-space: nowrap;
}

/* Цена магазина — то, ради чего таблица: её и выделяем, а не цену площадки. */
.prices__num--new {
  color: var(--primary);
  font-weight: 600;
}

/* ---- Узкий экран: правила компонентов настройки. Стоят в конце файла, потому что
   переопределяют объявления выше — иначе каскад оставил бы десктопную раскладку. ---- */
@media (max-width: 860px) {
  /* Поле скидки на телефоне: подпись и число в строку не встают, поэтому поле уходит под
     подпись и занимает всю ширину — так его и делают в мобильных формах. Узкое поле, прижатое
     к левому краю под длинной подписью, читается как оборванная вёрстка. */
  .pricefield {
    gap: 10px;
  }

  .pricefield__text {
    min-width: 100%;
  }

  .pricefield__control {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }

  .pricefield__control input {
    width: auto;
    flex: 1;
    text-align: left;
  }

  /* Таблица на телефоне перестаёт быть таблицей: четыре колонки в 320 пикселях рвут каждую
     ячейку на строки. Строка становится позицией списка — слева название и под ним прежняя
     цена, справа новая, ради которой экран и открыт.

     Селекторы с именем ячейки: `.prices td` перебивает голый класс по специфичности. */
  .prices,
  .prices tbody {
    display: block;
  }

  .prices thead,
  .prices td.prices__sku {
    display: none;
  }

  .prices tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .prices tr:last-child {
    border-bottom: none;
  }

  .prices td.prices__name {
    grid-area: 1 / 1;
    padding: 0;
    border: none;
    line-height: var(--text-100-lh);
  }

  /* Прежняя цена — подпись под названием: она нужна для сверки, но выбирать по ней нечего. */
  .prices td.prices__num {
    grid-area: 2 / 1;
    padding: 0;
    border: none;
    color: var(--ink-muted);
    font-size: var(--text-50);
    text-align: left;
  }

  /* Новая цена стоит справа во всю высоту позиции. Цвет повторён: у ячейки оба класса, и
     приглушённый `.prices td.prices__num` выше перебивает акцент по специфичности. */
  .prices td.prices__num--new {
    grid-area: 1 / 2 / span 2;
    align-self: center;
    padding: 0;
    border: none;
    color: var(--primary);
    font-size: var(--text-300);
    text-align: right;
  }

  /* Записка о товарах складывается так же: кнопка уходит под текст во всю ширину. */
  .goodsnote__body {
    min-width: 100%;
  }

  /* Карточка пункта складывается: строка из четырёх частей на телефон не влезает.
     Статус остаётся рядом с названием, действие уходит отдельной строкой во всю ширину. */
  .clitem {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 14px;
  }

  .clitem__icon {
    align-self: start;
  }

  .clitem__act {
    grid-column: 1 / -1;
  }

  .clist__title {
    margin: 18px 4px 10px;
  }

  .sitelink {
    display: flex;
    width: 100%;
  }

  .ready {
    padding: 10px 12px;
  }

  /* Окно настройки прижимается к низу: так до кнопок дотягивается большой палец. */
  .modal {
    align-items: flex-end;
    padding: 12px;
  }

  .modal__card {
    max-height: 92vh;
  }

  .modal__head {
    padding: 18px 18px 0;
  }

  .modal__body {
    padding: 12px 18px 18px;
  }

  .modal__title {
    font-size: var(--text-300);
  }

  .range__value {
    font-size: var(--text-100);
  }

  /* Кнопки в столбик и во всю ширину: две в строку на телефоне не помещаются. */
  .actions,
  .form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .button,
  .form__actions .button {
    margin-top: 8px;
  }

  .button--ghost {
    margin-left: 0;
  }

  .flagnote {
    padding: 8px 10px;
  }
}
