/* ============================================================
   invite4u — дизайн-система «Тёплый свет», v1.0
   Крупная антиква, много воздуха, почти нет цвета в интерфейсе:
   весь цвет отдан макетам приглашений. Один сквозной приём —
   линия времени: волосок, точка, подчёркивание активного.
   Значения — из листа «Передача в вёрстку». Новых оттенков,
   радиусов и длительностей здесь не заводим.
   ============================================================ */

:root {
  /* поверхности */
  --cream: #FBF8F3;          /* основная поверхность страницы и карточек */
  --sand: #F2EAE0;           /* вторая поверхность: блоки, заглушки, скелетоны */
  --warm: #F6EFE6;           /* поверхность приглашения и превью в телефоне */
  --paper: #F6F1E9;          /* полосы-подложки секций */
  /* линии */
  --line-soft: #EDE4D8;      /* разделители внутри блока */
  --line: #DECFBB;           /* линия времени, границы на sand */
  --line-strong: #E3D6C6;    /* границы карточек и полей */
  --hair: #F2EAE0;           /* строки внутри списка */
  /* чернила */
  --mute: #6E655C;
  --mute-2: #8A8078;
  --mute-3: #A2947F;
  --ink-2: #4A4340;
  --ink: #221E1B;
  --ink-press: #17130F;
  --ink-cream: #C7B9A6;
  /* акцент живёт только в наведении, активном и метке «сейчас» */
  --accent: #7A4A2F;
  --accent-warm: #E8D3B6;
  --accent-gold: #C79A6A;
  /* служебные */
  --success: #4A6B4F;
  --warning: #B07A2B;
  --error: #9B3B2F;

  --font-display: "Prata", Georgia, "Times New Roman", serif;
  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-chip: 10px;
  --r-field: 12px;
  --r-btn: 14px;
  --r-btn-lg: 16px;
  --r-card: 18px;
  --r-phone: 34px;

  --sh-lift: 0 14px 30px -22px rgba(34, 30, 27, .35);
  --sh-float: 0 40px 80px -44px rgba(34, 30, 27, .4);
  --sh-section: 0 40px 80px -62px rgba(34, 30, 27, .45);

  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-instant: 120ms ease-out;
  --t-base: 200ms var(--ease);
  --t-enter: 320ms var(--ease);

  --pad: 64px;
  --section: 92px;
  --header-h: 84px;
}

@media (max-width: 1439px) { :root { --pad: 48px; } }
@media (max-width: 1023px) { :root { --pad: 32px; --section: 72px; --header-h: 68px; } }
@media (max-width: 599px)  { :root { --pad: 20px; --section: 56px; } }

/* ---------------------------------------------------------------- основа */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 15px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

::selection { background: var(--accent-warm); color: var(--ink); }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 10px 16px;
  border-radius: var(--r-field); text-decoration: none; font-size: 14px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: var(--section); }
.band { background: var(--paper); border-top: 1px solid var(--line-soft); }

/* ---------------------------------------------------------------- типографика */
/* Prata — только крупно: заголовки, имена, цифры и цена. Мельче 22px не бывает. */

.display-1 {
  font-family: var(--font-display);
  font-size: clamp(46px, 5.9vw, 84px);
  line-height: .94;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.display-2 {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.45vw, 64px);
  line-height: .96;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.display-3 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.title {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.lead { font-size: 20px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; max-width: 640px; }
.text { font-size: 15px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.small { font-size: 13px; line-height: 1.6; color: var(--mute); text-wrap: pretty; }
.fine { font-size: 12px; line-height: 1.55; color: var(--mute-2); }
.mono { font-family: var(--font-mono); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.kicker {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute-2);
}

@media (max-width: 599px) {
  .lead { font-size: 17px; }
}

/* Волосок с подписью и номером — ритм листа */
.rule { display: flex; align-items: center; gap: 12px; }
.rule__label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute-2); white-space: nowrap; }
.rule__line { flex: 1; height: 1px; background: var(--line-strong); }
.rule__index { font: 11px/1 var(--font-mono); color: var(--mute-3); }

/* Шапка секции: заголовок слева, пояснение за волоском справа */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 24px 60px;
  align-items: end;
}
.sec-head .kicker { margin-bottom: 18px; }
.sec-head__aside {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  border-left: 1px solid var(--line-strong);
  padding-left: 22px;
  text-wrap: pretty;
}
@media (max-width: 1023px) {
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .sec-head__aside { font-size: 15px; }
}

/* ---------------------------------------------------------------- кнопка-штемпель */
/* Мягкая плашка, волосок и круглая печать с направлением.
   Слева — что произойдёт, справа — куда. */

.btn {
  --h: 48px;
  --seal: 24px;
  --btn-rule: rgba(251, 248, 243, .22);
  --btn-seal: rgba(251, 248, 243, .42);
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) var(--h);
  min-height: var(--h);
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  background: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.05;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-instant), border-color var(--t-instant), color var(--t-instant), box-shadow var(--t-instant);
}
.btn__label { display: flex; align-items: center; justify-content: center; padding: 0 18px; white-space: nowrap; text-align: center; }
.btn__mark { display: grid; place-items: center; border-left: 1px solid var(--btn-rule); transition: border-color var(--t-instant); }
.btn__seal {
  width: var(--seal); height: var(--seal);
  border-radius: 50%;
  border: 1px solid var(--btn-seal);
  display: grid; place-items: center;
  transition: background-color var(--t-instant), border-color var(--t-instant), color var(--t-instant);
}
.btn__seal svg { width: 11px; height: 11px; }

.btn--sm { --h: 44px; --seal: 22px; border-radius: var(--r-field); }
.btn--sm .btn__label { padding: 0 16px; }
.btn--lg { --h: 56px; --seal: 28px; border-radius: var(--r-btn-lg); font-size: 16px; }
.btn--lg .btn__label { padding: 0 26px; }
.btn--lg .btn__seal svg { width: 12px; height: 12px; }
.btn--block { display: grid; width: 100%; }
.btn--block .btn__label { justify-content: center; }

.btn--primary { background: var(--ink); color: var(--cream); }
.btn--primary:hover { background: var(--accent); box-shadow: 0 10px 24px -18px rgba(34, 30, 27, .5); --btn-rule: rgba(251, 248, 243, .28); }
.btn--primary:hover .btn__seal { background: var(--cream); color: var(--accent); border-color: var(--cream); }
.btn--primary:active { background: var(--ink-press); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .3); }
.btn--primary:active .btn__seal { background: rgba(251, 248, 243, .16); color: var(--cream); border-color: transparent; }

.btn--secondary {
  --btn-rule: var(--line);
  --btn-seal: var(--ink-cream);
  border-color: var(--ink);
  color: var(--ink);
}
.btn--secondary:hover { background: linear-gradient(90deg, var(--sand) 78%, var(--cream) 100%); --btn-rule: var(--ink-cream); }
.btn--secondary:hover .btn__seal { border-color: var(--ink); }
.btn--secondary:active { background: #E7DBC9; }
.btn--secondary:active .btn__seal { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* Первичная на тёмной поверхности */
.btn--light {
  --btn-rule: rgba(34, 30, 27, .16);
  --btn-seal: rgba(34, 30, 27, .28);
  background: var(--cream);
  color: var(--ink);
}
.btn--light:hover { background: var(--accent-warm); }

.btn:disabled, .btn.is-disabled {
  cursor: default;
  background: var(--line-soft);
  border-color: transparent;
  color: var(--mute-3);
  box-shadow: none;
  --btn-rule: var(--line);
  --btn-seal: var(--line);
}
.btn--secondary:disabled { background: none; border-color: var(--line-strong); --btn-rule: var(--line-soft); --btn-seal: var(--line-soft); }
.btn:disabled .btn__seal { background: none; color: inherit; }

/* Загрузка: три точки живут в печати, подпись — причастием */
.btn.is-loading { cursor: progress; }
.btn.is-loading .btn__label { opacity: .7; }
.btn.is-loading .btn__seal { border-color: transparent; background: none; }
.btn.is-loading .btn__seal svg { display: none; }
.btn.is-loading .btn__seal::before {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor;
  box-shadow: -8px 0 currentColor, 8px 0 currentColor;
  animation: tsPulse 1.2s ease-in-out infinite;
}

/* Кнопка без печати — только отмена в модалке */
.btn--plain {
  display: inline-grid; place-items: center;
  grid-template-columns: auto;
  padding: 0 18px;
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn--plain:hover { border-color: var(--ink); color: var(--ink); }

@keyframes tsPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Текстовая: подпись на линии, стрелка у правого края */
.tlink {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 14px; color: var(--ink);
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  background: none; border-top: 0; border-left: 0; border-right: 0;
  cursor: pointer;
  transition: color var(--t-instant), border-color var(--t-instant);
}
.tlink svg { width: 12px; height: 12px; color: var(--mute-2); flex: none; transition: color var(--t-instant); }
.tlink:hover { color: var(--accent); border-bottom-color: var(--accent); }
.tlink:hover svg { color: var(--accent); }
.tlink:active { color: var(--ink-press); border-bottom: 2px solid var(--ink-press); padding-bottom: 8px; }

/* Ссылка в тексте */
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-cream);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--t-instant), text-decoration-color var(--t-instant);
}
.link:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---------------------------------------------------------------- ярлыки и фильтры */

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color var(--t-instant), color var(--t-instant), background-color var(--t-instant);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip__count { font: 11px/1 var(--font-mono); color: var(--mute-3); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip.is-on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-gold); }
.chip.is-on .chip__count { color: rgba(251, 248, 243, .7); }

/* Вариант выбора в строке настроек */
.opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-chip);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color var(--t-instant), color var(--t-instant), background-color var(--t-instant);
}
.opt:hover { border-color: var(--ink); color: var(--ink); }
.opt.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.opt svg { width: 12px; height: 12px; }

/* Ярлык дополнения: одно место и добавляет, и убирает */
.tag {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink-2);
  text-align: left;
  padding: 0;
  transition: border-color var(--t-instant), color var(--t-instant), background-color var(--t-instant);
}
.tag__label { display: flex; align-items: center; padding: 9px 13px; font-size: 12.5px; line-height: 1.3; }
.tag__mark { display: grid; place-items: center; border-left: 1px solid var(--line-soft); }
.tag__seal { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ink-cream); display: grid; place-items: center; }
.tag__seal svg { width: 9px; height: 9px; }
.tag__seal .i-off { display: none; }
.tag:hover { border-color: var(--ink); background: var(--sand); color: var(--ink); }
.tag:hover .tag__mark { border-left-color: var(--ink-cream); }
.tag:hover .tag__seal { border-color: var(--ink); }
.tag.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.tag.is-on .tag__mark { border-left-color: rgba(251, 248, 243, .22); }
.tag.is-on .tag__seal { background: rgba(251, 248, 243, .18); border-color: transparent; }
.tag.is-on .tag__seal .i-on { display: none; }
.tag.is-on .tag__seal .i-off { display: block; }

.pill-count {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 8px;
  background: var(--line-soft);
  color: var(--ink);
  font-size: 11px;
  line-height: 1;
}

/* Флажок «чаще всего берут» */
.flag {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--accent-warm);
  color: var(--ink);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Статус: точка и подпись */
.status { display: flex; align-items: center; gap: 12px; font-size: 12.5px; line-height: 1.45; color: var(--mute); }
.status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--mute-2)); }
.status--ok { --dot: var(--success); }
.status--warn { --dot: var(--warning); }
.status--error { --dot: var(--error); }

.badge { display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border-radius: 12px; font-size: 12.5px; background: var(--line-soft); color: var(--ink-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--mute-2)); }
.badge--ok { background: #E4EBE4; color: #3E5A42; --dot: var(--success); }
.badge--warn { background: #F6EBD8; color: #8A5F19; --dot: var(--warning); }
.badge--error { background: #F6E2DE; color: #8A3225; --dot: var(--error); }

/* ---------------------------------------------------------------- поля */
/* Радиус мягкий, состояние читается формой и линией, а не цветом */

.field { display: block; min-width: 0; }
.field__label { display: block; font-size: 13px; line-height: 1.4; color: var(--ink-2); margin-bottom: 8px; }
.field__hint { font-size: 12px; line-height: 1.5; color: var(--mute); margin-top: 8px; text-wrap: pretty; }
.field__error { font-size: 12px; line-height: 1.5; color: var(--error); margin-top: 8px; }

.control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  background: var(--cream);
  transition: border-color var(--t-instant), background-color var(--t-instant);
}
.control--plain { grid-template-columns: minmax(0, 1fr); }
.control:focus-within { border-color: var(--ink); }
.control > input,
.control > select {
  width: 100%; min-width: 0;
  border: 0; outline: 0; background: none;
  padding: 12px 0 12px 16px;
  font-size: 14.5px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.control--plain > input { padding-right: 16px; }
.control > input::placeholder, .textarea textarea::placeholder { color: var(--mute-3); opacity: 1; }
.control__icon { display: grid; place-items: center; color: var(--mute-3); pointer-events: none; }
.control__icon svg { width: 14px; height: 14px; }
.control.is-invalid { border-color: var(--error); background: #FDF6F4; }
.control.is-invalid .control__icon { color: var(--error); }
.control.is-valid { border-color: var(--success); }

.textarea {
  display: flex; flex-direction: column;
  min-height: 112px;
  padding: 12px 16px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  background: var(--cream);
  transition: border-color var(--t-instant);
}
.textarea:focus-within { border-color: var(--ink); }
.textarea textarea {
  flex: 1; min-height: 70px;
  border: 0; outline: 0; background: none; resize: vertical;
  font-size: 14.5px; line-height: 1.55; color: var(--ink);
}
.textarea__count { text-align: right; font: 11px/1 var(--font-mono); color: var(--mute-3); margin-top: 6px; }

/* Галочка, круг, переключатель */
.check { position: relative; display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: none; width: 26px; height: 26px;
  border-radius: 8px; border: 1px solid var(--ink-cream);
  display: grid; place-items: center;
  color: var(--cream);
  transition: background-color var(--t-instant), border-color var(--t-instant);
}
.check__box svg { width: 14px; height: 14px; opacity: 0; }
.check input:checked + .check__box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 1px solid var(--accent); outline-offset: 3px; }
.check.is-invalid .check__box { border-color: var(--error); }

.switch { position: relative; display: flex; align-items: center; gap: 14px; min-height: 44px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  flex: none; display: flex;
  width: 48px; height: 27px; padding: 3px;
  border-radius: 14px;
  background: var(--line);
  transition: background-color var(--t-base);
}
.switch__track::after {
  content: ""; width: 21px; height: 21px; border-radius: 50%;
  background: var(--cream);
  transition: transform var(--t-base);
}
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(21px); }
.switch input:disabled + .switch__track { background: var(--line-soft); }
.switch input:focus-visible + .switch__track { outline: 1px solid var(--accent); outline-offset: 3px; }
.switch__text { min-width: 0; font-size: 14.5px; line-height: 1.35; color: var(--ink); }
.switch__hint { display: block; font-size: 11.5px; color: var(--mute); margin-top: 2px; }

input[type="range"] { width: 100%; height: 22px; accent-color: var(--ink); cursor: pointer; }
input[type="color"] { -webkit-appearance: none; appearance: none; border: 0; padding: 0; background: none; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(34, 30, 27, .14); border-radius: 50%; }
input[type="color"]::-moz-color-swatch { border: 1px solid rgba(34, 30, 27, .14); border-radius: 50%; }

/* ---------------------------------------------------------------- карточки и списки */

.card { background: var(--cream); border: 1px solid var(--line-strong); border-radius: var(--r-card); }

.note {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.note strong { font-weight: 500; color: var(--ink); }

/* Строка тарифа: галочка, прочерк или плюс-минус */
.feat { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.feat__mark { display: grid; place-items: start center; padding-top: 3px; color: var(--success); }
.feat__mark svg { width: 13px; height: 13px; }
.feat--no { color: var(--mute-2); }
.feat--no .feat__mark { color: var(--mute-3); }

/* Шаги: порядок держат цифры, а не кружочки-иконки */
.steps { border: 1px solid var(--line-soft); border-radius: var(--r-btn); overflow: hidden; background: var(--cream); }
.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 52px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--hair);
}
.step:last-child { border-bottom: 0; }
.step__num { font: 11px/1 var(--font-mono); color: var(--mute-3); text-align: center; }
.step__body { padding: 14px 6px; min-width: 0; }
.step__title { font-size: 15px; line-height: 1.35; color: var(--ink); }
.step__text { font-size: 12.5px; line-height: 1.5; color: var(--mute); margin-top: 3px; }
.step__mark { display: grid; place-items: center; }
.step__seal { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink-cream); display: grid; place-items: center; }
.step__seal svg { width: 10px; height: 10px; }
.step.is-done .step__seal { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.step.is-now { background: var(--warm); }
.step.is-now .step__num { color: var(--accent); }
.step.is-now .step__seal { border-color: var(--accent); color: var(--accent); }

/* Пустое состояние */
.empty { border: 1px solid var(--line-soft); border-radius: var(--r-card); padding: 26px 24px; background: var(--cream); }
.empty__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 16px; color: var(--ink); }
.empty__head svg { width: 12px; height: 12px; color: var(--accent-gold); }

/* Скелетон: заливка sand с пульсацией, без спиннеров */
.skeleton { border-radius: 5px; background: var(--sand); animation: tsPulse 1.6s ease-in-out infinite; }

/* Слот под картинку, пока файла нет: sand и моно-подпись */
.slot {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  background: repeating-linear-gradient(135deg, var(--sand) 0 10px, #EFE6DA 10px 20px);
  padding: 14px;
  font: 10px/1.75 var(--font-mono);
  color: var(--mute-3);
}

/* Поле-ссылка: адрес моноширинным и «Скопировать» за волоском */
.linkfield {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: var(--r-btn);
  background: var(--cream);
}
.linkfield__value {
  display: flex; align-items: center; min-width: 0;
  padding: 12px 0 12px 16px;
  font: 14px/1.3 var(--font-mono); color: var(--ink);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.linkfield__value span { overflow: hidden; text-overflow: ellipsis; }
.linkfield__copy {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px;
  border: 0; border-left: 1px solid var(--line);
  background: none;
  font-size: 13px; color: var(--ink-2);
  border-radius: 0 var(--r-btn) var(--r-btn) 0;
  transition: color var(--t-instant);
}
.linkfield__copy svg { width: 13px; height: 13px; }
.linkfield__copy:hover { color: var(--accent); }
.linkfield--quiet { border-color: var(--line-strong); }
.linkfield--quiet .linkfield__value { color: var(--ink-2); }

/* Готово: единственная тёмная карточка внутри страницы */
.done {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-btn-lg);
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.45;
}
.done__seal { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(251, 248, 243, .4); display: grid; place-items: center; }
.done__seal svg { width: 12px; height: 12px; }

/* ---------------------------------------------------------------- модалка и тост */

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(34, 30, 27, .46);
  opacity: 0;
  transition: opacity var(--t-enter);
}
.modal.is-open { opacity: 1; }
.modal__box {
  position: relative;
  width: min(100%, 540px);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  box-shadow: var(--sh-float);
  padding: 30px 28px 26px;
  transform: translateY(12px);
  transition: transform var(--t-enter);
}
.modal.is-open .modal__box { transform: none; }
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink-2);
  transition: border-color var(--t-instant), color var(--t-instant);
}
.modal__close svg { width: 13px; height: 13px; }
.modal__close:hover { border-color: var(--ink); color: var(--ink); }
.modal__title { font-family: var(--font-display); font-size: 38px; line-height: 1.05; letter-spacing: -.025em; margin: 10px 0 10px; padding-right: 40px; }

@media (max-width: 599px) {
  .modal { place-items: end center; padding: 0; }
  .modal__box { width: 100%; border-radius: var(--r-card) var(--r-card) 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; max-height: 92dvh; }
  .modal__title { font-size: 32px; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  width: min(calc(100% - 32px), 460px);
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 14px 18px 14px 14px;
  border-radius: var(--r-btn-lg);
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--sh-float);
  font-size: 13.5px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity var(--t-enter), transform var(--t-enter);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast__seal { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(251, 248, 243, .4); display: grid; place-items: center; }
.toast__seal svg { width: 12px; height: 12px; }

/* ---------------------------------------------------------------- шапка */
/* Прилипает, после 120px скролла ужимается до 64px и получает тень lift */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow var(--t-base);
}
.masthead.is-stuck { box-shadow: var(--sh-lift); }
.masthead__inner {
  display: flex; align-items: center; gap: 30px;
  padding-block: 20px;
  transition: padding var(--t-base);
}
.masthead.is-stuck .masthead__inner { padding-block: 10px; }

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav { display: flex; gap: 28px; }
.nav__link {
  font-size: 14px; line-height: 1.4; color: var(--mute);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color var(--t-instant), border-color var(--t-instant);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.masthead__end { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.cart-link {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0; background: none;
  font-size: 14px; color: var(--mute);
  transition: color var(--t-instant);
}
.cart-link:hover { color: var(--ink); }

.burger {
  display: none;
  width: 40px; height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink-2);
}
.burger svg { width: 16px; height: 16px; }

/* Путь: Макеты → Конструктор → Оплата */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--mute-2); }
.crumbs a { color: var(--mute-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 11px; height: 11px; color: var(--ink-cream); }
.crumbs [aria-current] { color: var(--ink); }

@media (max-width: 1023px) {
  .nav, .masthead__cta, .masthead .crumbs { display: none; }
  .burger { display: grid; }
  .masthead__inner { gap: 14px; padding-block: 14px; }
  .masthead.is-stuck .masthead__inner { padding-block: 12px; }
  .masthead__end { gap: 12px; }
  .cart-link { font-size: 13px; }
}

/* Меню на телефоне — лист снизу: страница остаётся видна сверху */
.sheet {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(34, 30, 27, .36);
  opacity: 0;
  transition: opacity var(--t-enter);
}
.sheet.is-open { opacity: 1; }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 78vh;
  overflow: auto;
  padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-radius: var(--r-card) var(--r-card) 0 0;
  transform: translateY(12px);
  transition: transform var(--t-enter);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__handle { width: 46px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet__link {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px; color: var(--ink);
  text-decoration: none;
  background: none; border-top: 0; border-left: 0; border-right: 0;
  width: 100%;
  text-align: left;
}
.sheet__link span { font-size: 13px; color: var(--mute-3); }
.sheet__link svg { width: 12px; height: 12px; color: var(--ink-cream); }
.sheet .btn { margin-top: 16px; }

/* ---------------------------------------------------------------- футер */
/* Единственная тёмная поверхность сайта */

.footer { background: var(--ink); color: var(--cream); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 28px 40px;
  padding-block: 48px 36px;
}
.footer__logo { display: inline-block; font-family: var(--font-display); font-size: 24px; line-height: 1; color: var(--cream); text-decoration: none; margin-bottom: 14px; }
.footer__text { font-size: 13px; line-height: 1.6; color: rgba(251, 248, 243, .66); max-width: 34ch; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; font-size: 13px; line-height: 2.1; color: rgba(251, 248, 243, .66); }
.footer__col a { color: inherit; text-decoration: none; transition: color var(--t-instant); }
.footer__col a:hover { color: var(--cream); }
.footer__head { font-size: 11px; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-cream); margin-bottom: 8px; }
.footer__base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px;
  padding-block: 18px 28px;
  border-top: 1px solid rgba(251, 248, 243, .18);
  font-size: 12.5px; color: rgba(251, 248, 243, .5);
}
.footer__base a { color: inherit; text-decoration: none; }
.footer__base a:hover { color: var(--cream); }
.footer__docs { display: flex; flex-wrap: wrap; gap: 10px 24px; }

@media (max-width: 1023px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 599px) { .footer__grid { grid-template-columns: minmax(0, 1fr); padding-block: 40px 28px; } .footer__base { padding-bottom: calc(28px + env(safe-area-inset-bottom)); } }

/* ---------------------------------------------------------------- появление */
/* 12px вверх и прозрачность, один раз за визит */

.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--t-enter), transform var(--t-enter); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 120ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .modal__box, .sheet__panel, .toast { transform: none !important; }
}

/* ---------------------------------------------------------------- служебные страницы */

.stub { padding-block: clamp(56px, 10vw, 120px); }
.stub__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 40px 64px; align-items: start; }
.stub h1 { margin: 18px 0 22px; }
.stub .lead { margin-bottom: 30px; }
.stub__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.stub__aside { display: flex; flex-direction: column; gap: 14px; border-left: 1px solid var(--line-strong); padding-left: 28px; }
.stub__aside .status { margin-top: 4px; }
.stub__code { font-family: var(--font-display); font-size: clamp(96px, 16vw, 200px); line-height: .8; letter-spacing: -.04em; color: var(--line); }
@media (max-width: 1023px) {
  .stub__grid { grid-template-columns: minmax(0, 1fr); }
  .stub__aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 24px; }
}
@media (max-width: 599px) { .stub__actions .btn { width: 100%; } }

/* Оплата: страница заказа */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; border-top: 1px solid var(--line-soft); }
.checkout__main { padding: 44px var(--pad) 56px; border-right: 1px solid var(--line-soft); }
.checkout__side { padding: 44px 34px 56px; background: var(--paper); }
.checkout__side > .kicker { margin-bottom: 22px; }
.checkout h1 { margin: 14px 0 10px; }
.order-card { border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; margin-top: 30px; background: var(--cream); }
.order-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--hair); }
.order-row__thumb { width: 48px; height: 58px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--sand); display: grid; place-items: center; font-family: var(--font-display); font-size: 22px; color: var(--mute-3); }
.order-row__name { font-size: 15.5px; color: var(--ink); }
.order-row__meta { font-size: 12.5px; color: var(--mute); margin-top: 4px; }
.order-row__price { font-size: 15px; white-space: nowrap; }
.cart-row__end { display: flex; align-items: center; gap: 10px; }
.cart-remove {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; background: none; color: var(--mute-3);
  border-radius: 10px; transition: color var(--t-instant);
}
.cart-remove svg { width: 12px; height: 12px; }
.cart-remove:hover { color: var(--error); }
.order-total { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 14px; padding: 18px 20px; border-radius: var(--r-btn); background: var(--sand); font-size: 14.5px; color: var(--ink-2); }
.order-total .num { font-size: 30px; color: var(--ink); }
.panel { border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--cream); padding: 20px 22px 22px; }
.panel + .panel, .done + .panel, .panel + .status, .status + .status { margin-top: 16px; }
.panel__label { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.share { display: grid; gap: 10px; margin-top: 16px; }
.qr { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; }
.qr img { width: 112px; height: 112px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; padding: 6px; }
@media (max-width: 1023px) {
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .checkout__main { border-right: 0; padding-bottom: 32px; }
  .checkout__side { padding: 36px var(--pad) 48px; border-top: 1px solid var(--line-soft); }
}

/* Документы: колонка и оглавление */
.doc { display: grid; grid-template-columns: 240px minmax(0, 680px); gap: 40px 72px; align-items: start; }
.doc__toc { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-soft); }
.doc__toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--mute); text-decoration: none; }
.doc__toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.doc__body h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 46px 0 14px; scroll-margin-top: calc(var(--header-h) + 24px); }
.doc__body h2:first-child { margin-top: 0; }
.doc__body p { font-size: 16px; line-height: 1.7; color: var(--ink-2); margin-bottom: 14px; text-wrap: pretty; }
.doc__body .note { margin-top: 36px; }
@media (max-width: 1023px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc__toc { position: static; }
}
