/* ==========================================================================
   МультиСсылка - оформление сайта.

   Логика: мультиссылка - продукт визуальный, поэтому главная должна ПОКАЗЫВАТЬ
   готовые страницы, а не рассказывать о них текстом. Отсюда телефоны с живыми
   примерами, мягкие цветные подложки и цветные иконки категорий.

   Светлая схема: белый и очень light-мятный фон, насыщенный зелёный для
   действий, четыре тёплых цвета для иконок. Имена переменных совпадают с теми,
   что использует admin.css.
   ========================================================================== */

:root {
    /* Поверхности */
    --paper: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #F6F7FB;
    --surface-3: #EEF0F8;

    /* Текст */
    --ink: #12132B;
    --ink-2: #3A3F63;
    --muted: #6C7296;

    /* Линии */
    --line: #E4E7F3;
    --line-soft: #EEF0F8;

    /* Основной цвет действия */
    --accent: #4B47E5;
    --accent-hover: #3A36C9;
    --accent-deep: #2E2BA8;
    --accent-light: #7C79F2;
    --accent-soft: #EAE9FE;

    /* Фирменный градиент шапки - взят с нынешнего сайта, но спокойнее */
    --brand-a: #E0179B;
    --brand-b: #8B21CE;
    --brand-c: #2B3ED0;

    /* Цветные полосы */
    --band-sun: #FFD84D;
    --band-leaf: #17B978;
    --band-night: #1E1B4B;

    /* Тёплый второй акцент */
    --warm: #FF6B4A;
    --warm-soft: #FFEDE8;

    /* Цвета иконок категорий */
    --c-coral: #FF6B4A;
    --c-violet: #7A5CFF;
    --c-amber: #FFA412;
    --c-sky: #2BA8F5;
    --c-pink: #FF52A0;
    --c-mint: #0FA36B;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;

    --shadow-sm: 0 1px 2px rgba(18, 19, 43, .05);
    --shadow: 0 6px 24px rgba(18, 19, 43, .07);
    --shadow-md: 0 14px 40px rgba(18, 19, 43, .10);
    --shadow-lg: 0 26px 70px rgba(18, 19, 43, .16);

    --font-display: "Onest", system-ui, sans-serif;
    --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --container: 1180px;
    --gutter: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 12px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.gradient-text {
    background: linear-gradient(96deg, var(--brand-a) 4%, var(--brand-b) 52%, var(--brand-c) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

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

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line-soft); box-shadow: 0 2px 20px rgba(8, 33, 26, .04); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 74px; }

.brand { font-weight: 800; font-size: 21px; letter-spacing: -.035em; color: var(--ink);
    display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px;
    background: linear-gradient(140deg, var(--accent-light), var(--accent) 62%, var(--accent-deep));
    color: #fff; display: grid; place-items: center;
    box-shadow: 0 6px 16px rgba(15, 163, 107, .32);
}
.brand-mark svg { width: 18px; height: 18px; }
/* Загруженный логотип (Настройки → Логотип и фавикон). Значок - квадрат
   вместо кружка, «целиком» - картинка с надписью вместо названия. */
.brand-img { display: inline-grid; flex: 0 0 auto; }
.brand-img img { grid-area: 1 / 1; display: block; width: auto; height: 34px; max-width: 34px; object-fit: contain; border-radius: 9px; }
.brand-img--full img { height: 38px; max-width: 220px; border-radius: 0; }
.brand-img-light { visibility: hidden; }
.page-home .site-header:not(.is-stuck) .header-inner .brand-img:has(.brand-img-light) .brand-img-main { visibility: hidden; }
.page-home .site-header:not(.is-stuck) .header-inner .brand-img-light { visibility: visible; }

.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a { color: var(--ink-2); font-weight: 500; font-size: 15.5px; padding: 9px 14px; border-radius: 999px; }
.header-nav a:hover { text-decoration: none; background: var(--surface-2); color: var(--ink); }
.header-nav a.is-active { color: var(--accent); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Бургер: три линии строго по центру кнопки, с отступом от краёв.
   Раньше кнопка была grid - а grid растягивает строки на всю высоту,
   и линии прилипали к верхнему и нижнему краю. */
.burger {
    display: none; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; cursor: pointer;
    border: 1px solid var(--line); background: #fff; border-radius: 14px;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.burger span { display: block; flex: 0 0 auto; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); }
.burger span:nth-child(2) { width: 14px; margin-left: 6px; }
.burger:active { transform: scale(.94); }

/* Меню на телефоне - слой во весь экран с «жидким» открытием: сверху
   стекают цветные волны, последняя закрывает экран градиентом бренда,
   потом по очереди выплывают пункты.

   Слой лежит прямо в <body> (его туда переносит скрипт). Внутри шапки ему
   нельзя: у шапки есть backdrop-filter, а он делает её «рамкой» для всех
   fixed-потомков - меню растягивалось бы не на экран, а на высоту шапки.
   Именно поэтому раньше меню открывалось только вверху главной, где у
   шапки фильтра нет. */
.mobile-menu[hidden] { display: none; }
.mobile-menu {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; flex-direction: column;
    overflow-y: auto; overscroll-behavior: contain;
    padding-block: 18px calc(24px + env(safe-area-inset-bottom, 0px));
    color: #fff; visibility: hidden;
}
.mobile-menu.is-open { visibility: visible; }
/* Когда волны доиграли, фон держит сам слой - на случай, если экран
   повернули или адресная строка изменила высоту окна. */
.mobile-menu.is-shown,
.mobile-menu.is-static {
    background: linear-gradient(150deg, var(--brand-a) 0%, var(--brand-b) 50%, var(--brand-c) 100%);
}
.menu-waves { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0; }
.mobile-menu > .container { position: relative; z-index: 1; }

/* Всё содержимое меню гаснет целиком - иначе при закрытии линии между
   пунктами висели бы поверх уходящих волн. */
.mobile-menu-top, .mobile-menu-nav, .mobile-menu-foot { opacity: 0; transition: opacity .2s ease; }
.mobile-menu.is-shown .mobile-menu-top,
.mobile-menu.is-shown .mobile-menu-nav,
.mobile-menu.is-shown .mobile-menu-foot { opacity: 1; transition-duration: .3s; }
.mobile-menu.is-shown .mobile-menu-foot { transition-delay: .28s; }

.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mobile-menu .brand { color: #fff; }
.mobile-menu .brand-mark { background: rgba(255, 255, 255, .2); box-shadow: none; }
.mobile-menu .brand-img:has(.brand-img-light) .brand-img-main { visibility: hidden; }
.mobile-menu .brand-img-light { visibility: visible; }

.menu-close {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 15px; padding: 0; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .42); background: rgba(255, 255, 255, .14); color: #fff;
    display: grid; place-items: center;
    transition: background .18s ease, transform .18s ease;
}
.menu-close svg { width: 22px; height: 22px; }
.menu-close:hover { background: rgba(255, 255, 255, .24); }
.menu-close:active { transform: scale(.94); }
.menu-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.mobile-menu-nav { display: grid; align-content: center; gap: 2px; margin-top: 24px; flex: 1 1 auto; }
.mobile-menu-nav a {
    display: block; padding: 16px 2px; color: #fff; overflow: hidden;
    font-size: clamp(26px, 8vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.mobile-menu-nav a:last-child { border-bottom: 0; }
.mobile-menu-nav a:hover, .mobile-menu-nav a:focus-visible { text-decoration: none; color: rgba(255, 255, 255, .78); }
/* Пункты выплывают снизу по очереди, как на прежнем сайте. */
.mobile-menu-nav a span { display: block; opacity: 0; transform: translateY(70%); }
.mobile-menu.is-shown .mobile-menu-nav a span { animation: menu-item .5s cubic-bezier(.19, 1, .22, 1) forwards; }
.mobile-menu.is-shown .mobile-menu-nav a:nth-child(1) span { animation-delay: .02s; }
.mobile-menu.is-shown .mobile-menu-nav a:nth-child(2) span { animation-delay: .08s; }
.mobile-menu.is-shown .mobile-menu-nav a:nth-child(3) span { animation-delay: .14s; }
.mobile-menu.is-shown .mobile-menu-nav a:nth-child(4) span { animation-delay: .2s; }
.mobile-menu.is-shown .mobile-menu-nav a:nth-child(5) span { animation-delay: .26s; }
@keyframes menu-item { to { opacity: 1; transform: none; } }

.mobile-menu-foot { display: grid; gap: 10px; margin-top: 28px; }
.mobile-menu-foot .btn { width: 100%; }
.mobile-menu-foot .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.mobile-menu-foot .btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.mobile-menu-foot .btn-primary { background: #fff; color: var(--brand-c); box-shadow: 0 12px 30px rgba(20, 10, 60, .28); }
.mobile-menu-foot p { margin-top: 6px; text-align: center; color: rgba(255, 255, 255, .72); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-top, .mobile-menu-nav, .mobile-menu-foot { transition: none; }
    .mobile-menu.is-shown .mobile-menu-nav a span { animation: none; opacity: 1; transform: none; }
}

/* Пока меню открыто, страница под ним не прокручивается. */
body.menu-open { overflow: hidden; }

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

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 14px 24px; border-radius: 999px; border: 1.5px solid transparent;
    font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; text-align: center;
    transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; }
/* Иконки внутри кнопок: без явного размера SVG растягивается на всю кнопку. */
.btn svg { width: 19px; height: 19px; flex: 0 0 19px; }
.btn-lg svg { width: 21px; height: 21px; flex-basis: 21px; }
.btn-sm svg { width: 17px; height: 17px; flex-basis: 17px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-light) -10%, var(--accent) 45%, var(--accent-deep) 130%);
    color: #fff; box-shadow: 0 10px 24px rgba(15, 163, 107, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(15, 163, 107, .34); }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #C9DFD5; background: var(--surface-2); transform: translateY(-1px); }

.btn-light { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn-light:hover { background: var(--surface-3); }

.btn-white { background: #fff; color: var(--accent-deep); box-shadow: var(--shadow-md); }
.btn-white:hover { transform: translateY(-2px); }

.btn-sm { padding: 9px 17px; font-size: 14.5px; }
.btn-lg { padding: 17px 32px; font-size: 17.5px; }
.btn-danger { background: #D4453A; color: #fff; }
.btn-danger:hover { background: #B93A30; }

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

main { flex: 1 0 auto; }

.section { padding-block: clamp(60px, 8vw, 110px); position: relative; }
.section--tight { padding-block: clamp(44px, 6vw, 72px); }
.section--soft { background: var(--surface-2); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px 7px 11px;
    border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep);
    font-size: 13.5px; font-weight: 700; letter-spacing: .01em; margin-bottom: 18px;
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: block; }

.section-head { max-width: 740px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head--center { max-width: 680px; margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(29px, 4.2vw, 46px); font-weight: 800; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 58ch; }
.section-head--center p { margin-inline: auto; }

/* --- Первый экран: цветная шапка ---------------------------------------- */

.hero-brand {
    background: linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 48%, var(--brand-c) 100%);
    color: #fff;
    /* Нижний отступ большой намеренно: на него наезжает карточка конструктора. */
    padding-block: clamp(48px, 7vw, 86px) clamp(120px, 14vw, 168px);
    text-align: center;
}
.hero-brand-inner { display: grid; justify-items: center; }

.hero-kicker {
    font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}
.hero-brand h1 {
    margin-top: 18px;
    font-size: clamp(38px, 7vw, 86px); font-weight: 300; letter-spacing: -.03em; color: #fff;
}
.hero-brand-sub {
    margin-top: 22px; max-width: 760px;
    font-size: clamp(16.5px, 2vw, 20px); line-height: 1.6; color: rgba(255, 255, 255, .9);
}

.hero-chips { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.hero-chips span {
    padding: 9px 17px; border-radius: 999px; background: rgba(255, 255, 255, .17);
    font-size: 14.5px; font-weight: 500; color: #fff;
}

/* Шапка сайта поверх градиента: на главной она прозрачная и светлая,
   после прокрутки становится обычной белой.
   Градиент подтягивается под шапку отрицательным отступом, а её высота
   компенсируется сверху - иначе над цветом остаётся белая полоса. */
.page-home .hero-brand { margin-top: -74px; padding-top: calc(74px + clamp(48px, 7vw, 86px)); }
.page-home .site-header { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.page-home .site-header .header-inner .brand,
.page-home .site-header .header-inner .header-nav a { color: #fff; }
.page-home .site-header .header-inner .header-nav a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.page-home .site-header .header-inner .brand-mark { background: rgba(255, 255, 255, .2); box-shadow: none; }
.page-home .site-header .header-inner .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.page-home .site-header .header-inner .btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.page-home .site-header .header-inner .btn-primary { background: #fff; color: var(--brand-c); box-shadow: none; }
.page-home .site-header .header-inner .burger { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }
.page-home .site-header .header-inner .burger span { background: #fff; }

.page-home .site-header.is-stuck {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.page-home .site-header.is-stuck .header-inner .brand { color: var(--ink); }
.page-home .site-header.is-stuck .header-inner .header-nav a { color: var(--ink-2); }
.page-home .site-header.is-stuck .header-inner .header-nav a:hover { background: var(--surface-2); color: var(--ink); }
.page-home .site-header.is-stuck .header-inner .brand-mark { background: linear-gradient(140deg, var(--brand-a), var(--brand-c)); }
.page-home .site-header.is-stuck .header-inner .btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.page-home .site-header.is-stuck .header-inner .btn-primary { background: linear-gradient(135deg, var(--accent-light), var(--accent) 60%, var(--accent-deep)); color: #fff; }
.page-home .site-header.is-stuck .header-inner .burger { background: #fff; border-color: var(--line); }
.page-home .site-header.is-stuck .header-inner .burger span { background: var(--ink); }

/* --- Телефон с живым примером ------------------------------------------ */

.phone-stage { position: relative; display: flex; justify-content: center; padding-inline: 44px; }

.phone {
    position: relative; width: 300px; flex: 0 0 300px;
    background: #0B0C1C; border-radius: 44px; padding: 10px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(18, 19, 43, .06);
}
.phone-screen { border-radius: 35px; overflow: hidden; background: #fff; height: 588px; position: relative; }
/* Чёлки у примеров нет намеренно: она ничего не объясняет и только
   отъедает место под аватаркой. */
.ml { height: 100%; overflow: hidden; padding: 30px 20px 22px; display: flex; flex-direction: column; gap: 13px; }
.ml--mint { background: linear-gradient(168deg, #EAFBF2 0%, #D6F3E7 52%, #CFEFF4 100%); }
.ml--peach { background: linear-gradient(168deg, #FFF3EC 0%, #FFE4D6 55%, #FFD9E4 100%); }
.ml--night { background: linear-gradient(168deg, #1B1F36 0%, #241F4E 60%, #2A1F45 100%); }
.ml--lilac { background: linear-gradient(168deg, #F1EEFF 0%, #E6E0FF 55%, #EFE2FF 100%); }

/* Фон экрана - картинка из админки.
   Градиент темы остаётся под ней: если файл не откроется, экран вернётся к
   своему цвету, а не станет белым с нечитаемым текстом. Сам адрес картинки
   ставится в разметке - он у каждого примера свой. */
.ml.has-bg {
    position: relative;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* Подложка: без неё имя и подписи теряются на светлой или пёстрой фотографии.
   Сверху и снизу темнее, в середине почти прозрачная - картинку видно, текст
   читается. Абсолютное положение выводит подложку из flex-раскладки, поэтому
   она не становится ещё одной строкой на экране. */
.ml.has-bg::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg,
        rgba(8, 10, 26, .52) 0%, rgba(8, 10, 26, .18) 34%,
        rgba(8, 10, 26, .26) 66%, rgba(8, 10, 26, .58) 100%);
}
.ml.has-bg > * { position: relative; z-index: 1; }

/* На своей картинке текст всегда светлый - какой бы ни была тема. */
.ml.has-bg .ml-name { color: #fff; text-shadow: 0 1px 10px rgba(8, 10, 26, .5); }
.ml.has-bg .ml-role { color: rgba(255, 255, 255, .88); text-shadow: 0 1px 8px rgba(8, 10, 26, .5); }
/* Кнопки - матовое стекло: подпись читается, а фон остаётся виден. */
.ml.has-bg .ml-btn {
    background: rgba(255, 255, 255, .17); color: #fff;
    border: 1px solid rgba(255, 255, 255, .26);
    backdrop-filter: blur(9px) saturate(140%); -webkit-backdrop-filter: blur(9px) saturate(140%);
    box-shadow: 0 6px 18px rgba(8, 10, 26, .18);
}
.ml.has-bg .ml-socials span {
    background: rgba(255, 255, 255, .19); border: 1px solid rgba(255, 255, 255, .26);
    backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}
/* Кружок аватара на картинке нужно отделить от неё светлым ободком. */
.ml.has-bg .ml-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 10px 26px rgba(8, 10, 26, .35); }

.ml-avatar {
    width: 78px; height: 78px; border-radius: 50%; margin: 4px auto 2px;
    display: grid; place-items: center; font-size: 27px; font-weight: 800; color: #fff;
    box-shadow: 0 10px 24px rgba(18, 19, 43, .18); border: 3px solid rgba(255, 255, 255, .85);
    flex: 0 0 auto; aspect-ratio: 1; overflow: hidden;
}
/* Загруженная аватарка перекрывает градиент и подрезается по кругу.
   flex: 0 0 auto и aspect-ratio - иначе в колонке телефона кружок
   сплющивается: места по высоте меньше, чем просят все кнопки. */
.ml-avatar.has-photo { overflow: hidden; padding: 0; }
.ml-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.ml-name { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: #12132B; }
.ml-role { text-align: center; font-size: 13.5px; color: #5A6084; margin-top: -7px; line-height: 1.45; }
.ml--night .ml-name { color: #F4F3FB; }
.ml--night .ml-role { color: #B7B3D6; }

.ml-btn {
    display: flex; align-items: center; gap: 10px; padding: 12px 13px;
    white-space: nowrap; overflow: hidden;
    background: rgba(255, 255, 255, .92); border-radius: 15px; font-size: 14.5px; font-weight: 600;
    color: #12132B; box-shadow: 0 3px 10px rgba(18, 19, 43, .07);
}
.ml--night .ml-btn { background: rgba(255, 255, 255, .13); color: #EDEBF8; box-shadow: none; }
.ml-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ml-btn i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 26px; }
.ml-btn i svg { width: 14px; height: 14px; }

.ml-socials { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.ml-socials span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .92); box-shadow: 0 3px 10px rgba(18, 19, 43, .07); }
.ml--night .ml-socials span { background: rgba(255, 255, 255, .13); }
.ml-socials svg { width: 16px; height: 16px; }
.example .phone-stage { padding-inline: 0; }

.phone-badge {
    position: absolute; display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 16px; background: #fff; border-radius: 999px;
    box-shadow: var(--shadow-md); font-size: 14px; font-weight: 700; color: var(--ink);
    white-space: nowrap; z-index: 2;
}
.phone-badge svg { width: 16px; height: 16px; flex: 0 0 16px; }
.phone-badge--tl { top: 30px; left: 0; color: var(--accent-deep); }
.phone-badge--br { bottom: 58px; right: 0; color: var(--c-coral); }
.phone-badge--bl { bottom: 150px; left: -44px; color: var(--c-sky); }

/* --- Конструктор на главной --------------------------------------------- */

/* Отступ сверху - чтобы липкая шапка не накрывала блок при переходе по якорю. */
.builder-section { padding-bottom: clamp(48px, 7vw, 88px); scroll-margin-top: 90px; }

/* Карточка заходит на цветную шапку: главное действие оказывается на стыке
   и притягивает взгляд без отдельной кнопки «прокрутите ниже». */
.builder-card {
    margin-top: clamp(-150px, -13vw, -96px);
    position: relative; z-index: 2;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); overflow: hidden;
}

/* Кнопки выбора стоят ровно по центру карточки, а пометка «предпросмотр
   вживую» - справа от них. Обычный flex так не умеет: он делит место между
   двумя блоками, и кнопки уезжают влево. Поэтому три колонки - пустая,
   кнопки, пометка. Крайние колонки одинаковой ширины, значит середина
   остаётся серединой и когда пометка спрятана на вкладке нейросети. */
.builder-head {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
    padding: 20px 22px; border-bottom: 1px solid var(--line-soft);
}
.builder-tabs { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.builder-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--line);
    font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-2); background: #fff;
    cursor: pointer;
}
.builder-tab svg { width: 17px; height: 17px; flex: 0 0 17px; }
.builder-tab:hover { text-decoration: none; border-color: var(--accent-light); color: var(--accent); }
.builder-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.builder-tab.is-active:hover { color: #fff; border-color: var(--ink); }

.builder-live {
    grid-column: 3; justify-self: end;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.builder-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: block; }
/* display: inline-flex сильнее атрибута hidden - без этой строки пометка
   «предпросмотр вживую» остаётся висеть на вкладке нейросети. */
.builder-live[hidden] { display: none; }

/* На узком экране три колонки не помещаются: пометка съезжает под кнопки,
   а сами кнопки становятся во всю ширину карточки и остаются по центру. */
@media (max-width: 860px) {
    .builder-head { grid-template-columns: 1fr; justify-items: center; gap: 12px; padding: 18px 16px; }
    .builder-tabs { grid-column: 1; width: 100%; }
    .builder-live { grid-column: 1; justify-self: center; }
    .builder-tab { flex: 1 1 200px; justify-content: center; }
}

.builder-body { position: relative; background: #fff; min-height: 560px; }
.builder-body iframe { display: block; width: 100%; height: 640px; border: 0; }

.builder-loading { position: absolute; inset: 0; display: grid; place-items: center; gap: 12px;
    background: #fff; color: var(--muted); font-size: 15px; transition: opacity .3s ease; }
.builder-loading.is-hidden { opacity: 0; pointer-events: none; }

.builder-cta { padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 56px); display: grid; gap: 18px; justify-items: center;
    text-align: center; background: linear-gradient(120deg, #F7F6FF 0%, #F1F4FF 100%); }
.builder-cta h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; max-width: 20ch; }
.builder-cta p { color: var(--ink-2); max-width: 54ch; font-size: 17.5px; }

/* --- Форма-затравка конструктора ----------------------------------------- */

.starter { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(24px, 3vw, 36px); padding: clamp(24px, 3vw, 34px); }
/* display: grid перебивает атрибут hidden - без этой строки при переключении
   вкладки обе панели остаются на экране. */
.starter[hidden], .ai-pane[hidden] { display: none; }
.starter-form { min-width: 0; display: grid; gap: 22px; }

.starter .field { display: grid; gap: 10px; }
.starter .field > label {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.field-note { font-weight: 600; letter-spacing: .06em; color: #A5AAC6; }

.starter input[type="text"] {
    width: 100%; height: 52px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.starter input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(75, 71, 229, .12); }
.starter input[type="text"]::placeholder { color: #A5AAC6; }

/* Радиокнопки скрыты визуально, но остаются доступными с клавиатуры. */
.swatch input, .pill input { position: absolute; opacity: 0; width: 0; height: 0; }

.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { display: grid; justify-items: center; gap: 6px; cursor: pointer; }
.swatch span {
    width: 48px; height: 48px; border-radius: 14px; display: block;
    border: 2px solid var(--line); transition: border-color .18s ease, transform .18s ease;
}
.swatch b { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.swatch:hover span { transform: translateY(-2px); }
.swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 3px #fff inset; }
.swatch input:checked ~ b { color: var(--ink); font-weight: 600; }
.swatch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Квадратик «свой фон» - последний в том же ряду, что готовые оформления.
   Пока файла нет - плюс на пунктире, после загрузки - сама картинка и
   крестик, чтобы её убрать.

   Классы у плитки СВОИ, а не .swatch. Так сделано намеренно: правило
   «.swatch span» описывает цветной квадратик темы и весит больше, чем
   одиночный класс, поэтому плитка получала от него display: block и сплошную
   рамку - плюс уезжал в угол, а пунктира не было вовсе.

   Размеры повторяют .swatch намеренно: это соседи в одном ряду, и они должны
   совпадать. */
.bgtile { display: grid; justify-items: center; gap: 6px; }
/* Отдельная обёртка ровно вокруг квадратика: крестик должен цепляться за его
   угол, а не за угол всей колонки - иначе он съезжает вслед за подписью. */
.bgtile-slot { position: relative; display: inline-flex; line-height: 0; }
.bgtile-face { display: block; cursor: pointer; }
.bgtile-face input { position: absolute; opacity: 0; width: 0; height: 0; }
.bgtile-img {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    border: 2px dashed var(--line); background: #fff; color: var(--muted);
    font-size: 22px; font-weight: 700; line-height: 1;
    background-size: cover; background-position: center;
    transition: border-color .18s ease, transform .18s ease, color .18s ease;
}
.bgtile-label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.bgtile:hover .bgtile-img { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.bgtile-face input:focus-visible + .bgtile-img { outline: 3px solid var(--accent); outline-offset: 3px; }
/* С картинкой плюс больше не нужен, а рамка становится такой же, как у
   выбранного оформления - видно, что фон сейчас именно этот. */
.bgtile-img.has-file { border-style: solid; border-color: var(--ink); font-size: 0; }
/* Класс is-set вешает скрипт - так же, как у тем подпись темнеет у выбранной. */
.bgtile.is-set .bgtile-label { color: var(--ink); font-weight: 600; }

.bgtile-clear {
    position: absolute; top: -7px; right: -7px; z-index: 2;
    width: 21px; height: 21px; padding: 0; border-radius: 50%;
    border: 1px solid var(--line); background: #fff; color: var(--ink-2);
    font: inherit; font-size: 15px; line-height: 1; cursor: pointer;
    display: grid; place-items: center;
    box-shadow: 0 4px 10px rgba(18, 19, 43, .2);
}
.bgtile-clear[hidden] { display: none; }
.bgtile-clear:hover { background: #FFE8E6; border-color: #FFC9C4; color: #B42318; }

.pill-choice { display: flex; flex-wrap: wrap; gap: 9px; }
.pill { cursor: pointer; }
.pill span {
    display: inline-block; padding: 10px 18px; border-radius: 999px;
    border: 1.5px solid var(--line); font-size: 14.5px; font-weight: 600; color: var(--ink-2); background: #fff;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.pill:hover span { border-color: var(--accent-light); color: var(--accent); }
.pill input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
    display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px;
    border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 14.5px; font-weight: 600;
    color: var(--ink-2); cursor: pointer; transition: border-color .18s ease, color .18s ease, opacity .18s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[disabled] { opacity: .4; cursor: default; }
.chip[disabled]:hover { border-color: var(--line); color: var(--ink-2); }

/* Звёздочка у кнопок с законодательной пометкой и сама сноска. */
.legal-mark { font-size: .72em; line-height: 1; margin-left: 2px; color: var(--muted); }
.chip:hover .legal-mark { color: inherit; }
.legal-note {
    margin-top: 4px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--muted); font-size: 12.5px; line-height: 1.6;
}

.link-rows { display: grid; gap: 10px; }
.link-rows:empty { display: none; }
.link-row { display: flex; align-items: center; gap: 10px; }
.link-row-label {
    flex: 0 0 132px; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-row input { flex: 1 1 auto; min-width: 0; }
.link-row-remove {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line);
    background: #fff; color: var(--muted); cursor: pointer; font: inherit; font-size: 20px; line-height: 1;
    display: grid; place-items: center; padding: 0;
}
.link-row-remove:hover { border-color: #F2B8B0; color: #C3412F; }

.starter-actions { display: grid; gap: 14px; justify-items: start; }
.starter-hint { color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 60ch; }

/* Предпросмотр - наша вёрстка, обновляется скриптом по мере ввода. */
.starter-preview {
    background: var(--surface-2); border-radius: var(--radius-lg);
    padding: 26px 20px 20px; display: grid; justify-items: center; gap: 14px; align-content: start;
}
.preview-phone {
    width: 264px; border-radius: 34px; border: 8px solid var(--ink); background: #f4f6fb;
    padding: 0; overflow: hidden;
}
/* Высота фиксированная, содержимое прокручивается - как на настоящем
   телефоне. Иначе карточка растёт с каждой кнопкой и страница дёргается
   прямо во время ввода. */
.preview-screen { height: 476px; overflow-y: auto; padding: 26px 18px 22px; display: grid; justify-items: center; gap: 10px; align-content: start; }
.preview-avatar { width: 72px; height: 72px; border-radius: 50%; background: rgba(18, 19, 43, .1); display: block;
    background-size: cover; background-position: center; }
.preview-name { font-size: 19px; font-weight: 800; text-align: center; line-height: 1.25; word-break: break-word; }
.preview-bio { font-size: 13.5px; text-align: center; line-height: 1.45; opacity: .75; word-break: break-word; }
.preview-bio { min-height: 20px; }
.preview-buttons { width: 100%; display: grid; gap: 9px; margin-top: 8px; }
.preview-empty {
    display: grid; place-items: center; height: 54px; border-radius: 13px;
    border: 1.5px dashed rgba(18, 19, 43, .18); font-size: 13px; opacity: .6; text-align: center; padding: 0 10px;
}
.preview-btn {
    height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; padding: 0 12px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Темы предпросмотра повторяют пресеты vizvi - чтобы выбор здесь
   совпадал с тем, что человек увидит в конструкторе. */
.preview-phone[data-preview-theme="light"] .preview-screen { background: #f4f6fb; color: #101828; }
.preview-phone[data-preview-theme="sky"] .preview-screen { background: linear-gradient(135deg, #e0f2fe, #ede9fe); color: #1e293b; }
.preview-phone[data-preview-theme="mint"] .preview-screen { background: linear-gradient(135deg, #dcfce7, #ccfbf1); color: #0f2f24; }
.preview-phone[data-preview-theme="paper"] .preview-screen { background: linear-gradient(135deg, #fdf6ec, #f7e8d3); color: #2c2318; }
.preview-phone[data-preview-theme="dark"] .preview-screen { background: #0b1220; color: #f1f5f9; }
.preview-phone[data-preview-theme="brand"] .preview-screen { background: linear-gradient(135deg, #4169ff, #7c3aed); color: #fff; }
.preview-phone[data-preview-theme="dark"] .preview-avatar,
.preview-phone[data-preview-theme="brand"] .preview-avatar { background-color: rgba(255, 255, 255, .22); }
.preview-phone[data-preview-theme="dark"] .preview-empty,
.preview-phone[data-preview-theme="brand"] .preview-empty { border-color: rgba(255, 255, 255, .3); }

.preview-phone[data-preview-style="white"] .preview-btn { background: #fff; color: #101828; box-shadow: 0 2px 8px rgba(18, 19, 43, .08); }
.preview-phone[data-preview-style="dark"] .preview-btn { background: #101828; color: #fff; }
.preview-phone[data-preview-style="brand"] .preview-btn { background: #4169ff; color: #fff; }
.preview-phone[data-preview-style="outline"] .preview-btn { background: transparent; border: 1.5px solid currentColor; }

/* Загружена своя картинка фона. Правила стоят ПОСЛЕ тем намеренно: вес у них
   такой же, и решает порядок - картинка должна перебивать цвет темы, а не
   наоборот. Саму картинку ставит скрипт прямо в стиль элемента, вместе с
   лёгким затемнением: так же её покажет и vizvi, поэтому предпросмотр
   совпадает с тем, что человек получит. */
.preview-phone.has-bg .preview-screen {
    background-size: cover; background-position: center; background-repeat: no-repeat;
    color: #fff;
}
.preview-phone.has-bg .preview-avatar { background-color: rgba(255, 255, 255, .24); }
.preview-phone.has-bg .preview-empty { border-color: rgba(255, 255, 255, .38); }

/* --- Аватарка, тонкая настройка, файлы ------------------------------------ */

.avatar-pick { display: flex; align-items: center; gap: 18px; }
.avatar-drop { flex: 0 0 auto; cursor: pointer; }
.avatar-drop input { position: absolute; opacity: 0; width: 0; height: 0; }
.avatar-thumb {
    width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
    border: 2px dashed #D3D8EC; color: #9AA0C0; font-size: 28px; font-weight: 300;
    background-size: cover; background-position: center; transition: border-color .18s ease;
}
.avatar-drop:hover .avatar-thumb { border-color: var(--accent); }
.avatar-drop input:focus-visible + .avatar-thumb { outline: 3px solid var(--accent); outline-offset: 3px; }
.avatar-copy { min-width: 0; display: grid; gap: 4px; }
.avatar-copy b { font-size: 16px; font-weight: 600; }
.avatar-copy span { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.link-reset {
    justify-self: start; border: 0; background: none; padding: 0; font: inherit;
    font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer;
}

.fine { border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.fine > summary {
    list-style: none; cursor: pointer; padding: 15px 18px; display: flex; align-items: center; gap: 10px;
    font-size: 15px; color: var(--muted);
}
.fine > summary::-webkit-details-marker { display: none; }
.fine > summary b { color: var(--ink); font-weight: 700; }
.fine > summary::after {
    content: ""; margin-left: auto; width: 10px; height: 10px; flex: 0 0 10px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.fine[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.fine-body { padding: 4px 18px 20px; display: grid; gap: 18px; border-top: 1px solid var(--line-soft); }

.slug-input {
    display: flex; align-items: center; height: 52px; padding-left: 16px;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.slug-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(75, 71, 229, .12); }
.slug-input > span { color: var(--muted); font-size: 15px; white-space: nowrap; }
.starter .slug-input input[type="text"] { border: 0; box-shadow: none; padding-left: 2px; height: 48px; }
.starter .slug-input input[type="text"]:focus { box-shadow: none; }

.file-row {
    display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; cursor: pointer;
    border: 1.5px dashed #D3D8EC; border-radius: var(--radius-sm); color: var(--ink-2);
    font-size: 15px; font-weight: 500; transition: border-color .18s ease, color .18s ease;
}
.file-row:hover { border-color: var(--accent); color: var(--accent); }
.file-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.file-row span { overflow-wrap: anywhere; }

/* --- Вкладка «нейросеть» -------------------------------------------------- */

/* Панель нейросети - по центру, как на vizvi: крупный заголовок, широкое
   поле и одна кнопка. Поэтому здесь своя разметка, а не колонка формы. */
.ai-pane {
    padding: clamp(32px, 5vw, 60px) clamp(20px, 4vw, 48px) clamp(32px, 4vw, 48px);
    display: grid; gap: 24px; justify-items: center; text-align: center;
    max-width: 860px; margin-inline: auto; width: 100%;
}
.ai-copy { display: grid; justify-items: center; gap: 0; }
.ai-copy h2 {
    font-size: clamp(26px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em;
    max-width: 26ch; text-wrap: balance;
}
.ai-copy p { margin-top: 16px; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 58ch; }
.ai-pane textarea {
    width: 100%; padding: 14px 16px; font: inherit; font-size: 16px; line-height: 1.55; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); outline: none;
    resize: vertical; min-height: 130px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.ai-pane textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(75, 71, 229, .12); }
.ai-pane textarea::placeholder { color: #A5AAC6; }
.ai-pane .field { display: grid; gap: 10px; width: 100%; text-align: left; }
.ai-pane .field > label {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.ai-pane .starter-hint { text-align: center; margin-inline: auto; }
.ai-pane .ai-counter { text-align: right; margin-inline: 0; margin-left: auto; }
.ai-pane .starter-actions { justify-items: center; width: 100%; }
.ai-pane .file-row { justify-content: center; }

/* --- Шаблоны: карусель --------------------------------------------------- */

.templates-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.templates-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.templates-head p { margin-top: 10px; color: var(--muted); font-size: 17px; max-width: 58ch; }
.templates-nav { display: flex; gap: 10px; flex: 0 0 auto; }

.carousel-btn {
    width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line);
    background: #fff; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:hover { border-color: var(--accent); color: var(--accent); }
.carousel-btn.is-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.carousel-btn.is-dark:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.carousel-btn[disabled] { opacity: .35; cursor: default; }
.carousel-btn[disabled]:hover { border-color: var(--line); color: var(--muted); }
.carousel-btn.is-dark[disabled]:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Лента во всю ширину экрана. Ширина карточки считается от ширины ленты
   (--per-view штук в ряд), поэтому на широком мониторе телефоны становятся
   крупнее, а не многочисленнее. Прокрутка пальцем работает и без JS.

   padding снизу и по бокам - не украшение: overflow: auto обрезает всё, что
   выходит за рамку ленты, и без запаса тень телефона срезалась бы ровной
   линией. Отступ снизу компенсируется отрицательным margin, чтобы под лентой
   не появилась дыра. */
.templates-rail {
    --tpl-gap: clamp(14px, 1.6vw, 26px);
    --per-view: 5;
    display: flex; gap: var(--tpl-gap); margin-top: clamp(28px, 4vw, 40px);
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-inline: clamp(20px, 3vw, 46px);
    scroll-padding-inline: clamp(20px, 3vw, 46px);
    padding-block: 10px 60px; margin-bottom: -46px;
    scrollbar-width: none;
}
.templates-rail::-webkit-scrollbar { display: none; }

/* Сколько телефонов в ряду на разной ширине. Дробное число на телефоне -
   чтобы из-за края выглядывал следующий: сразу понятно, что лента листается. */
@media (max-width: 1160px) { .templates-rail { --per-view: 4; } }
@media (max-width: 900px)  { .templates-rail { --per-view: 3; } }
@media (max-width: 680px)  { .templates-rail { --per-view: 2; } }
@media (max-width: 480px)  { .templates-rail { --per-view: 1.35; } }

.tpl {
    flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--tpl-gap)) / var(--per-view));
    min-width: 0; scroll-snap-align: start;
    /* align-content: start - иначе в карточке с более длинной подписью
       строки разъезжаются, и подписи в ряду стоят на разной высоте. */
    display: grid; gap: 4px; align-content: start; justify-items: center;
    text-align: center;
}
.tpl b { font-size: 16.5px; font-weight: 700; margin-top: 16px; }
/* Две строки под описание всегда - иначе кнопки «Использовать» в ряду
   стоят на разной высоте. */
.tpl span { color: var(--muted); font-size: 14.5px; line-height: 1.45; min-height: 2.9em; }

/* Корпус телефона - как в галерее шаблонов vizvi: тёмная рамка,
   скругление 44px и полоска динамика сверху. Ширина экрана задана
   переменной: от неё же считается масштаб рамки предпросмотра. */
.tpl-phone {
    position: relative; width: 100%; aspect-ratio: 330 / 700;
    /* Ширина рамки - только длина: проценты в border-width недопустимы,
       и всё правило вместе с цветом молча пропадает, а корпус телефона
       исчезает. Поэтому vw, а не %. */
    border: clamp(7px, .62vw, 12px) solid #0b1220; border-radius: clamp(26px, 2.5vw, 48px);
    background: #0b1220; overflow: hidden;
    /* Мягкая и неглубокая тень: густую при пяти телефонах в ряд видно как
       серую плиту под лентой, а не как тень у каждого. */
    box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
    transition: transform .28s ease, box-shadow .28s ease;
}
.tpl:hover .tpl-phone { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(15, 23, 42, .22); }
.tpl-phone::before {
    content: ""; position: absolute; top: 2.4%; left: 50%; transform: translateX(-50%);
    width: 38%; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .22); z-index: 6;
}
.tpl-screen { position: absolute; inset: 0; border-radius: clamp(19px, 1.95vw, 38px); overflow: hidden; background: #f3f6fb; }

/* Предпросмотр рисует разметка vizvi внутри рамки без скриптов.
   Рамка того же размера, что экран телефона в галерее vizvi (310x700), и
   уменьшается transform - пропорции текста и кнопок получаются ровно как там.
   Множитель считает JS от реальной ширины экрана телефона: в CSS нельзя
   поделить одну длину на другую и получить безразмерное число. Значение по
   умолчанию - на случай, если скрипты не выполнились. */
.tpl-frame {
    width: 310px; height: 700px; border: 0; display: block;
    transform: scale(var(--tpl-scale, .62)); transform-origin: top left; pointer-events: none;
}
.tpl-image { width: 100%; height: 100%; object-fit: cover; }
.tpl-blank { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 14px; text-align: center; padding: 0 16px; }

.tpl-open {
    position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 7; text-align: center;
    padding: 10px 12px; border-radius: 14px; background: rgba(18, 19, 43, .86); color: #fff;
    font-size: 13.5px; font-weight: 700; opacity: 0; transition: opacity .18s ease;
}
.tpl:hover .tpl-open, .tpl-open:focus-visible { opacity: 1; }
.tpl-open:hover { text-decoration: none; color: #fff; }

.tpl-use { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
    .tpl-phone, .tpl:hover .tpl-phone { transition: none; transform: none; }
}

.templates-more { margin-top: 26px; }
.templates-more a { font-weight: 600; }

/* --- Цветные полосы ------------------------------------------------------ */

.band { padding-block: clamp(52px, 7vw, 88px); }
.band-inner { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.band--flip .band-inner { grid-template-columns: minmax(0, 1fr) 340px; }
.band--flip .band-visual { order: 2; }

.band-visual { display: flex; justify-content: center; }
.band-visual .phone-stage { padding-inline: 0; }
.band-visual .phone { width: 272px; flex-basis: 272px; border-radius: 40px; }
.band-visual .phone-screen { height: 534px; border-radius: 31px; }

.band-copy h2 { font-size: clamp(28px, 4.4vw, 50px); font-weight: 800; letter-spacing: -.03em; max-width: 16ch; }
.band-copy p { margin-top: 20px; font-size: clamp(16.5px, 1.8vw, 19px); line-height: 1.65; max-width: 56ch; }
.band-copy .btn { margin-top: 28px; }

.band-figures { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 30px; }
.band-figures b { display: block; font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.band-figures span { font-size: 15px; }

.band--sun { background: var(--band-sun); color: #2B2612; }
.band--sun .band-copy p { color: #4A421F; }
.band--sun .btn-band { background: var(--ink); color: #fff; }

.band--leaf { background: var(--band-leaf); color: #fff; }
.band--leaf .band-copy p, .band--leaf .band-figures span { color: #DFF6EB; }
.band--leaf .btn-band { background: #fff; color: #0B6B44; }

.band--night { background: var(--band-night); color: #fff; }
.band--night .band-copy p { color: #C6C2EC; }
.band--night .btn-band { background: #fff; color: var(--band-night); }

.btn-band { border-color: transparent; box-shadow: var(--shadow-md); }
.btn-band:hover { transform: translateY(-2px); }

/* Карточка статистики - вёрстка, а не картинка: масштабируется без потери. */
.stat-card { width: 272px; background: #fff; color: var(--ink); border-radius: 26px; padding: 24px 22px; box-shadow: var(--shadow-lg); }
.stat-card-cap { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat-chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; margin-top: 18px; }
.stat-chart i { flex: 1 1 0; border-radius: 6px 6px 0 0; background: #C9EEDC; display: block; }
.stat-chart i.is-hot { background: var(--band-leaf); }
.stat-rows { margin-top: 22px; display: grid; gap: 11px; }
.stat-rows div { display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; padding-bottom: 11px; border-bottom: 1px solid var(--line-soft); }
.stat-rows div:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-rows b { font-weight: 700; }

/* --- Финальный призыв ---------------------------------------------------- */

.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; }
.cta-final p { margin: 18px auto 0; max-width: 640px; color: var(--muted); font-size: 18px; }
.cta-final-actions { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* --- Шаги --------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 28px; box-shadow: var(--shadow-sm); }
.step-num {
    width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
    font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 20px;
    background: linear-gradient(140deg, var(--accent-light), var(--accent));
    box-shadow: 0 8px 18px rgba(15, 163, 107, .26);
}
.step:nth-child(2) .step-num { background: linear-gradient(140deg, #FFC46B, var(--c-amber)); box-shadow: 0 8px 18px rgba(255, 164, 18, .26); }
.step:nth-child(3) .step-num { background: linear-gradient(140deg, #FF9E86, var(--c-coral)); box-shadow: 0 8px 18px rgba(255, 107, 74, .26); }
.step h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 16px; }

/* --- Карточки аудитории ------------------------------------------------- */

.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 28px 26px; box-shadow: var(--shadow-sm);
    transition: transform .2s cubic-bezier(.2,.8,.3,1), box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #CFE6DA; }
.card h3 { font-size: 19.5px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }

.card-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px; }
.card-icon svg { width: 23px; height: 23px; }
.i-mint   { background: #E3F6EC; color: var(--c-mint); }
.i-coral  { background: #FFEBE5; color: var(--c-coral); }
.i-violet { background: #EEEAFF; color: var(--c-violet); }
.i-amber  { background: #FFF2DC; color: #D98800; }
.i-sky    { background: #E2F2FE; color: var(--c-sky); }
.i-pink   { background: #FFE7F1; color: var(--c-pink); }

/* --- Примеры ------------------------------------------------------------ */

.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); justify-items: center; }
.example { display: grid; justify-items: center; gap: 18px; }
.example .phone { width: 262px; flex-basis: 262px; border-radius: 40px; }
.example .phone-screen { height: 512px; border-radius: 31px; }
.example-label { text-align: center; }
.example-label b { display: block; font-size: 17.5px; font-weight: 700; }
.example-label span { color: var(--muted); font-size: 15px; }

/* --- Вопросы ------------------------------------------------------------ */

.faq { display: grid; gap: 12px; max-width: 880px; margin-inline: auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.faq-item.is-open { box-shadow: var(--shadow); border-color: #CFE6DA; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit;
    font-weight: 600; font-size: 17.5px; color: var(--ink); padding: 22px 60px 22px 26px; position: relative; line-height: 1.4; }
.faq-q::after {
    content: ""; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230FA36B' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-size: 14px; background-position: center; background-repeat: no-repeat;
    transition: transform .22s ease;
}
.faq-item.is-open .faq-q::after { transform: translateY(-50%) rotate(180deg); }
.faq-a { padding: 0 26px 24px; color: var(--muted); font-size: 16.5px; max-width: 70ch; }
.faq-a[hidden] { display: none !important; }

/* --- Текстовая страница ------------------------------------------------- */

.prose { max-width: 68ch; font-size: 17.5px; color: var(--ink-2); overflow-wrap: break-word; }
.prose h2 { font-size: 28px; font-weight: 800; margin: 36px 0 14px; color: var(--ink); }
.prose h3 { font-size: 21px; font-weight: 700; margin: 26px 0 10px; color: var(--ink); }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
/* Широкая таблица из WordPress не должна распирать страницу на телефоне -
   прокручивается внутри своей обёртки. */
.prose .wp-block-table, .prose figure:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 560px) { .prose table { font-size: 14.5px; } .prose th, .prose td { padding: 8px 9px; } }
.prose blockquote { margin: 0 0 18px; padding: 16px 22px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 14px 14px 0; }
/* Картинки в тексте статьи приезжают из WordPress со своими размерами -
   без этих двух строк широкая картинка растягивает страницу вбок. */
.prose img { max-width: 100%; height: auto; border-radius: 16px; display: block; margin: 0 0 18px; }
.prose .post-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 18px; border-radius: 16px; overflow: hidden; background: #000; }
.prose .post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose figure { margin: 0 0 18px; }
.prose figcaption { font-size: 14px; color: var(--muted, #6b7280); margin-top: 6px; }
.prose figure { margin: 0 0 22px; }
.prose figcaption { color: var(--muted); font-size: 14.5px; margin-top: -8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose pre { background: var(--ink); color: #EDEBF8; padding: 16px 18px; border-radius: 14px; overflow-x: auto; margin-bottom: 18px; }
.prose code { font-size: .92em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }

/* --- Блог --------------------------------------------------------------- */

.blog-head { padding-block: clamp(36px, 5vw, 66px) clamp(26px, 3vw, 38px); }
.blog-head h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; margin-top: 14px; }
.blog-head > .container > p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 62ch; line-height: 1.6; }

.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.blog-cats a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line);
    background: #fff; color: var(--ink-2); font-size: 14.5px; font-weight: 600;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.blog-cats a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.blog-cats a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.blog-cats a b { font-weight: 700; font-size: 12.5px; opacity: .55; }

.blog-empty { color: var(--muted); font-size: 17px; }

.post-grid { display: grid; gap: clamp(18px, 2vw, 26px); grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.post-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: transparent; box-shadow: 0 18px 40px rgba(18, 19, 43, .1); }

.post-cover { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover.is-blank { display: grid; place-items: center; background: linear-gradient(140deg, var(--accent-soft), var(--surface-2)); }
.post-cover.is-blank svg { width: 34px; height: 34px; color: var(--accent); opacity: .5; }

.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; }
.post-cat { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.post-card h2 { font-size: 19px; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { text-decoration: none; color: var(--accent); }
.post-card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.post-meta { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: 13.5px; }

/* --- Постраничная навигация --------------------------------------------- */

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: clamp(32px, 4vw, 48px); }
.pager-num, .pager-arrow {
    display: inline-flex; align-items: center; gap: 6px; min-width: 42px; height: 42px;
    padding-inline: 14px; border-radius: 12px; border: 1px solid var(--line);
    background: #fff; color: var(--ink-2); font-weight: 600; font-size: 15px; justify-content: center;
}
.pager-num:hover, .pager-arrow:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.pager-num.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager-arrow svg { width: 16px; height: 16px; }

/* --- Страница статьи ----------------------------------------------------- */

.post-head { padding-block: clamp(30px, 4vw, 52px) clamp(20px, 2.5vw, 30px); }
.post-head h1 { font-size: clamp(30px, 4.6vw, 50px); font-weight: 800; letter-spacing: -.03em; max-width: 22ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14.5px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); text-decoration: none; }

.post-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.post-facts > * { display: inline-flex; align-items: center; gap: 7px; }
.post-facts > * + *::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* Баннер всегда одной формы, какой бы ни загрузили картинку - иначе
   вертикальное фото занимает весь экран и статьи не видно. */
.post-hero { margin: 0 0 clamp(26px, 3vw, 40px); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; max-height: 460px; object-fit: cover; display: block; }

.post-layout { padding-bottom: clamp(40px, 5vw, 70px); }
.post-body { max-width: 72ch; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.post-tags a {
    padding: 7px 13px; border-radius: 999px; background: var(--surface-2);
    color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.post-tags a:hover { text-decoration: none; color: var(--accent); background: var(--accent-soft); }

.post-cta {
    margin-top: clamp(34px, 4vw, 50px); padding: clamp(22px, 3vw, 30px);
    border-radius: var(--radius); background: var(--ink); color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
}
.post-cta b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.post-cta span { display: block; margin-top: 7px; color: rgba(255, 255, 255, .72); font-size: 15.5px; max-width: 48ch; }
.post-cta .btn { flex: 0 0 auto; }

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

.site-footer { margin-top: auto; background: var(--surface-2); border-top: 1px solid var(--line-soft); padding-block: 56px 34px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-about { color: var(--muted); font-size: 15.5px; margin-top: 16px; max-width: 40ch; }
.footer-col h4 { font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-col nav { display: grid; gap: 10px; }
.footer-col a { color: var(--ink-2); font-size: 15.5px; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--muted); font-size: 14.5px; }

/* --- Сообщения и ошибки ------------------------------------------------- */

.alert { padding: 15px 20px; border-radius: 16px; margin-bottom: 18px; font-size: 16px; }
.alert-success { background: var(--accent-soft); color: #07603F; border: 1px solid #BFE7D3; }
.alert-error { background: #FDECE9; color: #97281A; border: 1px solid #F7CDC5; }
.alert-info { background: var(--warm-soft); color: #9A3A1E; border: 1px solid #FBD5C8; }

.error-page { padding-block: clamp(70px, 10vw, 130px); text-align: center; }
.error-code { font-size: clamp(76px, 15vw, 150px); font-weight: 800; line-height: 1; letter-spacing: -.05em;
    background: linear-gradient(140deg, var(--accent-light), var(--accent) 55%, #16C2B4);
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: clamp(27px, 4vw, 40px); font-weight: 800; margin-top: 6px; }
.error-page p { color: var(--muted); margin: 16px auto 30px; max-width: 46ch; }

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

/* Шапка прячется в бургер раньше остальных блоков: пункты меню плюс две
   кнопки перестают помещаться уже около 900px, и «Создать» вылезает за край.
   Порог отдельный, иначе при добавлении пункта в меню страница снова поедет. */
@media (max-width: 900px) {
    .header-nav, .header-actions .btn-ghost { display: none; }
    .burger { display: flex; }
}

@media (max-width: 1040px) {
    /* Без этого правила колонка предпросмотра в 360px не влезает,
       а builder-card её просто обрезает - предпросмотра не видно вовсе. */
    .starter { grid-template-columns: 1fr; }
    .starter-preview { order: -1; }
    .steps, .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .band-inner, .band--flip .band-inner { grid-template-columns: 1fr; gap: 40px; justify-items: center; text-align: center; }
    .band--flip .band-visual { order: 0; }
    .band-copy h2, .band-copy p { max-width: none; }
    .band-figures { justify-content: center; }
    .examples { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
    .builder-body iframe { height: 580px; }
}

@media (max-width: 760px) {
    body { font-size: 16.5px; }
    .starter { padding: 20px 16px; gap: 22px; }
    .starter-actions .btn { width: 100%; }
    .steps, .cards--3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .builder-cta .btn, .cta-final-actions .btn { width: 100%; }
    .templates-head { flex-direction: column; align-items: flex-start; }
    /* Поля вокруг телефона нужны были для плавающих подписей; на узком
       экране они лишь выталкивают страницу за край. */
    .phone-stage { padding-inline: 0; }
    .phone-badge--tl { top: 16px; left: 0; }
    /* На узком экране плавающие подписи наезжают на кнопки примера -
       оставляем только верхнюю. */
    .phone-badge--br, .phone-badge--bl { display: none; }
}

@media (max-width: 620px) {
    .header-inner { gap: 10px; min-height: 66px; }
    .page-home .hero-brand { margin-top: -66px; padding-top: calc(66px + 48px); }
    .brand { font-size: 17.5px; gap: 8px; }
    .brand-img img { height: 30px; max-width: 30px; }
    .brand-img--full img { height: 32px; max-width: 170px; }
    .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 10px; }
    .brand-mark svg { width: 16px; height: 16px; }
    .header-actions { gap: 8px; }
    .header-actions .btn-sm { padding: 9px 14px; font-size: 14px; }
    .burger { width: 40px; height: 40px; flex-basis: 40px; }
    .phone { width: 288px; flex-basis: 288px; }
    .phone-screen { height: 566px; }
    .ml { padding: 42px 16px 18px; gap: 11px; }
    .ml-btn { font-size: 14px; padding: 11px 13px; gap: 9px; }
}

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

/* --- Правовые документы -------------------------------------------------- */

.legal-lead { color: var(--muted); font-size: 15.5px; padding: 14px 18px; background: var(--surface-2); border-radius: 14px; margin-bottom: 26px; }
.prose h3 { font-size: 18.5px; }
/* Незаполненный реквизит должен быть заметен и в тексте, и на печати. */
.legal-gap { background: #FFE8E6; color: #B42318; padding: 1px 6px; border-radius: 6px; font-weight: 600; }

/* --- Плашка про cookie ---------------------------------------------------
   Маленькая, в углу, не перекрывает содержимое и не требует ответа, чтобы
   читать сайт. На телефоне растягивается по ширине, но остаётся низкой. */

.cookie-bar {
    position: fixed; z-index: 150;
    left: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px);
    width: min(420px, calc(100vw - 24px));
    display: flex; flex-direction: column; gap: 12px;
    padding: 16px 18px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 16px 44px rgba(18, 19, 43, .16);
    opacity: 0; transform: translateY(14px); pointer-events: none;
    transition: opacity .28s ease, transform .32s cubic-bezier(.22, .9, .3, 1);
}
.cookie-bar.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.cookie-bar.is-gone { opacity: 0; transform: translateY(14px); pointer-events: none; }

.cookie-bar p { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.cookie-bar a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-bar-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-bar-actions .btn { flex: 0 1 auto; }

@media (max-width: 480px) {
    .cookie-bar { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 14px 15px; }
    .cookie-bar-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-bar { transition: opacity .01s linear; transform: none; }
    .cookie-bar.is-gone { transform: none; }
}

/* ==========================================================================
   ДВИЖЕНИЕ

   Всё, что двигается на сайте, собрано здесь одним куском - чтобы можно было
   в любой момент увидеть полный список анимаций и при необходимости выключить
   их целиком, не выискивая по файлу.

   Три правила, которых держимся:
   1. Движение только помогает читать: подсказывает, куда смотреть, и
      показывает, что цифры на экране - живые, а не картинка.
   2. Ничего не прыгает и не мигает. Только прозрачность, сдвиг и масштаб -
      это браузер рисует на видеокарте и не пересчитывает раскладку.
   3. Если человек в настройках системы попросил убрать анимации, их нет
      совсем. Блок prefers-reduced-motion в самом низу отменяет весь раздел.
   ========================================================================== */

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

.hero-brand { position: relative; overflow: hidden; isolation: isolate; }
.hero-brand-inner { position: relative; z-index: 2; }

.hero-brand::before {
    content: ""; position: absolute; z-index: 0;
    /* Слой заметно больше шапки: края пятен не должны попадать в кадр. */
    inset: -40% -20%;
    background:
        radial-gradient(38% 46% at 22% 28%, rgba(255, 214, 102, .50), transparent 70%),
        radial-gradient(34% 42% at 78% 22%, rgba(80, 231, 255, .42), transparent 72%),
        radial-gradient(44% 50% at 60% 82%, rgba(255, 108, 196, .45), transparent 70%);
    filter: blur(14px);
    animation: heroDrift 24s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Блик: узкая светлая полоса под углом, проходит слева направо и пропадает. */
.hero-brand::after {
    content: ""; position: absolute; z-index: 1; inset: 0;
    background: linear-gradient(104deg,
        transparent 38%, rgba(255, 255, 255, .16) 47%, rgba(255, 255, 255, .30) 50%,
        rgba(255, 255, 255, .16) 53%, transparent 62%);
    background-size: 260% 100%;
    animation: heroSheen 9s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroDrift {
    0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
    50%  { transform: translate3d(4%, 3%, 0) scale(1.12); }
    100% { transform: translate3d(-2%, 4%, 0) scale(1.04); }
}
@keyframes heroSheen {
    0%, 62% { background-position: 150% 0; }
    100%    { background-position: -60% 0; }
}

/* --- Появление первого экрана -------------------------------------------
   Строки заголовка выходят снизу по очереди. Здесь скрипт не нужен: блок
   виден сразу при загрузке, и достаточно задержки у каждой строки. */

.js .hero-kicker  { animation: riseIn .7s cubic-bezier(.22, .9, .3, 1) .05s both; }
.js .hero-brand h1 { animation: riseIn .8s cubic-bezier(.22, .9, .3, 1) .14s both; }
.js .hero-brand-sub { animation: riseIn .8s cubic-bezier(.22, .9, .3, 1) .26s both; }
.js .hero-chips span { animation: riseIn .7s cubic-bezier(.22, .9, .3, 1) both; }
.js .hero-chips span:nth-child(1) { animation-delay: .38s; }
.js .hero-chips span:nth-child(2) { animation-delay: .46s; }
.js .hero-chips span:nth-child(3) { animation-delay: .54s; }
.js .hero-chips span:nth-child(4) { animation-delay: .62s; }
.js .hero-chips span:nth-child(n+5) { animation-delay: .70s; }

/* Карточка конструктора появляется последней - она главное действие. */
.js .builder-card { animation: riseIn .9s cubic-bezier(.22, .9, .3, 1) .5s both; }

@keyframes riseIn {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
    to   { opacity: 1; transform: none; }
}

/* --- Появление остальных блоков при прокрутке ---------------------------
   Класс reveal скрипт вешает сам на нужные блоки (список - в app.js), а
   когда блок доходит до экрана, добавляет is-in. Правило начинается с .js,
   поэтому без скриптов страница просто остаётся видимой целиком. */

.js .reveal { opacity: 0; transform: translate3d(0, 26px, 0);
    transition: opacity .65s ease, transform .75s cubic-bezier(.22, .9, .3, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* Соседние карточки выходят не разом, а лесенкой - шаг задаёт скрипт. */
.js .reveal { transition-delay: var(--reveal-delay, 0s); }

/* --- Телефоны -----------------------------------------------------------
   Корпус еле заметно покачивается, по стеклу проходит блик, а содержимое
   экрана (аватар, имя, кнопки) выкладывается по очереди, когда телефон
   доехал до экрана. Получается ощущение, что страницу собирают при тебе. */

.phone { animation: phoneFloat 7s ease-in-out infinite; }
/* Три телефона в ряду качаются вразнобой - одинаковый ритм выглядит
   механическим. */
.examples .example:nth-child(2) .phone { animation-duration: 8.4s; animation-delay: -2.2s; }
.examples .example:nth-child(3) .phone { animation-duration: 6.4s; animation-delay: -4.1s; }
.band--flip .phone { animation-duration: 8s; animation-delay: -3s; }

@keyframes phoneFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%      { transform: translate3d(0, -9px, 0); }
}

/* Блик по стеклу. Лежит поверх экрана, кликам не мешает. */
.phone-screen::after {
    content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
    background: linear-gradient(100deg,
        transparent 40%, rgba(255, 255, 255, .34) 48%, rgba(255, 255, 255, .5) 50%,
        rgba(255, 255, 255, .34) 52%, transparent 60%);
    background-size: 300% 100%;
    animation: screenSheen 7.5s ease-in-out infinite;
}
.examples .example:nth-child(2) .phone-screen::after { animation-delay: -2.5s; }
.examples .example:nth-child(3) .phone-screen::after { animation-delay: -5s; }

@keyframes screenSheen {
    0%, 70% { background-position: 160% 0; }
    100%    { background-position: -70% 0; }
}

/* Содержимое экрана. Скрипт ставит на телефон класс is-live, когда тот
   доехал до видимой части - до этого всё на своих местах, но прозрачное. */
.js .phone-stage .ml > * { opacity: 0; transform: translate3d(0, 14px, 0); }
.js .phone-stage.is-live .ml > * {
    animation: riseIn .55s cubic-bezier(.22, .9, .3, 1) both;
    animation-delay: calc(.06s * var(--i, 0));
}

/* Вокруг аватара расходится мягкое кольцо - взгляд человека всегда начинается
   с лица, и туда его стоит привести первым.

   Два решения, оба вынужденные.

   Кольцо нарисовано тенью, а не отдельным слоем внутри кружка: у кружка
   включено overflow: hidden (иначе загруженное фото вылезает за круг), и всё,
   что лежит внутри, по краю обрезается - кольца просто не было видно. Тень
   рисуется снаружи и под это правило не попадает.

   Появление и кольцо записаны одним списком - по той же причине, что у кнопок
   ниже: два правила с animation не складываются, второе отменяет первое
   целиком, и аватар остался бы прозрачным.

   Наборы кадров разные, потому что цвет кольца зависит от экрана: на светлой
   теме белое кольцо не видно, на тёмной - не видно тёмное. Первой в каждом
   наборе идёт обычная «лежачая» тень: пока анимация идёт, действуют только
   значения из кадров, и без неё аватар терял бы свою тень. */
.js .phone-stage.is-live .ml-avatar {
    animation:
        riseIn .55s cubic-bezier(.22, .9, .3, 1) calc(.06s * var(--i, 0)) both,
        avatarPing 4.5s ease-out 1.3s infinite;
}
.js .phone-stage.is-live .ml--night .ml-avatar { animation-name: riseIn, avatarPingLight; }
.js .phone-stage.is-live .ml.has-bg .ml-avatar { animation-name: riseIn, avatarPingBg; }

/* Светлые темы - кольцо тёмное. */
@keyframes avatarPing {
    0%        { box-shadow: 0 10px 24px rgba(18, 19, 43, .18), 0 0 0 0 rgba(18, 19, 43, .30); }
    55%, 100% { box-shadow: 0 10px 24px rgba(18, 19, 43, .18), 0 0 0 14px rgba(18, 19, 43, 0); }
}
/* Тёмная тема - кольцо светлое. */
@keyframes avatarPingLight {
    0%        { box-shadow: 0 10px 24px rgba(18, 19, 43, .18), 0 0 0 0 rgba(255, 255, 255, .55); }
    55%, 100% { box-shadow: 0 10px 24px rgba(18, 19, 43, .18), 0 0 0 14px rgba(255, 255, 255, 0); }
}
/* На фотографии у аватара есть постоянный светлый ободок - он должен остаться
   и во время анимации, поэтому повторён в каждом кадре. */
@keyframes avatarPingBg {
    0%        { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 10px 26px rgba(8, 10, 26, .35),
                            0 0 0 3px rgba(255, 255, 255, .7); }
    55%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 10px 26px rgba(8, 10, 26, .35),
                            0 0 0 17px rgba(255, 255, 255, 0); }
}

/* Кнопка примера сначала выходит вместе с остальным содержимым экрана, а
   потом изредка подпрыгивает - как будто по ней только что провели пальцем.

   Обе анимации записаны одним свойством через запятую, и это важно: если
   разнести их по двум правилам, второе перебьёт первое целиком (animation -
   не набор независимых значений, а один список), кнопка не получит
   появления и останется прозрачной навсегда. Проверено на живой странице. */
.js .phone-stage.is-live .ml-btn {
    animation:
        riseIn .55s cubic-bezier(.22, .9, .3, 1) calc(.06s * var(--i, 0)) both,
        btnNudge 9s ease-in-out calc(1.4s + 1.2s * var(--i, 0)) infinite;
}
@keyframes btnNudge {
    0%, 86%, 100% { transform: none; box-shadow: 0 1px 2px rgba(18, 19, 43, .05); }
    91%           { transform: translate3d(0, -3px, 0) scale(1.025);
                    box-shadow: 0 10px 22px rgba(18, 19, 43, .14); }
}

/* Иконки соцсетей пружинят по очереди. Они не прямые дети экрана - появлением
   заведует их общая строка, поэтому здесь конфликта нет. */
.phone-stage.is-live .ml-socials span { animation: socialPop 6s ease-in-out infinite; }
.phone-stage.is-live .ml-socials span:nth-child(2) { animation-delay: .25s; }
.phone-stage.is-live .ml-socials span:nth-child(3) { animation-delay: .5s; }
@keyframes socialPop {
    0%, 80%, 100% { transform: none; }
    88%           { transform: translate3d(0, -5px, 0) scale(1.08); }
}

/* --- Карточка статистики ------------------------------------------------
   Столбики вырастают снизу, когда карточка доехала до экрана, а цифры
   в это же время досчитываются до своих значений (это делает скрипт).
   Дальше «горячие» столбики продолжают дышать - карточка не замирает. */

.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .55) 50%, transparent 58%);
    background-size: 300% 100%;
    animation: screenSheen 8.5s ease-in-out infinite 1.5s;
}

.stat-chart i { transform-origin: bottom; }
.js .stat-chart i { transform: scaleY(0); }
.js .stat-card.is-live .stat-chart i {
    transform: scaleY(1);
    transition: transform .8s cubic-bezier(.22, .9, .3, 1);
    transition-delay: calc(.07s * var(--i, 0));
}
/* Дыхание включается только после того, как столбик вырос. */
.js .stat-card.is-live .stat-chart i.is-hot { animation: barBreathe 3.4s ease-in-out 1.2s infinite; }
.js .stat-card.is-live .stat-chart i.is-hot:nth-child(6) { animation-delay: 1.9s; }
@keyframes barBreathe {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.18); }
}

.js .stat-rows div { opacity: 0; transform: translate3d(0, 10px, 0); }
.js .stat-card.is-live .stat-rows div {
    animation: riseIn .5s cubic-bezier(.22, .9, .3, 1) both;
    animation-delay: calc(.55s + .1s * var(--i, 0));
}
/* Пока цифры считаются, ширина строки скачет: ширина по количеству знаков
   держит правый край на месте. */
.stat-rows b { font-variant-numeric: tabular-nums; }

/* Цифры в цветных полосах тоже досчитываются, а не появляются готовыми. */
.band-figures b { font-variant-numeric: tabular-nums; }

/* --- Полное выключение движения -----------------------------------------
   Одно место, которое отменяет весь раздел выше. */

@media (prefers-reduced-motion: reduce) {
    .hero-brand::before, .hero-brand::after,
    .phone, .phone-screen::after, .stat-card::after,
    .js .phone-stage.is-live .ml-avatar,
    .js .phone-stage.is-live .ml--night .ml-avatar,
    .js .phone-stage.is-live .ml.has-bg .ml-avatar,
    .js .phone-stage.is-live .ml-btn,
    .phone-stage.is-live .ml-socials span,
    .js .stat-card.is-live .stat-chart i.is-hot,
    .js .hero-kicker, .js .hero-brand h1, .js .hero-brand-sub,
    .js .hero-chips span, .js .builder-card,
    .js .phone-stage.is-live .ml > *,
    .js .stat-card.is-live .stat-rows div {
        animation: none;
    }
    .js .reveal, .js .stat-card.is-live .stat-chart i { transition: none; }
    .js .reveal, .js .phone-stage .ml > *, .js .stat-rows div {
        opacity: 1; transform: none;
    }
    .js .stat-chart i { transform: scaleY(1); }
}

/* --- Настройка аватарки --------------------------------------------------
   Фотографии почти всегда прямоугольные, а аватарка круглая. Без настройки
   кадр берётся из середины файла, и на месте лица оказывается плечо или край
   снимка. Здесь человек сам двигает и приближает фото, а в кружок попадает
   то, что он выбрал.

   Всё рисуется на canvas: один и тот же кадр и на экране, и в готовом файле,
   поэтому предпросмотр не может разойтись с результатом. */

.avatar-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.ave {
    position: fixed; inset: 0; z-index: 2000;
    display: grid; place-items: center; padding: 16px;
    background: rgba(18, 19, 43, .62);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.ave[hidden] { display: none; }
.ave-box {
    width: min(420px, 100%); max-height: 100%; overflow: auto;
    background: #fff; border-radius: 24px; padding: 22px;
    box-shadow: 0 30px 80px rgba(18, 19, 43, .4);
    text-align: center;
}
.ave-title { margin: 0 0 6px; font-size: 19px; font-weight: 800; color: var(--ink); }
.ave-hint { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* touch-action: none - иначе на телефоне перетаскивание кадра прокручивает
   страницу вместо того, чтобы двигать фото. */
.ave-stage {
    position: relative; margin: 0 auto; border-radius: 18px; overflow: hidden;
    background: #0B1220; cursor: grab; touch-action: none; user-select: none;
}
.ave-stage:active { cursor: grabbing; }
.ave-stage canvas { display: block; }
/* Огромная тень наружу затемняет всё вокруг круга - так видно, что именно
   попадёт в аватарку. */
.ave-mask {
    position: absolute; inset: 0; border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(11, 18, 32, .55);
    border: 2px solid rgba(255, 255, 255, .9);
    pointer-events: none;
}

.ave-zoom { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.ave-zoom input[type="range"] { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
.ave-step {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--line); background: #fff; color: var(--ink-2);
    font: inherit; font-size: 19px; line-height: 1; cursor: pointer;
}
.ave-step:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.ave-extra { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ave-chip {
    border: 1px solid var(--line); background: #fff; border-radius: 999px;
    padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 700;
    color: var(--ink-2); cursor: pointer;
}
.ave-chip:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.ave-actions { display: flex; gap: 10px; margin-top: 18px; }
.ave-btn {
    flex: 1 1 0; min-height: 46px; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
.ave-btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.ave-btn--ghost:hover { background: var(--surface-2); }
.ave-btn--main { background: var(--accent); color: #fff; box-shadow: 0 12px 26px rgba(75, 71, 229, .26); }
.ave-btn--main:hover { background: var(--accent-hover); }

body.ave-open { overflow: hidden; }

@media (max-width: 520px) {
    .ave-box { padding: 18px 14px; border-radius: 20px; }
    .ave-title { font-size: 17.5px; }
}

/* ==========================================================================
   ОФОРМЛЕННЫЕ СТРАНИЦЫ
   Контакты, верификация, жалоба на страницу, NFC-визитка, для блогера.

   Один набор блоков на все страницы: первый экран с иллюстрацией, сетка
   карточек, пронумерованные условия, выноска, тёмная карточка-предложение,
   шаги, форма заявки. Страницы разные по смыслу, но собраны из одного
   конструктора - поэтому выглядят как части одного сайта, а не как семь
   разных лендингов.
   ========================================================================== */

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

.ip-hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding-block: clamp(36px, 6vw, 84px) clamp(48px, 7vw, 100px);
    background: linear-gradient(180deg, #F3F2FF 0%, #FAFAFE 62%, #FFFFFF 100%);
}
/* Мягкие цветные пятна - перекличка с яркой шапкой главной, но спокойнее:
   на этих страницах читают, а не выбирают. */
.ip-hero::before {
    content: ""; position: absolute; z-index: -1; inset: -30% -10% auto -10%; height: 130%;
    background:
        radial-gradient(36% 42% at 12% 22%, rgba(224, 23, 155, .10), transparent 70%),
        radial-gradient(34% 40% at 88% 18%, rgba(43, 62, 208, .12), transparent 72%),
        radial-gradient(40% 44% at 70% 90%, rgba(139, 33, 206, .08), transparent 70%);
    pointer-events: none;
}
.ip-hero-grid {
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(28px, 5vw, 72px); align-items: center;
}
.ip-hero--center .ip-hero-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.ip-hero--center .ip-lead { margin-inline: auto; }
.ip-hero--center .ip-actions, .ip-hero--center .ip-tags, .ip-hero--center .ip-crumbs { justify-content: center; }

.ip-crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.ip-crumbs a { color: var(--muted); }
.ip-crumbs a:hover { color: var(--accent); text-decoration: none; }
.ip-crumbs span[aria-hidden] { color: #C4C8DD; }

.ip-title { font-size: clamp(34px, 5.4vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.ip-grad {
    background: linear-gradient(92deg, var(--brand-a), var(--brand-b) 48%, var(--brand-c));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ip-lead { margin-top: 20px; max-width: 56ch; font-size: clamp(17px, 1.9vw, 20px); line-height: 1.6; color: var(--ink-2); }
.ip-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.ip-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.ip-tags span {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.ip-tags svg { width: 16px; height: 16px; color: var(--accent); }

.ip-hero-visual { display: flex; justify-content: center; min-width: 0; }

/* --- Сетка карточек ------------------------------------------------------ */

.ip-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ip-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ip-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s ease, border-color .22s ease;
}
.ip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #D9D8FB; }
.ip-card h3 { font-size: 19px; font-weight: 700; margin: 18px 0 8px; }
.ip-card p { color: var(--muted); font-size: 16px; }
.ip-card .card-icon { margin-bottom: 0; }

/* Карточка-выбор: целиком ссылка, со стрелкой и списком «для кого». */
.ip-choice { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; padding: 30px 28px; }
.ip-choice:hover { text-decoration: none; }
.ip-choice ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 8px; }
.ip-choice li { display: flex; gap: 10px; align-items: center; font-size: 15.5px; color: var(--ink-2); }
.ip-choice li svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--accent); }
.ip-choice-go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.ip-choice-go svg { width: 18px; height: 18px; transition: transform .2s ease; }
.ip-choice:hover .ip-choice-go svg { transform: translateX(4px); }

/* --- Пронумерованные условия --------------------------------------------- */

.ip-rules { display: grid; gap: 14px; }
.ip-rule {
    display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; align-items: start;
    padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.ip-rule-num {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
    font-size: 20px; font-weight: 800; color: #fff;
    background: linear-gradient(140deg, var(--accent-light), var(--accent));
    box-shadow: 0 10px 20px rgba(75, 71, 229, .22);
}
.ip-rule:nth-child(2) .ip-rule-num { background: linear-gradient(140deg, #F472B6, var(--brand-a)); box-shadow: 0 10px 20px rgba(224, 23, 155, .2); }
.ip-rule:nth-child(3) .ip-rule-num { background: linear-gradient(140deg, #A78BFA, var(--brand-b)); box-shadow: 0 10px 20px rgba(139, 33, 206, .2); }
.ip-rule:nth-child(4) .ip-rule-num { background: linear-gradient(140deg, #60A5FA, var(--brand-c)); box-shadow: 0 10px 20px rgba(43, 62, 208, .2); }
.ip-rule h3 { font-size: 18.5px; font-weight: 700; margin: 4px 0 6px; }
.ip-rule p, .ip-rule li { color: var(--muted); font-size: 16px; }
.ip-rule ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }

/* --- Две колонки: текст и форма ------------------------------------------ */

.ip-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.ip-split > .ip-aside { position: sticky; top: 104px; }
.ip-aside h2 { font-size: clamp(27px, 3.4vw, 40px); font-weight: 800; }
.ip-aside > p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.ip-aside .ip-checklist { margin-top: 22px; }

/* --- Список с галочками -------------------------------------------------- */

.ip-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ip-checklist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 16.5px; color: var(--ink-2); }
.ip-checklist li > svg {
    width: 28px; height: 28px; padding: 6px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent); stroke-width: 3;
}
.ip-checklist--warn li > svg { background: #FFEDE8; color: var(--c-coral); }

/* --- Выноски -------------------------------------------------------------- */

.ip-note {
    display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; align-items: start;
    padding: 18px 22px; border-radius: 20px; background: var(--accent-soft); color: var(--ink-2); font-size: 16px;
}
.ip-note > svg { width: 24px; height: 24px; color: var(--accent); }
.ip-note b { color: var(--ink); }
.ip-note--warn { background: #FFF5E1; }
.ip-note--warn > svg { color: #D98800; }
.ip-note--danger { background: #FFEDEA; }
.ip-note--danger > svg { color: #D4453A; }
.ip-note + .ip-note { margin-top: 12px; }

/* --- Тёмная карточка-предложение ----------------------------------------- */

.ip-offer {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
    padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-xl); color: #fff;
    background: linear-gradient(135deg, #17153A 0%, #2A1F6B 55%, #5B21B6 100%);
    box-shadow: var(--shadow-lg);
}
.ip-offer::after {
    content: ""; position: absolute; z-index: -1; right: -12%; top: -40%; width: 60%; aspect-ratio: 1;
    background: radial-gradient(circle, rgba(236, 72, 153, .35), transparent 65%);
}
.ip-offer .eyebrow { background: rgba(255, 255, 255, .12); color: #fff; }
.ip-offer .eyebrow i { background: #F9A8D4; }
.ip-offer h3 { font-size: clamp(22px, 2.8vw, 30px); font-weight: 800; }
.ip-offer p { margin-top: 12px; color: #CFCBF2; max-width: 60ch; }
.ip-offer-price { text-align: right; }
.ip-offer-price b { display: block; font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ip-offer-price span { color: #CFCBF2; font-size: 15px; }

/* --- Шаги ---------------------------------------------------------------- */

.ip-steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); counter-reset: ipstep; }
.ip-step {
    position: relative; padding: 24px 22px 22px; border-radius: 22px; background: #fff;
    border: 1px solid var(--line); counter-increment: ipstep;
}
.ip-step::before {
    content: counter(ipstep); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    margin-bottom: 14px; font-weight: 800; font-size: 15px; color: var(--accent); background: var(--accent-soft);
}
.ip-step b { display: block; font-size: 17px; margin-bottom: 6px; }
.ip-step span { color: var(--muted); font-size: 15px; }

/* --- Итоговый призыв ----------------------------------------------------- */

.ip-cta {
    text-align: center; padding: clamp(36px, 5vw, 64px) clamp(20px, 4vw, 48px);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 48%, var(--brand-c) 100%); color: #fff;
}
.ip-cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
.ip-cta p { margin: 14px auto 0; max-width: 56ch; color: rgba(255, 255, 255, .88); font-size: 18px; }
.ip-cta .ip-actions { justify-content: center; }

/* --- Форма заявки --------------------------------------------------------- */

.req-card {
    scroll-margin-top: 100px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl);
    padding: clamp(22px, 3.4vw, 38px); box-shadow: var(--shadow-md);
}
.req-head h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
.req-head p { margin-top: 8px; color: var(--muted); }
.req-head { margin-bottom: 22px; }

.req-alert {
    display: flex; gap: 10px; align-items: center; margin-bottom: 18px; padding: 13px 16px; border-radius: 14px;
    background: #FFEDEA; color: #B42318; font-weight: 600; font-size: 15px;
}
.req-alert svg { width: 20px; height: 20px; flex: 0 0 20px; }

.req-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.req-field { display: grid; gap: 7px; min-width: 0; }
.req-field--wide { grid-column: 1 / -1; }
.req-field > label { font-size: 14px; font-weight: 700; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.req-optional { font-weight: 500; font-size: 12.5px; color: #A5AAC6; }

.req-field input, .req-field textarea, .req-field select {
    width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--ink);
    background: #FBFBFE; border: 1.5px solid var(--line); border-radius: 14px; outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.req-field input, .req-field select { height: 52px; padding: 0 15px; }
.req-field textarea { padding: 13px 15px; resize: vertical; min-height: 110px; line-height: 1.5; }
.req-field input::placeholder, .req-field textarea::placeholder { color: #A5AAC6; }
.req-field input:focus, .req-field textarea:focus, .req-field select:focus {
    border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(75, 71, 229, .12);
}
.req-select { position: relative; }
.req-select select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; }
.req-select::after {
    content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
.req-field.is-invalid input, .req-field.is-invalid textarea, .req-field.is-invalid select { border-color: #F04438; background: #FFFBFA; }
.req-error { display: block; font-style: normal; font-size: 13.5px; color: #D92D20; font-weight: 600; }

/* Галочка: настоящий чекбокс спрятан, но остаётся доступен с клавиатуры. */
.req-check { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.req-check input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.req-check-box {
    width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid #C9CDE0; background: #fff;
    display: grid; place-items: center; transition: background .15s ease, border-color .15s ease;
}
.req-check-box svg { width: 15px; height: 15px; color: #fff; stroke-width: 3.2; opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.req-check input:checked + .req-check-box { background: var(--accent); border-color: var(--accent); }
.req-check input:checked + .req-check-box svg { opacity: 1; transform: none; }
.req-check input:focus-visible + .req-check-box { box-shadow: 0 0 0 4px rgba(75, 71, 229, .18); }
.req-check.is-invalid .req-check-box { border-color: #F04438; }
.req-consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.req-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.req-safe { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 13.5px; }
.req-safe svg { width: 16px; height: 16px; }

/* Ловушка для ботов: вне экрана, а не display:none. */
.req-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.req-done { text-align: center; padding: clamp(10px, 3vw, 26px) 0; }
.req-done-icon {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
    background: linear-gradient(140deg, #34D399, #059669); color: #fff; box-shadow: 0 14px 30px rgba(5, 150, 105, .28);
    animation: reqPop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.req-done-icon svg { width: 34px; height: 34px; stroke-width: 3; }
.req-done h3 { font-size: 24px; font-weight: 800; }
.req-done p { margin: 10px auto 20px; max-width: 48ch; color: var(--muted); }
@keyframes reqPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- Иллюстрация: подтверждённая страница -------------------------------- */

.vb-stage { position: relative; padding: 18px 42px; }
.vb-card {
    position: relative; width: min(340px, 78vw); padding: 0 22px 24px; border-radius: 30px; background: #fff;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(18, 19, 43, .05); text-align: center;
    animation: phoneFloat 7s ease-in-out infinite;
}
.vb-cover { height: 92px; margin: 0 -22px; border-radius: 30px 30px 0 0; background: linear-gradient(120deg, #F472B6, #8B5CF6 50%, #3B82F6); }
.vb-avatar {
    width: 92px; height: 92px; margin: -46px auto 0; border-radius: 50%; border: 5px solid #fff;
    display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff;
    background: linear-gradient(140deg, #FDBA74, #F43F5E); box-shadow: 0 10px 24px rgba(18, 19, 43, .18);
}
.vb-avatar--biz { background: linear-gradient(140deg, #34D399, #0EA5E9); border-radius: 26px; }
.vb-name { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 21px; font-weight: 800; }
.vb-badge { position: relative; width: 24px; height: 24px; color: #fff; display: inline-grid; place-items: center; }
.vb-badge svg { width: 24px; height: 24px; fill: #2B7FFF; stroke: #fff; stroke-width: 1.6; }
.vb-badge::after {
    content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #2B7FFF; opacity: 0;
    animation: vbPing 2.8s ease-out infinite 1s;
}
@keyframes vbPing { 0% { opacity: .6; transform: scale(.7); } 60%, 100% { opacity: 0; transform: scale(1.6); } }
.vb-handle { margin-top: 2px; color: var(--muted); font-size: 14.5px; }
.vb-btns { margin-top: 18px; display: grid; gap: 9px; }
.vb-btns span {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2);
    font-size: 14.5px; font-weight: 700; color: var(--ink); text-align: left;
}
.vb-btns i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 26px; }
.vb-btns i svg { width: 14px; height: 14px; }
.vb-float {
    position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
    background: #fff; box-shadow: var(--shadow-md); font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.vb-float svg { width: 18px; height: 18px; }
.vb-float--tl { left: 0; top: 50px; color: #2B7FFF; animation: phoneFloat 6s ease-in-out infinite -2s; }
.vb-float--br { right: 0; bottom: -4px; color: #059669; animation: phoneFloat 6.6s ease-in-out infinite -4s; }

/* --- Иллюстрация: жалоба ------------------------------------------------- */

.rp-stage { position: relative; padding: 20px 36px; }
.rp-card {
    position: relative; width: min(330px, 76vw); padding: 22px; border-radius: 26px; background: #fff;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(18, 19, 43, .05);
}
.rp-card::before { /* «страница-нарушитель»: размытое содержимое */
    content: ""; display: block; height: 120px; border-radius: 16px;
    background: repeating-linear-gradient(0deg, #EEF0F8 0 12px, transparent 12px 22px), linear-gradient(#F6F7FB, #F6F7FB);
    filter: blur(.4px);
}
.rp-line { height: 12px; border-radius: 6px; background: #EEF0F8; margin-top: 12px; }
.rp-line:nth-of-type(2) { width: 72%; }
.rp-line:nth-of-type(3) { width: 48%; }
.rp-flag {
    position: absolute; top: -16px; right: -14px; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px;
    border-radius: 14px; background: #D92D20; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 12px 24px rgba(217, 45, 32, .3);
    animation: rpShake 4.5s ease-in-out infinite 1.2s;
}
.rp-flag svg { width: 17px; height: 17px; }
@keyframes rpShake { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(-6deg); } 92% { transform: rotate(5deg); } 95% { transform: rotate(-3deg); } }
.rp-ok {
    position: absolute; left: 0; bottom: 8%; display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px;
    border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); color: #059669; font-weight: 700; font-size: 14px;
    animation: phoneFloat 6s ease-in-out infinite -3s;
}
.rp-ok svg { width: 18px; height: 18px; }

/* --- Иллюстрация: NFC-визитка -------------------------------------------- */

.nfc-scene { position: relative; width: min(440px, 88vw); aspect-ratio: 1.12; }
/* Сама визитка: белый пластик 85x55, как в жизни. */
.nfc-card {
    position: absolute; left: 4%; top: 22%; width: 74%; aspect-ratio: 85 / 55; border-radius: 18px;
    background: linear-gradient(145deg, #FFFFFF 0%, #F4F5FA 100%);
    box-shadow: 0 30px 60px -18px rgba(18, 19, 43, .35), 0 0 0 1px rgba(18, 19, 43, .06), inset 0 1px 0 #fff;
    transform: rotate(-9deg); padding: 7% 8%; display: flex; flex-direction: column; justify-content: space-between;
}
.nfc-card-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: clamp(13px, 2.6vw, 17px); color: var(--ink); }
.nfc-card-brand i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--brand-a), var(--brand-c)); }
.nfc-card-brand i svg { width: 15px; height: 15px; }
.nfc-card-foot { display: flex; align-items: flex-end; justify-content: space-between; }
.nfc-card-foot span { font-size: clamp(11px, 2.1vw, 13px); color: var(--muted); }
.nfc-card-foot svg { width: clamp(28px, 6vw, 38px); height: auto; color: #B8BCD3; }
.nfc-chip {
    width: 17%; aspect-ratio: 1.3; border-radius: 7px; background: linear-gradient(135deg, #F5D28A, #C99A3E);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
/* Телефон, который подносят к визитке. */
.nfc-phone {
    position: absolute; right: 2%; top: 2%; width: 36%; aspect-ratio: 9 / 18.5; border-radius: 26px; background: #0B0C1C; padding: 5px;
    box-shadow: 0 30px 50px -16px rgba(18, 19, 43, .45); transform: rotate(12deg);
    animation: nfcTap 4.2s ease-in-out infinite;
}
.nfc-phone-screen {
    height: 100%; border-radius: 21px; overflow: hidden; padding: 16% 10%; display: grid; align-content: start; gap: 7%;
    background: linear-gradient(170deg, #EDE9FE, #E0E7FF);
}
/* Серые заглушки-полоски из первой версии экрана убраны: их правило
   «.nfc-phone-screen i» цепляло значки в кнопках настоящего примера
   и сдвигало подписи вправо. */
.nfc-wave {
    position: absolute; left: 52%; top: 38%; width: 22%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--accent);
    opacity: 0; animation: nfcWave 4.2s ease-out infinite;
}
.nfc-wave:nth-of-type(2) { animation-delay: .25s; }
.nfc-wave:nth-of-type(3) { animation-delay: .5s; }
@keyframes nfcTap {
    0%, 100% { transform: translate(0, 0) rotate(12deg); }
    35%, 55% { transform: translate(-16%, 14%) rotate(6deg); }
}
@keyframes nfcWave {
    0%, 32% { opacity: 0; transform: scale(.4); }
    40% { opacity: .7; }
    70%, 100% { opacity: 0; transform: scale(2.2); }
}
.nfc-gift {
    position: absolute; left: 0; bottom: 2%; display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px; border-radius: 14px;
    background: #fff; box-shadow: var(--shadow-md); font-weight: 700; font-size: 14px; color: var(--brand-a);
}
.nfc-gift svg { width: 18px; height: 18px; }

.ip-limited {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 15px; border-radius: 12px;
    background: #FFF1F2; color: #BE123C; font-weight: 800; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase;
}
.ip-limited i { width: 8px; height: 8px; border-radius: 50%; background: #F43F5E; animation: fbPulseDot 1.6s ease infinite; }
@keyframes fbPulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, .5); } 50% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); } }

/* --- Контакты ------------------------------------------------------------ */

.ct-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ct-card {
    display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center;
    padding: 22px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); color: var(--ink);
    transition: transform .2s cubic-bezier(.2,.8,.3,1), box-shadow .2s ease, border-color .2s ease;
}
a.ct-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D9D8FB; }
.ct-card .ct-icon { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.ct-card .ct-icon svg { width: 24px; height: 24px; }
.ct-card b { display: block; font-size: 16.5px; overflow-wrap: anywhere; }
.ct-card div > span { display: block; color: var(--muted); font-size: 14px; }
.ct-legal {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 28px;
    padding: 24px 26px; border-radius: var(--radius-lg); background: var(--surface-2);
}
.ct-legal dt { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ct-legal dd { margin: 4px 0 0; font-weight: 600; }

/* --- Для блогера --------------------------------------------------------- */

.ip-hero .phone-stage { padding-inline: 0; }

/* --- Узкие экраны -------------------------------------------------------- */

@media (max-width: 900px) {
    .ip-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .ip-hero-visual { margin-top: 6px; }
    .ip-split { grid-template-columns: minmax(0, 1fr); }
    .ip-split > .ip-aside { position: static; }
    .ip-offer { grid-template-columns: minmax(0, 1fr); }
    .ip-offer-price { text-align: left; }
}
@media (max-width: 620px) {
    .req-grid { grid-template-columns: minmax(0, 1fr); }
    .req-actions .btn { width: 100%; }
    .ip-rule { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; }
    .ip-actions .btn { width: 100%; }
    .vb-stage, .rp-stage { padding-inline: 8px; }
    .vb-float--tl { left: -4px; top: auto; bottom: -6px; }
    .vb-float--br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .vb-card, .vb-badge::after, .vb-float, .rp-flag, .rp-ok, .nfc-phone, .nfc-wave, .ip-limited i, .req-done-icon { animation: none; }
    .nfc-wave { opacity: .25; }
    .nfc-wave:nth-of-type(2) { transform: scale(1.5); opacity: .15; }
    .nfc-wave:nth-of-type(3) { transform: scale(2); opacity: .08; }
}

/* =========================================================================
   СОДЕРЖАТЕЛЬНЫЕ СТРАНИЦЫ: о сервисе, инструкция, что такое мультиссылка,
   бесплатно, с помощью ИИ. Собраны из того же набора ip-*, здесь - только
   их собственные блоки и иллюстрации.
   ========================================================================= */

/* --- Цифры под первым экраном ------------------------------------------- */
.ab-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden;
    border-radius: var(--radius-lg); background: var(--line); border: 1px solid var(--line);
}
.ab-stats > div { background: #fff; padding: 26px 24px; }
.ab-stats b {
    display: block; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
    background: linear-gradient(92deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ab-stats span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.45; }

.ab-intro { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.ab-intro h2 { font-size: clamp(27px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.ab-intro p { font-size: 18px; line-height: 1.65; color: var(--ink-2); }

/* --- Два адреса, один аккаунт -------------------------------------------- */
.ab-duo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.ab-duo h2 { font-size: clamp(27px, 3.4vw, 40px); font-weight: 800; }
.ab-duo > div > p { margin: 14px 0 20px; color: var(--ink-2); font-size: 17px; line-height: 1.65; }
.ab-map { position: relative; height: 250px; max-width: 420px; width: 100%; margin-inline: auto; }
.ab-lines { position: absolute; inset: 40px 12% 40px; width: 76%; height: calc(100% - 80px); overflow: visible; }
.ab-lines path { fill: none; stroke: #C9C6F7; stroke-width: 3; stroke-dasharray: 7 9; animation: abFlow 1.6s linear infinite; }
@keyframes abFlow { to { stroke-dashoffset: -32; } }
.ab-domain, .ab-account {
    position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 16px;
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 700; font-size: 15px; white-space: nowrap;
}
.ab-domain svg, .ab-account svg { width: 18px; height: 18px; color: var(--accent); }
.ab-domain { top: 0; left: 0; }
.ab-domain--b { left: auto; right: 0; }
.ab-account {
    bottom: 0; left: 50%; transform: translateX(-50%); color: #fff; border: 0;
    background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 50%, var(--brand-c));
}
.ab-account svg { color: #fff; }

/* --- Миссия --------------------------------------------------------------- */
.ab-mission {
    position: relative; overflow: hidden; isolation: isolate; text-align: center;
    padding: clamp(36px, 5vw, 64px) clamp(22px, 5vw, 80px); border-radius: var(--radius-xl); color: #fff;
    background: linear-gradient(135deg, #17153A 0%, #2A1F6B 55%, #5B21B6 100%); box-shadow: var(--shadow-lg);
}
.ab-mission::after {
    content: ""; position: absolute; z-index: -1; left: -10%; bottom: -50%; width: 60%; aspect-ratio: 1;
    background: radial-gradient(circle, rgba(236, 72, 153, .3), transparent 65%);
}
.ab-mission .eyebrow { background: rgba(255, 255, 255, .12); color: #fff; }
.ab-mission .eyebrow i { background: #F9A8D4; }
.ab-mission blockquote { margin: 0 auto; max-width: 22ch; font-size: clamp(26px, 3.6vw, 42px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.ab-mission p { margin: 18px auto 0; max-width: 62ch; color: #CFCBF2; font-size: 17px; line-height: 1.65; }

/* --- Тарифы --------------------------------------------------------------- */
.pl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.pl-card {
    position: relative; display: flex; flex-direction: column; padding: 30px 26px; border-radius: var(--radius-lg);
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s ease;
}
.pl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pl-card > p { color: var(--muted); font-size: 15.5px; margin: 12px 0 18px; }
.pl-card .ip-checklist { margin-top: auto; }
.pl-name { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-price { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.pl-price b { font-size: clamp(34px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.pl-price span { color: var(--muted); font-size: 15px; }
.pl-card--hot { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--brand-a), var(--brand-c)) border-box; box-shadow: var(--shadow-md); }
.pl-flag {
    position: absolute; top: -13px; right: 22px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff;
    background: linear-gradient(92deg, var(--brand-a), var(--brand-c));
}
.pl-note { margin-top: 20px; text-align: center; color: var(--muted); font-size: 15px; }

/* --- Инструкция ------------------------------------------------------------ */
.ht-ways { margin: 32px auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 760px; text-align: left; }
.ht-way {
    display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 18px 20px;
    border-radius: 22px; background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-sm);
    transition: transform .2s cubic-bezier(.2,.8,.3,1), box-shadow .2s ease, border-color .2s ease;
}
.ht-way:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D9D8FB; }
.ht-way .card-icon { margin: 0; }
.ht-way b { display: block; font-size: 17px; }
.ht-way small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.ht-way > svg { width: 20px; height: 20px; color: var(--accent); }
.ht-split { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.ht-split--flip { grid-template-columns: minmax(0, 1fr) 520px; }
.ht-sticky { position: sticky; top: 96px; display: flex; justify-content: center; }
.ht-h2 { font-size: clamp(27px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.ht-sub { margin: 12px 0 26px; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 60ch; }
.ht-split .ip-rules { gap: 12px; }
.ht-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.ht-swatches span { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); display: grid; place-items: center; }
.ht-swatches .ht-sw-own { border-style: dashed; color: var(--accent); background: #fff; }
.ht-swatches svg { width: 16px; height: 16px; }
.ht-mini { font-size: 14px; }
.ht-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 860px; margin-inline: auto; }
.ht-chips span {
    display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px 11px 12px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 15px; box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.ht-chips span:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ht-chips i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.ht-chips svg { width: 16px; height: 16px; }
.ht-legal { max-width: 760px; margin: 22px auto 0; text-align: center; }
.ht-url { display: grid; gap: 12px; max-width: 460px; width: 100%; margin-inline: auto; }
.ht-url-bar {
    display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-radius: 18px; background: #fff;
    border: 1.5px solid var(--accent); box-shadow: 0 0 0 5px rgba(75, 71, 229, .1); font-size: 18px; min-width: 0;
}
.ht-url-bar svg { width: 18px; height: 18px; color: var(--c-mint); flex: 0 0 18px; }
.ht-url-bar span { color: var(--muted); }
.ht-url-bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-url-bar em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.ht-url-bar--own { border-color: var(--line); box-shadow: var(--shadow-sm); margin-top: 8px; }
.ht-url-ok { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-left: 8px; color: #0B8A5A; font-weight: 600; font-size: 14.5px; }
.ht-url-ok svg { width: 16px; height: 16px; }

/* --- Что такое мультиссылка: ссылки сходятся в одну ----------------------- */
.wi-scene { position: relative; width: min(440px, 100%); aspect-ratio: 1; }
.wi-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.wi-lines path { fill: none; stroke: #CFCBF7; stroke-width: 2.5; stroke-dasharray: 6 8; animation: abFlow 1.4s linear infinite reverse; }
.wi-chip {
    position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 700; font-size: 14px;
    transform: translate(-50%, -50%); white-space: nowrap; animation: wiBob 6s ease-in-out infinite;
}
.wi-chip i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.wi-chip svg { width: 15px; height: 15px; }
.wi-o1 { left: 17.5%; top: 17.5%; }
.wi-o2 { left: 82.5%; top: 17.5%; animation-delay: -1s; }
.wi-o3 { left: 11%; top: 51%; animation-delay: -2s; }
.wi-o4 { left: 89%; top: 51%; animation-delay: -3s; }
.wi-o5 { left: 20%; top: 84%; animation-delay: -4s; }
.wi-o6 { left: 80%; top: 84%; animation-delay: -5s; }
@keyframes wiBob { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 7px)); } }
.wi-core {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px;
    padding: 22px 26px; border-radius: 26px; color: #fff; text-align: center;
    background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 50%, var(--brand-c)); box-shadow: 0 24px 50px -18px rgba(75, 40, 200, .55);
}
.wi-core span { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); margin-bottom: 6px; }
.wi-core span svg { width: 24px; height: 24px; }
.wi-core b { font-size: 18px; }
.wi-core small { font-size: 13px; color: rgba(255, 255, 255, .82); }
.wi-core::before {
    content: ""; position: absolute; inset: -10px; border-radius: 34px; border: 2px solid rgba(139, 92, 246, .35);
    animation: wiPulse 2.8s ease-out infinite;
}
@keyframes wiPulse { 0% { opacity: .9; transform: scale(.94); } 100% { opacity: 0; transform: scale(1.18); } }

.wi-def {
    display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 22px; padding: clamp(24px, 4vw, 40px);
    border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
    border-left: 5px solid var(--accent);
}
.wi-def-mark { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.wi-def-mark svg { width: 26px; height: 26px; }
.wi-def h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.wi-def p { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.wi-def p + p { margin-top: 12px; }

.wi-compare { max-width: 900px; margin-inline: auto; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.wi-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); }
.wi-row > * { padding: 16px 20px; border-top: 1px solid var(--line-soft); font-size: 15.5px; }
.wi-row > span { color: var(--muted); font-weight: 600; }
.wi-row > b { font-weight: 600; color: var(--ink-2); }
.wi-row > b.wi-yes { color: #0B7A50; background: rgba(15, 163, 107, .06); }
.wi-row--head > * { border-top: 0; font-size: 16px; font-weight: 800; color: var(--ink); background: var(--surface-2); }
.wi-row--head > b.wi-yes { color: var(--accent); background: var(--accent-soft); }

/* --- С помощью ИИ: запрос → страница -------------------------------------- */
.aiv { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44px 220px; align-items: center; gap: 12px; width: min(560px, 100%); padding-bottom: 26px; }
.aiv-prompt {
    position: relative; padding: 18px 18px 20px; border-radius: 22px; background: #fff; border: 1px solid var(--line);
    box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.55; color: var(--ink-2); transform: rotate(-2deg);
}
.aiv-prompt-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.aiv-prompt-head svg { width: 15px; height: 15px; }
.aiv-caret { display: inline-block; width: 2px; height: 16px; background: var(--accent); vertical-align: -3px; margin-left: 2px; animation: aivBlink 1s steps(1) infinite; }
.aiv-prompt p { display: inline; }
@keyframes aivBlink { 50% { opacity: 0; } }
.aiv-arrow {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--brand-a), var(--brand-c)); box-shadow: 0 10px 24px -8px rgba(139, 33, 206, .6);
    animation: aivSpin 5s ease-in-out infinite;
}
.aiv-arrow svg { width: 22px; height: 22px; }
@keyframes aivSpin { 0%, 70%, 100% { transform: none; } 80% { transform: rotate(18deg) scale(1.12); } }
.aiv-result {
    position: relative; overflow: hidden; display: grid; justify-items: center; gap: 7px; padding: 0 14px 16px;
    border-radius: 30px; background: #FFF8F1; border: 8px solid #0B0C1C; box-shadow: var(--shadow-lg);
}
.aiv-cover { height: 58px; margin: 0 -14px; width: calc(100% + 28px); background: linear-gradient(120deg, #F59E0B, #EA580C 60%, #9A3412); }
.aiv-avatar {
    width: 58px; height: 58px; margin-top: -30px; border-radius: 18px; display: grid; place-items: center; font-weight: 800; font-size: 24px; color: #fff;
    background: linear-gradient(140deg, #78350F, #B45309); border: 3px solid #FFF8F1;
}
.aiv-result b { font-size: 15.5px; }
.aiv-result small { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.aiv-result > span {
    width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff;
    font-size: 12.5px; font-weight: 700; box-shadow: 0 2px 6px -3px rgba(60, 40, 10, .2);
    animation: aivIn 5s cubic-bezier(.2,.8,.3,1) infinite; animation-delay: var(--d, 0s);
}
.aiv-result > span i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 24px; }
.aiv-result > span svg { width: 13px; height: 13px; }
@keyframes aivIn { 0% { opacity: 0; transform: translateY(8px); } 12%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.aiv-badge {
    position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 14px;
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; color: #0B8A5A;
}
.aiv-badge svg { width: 16px; height: 16px; }

.ai-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.ai-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ai-example {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; cursor: pointer;
    background: var(--accent-soft); border: 1px solid transparent; color: var(--accent-deep); font: inherit; font-size: 14.5px; font-weight: 600;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.ai-example:hover { border-color: var(--accent); transform: translateY(-1px); }
.ai-example.is-on { background: var(--accent); color: #fff; }
.ai-example svg { width: 15px; height: 15px; }

@media (max-width: 1000px) {
    .ht-split, .ht-split--flip { grid-template-columns: minmax(0, 1fr); }
    .ht-sticky { position: static; order: -1; }
    .ab-duo, .ab-intro { grid-template-columns: minmax(0, 1fr); }
    .pl-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
}
@media (max-width: 760px) {
    .ab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ht-ways { grid-template-columns: minmax(0, 1fr); }
    .aiv { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .aiv-prompt { transform: none; }
    .aiv-arrow { transform: rotate(90deg); animation: none; }
    .aiv-result { width: 240px; }
    .aiv-badge { right: 50%; transform: translateX(50%); }
    .wi-compare { font-size: 14px; }
    .wi-row > * { padding: 12px 12px; font-size: 14px; }
}
@media (max-width: 480px) {
    .wi-chip { font-size: 12.5px; padding: 6px 11px 6px 6px; }
    .wi-chip i { width: 24px; height: 24px; }
    .wi-core { padding: 16px 18px; }
    .wi-core b { font-size: 15px; }
    .ab-domain, .ab-account { font-size: 13.5px; padding: 10px 12px; }
    .wi-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .wi-row > span { grid-column: 1 / -1; padding-bottom: 0; border-top: 1px solid var(--line-soft); }
    .wi-row > b { border-top: 0; }
    .wi-row--head > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ab-lines path, .wi-lines path, .wi-chip, .wi-core::before, .aiv-caret, .aiv-arrow, .aiv-result > span { animation: none; }
}
.ip-choice > p { margin-bottom: 18px; }
/* Шесть карточек - ровно 3 + 3, а не 4 + 2. */
.ip-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .ip-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ip-grid--3 { grid-template-columns: minmax(0, 1fr); } }
/* На оформленных страницах подпись над углом телефона, а не поверх аватарки. */
.ip-hero .phone-badge--tl { top: -8px; }
@media (max-width: 1000px) {
    .ht-sticky { order: 0; }
    .ht-split:not(.ht-split--flip) .ht-sticky { display: none; }
}
@media (max-width: 560px) {
    .wi-def { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .wi-def p { font-size: 16.5px; }
    .ab-stats > div { padding: 18px 16px; }
    .ab-stats b { font-size: 24px; }
    .ab-stats span { font-size: 13.5px; }
}

/* --- Конструктор: кнопки как в vizvi -------------------------------------
   Иконка сервиса на кнопке-выборе, в строке и на экране телефона. Строка -
   карточка: иконка, редактируемая надпись, крестик, ниже поле со ссылкой. */
.chip { gap: 7px; }
.chip-icon { display: inline-grid; place-items: center; width: 17px; height: 17px; flex: 0 0 17px; }
.chip-icon svg { width: 17px; height: 17px; }
.link-row {
    display: grid; gap: 8px; padding: 12px; border-radius: var(--radius); background: var(--surface-2);
    border: 1px solid var(--line-soft);
}
.link-row-head { display: flex; align-items: center; gap: 10px; }
.link-row-icon {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
    display: grid; place-items: center; color: var(--accent);
}
.link-row-icon svg { width: 20px; height: 20px; }
.starter .link-row input[type="text"].link-row-label {
    flex: 1 1 auto; min-width: 0; height: 44px; font-weight: 700; font-size: 15px;
}
.starter .link-row input[type="text"].link-row-value { height: 50px; }
.link-row-hint { font-size: 13px; color: var(--muted); padding-left: 2px; }
.preview-btn { position: relative; padding: 0 40px; }
.preview-btn-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; display: grid; place-items: center; }
.preview-btn-icon svg { width: 18px; height: 18px; }
.preview-btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) {
    .link-row { display: grid; }
    .link-row-label { flex-basis: auto; }
}

/* --- Фото для нейросети с подписями ------------------------------------- */
.ai-photos { display: grid; gap: 10px; }
.ai-photos:empty { display: none; }
.ai-photo {
    position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start;
    padding: 10px 44px 10px 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: left;
}
.ai-photo img { width: 76px; height: 76px; object-fit: cover; border-radius: 13px; background: var(--surface-2); }
.ai-pane .ai-photo textarea {
    min-height: 76px; padding: 10px 12px; font-size: 14.5px; line-height: 1.45; resize: vertical;
}
.ai-photo-remove {
    position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; padding: 0;
    border: 1px solid var(--line); background: #fff; color: var(--muted); font: inherit; font-size: 17px; line-height: 1;
    display: grid; place-items: center; cursor: pointer;
}
.ai-photo-remove:hover { border-color: #F2B8B0; color: #C3412F; background: #FFF5F3; }
@media (max-width: 560px) {
    .ai-photo { grid-template-columns: minmax(0, 1fr); padding: 38px 10px 10px; }
    .ai-photo img { width: 100%; height: 170px; }
}
.i-blue { background: #E6EEFF; color: #2787F5; }
.vb-avatar.has-photo, .aiv-avatar.has-photo { padding: 0; overflow: hidden; }
.vb-avatar.has-photo img, .aiv-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- NFC: касание -> на экране открывается мультиссылка -------------------
   Цикл 6 секунд: телефон подносят к визитке, по визитке расходятся волны,
   на экране на миг всплывает запрос «Открыть ссылку?» (так бывает на части
   смартфонов), затем появляется сама страница. */
.nfc-card { justify-content: space-between; }
.nfc-phone { animation-duration: 6s; }
.nfc-wave { animation-duration: 6s; }
@keyframes nfcTap {
    0%, 12%, 100% { transform: translate(0, 0) rotate(12deg); }
    24%, 40% { transform: translate(-16%, 14%) rotate(6deg); }
    52%, 92% { transform: translate(-4%, 3%) rotate(9deg); }
}
@keyframes nfcWave {
    0%, 22% { opacity: 0; transform: scale(.4); }
    28% { opacity: .7; }
    52%, 100% { opacity: 0; transform: scale(2.2); }
}
.nfc-phone-screen { position: relative; padding: 0; display: block; background: linear-gradient(170deg, #1B1D35, #2A2552); }
.nfc-idle, .nfc-toast, .nfc-page { position: absolute; }
.nfc-idle {
    inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: rgba(255, 255, 255, .75); text-align: center;
    animation: nfcIdle 6s ease-in-out infinite;
}
.nfc-idle svg { width: 30%; height: auto; }
.nfc-idle small { font-size: 9px; line-height: 1.3; padding: 0 12%; }
.nfc-toast {
    left: 6%; right: 6%; top: 7%; display: flex; align-items: center; justify-content: space-between; gap: 4px;
    padding: 7px 8px; border-radius: 11px; background: rgba(255, 255, 255, .96); color: var(--ink); justify-content: center;
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5); font-size: 8.5px; opacity: 0;
    animation: nfcToast 6s ease-in-out infinite;
}
.nfc-toast b { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.nfc-toast b svg { width: 10px; height: 10px; color: var(--accent); }
.nfc-toast span { color: var(--accent); font-weight: 800; }
/* Страница после касания - настоящий экран примера (.ml), нарисованный в
   размер обычного телефона-примера (280×588) и уменьшенный под этот
   телефон. Масштаб считает скрипт (--nfc-scale): в CSS нельзя поделить
   ширину на ширину и получить число. */
.nfc-page { inset: 0; overflow: hidden; opacity: 0; animation: nfcPage 6s ease-in-out infinite; }
.nfc-page-inner {
    width: 280px; height: 588px; transform-origin: 0 0;
    transform: scale(var(--nfc-scale, .42));
}
.nfc-page-inner .ml { height: 100%; }
/* Кнопки выплывают по очереди, как при открытии настоящей страницы.
   Первые три ребёнка .ml - аватарка, имя и подпись. */
.nfc-page .ml-btn { animation: nfcBtn 6s ease-out infinite; }
.nfc-page .ml-btn:nth-child(5) { animation-delay: .12s; }
.nfc-page .ml-btn:nth-child(6) { animation-delay: .24s; }
.nfc-page .ml-btn:nth-child(7) { animation-delay: .36s; }
.nfc-page .ml-btn:nth-child(8) { animation-delay: .48s; }
.nfc-page .ml-btn:nth-child(n+9) { animation-delay: .6s; }
@keyframes nfcIdle { 0%, 24% { opacity: 1; } 30%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes nfcToast {
    0%, 27% { opacity: 0; transform: translateY(-8px); }
    31%, 42% { opacity: 1; transform: none; }
    47%, 100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes nfcPage { 0%, 44% { opacity: 0; } 50%, 90% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes nfcBtn { 0%, 48% { transform: translateY(6px); opacity: 0; } 56%, 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .nfc-idle, .nfc-toast { animation: none; opacity: 0; }
    .nfc-page, .nfc-page .ml-btn { animation: none; opacity: 1; transform: none; }
}

/* =========================================================================
   Конструктор на главной: шаги, сетка кнопок, пошаговый режим на телефоне
   ========================================================================= */

/* overflow: clip вместо hidden: скругления так же обрезаются, но карточка
   перестаёт быть «прокручиваемым контейнером» - иначе липкие элементы
   внутри (панель «Назад / Далее», телефон на компьютере) не липли бы
   к экрану. Старые браузеры без clip просто останутся на hidden. */
@supports (overflow: clip) {
    .builder-card { overflow: clip; }
}

/* --- Шаги как разделы (компьютер) ---------------------------------------- */
.starter-form { gap: 0; grid-template-columns: minmax(0, 1fr); }
/* minmax(0, 1fr): иначе поле ввода со своей минимальной шириной
   распирает колонку, и шаг вылезает за край карточки. */
.wz-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; }
.slug-input input[type="text"] { flex: 1 1 auto; min-width: 0; width: 100%; }
.slug-input > span { flex: 0 0 auto; }
.wz-step + .wz-step { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line-soft); }
.wz-head { display: flex; align-items: center; gap: 14px; }
.wz-num {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
    color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 8px 18px -8px rgba(139, 33, 206, .55);
}
.wz-head h3 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.wz-head h3:focus { outline: none; }
.wz-head p { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.wz-count { display: none; }

/* Телефон-предпросмотр на компьютере едет вместе с формой. */
@media (min-width: 1041px) {
    .starter-preview { position: sticky; top: 96px; align-self: start; }
}

/* --- Кнопки со ссылками: ровная сетка плиток ------------------------------ */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.chip {
    position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    min-height: 52px; padding: 8px 12px 8px 8px; border-radius: 15px;
    border: 1.5px solid var(--line); background: #fff; color: var(--ink);
    font: inherit; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s cubic-bezier(.2, .8, .3, 1), opacity .18s ease;
    -webkit-tap-highlight-color: transparent;
}
.chip-icon {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--brand, var(--accent));
}
@supports (background: color-mix(in srgb, red 10%, white)) {
    .chip-icon { background: color-mix(in srgb, var(--brand, #4B47E5) 11%, #fff); }
}
.chip-icon svg { width: 18px; height: 18px; }
.chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: var(--brand, var(--accent)); color: var(--ink); transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(18, 19, 43, .35); }
.chip:active { transform: scale(.97); }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip.is-used { border-color: var(--accent); background: #F7F7FF; }
.chip-badge {
    position: absolute; top: -8px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 11px; border: 2px solid #fff; background: var(--accent); color: #fff;
    font-size: 12px; font-weight: 800; line-height: 18px; text-align: center; display: none;
}
.chip.is-used .chip-badge { display: block; animation: chipPop .32s cubic-bezier(.2, 1.4, .4, 1) both; }
.chip[disabled] { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.chip[disabled]:hover { border-color: var(--line); }
.chip.is-used[disabled] { opacity: .75; }
@keyframes chipPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Строки с появившимися кнопками. */
.link-row { animation: rowIn .3s cubic-bezier(.22, .9, .3, 1) both; transition: border-color .18s ease, background .18s ease; }
.link-row.is-leaving { animation: rowOut .18s ease forwards; pointer-events: none; }
.link-row.is-invalid { border-color: #F3B9B4; background: #FFF8F7; }
.starter .link-row.is-invalid input[type="text"].link-row-value { border-color: #E8958D; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rowOut { to { opacity: 0; transform: scale(.96); } }

/* Сноска про Meta: обязательна, но не должна перетягивать внимание. */
.legal-note { font-size: 12px; line-height: 1.5; padding: 10px 12px; }

/* Ошибки шагов. */
.wz-error { color: #B42318; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.wz-error[hidden] { display: none; }
.starter .field.has-error input[type="text"] { border-color: #E8958D; box-shadow: 0 0 0 4px rgba(232, 149, 141, .18); }
.is-shake { animation: wzShake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes wzShake {
    10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); }
}

/* «Для поисковиков»: заголовок не разваливается на две колонки. */
.fine > summary { flex-wrap: wrap; row-gap: 2px; }
.fine > summary span { font-size: 14px; }

/* Сводка перед публикацией. */
.wz-summary { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wz-summary[hidden] { display: none; }
.wz-summary li {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-soft);
}
.wz-sum-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--accent); }
.wz-sum-ic.is-empty { color: #A5AAC6; }
.wz-sum-ic svg { width: 17px; height: 17px; }
.wz-summary small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wz-summary b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-summary li button {
    border: 0; background: none; padding: 6px 2px; font: inherit; font-size: 14px; font-weight: 600;
    color: var(--accent); cursor: pointer;
}

.starter-submit { white-space: nowrap; }

/* --- Прогресс и панель: по умолчанию спрятаны ---------------------------- */
.wz-progress[hidden], .wz-bar[hidden] { display: none; }

/* =========================================================================
   Пошаговый режим (.is-wizard - включает скрипт на ширине до 1040px)
   ========================================================================= */
.starter.is-wizard { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 18px 18px 0; }
.starter.is-wizard > .starter-preview { display: none; }
.starter.is-wizard .wz-step[hidden] { display: none; }
.starter.is-wizard .wz-step + .wz-step { margin-top: 0; padding-top: 0; border-top: 0; }
.starter.is-wizard .wz-step { gap: 20px; animation: wzIn .42s cubic-bezier(.22, .9, .3, 1) both; }
.starter.is-wizard.wz-dir-back .wz-step { animation-name: wzInBack; }
@keyframes wzIn { from { opacity: 0; transform: translate3d(26px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes wzInBack { from { opacity: 0; transform: translate3d(-26px, 0, 0); } to { opacity: 1; transform: none; } }

.starter.is-wizard .wz-head { display: grid; gap: 4px; }
.starter.is-wizard .wz-num { display: none; }
.starter.is-wizard .wz-count {
    display: block; order: -1; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    background: linear-gradient(90deg, var(--brand-a), var(--brand-c)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.starter.is-wizard .wz-head h3 { font-size: 26px; letter-spacing: -.03em; }
.starter.is-wizard .wz-head p { font-size: 15.5px; }
.starter.is-wizard .starter-submit { display: none; }
.starter.is-wizard .pill-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.starter.is-wizard .pill span { display: block; text-align: center; padding-inline: 10px; }

/* Прогресс: четыре отрезка с подписями. */
.wz-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; }
.wz-dot {
    display: grid; gap: 7px; padding: 4px 0; border: 0; background: none; font: inherit; text-align: left;
    color: #A5AAC6; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.wz-dot:disabled { cursor: default; }
.wz-dot-bar { position: relative; display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.wz-dot-bar::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; transform: scaleX(0); transform-origin: left center;
    background: linear-gradient(90deg, var(--brand-a), var(--brand-b), var(--brand-c));
    transition: transform .45s cubic-bezier(.22, .9, .3, 1);
}
.wz-dot.is-done .wz-dot-bar::after, .wz-dot.is-current .wz-dot-bar::after { transform: none; }
.wz-dot-label { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s ease; }
.wz-dot.is-done { color: var(--ink-2); }
.wz-dot.is-current { color: var(--ink); }

/* Предпросмотр внутри шага «Оформление». */
.wz-preview-slot:empty { display: none; }
.wz-preview-slot .starter-preview { padding: 16px 12px 12px; gap: 8px; border-radius: 24px; }
.wz-preview-slot .preview-phone { zoom: .72; }
.wz-preview-slot .starter-hint { font-size: 13px; }

/* Панель «Назад / Вид / Далее» прилипает к низу экрана, пока видна форма. */
.wz-bar {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; align-items: center; gap: 8px;
    margin: 24px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .94); border-top: 1px solid var(--line-soft);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
}
.wz-back, .wz-peek {
    flex: 0 0 auto; height: 52px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
    color: var(--ink); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
}
.wz-back { width: 52px; padding: 0; }
.wz-peek { padding: 0 16px; }
.wz-back svg, .wz-peek svg { width: 20px; height: 20px; }
.wz-back:active, .wz-peek:active { transform: scale(.95); }
.wz-back[hidden], .wz-peek[hidden], .wz-next[hidden], .wz-publish[hidden] { display: none; }
.wz-next, .wz-publish { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 20px; white-space: nowrap; font-size: 16px; }
.wz-next svg { width: 20px; height: 20px; transition: transform .2s ease; }
.wz-next:hover svg { transform: translateX(3px); }
.wz-publish.is-busy { opacity: .75; pointer-events: none; }

/* Вкладки «вручную / нейросетью» на узком экране - переключатель в одну полосу. */
@media (max-width: 1040px) {
    .builder-live { display: none; }
}
@media (max-width: 760px) {
    .builder-head { padding: 12px; }
    .builder-tabs {
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
        background: var(--surface-2); border-radius: 999px; width: 100%;
    }
    .builder-tab { border: 0; padding: 11px 8px; font-size: 14.5px; background: transparent; justify-content: center; }
    .builder-tab.is-active { box-shadow: 0 6px 14px -8px rgba(18, 19, 43, .6); }
    .starter.is-wizard { padding: 16px 16px 0; }
    .wz-bar { margin-inline: -16px; padding-inline: 16px; }
}
@media (max-width: 480px) {
    .chips { gap: 7px; }
    .chip { gap: 8px; padding: 7px 8px 7px 6px; font-size: 14px; min-height: 50px; }
    .chip-icon { flex-basis: 30px; width: 30px; height: 30px; border-radius: 9px; }
    .chip-icon svg { width: 17px; height: 17px; }
}
@media (max-width: 380px) {
    .wz-peek span { display: none; }
    .wz-peek { width: 52px; padding: 0; }
    .chips { grid-template-columns: 1fr 1fr; }
    .chip { gap: 8px; font-size: 14px; }
}

/* --- Предпросмотр целиком: шторка снизу ---------------------------------- */
.wz-sheet { position: fixed; inset: 0; z-index: 900; }
.wz-sheet[hidden] { display: none; }
.wz-sheet-backdrop {
    position: absolute; inset: 0; background: rgba(12, 12, 34, .5); opacity: 0; transition: opacity .3s ease;
}
.wz-sheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 94vh; max-height: 94dvh; overflow-y: auto;
    background: #fff; border-radius: 28px 28px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%); transition: transform .42s cubic-bezier(.22, .9, .3, 1);
    box-shadow: 0 -20px 60px -20px rgba(12, 12, 34, .4);
}
.wz-sheet.is-open .wz-sheet-backdrop { opacity: 1; }
.wz-sheet.is-open .wz-sheet-panel { transform: none; }
.wz-sheet-panel.is-dragging { transition: none; }
.wz-sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.wz-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; touch-action: none; }
.wz-sheet-head b { font-size: 17px; font-weight: 800; }
.wz-sheet-close {
    width: 40px; height: 40px; border-radius: 13px; border: 1.5px solid var(--line); background: #fff;
    font-size: 24px; line-height: 1; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.wz-sheet-grip { touch-action: none; }
.wz-sheet .starter-preview { background: var(--surface-2); padding: 18px 12px 12px; border-radius: 24px; }
.wz-sheet .preview-phone { zoom: .9; }
@media (max-height: 760px) { .wz-sheet .preview-phone { zoom: .76; } }
@media (max-height: 640px) { .wz-sheet .preview-phone { zoom: .64; } }
body.wz-sheet-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .starter.is-wizard .wz-step, .link-row, .chip.is-used .chip-badge { animation: none; }
    .wz-sheet-panel, .wz-sheet-backdrop, .wz-dot-bar::after { transition: none; }
}

/* Доводка пошагового режима. */
/* Подпись плитки переносится на вторую строку, а не обрезается многоточием:
   «Своя ссылка» на узком телефоне не помещается в одну. */
.chip-label {
    white-space: normal; line-height: 1.15; overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.wz-summary b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
.fine > summary { flex-wrap: nowrap; }
.fine > summary b { flex: 0 0 auto; }
.fine > summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
/* На последнем шаге «Вид» - только значок: место нужно «Опубликовать». */
.wz-peek.is-compact { width: 52px; padding: 0; }
.wz-peek.is-compact span { display: none; }
