/* ============================================================
   COVERPRESS — main.css
   Дизайн-система: монохром-графит + коралл на CTA
   Шрифт: Inter (Variable), локально
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2-variations"),
       url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.ttf") format("truetype-variations"),
       url("../fonts/fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair";
  src: url("../fonts/playfair.ttf") format("truetype-variations"),
       url("../fonts/playfair.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bebas";
  src: url("../fonts/bebas.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat.ttf") format("truetype-variations"),
       url("../fonts/caveat.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --text-2: #555555;
  --text-3: #888888;
  --border: #e8e8e8;
  --border-strong: #111111;

  --accent: #FF6B47;
  --accent-hover: #E85A37;
  --accent-active: #D14A2A;

  --backdrop: rgba(0, 0, 0, 0.5);
  --shadow-card: 0 32px 80px rgba(0, 0, 0, 0.18);
  --shadow-tile: 0 12px 32px rgba(0, 0, 0, 0.12);

  --r-tile: 16px;
  --r-card: 24px;
  --r-input: 12px;
  --r-pill: 100px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }

/* ============ Типографика ============ */
.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-sub {
  font-size: 16px;
  color: var(--text-2);
  margin-top: 12px;
  max-width: 560px;
}

.section-head {
  margin-bottom: 48px;
}

/* ============ Шапка ============ */
.header {
  padding: 28px 48px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  user-select: none;
  font-size: 52px;
  white-space: nowrap;
}
/* Логотип = два слова разными шрифтами, неразрывный словесный знак.
   Размер наследуется от родителя через em — встаёт того же размера,
   что и текст рядом. .brand — обёртка с white-space: nowrap чтобы
   COVER и press никогда не разрывались на разные строки. */
.brand {
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}
.logo-cover {
  font-family: "Fredoka", "Inter", sans-serif;
  font-weight: 700;
  font-variation-settings: "wdth" 110;
  font-size: 1em;
  letter-spacing: -0.01em;
  color: var(--accent);
  line-height: 1;
}
.logo-press {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-style: italic;
  font-size: 0.77em;
  color: #1FB6C3;
  letter-spacing: -0.01em;
  line-height: 1;
}

.footer-logo .logo-cover { color: #FF6B47; }
.footer-logo .logo-press { color: #1FB6C3; }

/* Навигация в шапке (ссылка «Библиотека» и обратно на главную) */
.header-nav {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.header-link:hover { color: var(--text); border-color: var(--text); }
.header-link svg { color: var(--accent); }

/* «Библиотека» — главный раздел витрины. Сразу оранжевый + периодический
   «живой» пульс, чтобы притягивать взгляд (раз в несколько секунд). */
.header-link.is-primary {
  color: #fff;
  font-weight: 600;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255, 107, 71, 0.3);
  animation: lib-pulse 6s ease-in-out infinite;
}
.header-link.is-primary svg { color: #fff; }
.header-link.is-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

@keyframes lib-pulse {
  0%, 85%, 100% { transform: scale(1); }
  90%          { transform: scale(1.07); }
  95%          { transform: scale(0.99); }
}
/* Уважаем настройку «меньше движения» — пульс отключаем */
@media (prefers-reduced-motion: reduce) {
  .header-link.is-primary { animation: none; }
}

/* Правый блок шапки: навигация + «Регистрация» в правом углу */
.header-right { display: inline-flex; align-items: center; gap: 14px; }
.header-account {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--r-pill);
  background: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.header-account:hover { background: var(--accent); color: #fff; }
.header-account svg { color: inherit; }

@media (max-width: 560px) {
  .header-link { font-size: 14px; padding: 7px 12px; }
  .header-right { gap: 8px; }
  .header-account { font-size: 14px; padding: 7px 10px; }
  .header-account-name { display: none; } /* на смартфоне — только иконка */
}

/* Шапка на узком экране не должна распирать страницу — из-за неё появлялась
   горизонтальная прокрутка всего сайта. Логотип и кнопки переносятся на две
   строки и ужимаются по месту. */
@media (max-width: 480px) {
  .header { padding: 12px 14px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .logo { font-size: 20px; }
  .header-right { flex: 1 1 100%; justify-content: flex-start; gap: 6px; min-width: 0; }
  .header-nav { gap: 6px; min-width: 0; }
  .header-link { font-size: 13px; padding: 6px 10px; gap: 5px; }
  .header-link svg { width: 15px; height: 15px; }
  .header-account { font-size: 13px; padding: 6px 9px; }
}

/* ===== Журнал (страница статей) ===== */
.journal-wrap { max-width: 900px; margin: 0 auto; padding: 8px 24px 80px; }
.journal-head { text-align: center; padding: 8px 0 32px; }
.journal-title { font-size: clamp(32px, 5vw, 48px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.journal-sub { color: var(--text-2); margin-top: 12px; font-size: 16px; }
.journal-list { display: flex; flex-direction: column; gap: 16px; }
.journal-empty {
  text-align: center;
  color: var(--text-3);
  padding: 64px 24px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  font-size: 16px;
}
/* Карточка статьи (для наполнения из админки) */
.journal-card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.journal-card:hover { border-color: var(--text); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); }
.journal-card-title { font-size: 20px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.journal-card-excerpt { color: var(--text-2); margin-top: 8px; font-size: 15px; line-height: 1.5; }
.journal-card-meta { color: var(--text-3); margin-top: 12px; font-size: 13px; }
.footer-logo {
  font-size: 22px;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 8px;
}

/* ============ Каталог: заголовок над сеткой ============ */
.catalog-head {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 36px;
}

.catalog-title {
  /* Нижняя граница 28px: на экране 360 прежние 40px не вмещали слово
     «превращается» (буквы фиксированной ширины) — страница уезжала вбок. */
  font-size: clamp(28px, 5.6vw, 72px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* Слово «превращается» — каждая буква свой шрифт и цвет, меняются случайно */
.morph {
  display: inline-block;
  white-space: nowrap;
  margin-left: 0.3em;
  letter-spacing: 0.02em;
}
.m {
  display: inline-block;
  transition: color 0.5s ease, filter 0.3s ease, transform 0.3s var(--ease), opacity 0.3s ease;
  line-height: 1;
  min-width: 0.45em;
  text-align: center;
  will-change: filter, transform;
}
/* 18 визуальных стилей букв — разные шрифты + расширенная палитра */
.m.s1  { font-family: "Inter", sans-serif;       font-weight: 200; color: #111; letter-spacing: -0.02em; }
.m.s2  { font-family: "Fredoka", sans-serif;     font-weight: 700; color: #c97a3e; }
.m.s3  { font-family: Georgia, serif;            font-weight: 400; color: #4a82b3; font-style: italic; }
.m.s4  { font-family: "Inter", sans-serif;       font-weight: 900; color: #5b7df0; }
.m.s5  { font-family: "Inter", sans-serif;       font-weight: 800; color: #FF6B47; font-style: italic; }
.m.s6  { font-family: "Courier New", monospace;  font-weight: 700; color: #6d4f28; }
.m.s7  { font-family: "Fredoka", sans-serif;     font-weight: 700; color: #ff5577; }
.m.s8  { font-family: "Inter", sans-serif;       font-weight: 600; color: #2c3e58; }
.m.s9  { font-family: "Inter", sans-serif;       font-weight: 700;
         background: linear-gradient(135deg, #7b5cff 0%, #3da9ff 100%);
         -webkit-background-clip: text; background-clip: text; color: transparent; }
.m.s10 { font-family: "Playfair", serif;         font-weight: 800; color: #2f9b3d; }
.m.s11 { font-family: "Bebas", sans-serif;       font-weight: 400; color: #ff8a2d; letter-spacing: 0.04em; }
.m.s12 { font-family: "Caveat", cursive;         font-weight: 700; color: #b5651d; }
.m.s13 { font-family: "Inter", sans-serif;       font-weight: 700; color: #1FB6C3; }
.m.s14 { font-family: Georgia, serif;            font-weight: 700; color: #6b3fa0; }
.m.s15 { font-family: "Playfair", serif;         font-weight: 400; color: #d4af37; font-style: italic; }
.m.s16 { font-family: Impact, "Arial Black", sans-serif; font-weight: 900; color: #1a8d3e; letter-spacing: -0.02em; }
.m.s17 { font-family: "Times New Roman", serif;  font-weight: 700; color: #b53d9e; font-style: italic; }
.m.s18 { font-family: "Caveat", cursive;         font-weight: 700;
         background: linear-gradient(135deg, #ff5cc4 0%, #7b5cff 100%);
         -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Смена шрифта скрывается под лёгким блюром и микро-масштабом —
   буква не пропадает в пустоту, а "перетекает" сквозь размытие */
.m.fade {
  filter: blur(3px);
  transform: scale(0.92);
  opacity: 0.7;
}

.catalog-sub {
  font-size: 17px;
  color: var(--text-2);
  margin-top: 18px;
  line-height: 1.5;
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--text); }


/* ============ Каталог ============ */
.catalog {
  padding: 16px 48px 72px;
  max-width: 1200px;
  margin: 0 auto;
}

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

/* Заглушки, когда наших стилей/обложек ещё нет в витрине */
.catalog-empty {
  grid-column: 1 / -1;
  padding: 48px 16px;
  text-align: center;
  color: var(--muted, #9aa0a6);
  font-size: 15px;
}
.collage-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: #eee;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
  will-change: transform;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-tile);
}
.tile:hover img {
  transform: scale(1.04);
}

.tile-name {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Анонс («скоро») — серая плитка с именем, без обложки и без покупки */
.tile-soon {
  background: #ececed;
  cursor: default;
}
.tile-soon:hover {
  transform: none;
  box-shadow: none;
}
.tile-soon .tile-name {
  background: rgba(255, 255, 255, 0.92);
  color: #6e6e73;
}
.tile-soon-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.06);
  color: #8a8a8f;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
}

/* ============ Как это работает ============ */
.how {
  padding: 64px 48px 96px;
  max-width: 1200px;
  margin: 0 auto;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.step {
  padding: 32px 28px;
  background: var(--surface);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
}

.step-num {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.step-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.step-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ============ Для чего подходит ============ */
.use-cases {
  padding: 64px 48px 96px;
  max-width: 1200px;
  margin: 0 auto;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.use-card {
  padding: 28px 24px;
  background: var(--surface);
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.use-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.use-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.use-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============ Сравнение с конкурентами ============
   Десктоп/планшет: компактная таблица.
   Смартфон: карточки по параметрам. Переключение по media query. */
.compare {
  padding: 32px 48px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.compare-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 20px;
}
.compare-title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.compare-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ===== Десктоп/планшет: таблица ===== */
.compare-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
/* Жёсткая раскладка: 4 колонки по 25% каждая */
.compare-table th,
.compare-table td {
  width: 25%;
  padding: 8px 14px;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.compare-table thead th {
  padding-top: 12px;
  padding-bottom: 10px;
  background: #f7f7f7;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table tbody th {
  font-weight: 500;
  color: var(--text-2);
  background: #fafafa;
}
.compare-table td { color: var(--text); }

/* Колонка COVERPRESS — лёгкий коралловый фон, через все строки */
.compare-table .th-us,
.compare-table .td-us {
  background: #fff5f0;
  box-shadow: inset 1px 0 0 rgba(255, 107, 71, 0.18), inset -1px 0 0 rgba(255, 107, 71, 0.18);
}
.compare-table .th-us {
  box-shadow: inset 1px 0 0 rgba(255, 107, 71, 0.32), inset -1px 0 0 rgba(255, 107, 71, 0.32), inset 0 2px 0 var(--accent);
}
.compare-table .td-us b { color: var(--accent); font-weight: 700; }

.th-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.th-list {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
  line-height: 1.4;
}
.th-us .th-name { display: inline-flex; align-items: baseline; gap: 2px; }

.compare-table .mute { color: var(--text-3); }

/* ===== Смартфон: карточки. Скрыто на десктопе ===== */
.compare-cards { display: none; }
.cc-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.cc-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 6px;
}
.cc-opts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-opt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f7f7f7;
}
.cc-us {
  background: #fff5f0;
  box-shadow: inset 0 0 0 1px rgba(255, 107, 71, 0.32);
}
.cc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  flex-shrink: 0;
}
.cc-us .cc-name { color: var(--accent); }
.cc-val {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  line-height: 1.35;
}
.cc-us .cc-val { font-weight: 600; }

.compare-foot {
  max-width: 760px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============ FAQ ============ */
.faq {
  padding: 36px 48px 56px;
  max-width: 880px;
  margin: 0 auto;
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-body {
  padding: 0 0 14px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  max-width: 720px;
}
.faq-body code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

/* ============ Подвал — светлый тон-в-тон ============ */
.footer {
  background: #f3f3f3;
  color: #555;
  border-top: 1px solid #e5e5e5;
  padding: 36px 48px 20px;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-links a {
  font-size: 13px;
  color: #555;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: #111; }

.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-social .social {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  border: 1px solid #e5e5e5;
}
.footer-social .social img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.footer-social .social:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  padding-top: 14px;
  border-top: 1px solid #e5e5e5;
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-pay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #2a2a2a;
}
.pay-mir  { background: linear-gradient(90deg, #2f9b3d 0%, #57b956 100%); }
.pay-visa { background: #1A1F71; }
.pay-sbp  { background: linear-gradient(90deg, #1f8fff 0%, #c43dff 100%); }
.pay-mc {
  position: relative;
  width: 32px;
  height: 22px;
  background: transparent;
  padding: 0;
}
.pay-mc .mc-c1, .pay-mc .mc-c2 {
  position: absolute;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.pay-mc .mc-c1 { left: 0; background: #EB001B; }
.pay-mc .mc-c2 { right: 0; background: #F79E1B; mix-blend-mode: multiply; }
.footer-copy { color: #888; }

/* ============ Reveal-анимация при скролле ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   МОДАЛКА — Apple Liquid Glass
   Обложка фоном на всю карточку, светлая стеклянная панель снизу.
   По умолчанию развёрнута, можно свернуть в одну строку.
   ВСЁ внутри панели — 13px, тёмный текст, без uppercase.
   Кнопка "Купить" — компактная пилюля справа, не растягивается.
   ============================================================ */

/* Модалка — без карточки. Все элементы фиксированы к viewport.
   Картинка центрирована, меняет физический размер под формат.
   Плашка управления 380px фикс в правом нижнем углу viewport. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modalFade 0.25s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

/* Картинка — самостоятельная, центрирована во viewport.
   Меняет физические пропорции под формат: H 960×720, S 960×960, V 720×960.
   На малых экранах ужимается через max-width/max-height — пропорции сохраняются. */
.image-frame {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  transition: width 0.35s var(--ease), height 0.35s var(--ease);
  animation: modalDrop 0.4s var(--ease);
}
.image-frame[data-format="h"] {
  width: min(960px, calc(100vw - 48px));
  height: min(720px, calc((100vw - 48px) * 0.75), calc(100vh - 48px));
}
.image-frame[data-format="s"] {
  width: min(960px, calc(100vw - 48px), calc(100vh - 48px));
  height: min(960px, calc(100vw - 48px), calc(100vh - 48px));
}
.image-frame[data-format="v"] {
  width: min(720px, calc((100vh - 48px) * 0.75), calc(100vw - 48px));
  height: min(960px, calc(100vh - 48px));
}
.modal-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Кроссфейд обложек внутри стиля: плавное затухание/проявление. */
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}
.modal-cover.is-fading { opacity: 0; }
@keyframes modalDrop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== Сетка 3×3 обложек стиля (заменяет одиночную .image-frame) =====
   Сетка — ЗАДНИЙ план: занимает весь экран от левого края, место под окно из
   неё не вырезается. Окно 380 px — ПЕРЕДНИЙ план, лежит поверх сетки справа
   снизу (решение владельца). Плитка = меньшее из «высота/3» и «ширина/3»,
   обложки квадратные — показываются целиком, без раздутия. */
#modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 24px;
}
.scene-grid {
  position: relative;
  z-index: 2;
  --tile: min(calc((100vh - 48px - 12px) / 3),
              calc((100vw - 48px - 12px) / 3));
  display: grid;
  grid-template-columns: repeat(3, var(--tile));
  grid-template-rows: repeat(3, var(--tile));
  gap: 6px;
  animation: modalFade 0.25s ease;
}
.scene-tile {
  position: relative;
  width: var(--tile);
  height: var(--tile);
  border-radius: 12px;
  overflow: hidden;
  background: #e9e9ec;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
/* Два слоя на плитку: видимый (.on) + запасной. Кросс-дизолв как у Apple —
   новый слой проявляется и «оседает» по масштабу 1.05→1.0, старый гаснет
   одновременно: без пустого кадра и без рывка. */
.scene-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.scene-tile img.on { opacity: 1; transform: scale(1); }

/* ===== Листание между стилями (как в iBooks) =====
   .scene-stage — обёртка вокруг сетки, собирается в style-modal.js. Держит
   стрелки по бокам окна. Сама сетка, панель 380 px и крестик не меняются. */
.scene-stage {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}
/* Смена стиля: содержимое сетки мягко проявляется, окно не пересобирается. */
.scene-stage.is-switching { animation: sceneSwap 0.3s var(--ease); }
@keyframes sceneSwap {
  from { opacity: 0.35; transform: scale(0.985); }
  to   { opacity: 1;    transform: none; }
}

.style-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: none;                     /* показываем только на указательных устройствах */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.style-nav-prev { left: -58px; }
.style-nav-next { right: -58px; }
.style-nav:hover { background: rgba(255, 255, 255, 0.85); }
.style-nav[hidden] { display: none; }
/* На краю списка стрелка гаснет — дальше листать нечего. */
.style-nav[disabled] { opacity: 0 !important; pointer-events: none; }

/* Стрелки — как в Books: только мышь/трекпад и только когда есть место сбоку.
   На тач-устройствах их нет — там свайп. */
@media (hover: hover) and (pointer: fine) and (min-width: 1200px) {
  .style-nav:not([hidden]) { display: inline-flex; }
  /* Наведение считаем по сетке обложек, а не по модалке: модалка занимает весь
     экран, и по ней курсор «наведён» всегда. Сами стрелки — дети сетки, поэтому
     наведение на стрелку тоже держит их видимыми. */
  .scene-stage:hover .style-nav:not([disabled]) { opacity: 1; }
}

/* ПЛАНШЕТ-ПОРТРЕТ (700–900px). Тот же способ, что альбом: сетка фоном во весь
   экран, окно поверх неё справа снизу. Сетка прижата к ЛЕВОМУ ВЕРХНЕМУ углу —
   плитку ограничивает ширина, и свободный остаток по высоте уходит вниз, под
   окно, а не остаётся дыркой сверху. */
@media (min-width: 700px) and (max-width: 900px) {
  #modal:not([hidden]) {
    padding: 24px;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .scene-grid {
    --tile: min(calc((100vh - 48px - 12px) / 3),
                calc((100vw - 48px - 12px) / 3));
    margin-top: 0;
  }
}

/* СМАРТФОН-ПОРТРЕТ (<700px). Ширина экрана меньше окна, поэтому раскладка
   другая (решение владельца): обложки идут в ДВЕ колонки крупными плитками,
   остальные уходят вниз — полотно закрывает весь экран без полей. Окно-шторка
   лежит поверх нижней части; при сворачивании открывается сплошное полотно. */
@media (max-width: 699px) and (orientation: portrait) {
  #modal:not([hidden]) {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
  }
  .scene-grid {
    --tile: calc((100vw - 6px) / 2);
    grid-template-columns: repeat(2, var(--tile));
    grid-template-rows: none;
    grid-auto-rows: var(--tile);
    margin-top: 0;
  }
}

/* СМАРТФОН-АЛЬБОМ (высота ≤500px). Та же раскладка: плитка в половину высоты,
   два ряда закрывают экран, колонки уходят вправо за край. Окно — справа. */
@media (max-height: 500px) and (orientation: landscape) {
  #modal:not([hidden]) {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
  }
  .scene-grid {
    --tile: calc((100vh - 6px) / 2);
    grid-template-columns: none;
    grid-auto-columns: var(--tile);
    grid-auto-flow: column;
    grid-template-rows: repeat(2, var(--tile));
    margin-top: 0;
  }
}

/* Кнопка закрытия — правый верхний угол viewport */
.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  cursor: pointer;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.85); }


/* Стрелки навигации — прямо на картинке, без подложек.
   Просто белые < > с тенью для контраста. Выше центра. */
.modal-nav {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s ease;
}
.modal-nav-prev { left: 8px; }
.modal-nav-next { right: 8px; }
.modal-nav:hover { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9)); }
.modal-nav-prev:hover { transform: translateY(-50%) translateX(-2px); }
.modal-nav-next:hover { transform: translateY(-50%) translateX(2px); }
.modal-nav:active { transform: translateY(-50%) scale(0.92); }

/* ===== Плашка управления — фикс 380px в правом нижнем углу viewport.
   Не двигается при смене формата, не меняет ширину при сворачивании. ===== */
.modal-glass {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 380px;
  z-index: 5;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: glassIn 0.35s var(--ease);
}
.modal-glass[hidden] { display: none; }
@keyframes glassIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-title { font-size: 13px; font-weight: 600; color: #111; }


.glass-body { display: flex; flex-direction: column; gap: 5px; }

/* Шапка плашки: сворачивание слева | формат | название по центру.
   Кнопка сворачивания стоит в ЛЕВОМ верхнем углу окна (решение владельца) —
   так она не сходится с крестиком закрытия в правом верхнем углу экрана. */
.glass-head { display: flex; align-items: center; gap: 10px; }
.head-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.format-switch {
  flex-shrink: 0;
  display: flex;
  gap: 2px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--r-pill);
}
.fmt-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  color: rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.fmt-btn:hover { color: #111; }
.fmt-btn.active { background: #111; color: #fff; }

/* Кнопка сворачивания — левый верхний угол окна (order: -1 ставит её перед
   переключателем формата, разметка в HTML не меняется). */
.glass-toggle {
  order: -1;
  margin-right: 2px;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}
.glass-toggle:hover { background: rgba(0, 0, 0, 0.12); }
.glass-toggle svg { transition: transform 0.25s var(--ease); }
.modal-glass[data-state="open"] .glass-toggle svg { transform: rotate(180deg); }

/* Свёрнутая плашка: видна только верхняя строка */
.modal-glass[data-state="closed"] .glass-body { display: none; }
.modal-glass[data-state="closed"] .glass-foot { display: none; }

/* Теги */
.tag-groups { display: flex; flex-direction: column; gap: 4px; }
.tag-group  { display: flex; align-items: center; gap: 8px; }
.tag-group-title {
  flex-shrink: 0;
  width: 70px;
  color: rgba(0, 0, 0, 0.55);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.55);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tag:hover  { background: rgba(255, 255, 255, 0.85); border-color: rgba(0, 0, 0, 0.2); }
.tag.active { background: #111; color: #fff; border-color: #111; }

/* ============================================================
   УНИКАЛЬНЫЙ ВИЗУАЛЬНЫЙ ЯЗЫК ТЕГОВ НА КАЖДЫЙ СТИЛЬ.
   Селектор: .tag-groups[data-style="SLUG"] .tag — атрибут проставляется в JS.
   У каждого стиля своя кисть: фон, бордюр, радиус, активное состояние.
   ============================================================ */

/* 1. editorial_minimalism — строгий квадрат, тонкий бордюр, чб */
.tag-groups[data-style="editorial_minimalism"] .tag {
  border-radius: 3px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.35);
  color: #111;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.tag-groups[data-style="editorial_minimalism"] .tag:hover  { border-color: #111; background: rgba(0,0,0,0.04); }
.tag-groups[data-style="editorial_minimalism"] .tag.active { background: #111; color: #fff; border-color: #111; }

/* 2. business_3d — объёмная плашка с градиентом, синий премиум */
.tag-groups[data-style="business_3d"] .tag {
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf0fa 100%);
  border: 1px solid rgba(40, 80, 160, 0.22);
  color: #1d3b78;
  box-shadow: 0 1px 2px rgba(30, 60, 140, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}
.tag-groups[data-style="business_3d"] .tag:hover  { transform: translateY(-1px); box-shadow: 0 3px 6px rgba(30,60,140,0.18), inset 0 1px 0 rgba(255,255,255,0.9); }
.tag-groups[data-style="business_3d"] .tag.active {
  background: linear-gradient(180deg, #4a73e8 0%, #2547c4 100%);
  color: #fff;
  border-color: #1d3b9f;
  box-shadow: 0 2px 8px rgba(30, 60, 180, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* 3. paper_collage — неровные углы, dashed бордюр, бежевая бумага */
.tag-groups[data-style="paper_collage"] .tag {
  border-radius: 10px 4px 12px 6px;
  background: #fbf3e3;
  border: 1px dashed rgba(150, 110, 70, 0.5);
  color: #6b4a2b;
  font-family: Georgia, serif;
  font-style: italic;
  box-shadow: 1px 1px 0 rgba(150, 110, 70, 0.15);
}
.tag-groups[data-style="paper_collage"] .tag:nth-child(even) { border-radius: 4px 10px 6px 12px; }
.tag-groups[data-style="paper_collage"] .tag:hover  { background: #f5e8cc; border-style: solid; }
.tag-groups[data-style="paper_collage"] .tag.active { background: #c8956b; color: #fff; border: 1px solid #8d6238; }

/* 4. watercolor — акварельный radial gradient, мягкие пастели */
.tag-groups[data-style="watercolor"] .tag {
  border-radius: 999px;
  background: radial-gradient(ellipse at 30% 30%, #eaf2fa 0%, #cfe1f2 65%, #b6d2ea 100%);
  border: 1px solid rgba(100, 140, 180, 0.25);
  color: #345066;
  box-shadow: 0 2px 8px rgba(140, 180, 220, 0.25);
}
.tag-groups[data-style="watercolor"] .tag:hover  { background: radial-gradient(ellipse at 30% 30%, #dde9f6 0%, #b5d1ec 65%, #92bce0 100%); }
.tag-groups[data-style="watercolor"] .tag.active {
  background: radial-gradient(ellipse at 30% 30%, #8fb8da 0%, #4d83ad 70%, #356a94 100%);
  color: #fff;
  border-color: #4d83ad;
  box-shadow: 0 3px 12px rgba(77, 131, 173, 0.5);
}

/* 5. cinematic — тёмная нуарная, тил-оранж акцент */
.tag-groups[data-style="cinematic"] .tag {
  border-radius: 3px;
  background: rgba(22, 26, 32, 0.88);
  border: 1px solid rgba(240, 175, 90, 0.35);
  color: #f0c987;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.tag-groups[data-style="cinematic"] .tag:hover  { background: rgba(40, 46, 56, 0.92); border-color: #f0c987; }
.tag-groups[data-style="cinematic"] .tag.active {
  background: linear-gradient(180deg, #db8038 0%, #b85d1c 100%);
  color: #fff;
  border-color: #8c4513;
}

/* 6. analog — сепия, плёночная фактура, винтаж */
.tag-groups[data-style="analog"] .tag {
  border-radius: 5px;
  background: #f1e3c6;
  border: 1px solid #c4a878;
  color: #5d4220;
  font-family: "Courier New", monospace;
  font-weight: 600;
  box-shadow: inset 0 0 10px rgba(180, 140, 80, 0.2);
}
.tag-groups[data-style="analog"] .tag:hover  { background: #ead4a4; border-color: #8d6e3d; }
.tag-groups[data-style="analog"] .tag.active {
  background: #8a6238;
  color: #f5ecd9;
  border-color: #5d4220;
  box-shadow: inset 0 0 8px rgba(80, 50, 20, 0.4);
}

/* 7. cartoon — толстый чёрный outline, hard-shadow комикс */
.tag-groups[data-style="cartoon"] .tag {
  border-radius: 999px;
  background: #fff;
  border: 2px solid #111;
  color: #111;
  font-weight: 700;
  box-shadow: 2px 2px 0 #111;
}
.tag-groups[data-style="cartoon"] .tag:hover  { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #111; background: #fffbe6; }
.tag-groups[data-style="cartoon"] .tag.active { background: #ffd84d; color: #111; border-color: #111; box-shadow: 2px 2px 0 #111; }

/* 8. corporate — строгий тёмно-синий, прямые углы */
.tag-groups[data-style="corporate"] .tag {
  border-radius: 2px;
  background: #fff;
  border: 1px solid #1a2942;
  color: #1a2942;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tag-groups[data-style="corporate"] .tag:hover  { background: #eef1f8; }
.tag-groups[data-style="corporate"] .tag.active { background: #1a2942; color: #fff; border-color: #1a2942; }

/* 9. abstract_ai — неоновый glow, тёмно-фиолетовый */
.tag-groups[data-style="abstract_ai"] .tag {
  border-radius: 999px;
  background: rgba(20, 12, 40, 0.85);
  border: 1px solid rgba(140, 180, 255, 0.4);
  color: #c8e0ff;
  font-weight: 500;
  box-shadow: 0 0 8px rgba(140, 180, 255, 0.25), inset 0 0 6px rgba(140, 180, 255, 0.08);
  text-shadow: 0 0 6px rgba(180, 200, 255, 0.5);
}
.tag-groups[data-style="abstract_ai"] .tag:hover  { border-color: rgba(200, 150, 255, 0.7); box-shadow: 0 0 12px rgba(180, 130, 255, 0.4), inset 0 0 8px rgba(180, 130, 255, 0.15); }
.tag-groups[data-style="abstract_ai"] .tag.active {
  background: linear-gradient(135deg, #b537ff 0%, #00c8ff 100%);
  color: #fff;
  border-color: #b537ff;
  box-shadow: 0 0 16px rgba(180, 100, 255, 0.7);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Описание */
.prompt { display: flex; flex-direction: column; gap: 3px; }
.prompt-head { display: flex; align-items: center; gap: 8px; }
.prompt-label { flex-shrink: 0; width: 70px; color: rgba(0, 0, 0, 0.55); }
.prompt-refresh {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  cursor: pointer;
  border: none;
}
.prompt-refresh:hover { background: rgba(0, 0, 0, 0.14); color: #111; }
.prompt-refresh.spin svg { animation: spin 0.5s var(--ease); }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
/* Поле описания + счётчик внутри в правом нижнем углу */
.prompt-field { position: relative; }
.prompt-counter {
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 5px;
  border-radius: 4px;
}
.prompt-text {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px 18px 10px; /* нижний padding больше — место под счётчик */
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  resize: none;
  font: inherit;
  color: #111;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.prompt-text:focus { outline: none; border-color: rgba(0, 0, 0, 0.3); background: rgba(255, 255, 255, 0.85); }

/* Футер: количество + компактная кнопка купить */
.glass-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.qty-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--r-pill);
  padding: 2px;
}
.qty-btn {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  color: rgba(0, 0, 0, 0.6);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
  background: none;
  border: none;
}
.qty-btn.active { background: #111; color: #fff; }

/* Кнопка купить — пилюля, компактная, справа */
.glass-foot .btn-buy {
  margin-left: auto;
  width: auto;
  flex: 0 0 auto;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 71, 0.35);
  transition: background 0.2s ease;
}
.glass-foot .btn-buy:hover { background: var(--accent-hover); }
.glass-foot .btn-buy { flex-shrink: 0; }

/* ===== Оформление (read-only) + Сцены =====
   Окно не должно уезжать за верх экрана при добавлении сцен: высота ограничена
   вьюпортом, шапка (название/формат) и низ (счёт, ↻, «Купить») закреплены,
   а не хватает высоты — прокрутка появляется ТОЛЬКО у блока пузырьков.
   Сцены не сжимаются и не прокручиваются. */
.modal-glass { max-height: calc(100vh - 36px); }
.glass-head, .glass-foot { flex-shrink: 0; }
.glass-body { min-height: 0; overflow: hidden; }
.scene-design-label { color: rgba(0, 0, 0, 0.55); font-size: 13px; font-weight: 500; flex-shrink: 0; }
.tag-groups.readonly .tag { cursor: default; pointer-events: none; }
/* Строка группы: название прижато ВЛЕВО, пузырьки — ВПРАВО и заполняют строку
   от правого края. Что не влезло — переносится ПОШТУЧНО на следующую строку,
   тоже прижатую вправо. Раньше на перенос уходил весь список целиком, и рядом
   с названием оставалась пустая строка — окно теряло высоту зря. */
.tag-groups.readonly { gap: 3px; }
.tag-groups.readonly .tag-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px 6px;
}
.tag-groups.readonly .tag-group-title { width: auto; flex: 0 0 auto; margin: 0 auto 0 0; }
/* display: contents — пузырьки становятся прямыми детьми строки группы и
   переносятся поштучно, а не всем списком. */
.tag-groups.readonly .tag-list { display: contents; }
.tag-groups.readonly .tag { padding: 2px 9px; }
/* пузырьки видны всегда; при нехватке высоты прокручиваются внутри своего блока */
.tag-groups.readonly { min-height: 48px; overflow-y: auto; overscroll-behavior: contain; }

.scenes { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex-shrink: 0; }
.scene-card { width: 100%; display: flex; gap: 8px; align-items: flex-start; position: relative; }
.scene-col { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 8px; }
.scene-num {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.6);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.scene-text {
  flex: 1; min-height: 36px; padding: 6px 28px 6px 10px;
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px; resize: none; font: inherit; color: #111;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.scene-text:focus { outline: none; border-color: rgba(0, 0, 0, 0.3); background: rgba(255, 255, 255, 0.85); }
.scene-del {
  position: absolute; top: 5px; right: 6px; width: 18px; height: 18px;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.5);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.scene-del:hover { background: rgba(0, 0, 0, 0.14); color: #111; }
.scene-add {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: var(--r-pill);
  border: none; cursor: pointer; background: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.6);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; transition: background 0.15s ease, color 0.15s ease;
}
.scene-add:hover { background: rgba(0, 0, 0, 0.12); color: #111; }

/* ↻ обновить сцены — оранжевый кружок в нижнем левом углу окна,
   перед строкой «N сцен × M = K обложек» (решение владельца) */
#scene-refresh { width: 28px; height: 28px; align-self: center; margin-right: 2px; background: var(--accent); color: #fff; }
#scene-refresh:hover { background: var(--accent-hover); color: #fff; }

/* строка «N сцен × M = K обложек» — на одной строке с кнопкой.
   min-width: 0 обязателен: иначе на узком окне строка не сжимается и кнопка
   «Купить» вылезает за правый край окна. */
.scene-summary { font-size: 14px; font-weight: 600; color: #111; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* слова мельче и зауженные; цифры остаются прежнего размера */
.scene-summary .sw { font-size: 13px; letter-spacing: -0.01em; display: inline-block; transform: scaleX(0.94); transform-origin: center; }

/* подсказки-облачка (белый фон) на ↻ / + / ✕ при наведении */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: #fff; color: #111; font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 5px 9px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  pointer-events: none; z-index: 20;
}
[data-tip]:hover::before {
  content: ""; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #fff; pointer-events: none; z-index: 20;
}

/* ===== Чекаут — заменяет стеклянную панель в том же месте viewport ===== */
.checkout {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 380px;
  /* Содержимое кассы (способы оплаты → форма счёта → счёт выставлен) выше окна:
     плашка прижата к низу и росла ВВЕРХ за край экрана — верх (Назад, заголовок,
     скорость, согласие) оказывался недоступен. Ограничиваем высоту + прокрутка. */
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 6;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeUp 0.3s var(--ease);
}
.checkout[hidden] { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.checkout-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
}
.checkout-back:hover { background: rgba(0, 0, 0, 0.06); color: #111; }
.checkout-title { font-size: 13px; font-weight: 600; }
.checkout-sub   { font-size: 13px; color: rgba(0, 0, 0, 0.55); }

.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.channel {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.channel:hover { border-color: rgba(0, 0, 0, 0.3); }
.channel input { position: absolute; opacity: 0; pointer-events: none; }
.channel:has(input:checked) { border-color: #111; background: rgba(255, 255, 255, 0.9); }
.channel-body { display: flex; flex-direction: column; gap: 1px; }
.channel-name { font-size: 13px; font-weight: 600; }
.channel-meta { font-size: 11px; color: rgba(0, 0, 0, 0.5); }
.channel-input { display: flex; flex-direction: column; gap: 6px; }
.channel-input input[type="tel"],
.channel-input input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  font: inherit;
  color: #111;
}
.channel-input input:focus { outline: none; border-color: #111; }
.channel-bind {
  align-self: flex-start;
  padding: 8px 14px;
  background: #111;
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
}
.channel-bind:hover { background: #2a2a2a; }
.checkout-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 107, 71, 0.1);
  border: 1px solid rgba(255, 107, 71, 0.3);
  border-radius: 10px;
  font-size: 12px;
  color: #8a3a1f;
  line-height: 1.4;
}
.checkout-warn svg { flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.checkout .btn-buy {
  align-self: flex-end;
  width: auto;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.checkout .btn-buy:hover { background: var(--accent-hover); }

/* ============================================================
   USE-CASE МОДАЛКА (портфолио сценария)
   Открывается по клику на плитку «Для чего подходит».
   Frame подстраивается под формат сценария: V/S/H. Большая сторона 960px.
   Внутри frame: коллаж миниатюр + 2 стеклянные плашки (сверху и снизу).
   Без кнопки купить — это просмотровое окно.
   ============================================================ */

.usecase-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
}
.usecase-modal[hidden] { display: none; }

.usecase-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: modalFade 0.25s ease;
}

/* Frame окна — фикс размер под формат сценария.
   Большая сторона = 960px, ужимается на узком экране сохраняя пропорции. */
.usecase-frame {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  background: #0a0a0a;
  animation: modalDrop 0.4s var(--ease);
}
.usecase-frame[data-format="v"] {
  width: min(720px, calc((100vh - 48px) * 0.75), calc(100vw - 48px));
  height: min(960px, calc(100vh - 48px));
}
.usecase-frame[data-format="s"] {
  width: min(960px, calc(100vw - 48px), calc(100vh - 48px));
  height: min(960px, calc(100vw - 48px), calc(100vh - 48px));
}
.usecase-frame[data-format="h"] {
  width: min(960px, calc(100vw - 48px));
  height: min(720px, calc((100vw - 48px) * 0.75), calc(100vh - 48px));
}

/* Коллаж — заполняет весь frame, миниатюры с лёгким перехлёстом.
   Grid с маленькими ячейками; каждая миниатюра в своей ячейке с лёгким поворотом. */
.usecase-collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 0;
  padding: 6px;
}
.usecase-frame[data-format="v"] .usecase-collage { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, 1fr); }
.usecase-frame[data-format="s"] .usecase-collage { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); }
.usecase-frame[data-format="h"] .usecase-collage { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr); }

.collage-tile {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transform: rotate(var(--tilt, 0deg)) translate(var(--ox, 0), var(--oy, 0));
  transition: transform 0.3s var(--ease), z-index 0s;
  background: #1a1a1a;
}
.collage-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Верхняя плашка — РАЗДЕЛЁННАЯ: слева крупное название (шрифт под стиль),
   справа компактный Liquid-Glass-переключатель стилей. */
.usecase-top-glass {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none; /* фон не блокирует, активны только дети */
}

/* Название сценария — крупное, на собственной Liquid Glass подложке.
   Шрифт и цвет меняются через [data-style] на frame. */
.usecase-title {
  pointer-events: auto;
  display: inline-block;
  padding: 10px 26px;
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #111;
  max-width: 65%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-pill);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Переключатель стилей — отдельная стеклянная пилюля справа */
.usecase-styles {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.usecase-style-btn {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: transparent;
  color: rgba(0, 0, 0, 0.6);
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.usecase-style-btn:hover  { color: #111; }
.usecase-style-btn.active { background: #111; color: #fff; }

/* Шрифт и цвет названия меняются под выбранный стиль.
   Все варианты — для читаемости на светлой Liquid Glass подложке. */
.usecase-frame[data-style="editorial_minimalism"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #111;
}
.usecase-frame[data-style="business_3d"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  background-image: linear-gradient(180deg, #3a5bdc 0%, #1a2a8c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.usecase-frame[data-style="paper_collage"] .usecase-title {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  color: #6b4a2b;
}
.usecase-frame[data-style="watercolor"] .usecase-title {
  font-family: Georgia, serif;
  font-weight: 400;
  font-style: italic;
  color: #345066;
}
.usecase-frame[data-style="cinematic"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #111;
}
.usecase-frame[data-style="analog"] .usecase-title {
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: #5d4220;
}
.usecase-frame[data-style="cartoon"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111;
  -webkit-text-stroke: 0;
  text-shadow: 3px 3px 0 #ffd84d;
}
.usecase-frame[data-style="corporate"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1a2942;
  text-transform: uppercase;
}
.usecase-frame[data-style="abstract_ai"] .usecase-title {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  background-image: linear-gradient(135deg, #b537ff 0%, #00c8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ Ниши-пузырьки в правом нижнем углу ============
   Без общей подложки — каждый пузырёк сам по себе на коллаже. */
.usecase-niches {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  max-width: calc(100% - 28px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.niche {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--r-pill);
  /* базовая «нейтральная» подача — переопределяется ниже под каждый стиль */
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Пузырьки ниш — копируют визуальный язык тегов под текущий стиль */
.usecase-frame[data-style="editorial_minimalism"] .niche {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #111;
  color: #111;
  font-weight: 400;
}
.usecase-frame[data-style="business_3d"] .niche {
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf0fa 100%);
  border: 1px solid rgba(40, 80, 160, 0.35);
  color: #1d3b78;
  box-shadow: 0 2px 8px rgba(30, 60, 140, 0.35), inset 0 1px 0 rgba(255,255,255,0.9);
}
.usecase-frame[data-style="paper_collage"] .niche {
  border-radius: 10px 4px 12px 6px;
  background: #fbf3e3;
  border: 1px dashed rgba(150, 110, 70, 0.6);
  color: #6b4a2b;
  font-family: Georgia, serif;
  font-style: italic;
  box-shadow: 2px 2px 0 rgba(107, 74, 43, 0.25);
}
.usecase-frame[data-style="paper_collage"] .niche:nth-child(even) { border-radius: 4px 10px 6px 12px; }
.usecase-frame[data-style="watercolor"] .niche {
  border-radius: 999px;
  background: radial-gradient(ellipse at 30% 30%, #eaf2fa 0%, #cfe1f2 65%, #b6d2ea 100%);
  border: 1px solid rgba(100, 140, 180, 0.4);
  color: #345066;
  box-shadow: 0 4px 14px rgba(140, 180, 220, 0.5);
}
.usecase-frame[data-style="cinematic"] .niche {
  border-radius: 3px;
  background: rgba(22, 26, 32, 0.92);
  border: 1px solid rgba(240, 175, 90, 0.5);
  color: #f0c987;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.usecase-frame[data-style="analog"] .niche {
  border-radius: 5px;
  background: #f1e3c6;
  border: 1px solid #c4a878;
  color: #5d4220;
  font-family: "Courier New", monospace;
  font-weight: 600;
  box-shadow: inset 0 0 10px rgba(180, 140, 80, 0.2), 0 4px 10px rgba(0, 0, 0, 0.25);
}
.usecase-frame[data-style="cartoon"] .niche {
  border-radius: 999px;
  background: #fff;
  border: 2px solid #111;
  color: #111;
  font-weight: 700;
  box-shadow: 3px 3px 0 #111;
}
.usecase-frame[data-style="corporate"] .niche {
  border-radius: 2px;
  background: #fff;
  border: 1px solid #1a2942;
  color: #1a2942;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.usecase-frame[data-style="abstract_ai"] .niche {
  border-radius: 999px;
  background: rgba(20, 12, 40, 0.88);
  border: 1px solid rgba(140, 180, 255, 0.5);
  color: #c8e0ff;
  font-weight: 500;
  box-shadow: 0 0 12px rgba(140, 180, 255, 0.4), inset 0 0 8px rgba(140, 180, 255, 0.1);
  text-shadow: 0 0 6px rgba(180, 200, 255, 0.5);
}

/* Кнопка закрытия — правый верх viewport */
.usecase-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  cursor: pointer;
}
.usecase-close:hover { background: rgba(255, 255, 255, 0.85); }

/* Стрелки листания между сценариями «для чего подходит» — на коллаже, без подложки */
.usecase-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s ease;
}
.usecase-nav-prev { left: 8px; }
.usecase-nav-next { right: 8px; }
.usecase-nav:hover { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9)); }
.usecase-nav-prev:hover { transform: translateY(-50%) translateX(-2px); }
.usecase-nav-next:hover { transform: translateY(-50%) translateX(2px); }
.usecase-nav:active { transform: translateY(-50%) scale(0.92); }

/* Курсор на плитках use-case — только у активных (с data-scenario) */
.use-card[data-scenario] { cursor: pointer; }

/* ============ Use-case модалка: мобильная адаптация ============
   На узком экране: frame почти на весь viewport, верх стопкой
   (название + переключатель в столбце), ниши горизонтальным wrap. */
@media (max-width: 700px) {
  /* Сжимаем поля frame до 8px вместо 48px — больше места под контент */
  .usecase-frame[data-format="v"] {
    width: min(720px, calc((100vh - 16px) * 0.75), calc(100vw - 16px));
    height: min(960px, calc(100vh - 16px));
  }
  .usecase-frame[data-format="s"] {
    width: min(960px, calc(100vw - 16px), calc(100vh - 16px));
    height: min(960px, calc(100vw - 16px), calc(100vh - 16px));
  }
  .usecase-frame[data-format="h"] {
    width: min(960px, calc(100vw - 16px));
    height: min(720px, calc((100vw - 16px) * 0.75), calc(100vh - 16px));
  }

  /* Верх: стек, не строка. Название НЕ обрезается. */
  .usecase-top-glass {
    top: 8px;
    left: 8px;
    right: 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .usecase-title {
    font-size: clamp(20px, 7vw, 32px);
    padding: 6px 16px;
    max-width: 100%;
    white-space: nowrap; /* остаётся в одну строку, но фон тянется под текст */
  }
  .usecase-styles {
    align-self: flex-start;
    padding: 2px;
  }
  .usecase-style-btn {
    padding: 4px 10px;
    font-size: 11px;
  }

  /* Ниши: горизонтальный wrap, привязка к правому нижнему */
  .usecase-niches {
    right: 8px;
    bottom: 8px;
    left: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    max-width: none;
  }
  .niche {
    padding: 4px 10px;
    font-size: 11px;
  }
  /* У cartoon тяжёлая тень — на мобильном уменьшаем чтобы не вываливалась */
  .usecase-frame[data-style="cartoon"] .niche { box-shadow: 2px 2px 0 #111; }

  /* Кнопка закрытия — компактнее */
  .usecase-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }
}

/* ============ Cookie-баннер ============ */
.cookie {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-2);
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1; line-height: 1.5; }
.cookie a { color: var(--text); text-decoration: underline; }
/* Две кнопки: «Отказаться» — второстепенная, «Принять» — акцент. */
.cookie-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cookie .btn { padding: 10px 20px; font-size: 14px; }
.cookie .cookie-accept { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.cookie .cookie-accept:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.cookie .cookie-decline { color: var(--text-2); }
.cookie .cookie-decline:hover { color: var(--text); border-color: var(--text); }

/* ============ Адаптив ============ */

@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .use-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .header { padding: 22px 28px; }
  .logo { font-size: 30px; }
  .compare { padding: 36px 28px 24px; }
  .compare-table { display: none; }
  .compare-cards { display: block; }
  .catalog, .how, .use-cases, .faq { padding-left: 28px; padding-right: 28px; }

  .catalog-head { text-align: left; }

  .use-grid { grid-template-columns: repeat(2, 1fr); }

  /* На узких экранах плашка остаётся 380px, но не шире вьюпорта */
  .modal-glass {
    right: 10px;
    bottom: 10px;
    width: min(380px, calc(100vw - 20px));
    padding: 10px 12px;
    gap: 6px;
  }
  /* Касса — по тому же правилу, что панель: не шире и не выше вьюпорта */
  .checkout {
    right: 10px;
    bottom: 10px;
    width: min(380px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .tag-group       { flex-wrap: wrap; gap: 6px; }
  .tag-group-title { width: 100%; }
  .prompt-head     { flex-wrap: wrap; }
  .prompt-label    { width: 100%; }

  .footer { padding: 32px 28px 20px; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
  .header { padding: 16px 20px; }
  .logo { font-size: 22px; }
  .compare { padding: 28px 20px 20px; }
  .cc-opt { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cc-val { text-align: left; }
  .catalog, .how, .use-cases, .faq { padding-left: 20px; padding-right: 20px; }

  .steps { grid-template-columns: 1fr; gap: 16px; }
  .use-grid { grid-template-columns: 1fr; }

  .channels { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 20px; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .footer { padding: 32px 20px 20px; }

  .cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .cookie-actions { width: 100%; }
  .cookie .btn { flex: 1; }
}

/* ============================================================
   Журнал (публичная витрина coverpress.pro/journal)
   Список карточек 2/1 кол + страница статьи + «Читайте также».
   ============================================================ */
.jr-wrap { max-width: 1040px; margin: 0 auto; padding: 8px 24px 64px; }
.jr-head { text-align: center; padding: 24px 0 32px; }
.jr-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 300; letter-spacing: -0.02em; }
.jr-head p { color: var(--text-2); margin-top: 12px; font-size: 17px; }

.jr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.jr-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; text-decoration: none; transition: transform .3s ease, box-shadow .3s ease; }
.jr-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.1); }
.jr-card.jr-hidden { display: none; }
.jr-img { height: 200px; background: linear-gradient(135deg,#eef1f4,#e2e6ea); background-size: cover; background-position: center; }
.jr-img--empty { display: flex; align-items: center; justify-content: center; color: #aab; font-size: 13px; }
.jr-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.jr-title { font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.35; }
.jr-excerpt { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.jr-more { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.jr-loadmore { text-align: center; margin-top: 36px; }
.jr-loadmore button { font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); background: none; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 10px 22px; cursor: pointer; }
.jr-loadmore button:hover { border-color: var(--text); color: var(--text); }
.jr-empty { text-align: center; padding: 60px 20px; color: var(--text-3); font-size: 15px; }

/* — страница статьи — */
.jr-article { max-width: 760px; margin: 0 auto; padding: 8px 24px 72px; }
.jr-crumbs { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
.jr-crumbs a { color: var(--text-3); text-decoration: none; }
.jr-crumbs a:hover { color: var(--accent); }
.jr-hero-img { height: 320px; border-radius: 16px; background: linear-gradient(135deg,#eef1f4,#e2e6ea); background-size: cover; background-position: center; position: relative; }
.jr-hero-img.jr-img--empty { display: flex; align-items: center; justify-content: center; }
.jr-hero-counter { position: absolute; right: 14px; bottom: 14px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: var(--r-pill); }
.jr-hero-share { position: absolute; right: 14px; top: 14px; background: #fff; color: var(--text); font: inherit; font-size: 12px; padding: 6px 12px; border: none; border-radius: var(--r-pill); box-shadow: 0 4px 12px rgba(0,0,0,.12); cursor: pointer; }
.jr-hero-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.jr-prev { left: 14px; }
.jr-next { right: 14px; }
.jr-article h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; margin-top: 24px; }
.jr-date { color: var(--text-3); font-size: 14px; margin-top: 10px; }
.jr-content { margin-top: 8px; }
.jr-content h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; margin-top: 30px; }
.jr-content h3 { font-size: 19px; font-weight: 600; margin-top: 24px; }
.jr-content p { color: var(--text); line-height: 1.75; margin-top: 14px; font-size: 16px; }
.jr-content ul { margin-top: 14px; padding-left: 22px; color: var(--text); line-height: 1.7; }
.jr-content li { margin-top: 4px; }
.jr-content a { color: var(--accent); }
.jr-content table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.jr-content th, .jr-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.jr-content th { background: #fafafa; font-weight: 600; }
.jr-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.jr-foot-actions { display: flex; gap: 10px; }
.jr-foot-actions button, .jr-foot a { font: inherit; font-size: 14px; color: var(--text-2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 8px 14px; text-decoration: none; background: none; cursor: pointer; }
.jr-foot-actions button:hover, .jr-foot a:hover { border-color: var(--text); color: var(--text); }
.jr-related { margin-top: 48px; }
.jr-related-title { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 18px; }

@media (max-width: 767px) {
  .jr-grid { grid-template-columns: 1fr; }
  .jr-img { height: 180px; }
  .jr-loadmore button { width: 100%; max-width: 320px; min-height: 48px; font-size: 16px; }
  .jr-hero-img { height: 220px; }
  .jr-foot-actions button, .jr-foot a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ============================================================
   Аккаунт: окно входа по email-коду + меню залогиненного
   ============================================================ */
/* overflow-y + margin:auto у окна: на смартфоне горизонтально (390px высоты)
   окно регистрации выше экрана, и без прокрутки кнопка «Зарегистрироваться»
   недосягаема. margin:auto центрирует так же, как align-items, но верх окна
   при этом не срезается. На высоких экранах вид не меняется. */
.acc-ov { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.acc-box { width: 330px; max-width: 100%; margin: auto; background: #fff; border-radius: var(--r-card); box-shadow: 0 32px 80px rgba(0,0,0,.32); padding: 26px 20px 22px; position: relative; }
.acc-x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: none; background: none; font-size: 22px; line-height: 1; color: var(--text-3); cursor: pointer; border-radius: 8px; }
.acc-x:hover { background: #f2f2f2; }
.acc-box h3 { font-size: 22px; font-weight: 300; letter-spacing: -0.02em; }
.acc-box p { color: var(--text-2); font-size: 14px; margin-top: 8px; line-height: 1.5; }
.acc-inp { width: 100%; margin-top: 16px; padding: 12px 14px; font-size: 15px; border: 1px solid var(--border); border-radius: 12px; font-family: inherit; }
.acc-inp:focus { outline: none; border-color: var(--accent); }
.acc-err { color: #d14a2a; font-size: 13px; min-height: 18px; margin-top: 8px; }
.acc-btn { display: block; width: auto; min-width: 170px; margin: 16px auto 0; padding: 13px 32px; font: inherit; font-size: 15px; font-weight: 600; color: #fff; background: var(--accent); border: none; border-radius: var(--r-pill); cursor: pointer; }
.acc-btn:hover { background: var(--accent-hover); }
.acc-btn:disabled { opacity: .6; cursor: default; }
.acc-captcha-wrap { margin-top: 16px; }
.acc-code { letter-spacing: 6px; font-size: 18px; text-align: center; }
.acc-link { display: block; width: 100%; margin-top: 12px; background: none; border: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
@media (max-width: 480px) { .acc-box { padding: 24px 18px 22px; } }

.acc-pop { position: absolute; z-index: 1000; min-width: 200px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 6px; }
.acc-pop-email { padding: 8px 12px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border); margin-bottom: 4px; word-break: break-all; }
.acc-pop-item { display: block; width: 100%; text-align: left; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--text); background: none; border: none; border-radius: 8px; cursor: pointer; text-decoration: none; }
.acc-pop-item:hover { background: #f5f5f5; }
.acc-pop-logout { color: #d14a2a; }

/* ============================================================
   Личный кабинет (lk.html)
   ============================================================ */
/* Apple-стиль (сгруппированные списки) + брендбук. 3 блока: Заказы / Доставка / Аккаунт. */
.lk-wrap { max-width: 760px; margin: 0 auto; padding: 30px 20px 80px; }
.lk-loading, .lk-muted { color: #a1a1a6; font-size: 14px; padding: 10px 2px; }
.lk-guest { text-align: center; padding: 80px 20px; }
.lk-guest h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 300; letter-spacing: -0.02em; }
.lk-guest p { color: #6e6e73; margin: 12px 0 24px; font-size: 16px; }

.lk-title { font-size: 26px; font-weight: 600; letter-spacing: -0.022em; margin: 0; color: #1d1d1f; }
.lk-sub { color: #6e6e73; font-size: 14px; margin: 5px 0 24px; }

/* кнопка */
.lk-btn { display: inline-block; font: inherit; font-size: 14px; font-weight: 600; padding: 11px 20px; border-radius: 100px; border: none; cursor: pointer; background: #FF6B47; color: #fff; text-decoration: none; }
.lk-btn:hover { background: #E85A37; }

/* группа */
.lk-grp-lbl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #a1a1a6; margin: 0 0 7px 18px; }
.lk-grp { background: #fff; border: 1px solid rgba(0,0,0,.045); box-shadow: 0 1px 2px rgba(0,0,0,.035); border-radius: 18px; overflow: hidden; margin-bottom: 20px; }
.lk-empty { color: #6e6e73; font-size: 14px; line-height: 1.55; padding: 18px; }

/* заказ — одинаковая сетка; иконки справа */
.lk-ord { display: grid; grid-template-columns: 40px 1fr auto; gap: 0 13px; align-items: center; padding: 11px 16px; position: relative; }
.lk-ord + .lk-ord::before { content: ""; position: absolute; left: 69px; right: 0; top: 0; height: 1px; background: rgba(0,0,0,.08); }
.lk-sw { width: 40px; height: 40px; border-radius: 11px; }
.lk-ob { min-width: 0; }
.lk-oname { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; line-height: 1.3; color: #1d1d1f; }
.lk-ometa { margin-top: 3px; font-size: 13px; color: #a1a1a6; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lk-ometa .st { font-weight: 600; }
.lk-st-ok { color: #1c8a3a; } .lk-st-work { color: #FF6B47; } .lk-st-exp { color: #a1a1a6; }
.lk-oacts { display: flex; gap: 2px; justify-content: flex-end; margin-right: -6px; }
.lk-act { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: none; background: none; border-radius: 10px; cursor: pointer; color: #6e6e73; transition: background .15s, color .15s; }
.lk-act svg { width: 18px; height: 18px; }
.lk-act:hover { background: rgba(0,0,0,.05); color: #1d1d1f; }
.lk-act.dl { color: #FF6B47; }
.lk-act.dl:hover { background: rgba(255,107,71,.12); color: #FF6B47; }
.lk-act.off { color: #c7c7cc; cursor: default; pointer-events: none; }

/* доставка + аккаунт — две колонки */
.lk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lk-two .lk-grp { margin-bottom: 0; }
.lk-line { display: flex; align-items: center; gap: 13px; padding: 12px 16px; position: relative; background: none; border: none; width: 100%; text-align: left; font: inherit; color: #1d1d1f; cursor: pointer; }
.lk-line + .lk-line::before { content: ""; position: absolute; left: 52px; right: 0; top: 0; height: 1px; background: rgba(0,0,0,.08); }
.lk-line.plain + .lk-line::before, .lk-line + .lk-line.plain::before { left: 16px; }
.lk-line:hover { background: rgba(0,0,0,.022); }
.lk-line .ico { width: 20px; height: 20px; stroke: #6e6e73; flex: none; }
.lk-line .t { flex: 1; font-size: 15px; }
.lk-line .chev { width: 17px; height: 17px; stroke: #a1a1a6; flex: none; }
.lk-line.danger .t { color: #d70015; }
.lk-line.danger:hover { background: rgba(215,0,21,.05); }
.lk-toggle { width: 46px; height: 28px; border-radius: 14px; background: #e4e4e8; position: relative; flex: none; transition: background .2s; cursor: pointer; }
.lk-toggle.on { background: #FF6B47; }
.lk-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: left .2s; }
.lk-toggle.on::after { left: 20px; }

/* Поповер «в подборку» (библиотека + кабинет) */
.coll-pop { position: absolute; z-index: 1100; min-width: 240px; max-width: 280px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.16); padding: 8px; }
.coll-pop-title { padding: 6px 10px 8px; font-size: 12px; color: var(--text-3); }
.coll-pop-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.coll-pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: none; background: none; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.coll-pop-item:hover { background: #f5f5f5; }
.coll-pop-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong, #ccc); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; }
.coll-pop-item.on .coll-pop-check { background: var(--accent); border-color: var(--accent); }
.coll-pop-item .coll-pop-check svg { opacity: 0; }
.coll-pop-item.on .coll-pop-check svg { opacity: 1; }
.coll-pop-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-pop-new { width: 100%; margin-top: 6px; padding: 9px 10px; border-top: 1px solid var(--border); border-left: none; border-right: none; border-bottom: none; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left; }
.coll-pop-new:hover { background: rgba(255,107,71,.08); }
.coll-pop-newrow { display: flex; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.coll-pop-newrow input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border-strong, #ccc); border-radius: 8px; font: inherit; font-size: 14px; }
.coll-pop-newrow input:focus { outline: none; border-color: var(--accent); }
.coll-pop-newrow button { border: none; background: var(--accent); color: #fff; border-radius: 8px; padding: 0 12px; font: inherit; font-size: 14px; cursor: pointer; }

@media (max-width: 680px) {
  .lk-two { grid-template-columns: 1fr; gap: 0; }
  .lk-two .lk-grp { margin-bottom: 20px; }
  .lk-two .lk-grp:last-child { margin-bottom: 0; }
  .lk-ord { grid-template-columns: 38px 1fr; align-items: start; gap: 0 12px; }
  .lk-sw { width: 38px; height: 38px; }
  .lk-oacts { grid-column: 2; justify-content: flex-end; margin-top: 6px; margin-right: -6px; }
  .lk-ord + .lk-ord::before { left: 64px; }
}

/* ============ Касса: скорость + согласие (strategy-offer-scenes §9) ============ */
.checkout-speed-wrap { margin: 16px 0 12px; }
.checkout-speed-title { font-size: 13px; color: #666; margin-bottom: 8px; }
.checkout-speed { display: flex; gap: 8px; }
.speed-opt { flex: 1; display: flex; flex-direction: column; gap: 2px; align-items: center;
  padding: 10px 8px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fff;
  cursor: pointer; transition: border-color .2s, background .2s; font: inherit; }
.speed-opt:hover { border-color: #FF6B47; }
.speed-opt.is-active { border-color: #FF6B47; background: #FFF3F0; }
.speed-name { font-size: 13px; font-weight: 500; color: #111; }
.speed-eta { font-size: 11px; color: #999; }
.speed-sum { font-size: 14px; font-weight: 600; color: #FF6B47; }
/* Согласие: попадать нужно строкой, а не квадратиком. Вся строка — <label>,
   поэтому клик по тексту ставит галочку; ссылки на оферту и политику при этом
   открываются сами (клик по ним галочку не трогает). Квадратик — стандартные
   20 px: прежние ~13 px требовали целиться, особенно на смартфоне. */
.checkout-consent { display: flex; gap: 10px; align-items: center; margin: 2px 0 4px;
  padding: 6px 12px; margin-left: -12px; border-radius: 12px;
  background: rgba(255, 107, 71, .06);
  font-size: 12px; color: #666; cursor: pointer; -webkit-user-select: none; user-select: none;
  transition: background .2s cubic-bezier(0.16, 1, 0.3, 1); }
.checkout-consent[hidden] { display: none; }   /* иначе display:flex перебивает [hidden] */
.checkout-consent:hover { background: rgba(255, 107, 71, .10); }
.checkout-consent input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0;
  accent-color: #FF6B47; cursor: pointer; }
/* Ссылки кликаются сами по себе — выделение текста внутри них разрешаем. */
.checkout-consent a { color: #FF6B47; user-select: text; }

/* ---- Промокод (ТЗ tz-promokody-kampaniy.md §6-в) -----------------------------
   Строка сразу под ценой, выше срочности и способов оплаты. Кнопки нет — код
   применяется сам по вводу полного формата; статус — иконка внутри поля, поле
   зеленеет или краснеет. Перенос 1:1 из утверждённого образца
   preview-promo-kassa.html. */
.promo-row { position: relative; margin: 6px 0 0; }
.promo-row[hidden] { display: none; }
.promo-row .promo-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 18px;
  font-weight: 600; letter-spacing: .05em; padding: 12px 44px 12px 14px; color: #111;
  border: 1.5px solid #FF6B47; background: rgba(255,107,71,.05); border-radius: 12px; }
.promo-row .promo-input::placeholder { font-size: 17px; font-weight: 500; letter-spacing: 0;
  color: #b45; opacity: .7; }
.promo-row .promo-input:focus { outline: none; background: #fff; }
.promo-ic { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: none; }
.promo-row.is-ok .promo-input { border-color: #34C759; background: rgba(52,199,89,.08); color: #1f7a37; }
.promo-row.is-error .promo-input { border-color: #FF3B30; background: rgba(255,59,48,.06); color: #FF3B30; }
.promo-row.is-ok .promo-ic.ok, .promo-row.is-error .promo-ic.err { display: block; }

/* ---- Способ оплаты: 3 плитки (перенос блока BOTIX billing/checkout.php) ---- */
.pay-methods-title { font-size: 13px; color: #666; margin: 4px 0 3px; }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
/* display:flex сильнее атрибута [hidden] из UA-стилей — без этого правила блок
   не скрывался и плитки оплаты оставались на экране формы/выставленного счёта. */
.pay-methods[hidden] { display: none; }
.pay-tile { display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border: 1px solid #e5e5e5; border-radius: 14px; background: #fff;
  cursor: pointer; font: inherit; text-align: left;
  transition: border-color .2s, background .2s, transform .2s; }
.pay-tile:hover { border-color: #FF6B47; transform: translateY(-1px); }
.pay-tile .pt-icon { width: 26px; height: 26px; flex-shrink: 0; }
.pay-tile .pt-icon svg { width: 100%; height: 100%; }
.pay-tile .pt-body { flex-shrink: 0; }
.pay-tile .pt-body-grow { flex: 1; min-width: 0; }
.pay-tile .pt-name { display: block; font-size: 15px; font-weight: 600; color: #111; line-height: 1.2; }
.pay-tile .pt-sub { display: block; font-size: 12px; color: #999; margin-top: 2px; }
.pay-tile .pt-cta { width: 16px; height: 16px; flex-shrink: 0; color: #999; margin-left: auto; }
.pay-tile .pt-cta svg { width: 100%; height: 100%; }
.pay-tile .pt-repair { width: 15px; height: 15px; flex-shrink: 0; color: #999; }
.pay-tile .pt-repair svg { width: 100%; height: 100%; }
.pay-tile.tile-sbp  .pt-icon { color: #34C759; }
.pay-tile.tile-card .pt-icon { color: #FF6B47; }
.pay-tile.tile-bill .pt-icon { color: #999; }
.pay-tile.is-soon { background: #fafafa; }
.pay-tile.is-soon .pt-name { color: #666; }
.pay-tile .pay-marks { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pay-tile .pay-mark { display: inline-flex; align-items: center; justify-content: center;
  height: calc(20px * var(--icon-scale, 1)); max-height: 34px; }
.pay-tile .pay-mark img,
.pay-tile .pay-mark svg { height: 100%; width: auto; display: block; }

/* ---- Счёт юр.лицу: форма плательщика ---- */
.invoice-form-title { font-size: 17px; font-weight: 500; color: #111; margin: 10px 0 4px; }
.invoice-form-sub { font-size: 13px; color: #666; margin: 0 0 14px; }
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* min-width:0 обязателен: собственная минимальная ширина <input> шире колонки 1fr,
   из-за неё форма вылезала за правый край плашки 380px (поля обрезались). */
.inv-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #666;
  min-width: 0; }
.inv-field.inv-col-2 { grid-column: 1 / -1; }
.inv-field input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #e5e5e5;
  border-radius: 12px; font: inherit; font-size: 14px; color: #111; background: #fff; }
.inv-field input:focus { outline: none; border-color: #FF6B47; }

/* ---- Верх кассы: заказ (стиль · сцены · обложки · сумма) + срочность ----
   Цена показывается один раз — в строке «К оплате». Компактно, чтобы окно
   помещалось без прокрутки на низких экранах. */
.ord { margin: 0 0 12px; }
.ord-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 9px; padding-left: 8px; padding-right: 34px; }
.ord-style { font-size: 17px; font-weight: 500; color: #111; letter-spacing: -0.01em; }
.ord-sum { font-size: 24px; font-weight: 700; color: #111; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ord-sum .rub { font-size: 13px; font-weight: 500; color: #666; margin-left: 3px; }
/* Крестик закрытия кассы — в углу окна, строку не занимает (решение владельца
   2026-08-11: кнопка «Назад» убрана, закрытие всегда крестиком). */
.checkout-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%;
  background: rgba(0,0,0,.05); color: #666; cursor: pointer; }
.checkout-x:hover { background: rgba(0,0,0,.1); color: #111; }
.ord-meta { font-size: 13px; color: #8a8a8e; margin-top: 2px; }
/* Персональные условия клиента в кассе (скидка % / своя цена) */
.ord-discount {
  margin-top: 6px; font-size: 13px; font-weight: 600;
  color: #FF6B47;
}
/* Бесплатный заказ: вместо плиток оплаты одна кнопка */
.pay-free-btn {
  width: 100%; padding: 14px 24px; border: none;
  border-radius: 100px; background: #FF6B47; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.pay-free-btn:hover { background: #E85A37; }
.pay-free-btn:active { background: #D14A2A; }
.pay-free-btn:disabled { opacity: .6; cursor: default; }

.term-title { font-size: 12.5px; color: #8a8a8e; margin: 6px 0 4px; }
.checkout-speed { display: flex; gap: 8px; margin-bottom: 14px; }
.term-btn { flex: 1; padding: 9px 4px; border: 1px solid var(--border, #e5e5e5); background: #fff;
  border-radius: 12px; font: inherit; font-size: 13.5px; color: #444; cursor: pointer;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.term-btn:hover { border-color: #c9c9c9; }
.term-btn.is-active { border-color: #FF6B47; background: rgba(255,107,71,.08); color: #111; font-weight: 500; }
/* «Живые» кнопки срочности: волна слева направо — плитка подрастает и на миг
   загорается коралловым, чтобы клиент увидел, что срок можно выбрать. Выбранную
   плитку не трогаем: у неё постоянный коралловый фон, мигание сбивало бы с толку. */
@keyframes termPulse {
  0%, 16%, 100% { transform: scale(1);    background: #fff;                  border-color: var(--border, #e5e5e5); }
  6%            { transform: scale(1.06); background: rgba(255,107,71,.16);   border-color: #FF6B47; }
}
.term-btn:not(.is-active) { animation: termPulse 4.2s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.term-btn:nth-child(1) { animation-delay: 0s; }
.term-btn:nth-child(2) { animation-delay: 0.5s; }
.term-btn:nth-child(3) { animation-delay: 1s; }
.term-btn:hover { animation: none; }   /* навёл — мигание не мешает выбирать */
@media (prefers-reduced-motion: reduce) { .term-btn { animation: none; } }

/* Способ оплаты пока не подключён — плитка заблокирована, логотипы остаются */
.pay-tile.is-off { opacity: .45; cursor: default; }
.pay-tile.is-off:hover { border-color: var(--border, #e5e5e5); box-shadow: none; transform: none; }

/* Подсказка под БИК: найденный банк из справочника ЦБ РФ (копия справочника BOTIX) */
.inv-bic-hint { font-size: 11px; line-height: 1.35; color: #999; }
.inv-bic-hint.is-ok { color: #1E9E5A; }
.inv-bic-hint.is-warn { color: #d97706; }
.inv-bic-hint[hidden] { display: none; }
.inv-err { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px;
  background: #FFF3F0; color: #D14A2A; font-size: 13px; }
#inv-submit { margin-top: 14px; }
@media (max-width: 560px) { .inv-grid { grid-template-columns: 1fr; } }

/* ---- Счёт выставлен: номер/дата/срок, сумма, назначение, реквизиты, QR ----
   Данные приходят в ответе POST /v1/billing/invoice, рисует style-modal.js. */
.invoice-done { display: flex; flex-direction: column; gap: 12px; }
.invoice-done[hidden] { display: none; }
.inv-done-head { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; }
.inv-done-mark { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: #E8F7EE; color: #1E9E5A; display: inline-flex; align-items: center;
  justify-content: center; }
.inv-done-title { font-size: 17px; font-weight: 600; color: #111; line-height: 1.2; }
.inv-done-num { font-size: 13px; color: #666; margin-top: 2px; }
.inv-done-rows { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  background: #fafafa; border-radius: 14px; }
.inv-done-row { display: flex; gap: 10px; font-size: 13px; }
.inv-done-row .idr-label { flex-shrink: 0; width: 96px; color: #999; font-size: 12px; }
.inv-done-row .idr-value { flex: 1; min-width: 0; color: #111; word-break: break-word; }
.inv-done-row.idr-wide { flex-direction: column; gap: 3px; }
.inv-done-row.idr-wide .idr-label { width: auto; }
.inv-done-row .idr-sum { font-size: 15px; font-weight: 600; }
.inv-done-row .idr-words,
.inv-done-row .idr-line { display: block; font-size: 12px; color: #666; }
.inv-done-pay { display: flex; align-items: center; gap: 14px; }
/* QR не сжимать: во флексе картинка ужималась по ширине и становилась прямоугольной */
.inv-done-qr { flex: 0 0 auto; }
.inv-done-qr img { display: block; width: 128px; height: 128px; aspect-ratio: 1 / 1;
  object-fit: contain; border-radius: 8px; background: #fff; }
.inv-done-qr .inv-qr-empty { width: 128px; padding: 10px; border: 1px dashed #e5e5e5;
  border-radius: 8px; font-size: 11px; color: #999; text-align: center; }
.inv-done-qr-note { font-size: 12px; color: #666; line-height: 1.45; }
.checkout a.inv-print { align-self: stretch; text-align: center; text-decoration: none; }
.inv-done-note { margin: 0; font-size: 12px; color: #999; line-height: 1.45; }

/* Как происходит оплата — блок под плитками (1:1 с BOTIX) */
.pay-how { margin-top: 8px; padding: 10px 14px; background: #fafafa; border-radius: 14px; }
.pay-how-title { font-size: 13px; font-weight: 600; color: #111; margin-bottom: 10px; }
.pay-how-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-how-steps li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #666; }
.pay-how-steps .n { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 1px solid #e5e5e5; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600; color: #FF6B47; }
.pay-how-note { margin: 10px 0 0; font-size: 12px; color: #999; }

/* ============================================================
   ЮРИДИЧЕСКИЕ СТРАНИЦЫ (oferta / privacy / terms / cookie)
   Текст приходит из админки через /v1/documents/{key} — вёрстка
   переиспользует типографику журнала (.jr-article / .jr-content).
   ============================================================ */
.legal-loading { color: var(--text-3); }
.legal-error { color: var(--text-3); }

/* ============================================================
   ЛОГОТИПЫ ПЛАТЁЖНЫХ СИСТЕМ В ПОДВАЛЕ
   Приходят из админки через /v1/payment-logos (assets/js/payment-logos.js).
   min-height у .footer-pay держит высоту до загрузки — подвал не «прыгает».
   Масштаб каждой карты — CSS-переменная --icon-scale (1.0 = 100%), как в BOTIX.
   ============================================================ */
/* Высота карты растёт вместе с масштабом (1:1 с BOTIX .footer-card):
   иначе логотип с scale > 100% клипался бы, и ползунок «Размер» в админке
   терял эффект. Потолок 84px согласован с PaymentLogosService::SIZE_MAX = 300%. */
#footer-pay { min-height: 28px; }
.pay-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(28px * var(--icon-scale, 1));
  max-height: 84px;
  width: auto;
  line-height: 1;
  text-decoration: none;
}
.pay-logo > img,
.pay-logo > svg {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
}


/* ============================================================
   ОКНО СТИЛЯ НА МАЛЫХ ЭКРАНАХ — идёт последним, чтобы перебить
   общее правило .modal-glass { max-height: calc(100vh - 36px) }.
   ============================================================ */

/* Смартфон-портрет: окно — шторка не выше 56 % экрана, сверху остаётся
   полотно обложек. Середина (пузырьки + сцены) прокручивается целиком,
   шапка и нижняя строка закреплены. */
@media (max-width: 699px) and (orientation: portrait) {
  .modal-glass,
  .checkout { max-height: 56vh; }
  .modal-glass .glass-body { overflow-y: auto; overscroll-behavior: contain; }
  .tag-groups.readonly { overflow: visible; flex-shrink: 0; }
  /* Окно доходит до правого верхнего угла экрана — освобождаем место под
     крестик закрытия, чтобы название стиля под него не заезжало. */
  .head-title { padding-right: 30px; }
}

/* Смартфон-альбом: высота окна — экран минус поля, середина прокручивается. */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-glass,
  .checkout { max-height: calc(100vh - 20px); }
  .modal-glass .glass-body { overflow-y: auto; overscroll-behavior: contain; }
  .tag-groups.readonly { overflow: visible; flex-shrink: 0; }
  .head-title { padding-right: 30px; }
}


/* ============================================================
   КАТАЛОГ НА ГЛАВНОЙ — одна раскладка на десктопе и планшете
   (3 колонки), меняется только на смартфоне.
   ============================================================ */

/* Смартфон вертикально — 2 колонки. */
@media (max-width: 699px) and (orientation: portrait) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Смартфон горизонтально — 4 колонки (на двух плитки были бы огромными). */
@media (max-height: 500px) and (orientation: landscape) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* Плитка способа оплаты в ремонте: крупная явная метка вместо мелкой иконки */
.pay-tile.is-off { position: relative; opacity: 1; }
.pay-tile.is-off .pt-name,
.pay-tile.is-off .pt-sub,
.pay-tile.is-off .pay-marks,
.pay-tile.is-off .pt-icon { opacity: .35; }
.pay-tile.is-off .pt-cta { display: none; }
.pt-repair-label {
  margin-left: auto; padding: 4px 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #C62A2F; background: #FEF2F2; border: 1px solid #F1B4B6; border-radius: 100px;
  white-space: nowrap;
}

/* ============================================================
   СМАРТФОН: поля ввода не мельче 16px
   Safari на iPhone автоматически зумит страницу при фокусе в поле с кеглем
   меньше 16px — масштаб съезжает, и окно (регистрация, касса, счёт юрлицу)
   выглядит разломанным. Лечим кеглем полей: <meta viewport> не трогаем,
   ручной зум для слабовидящих обязан работать.
   Условие — то же, что у нижней панели (assets/css/mobile-bar.css).
   ============================================================ */
@media (max-width: 734px), (max-height: 500px) and (max-width: 940px) {
  /* :not(...) в селекторе — не украшение: поля набраны классами
     (.acc-inp 15px, .inv-field input 14px), и голый `input` их не перебил бы.
     Здесь вес такой же, как у них, а правило идёт последним в файле. */
  input:not([type="hidden"]),
  select:not([hidden]),
  textarea:not([hidden]) { font-size: 16px; }
}
