/* ═══════════════════════════════════════════════════════════════════════
   mobile.css — нативный app-look для телефонов
   Активируется только на экранах ≤ 760px
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 760px) {

  /* ── Базовые мобильные правила ───────────────────────────────────────── */
  html, body {
    overflow-x: hidden;
  }
  body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    overscroll-behavior-y: contain;
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* ── iOS auto-zoom fix: все поля ввода минимум 16px ──────────────────── */
  /* Если font-size < 16px — Safari принудительно зумит viewport при focus */
  #cx-ai-landing input[type="text"],
  #cx-ai-landing input[type="email"],
  #cx-ai-landing input[type="tel"],
  #cx-ai-landing input[type="search"],
  #cx-ai-landing input[type="url"],
  #cx-ai-landing input[type="number"],
  #cx-ai-landing textarea,
  #cx-ai-landing #cx-chat-input,
  #cx-ai-landing .cx-reg-field input,
  #cx-ai-landing .cx-help-form input,
  #cx-ai-landing .cx-help-form textarea {
    font-size: 16px !important;
  }
  /* Убираем сдвиг каретки в textarea чата */
  #cx-ai-landing #cx-chat-input {
    text-indent: 0;
    padding: 10px 14px !important;
    line-height: 1.4;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
  }

  /* ── Фикс iOS auto-zoom на input/textarea (font-size ≥ 16px) ─────────── */
  #cx-ai-landing input[type="text"],
  #cx-ai-landing input[type="email"],
  #cx-ai-landing input[type="tel"],
  #cx-ai-landing input[type="number"],
  #cx-ai-landing input[type="password"],
  #cx-ai-landing input[type="search"],
  #cx-ai-landing textarea,
  #cx-ai-landing #cx-chat-input,
  #cx-ai-landing .cx-reg-field input,
  .cx-help-field input,
  .cx-help-field textarea {
    font-size: 16px !important;
    box-sizing: border-box;
  }

  /* Фикс позиции курсора в textarea чата */
  #cx-ai-landing #cx-chat-input {
    padding: 10px 14px;
    line-height: 1.35;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
    direction: ltr;
    /* убираем странные системные отступы у textarea на iOS */
    text-indent: 0;
  }
  #cx-ai-landing {
    /* Нижний паддинг под tab-bar + safe-area для iPhone */
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  #cx-ai-landing::before { display: none; }

  /* ── Sticky header в стиле iOS (компактный, по центру title) ─────────── */
  #cx-ai-landing .cx-topbar-wrap {
    padding-top: 60px;
  }
  #cx-ai-landing .cx-topbar {
    width: 100%;
    left: 0;
    right: 0;
    transform: none;
    top: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 8px;
    background: rgba(10, 12, 16, .94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
    z-index: 99990;
  }
  #cx-ai-landing .cx-brand-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  #cx-ai-landing .cx-brand-title {
    font-size: 13px;
  }
  /* На мобиле показываем оба бренда: Centrexpert + АНО ЦСиЭД */
  #cx-ai-landing .cx-brand-divider {
    display: block;
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,.14);
    margin: 0 4px;
  }
  #cx-ai-landing .cx-brand-second {
    display: flex !important;
    align-items: center;
    gap: 6px;
  }
  #cx-ai-landing .cx-brand-second .cx-brand-badge {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  #cx-ai-landing .cx-brand-second .cx-brand-title {
    font-size: 12px;
    color: rgba(236, 239, 247, .68);
  }
  /* Десктопное меню целиком убираем */
  #cx-ai-landing .cx-nav { display: none !important; }
  #cx-ai-landing .cx-burger { display: none !important; }
  #cx-ai-landing .cx-phone-link { display: none; }

  /* Мобильная кнопка-телефон — у правого края шапки */
  #cx-ai-landing .cx-topbar .cx-mobile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border-radius: 50%;
    background: rgba(99, 102, 241, .15);
    border: 1px solid rgba(99, 102, 241, .30);
    color: #A5B4FC;
    text-decoration: none;
    flex-shrink: 0;
  }
  #cx-ai-landing .cx-topbar .cx-mobile-action svg {
    width: 18px; height: 18px;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }

  /* ── Hero (компактный, как splash в приложении) ──────────────────────── */
  #cx-ai-landing .cx-hero {
    padding: 16px 0 32px;
  }
  #cx-ai-landing .cx-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  #cx-ai-landing .cx-hero-copy { padding: 0 4px; }
  #cx-ai-landing .cx-hero h1 {
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -.02em;
  }
  #cx-ai-landing .cx-hero .cx-lead {
    font-size: 14px;
    margin-top: 12px;
  }
  #cx-ai-landing .cx-hero-note {
    font-size: 13px;
    margin-top: 10px;
  }
  #cx-ai-landing .cx-hero .cx-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }
  #cx-ai-landing .cx-hero .cx-btn {
    width: 100%;
    min-height: 50px;
    font-size: 15px;
    border-radius: 14px;
  }
  #cx-ai-landing .cx-hero-flow {
    padding: 16px 14px;
    border-radius: 18px;
  }
  #cx-ai-landing .cx-flow-step {
    grid-template-columns: 40px 1fr;
    padding: 10px 12px;
    gap: 12px;
  }
  #cx-ai-landing .cx-flow-icon { width: 40px; height: 40px; }
  #cx-ai-landing .cx-flow-icon svg { width: 18px; height: 18px; }
  #cx-ai-landing .cx-flow-step-title { font-size: 14px; }
  #cx-ai-landing .cx-flow-list::before { left: 28px; }

  /* ── Секции — компактные, в стиле списков iOS ────────────────────────── */
  #cx-ai-landing .cx-section { padding: 32px 0; }
  #cx-ai-landing .cx-section-header { margin-bottom: 20px; }
  #cx-ai-landing h2 {
    font-size: 22px;
    line-height: 1.18;
    letter-spacing: -.02em;
  }
  #cx-ai-landing .cx-muted { font-size: 14px; }
  #cx-ai-landing .cx-eyebrow {
    font-size: 11px;
    padding: 5px 10px;
    margin-bottom: 12px;
  }

  /* Контейнер с боковыми отступами по 16px */
  #cx-ai-landing .cx-container {
    width: calc(100% - 24px);
  }

  /* ── Карточки одна под другой (как ленты в приложении) ───────────────── */
  #cx-ai-landing .cx-grid-2,
  #cx-ai-landing .cx-grid-3,
  #cx-ai-landing .cx-grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #cx-ai-landing .cx-card {
    padding: 18px;
    border-radius: 16px;
  }
  #cx-ai-landing .cx-card h3 {
    font-size: 16px;
  }
  #cx-ai-landing .cx-card p {
    font-size: 14px;
  }
  #cx-ai-landing .cx-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    margin-bottom: 12px;
  }
  #cx-ai-landing .cx-icon svg {
    width: 20px; height: 20px;
  }

  /* Tap-feedback (имитация iOS press) */
  #cx-ai-landing .cx-card:active,
  #cx-ai-landing .cx-tariff:active,
  #cx-ai-landing .cx-faq-card:active,
  #cx-ai-landing .cx-review-card:active,
  #cx-ai-landing .cx-trust-item:active,
  #cx-ai-landing .cx-chip-tag:active {
    transform: scale(.98);
    transition: transform .12s ease-out;
  }

  /* ── Чеклист как iOS-список ──────────────────────────────────────────── */
  #cx-ai-landing .cx-checklist {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #cx-ai-landing .cx-checklist li {
    padding: 14px 16px;
    border-radius: 14px;
  }
  #cx-ai-landing .cx-checklist__text { font-size: 14px; }

  /* ── Process flow — вертикальная цепочка ─────────────────────────────── */
  #cx-ai-landing .cx-process-flow {
    grid-template-columns: 1fr;
    gap: 12px;
    position: relative;
  }
  #cx-ai-landing .cx-process-flow::before { display: none; }
  #cx-ai-landing .cx-process-step {
    padding: 18px;
    border-radius: 16px;
  }
  #cx-ai-landing .cx-process-step__icon {
    width: 44px; height: 44px;
    margin-bottom: 12px;
  }
  #cx-ai-landing .cx-process-step__title { font-size: 15px; }

  /* ── Тарифы — горизонтальная лента-карусель (iOS App Store style) ────── */
  #cx-ai-landing #tariffs .cx-container {
    width: 100%;
    padding-left: 16px;
  }
  #cx-ai-landing #tariffs .cx-section-header {
    padding-right: 16px;
  }
  #cx-ai-landing .cx-tariffs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    overflow-x: auto;
    overflow-y: visible;
    gap: 12px;
    padding: 8px 16px 16px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #cx-ai-landing .cx-tariffs::-webkit-scrollbar { display: none; }
  #cx-ai-landing .cx-tariff {
    scroll-snap-align: start;
    padding: 22px 20px;
    border-radius: 18px;
  }
  #cx-ai-landing .cx-tariff-price strong { font-size: 24px; }

  /* ── Примеры готовых работ — горизонтальная лента (как тарифы) ───────── */
  #cx-ai-landing #examples .cx-container {
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 0 !important;
    max-width: none !important;
  }
  #cx-ai-landing #examples .cx-section-header {
    padding-right: 16px;
  }
  #cx-ai-landing .cx-review-examples,
  #cx-ai-landing #examples .cx-grid-3 {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 82% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    gap: 12px !important;
    padding: 8px 16px 16px 0 !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #cx-ai-landing .cx-review-examples::-webkit-scrollbar,
  #cx-ai-landing #examples .cx-grid-3::-webkit-scrollbar { display: none; }
  #cx-ai-landing .cx-review-card {
    scroll-snap-align: start;
    padding: 22px 20px !important;
    border-radius: 18px;
    width: 100%; /* fill grid-auto-columns slot */
    min-width: 0;
  }

  /* ── Trust row 2×2 ───────────────────────────────────────────────────── */
  #cx-ai-landing .cx-trust-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  #cx-ai-landing .cx-trust-item {
    padding: 16px;
    border-radius: 16px;
  }
  #cx-ai-landing .cx-trust-icon {
    width: 36px; height: 36px;
    margin-bottom: 10px;
  }
  #cx-ai-landing .cx-trust-title { font-size: 13px; }
  #cx-ai-landing .cx-trust-sub { font-size: 12px; }

  /* ── Chips — в одну линию с горизонтальным скроллом ──────────────────── */
  #cx-ai-landing #kinds .cx-container {
    width: 100%;
    padding-left: 16px;
  }
  #cx-ai-landing #kinds .cx-section-header { padding-right: 16px; }
  #cx-ai-landing .cx-chips {
    flex-wrap: wrap;
    gap: 8px;
    padding-right: 16px;
  }
  #cx-ai-landing .cx-chip-tag {
    padding: 8px 14px;
    font-size: 12.5px;
  }

  /* ── FAQ — раскрывающиеся карточки ───────────────────────────────────── */
  #cx-ai-landing .cx-faq { grid-template-columns: 1fr; gap: 8px; }
  #cx-ai-landing .cx-faq-card {
    padding: 16px 18px;
    border-radius: 14px;
  }
  #cx-ai-landing .cx-faq-card h3 { font-size: 14.5px; }
  #cx-ai-landing .cx-faq-card p { font-size: 13.5px; }

  /* ── Эксперты ────────────────────────────────────────────────────────── */
  #cx-ai-landing .cx-expert-card { padding: 22px 18px; }
  #cx-ai-landing .cx-expert-avatar {
    width: 72px; height: 72px;
    margin-bottom: 14px;
  }
  #cx-ai-landing .cx-expert-card h3 { font-size: 14.5px; min-height: 0; }
  #cx-ai-landing .cx-expert-spec { font-size: 12px; }

  /* ── Двухколонник в одну колонку ─────────────────────────────────────── */
  #cx-ai-landing .cx-two-col {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  #cx-ai-landing .cx-doc-preview { padding: 8px; }

  /* ── Interrog flow ───────────────────────────────────────────────────── */
  #cx-ai-landing .cx-interrog-flow {
    padding: 18px 14px;
    border-radius: 18px;
  }
  #cx-ai-landing .cx-interrog-step {
    grid-template-columns: 36px 1fr;
    padding: 9px 10px;
  }
  #cx-ai-landing .cx-interrog-icon { width: 36px; height: 36px; }
  #cx-ai-landing .cx-interrog-icon svg { width: 16px; height: 16px; }
  #cx-ai-landing .cx-interrog-flow ol::before { left: 24px; }

  /* На мобиле в обычном режиме показываем секцию «Рабочее окно» с launch-кнопкой,
     но сам чат-виджет (cx-chat-frame-wrap) скрыт — он показывается ТОЛЬКО
     в fullscreen-режиме (открывается тапом «Чат» в tab-bar или «Открыть чат»).
     В fullscreen режиме CSS не вмешивается в видимость launch/frame-wrap —
     этим управляет JS (.is-hidden / .is-open). */
  #cx-ai-landing #chat-start .cx-chat-frame-wrap:not(.is-open) {
    display: none;
  }
  #cx-ai-landing .cx-chat-card {
    padding: 14px;
    border-radius: 18px;
  }
  #cx-ai-landing #cx-chat-widget {
    min-height: 540px;
    height: 70vh;
    border-radius: 16px;
  }

  /* Кнопка «Закрыть чат» (только в full-screen режиме) */
  .cx-chat-close-mobile {
    display: none;
    width: 36px; height: 36px;
    border: 0;
    padding: 0;
    background: rgba(255,255,255,.10);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 4px;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, transform .12s ease;
  }
  .cx-chat-close-mobile:active {
    background: rgba(255,255,255,.18);
    transform: scale(.92);
  }
  .cx-chat-close-mobile svg {
    width: 22px; height: 22px;
  }

  /* ─────────────────────────────────────────────────────────────────────
     Режим экранов (app-style tabs): когда body имеет класс
     cx-screen-tariffs / cx-screen-examples — показывается ТОЛЬКО
     соответствующая секция, остальные скрыты. По умолчанию (cx-screen-home
     или без класса) — обычная прокручиваемая страница.
     ───────────────────────────────────────────────────────────────────── */
  body.cx-screen-tariffs #cx-ai-landing > *,
  body.cx-screen-examples #cx-ai-landing > * {
    display: none !important;
  }
  body.cx-screen-tariffs #cx-ai-landing #tariffs,
  body.cx-screen-examples #cx-ai-landing #examples {
    display: block !important;
    padding-top: calc(env(safe-area-inset-top, 0px) + 20px) !important;
    padding-bottom: 32px !important;
  }
  /* В режиме «экрана» страница не скроллится дальше единственной секции */
  body.cx-screen-tariffs,
  body.cx-screen-examples {
    overflow-x: hidden;
  }
  /* Топбар скрываем в screen-mode — есть tab-bar внизу, шапка избыточна */
  body.cx-screen-tariffs #cx-ai-landing .cx-topbar-wrap,
  body.cx-screen-examples #cx-ai-landing .cx-topbar-wrap {
    display: none !important;
  }
  /* Footer прячем в screen-mode (он не нужен внутри одного экрана) */
  body.cx-screen-tariffs .cx-footer-wrap,
  body.cx-screen-examples .cx-footer-wrap {
    display: none !important;
  }
  /* Заголовок секции в screen-mode — компактнее */
  body.cx-screen-tariffs #cx-ai-landing #tariffs .cx-section-header,
  body.cx-screen-examples #cx-ai-landing #examples .cx-section-header {
    margin-bottom: 16px !important;
    padding-top: 0 !important;
  }
  /* В fullscreen режиме секция чата видна, даже если активен screen-mode */
  body.cx-chat-fullscreen #cx-ai-landing #chat-start {
    display: block !important;
  }
  body.cx-chat-fullscreen #cx-ai-landing #chat-start .cx-chat-frame-wrap {
    display: flex !important;
  }

  body.cx-chat-fullscreen {
    overflow: hidden;
  }
  body.cx-chat-fullscreen #cx-ai-landing {
    /* На время открытого чата скрываем всё содержимое страницы за оверлеем */
    pointer-events: none;
  }
  /* Tab-bar и сам чат остаются интерактивны */
  body.cx-chat-fullscreen .cx-tabbar,
  body.cx-chat-fullscreen #cx-ai-landing #chat-start {
    pointer-events: auto;
  }
  /* Превращаем секцию чата в фуллскрин-оверлей */
  body.cx-chat-fullscreen #cx-ai-landing #chat-start {
    position: fixed;
    inset: 0;
    z-index: 99995;
    padding: 0;
    margin: 0;
    background: #0E1117;
    overflow: hidden;
    display: block;
  }
  body.cx-chat-fullscreen #cx-ai-landing #chat-start > .cx-container {
    width: 100%;
    height: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  /* Скрываем заголовок секции (eyebrow + h2 + описание) */
  body.cx-chat-fullscreen #cx-ai-landing #chat-start .cx-section-header {
    display: none !important;
  }
  body.cx-chat-fullscreen #cx-ai-landing #chat-start .cx-chat-card {
    height: 100%;
    width: 100%;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: #0E1117;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    flex: 1;
    min-height: 0;
  }
  /* Заголовок «Рабочее окно» — скрываем, имя+статус есть в шапке чата */
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-top h3,
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-top > div > p {
    display: none !important;
  }
  /* Блок-контейнер согласия — компактный, как «приветственный экран» */
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-top {
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 56px) 22px 0;
    background: #0E1117;
    flex-shrink: 0;
  }
  /* Форма согласия — отдельный экран сверху чата (если не подтверждено) */
  body.cx-chat-fullscreen #cx-ai-landing .cx-consent {
    display: flex !important;
    margin: 0;
    padding: 18px 0 0;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-consent-text {
    color: rgba(236, 239, 247, .80);
    font-size: 13.5px;
    line-height: 1.55;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-consent-text a {
    color: #A5B4FC;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-consent-error {
    margin: 12px 22px 0;
  }
  /* Если launch ещё на экране (нет согласия) — рисуем его как «пригласительный экран» */
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-launch {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    background: #0E1117;
    border: 0;
    border-radius: 0;
    padding: 24px 22px calc(40px + env(safe-area-inset-bottom, 0px));
    flex: 1;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-launch.is-hidden {
    display: none !important;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-launch-inner {
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-launch-inner strong {
    color: #ECEFF7;
    font-size: 18px;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-launch-inner p {
    color: rgba(236, 239, 247, .68);
    font-size: 14px;
    margin-bottom: 24px;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-launch-inner .cx-btn {
    width: 100%;
    min-height: 50px;
    font-size: 15px;
  }
  /* Когда чат запущен — скрываем cx-chat-top (с согласием) */
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-frame-wrap.is-open ~ .cx-chat-top,
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-card:has(.cx-chat-frame-wrap.is-open) .cx-chat-top {
    display: none !important;
  }
  /* Виджет чата — на всю высоту */
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-frame-wrap {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-frame-wrap.is-open {
    display: flex !important;
  }
  body.cx-chat-fullscreen #cx-ai-landing #cx-chat-widget {
    height: 100%;
    min-height: 0;
    border-radius: 0;
    border: 0;
    flex: 1;
  }
  /* Шапка чата — закрепляется сверху, добавляется safe-area */
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-header {
    padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
    padding-bottom: 14px;
    border-radius: 0;
    flex-shrink: 0;
  }
  /* В fullscreen показываем кнопку «Закрыть» */
  body.cx-chat-fullscreen .cx-chat-close-mobile {
    display: inline-flex;
  }
  /* Tab-bar остаётся виден в чате — позволяет выйти на любую вкладку */
  body.cx-chat-fullscreen .cx-tabbar {
    z-index: 99999; /* выше чата */
  }
  /* Шапка сайта спрятана — её роль выполняет шапка чата */
  body.cx-chat-fullscreen #cx-ai-landing .cx-topbar { display: none !important; }
  /* Cookie-баннер скрываем */
  body.cx-chat-fullscreen .cx-cookie-banner { display: none !important; }
  /* Ввод сообщения — учитываем home-indicator iPhone и tab-bar снизу */
  body.cx-chat-fullscreen #cx-ai-landing .cx-chat-input-bar {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
  }
  /* Секция чата получает нижний отступ под tab-bar (72px tab + safe-area) */
  body.cx-chat-fullscreen #cx-ai-landing #chat-start {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  /* Лента сообщений — занимает всё свободное место */
  body.cx-chat-fullscreen #cx-ai-landing #cx-chat-messages {
    flex: 1;
    min-height: 0;
  }

  /* ── Финальный CTA ───────────────────────────────────────────────────── */
  #cx-ai-landing .cx-final-card {
    padding: 36px 18px;
    border-radius: 22px;
  }
  #cx-ai-landing .cx-final-card h2 { font-size: 22px; }
  #cx-ai-landing .cx-final-card p { font-size: 14px; }

  /* ── Footer (сжатый) ─────────────────────────────────────────────────── */
  .cx-footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .cx-footer { padding: 36px 0 24px; }
  .cx-footer-bottom { font-size: 12px; }

  /* ─────────────────────────────────────────────────────────────────────
     Нижний tab-bar (нативная нижняя навигация iOS/Android)
     ───────────────────────────────────────────────────────────────────── */
  .cx-tabbar {
    position: fixed;
    left: 8px; right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 99999;
    background: rgba(10, 12, 16, .94);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 22px;
    padding: 6px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 12px 32px rgba(0,0,0,.45);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    pointer-events: auto;
  }
  .cx-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 2px;
    border: 0;
    background: transparent;
    color: rgba(236, 239, 247, .55);
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: -.005em;
    text-decoration: none;
    border-radius: 14px;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent;
    min-height: 50px;
    pointer-events: auto;
    position: relative;
    z-index: 1;
  }
  .cx-tabbar__item svg {
    width: 22px; height: 22px;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .cx-tabbar__item:active {
    background: rgba(255,255,255,.05);
  }
  .cx-tabbar__item.is-active {
    color: #A5B4FC;
  }
  /* Центральная кнопка чата — приподнятая, акцентная (FAB-style) */
  .cx-tabbar__item--chat {
    color: #fff;
  }
  .cx-tabbar__item--chat .cx-tabbar__chat-circle {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1, #818CF8);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(99,102,241,.40);
    margin-top: -22px;
    border: 3px solid rgba(10, 12, 16, .94);
  }
  .cx-tabbar__item--chat .cx-tabbar__chat-circle svg {
    width: 22px; height: 22px;
    stroke: #fff;
  }
  .cx-tabbar__item--chat .cx-tabbar__label {
    font-size: 10px;
    margin-top: 2px;
  }
  .cx-tabbar__item--chat:active .cx-tabbar__chat-circle {
    transform: scale(.94);
  }

  /* ─────────────────────────────────────────────────────────────────────
     Bottom-sheet с меню (выезжает снизу при тапе на «Меню»)
     ───────────────────────────────────────────────────────────────────── */
  .cx-sheet {
    position: fixed;
    inset: 0;
    z-index: 99993;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .cx-sheet.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .cx-sheet__overlay {
    position: absolute; inset: 0;
    background: rgba(10, 12, 16, .55);
    cursor: pointer;
  }
  .cx-sheet__panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 86vh;
    background: #0E1117;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-top: 1px solid rgba(255,255,255,.10);
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
    box-shadow: 0 -20px 60px rgba(0,0,0,.55);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cx-sheet.is-open .cx-sheet__panel { transform: translateY(0); }
  .cx-sheet__handle {
    width: 100%;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .cx-sheet__handle::before {
    content: "";
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,.20);
    border-radius: 2px;
  }
  .cx-sheet__close {
    position: absolute;
    top: 12px; right: 14px;
    width: 32px; height: 32px;
    border: 0;
    background: rgba(255,255,255,.08);
    color: #ECEFF7;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, transform .12s ease;
  }
  .cx-sheet__close:active {
    background: rgba(255,255,255,.16);
    transform: scale(.9);
  }
  .cx-sheet__title {
    font-family: 'Plus Jakarta Sans', Manrope, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #ECEFF7;
    margin-bottom: 14px;
    text-align: center;
  }
  .cx-sheet__list {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    gap: 4px;
  }
  .cx-sheet__list a,
  .cx-sheet__list button {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    color: #ECEFF7;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.005em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, transform .12s ease;
  }
  .cx-sheet__list a:active,
  .cx-sheet__list button:active {
    background: rgba(99,102,241,.20);
    transform: scale(.98);
  }
  .cx-sheet__list a svg,
  .cx-sheet__list button svg {
    width: 20px; height: 20px;
    fill: none; stroke: #A5B4FC; stroke-width: 1.6;
    stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
  }
  .cx-sheet__list .cx-sheet__chevron {
    margin-left: auto;
    width: 16px; height: 16px;
    stroke: rgba(255,255,255,.30);
  }
  .cx-sheet__cta {
    margin-top: 14px;
    padding: 14px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366F1, #818CF8);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    box-shadow: 0 8px 22px rgba(99,102,241,.40);
    cursor: pointer;
  }
  .cx-sheet__cta:active { transform: scale(.98); }
  .cx-sheet__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    color: #ECEFF7;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
  }
  .cx-sheet__phone svg {
    width: 18px; height: 18px;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }

  /* ── Cookie banner — в стиле iOS-уведомления ──────────────────────────── */
  .cx-cookie-banner {
    left: 8px;
    right: 8px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 99988; /* ниже tab-bar (99999), чтобы не перекрывал тапы */
  }
  .cx-cookie-card {
    padding: 14px 16px;
    border-radius: 18px;
  }
  .cx-cookie-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .cx-cookie-text { font-size: 13px; }
  .cx-cookie-actions { width: 100%; }
  .cx-cookie-btn {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
  }

  /* ── Help modal (поддержка) — full-screen sheet ──────────────────────── */
  .cx-help-modal__window {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 24px) 22px 24px;
  }
  .cx-help-modal__close {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 14px;
    width: 32px; height: 32px;
  }

  /* ── Doc modal (политика, оферта) — full-screen ──────────────────────── */
  .cx-doc-modal__window {
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }
  .cx-doc-modal__close {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 8px;
  }

  /* ── Скрываем сложные декоративные элементы для производительности ───── */
  .cx-hero::before,
  .cx-hero::after {
    width: 80vw; height: 80vw;
    filter: blur(80px);
    opacity: .15;
  }
}

/* ─── На очень узких экранах (≤ 380px) ───────────────────────────────── */
@media (max-width: 380px) {
  #cx-ai-landing .cx-hero h1 { font-size: 22px; }
  #cx-ai-landing h2 { font-size: 20px; }
  #cx-ai-landing .cx-tariffs { grid-auto-columns: 88%; }
  .cx-tabbar__item { font-size: 9.5px; }
  .cx-tabbar__item svg { width: 20px; height: 20px; }
}

/* ─── Десктоп: tab-bar и sheet всегда скрыты ─────────────────────────── */
@media (min-width: 761px) {
  .cx-tabbar { display: none !important; }
  .cx-sheet  { display: none !important; }
  #cx-ai-landing .cx-topbar .cx-mobile-action { display: none !important; }
}
