/* ==========================================================================
   UniCreo — дизайн-система. Тёплый нейтральный фон, фирменный оранжевый градиент,
   мягкие тени и крупные скругления. Тёмная тема — те же токены, другие значения.
   ========================================================================== */
/* Manrope (OFL) лежит у нас: без запросов к Google Fonts — быстрее и не зависит от доступности из РФ. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* Системный шрифт с метриками Manrope: пока шрифт грузится, текст не «прыгает» при подмене. */
@font-face { font-family: "Manrope Fallback"; src: local("Arial"), local("Helvetica"), local("Roboto");
  size-adjust: 102.5%; ascent-override: 102.8%; descent-override: 28.9%; line-gap-override: 0%; }

:root {
  --paper: #f7f5f1;
  --paper-2: #efebe4;
  --surface: #ffffff;
  --ink: #16130f;
  --ink-soft: #3d382f;
  --muted: #6b6458;
  --line: #ebe6dd;
  --line-strong: #dcd5c8;
  --accent: #e2582a;
  --accent-dark: #b9441a;
  --accent-tint: #fdf0e8;
  --accent-line: #f6d3bf;
  --grad: linear-gradient(135deg, #ff8a3d 0%, #e2582a 55%, #c4451b 100%);
  --good: #2f7a4f;
  --bad: #b23a27;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(22, 19, 15, .04), 0 6px 20px rgba(22, 19, 15, .05);
  --shadow-md: 0 18px 50px rgba(22, 19, 15, .12);
  --glow: 0 8px 24px rgba(226, 88, 42, .28);
  --font: "Manrope", "Manrope Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --page-glow-1: rgba(255, 138, 61, .14);
  --page-glow-2: rgba(226, 88, 42, .07);
}

/* ---------- Тёмная тема ---------- */
:root[data-theme="dark"] {
  --paper: #0f0e0c;
  --paper-2: #1c1a16;
  --surface: #171512;
  --ink: #f3eee6;
  --ink-soft: #cfc7b9;
  --muted: #9d9587;
  --line: #27231f;
  --line-strong: #3a352e;
  --accent: #ff6a33;
  --accent-dark: #ff8a55;
  --accent-tint: #2a1a12;
  --accent-line: #4a2a1a;
  --good: #56b487;
  --bad: #e07c62;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, .5);
  --glow: 0 8px 26px rgba(255, 106, 51, .25);
  --page-glow-1: rgba(255, 106, 51, .12);
  --page-glow-2: rgba(255, 138, 61, .05);
}
:root[data-theme="dark"] .primary-btn,
:root[data-theme="dark"] .tb-btn,
:root[data-theme="dark"] .plan-mini.active { color: #fff; }

* { box-sizing: border-box; }

html { background: var(--paper); }
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.55;
}
body {
  background:
    radial-gradient(1100px 560px at 88% -8%, var(--page-glow-1), transparent 62%),
    radial-gradient(900px 520px at -12% 6%, var(--page-glow-2), transparent 60%),
    var(--paper);
  background-repeat: no-repeat;
  min-height: 100vh;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font-family: inherit; }

::selection { background: var(--accent-tint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Шапка: прилипает, полупрозрачная ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(24px, calc((100vw - 1200px) / 2 + 24px));
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.brand { display: flex; align-items: center; gap: 12px; }
a.brand { text-decoration: none; color: inherit; }
.logo-mark { display: block; flex: none; transition: transform .2s; }
a.brand:hover .logo-mark { transform: rotate(-4deg) scale(1.04); }
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; }

.ghost-btn {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--muted); }
.ghost-btn.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-tint); }
.ghost-btn.accent:hover { color: var(--accent-dark); border-color: var(--accent); }

/* ---------- Раскладка ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 8px 24px 80px; }

/* ---------- Первый экран ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 40px;
  align-items: center;
  padding: 52px 0 40px;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.hero h1 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 18px 0 16px;
  color: var(--ink);
  font-weight: 800;
  max-width: 15ch;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--ink-soft); font-size: 17.5px; line-height: 1.6; max-width: 52ch; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.primary-btn.hero-btn, .secondary-btn.hero-btn { width: auto; padding: 15px 24px; font-size: 15.5px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--accent-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2582a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Высота блока — с запасом под наклон и масштаб заднего телефона: макет не вылезает на соседние блоки. */
.hero-visual { position: relative; height: 495px; }
.phone {
  position: absolute; width: 214px; aspect-ratio: 9 / 19;
  border-radius: 36px; padding: 8px;
  background: #0d0c0b; box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.phone video { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 28px; background: #000; }
.phone-back { left: 4%; top: 46px; transform: rotate(-8deg) scale(.9); opacity: .85; }
.phone-front { right: 8%; top: 0; transform: rotate(4deg); animation: float 6s ease-in-out infinite; }
.hero-chip {
  position: absolute; display: flex; flex-direction: column; gap: 1px;
  padding: 10px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-md); font-size: 12.5px; color: var(--muted);
  animation: float 7s ease-in-out infinite;
}
.hero-chip b { color: var(--ink); font-size: 13.5px; }
.hero-chip .ok { color: var(--good); font-weight: 700; }
.chip-a { left: 0; bottom: 64px; animation-delay: -2s; }
.chip-b { right: 0; bottom: 14px; animation-delay: -4s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
/* На телефонах без «парения»: экономит батарею и не мешает замерам скорости отрисовки. */
@media (prefers-reduced-motion: reduce), (max-width: 700px) { .phone-front, .hero-chip { animation: none; } }

/* Desktop: две колонки — слева управление, справа результаты */
.app-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.col-left, .col-right { min-width: 0; }
/* Лендинг (без инструмента): цены и «как это работает» рядом во всю ширину. */
body[data-page="landing"] .app-grid { grid-template-columns: minmax(0, 1fr); }
body[data-page="landing"] .col-right { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { body[data-page="landing"] .col-right { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) {
  .app-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 36px; }
  .hero-visual { height: 410px; max-width: 460px; width: 100%; margin: 0 auto; }
  .phone { width: 172px; border-radius: 30px; }
  .phone video { border-radius: 23px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.card-head.between { justify-content: space-between; }
.head-left { display: flex; align-items: center; gap: 12px; }
.card-head h2 { font-size: 19px; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
.step {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 14px; font-weight: 800;
  flex: none;
  box-shadow: 0 4px 12px rgba(226, 88, 42, .25);
}
.step.done { background: var(--good); box-shadow: none; }

/* ---------- Загрузка ---------- */
.dropzone {
  display: block;
  border: 2px dashed var(--line-strong);
  border-radius: 16px;
  padding: 38px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
  background: var(--paper);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-tint); }
.dropzone.drag { transform: scale(1.01); }
.dz-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--accent-tint); margin-bottom: 14px; line-height: 0; }
.dz-icon svg { display: inline-block; stroke: var(--accent); }
.dz-title { font-weight: 700; margin-bottom: 5px; font-size: 15.5px; }
.dz-hint { color: var(--muted); font-size: 13px; }

.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
}
.file-item .fi-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-item .fi-size { color: var(--muted); font-size: 12px; flex: none; margin-left: auto; }
.file-item .fi-remove { cursor: pointer; color: var(--muted); border: none; background: none; font-size: 20px; line-height: 1; padding: 0 2px; }
.file-item .fi-remove:hover { color: var(--bad); }
.file-item .fi-badge {
  font-size: 10px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; flex: none; margin-left: auto;
  background: var(--accent-tint); color: var(--accent-dark);
}
.file-item .fi-badge + .fi-size { margin-left: 0; }

/* ---------- Ссылка ---------- */
.url-block { margin-top: 18px; }
.or-sep { display: flex; align-items: center; text-align: center; color: var(--muted); font-size: 11.5px; margin: 6px 0 14px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or-sep span { padding: 0 12px; }
.url-row { display: flex; gap: 10px; align-items: center; }
.url-input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.url-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.url-btn {
  height: 48px; padding: 0 20px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--ink); background: var(--ink); color: var(--surface); font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s;
}
.url-btn:hover:not(:disabled) { background: var(--ink-soft); }
.url-btn:disabled { opacity: .5; cursor: progress; }
.url-spin { width: 18px; height: 18px; flex: none; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: urlspin .7s linear infinite; }
@keyframes urlspin { to { transform: rotate(360deg); } }
.url-msg { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 16px; }
.url-msg.error { color: var(--bad); }
.url-msg.ok { color: var(--good); }

/* ---------- Звук ---------- */
.audio-modes { display: flex; gap: 6px; margin-bottom: 10px; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.audio-mode { flex: 1; position: relative; text-align: center; border: 1px solid transparent; border-radius: 10px; padding: 10px 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: background .15s, color .15s, box-shadow .15s; }
.audio-mode input { position: absolute; opacity: 0; }
.audio-mode:hover { color: var(--ink); }
.audio-mode.selected { background: var(--surface); color: var(--accent-dark); border-color: var(--line); box-shadow: var(--shadow-sm); }
.wm-opt { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.wm-opt input { accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.audio-replace { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.audio-name { font-size: 13px; color: var(--muted); }

/* ---------- Поля ---------- */
.field-label { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }

/* ---------- Счётчик ---------- */
.row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.count-block { flex: 1; min-width: 240px; }
.counter { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.cnt-btn {
  width: 44px; height: 46px; border: none; background: var(--surface); color: var(--ink);
  font-size: 20px; cursor: pointer; transition: background .15s, color .15s;
}
.cnt-btn:hover { background: var(--accent-tint); color: var(--accent); }
.counter input {
  width: 64px; height: 46px; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 18px; font-weight: 800;
  -moz-appearance: textfield;
}
.counter input::-webkit-outer-spin-button, .counter input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ---------- Тонкая настройка ---------- */
.advanced { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.advanced summary { cursor: pointer; color: var(--ink-soft); font-size: 14.5px; user-select: none; font-weight: 700; }
.advanced summary:hover { color: var(--ink); }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.toggle {
  display: flex; align-items: center; gap: 11px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: border-color .15s, background .15s;
}
.toggle:hover { border-color: var(--line-strong); }
.toggle:has(input:checked) { background: var(--surface); border-color: var(--accent-line); }
.toggle input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.toggle .t-desc { color: var(--muted); font-size: 12px; font-weight: 500; }

/* ---------- Кнопки ---------- */
.primary-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: var(--grad);
  box-shadow: var(--glow);
  transition: transform .15s, box-shadow .15s, filter .15s, opacity .15s;
}
.primary-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 12px 30px rgba(226, 88, 42, .34); }
.primary-btn:active:not(:disabled) { transform: translateY(0); }
.primary-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.secondary-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 14px; font-weight: 700; transition: border-color .15s, background .15s;
}
.secondary-btn:hover { border-color: var(--ink); }
.status-msg { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; min-height: 18px; }
.status-msg.error { color: var(--bad); }

/* ---------- Результаты ---------- */
.overall { margin-bottom: 20px; }
.overall-bar { height: 10px; background: var(--paper-2); border-radius: 20px; overflow: hidden; }
.overall-fill { height: 100%; width: 0; background: var(--grad); border-radius: 20px; transition: width .4s; }
.overall-text { margin-top: 9px; font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }

.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.result-item { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.result-item video { width: 100%; display: block; background: #000; aspect-ratio: 9 / 16; object-fit: cover; }
.result-body { padding: 12px; }
.result-name { font-size: 12.5px; font-weight: 600; margin-bottom: 9px; word-break: break-all; color: var(--ink-soft); }
.result-bar { height: 6px; background: var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.result-fill { height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.result-fill.error { background: var(--bad); }
.result-dl {
  display: block; text-align: center; text-decoration: none; cursor: pointer; border: none; width: 100%;
  padding: 9px; border-radius: 10px; font-size: 13px; font-weight: 700;
  background: var(--ink); color: var(--surface); transition: background .15s, transform .15s;
}
.result-dl:hover { background: var(--ink-soft); }
.result-status { font-size: 12px; color: var(--muted); text-align: center; }
.result-status.err { color: var(--bad); }
.result-score { font-size: 11.5px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.result-score.good { color: var(--good); }
.result-score.ok { color: var(--ink-soft); }
.result-score.low { color: var(--muted); }
.result-legend { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Как это работает ---------- */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.how-grid > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.how-grid b { color: var(--ink); font-weight: 700; }
.disclaimer { margin-top: 18px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.6; }

/* ---------- Тур «Как это работает» ---------- */
.tour {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 16px;
  background: rgba(15, 12, 9, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .2s ease;
}
.tour-card {
  position: relative; width: min(470px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 26px; padding: 34px 30px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.tour-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: none; border-radius: 10px; background: var(--paper); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.tour-close:hover { color: var(--ink); }
.tour-art { width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); margin-bottom: 20px; }
.tour-count { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--accent); font-weight: 800; margin-bottom: 6px; }
.tour-title { font-size: 23px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 10px; }
.tour-text { font-size: 15px; line-height: 1.65; color: var(--ink-soft); margin: 0; min-height: 124px; }
.tour-dots { display: flex; gap: 6px; margin: 20px 0 22px; }
.tour-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 99px; background: var(--line-strong); cursor: pointer; transition: width .2s, background .2s; }
.tour-dot.active { width: 26px; background: var(--accent); }
.tour-nav { display: flex; justify-content: space-between; gap: 12px; }
.tour-nav .primary-btn { width: auto; min-width: 150px; padding: 13px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ---------- Пример «до/после» ---------- */
.demo { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; }
.demo-col { margin: 0; flex: 1; min-width: 0; max-width: 210px; }
.demo-col video { width: 100%; display: block; border-radius: 16px; background: #000; aspect-ratio: 9 / 16; object-fit: cover; box-shadow: var(--shadow-sm); }
.demo-label { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; font-weight: 700; }
.demo-label-accent { color: var(--accent-dark); }
.demo-arrow { flex: none; line-height: 0; color: var(--accent); }
.demo-arrow svg { stroke: var(--accent); }
.demo-caption { text-align: center; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 20px; line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.faq-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 13px 28px 13px 0; font-size: 14.5px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; color: var(--accent); font-size: 20px; font-weight: 600; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Подвал ---------- */
.foot { color: var(--muted); font-size: 12.5px; padding: 40px 24px 48px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.foot-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); }
.foot-desc { margin: 10px auto 0; max-width: 560px; line-height: 1.55; }
.foot-links { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.foot-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--accent); }
.foot-dot { color: var(--line-strong); }
.foot-copy { margin: 14px auto 0; max-width: 640px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.foot-copy a { color: var(--muted); }
.foot-copy a:hover { color: var(--accent); }

/* ---------- Документы и статьи ---------- */
.legal { max-width: 780px; padding-top: 32px; }
.legal h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 6px; }
.legal-meta { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.legal h2 { font-size: 18.5px; font-weight: 800; letter-spacing: -0.01em; margin: 30px 0 10px; }
.legal p { color: var(--ink-soft); margin: 0 0 12px; }
.legal ul, .legal ol { color: var(--ink-soft); margin: 0 0 12px; padding-left: 22px; }
.legal li { margin: 7px 0; }
.legal a { color: var(--accent); }
.legal-back { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-note { background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 6px 18px; margin: 0 0 14px; }
.legal-note a { color: var(--accent-dark); }
.onb-list li { margin: 10px 0; }
.article-list { padding-left: 18px; }
.article-list li { margin-bottom: 16px; line-height: 1.5; }

/* ---------- Аккаунт в шапке ---------- */
.topbar-right { display: flex; align-items: center; gap: 10px; }
.account-bar { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.menu-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-soft); cursor: pointer; transition: color .15s, border-color .15s; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-line); }
.theme-toggle .t-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .t-sun { display: inline-flex; }
:root[data-theme="dark"] .theme-toggle .t-moon { display: none; }
.acc-info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; margin-right: 4px; }
.acc-email { font-size: 13px; font-weight: 700; }
.acc-usage { font-size: 12px; color: var(--muted); font-weight: 500; }
.acc-plan {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 999px; color: #fff; background: var(--grad);
}

/* ---------- Вход и регистрация ---------- */
.auth-screen { max-width: 450px; margin: 48px auto 64px; padding: 0 24px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 36px 32px; box-shadow: var(--shadow-md); }
.auth-logo { line-height: 0; margin-bottom: 16px; }
.auth-title { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.auth-sub { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 10px; border: none; border-radius: 10px; background: none; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.auth-tab.active { color: var(--accent); background: var(--surface); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 11px; }
.auth-input { height: 48px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.auth-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.auth-msg { font-size: 13px; min-height: 18px; color: var(--bad); line-height: 1.45; }
.auth-msg.ok { color: var(--good); }
.auth-mode-title { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.auth-links { display: flex; justify-content: flex-start; margin-top: 4px; }
.link-btn {
  border: none; background: none; padding: 0; color: var(--accent); font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--accent-dark); }
.auth-pricing { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.ap-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.ap-row { margin-bottom: 4px; }
.auth-back { display: block; margin: 20px auto 0; color: var(--muted); }
.consent-check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); text-align: left; cursor: pointer; }
.consent-check input { accent-color: var(--accent); width: 17px; height: 17px; margin-top: 1px; flex: none; }
.consent-check a { color: var(--accent); }
#tgConsentForm { display: grid; gap: 14px; }
#tgConsentForm .auth-sub { margin: 0; }
#tgConsentForm .auth-logo, #tgConsentForm .auth-title { margin-bottom: 0; }
#tgConsentMsg:empty { display: none; }

/* ---------- Цены ---------- */
.price-lead { font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.55; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.price-card, .buy-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 15px 14px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.price-card:hover, .buy-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.price-card.pro, .buy-card.pro { border-color: var(--accent-line); background: var(--accent-tint); }
.price-card.pro + .price-card.pro { margin-top: 10px; }
.pc-badge { position: absolute; top: -9px; right: 10px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 999px; color: #fff; background: var(--grad); }
.pc-cr { font-size: 13px; font-weight: 700; color: var(--ink); }
.pc-price { font-size: 22px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -0.02em; }
.pc-per { font-size: 12px; color: var(--muted); line-height: 1.45; }
.price-list { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-soft); }
.price-notes { margin: 14px 0 10px; padding-left: 18px; font-size: 13px; color: var(--ink-soft); line-height: 1.65; }
.price-foot { font-size: 12.5px; color: var(--muted); }
.price-foot a, .pay-legal a, .pay-note a { color: var(--accent-dark); }

/* Строка «сколько спишется» под кнопкой запуска */
.cost-line { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; min-height: 17px; }
.cost-line.short { color: var(--bad); }

/* ---------- Кабинет ---------- */
.cabinet { padding-top: 28px; }
.cab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cab-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.cab-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.cab-tab { padding: 9px 16px; border: none; border-radius: 10px; background: none; color: var(--muted); font-size: 14.5px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.cab-tab.active { color: #fff; background: var(--grad); }
.cab-empty { color: var(--muted); font-size: 15px; padding: 40px 0; text-align: center; }

.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.hist-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.hist-item video { width: 100%; display: block; background: #000; aspect-ratio: 9 / 16; object-fit: cover; }
.hist-gone { aspect-ratio: 9 / 16; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--paper); color: var(--muted); font-size: 13px; text-align: center; }
.hist-gone span { font-size: 11px; }
.hist-body { padding: 12px; }
.hist-name { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); word-break: break-all; margin-bottom: 5px; }
.hist-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hist-score { font-weight: 800; }
.hist-score.good { color: var(--good); }
.hist-score.ok { color: var(--ink-soft); }
.hist-score.low { color: var(--muted); }

.tariff-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin: 28px 0 12px; }
.cab-empty.small { padding: 14px 0; font-size: 13.5px; text-align: left; }

/* ---------- Баланс и оплата ---------- */
.bal-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.bal-block::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--page-glow-1); pointer-events: none; }
.bal-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bal-num { font-size: 42px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.bal-cap { font-size: 13.5px; color: var(--muted); }
.bal-pro { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); }
.pay-note { margin-top: 14px; background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; color: var(--ink-soft); }
.buy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.buy-grid.plans { grid-template-columns: repeat(2, 1fr); }
.buy-card { display: flex; flex-direction: column; }
.buy-card .buy-btn { margin-top: auto; }
.buy-card .pc-per { margin-bottom: 12px; }
.buy-btn:disabled, #customBuy:disabled { opacity: .5; cursor: not-allowed; }
.custom-topup { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); }
.custom-topup .auth-input { width: 110px; height: 42px; }
.custom-price { font-weight: 800; color: var(--ink); min-width: 70px; }
.pay-legal { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.bill-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.muted { color: var(--muted); }
.plus { color: var(--good); }
.minus { color: var(--ink-soft); }
.link-block { display: grid; gap: 10px; margin: 14px 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; box-shadow: var(--shadow-sm); }
.link-block .secondary-btn { justify-self: start; }
.link-block .url-msg { margin: 0; min-height: 0; }
.link-block .url-msg:empty { display: none; }

/* ---------- Админка ---------- */
.admin-block { margin-bottom: 28px; }
.admin-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; }
.admin-main { font-size: 14px; flex: 1; min-width: 180px; word-break: break-all; }
.admin-meta { font-size: 12.5px; color: var(--muted); }
.admin-badge { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; background: var(--ink); color: var(--surface); padding: 2px 7px; border-radius: 999px; }
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-sm); }
.stat-num { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; }
.plan-minis { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.plan-mini { padding: 6px 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.plan-mini:hover { border-color: var(--ink); }
.plan-mini.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Уведомления над инструментом ---------- */
.trial-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--accent-tint); border: 1px solid var(--accent-line);
  border-radius: 16px; padding: 14px 18px; margin-bottom: 18px;
  font-size: 14px; color: var(--ink-soft); line-height: 1.5;
}
/* Текст — не уже 240px: на телефоне кнопка уходит на свою строку, а не сжимает текст в столбик. */
.trial-banner span { min-width: 0; flex: 1 1 240px; }
.trial-banner b { color: var(--ink); font-weight: 800; }
.trial-banner .tb-btn {
  flex: none; padding: 10px 18px; border-radius: 12px;
  background: var(--grad); color: #fff; border: none; font-weight: 700; font-size: 13.5px;
  cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--glow);
}
.trial-banner .tb-btn:hover { filter: brightness(1.05); }
.trial-banner .tb-btn:disabled { opacity: .65; cursor: default; box-shadow: none; }
.notice-ok { background: color-mix(in srgb, var(--good) 9%, var(--surface)); border-color: color-mix(in srgb, var(--good) 30%, var(--line)); }
.notice-info { background: var(--surface); border-color: var(--line-strong); }
.notice-close {
  flex: none; margin-left: auto; width: 28px; height: 28px; border: none; background: none;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; border-radius: 8px;
}
.notice-close:hover { color: var(--ink); background: var(--paper); }

.hidden { display: none !important; }

/* ---------- Телефон ---------- */
@media (max-width: 680px) {
  .toggles { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .price-grid, .buy-grid, .buy-grid.plans { grid-template-columns: 1fr; }
  .bill-cols { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .hero { padding: 26px 0 14px; }
  .hero h1 { margin-top: 14px; }
  .lead { font-size: 16px; }
  .hero-cta { flex-direction: column; margin: 22px 0 16px; }
  .primary-btn.hero-btn, .secondary-btn.hero-btn { width: 100%; }
  .hero-visual { height: 330px; }
  .phone { width: 140px; }
  .phone-back { top: 28px; }
  /* После входа на телефоне — сразу к инструменту: без макета телефонов и плашек. */
  .authed .hero-visual, .authed .hero-kicker, .authed .hero-points { display: none; }
  .authed .hero { padding-top: 18px; }
  .authed .hero h1 { margin-top: 0; font-size: 30px; }
  .chip-a { bottom: 40px; }
  .trial-banner .tb-btn { flex: 1 1 auto; }
  .topbar { padding: 10px 16px; }
  .brand-sub { display: none; }
  .logo-mark { width: 42px; height: 42px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .foot { padding-left: 16px; padding-right: 16px; }
  .card { padding: 22px 16px; border-radius: 18px; }
  .auth-screen { padding: 0 16px; margin-top: 28px; }
  .auth-card { padding: 28px 20px; }
  .count-block { min-width: 0; }
  .tour-card { padding: 28px 20px 20px; border-radius: 22px; }
  .tour-text { min-height: 150px; }
  .cab-tabs { display: flex; }
  .cab-tab { flex: 1; }

  /* Мобильная шапка: «Войти» / бургер, детали аккаунта — в выпадающем меню */
  .menu-toggle { display: inline-flex; }
  .account-bar {
    position: absolute; top: calc(100% + 6px); right: 16px;
    flex-direction: column; align-items: stretch; gap: 10px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 18px; padding: 14px; min-width: 220px; max-width: calc(100vw - 32px);
    box-shadow: var(--shadow-md); z-index: 60;
  }
  .account-bar.menu-collapsed { display: none; }
  .acc-info { align-items: flex-start; margin: 0 0 4px; }
  .acc-email { max-width: 100%; font-size: 14px; overflow-wrap: anywhere; }
  .account-bar .ghost-btn { width: 100%; padding: 10px 14px; }
  .acc-plan { align-self: flex-start; }
}

/* Telegram Mini App: тема и выход — от Telegram, первый экран — компактный (человек уже внутри приложения). */
.tg #themeToggle, .tg #logoutBtn, .tg #loginBtn { display: none !important; }
.tg .hero { grid-template-columns: 1fr; padding: 18px 0 8px; }
.tg .hero-visual, .tg .hero-kicker, .tg .hero-points { display: none; }
.tg .hero h1 { font-size: 28px; margin-top: 0; }
.tg .hero .lead { font-size: 15px; }

/* ---------- Прогресс загрузки ---------- */
.upload-box { margin-top: 12px; }
.upload-bar { height: 8px; background: var(--paper-2); border-radius: 20px; overflow: hidden; }
.upload-fill { height: 100%; width: 0; background: var(--grad); border-radius: 20px; transition: width .25s; }
.upload-text { margin-top: 7px; font-size: 13px; color: var(--ink-soft); font-weight: 600; text-align: center; }

/* ---------- Мои задачи ---------- */
.tasks-summary { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.tasks-summary:empty { display: none; }
.tasks-hint { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.tasks-list { display: grid; gap: 10px; }
.task { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); overflow: hidden; transition: border-color .15s; }
.task.open { border-color: var(--line-strong); background: var(--surface); }
.task-head { display: block; width: 100%; text-align: left; padding: 13px 14px; border: none; background: none; color: inherit; cursor: pointer; font: inherit; }
.task-top { display: flex; align-items: center; gap: 10px; }
.task-title { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-chip { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 9px; border-radius: 999px; }
.task-chip.wait { background: var(--paper-2); color: var(--ink-soft); }
.task-chip.run { background: var(--accent-tint); color: var(--accent); }
.task-chip.ok { background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--good); }
.task-chip.err { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.task-chip.off { background: var(--paper-2); color: var(--muted); }
.task-chev { flex: none; color: var(--muted); transition: transform .2s; }
.task.open .task-chev { transform: rotate(180deg); }
.task-bar { height: 6px; background: var(--paper-2); border-radius: 10px; overflow: hidden; margin: 10px 0 7px; }
.task-fill { height: 100%; background: var(--grad); border-radius: 10px; transition: width .4s; }
.task-fill.ok { background: var(--good); }
.task-fill.err { background: var(--bad); }
.task-fill.off { background: var(--line-strong); }
.task-meta { font-size: 12.5px; color: var(--muted); }
.task-body { padding: 0 14px 14px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.secondary-btn.danger { color: var(--bad); }
.secondary-btn.danger:hover { border-color: var(--bad); }
.result-fill.off { background: var(--line-strong); }

/* ---------- Покупка в окне ---------- */
.buy-modal { width: min(560px, 100%); }
.buy-lead { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.55; }
.buy-options { display: grid; gap: 10px; }
.buy-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.buy-row.two { grid-template-columns: repeat(2, 1fr); }
.buy-option {
  position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 13px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.buy-option:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.buy-option:disabled { opacity: .5; cursor: not-allowed; }
.buy-option.fit { border-color: var(--accent-line); background: var(--accent-tint); }
.buy-option.plan { background: var(--surface); }
.buy-option b { font-size: 13.5px; }
.bo-price { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.bo-per { font-size: 12px; color: var(--muted); line-height: 1.4; }
.buy-modal .pay-legal { margin-top: 14px; }
@media (max-width: 680px) {
  .buy-row, .buy-row.two { grid-template-columns: 1fr; }
  .task-body .results-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .task-body .result-body { padding: 9px; }
}

/* ---------- Промокоды и приглашения ---------- */
.promo-row { display: flex; gap: 10px; max-width: 460px; }
.promo-row .auth-input { flex: 1; min-width: 0; text-transform: uppercase; }
.ref-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ref-label { font-size: 12px; color: var(--muted); font-weight: 700; width: 110px; flex: none; }
.ref-input { flex: 1; min-width: 180px; height: 40px; font-size: 13px; }
.promo-admin { display: grid; grid-template-columns: 1.2fr .8fr .8fr .8fr 1.4fr auto; gap: 8px; margin-bottom: 8px; }
.promo-admin .auth-input { height: 40px; font-size: 13.5px; }
@media (max-width: 680px) { .promo-admin { grid-template-columns: 1fr 1fr; } .ref-label { width: auto; } }
.promo-row .auth-input::placeholder { text-transform: none; }

/* ---------- Сравнение «до/после» ---------- */
.result-cmp { display: block; width: 100%; margin-top: 7px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.result-cmp:hover { border-color: var(--accent); color: var(--accent); }
.cmp-card { width: min(440px, 100%); }
.cmp { position: relative; aspect-ratio: 9 / 16; max-height: 64vh; margin: 4px auto 14px; overflow: hidden; border-radius: 16px; background: #000; touch-action: none; cursor: ew-resize; user-select: none; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp-top { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .5); pointer-events: none; }
.cmp-line span { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md); }
.cmp-tag { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.cmp-tag.l { left: 10px; }
.cmp-tag.r { right: 10px; }
.cmp-range { width: 100%; accent-color: var(--accent); }
.cmp-note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; text-align: center; }
