/* ============================================
   Твой русский копирайтер — дизайн-система
   Современный минимализм: белый фон, синий акцент,
   крупная типографика, скругления. Без веб-шрифтов.
   ============================================ */

:root {
  --blue: #0077ff;
  --blue-dark: #0063d6;
  --blue-tint: #ebf3ff;
  --ink: #0e1a2b;
  --text: #1d2939;
  --muted: #667085;
  --border: #e5eaf1;
  --bg-alt: #f6f8fb;
  --danger: #d92d20;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: #fff;
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

[hidden] { display: none !important; }

/* --- Шапка --- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.head-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  color: var(--blue);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.brand-name { font-size: 16px; font-weight: 500; color: var(--ink); }

.head-actions { display: flex; align-items: center; gap: 22px; }

.link-muted { color: var(--text); font-weight: 500; }
.link-muted:hover { color: var(--blue); text-decoration: none; }

/* --- Кнопки --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 12px;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  padding: 13px 26px;
}
.btn-primary:hover {
  background: var(--blue-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 119, 255, .22);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-sm { font-size: 15px; padding: 10px 20px; border-radius: 10px; }

.btn-lg { font-size: 18px; padding: 16px 32px; }

.btn-block { width: 100%; }

.btn-soft {
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 10px;
}
.btn-soft:hover { background: #ddebff; text-decoration: none; }

/* --- Первый экран --- */

.hero { padding: 64px 0 44px; }

/* Центрированный hero: полный фокус на вводе (макет №2) */
.hero-center {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-center h1 { margin: 0 auto; }

.hero-center .hero-sub {
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
}

.composer-hero {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.composer-hero textarea { min-height: 150px; font-size: 17px; }

.btn-hero {
  margin-top: 18px;
  min-width: 320px;
}

.hero-center .error-hint { margin-top: 10px; }

/* (старая двухколоночная сетка hero больше не используется) */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: start;
}

h1 {
  color: var(--ink);
  font-size: clamp(42px, 5.4vw, 66px);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.04;
}

.accent { color: var(--blue); }

.hero-sub {
  margin: 22px 0 28px;
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}

/* Поле ввода */

.composer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 119, 255, .12), 0 8px 24px rgba(16, 24, 40, .08);
}

.composer textarea {
  display: block;
  width: 100%;
  border: none;
  background: none;
  resize: none;
  padding: 18px 20px 6px;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  min-height: 132px;
}
.composer textarea::placeholder { color: #98a2b3; }
.composer textarea:focus { outline: none; }

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px 14px;
}

.mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
}
.mic-btn:hover { color: var(--blue); background: var(--blue-tint); }
.mic-btn.recording { color: var(--danger); }
.mic-btn.recording svg { animation: micPulse 1.2s ease-in-out infinite; }

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

.char-count { font-size: 14px; color: #98a2b3; }

.hero .btn-lg { margin-top: 16px; }

.hero-note {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.hero-meta {
  margin-top: 26px;
  text-align: center;
  font-size: 15px;
  color: var(--text);
}
.hero-meta a { font-weight: 600; }

.error-hint { color: var(--danger); font-size: 14px; margin-top: 10px; }

/* Карточка прогресса */

.progress-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 26px 28px 24px;
}

.pc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.pc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
  animation: dotPulse 1.6s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.pc-sub { color: var(--muted); font-size: 14px; margin: 4px 0 18px 18px; }

.pc-list { list-style: none; }

.pc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text);
}

.pc-item.done .pc-state { background: var(--blue); border-color: var(--blue); }
.pc-item.active { color: var(--blue); font-weight: 600; }
.pc-item.pending { color: var(--muted); }

.pc-state {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d0d7e2;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.pc-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--blue-tint);
  border-top-color: var(--blue);
  flex: none;
  animation: spin 0.9s linear infinite;
}

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

.pc-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.pc-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--blue-tint);
  overflow: hidden;
}

.pc-bar > span {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: 3px;
  background: var(--blue);
}

.pc-percent { font-weight: 700; color: var(--blue); font-size: 15px; }

/* --- Площадки --- */

.platforms { padding: 26px 0 64px; }

.platforms-title {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  position: relative;
  margin-bottom: 28px;
}
.platforms-title::before,
.platforms-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 190px);
  height: 1px;
  background: var(--border);
}
.platforms-title::before { left: 0; }
.platforms-title::after { right: 0; }

.platforms-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.pf {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}

.pf-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* --- Секции --- */

.section { padding: 72px 0; }
.section-alt { background: #f7f4ee; }

h2 {
  color: var(--ink);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-sub { color: var(--muted); font-size: 17px; max-width: 560px; margin-bottom: 40px; }

/* Шаги */

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

.step-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step-card b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.step-card p { color: var(--muted); font-size: 15px; }

/* Форматы */

.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

.format-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.fmt-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.format-card b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.format-card ul { list-style: none; }
.format-card li { color: var(--muted); font-size: 15px; padding: 3px 0; }

/* Отстройка */

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

.proof-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.proof-card b { display: block; font-size: 19px; color: var(--ink); margin-bottom: 10px; }
.proof-card p { color: var(--muted); }

/* Единый объём и мягкий отклик у карточек — чтобы страница не читалась плоской */
.step-card, .format-card, .proof-card, .faq-card {
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.step-card:hover, .format-card:hover, .proof-card:hover, .faq-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(16, 24, 40, .05), 0 16px 36px rgba(16, 24, 40, .09);
  border-color: #d7e0ec;
}

/* Тарифы */

.pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  gap: 24px;
  justify-content: center;
  max-width: 740px;
  margin: 0 auto;
  align-items: stretch;
}

.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 6px rgba(16, 24, 40, .05), 0 20px 44px rgba(16, 24, 40, .1);
}

.price-card.featured {
  position: relative;
  border: 1.5px solid var(--blue);
  box-shadow: 0 2px 8px rgba(0, 119, 255, .1), 0 24px 50px rgba(0, 119, 255, .16);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 5px 15px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 119, 255, .35);
  white-space: nowrap;
}

.plan-name { font-weight: 700; font-size: 17px; color: var(--ink); }

.plan-price {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 10px;
}

.plan-per { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.price-card ul { list-style: none; flex: 1; }
.price-card li {
  color: var(--text);
  font-size: 15px;
  padding: 6px 0 6px 28px;
  position: relative;
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.5l2.5 2.5 4.5-5' fill='none' stroke='%230077ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.price-card .btn { margin-top: 22px; }

.price-note {
  margin-top: 36px;
  color: var(--muted);
  font-size: 15px;
  max-width: 680px;
}

/* Тарифы — по центру: центрированные карты требуют центрированной шапки */
#pricing h2,
#pricing .section-sub,
#pricing .price-note {
  text-align: center;
}
#pricing .section-sub,
#pricing .price-note {
  margin-left: auto;
  margin-right: auto;
}

/* --- Подвал --- */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer p, .footer a { color: var(--muted); font-size: 14px; }
.footer nav { display: flex; gap: 24px; }

/* ============================================
   Генератор
   ============================================ */

.gen-page { max-width: 800px; margin: 0 auto; padding: 48px 24px 80px; }

.back {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 15px;
}
.back:hover { color: var(--blue); text-decoration: none; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-body { padding: 24px; }

.field-hint { color: var(--muted); font-size: 14px; margin-top: 10px; }

.counter-chip { font-size: 14px; font-weight: 500; color: var(--muted); }

/* Переключатель смайлов */

.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.toggle-label { font-size: 15px; color: var(--text); font-weight: 500; }

.seg {
  display: inline-flex;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.seg-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.seg-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
}

/* Панель настроек: смайлы + модель, симметрично */

.controls-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}

.control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #98a2b3;
}

.control .seg { height: 42px; align-items: center; }

.model-select {
  height: 42px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  max-width: 300px;
  transition: border-color .15s ease, background .15s ease;
}
.model-select:hover { border-color: #b9c6d8; background: #fff; }
.model-select:focus { outline: none; border-color: var(--blue); background: #fff; }
.model-select option:disabled { color: #98a2b3; }

/* Кастомный пикер модели — «как у больших ИИ»: имя + описание + живой индикатор доступности */
.model-picker { position: relative; }
.model-trigger {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 216px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.model-trigger:hover { border-color: #b9c6d8; background: #fff; }
.model-picker.open .model-trigger { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-tint); }
.mt-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, .16);
}
.mt-dot.busy { background: #f79009; box-shadow: 0 0 0 3px rgba(247, 144, 9, .16); }
.mt-text { display: flex; flex-direction: column; line-height: 1.12; flex: 1 1 auto; min-width: 0; }
.mt-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-caret { width: 11px; height: 8px; color: var(--muted); flex: none; transition: transform .2s ease; }
.model-picker.open .mt-caret { transform: rotate(180deg); }

.model-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: max(100%, 268px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 14px 38px rgba(16, 24, 40, .16);
  max-height: 340px;
  overflow: auto;
  animation: modelMenuIn .14s ease;
}
@keyframes modelMenuIn { from { opacity: 0; transform: translate(-50%, -4px); } to { opacity: 1; transform: translate(-50%, 0); } }
.model-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
}
.model-opt:hover:not(:disabled) { background: var(--blue-tint); }
.model-opt[aria-selected="true"] { background: var(--blue-tint); }
.model-opt:disabled { cursor: default; opacity: .55; }
.mo-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #12b76a; }
.mo-dot.off { background: #d0d5dd; }
.mo-body { flex: 1 1 auto; min-width: 0; }
.mo-name { font-size: 14px; font-weight: 600; }
.mo-hint { font-size: 12px; color: var(--muted); margin-top: 1px; }
.mo-badge { font-size: 10.5px; font-weight: 700; color: #f79009; margin-left: auto; flex: none; text-transform: uppercase; letter-spacing: .04em; }
.mo-check { color: var(--blue); font-weight: 800; margin-left: auto; flex: none; font-size: 15px; }

/* Чипы выбранных форматов + «+» */

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-tint);
  border: 1px solid #cfe3ff;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  animation: chipPop .22s cubic-bezier(.2, 1.4, .4, 1) both;
}

@keyframes chipPop {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}

.add-chip { transition: border-color .15s ease, color .15s ease, background .15s ease, transform .12s ease; }
.add-chip:hover { transform: translateY(-1px); }

.chip .pf-badge { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }

.chip-x {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 4px;
}
.chip-x:hover { color: var(--danger); }

.add-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1.5px dashed #b9c6d8;
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.add-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }

.add-plus { font-size: 18px; font-weight: 600; line-height: 1; }

/* Шаблоны */

.tpl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tpl-label { font-size: 14px; color: var(--muted); font-weight: 500; }

.tpl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.tpl-chip:hover { border-color: var(--blue); color: var(--blue); }

.tpl-save {
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--blue);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.tpl-save:hover { background: var(--blue-tint); }

/* Модальные окна */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 43, .45);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(16, 24, 40, .2);
  width: 100%;
  max-width: 440px;
  max-height: min(640px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
}

.modal-sm { max-width: 380px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  color: var(--ink);
}

.modal-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
}
.modal-close:hover { color: var(--ink); background: var(--bg-alt); }

.modal-body { padding: 14px 22px; overflow-y: auto; }

.modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.modal-body .btn-block { margin-bottom: 10px; }

.modal-foot { padding: 14px 22px 18px; border-top: 1px solid var(--border); }

.btn-mail { background: #ff9e00; color: #fff; font-size: 16px; padding: 13px 26px; }
.btn-mail:hover { background: #e58f00; }

/* Строки выбора в окне форматов */

.picker-group {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 14px 0 4px;
}
.picker-group:first-child { margin-top: 4px; }

.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
}
.pick:hover { background: var(--bg-alt); }

.pick input { position: absolute; opacity: 0; pointer-events: none; }

.pick .pick-check {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #d0d7e2;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}
.pick input:checked ~ .pick-check {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.pick input:focus-visible ~ .pick-check { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Бренд-бейджи площадок */

.pf-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.b-vk    { background: #0077ff; }
.b-tg    { background: #2aabee; }
.b-ya    { background: #fc3f1d; }
.b-web   { background: #475569; }
.b-mail  { background: #64748b; }
.b-ozon  { background: #005bff; }
.b-wb    { background: #cb11ab; }
.b-max   { background: #5a4fcf; font-size: 9px; }
.b-dzen  { background: #1f1f1f; }
.b-avito { background: #00aaff; }
.b-ym    { background: #ffcc00; color: #333; }
.b-maps  { background: #21a038; }
.b-star  { background: #f2a63c; }
.b-doc   { background: #64748b; }
.b-phone { background: #475569; }
.b-flyer { background: #d97706; }

/* Шапка: залогиненный пользователь */

.user-name { color: var(--ink); font-weight: 600; font-size: 15px; }
.user-plan { color: var(--muted); font-size: 13px; }

.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
  background: var(--bg-alt);
}

/* Действие */

.action-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.gen-left { color: var(--muted); font-size: 15px; }
.gen-left b { color: var(--ink); }

/* Результат: интерактивные окна */

.notice {
  background: var(--blue-tint);
  border: 1px solid #cfe3ff;
  border-radius: 12px;
  padding: 14px 18px;
  color: #1d4f8f;
  font-size: 15px;
  margin-bottom: 24px;
}

.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.result-head h2 { font-size: clamp(26px, 3.4vw, 34px); }
.result-head .muted-inline { color: var(--muted); font-weight: 500; }

.win {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.win.collapsed .win-bar { border-bottom: none; }

.win-dots { display: inline-flex; gap: 6px; flex: none; }
.win-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.win-dots i:nth-child(1) { background: #f2a6a0; }
.win-dots i:nth-child(2) { background: #f2d3a0; }
.win-dots i:nth-child(3) { background: #a9d9b4; }

.win-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  min-width: 0;
}
.win-title .pf-badge { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }

.win-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.win-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
}
.win-btn:hover { color: var(--ink); background: #eceff4; }

.result-body {
  padding: 20px 24px;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 15px;
}

/* ============================================
   Генератор: фокус по центру
   ============================================ */

.gen-focus { max-width: 760px; }

.gen-title {
  text-align: center;
  font-size: clamp(30px, 4.6vw, 44px);
  margin-top: 8px;
}

.gen-sub {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  margin: 10px 0 24px;
}

.composer-big textarea { min-height: 170px; font-size: 17px; }

.center { text-align: center; }

.toggle-center { justify-content: center; margin: 16px 0 4px; }

.chips-center { justify-content: center; margin-top: 18px; }

#counterLine { margin-top: 10px; font-size: 14px; }

.tpl-center { justify-content: center; border-top: none; margin-top: 12px; padding-top: 4px; }

.action-center { justify-content: center; margin-top: 22px; }

.gen-left-line { margin-top: 12px; font-size: 14px; }
.gen-left-line b { color: var(--ink); }

.limit-note {
  max-width: 520px;
  margin: 18px auto 0;
  background: var(--blue-tint);
  border: 1px solid #cfe3ff;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
}
.limit-note b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.limit-note span { color: var(--muted); font-size: 14px; }
.limit-note .btn { display: inline-block; margin: 14px auto 6px; }
.limit-note .limit-sub { display: block; font-size: 13px; margin-top: 4px; }

/* Мини-баннер уведомления (оплата и т.п.) */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  max-width: 90vw;
  background: var(--ink);
  color: #fff;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 1000;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-ok { background: #1f9d55; }

/* История запросов */

#historyZone {
  margin-top: 44px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.history-head b { font-size: 16px; color: var(--ink); }
.history-head a { font-size: 13px; color: var(--muted); }
.history-head a:hover { color: var(--danger); text-decoration: none; }

.history-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font: inherit;
  cursor: pointer;
}
.history-item:hover { border-color: var(--blue); background: var(--blue-tint); }
.history-text { color: var(--text); font-size: 14px; }
.history-meta { color: var(--muted); font-size: 12px; }

/* Живой прогресс: одна строка-этап */

.stage-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 34px auto 26px;
  min-height: 32px;
}

.stage-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--blue-tint);
  border-top-color: var(--blue);
  flex: none;
  animation: spin .8s linear infinite;
}

.stage-line {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.stage-line.swap {
  animation: stageSwap .45s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes stageSwap {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Пока кампания собирается — шапку результата не показываем */
#resultView.building .notice,
#resultView.building .result-head,
#resultView.building .export-row { display: none; }

/* Появление готового окна */
.win-pop { animation: winPop .5s cubic-bezier(.22, 1, .36, 1) both; }

@keyframes winPop {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Экспорт */

.export-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Зелёная галочка с партиклами */

.burst {
  position: relative;
  width: 0;
  height: 0;
  display: inline-block;
}

.burst-check {
  position: absolute;
  left: -22px;
  top: -34px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2fbf71;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: burstPop .45s cubic-bezier(.2, 1.6, .4, 1) both;
  box-shadow: 0 6px 20px rgba(47, 191, 113, .4);
}

.burst i {
  position: absolute;
  left: 0;
  top: -12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: burstFly .9s ease-out .1s both;
}

@keyframes burstPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes burstFly {
  from { transform: translate(0, 0) scale(1); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; }
}

/* Оценка сервиса — ненавязчиво под результатом */

.rate-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.rate-label { color: var(--muted); font-size: 14px; }

.rate-stars { display: inline-flex; gap: 2px; }

.rate-stars button {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: #d0d7e2;
  cursor: pointer;
  padding: 2px 3px;
  transition: color .12s ease, transform .12s ease;
}
.rate-stars button:hover { transform: scale(1.15); }
.rate-stars button.lit { color: #f2b01e; }
.rate-stars.done button { cursor: default; }

.rate-thanks { color: var(--muted); font-size: 14px; }

/* Народная полоска-плетёнка (богатырский штрих) */

.folk-strip {
  height: 4px;
  background: repeating-linear-gradient(90deg,
    #c96f4a 0 16px,
    #e3b24f 16px 26px,
    #3f6ea5 26px 46px);
  opacity: .5;
}

/* ============================================
   Юридические страницы
   ============================================ */

.legal-page { max-width: 720px; margin: 0 auto; padding: 44px 24px 72px; }

.legal-page h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 6px; }

.legal-updated { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.legal-page h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin: 30px 0 10px;
  letter-spacing: 0;
}

.legal-page p, .legal-page li { color: var(--text); font-size: 15px; line-height: 1.65; }
.legal-page p { margin-bottom: 10px; }
.legal-page ul { padding-left: 22px; margin-bottom: 12px; }
.legal-page li { margin-bottom: 6px; }

.legal-page .notice { margin: 18px 0 6px; }
.legal-page .notice ul { margin: 8px 0 2px; }

.req-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.req-table th, .req-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  vertical-align: top;
}
.req-table th { color: var(--muted); font-weight: 500; width: 42%; }

.legal-nav {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* SEO-страницы решений */

.seo-cta {
  background: var(--blue-tint);
  border: 1px solid #cfe3ff;
  border-radius: 14px;
  padding: 22px 24px;
  margin: 26px 0;
  text-align: center;
}
.seo-cta p { color: var(--text); margin-bottom: 14px; }

.faq-item { margin-bottom: 16px; }
.faq-item b { display: block; color: var(--ink); margin-bottom: 4px; }

/* FAQ на лендинге */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.faq-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.faq-card b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 8px; }
.faq-card p { color: var(--muted); font-size: 15px; }
@media (max-width: 768px) { .faq-grid { grid-template-columns: 1fr; } }

.footer-solutions {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.footer-solutions a { margin-right: 14px; }

/* Чекбокс согласия в окне входа */

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 2px 0 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.consent-row input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex: none;
  cursor: pointer;
}

.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ============================================
   Блог
   ============================================ */

.blog-wrap { max-width: 1100px; margin: 0 auto; padding: 44px 24px 72px; }

.blog-head { text-align: center; margin-bottom: 40px; }
.blog-head h1 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 12px; }
.blog-head p { color: var(--muted); font-size: 17px; max-width: 620px; margin: 0 auto; }

.blog-cat { margin-bottom: 34px; }
.blog-cat > h2 {
  font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 14px;
}

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }

.blog-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.blog-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-card); text-decoration: none; }
.blog-card b { display: block; color: var(--ink); font-size: 17px; line-height: 1.3; margin-bottom: 8px; }
.blog-card span { color: var(--muted); font-size: 14px; }
.blog-card .blog-more { color: var(--blue); font-size: 14px; font-weight: 600; margin-top: 12px; display: inline-block; }

/* Хлебные крошки */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs span { color: #b9c6d8; margin: 0 6px; }

/* Статья */
.post { max-width: 760px; margin: 0 auto; padding: 40px 24px 72px; }
.post h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin-bottom: 12px; }
.post-meta { color: var(--muted); font-size: 14px; margin-bottom: 26px; }

.post-lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  border-left: 3px solid var(--blue);
  padding-left: 18px;
  margin-bottom: 30px;
}

.post-body { font-size: 16px; line-height: 1.7; color: var(--text); }
.post-body h2 { font-size: 25px; color: var(--ink); font-weight: 800; letter-spacing: -0.01em; margin: 38px 0 12px; }
.post-body h3 { font-size: 19px; color: var(--ink); font-weight: 700; margin: 26px 0 8px; }
.post-body p { margin-bottom: 15px; }
.post-body ul, .post-body ol { padding-left: 22px; margin-bottom: 18px; }
.post-body li { margin-bottom: 7px; }
.post-body a { color: var(--blue); font-weight: 500; }
.post-body strong { color: var(--ink); }

.post-body .table-scroll { overflow-x: auto; margin-bottom: 20px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.post-body th { color: var(--muted); font-weight: 600; background: var(--bg-alt); }

/* FAQ */
.post-faq { margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--border); }
.post-faq h2 { font-size: 25px; color: var(--ink); font-weight: 800; margin-bottom: 18px; }
.post-faq details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 18px;
  margin-bottom: 10px;
}
.post-faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
  content: "+"; position: absolute; right: 0; top: 12px;
  font-size: 20px; color: var(--muted); font-weight: 400;
}
.post-faq details[open] summary::after { content: "–"; }
.post-faq details p { padding: 0 0 16px; color: var(--text); line-height: 1.65; margin: 0; }

/* CTA в статье */
.post-cta {
  margin-top: 40px;
  background: var(--blue-tint);
  border: 1px solid #cfe3ff;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
}
.post-cta b { display: block; font-size: 21px; color: var(--ink); margin-bottom: 8px; }
.post-cta p { color: var(--muted); margin-bottom: 18px; }

/* Читайте также */
.related { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border); }
.related h2 { font-size: 19px; color: var(--ink); margin-bottom: 14px; }
.related ul { list-style: none; }
.related li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.related a { color: var(--text); font-weight: 500; }
.related a:hover { color: var(--blue); }

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

/* ============================================
   Адаптив и доступность
   ============================================ */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 48px 0 40px; }
  .hero-right { max-width: 520px; }
  .formats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .brand-name { display: none; }
  .brand-divider { display: none; }
  .steps { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .platforms-row { gap: 22px; }
  .platforms-title::before, .platforms-title::after { display: none; }
  .win-bar { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .formats { grid-template-columns: 1fr; }
  .head-actions .btn { display: none; }
  .btn-hero { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
