/* Анимата — базовые стили сайта и приложения.

   Палитра «Закат» (с 15.09): коралловый переходит в горячий розовый.
   Яркая намеренно — сервис про медиа, и цвет должен запоминаться с первого
   взгляда, как у конкурентов. Переменные те же во всех трёх файлах.

   Цвета бренда и цвета состояний разведены намеренно:

     --accent, --accent2   бренд. Кнопки, значки, градиенты, рамки.
     --accentText          бренд в мелком тексте: ссылки, подписи. Коралловый
                           на светлом фоне не читается (3,2), поэтому для текста
                           он затемнён до 5,0. В тёмной теме совпадает с --accent.
     --ok, --danger        состояния. Успех и ошибка, к бренду отношения не имеют.

   Ошибка сделана глубже и темнее бренда (#b3001b против #ff4a2e): рядом
   с кораллом и розовым красный легко спутать, поэтому сообщение об ошибке
   всегда сопровождается текстом, а не одним цветом.

   Текст на кнопке тёмный (--onAccent): белый на коралловом — 3,3, тёмный — 5,8.

   Шрифты — со своего сервера: assets/css/fonts.css и файлы в assets/fonts
   (с 23.09; раньше — Google Fonts). Подключаются в <head> шаблонов. */

:root {
  --bg:#fff7f6; --panel:#ffffff; --sunken:#fdecec; --fg:#1d0e12; --dim:#3d2830;
  --muted:#826470; --line:#f4dee0; --line2:#eacbd0; --track:#fbe7e8;
  --accent:#ff4a2e; --accent2:#ff2f92; --accentText:#db1d00; --accent2Text:#dc0069;
  --accentSoft:#ffece7; --accentLine:#ffc2b3;
  --onAccent:#140a0e;
  --ok:#1d7a4f; --okSoft:#e8f4ec; --okLine:#a9d2ba;
  --danger:#b3001b; --dangerSoft:#fde8ea;
  --shadow: 0 1px 2px rgba(60,15,25,.05), 0 14px 40px rgba(60,15,25,.08);
  --grad: linear-gradient(100deg, var(--accent), var(--accent2));
  /* Градиент для текста: на светлом фоне яркие концы бледнеют, берём затемнённые. */
  --gradText: linear-gradient(100deg, var(--accentText), var(--accent2Text));
  /* Стекло и мягкие градиенты — см. раздел «Стекло и свечение» ниже. */
  --glass: rgba(255,255,255,.58); --glassStrong: rgba(255,247,246,.80);
  /* Стекло поверх чужого кадра: под ним может оказаться что угодно, поэтому
     плотнее обычного — иначе текст тонет в тёмном снимке. */
  --glassPanel: rgba(255,247,246,.90);
  --glassLine: rgba(60,15,25,.08); --glassHi: rgba(255,255,255,.85);
  --glassShadow: 0 12px 34px -12px rgba(120,25,45,.20);
  --glow1: rgba(255,47,146,.13); --glow2: rgba(255,74,46,.12); --glowZone: rgba(255,100,90,.26);
  --cardTint: #fff0ef;
  /* Полоса анонса над шапкой: тёмная в обеих темах, с малиновым отливом. */
  --promo1: #150a0e; --promo2: #7a1830; --promoText: #ffeff1;
  /* Фон выпадающих меню — плотный: текст страницы под ним не должен проступать. */
  --menuBg: #ffffff;
  /* Шрифт текста. Кнопки и поля пишут `font: 600 14px var(--sans, inherit)`:
     без этой переменной браузер отбрасывает всё правило целиком, и кнопка
     берёт размер текста у соседей (29.10 «Сгенерировать текст» вылезала за край). */
  --sans: 'Golos Text', system-ui, -apple-system, sans-serif;
  /* Шрифт крупных заголовков разделов. Не для текста: он для одной фразы. */
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  /* Тени плиток трендов: в три слоя — контакт, объём и розовый рассеянный свет. */
  --tshadow: 0 1px 2px rgba(70,15,30,.08), 0 8px 18px -6px rgba(70,15,30,.18), 0 26px 46px -20px rgba(255,60,90,.32);
  --tshadowHover: 0 2px 4px rgba(70,15,30,.10), 0 20px 36px -12px rgba(70,15,30,.28), 0 44px 72px -26px rgba(255,60,100,.46);
  /* Системные элементы — полосы прокрутки, поля ввода — в тон теме. */
  color-scheme: light;
}

/* Тёмная тема — только по выбору человека. По умолчанию светлая,
   настройка устройства не учитывается: так решил владелец (15.09).
   Выбор хранит site.js в localStorage и ставит на <html> до отрисовки. */
:root[data-theme="dark"] {
  --bg:#10080b; --panel:#1c0f15; --sunken:#26141c; --fg:#fdeff2; --dim:#e6cfd6;
  --muted:#a8889a; --line:#37202a; --line2:#47293a; --track:#2a1620;
  --accent:#ff4a2e; --accent2:#ff2f92; --accentText:#ff4a2e; --accent2Text:#ff2f92;
  --accentSoft:#2e1210; --accentLine:#6e2a1e;
  --onAccent:#140a0e;
  --ok:#4cc98a; --okSoft:#0e2016; --okLine:#235140;
  --danger:#ff7a70; --dangerSoft:#2e0f12;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 14px 40px rgba(0,0,0,.35);
  --gradText: var(--grad);
  --glass: rgba(30,16,22,.52); --glassStrong: rgba(16,8,11,.74);
  --glassPanel: rgba(20,10,14,.86);
  --glassLine: rgba(255,255,255,.08); --glassHi: rgba(255,255,255,.07);
  --glassShadow: 0 14px 38px -12px rgba(0,0,0,.65);
  --glow1: rgba(255,47,146,.11); --glow2: rgba(255,74,46,.10); --glowZone: rgba(255,60,100,.16);
  --cardTint: #22111a;
  --promo1: #0c0508; --promo2: #5c1024; --promoText: #ffe9ee;
  --menuBg: #1c0f15;
  --tshadow: 0 1px 2px rgba(0,0,0,.6), 0 10px 22px -6px rgba(0,0,0,.62), 0 28px 52px -20px rgba(0,0,0,.75);
  --tshadowHover: 0 2px 4px rgba(0,0,0,.6), 0 22px 40px -12px rgba(0,0,0,.7), 0 36px 80px -28px rgba(255,60,110,.42);
  color-scheme: dark;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

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

/* Градиент бренда. Кнопки им не красятся: белый текст пропадает на золотом
   конце. Градиент — для плашек, полос выполнения, заголовков и знака;
   кнопка красится сплошным --accent. */
.grad { background: var(--grad); }
@supports (background: linear-gradient(in oklch, red, blue)) {
  :root { --grad: linear-gradient(100deg in oklch, var(--accent), var(--accent2)); }
}

/* ── Стекло и свечение ───────────────────────────────────────────────────
   Стекло — полупрозрачная панель с размытием того, что под ней. Имеет смысл
   только там, где под панелью что-то есть: шапка поверх прокручиваемой
   страницы, поиск и плашки поверх свечения и картинок. На сплошном фоне
   стекло неотличимо от обычной панели и только тратит видеокарту.

   Свечение — мягкие радиальные пятна кораллового и розового на фоне сайта. Слабые
   намеренно: фон не должен спорить с работами. Кнопки по-прежнему сплошные. */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--glassLine);
  box-shadow: inset 0 1px 0 var(--glassHi), var(--glassShadow);
}
.glass.is-strong { background: var(--glassStrong); box-shadow: inset 0 -1px 0 var(--glassHi); border-width: 0 0 1px; }
/* Без поддержки размытия полупрозрачная панель читается плохо — делаем плотной. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass.is-strong { background: var(--panel); }
}

body.site {
  background:
    radial-gradient(1100px 640px at 90% -10%, var(--glow1), transparent 62%),
    radial-gradient(900px 600px at -10% 6%, var(--glow2), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
}

/* ── Заголовки разделов ───────────────────────────────────────────────────
   Один выразительный стиль на все крупные заголовки (этап 3): шрифт --display,
   курсивная часть в <em> — градиентом. Только для одной фразы, не для текста. */

.h-display { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.h-display em, .h-display .grad {
  font-style: italic; padding-right: .08em;
  background: var(--gradText); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Разделы страницы: шапка раздела и заголовок (09.10 — из главной в общий файл:
   страницы инструментов и нейросетей показывали «Частые вопросы» без стиля). ─── */
.sec { padding: 52px 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 28px; text-align: center; }
.sec-title { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.06; letter-spacing: -.01em; text-wrap: balance; }
.sec-title .grad { font-style: italic; padding-right: .08em; background: var(--gradText);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sec-sub { color: var(--muted); font-size: 15px; max-width: 560px; line-height: 1.55; }
@media (max-width: 640px) { .sec { padding: 40px 0; } .sec-head { padding: 0 16px; } }

/* ── Хлебные крошки: Главная → раздел → страница ─────────────────────── */
.bc { font-size: 12.5px; color: var(--muted); }
.bc a { color: var(--accentText); }
.bc a:hover { text-decoration: underline; }

/* ── Переключатель темы ───────────────────────────────────────────────────
   Иконка выбирается здесь, а не в site.js: в светлой теме луна («сделать
   темнее»), в тёмной солнце. Верно с первой отрисовки, без мигания. */

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; flex: none;
  border: 1px solid var(--line2); border-radius: 8px;
  background: transparent; color: var(--dim); cursor: pointer;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--accentLine); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

/* Вариант строкой — для меню, где рядом стоят такие же ссылки. Подпись
   называет тему, в которую перейдём: в светлой «Тёмная тема». */
.theme-toggle.has-label {
  width: 100%; height: auto; justify-content: flex-start; gap: 9px;
  padding: 8px 10px; border: 0; border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--muted);
}
.theme-toggle.has-label:hover { background: var(--track); color: var(--fg); }
.theme-toggle.has-label .tt-light { display: none; }
:root[data-theme="dark"] .theme-toggle.has-label .tt-dark { display: none; }
:root[data-theme="dark"] .theme-toggle.has-label .tt-light { display: inline; }

/* ── Тренды ─────────────────────────────────────────────────────────────
   Сетка как у Syntx: колонки двух видов одинаковой высоты.

     высокая — одна плитка, колонка 4:5;
     парная  — две горизонтальные плитки, каждая (4:5 − зазор) / 2 ≈ 16:10.

   Высоту задаёт aspect-ratio колонки, поэтому пропорции держатся при любой
   ширине, а колонки переносятся на 4, 3 или 2 без прокрутки вбок и без дыр.
   Колонки считает Trends::columns(), разметку — trend_grid() в helpers.php. */

.tgrid {
  --g: 12px;
  display: grid;
  gap: var(--g);
  padding: 0 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}
/* На телефоне плитки и так мелкие — поля по краям меньше. */
@media (max-width: 759px) {
  .tgrid { padding: 0 16px; --g: 10px; }
}
@media (min-width: 760px) {
  .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); --g: 14px; }
}
@media (min-width: 1100px) {
  .tgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); --g: 18px; }
  /* На главной крайние колонки чуть уже средних — центр блока крупнее,
     как у Syntx. Колонки выровнены по центру, поэтому края ниже и выше. */
  .tgrid.is-landing { grid-template-columns: .88fr 1fr 1fr .88fr; }
}

/* Главная и «похожие идеи» — всегда одна строка: четыре колонки на компьютере,
   три на планшете, две на телефоне. Два ряда на телефоне давали блок выше
   экрана, а высота блока — ровно то, на что владелец жаловался в первую очередь. */
.tgrid.is-landing .tcol:nth-child(n+3),
.tgrid.is-more .tcol:nth-child(n+3) { display: none; }
@media (min-width: 760px) {
  .tgrid.is-landing .tcol:nth-child(3),
  .tgrid.is-more .tcol:nth-child(3) { display: flex; }
}
@media (min-width: 1100px) {
  .tgrid.is-landing .tcol:nth-child(4),
  .tgrid.is-more .tcol:nth-child(4) { display: flex; }
}

.tcol {
  display: flex; flex-direction: column; gap: var(--g);
  aspect-ratio: 4 / 5; min-width: 0;
}
/* Рамка вокруг плитки: сама плитка — ссылка, а кнопка звука обязана
   лежать рядом с ней, а не внутри (кнопка внутри ссылки — неверная
   разметка). Рамка держит размер, плитка занимает её целиком. */
.tframe { position: relative; display: flex; min-height: 0; min-width: 0; }
.tframe > .ttile { flex: 1 1 auto; min-width: 0; }
.tcol > .tframe { flex: 1 1 0; min-height: 0; }
/* Горизонтальный тренд без пары — последний в каталоге: стоит сверху, под ним пусто. */
.tcol.is-single > .tframe { flex: 0 0 calc(50% - var(--g) / 2); }
.tcol.is-single { justify-content: flex-start; }

.ttile {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  border-radius: 14px; background: var(--sunken);
  box-shadow: var(--tshadow);
  outline: 2px solid transparent; outline-offset: -2px;
  transition: transform .35s ease, box-shadow .35s ease, outline-color .35s ease;
}
/* Ролик, подставленный вместо обложки (startTeasers в site.js), проявляется,
   а не выскакивает: обложка и первый кадр почти совпадают. */
video[data-teaser-video].is-live { animation: teaser-in .35s ease; }
@keyframes teaser-in { from { opacity: 0; } to { opacity: 1; } }

.ttile img,
.ttile video {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}

/* Затемнение под подробностями: превью бывают любыми, и белый текст
   должен читаться и на светлом кадре. */
.ttile::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(12,9,6,.72) 0%, rgba(12,9,6,.3) 40%, rgba(12,9,6,0) 68%);
  opacity: 0; transition: opacity .3s ease;
}

/* Подробности лежат на матовом стекле: кадр под ними размыт, и текст
   читается на любой картинке. Верхний край стекла растворяется маской,
   иначе поперёк кадра шла бы жёсткая граница. */
.tinfo {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: 6px;
  padding: 34px 15px 15px; color: #fff;
  background: linear-gradient(to top, rgba(12,9,6,.5), rgba(12,9,6,.18));
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-mask-image: linear-gradient(to top, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(to top, #000 calc(100% - 30px), transparent);
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
}
.ttitle { font-size: 15.5px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.tsum {
  font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,.82);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Подвал подробностей: метки слева, кнопка справа. Не поместились в строку —
   кнопка уходит на вторую строку к правому краю, а не наезжает на метки.
   Метки сами не переносятся: длинное название нейросети обрезается
   многоточием, формат не сжимается. */
.tfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 3px; min-width: 0; }
.tchips { display: flex; gap: 5px; flex: 1 1 auto; min-width: 0; max-width: 100%; }
.tchip, .tbadge, .tgo { display: inline-flex; align-items: center; gap: 5px; }
.tchip { flex: none; min-width: 0; max-width: 100%; }
.tchip.is-model { flex: 0 1 auto; }
.tchip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tchip svg { width: 12px; height: 12px; flex: none; }
.tbadge svg { width: 11px; height: 11px; flex: none; }
.tgo svg { width: 13px; height: 13px; flex: none; }
.tchip {
  font-size: 11px; line-height: 1.2; padding: 4px 8px; border-radius: 7px; white-space: nowrap;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.tgo {
  flex: none; margin-left: auto; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 8px;
  background: var(--accent); color: var(--onAccent);
}
/* В парной колонке плитка ниже: описание в одну строку, меток нет —
   вторая строка подвала закрыла бы заголовок. Метки есть на странице тренда. */
.tcol.is-stack .tsum { -webkit-line-clamp: 1; }
.tcol.is-stack .tchips { display: none; }

/* Плашки поверх кадра — тёмное стекло, как у Syntx: видны на любой
   картинке и не закрывают её сплошным пятном. «Топ» отличается розовой
   каймой, а не заливкой. */
.tbadge, .tvideo {
  position: absolute; top: 10px; z-index: 2;
  color: #fff; background: rgba(20,14,9,.36);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 4px 14px rgba(0,0,0,.18);
}
.tbadge {
  left: 10px;
  font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 8px;
}
.tbadge.top { border-color: var(--accent2); }

/* Кнопка звука у плитки с роликом (`sound_button()` в helpers.php).
   Стоит слева от значка ролика, чтобы они не спорили за угол. Ролики
   запускаются беззвучными — иначе браузер их не запустит; звук включает
   человек, и звучит всегда только один. */
.tsound {
  position: absolute; top: 10px; right: 42px; z-index: 3;
  width: 26px; height: 26px; border-radius: 8px; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #fff; background: rgba(20,14,9,.36);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 4px 14px rgba(0,0,0,.18);
}
.tsound:hover { background: rgba(20,14,9,.55); }
.tsound svg { width: 15px; height: 15px; display: block; }
.tsound .ic-on { display: none; }
.tsound[aria-pressed="true"] { border-color: var(--accent2); }
.tsound[aria-pressed="true"] .ic-on { display: block; }
.tsound[aria-pressed="true"] .ic-off { display: none; }
/* На странице тренда превью одно и значка ролика рядом нет. */
.prev .tsound { right: 10px; }

/* Значок ролика: треугольник в плашке, чтобы отличать тизер от картинки. */
.tvideo {
  right: 10px;
  width: 26px; height: 26px; border-radius: 8px;
}
.tvideo::before {
  content: ''; position: absolute; left: 10px; top: 8px;
  border-style: solid; border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff;
}

/* Наведение: плитка приподнимается, получает рамку бренда и показывает
   подробности. Фокус с клавиатуры делает то же — иначе подробности
   видны только мышью. Только с мышью и на широком экране: часть телефонов
   (Samsung Internet, 29.10) называет себя «с наведением» — тогда подписи
   прятались, а плитка после касания застревала с подробностями поверх кадра. */
@media (hover: hover) and (pointer: fine) and (min-width: 760px) {
  .ttile:hover, .ttile:focus-visible {
    z-index: 3; transform: translateY(-4px) scale(1.02);
    outline-color: var(--accent); box-shadow: var(--tshadowHover);
  }
  .ttile:hover::after, .ttile:focus-visible::after { opacity: 1; }
  .ttile:hover .tinfo, .ttile:focus-visible .tinfo { opacity: 1; transform: none; }
  .ttile:hover img, .ttile:hover video { transform: scale(1.05); }
}

/* Без наведения (телефоны, планшеты): заголовок виден всегда, а описание
   и кнопка — на странице тренда, куда ведёт касание. */
@media (hover: none), (pointer: coarse), (max-width: 759px) {
  .ttile::after { opacity: 1; background: linear-gradient(to top, rgba(12,9,6,.78), rgba(12,9,6,0) 55%); }
  /* Здесь подробности видны всегда, у всех плиток сразу: размытие под каждой
     на телефоне дорого, хватает затемнения. */
  .tinfo { opacity: 1; transform: none; padding: 10px 11px 11px;
    background: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    -webkit-mask-image: none; mask-image: none; }
  .tsum, .tfoot { display: none; }
  .ttitle { font-size: 13px; }
  /* Низкая плитка парной колонки: заголовок не длиннее двух строк, иначе
     он заходит под метку «Новинка» и кнопку звука (29.10). */
  .tcol.is-stack .tinfo { padding: 8px 10px 9px; }
  .tcol.is-stack .ttitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

@media (max-width: 1099px) {
  .tcol.is-stack .tsum { display: none; }
}

/* Появление при прокрутке: блок всплывает, когда попал на экран.
   Класс js-reveal ставит site.js, и только если анимация разрешена —
   без скрипта всё видно сразу. Колонки сетки всплывают по очереди. */
html.js-reveal [data-reveal],
html.js-reveal [data-reveal-kids] .tcol {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
html.js-reveal [data-reveal].is-in,
html.js-reveal [data-reveal-kids].is-in .tcol { opacity: 1; transform: none; }
html.js-reveal [data-reveal-kids] .tcol:nth-child(2) { transition-delay: .08s; }
html.js-reveal [data-reveal-kids] .tcol:nth-child(3) { transition-delay: .16s; }
html.js-reveal [data-reveal-kids] .tcol:nth-child(4) { transition-delay: .24s; }
html.js-reveal [data-reveal-kids] .tcol:nth-child(n+5) { transition-delay: .3s; }

/* Стеклянная строка ввода: поиск по трендам и «Опишите, что хотите создать».
   Кайма — псевдоэлемент с маской: обычная рамка градиентом не красится.
   Разметка у них одна, разный только размер и кнопка, поэтому и правила общие. */
.tsearch, .askbar {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 680px; margin: 0 auto;
  padding: 6px 6px 6px 18px; border-radius: 100px;
  border-color: transparent;
  transition: box-shadow .25s ease;
}
.askbar { max-width: 760px; }
.ask-wrap { margin: 0 auto 22px; width: 100%; }
.tsearch::before, .askbar::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(100deg, var(--accentLine), var(--glassLine) 35%, var(--glassLine) 65%, var(--accent2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.tsearch:focus-within, .askbar:focus-within { box-shadow: inset 0 1px 0 var(--glassHi), var(--glassShadow), 0 0 0 4px var(--accentSoft); }
.tsearch:focus-within::before, .askbar:focus-within::before { background: var(--grad); }
.tsearch-ic { width: 18px; height: 18px; flex: none; color: var(--muted); }
.tsearch input, .askbar input {
  flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--fg);
}
.askbar input { height: 46px; font-size: 16px; }
.tsearch input::placeholder, .askbar input::placeholder { color: var(--muted); opacity: 1; }
.tsearch input::-webkit-search-cancel-button { cursor: pointer; }
.tsearch button, .askbar button {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: var(--onAccent);
  transition: transform .2s ease;
}
.askbar button {
  display: flex; align-items: center; gap: 8px; width: auto; height: 46px;
  padding: 0 20px; border-radius: 100px; font: inherit; font-weight: 600; font-size: 15px;
}
.tsearch button svg, .askbar button svg { width: 19px; height: 19px; }
.tsearch button:hover, .askbar button:hover { transform: translateX(2px); }
@media (max-width: 520px) {
  .tsearch, .askbar { padding-left: 14px; }
  .tsearch input, .askbar input { font-size: 14px; }
  .askbar input { height: 42px; }
  .askbar button { height: 42px; padding: 0 14px; }
  .askbar button span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tsearch, .tsearch button { transition: none; }
  .ttile, .ttile img, .ttile video, .tinfo, .ttile::after { transition: none; }
  .ttile:hover, .ttile:focus-visible { transform: none; }
  .ttile:hover img, .ttile:hover video { transform: none; }
}

/* Плашка «Хотите узнавать о новых нейросетях?» (09.10) — справа внизу, один раз для вошедших. */
.news-bar { position: fixed; right: 16px; bottom: 16px; z-index: 89; max-width: 380px; margin: 0;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--accentLine); box-shadow: 0 10px 30px rgba(29, 14, 18, .14); }
.news-bar p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--dim); }
.news-bar p b { color: var(--fg); }
.news-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.news-yes { border: 1px solid var(--accent); background: var(--accent); color: var(--onAccent); border-radius: 10px;
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.news-no { border: 1px solid var(--line2); background: var(--panel); color: var(--dim); border-radius: 10px;
  padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
@media (max-width: 760px) {
  .news-bar { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: none; }
}

/* Уведомление о cookie и Яндекс Метрике (29.09, вариант Б): показывает metrika.js. */
.cookie-bar { position: fixed; left: 16px; bottom: 16px; z-index: 90; max-width: 420px;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(29, 14, 18, .14); }
.cookie-bar p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--dim); }
.cookie-bar a { color: var(--accentText); }
.cookie-ok { flex: none; border: 1px solid var(--accent); background: var(--accent); color: var(--onAccent);
  border-radius: 10px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
@media (max-width: 760px) {
  .cookie-bar { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: none; }
}


/* Тарифы в предложении (30.09): страница инструмента, тренда и Студия,
   site.js → animataPlanCards. Отмечен «Выбирают чаще», иначе первый. */
.po { display:flex; flex-direction:column; gap:10px; }
.po-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:10px; }
.po-card { display:flex; flex-direction:column; gap:3px; padding:12px 14px 14px; border-radius:14px;
  border:1px solid var(--line2); background:var(--panel); }
.po-card.is-pick { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent), 0 10px 26px -14px rgba(255,74,46,.55); }
.po-tag { min-height:17px; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--accent2Text); }
.po-title { font-size:16px; color:var(--fg); }
.po-price { font-size:20px; font-weight:700; color:var(--fg); font-variant-numeric:tabular-nums; }
.po-price small { font-size:12.5px; font-weight:500; color:var(--muted); }
.po-meta { font-size:12.5px; color:var(--muted); }
.po-runs { font-size:13px; font-weight:600; color:var(--accentText); }
.po-old { font-size:.7em; font-weight:600; color:var(--muted); }
.po-btn { margin-top:8px; border:1px solid var(--line2); background:var(--panel); color:var(--fg); border-radius:10px;
  padding:9px 12px; font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.po-btn:hover { border-color:var(--accent); }
.po-btn.primary { background:var(--accent); border-color:var(--accent); color:var(--onAccent); }
.po-btn[disabled] { opacity:.6; cursor:wait; }
.po-foot { margin:0; font-size:12.5px; color:var(--muted); }
/* Разовый доступ без подписки (10.11): полоса над карточками тарифов. */
.po-pass { display:flex; flex-direction:column; gap:10px; padding:12px 14px 14px; border-radius:14px;
  border:1px solid var(--accentLine); background:var(--accentSoft); }
.po-pass-t { font-size:14px; line-height:1.5; color:var(--dim); }
.po-pass-t b { color:var(--fg); }
.po-pass-row { display:flex; flex-wrap:wrap; gap:8px; }
.po-pass-row .po-btn { margin-top:0; flex:1 1 200px; display:flex; flex-direction:column; align-items:center; gap:2px; }
.po-pass-row .po-btn small { font-size:12px; font-weight:500; opacity:.8; }
.po-or { font-size:12.5px; color:var(--muted); text-align:center; }
.po-foot a { color:var(--accentText); }

/* Работа без подписки (07.10), site.js → animataUnlock / animataLock: под работой
   предложение подписки, на кнопках «Скачать» и «Поделиться» — маленький замок,
   под картинкой — тихая подпись про водяной знак. */
.ul { display:flex; flex-direction:column; gap:8px; margin-top:12px; padding:14px 16px; border-radius:14px;
  border:1px solid var(--accentLine); background:var(--accentSoft); }
.ul[hidden] { display:none; }
.ul-t { font-size:15.5px; color:var(--fg); }
.ul-s { margin:0; font-size:14px; line-height:1.5; color:var(--dim); }
.ul-n { font-size:12.5px; color:var(--muted); }
.ul-err { margin:0; font-size:13.5px; color:var(--danger); }
/* «Что помешало?» (12.11): тихий вопрос под предложением, ответ в одно нажатие. */
.ul-why { display:flex; flex-direction:column; gap:6px; margin-top:4px; padding-top:10px; border-top:1px solid var(--accentLine); }
.ul-why-q { font-size:13px; color:var(--muted); }
/* A/B-тест (25.10): пакет «5 работ» (группа А), таймер скидки (группа Б). */
.ul-pack { max-width:360px; }
.ul.has-pack .po .po-card.is-pick { border-color:var(--line); box-shadow:none; }
.ul.has-pack .po .po-btn.primary { background:var(--panel); border-color:var(--line2); color:var(--fg); }
.ul-open { align-self:flex-start; }
.ul-timer { margin:0; padding:9px 12px; border-radius:10px; background:var(--accentSoft); border:1px solid var(--accentLine);
  color:var(--accentText); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
/* Баннер акции группы Б: градиент бренда, крупное «−25%», табло отсчёта, полоска времени.
   Раскладка — по ширине окна предложения (container query): узко — процент и табло сверху, текст под ними. */
.ul { container-type:inline-size; }
.ul-deal { position:relative; overflow:hidden; display:grid; grid-template-columns:auto 1fr auto;
  grid-template-areas:"pct txt clock"; align-items:center; gap:10px 18px;
  padding:16px 18px 20px; border-radius:16px; background:var(--grad); color:var(--onAccent);
  box-shadow:0 14px 34px -16px rgba(255,47,146,.65); }
.ul-deal::after { content:''; position:absolute; inset:0; background:linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 48%, transparent 66%);
  transform:translateX(-120%); animation:ul-shine 3.2s ease-in-out infinite; pointer-events:none; }
.ul-deal-pct { grid-area:pct; font-weight:800; font-size:42px; line-height:1; letter-spacing:-1.5px; white-space:nowrap; }
.ul-deal-txt { grid-area:txt; display:flex; flex-direction:column; gap:4px; min-width:0; }
.ul-deal-txt b { font-size:16.5px; line-height:1.25; }
.ul-deal-txt span { font-size:13px; line-height:1.45; opacity:.88; }
.ul-deal-clock { grid-area:clock; display:grid; grid-template-columns:auto auto auto; align-items:center; gap:2px 4px; justify-items:center; }
.ul-deal-clock i { font-style:normal; font-weight:800; font-size:22px; }
.ul-deal-d { min-width:46px; padding:7px 4px; border-radius:10px; background:rgba(20,10,14,.88); color:#fff;
  font:700 25px/1 'JetBrains Mono', ui-monospace, monospace; text-align:center; font-variant-numeric:tabular-nums; }
.ul-deal-clock small { grid-column:1 / -1; font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; opacity:.8; }
.ul-deal-bar { position:absolute; left:0; right:0; bottom:0; height:5px; background:rgba(20,10,14,.18); }
.ul-deal-bar i { display:block; height:100%; background:rgba(20,10,14,.75); transition:width 1s linear; }
.ul-deal.is-last { animation:ul-pulse 1.1s ease-in-out infinite; }
@keyframes ul-shine { 0%, 55% { transform:translateX(-120%); } 100% { transform:translateX(120%); } }
@keyframes ul-pulse { 50% { transform:scale(1.015); box-shadow:0 18px 40px -14px rgba(255,47,146,.85); } }
@media (prefers-reduced-motion: reduce) { .ul-deal::after, .ul-deal.is-last { animation:none; } }
@container (max-width: 520px) {
  .ul-deal { grid-template-columns:1fr auto; grid-template-areas:"pct clock" "txt txt"; }
  .ul-deal-pct { font-size:38px; }
}
.ul-timer.is-over { background:var(--sunken); border-color:var(--line); color:var(--muted); font-weight:500; }
.lk-ic { width:13px; height:13px; margin-right:5px; vertical-align:-1px; flex:none; }
.wm-note { display:block; margin-top:6px; font-size:12.5px; color:var(--muted); }
.wm-note a { color:var(--accentText); }
/* «Получилось то, что хотели?» под готовой работой (30.10, animataRate в site.js). */
.rt { display:flex; flex-direction:column; gap:8px; margin-top:12px; padding:10px 12px; border-radius:12px;
  background:var(--sunken); border:1px solid var(--line); font-size:13.5px; color:var(--dim); }
/* В одну строку на любой ширине (06.11): подпись сжимается многоточием, кнопки не переносятся. */
.rt-row { display:flex; flex-wrap:nowrap; align-items:center; gap:8px; min-width:0; }
.rt-row .rt-q { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rt-row .rt-btn { flex:none; }
.rt-q { color:var(--fg); font-weight:600; }
.rt-btn { border:1px solid var(--line2); background:var(--panel); color:var(--fg); border-radius:999px; padding:5px 14px;
  font:600 13px var(--sans, inherit); cursor:pointer; }
.rt-btn:hover { border-color:var(--accentLine); color:var(--accentText); }
.rt-btn.is-send, .rt-btn.is-retry { align-self:flex-start; border-color:var(--accent); color:var(--accentText); }
.rt-chips { display:flex; flex-wrap:wrap; gap:6px; }
.rt-chip { border:1px solid var(--line2); background:var(--panel); color:var(--dim); border-radius:10px; padding:6px 10px;
  font:500 13px var(--sans, inherit); cursor:pointer; text-align:left; }
.rt-chip:hover { border-color:var(--accentLine); color:var(--fg); }
.rt-other { display:flex; flex-direction:column; gap:6px; }
.rt-note { width:100%; box-sizing:border-box; border:1px solid var(--line2); border-radius:10px; background:var(--panel); color:var(--fg);
  padding:8px 10px; font:14px/1.45 var(--sans, inherit); resize:vertical; }
.rt-done { color:var(--dim); }
.rt.is-compact { margin-top:6px; padding:6px 8px; font-size:12.5px; }
.rt.is-compact .rt-btn { padding:3px 10px; font-size:12px; }
.rt-btn.is-icon { display:inline-grid; place-items:center; padding:5px 11px; line-height:0; }
.rt.is-compact .rt-row { gap:6px; }
.rt.is-compact .rt-btn.is-icon { padding:4px 8px; }
.rt.is-compact .rt-btn.is-icon svg { width:15px; height:15px; }
/* Узкие плитки (телефон, две колонки): подпись мельче, а где не помещается — только пальцы (у кнопок есть названия). */
.rt.is-compact { container-type:inline-size; }
@container (max-width: 215px) { .rt.is-compact .rt-q { font-size:11.5px; } .rt.is-compact .rt-btn.is-icon { padding:4px 7px; } }
@container (max-width: 175px) { .rt.is-compact .rt-q { display:none; } }
/* «Дальше с этой картинкой» и строка баланса под работой инструмента (30.10). */
.tw-next { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-top:12px; }
.tw-next a { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:10px; border:1px solid var(--accent);
  background:var(--accentSoft); color:var(--accentText); font-weight:600; font-size:14px; text-decoration:none; }
.tw-next a:hover { background:var(--panel); }
.tw-next small { color:var(--muted); font-size:12.5px; }
.tw-after { display:block; margin-top:8px; font-size:12.5px; color:var(--muted); }
/* Ссылка-кнопка на пакет скачиваний в подписи под работой (30.10). */
.wm-note .wm-link { border:0; padding:0; background:none; color:var(--accentText); font:inherit; font-weight:600; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }

/* Вход по коду прямо на странице инструмента и тренда (02.10),
   site.js → animataAuthCode. */
.ac { display:flex; flex-direction:column; gap:8px; margin-top:14px; padding:16px; border-radius:16px;
  border:1px solid var(--accentLine); background:var(--accentSoft); }
.ac-title { font-size:17px; color:var(--fg); }
.ac-sub { margin:0; font-size:13.5px; color:var(--dim); }
.ac-form { display:flex; flex-direction:column; gap:8px; }
.ac-row { display:flex; gap:8px; flex-wrap:wrap; }
.ac-in { flex:1 1 220px; min-width:0; padding:11px 13px; border-radius:11px; border:1px solid var(--line2);
  background:var(--panel); color:var(--fg); font:inherit; font-size:15px; }
.ac-in:focus { outline:2px solid var(--accent); outline-offset:1px; }
.ac-code { font-family:var(--mono, monospace); font-size:20px; letter-spacing:.3em; text-align:center; flex-basis:160px; }
.ac-go { flex:0 0 auto; }
/* Вход через сервисы (14.10, вариант Б): белые кнопки в стиле сайта, цвет сервиса — только в значке. */
/* Почта задерживается (06.11): строка над входом через сервисы. */
.mail-delay { margin:8px 0 12px; padding:10px 12px; border-radius:12px; font-size:13.5px; line-height:1.45;
  background:var(--accentSoft); border:1px solid var(--accentLine); color:var(--fg); }
.soc-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:4px 0 0; }
.soc-btn { display:flex; align-items:center; justify-content:center; gap:10px; padding:11px 10px; border:1px solid var(--line2);
  border-radius:14px; background:var(--panel); color:var(--fg); font-weight:600; font-size:14px; text-decoration:none;
  transition:border-color .15s, box-shadow .15s, transform .15s; }
.soc-btn:hover { border-color:var(--accentLine); box-shadow:0 6px 18px rgba(255,74,46,.14); transform:translateY(-1px); color:var(--fg); }
.soc-btn img { width:26px; height:26px; flex:none; }
.soc-or { display:flex; align-items:center; gap:12px; color:var(--muted); font-size:13px; margin:18px 0 12px; }
.soc-or::before, .soc-or::after { content:""; flex:1; height:1px; background:var(--line2); }
.soc-who { display:flex; gap:12px; align-items:center; padding:12px; border-radius:14px; background:var(--accentSoft);
  border:1px solid var(--accentLine); margin:6px 0 14px; }
.soc-who b { display:block; } .soc-who small { color:var(--muted); }
.ac-soc { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:2px 0 0; }
.ac-soc a { height:46px; border:1px solid var(--line2); border-radius:14px; background:var(--panel); display:grid; place-items:center;
  transition:border-color .15s, box-shadow .15s, transform .15s; }
.ac-soc a:hover { border-color:var(--accentLine); box-shadow:0 6px 18px rgba(255,74,46,.14); transform:translateY(-1px); }
.ac-soc img { width:26px; height:26px; }
@media (max-width:420px) { .soc-btn { flex-direction:column; gap:5px; padding:10px 6px; font-size:12.5px; } }
.ac-check { display:flex; gap:8px; align-items:flex-start; font-size:13px; color:var(--dim); }
.ac-check input { margin-top:3px; }
.ac-check a, .ac-fine a { color:var(--accentText); }
.ac-err { margin:0; font-size:13px; color:var(--danger); }
.ac-fine { margin:0; font-size:12px; color:var(--muted); }
.ac-link { background:none; border:0; padding:0; font:inherit; color:var(--accentText); cursor:pointer; }
.ac-link[disabled] { color:var(--muted); cursor:default; }

/* «Поделиться» (30.09): меню под кнопкой, site.js → animataShare.
   Родитель кнопки — position:relative (.share-wrap). */
.share-wrap { position:relative; display:inline-flex; }
.shm { position:absolute; z-index:40; left:0; bottom:calc(100% + 8px); width:250px; padding:6px; border-radius:14px;
  background:var(--menuBg); border:1px solid var(--line2); box-shadow:0 18px 40px -18px rgba(29,14,18,.45);
  display:flex; flex-direction:column; text-align:left; }
.shm-status { margin:0; padding:10px; font-size:13px; color:var(--muted); }
.shm-item { display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border:0; border-radius:10px;
  background:none; color:var(--fg); font:inherit; font-size:14px; cursor:pointer; text-align:left; }
.shm-item:hover:not([disabled]) { background:var(--sunken); }
.shm-item[disabled] { opacity:.5; cursor:wait; }
/* Значки — в палитре сайта: цвета только на переменных, чужих фирменных нет. */
.shm-ic { width:28px; height:28px; flex:none; display:grid; place-items:center; border-radius:8px; font-size:11px; font-weight:700;
  color:var(--accentText); background:var(--accentSoft); border:1px solid var(--accentLine); }
.shm-item.is-copy .shm-ic { background:var(--sunken); color:var(--fg); font-size:15px; border-color:var(--line2); }
/* На телефоне — снизу во всю ширину и поверх кнопки «Открыть Студию» (z-index 45). */
@media (max-width:560px) { .shm { position:fixed; left:12px; right:12px; bottom:12px; width:auto; z-index:70; } }

/* Ход генерации (30.09): страница тренда и инструмента, site.js →
   animataProgress. Полоса бежит всё время — видно, что ничего не зависло. */
.gw { display:flex; flex-direction:column; gap:8px; margin-top:12px; padding:12px 14px; border-radius:12px;
  background:var(--sunken); border:1px solid var(--line); }
.gw[hidden] { display:none; }
.gw-bar { display:block; height:5px; border-radius:5px; background:var(--track); overflow:hidden; }
.gw-bar i { display:block; width:34%; height:100%; border-radius:5px; background:var(--grad); animation:gwRun 1.4s ease-in-out infinite; }
@keyframes gwRun { 0% { transform:translateX(-100%); } 100% { transform:translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .gw-bar i { animation:gwPulse 1.6s ease-in-out infinite; width:100%; transform:none; } }
@keyframes gwPulse { 0%, 100% { opacity:.35; } 50% { opacity:1; } }
.gw-row { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.gw-stage { font-size:14px; color:var(--fg); }
.gw-time { font-size:13px; color:var(--muted); font-family:'JetBrains Mono', monospace; font-variant-numeric:tabular-nums; }
.gw-hint { font-size:12.5px; color:var(--muted); line-height:1.45; }
/* Кнопка во время работы: крутящийся значок перед текстом. */
.btn.is-busy::before { content:''; width:14px; height:14px; flex:none; border-radius:50%;
  border:2px solid currentColor; border-right-color:transparent; animation:gwSpin .8s linear infinite; }
@keyframes gwSpin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::before { animation-duration:2.4s; } }

/* ── Кадрирование готовой картинки (crop.js, 01.10) ─────────────────── */
html.crp-open { overflow:hidden; }
.crp { position:fixed; inset:0; z-index:80; display:flex; align-items:center; justify-content:center; padding:16px;
  background:rgba(16,8,11,.62); }
.crp-box { width:min(760px, 100%); max-height:100%; overflow:auto; display:flex; flex-direction:column; gap:12px;
  background:var(--panel); color:var(--fg); border:1px solid var(--line); border-radius:18px; padding:16px 18px 18px;
  box-shadow:0 30px 70px -30px rgba(0,0,0,.6); }
/* Окно ниже содержимого — прокручивается, а не сжимает картинку. */
.crp-box > * { flex-shrink:0; }
.crp-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.crp-head b { font-size:17px; }
.crp-x { width:34px; height:34px; border-radius:10px; border:1px solid var(--line2); background:var(--panel); color:var(--fg);
  font-size:20px; line-height:1; cursor:pointer; }
.crp-stage { position:relative; display:flex; align-items:center; justify-content:center; min-height:200px; border-radius:12px; padding:14px;
  overflow:hidden; touch-action:none; user-select:none; -webkit-user-select:none;
  background:repeating-conic-gradient(var(--sunken) 0 25%, var(--panel) 0 50%) 0 0 / 20px 20px; }
.crp-frame { position:relative; display:none; line-height:0; }
.crp-stage.is-ready .crp-frame { display:block; }
.crp-frame img { display:block; max-width:100%; max-height:min(56vh, 560px); width:auto; height:auto; pointer-events:none; }
.crp-loading { margin:0; padding:24px; font-size:14px; color:var(--dim); text-align:center; line-height:1.45; }
.crp-rect { position:absolute; cursor:move; outline:none; box-shadow:0 0 0 9999px rgba(16,8,11,.55);
  border:1.5px solid #fff; touch-action:none; }
.crp-rect:focus-visible { border-color:var(--accent); }
/* Линии третей — чтобы знак было проще поставить по центру. */
.crp-rect::before, .crp-rect::after { content:''; position:absolute; pointer-events:none; border:0 solid rgba(255,255,255,.45); }
.crp-rect::before { left:33.333%; right:33.333%; top:0; bottom:0; border-left-width:1px; border-right-width:1px; }
.crp-rect::after { top:33.333%; bottom:33.333%; left:0; right:0; border-top-width:1px; border-bottom-width:1px; }
.crp-h { position:absolute; width:18px; height:18px; margin:-9px 0 0 -9px; border-radius:50%; background:#fff;
  border:2px solid var(--accent); z-index:1; touch-action:none; }
.crp-h-nw { left:0; top:0; cursor:nwse-resize; } .crp-h-n { left:50%; top:0; cursor:ns-resize; }
.crp-h-ne { left:100%; top:0; cursor:nesw-resize; } .crp-h-e { left:100%; top:50%; cursor:ew-resize; }
.crp-h-se { left:100%; top:100%; cursor:nwse-resize; } .crp-h-s { left:50%; top:100%; cursor:ns-resize; }
.crp-h-sw { left:0; top:100%; cursor:nesw-resize; } .crp-h-w { left:0; top:50%; cursor:ew-resize; }
@media (pointer:coarse) { .crp-h { width:26px; height:26px; margin:-13px 0 0 -13px; } }
.crp-ratios { display:flex; flex-wrap:wrap; gap:6px; }
.crp-ratios button, .crp-tools button { border:1px solid var(--line2); background:var(--panel); color:var(--dim); cursor:pointer;
  font:500 13px var(--sans, inherit); border-radius:100px; padding:6px 12px; }
.crp-ratios button[aria-pressed="true"] { border-color:var(--accent); background:var(--accentSoft); color:var(--accentText); font-weight:600; }
.crp-presets { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.crp-presets span { font-size:13px; color:var(--muted); margin-right:2px; }
.crp-presets button { border:1px solid var(--line2); background:var(--panel); color:var(--dim); cursor:pointer;
  font:500 13px var(--sans, inherit); border-radius:10px; padding:6px 11px; }
.crp-presets button[aria-pressed="true"] { border-color:var(--accent); background:var(--accentSoft); color:var(--accentText); font-weight:600; }
.crp-tools { display:flex; flex-wrap:wrap; gap:6px; }
.crp-tools .crp-trim { color:var(--fg); border-color:var(--accentLine); }
.crp-tools button:disabled, .crp-foot button:disabled { opacity:.5; cursor:default; }
.crp-size { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:13px; color:var(--muted); }
.crp-size input { width:92px; border:1px solid var(--line2); border-radius:9px; background:var(--bg); color:var(--fg);
  font:500 14px 'JetBrains Mono', monospace; padding:6px 8px; }
.crp-size input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accentSoft); }
.crp-times { color:var(--dim); }
.crp-note { margin:0; font-size:12.5px; color:var(--muted); min-height:1.4em; line-height:1.45; }
.crp-foot { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.crp [hidden] { display:none !important; }
/* Свои кнопки окна: в Студии стилей .btn сайта нет. Текст тёмный — как на всех кнопках бренда. */
.crp-go { display:inline-flex; align-items:center; justify-content:center; gap:7px; border:1px solid var(--accent);
  background:var(--accent); color:var(--onAccent); border-radius:10px; padding:9px 16px; font:600 14px var(--sans, inherit); cursor:pointer; }
.crp-go.is-alt { background:transparent; color:var(--fg); border-color:var(--line2); font-weight:500; }
.crp-cancel { border:1px solid var(--line2); background:transparent; color:var(--fg); border-radius:10px; padding:9px 16px;
  font:inherit; font-size:14px; cursor:pointer; margin-right:auto; }
@media (max-width:560px) {
  .crp { padding:0; align-items:stretch; }
  .crp-box { border-radius:0; border:0; padding:12px 14px 16px; }
  .crp-frame img { max-height:50vh; }
  .crp-size input { width:74px; }
  .crp-foot .crp-go { flex:1 1 auto; }
}

/* ── Лента тарифов (02.10, просьба владельца) ───────────────────────────
   Пять карточек с Free не ужимаются по ширине: не помещаются — лента едет
   вбок. Стрелки, перетаскивание мышью и свайп — тот же setupRail() из
   site.js, что у ленты инструментов на главной (атрибуты data-rail*).
   Сама дорожка (.p-grid на тарифах, .plans на главной) описана на странице:
   у них разная раскладка карточки. */
.prail { position:relative; }
.prail-track { overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory;
  scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.prail-track::-webkit-scrollbar { display:none; }
.prail-track > * { scroll-snap-align:start; }
.prail-arrow { position:absolute; top:var(--arrow-top, 132px); z-index:2; width:42px; height:42px; margin-top:-21px;
  display:none; place-items:center; border-radius:50%; cursor:pointer; color:var(--fg);
  background:var(--glassStrong); border:1px solid var(--glassLine);
  -webkit-backdrop-filter:blur(14px) saturate(1.4); backdrop-filter:blur(14px) saturate(1.4);
  box-shadow:var(--glassShadow); transition:transform .2s ease, opacity .2s ease, border-color .2s ease; }
.prail-arrow svg { width:18px; height:18px; }
.prail-arrow:hover { transform:scale(1.06); border-color:var(--accentLine); }
.prail-arrow[disabled] { opacity:0; pointer-events:none; }
.prail-arrow.is-prev { left:6px; }
.prail-arrow.is-next { right:6px; }
.prail.is-scrollable .prail-arrow { display:grid; }
/* Мышью ленту тянут за промежутки между карточками; щелчок по кнопке
   внутри карточки работает как обычно (setupRail гасит его только после
   настоящего перетаскивания). */
@media (hover:hover) and (pointer:fine) {
  .prail.is-scrollable .prail-track { cursor:grab; }
}
.prail.is-dragging .prail-track { cursor:grabbing; scroll-snap-type:none; user-select:none; -webkit-user-select:none; }
/* На телефоне листают пальцем: стрелки закрывали бы карточку. */
@media (max-width:680px) {
  .prail.is-scrollable .prail-arrow { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .prail-arrow { transition:none; }
}

/* Всплывающее окно с важным сообщением — window.animataNotice (11.10). */
.ntc { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:16px; background:rgba(20,10,14,.45);
  animation:ntc-in .15s ease-out; }
.ntc-box { position:relative; width:100%; max-width:440px; padding:22px 22px 18px; border-radius:18px; background:var(--panel);
  color:var(--fg); border:1px solid var(--line2); box-shadow:0 24px 60px rgba(20,10,14,.28); }
.ntc-box > b { display:block; font-size:18px; line-height:1.3; padding-right:28px; color:var(--danger); }
.ntc-box > p { margin:10px 0 18px; color:var(--dim); font-size:15px; line-height:1.55; }
.ntc-x { position:absolute; top:10px; right:12px; width:32px; height:32px; border:0; border-radius:50%; background:transparent;
  color:var(--muted); font-size:24px; line-height:1; cursor:pointer; }
.ntc-x:hover { background:var(--sunken); color:var(--fg); }
.ntc-acts { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.ntc-acts .btn { flex:0 1 auto; }
@media (max-width:480px) { .ntc-acts .btn { flex:1 1 100%; justify-content:center; } }
@keyframes ntc-in { from { opacity:0; } to { opacity:1; } }
@media (prefers-reduced-motion:reduce) { .ntc { animation:none; } }

/* Метка цены модели — шкала из трёх ₽ (23.10): закрашенные и бледные. */
.tier { display:inline-flex; gap:1px; font-weight:700; letter-spacing:0; white-space:nowrap; }
.tier b { color:var(--accentText); font-weight:700; }
.tier i { color:var(--muted); opacity:.35; font-style:normal; }
