
        /* ===== ОБЩИЕ СТИЛИ КВИЗА ===== */
        :root {
            --primary: #3D1D8E;
            --primary-hover: #5B3BAF;
            --background: #F4F2F7;
            --card: #FFFFFF;
            --text: #1A1A2E;
            --text-secondary: #6E6D7A;
            --accent: #059669;
            /* Волна 10 · Фаза 8 · hotfix round 4: явный дефолт --button-text.
               Раньше был только fallback `var(--button-text, #fff)` в .quiz-btn
               → при наследовании от родителя (например родитель с color: var(--text))
               браузер решал caddy cascade с color: #1A1A2E → тёмный текст
               на primary-кнопке. Явный declaration в :root разрывает inheritance. */
            --button-text: #FFFFFF;
            --radius: 16px;
            --font: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }
        /* Оверрайд для live-превью из админки — ставится через postMessage */
        #bm-preview-override { display: none; }
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: var(--font);
            /* Волна 9A · фикс композиции: subtle gradient + radial glow
               чтобы карточка не была «окном в пустоте flat-фона».
               Верх-лево — лёгкий tint primary-цвета (через color-mix), низ-право — тёмный card. */
            background:
                radial-gradient(ellipse at top left,
                    color-mix(in srgb, var(--primary, #7C3AED) 14%, var(--background, #282848)) 0%,
                    var(--background, #282848) 55%),
                var(--background);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            position: relative;
        }
        /* Декоративное тонкое свечение внизу-справа для контрбаланса */
        body::before {
            content: '';
            position: fixed;
            bottom: -200px; right: -150px;
            width: 600px; height: 600px;
            background: radial-gradient(circle,
                color-mix(in srgb, var(--accent, #3D1D8E) 18%, transparent) 0%,
                transparent 60%);
            pointer-events: none;
            z-index: 0;
        }
        .quiz-wrap {
            background: var(--card);
            border-radius: var(--radius);
            /* Усиленная тень + border чтобы карточка «плавала» над градиент-фоном */
            box-shadow:
                0 20px 50px -10px rgba(0, 0, 0, 0.35),
                0 8px 20px -5px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.04);
            max-width: 680px;
            width: 100%;
            overflow: hidden;
            transition: max-width 0.3s ease;
            position: relative;
            z-index: 1;
        }
        /* На экране вопросов карточка чуть шире (760px) — ответы в 2 колонки.
           Между 680 (узко) и 820 (перебор). */
        @media (min-width: 819px) {
            body.active-screen-questions .quiz-wrap,
            .quiz-wrap:has(#questions-wrap.active) {
                max-width: 760px;
            }
        }
        /* Welcome — ПОЛНОЭКРАННЫЙ лендинг (100% ширины) */
        .quiz-wrap.qw-expanded {
            max-width: 100%;
            border-radius: 0;
            box-shadow: none;
            min-height: 100vh;
        }
        body:has(.qw-expanded.quiz-wrap) {
            padding: 0;
        }
        .quiz-step { display: none; }
        .quiz-step.active { display: block; }
        .quiz-body { padding: 32px 36px 36px; }
        @media (max-width: 480px) {
            body { padding: 0; }
            .quiz-wrap { border-radius: 0; min-height: 100vh; border: none; box-shadow: none; max-width: 100%; }
            body.active-screen-questions .quiz-wrap { max-width: 100%; }
            .quiz-body { padding: 20px 16px 28px; }
            .quiz-hero { padding: 36px 20px 28px; }
            .quiz-start-body { padding: 24px 20px 28px; }
            /* Волна 9B mobile fix: заголовок вопроса компактнее, не переносится покусочно.
               Использую clamp() для плавного масштабирования. */
            .quiz-question { font-size: 18px; line-height: 1.3; letter-spacing: -0.005em; margin-bottom: 14px; }
            .quiz-question-description { font-size: 13px; line-height: 1.5; color: var(--text-secondary); margin: -8px 0 16px; }
            .quiz-hero-title { font-size: 26px; }
            /* Consultant на мобиле — переопределён ниже как inline-header
               (компактный блок под progress bar, без bubble-сообщения). */
            /* Category grid — 1 колонка на mobile */
            .quiz-categories-grid {
                grid-template-columns: 1fr !important;
                gap: 10px !important;
            }
            .quiz-category-card { min-height: 80px; padding: 14px 16px; flex-direction: row !important; justify-content: flex-start !important; gap: 14px; text-align: left; }
            .quiz-category-icon--svg { width: 42px; height: 42px; margin-bottom: 0; flex-shrink: 0; }
            .quiz-category-icon--svg svg { width: 30px; height: 30px; }
            .quiz-category-title { font-size: 15px !important; text-align: left; }
            /* Range slider — компактнее на мобиле */
            .qq-range-value { font-size: 26px; margin: 16px 0 8px; }
            .qq-range-value .qq-range-unit { font-size: 16px; }
            /* CTA / Next button — достаточный touch-target */
            .quiz-btn { padding: 14px 20px; font-size: 15px; min-height: 48px; }
            /* Step-navigator (назад + счётчик) — компактнее */
            .qq-step-nav { padding: 8px 0 14px; gap: 10px; }
            .qq-back-btn { padding: 6px 12px; font-size: 12px; }

            /* Consultant на mobile — inline-header над progress bar ТОЛЬКО на
               экране вопросов. На welcome/contacts/thanks НЕ показываем
               (иначе JS style="display:none" конфликтует с CSS !important
               и появляется дубль consultant'а). */
            body.has-consultant.active-screen-questions .qc-float {
                display: flex !important;
                position: static !important;
                flex-direction: row;
                align-items: center;
                gap: 10px;
                padding: 10px 12px;
                background: var(--option-bg, var(--card));
                border: 1px solid var(--border, #E5E7EB);
                border-radius: 10px;
                margin: 0 0 16px;
                width: 100%;
                max-width: 100%;
                bottom: auto; right: auto;
            }
            /* На НЕ-questions screens консультант должен быть скрыт. inline-style
               `display:none` из JS работает, но для надёжности ещё и CSS. */
            body:not(.active-screen-questions) .qc-float {
                display: none !important;
            }
            body.has-consultant.active-screen-questions .qc-float-card {
                display: flex;
                flex-direction: row;
                align-items: center;
                gap: 10px;
                padding: 0;
                box-shadow: none;
                background: transparent;
                border-radius: 0;
                flex: 1;
            }
            body.has-consultant.active-screen-questions .qc-float-photo {
                width: 38px; height: 38px;
                margin-bottom: 0;
                border-width: 2px;
                flex-shrink: 0;
            }
            body.has-consultant.active-screen-questions .qc-float-name {
                font-size: 13px;
                font-weight: 700;
                color: var(--text);
                line-height: 1.2;
            }
            body.has-consultant.active-screen-questions .qc-float-role {
                display: inline-block;
                font-size: 11px;
                color: var(--text-secondary);
                line-height: 1.2;
                margin-top: 1px;
            }
            body.has-consultant.active-screen-questions .qc-float-status {
                display: none;  /* на mobile нет места */
            }
            /* Bubble-сообщение на mobile СКРЫВАЕМ (description уже под заголовком) */
            .qc-float-msg {
                display: none !important;
            }
            /* Приветствие (message_text) на mobile тоже скрываем — длинный текст
               ломает композицию inline-карточки, description вопроса уже есть ниже. */
            body.has-consultant.active-screen-questions .qc-float-greeting {
                display: none !important;
            }
        }
        /* === PROGRESS BAR ===
           Волна 9B perf: плавное fade-out на переходах screens (screen=contacts/thanks
           не показывает progress, но вместо резкого disappearance — opacity-анимация
           через `.quiz-progress--fading`). */
        .quiz-progress {
            height: 8px;
            background: var(--surface-subtle, #e5e7eb);
            border-radius: 999px;
            margin-bottom: 8px;
            overflow: hidden;
            position: relative;
            transition: opacity 0.35s ease-out, transform 0.35s ease-out;
            opacity: 1;
            transform-origin: left center;
        }
        .quiz-progress-fill {
            height: 100%;
            /* Волна 9B · theme-aware: single-color primary вместо hardcoded
               gradient (purple→orange всегда). Теперь progress-bar окрашивается
               в цвет темы клиента. */
            background: var(--primary, #3D1D8E);
            border-radius: 999px;
            transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }
        .quiz-progress-fill::after {
            content: '';
            position: absolute;
            top: 0; right: 0; bottom: 0; left: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
            animation: quiz-progress-shimmer 2s ease-in-out infinite;
        }
        @keyframes quiz-progress-shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        /* === ВОПРОСЫ === */
        .quiz-question {
            font-size: 22px;
            font-weight: 800;
            margin-bottom: 12px;
            color: var(--text);
            line-height: 1.35;
            letter-spacing: -0.01em;
        }
        /* Subtext под заголовком вопроса — подсказка от консультанта inline. */
        .quiz-question-description {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.55;
            margin-bottom: 20px;
            opacity: 0.88;
        }

        /* === RANGE SLIDER (тематический под primary) === */
        .qq-range-value {
            text-align: center;
            font-size: 32px;
            color: var(--primary);
            font-weight: 800;
            margin: 24px 0 12px;
            letter-spacing: -0.02em;
        }
        .qq-range-value .qq-range-unit {
            font-size: 20px;
            opacity: 0.8;
            font-weight: 600;
        }
        /* Волна 11 · 2026-04-25: range slider — заполненный track через CSS gradient.
           --qq-range-fill устанавливается JS oninput (0%..100%), чтобы заливка
           слева до thumb была primary, а справа — серый track.
           Без этого на белой теме слайдер выглядел плоским (одного цвета).        */
        .qq-range-slider {
            --qq-range-fill: 50%;
            width: 100%;
            height: 8px;
            border-radius: 999px;
            background: linear-gradient(
                to right,
                var(--primary) 0%,
                var(--primary) var(--qq-range-fill),
                var(--surface-subtle, #E5E7EB) var(--qq-range-fill),
                var(--surface-subtle, #E5E7EB) 100%
            );
            appearance: none;
            -webkit-appearance: none;
            outline: none;
            cursor: pointer;
            margin: 8px 0 6px;
        }
        /* Light theme: track незаполненной части темнее (E5E7EB → D1D5DB) для контраста */
        body.quiz-light-theme .qq-range-slider {
            background: linear-gradient(
                to right,
                var(--primary) 0%,
                var(--primary) var(--qq-range-fill),
                #D1D5DB var(--qq-range-fill),
                #D1D5DB 100%
            );
        }
        .qq-range-slider::-webkit-slider-thumb {
            appearance: none;
            -webkit-appearance: none;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
            border: 3px solid var(--card);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24), 0 0 0 1px var(--primary);
            transition: transform 0.15s;
        }
        /* Light theme: усиленная тень thumb для контраста на белом фоне */
        body.quiz-light-theme .qq-range-slider::-webkit-slider-thumb {
            box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15),
                        0 2px 8px rgba(0, 0, 0, 0.18),
                        0 0 0 4px var(--primary);
        }
        .qq-range-slider::-webkit-slider-thumb:hover {
            transform: scale(1.12);
        }
        .qq-range-slider::-moz-range-thumb {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
            border: 3px solid var(--card);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
        }
        body.quiz-light-theme .qq-range-slider::-moz-range-thumb {
            box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15),
                        0 2px 8px rgba(0, 0, 0, 0.18);
        }
        .qq-range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 8px;
            font-variant-numeric: tabular-nums;
        }
        /* === Этап 3Б: Композитные вопросы (>1 блока) === */
        .quiz-composite {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 16px;
        }
        .quiz-composite-block {
            padding: 16px;
            background: rgba(0, 0, 0, 0.02);
            border-radius: 12px;
            border-left: 3px solid var(--primary);
        }
        .quiz-composite-block-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 10px;
            opacity: 0.85;
        }
        /* Картинка вопроса (Question.image) — над текстом */
        .quiz-question-image {
            display: block;
            max-width: 100%;
            max-height: 280px;
            width: auto;
            height: auto;
            margin: 0 auto 16px;
            border-radius: var(--radius, 12px);
            object-fit: cover;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        }
        /* Волна 9A · P4.5: вопросы в 2 колонки на desktop (Marquiz-style).
           На ≥819px radio/checkbox карточки идут grid 2 cols, на mobile — 1 стек. */
        .quiz-options {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }
        @media (min-width: 819px) {
            .quiz-options { grid-template-columns: repeat(2, 1fr); gap: 12px; }
            /* Для списков с единственным элементом — держим его в 1 колонку (не растягиваем пустым) */
            .quiz-options:has(.quiz-option:only-child) { grid-template-columns: 1fr; }
        }
        .quiz-option {
            display: flex;
            align-items: center;
            gap: 14px;
            width: 100%;
            padding: 16px 20px;
            /* Волна 9B · theme-aware: все hardcoded серые на CSS-переменные,
               чтобы dark-theme корректно работала. */
            background: var(--option-bg, var(--card));
            border: 2px solid var(--border, #e5e7eb);
            border-radius: 14px;
            text-align: left;
            font-size: 15px;
            font-weight: 500;
            color: var(--text);
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-family: inherit;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
            position: relative;
        }
        .quiz-option::before {
            content: '';
            width: 22px; height: 22px;
            border: 2px solid var(--border-hover, #d1d5db);
            border-radius: 50%;
            flex-shrink: 0;
            transition: all 0.2s;
            box-sizing: border-box;
        }
        .quiz-option:hover {
            border-color: var(--primary);
            background: var(--option-hover-bg, #F9FAFB);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.10);
        }
        .quiz-option:hover::before { border-color: var(--primary); }
        .quiz-option.selected {
            border-color: var(--primary);
            /* Тонкий tint primary-цвета поверх card — не заменяет фон, подсвечивает */
            background: color-mix(in srgb, var(--primary) 10%, var(--card));
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }
        .quiz-option.selected::before {
            border-color: var(--primary);
            background: var(--primary);
            box-shadow: inset 0 0 0 3px var(--card);
        }
        .quiz-btn {
            display: block;
            width: 100%;
            padding: 16px 24px;
            /* Волна 9B · theme-aware: single-color primary вместо 2-tone gradient.
               Hover = brightness(1.08), не подмена цвета (Marquiz-style). */
            background: var(--primary, #3D1D8E);
            color: var(--button-text, #fff);
            border: 1px solid transparent;  /* Волна 11: для light-theme override */
            border-radius: var(--radius, 12px);
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
            margin-top: 16px;
        }
        /* Волна 11 · 2026-04-25: light theme — лёгкая обводка + усиленная тень.
           На белом фоне `box-shadow: 0 4px 16px rgba(0,0,0,0.18)` теряется,
           кнопка выглядит «парящей» без чёткой границы. Добавляем 1px ободок
           тёмным rgba (адаптивно под любой primary цвет). */
        body.quiz-light-theme .quiz-btn {
            border: 1px solid rgba(0, 0, 0, 0.08);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12),
                        0 4px 16px rgba(0, 0, 0, 0.06);
        }
        body.quiz-light-theme .quiz-btn:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16),
                        0 8px 24px rgba(0, 0, 0, 0.08);
        }
        /* Light theme: option cards с более чётким border (e5e7eb→d1d5db) */
        body.quiz-light-theme .quiz-option {
            border: 2px solid #D1D5DB;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }
        body.quiz-light-theme .quiz-option:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        }
        /* Light theme: text-secondary для labels более тёмный */
        body.quiz-light-theme .qq-range-labels {
            color: rgba(40, 40, 72, 0.65);
        }
        .quiz-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24); }
        .quiz-btn:disabled {
            background: #d1d5db;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
            opacity: 0.7;
        }
        .quiz-btn:active:not(:disabled) { transform: translateY(0); }
        /* === КОНТАКТЫ: ИНПУТЫ === */
        .quiz-input {
            width: 100%;
            padding: 16px 18px;
            border: 2px solid var(--border, #e5e7eb);
            border-radius: 14px;
            font-size: 15px;
            /* Волна 9B · theme-aware: в dark → card (тёмный) + text (белый);
               в light → сохраняется прежний светлый вариант через overrides. */
            color: var(--text, #1a1a2e);
            background: var(--surface-subtle, #F8F7FC);
            font-family: inherit;
            transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
            box-sizing: border-box;
            cursor: text;
            -webkit-appearance: none;
        }
        .quiz-input::placeholder { color: var(--text-secondary, #9ca3af); opacity: 0.7; }
        .quiz-input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
            background: var(--card, #fff);
        }
        .quiz-input.error { border-color: #dc2626; background: color-mix(in srgb, #dc2626 6%, var(--card, #fff)); }
        /* === Контактная форма === */
        .quiz-contacts { padding: 32px 28px; }
        .quiz-contacts-header { text-align: center; margin-bottom: 24px; }
        .quiz-contacts-subtitle { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }
        /* Волна 8 v15: все поля контактов — полной ширины, друг под другом.
           Убран desktop grid 2 cols — Marquiz-стиль: stack одной колонкой. */
        .contact-group { margin-bottom: 14px; }
        .quiz-input-wrap { position: relative; }
        .quiz-input-icon {
            position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
            opacity: 0.35; pointer-events: none;
        }
        .quiz-input-icon-pad { padding-left: 40px; }
        .quiz-field-error { color: #dc2626; font-size: 12px; margin: 3px 0 0 4px; min-height: 0; }
        .quiz-consent {
            display: flex; align-items: start; gap: 10px; font-size: 13px;
            color: var(--text-secondary); margin: 18px 0; cursor: pointer; line-height: 1.4;
        }
        .quiz-consent-checkbox {
            width: 18px; height: 18px; accent-color: var(--primary);
            flex-shrink: 0; margin-top: 1px;
        }
        .quiz-consent-link { color: var(--primary); text-decoration: underline; }

        /* ============================================
           Волна 9A · P4.6: Messenger Contacts (alt-channel)
           ============================================ */

        /* === Alt-button: премиальная кнопка с цветными pill-иконками === */
        .qmsg-alt-btn {
            display: flex; align-items: center; justify-content: center;
            gap: 12px;
            width: 100%;
            margin-top: 14px;
            padding: 16px 20px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text, #FFFFFF);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 12px;
            font-size: 14px; font-weight: 500;
            cursor: pointer;
            font-family: inherit;
            position: relative;
            overflow: hidden;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .qmsg-alt-btn::before {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(90deg,
                rgba(38, 165, 228, 0.08),  /* TG */
                rgba(37, 211, 102, 0.08),  /* WA */
                rgba(0, 119, 255, 0.08),   /* VK */
                rgba(160, 71, 255, 0.08)); /* Max */
            opacity: 0;
            transition: opacity 0.3s;
            pointer-events: none;
        }
        .qmsg-alt-btn:hover {
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
        }
        .qmsg-alt-btn:hover::before { opacity: 1; }
        .qmsg-alt-btn:active { transform: translateY(0); }
        .qmsg-alt-btn > * { position: relative; z-index: 1; }

        .qmsg-alt-icons {
            display: inline-flex;
            margin-right: 2px;
        }
        /* Круглые брендированные pill-иконки, overlap -6px (как аватарки в чате) */
        .qmsg-alt-icon {
            width: 26px; height: 26px;
            display: inline-flex; align-items: center; justify-content: center;
            margin-left: -7px;
            border-radius: 50%;
            border: 2px solid var(--card, #1A1F35);
            flex-shrink: 0;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
            transition: transform 0.2s;
        }
        .qmsg-alt-icon:first-child { margin-left: 0; }
        .qmsg-alt-icon svg { width: 14px; height: 14px; }
        .qmsg-alt-btn:hover .qmsg-alt-icon {
            /* На hover — иконки «раскрываются веером» */
            transform: translateX(calc(var(--idx, 0) * 2px));
        }

        /* === Экран выбора канала === */
        .qmsg-select {
            padding: 28px 4px;
            animation: qmsg-fade-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        }
        /* Волна 9C · QC3 v2: Хедер с кнопкой «Назад» слева и заголовком в центре.
           Inline flex — не накладывается на текст (было: position:absolute накладывался). */
        .qmsg-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 22px;
            padding: 0 4px;
        }
        .qmsg-top-back {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 7px 12px 7px 9px;
            background: transparent;
            border: 1.5px solid var(--border, rgba(255, 255, 255, 0.15));
            border-radius: 999px;
            color: var(--text, #FFFFFF);
            font-size: 12px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s, transform 0.15s;
            flex-shrink: 0;
            white-space: nowrap;
        }
        .qmsg-top-back:hover {
            background: var(--option-hover-bg, rgba(255, 255, 255, 0.06));
            border-color: var(--primary);
            transform: translateX(-2px);
        }
        .qmsg-top-back svg { flex-shrink: 0; }
        /* На mobile: компактнее, label скрывается если мало места */
        @media (max-width: 420px) {
            .qmsg-top-back { padding: 7px 10px 7px 8px; font-size: 11px; }
            .qmsg-top-back-label { display: none; }  /* только стрелка ← */
            .qmsg-top-back { padding: 7px 9px; }
        }
        @keyframes qmsg-fade-in {
            from { opacity: 0; transform: translateY(8px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .qmsg-select-title {
            font-size: 22px; font-weight: 700;
            color: var(--text, #FFFFFF);
            margin: 0 0 24px;
        }
        .qmsg-select-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 20px;
        }
        @media (max-width: 480px) {
            .qmsg-select-grid { grid-template-columns: 1fr; }
        }

        /* === Карточка канала === */
        /* Волна 9C · QC4: theme-aware background через CSS-variables.
           Было: hardcoded rgba(255,255,255,0.06) — на светлой теме невидимо. */
        .qmsg-card {
            display: flex; align-items: center;
            gap: 14px;
            padding: 18px 20px;
            background: var(--option-bg, rgba(255, 255, 255, 0.06));
            border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
            border-radius: 14px;
            cursor: pointer;
            font-family: inherit;
            text-align: left;
            position: relative;
            overflow: hidden;
            /* Стаггер появления: --i задаётся инлайн-стилем от 0 до 3 */
            animation: qmsg-card-enter 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) backwards;
            animation-delay: calc(var(--i, 0) * 70ms);
            transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                        border-color 0.2s,
                        background 0.2s,
                        box-shadow 0.2s;
        }
        @keyframes qmsg-card-enter {
            from { opacity: 0; transform: translateY(14px) scale(0.96); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }
        .qmsg-card:hover {
            background: var(--option-hover-bg, rgba(255, 255, 255, 0.1));
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
        }
        .qmsg-card:active { transform: translateY(0) scale(0.98); }

        .qmsg-card-icon {
            width: 46px; height: 46px;
            border-radius: 12px;
            display: inline-flex; align-items: center; justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .qmsg-card-icon svg { width: 28px; height: 28px; }
        .qmsg-card:hover .qmsg-card-icon {
            transform: scale(1.08) rotate(-3deg);
        }

        .qmsg-card-label {
            font-size: 15px; font-weight: 600;
            color: var(--text, #FFFFFF);
            flex: 1;
        }
        .qmsg-card-arrow {
            color: rgba(255, 255, 255, 0.35);
            display: inline-flex;
            flex-shrink: 0;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                        color 0.2s;
        }
        .qmsg-card:hover .qmsg-card-arrow {
            transform: translateX(4px);
            color: rgba(255, 255, 255, 0.8);
        }

        .qmsg-meta-star {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            margin-left: 2px;
        }
        .qmsg-back-link {
            display: inline-block;
            color: var(--primary, #7C3AED);
            font-size: 14px; font-weight: 500;
            text-decoration: none;
            border-bottom: 1px solid currentColor;
            padding-bottom: 1px;
            margin-top: 6px;
            transition: opacity 0.15s;
        }
        .qmsg-back-link:hover { opacity: 0.75; }
        .qmsg-meta-note {
            margin-top: 20px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
            line-height: 1.4;
        }

        /* Волна 9A · P4.6 · шаг 2: форма ввода контакта юзера после выбора канала */
        .qmsg-step-input {
            max-width: 480px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 14px;
            text-align: left;
            /* Анимация появления шага 2 после выбора канала */
            animation: qmsg-step-enter 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        }
        @keyframes qmsg-step-enter {
            from { opacity: 0; transform: translateX(14px); }
            to   { opacity: 1; transform: translateX(0); }
        }
        .qmsg-chosen-channel {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            /* Волна 9C · QC4: theme-aware */
            background: var(--option-bg, rgba(255, 255, 255, 0.06));
            border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
            border-radius: 12px;
        }
        .qmsg-chosen-icon {
            display: inline-flex;
            align-items: center; justify-content: center;
            width: 40px; height: 40px;
            border-radius: 10px;
            flex-shrink: 0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        .qmsg-chosen-icon svg { width: 24px; height: 24px; }
        .qmsg-chosen-label {
            font-size: 13px; font-weight: 700;
            color: var(--text, #FFFFFF);
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .qmsg-input {
            width: 100%;
            font-size: 16px;
        }
        .qmsg-submit-btn {
            margin-top: 4px;
        }
        .qmsg-back-inner {
            display: block;
            text-align: center;
            margin-top: 4px;
            font-size: 13px;
            color: rgba(255, 255, 255, 0.6);
            text-decoration: none;
            border: 0;
            padding: 0;
        }
        .qmsg-back-inner:hover { color: rgba(255, 255, 255, 0.9); }

        /* ============================================
           Волна 5A.3: Marquiz-уровень базовых стилей
           ============================================ */

        /* Плавный fade при переключении экранов.
           Волна 9B · perf fix: убрали translateY (большой repaint на welcome с BG
           на весь экран), уменьшили duration до 0.22s (ощущается «мгновенно»),
           used cubic-bezier для материального ускорения.
           will-change: opacity → GPU composite слой, не пролагивает. */
        .quiz-step.active {
            display: block;
            animation: quizFadeIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
            will-change: opacity;
        }
        @keyframes quizFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        /* Убираем will-change после завершения анимации (чтобы не блокировать GPU
           лишние слои, когда анимация уже прошла). */
        .quiz-step.active {
            animation-fill-mode: both;
        }

        /* max-width определён в основном .quiz-wrap выше */

        /* === HERO блок для стартового и welcome экранов === */
        .quiz-hero {
            position: relative;
            padding: 40px 28px 32px;
            text-align: center;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
            color: #fff;
            overflow: hidden;
        }
        .quiz-hero::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -20%;
            width: 70%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%);
            pointer-events: none;
        }
        .quiz-hero::after {
            content: '';
            position: absolute;
            bottom: -40%;
            left: -10%;
            width: 60%;
            height: 160%;
            background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
            pointer-events: none;
        }
        .quiz-hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: rgba(255, 255, 255, 0.18);
            backdrop-filter: blur(8px);
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 14px;
            position: relative;
            z-index: 1;
        }
        .quiz-hero-title {
            font-size: 32px;
            font-weight: 900;
            line-height: 1.2;
            margin-bottom: 12px;
            position: relative;
            z-index: 1;
            letter-spacing: -0.02em;
        }
        .quiz-hero-subtitle {
            font-size: 15px;
            opacity: 0.9;
            line-height: 1.5;
            margin-bottom: 6px;
            position: relative;
            z-index: 1;
        }
        .quiz-hero-logo {
            display: block;
            max-height: 48px;
            margin: 0 auto 16px;
            position: relative;
            z-index: 1;
        }

        /* === Стартовая / Welcome body === */
        .quiz-start-body {
            padding: 28px 32px 36px;
        }
        .quiz-start-features {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 24px;
        }
        .quiz-start-feature {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: var(--text-secondary);
        }
        .quiz-start-feature strong {
            color: var(--primary);
            font-weight: 700;
        }
        .quiz-start-meta {
            color: var(--text-secondary);
            text-align: center;
            margin-bottom: 20px;
            font-size: 14px;
        }
        .quiz-start-meta strong {
            color: var(--primary);
            font-weight: 700;
        }
        .quiz-btn-large {
            font-size: 17px;
            padding: 16px 24px;
            box-shadow: 0 4px 16px rgba(61, 29, 142, 0.25);
        }
        .quiz-btn-large:hover {
            box-shadow: 0 6px 20px rgba(61, 29, 142, 0.35);
        }

        /* === Логотип квиза (на всех экранах кроме welcome) === */
        .quiz-logo-wrap {
            text-align: center;
            padding: 20px 20px 8px;
            position: relative;
            z-index: 1;
        }
        .quiz-logo-img {
            max-height: 44px;
            max-width: 180px;
            object-fit: contain;
            opacity: 0.9;
            transition: opacity 0.2s;
        }
        .quiz-logo-img:hover { opacity: 1; }

        /* === Фон квиза — на body (за карточкой), карточка белая поверх === */

        /* === Волна 5B · БЛОК 4: welcome Marquiz split-layout (.qw-*) === */
        .qw {
            display: grid;
            grid-template-columns: 1fr 1fr;
            min-height: 100vh;
            overflow: hidden;
        }
        /* Левая часть: медиа — на всю высоту viewport */
        .qw-media {
            position: relative;
            background: #e8e3f0;
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: flex-end;
            justify-content: flex-start;
        }
        /* Видео в media-слоте (autoplay muted loop) */
        .qw-media-video {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 1;
        }
        .qw-media-placeholder {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .qw-media[style*="background-image"] .qw-media-placeholder {
            display: none;
        }
        .qw-media:not([style*="background-image"]) {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 50%, var(--accent) 100%);
        }
        .qw-media:not([style*="background-image"]) .qw-media-placeholder {
            color: rgba(255,255,255,0.6);
        }
        .qw-media:not([style*="background-image"]) .qw-media-placeholder svg {
            stroke: rgba(255,255,255,0.4);
        }
        .qw-disclaimer {
            position: relative;
            z-index: 1;
            padding: 12px 16px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.85);
            background: rgba(0, 0, 0, 0.35);
            backdrop-filter: blur(6px);
            border-radius: 8px;
            margin: 12px;
        }

        /* Правая часть: контент */
        .qw-content {
            padding: 40px 36px 32px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 4px;
        }
        .qw-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 16px;
            font-size: 13px;
            color: var(--text-secondary);
        }
        .qw-badge-icon {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            object-fit: cover;
        }
        .qw-title {
            font-size: clamp(32px, 4vw, 48px);
            font-weight: 900;
            color: var(--text);
            line-height: 1.15;
            letter-spacing: -0.02em;
            margin: 0 0 14px;
        }
        .qw-subtitle {
            font-size: clamp(15px, 1.4vw, 18px);
            color: var(--text-secondary);
            line-height: 1.55;
            margin: 0 0 20px;
        }
        /* Features bullet list — ПРЕИМУЩЕСТВА под subtitle (Marquiz-стиль) */
        .qw-features {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin: 4px 0 22px;
        }
        .qw-feature {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 14px;
            color: var(--text);
            line-height: 1.45;
        }
        .qw-feature-check {
            flex-shrink: 0;
            width: 18px;
            height: 18px;
            margin-top: 2px;
            background: rgba(61, 29, 142, 0.1);
            color: var(--primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 800;
        }
        .qw-feature strong { color: var(--primary); font-weight: 700; }
        /* Бонус-пилюля плавающая top-right (Marquiz-style) */
        .qw-bonus-floating {
            position: absolute;
            top: 20px;
            right: 20px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: #fef9c3;
            color: #854d0e;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 600;
            box-shadow: 0 4px 16px rgba(133, 77, 14, 0.15);
            z-index: 10;
            animation: qw-bonus-float-pulse 3s ease-in-out infinite;
        }
        @keyframes qw-bonus-float-pulse {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-3px); }
        }
        .qw-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 16px;
        }
        .qw-btn-primary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 16px 32px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
            color: #fff;
            border: none;
            border-radius: var(--radius, 12px);
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            font-family: var(--font, inherit);
            transition: background 0.15s, transform 0.1s;
            box-shadow: 0 6px 20px rgba(61, 29, 142, 0.3);
            align-self: flex-start;
        }
        .qw-btn-primary:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
        }
        .qw-bonus {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            background: #fef9c3;
            color: #854d0e;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 16px;
            align-self: flex-start;
        }
        .qw-footer {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-top: auto;
            font-size: 13px;
            color: var(--text-secondary);
        }
        .qw-phone a {
            color: var(--text);
            text-decoration: none;
            font-weight: 600;
        }
        .qw-company {
            font-size: 12px;
            color: #9ca3af;
        }
        .qw-timer {
            font-size: 13px;
            color: var(--text-secondary);
            margin: 8px 0;
        }
        /* Bonuses cards */
        .qw-bonuses {
            display: flex;
            gap: 10px;
            margin: 16px 0;
            flex-wrap: wrap;
        }
        .qw-bonus-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: var(--card, #fff);
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            text-decoration: none;
            color: var(--text);
            font-size: 13px;
            font-weight: 600;
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .qw-bonus-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        }
        .qw-bonus-card-img {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            object-fit: cover;
            flex-shrink: 0;
        }

        /* --- Design: background (фоновая картинка на всю ширину) --- */
        .qw.qw-design-background {
            grid-template-columns: 1fr;
            position: relative;
        }
        .qw.qw-design-background .qw-media {
            position: absolute;
            inset: 0;
            z-index: 0;
            min-height: 0;
        }
        .qw.qw-design-background .qw-media::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 100%);
        }
        .qw.qw-design-background .qw-content {
            position: relative;
            z-index: 1;
            color: #fff;
            min-height: 100vh;
        }
        .qw.qw-design-background .qw-title { color: #fff; }
        .qw.qw-design-background .qw-subtitle { color: rgba(255,255,255,0.8); }
        .qw.qw-design-background .qw-badge { color: rgba(255,255,255,0.7); }
        .qw.qw-design-background .qw-phone a { color: #fff; }
        .qw.qw-design-background .qw-company { color: rgba(255,255,255,0.6); }
        .qw.qw-design-background .qw-timer { color: rgba(255,255,255,0.7); }
        .qw.qw-design-background .qw-disclaimer {
            position: absolute;
            bottom: 12px;
            left: 12px;
            z-index: 2;
        }
        .qw.qw-design-background .qw-media-placeholder { display: none; }

        /* --- Design: centered (без фото, текст по центру) --- */
        .qw.qw-design-centered {
            grid-template-columns: 1fr;
        }
        .qw.qw-design-centered .qw-media {
            display: none;
        }
        .qw.qw-design-centered .qw-content {
            text-align: center;
            align-items: center;
            padding: 40px 32px;
        }
        .qw.qw-design-centered .qw-btn-primary {
            align-self: center;
        }
        .qw.qw-design-centered .qw-bonus {
            align-self: center;
        }
        .qw.qw-design-centered .qw-footer {
            align-items: center;
        }

        /* --- Alignment --- */
        .qw.qw-align-center .qw-content {
            text-align: center;
            align-items: center;
        }
        .qw.qw-align-center .qw-btn-primary,
        .qw.qw-align-center .qw-bonus {
            align-self: center;
        }
        .qw.qw-align-right .qw-content {
            text-align: right;
            align-items: flex-end;
        }
        .qw.qw-align-right .qw-btn-primary,
        .qw.qw-align-right .qw-bonus {
            align-self: flex-end;
        }

        @media (max-width: 600px) {
            .qw {
                grid-template-columns: 1fr;
            }
            .qw-media {
                min-height: 200px;
                max-height: 240px;
            }
            .qw-content {
                padding: 24px 20px 20px;
            }
            /* Mobile title — 26px минимум, не падать до 18px (нечитаемо) */
            .qw-title {
                font-size: 26px;
                line-height: 1.2;
            }
            .qw-subtitle {
                font-size: 15px;
            }
            .qw-bonus-floating {
                top: 12px;
                right: 12px;
                padding: 8px 12px;
                font-size: 12px;
            }
        }

        /* === Категории: сетка карточек === */
        .quiz-categories-header {
            padding: 28px 24px 16px;
            text-align: center;
        }
        .quiz-categories-title {
            font-size: 20px;
            font-weight: 800;
            color: var(--text);
            margin-bottom: 6px;
        }
        .quiz-categories-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
        }
        .quiz-categories-grid {
            display: grid;
            /* auto-fit вместо auto-fill: 3 карточки растягиваются по 1/3 ширины,
               без пустых колонок справа. Было: для 3 категорий grid создавал 4
               колонки и 4-я оставалась пустой (визуальная асимметрия). */
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
            padding: 0 24px 28px;
            /* Ограничиваем максимальную ширину карточки: при <=4 карточек и широком
               viewport карточки не раздуваются до 300px+ (выглядит по-уродливо). */
            max-width: 100%;
        }
        /* Для 3-4 карточек на широком экране — центрируем и ограничиваем ширину */
        .quiz-categories-grid:has(.quiz-category-card:nth-child(3):last-child) {
            max-width: 560px;
            margin: 0 auto;
        }
        .quiz-categories-grid:has(.quiz-category-card:nth-child(4):last-child) {
            max-width: 720px;
            margin: 0 auto;
        }
        .quiz-category-card {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 160px;
            padding: 20px 14px;
            /* Волна 9B · theme-aware: дарк-карточка использует card, не background
               (чтобы выделялась поверх quiz-wrap card). */
            background: var(--option-bg, var(--card));
            border: 2px solid var(--border, #e5e7eb);
            border-radius: 14px;
            cursor: pointer;
            overflow: hidden;
            transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
            font-family: inherit;
            text-align: center;
        }
        .quiz-category-card:hover {
            transform: translateY(-3px);
            border-color: var(--primary);
            background: color-mix(in srgb, var(--primary) 8%, var(--card));
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        }
        .quiz-category-bg {
            position: absolute;
            inset: 0;
            background-size: cover;
            background-position: center;
            z-index: 0;
        }
        .quiz-category-bg::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.65) 100%);
        }
        .quiz-category-content {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        .quiz-category-icon {
            width: 48px;
            height: 48px;
            object-fit: contain;
        }
        /* Emoji-вариант иконки (когда cat.icon = «🏗️» а не URL) */
        .quiz-category-icon--emoji {
            width: auto;
            height: auto;
            font-size: 44px;
            line-height: 1;
            display: inline-block;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }
        /* Inline SVG-иконка (Lucide-style). Цвет наследуется через currentColor.
           Волна 9B perf: transition определён на элементе, а не в :hover → ON/OFF
           плавный. will-change: transform → GPU composite layer, ускоряет hover. */
        .quiz-category-icon--svg {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 56px;
            height: 56px;
            color: var(--primary, #3D1D8E);
            margin-bottom: 4px;
            transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
            will-change: transform;
        }
        .quiz-category-icon--svg svg {
            width: 40px;
            height: 40px;
            display: block;
        }
        .quiz-category-card:hover .quiz-category-icon--svg {
            transform: scale(1.08);
        }
        .quiz-category-card:has(.quiz-category-bg) .quiz-category-title {
            color: #fff;
            text-shadow: 0 2px 6px rgba(0,0,0,0.4);
        }
        .quiz-category-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text);
            line-height: 1.3;
        }

        /* === Улучшенные вопросы — карточки с hover и счётчиком === */
        .quiz-progress-wrap {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
        }
        .quiz-progress-wrap .quiz-progress {
            flex: 1;
            margin-bottom: 0;
        }
        .quiz-progress-counter {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-secondary);
            letter-spacing: 0.4px;
            text-transform: uppercase;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }
        /* Ripple overlay on click — uses ::after to avoid conflicting with ::before radio-dot */
        .quiz-option {
            position: relative;
            overflow: hidden;
        }
        .quiz-option::after {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--primary);
            opacity: 0;
            transition: opacity 0.2s;
            z-index: 0;
            pointer-events: none;
        }
        .quiz-option span, .quiz-option > * { position: relative; z-index: 1; }
        /* ::before (radio-dot) тоже поверх ripple */
        .quiz-option::before { position: relative; z-index: 1; }
        .quiz-option:active::after { opacity: 0.06; }

        /* Волна 9A · P1.8: картинка в radio/checkbox ответах. Маленький preview 48×48 слева. */
        .quiz-option-img {
            width: 48px; height: 48px;
            object-fit: cover;
            border-radius: 8px;
            flex-shrink: 0;
            position: relative; z-index: 1;
        }
        .quiz-option-text {
            flex: 1;
            position: relative; z-index: 1;
        }
        .qq-check-img {
            width: 40px; height: 40px;
            object-fit: cover;
            border-radius: 6px;
            flex-shrink: 0;
        }
        .qq-check-item--has-img { gap: 12px; }
        @media (max-width: 480px) {
            .quiz-option-img { width: 40px; height: 40px; }
            .qq-check-img { width: 36px; height: 36px; }
        }

        /* === Результаты — карточка центрированная === */
        /* Волна 8 v9: уменьшили padding до 32px top/bottom — карточка компактнее,
           кнопка retry визуально прилегает к тексту, а не висит в пустоте. */
        #result-screen .quiz-body {
            text-align: center;
            padding: 32px 32px;
        }

        @media (max-width: 560px) {
            .quiz-hero { padding: 30px 20px 24px; }
            .quiz-hero-title { font-size: 20px; }
            .quiz-start-body { padding: 22px 20px 26px; }
            .quiz-categories-grid { padding: 0 16px 20px; }
        }

        /* ====================================================================
           Волна 5B · БЛОК 9: стили типов вопросов (.qq-*)
           Префикс qq = quiz question. Изолировано от существующих .quiz-*
           ==================================================================== */

        /* --- image_choice: grid карточек с фото (фикс бага image_choice) --- */
        .qq-image-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 8px;
        }
        .qq-image-card {
            display: flex;
            flex-direction: column;
            background: var(--card, #fff);
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
            text-align: left;
            padding: 0;
            font: inherit;
            color: inherit;
            width: 100%;
        }
        .qq-image-card:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.08);
        }
        .qq-image-card.selected {
            border-color: var(--primary);
            background: var(--background);
        }
        .qq-image-card-photo {
            width: 100%;
            aspect-ratio: 4 / 3;
            background-size: cover;
            background-position: center;
            background-color: #f4f2f7;
        }
        .qq-image-card-photo-empty {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #c4b8e0;
            font-size: 32px;
        }
        .qq-image-card-text {
            padding: 12px 14px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
        }
        @media (max-width: 480px) {
            .qq-image-grid { grid-template-columns: 1fr; }
        }

        /* --- checkbox: множественный выбор --- */
        /* Волна 9A · P4.5: checkbox-список тоже 2 колонки на desktop */
        .qq-check-list {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }
        @media (min-width: 819px) {
            .qq-check-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
            .qq-check-list:has(.qq-check-item:only-child) { grid-template-columns: 1fr; }
        }
        .qq-check-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            background: var(--card, #fff);
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
        }
        .qq-check-item:hover { border-color: var(--primary); }
        .qq-check-item.selected {
            border-color: var(--primary);
            background: var(--background);
        }
        .qq-check-box {
            width: 22px;
            height: 22px;
            border: 2px solid #d1d5db;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.15s;
        }
        .qq-check-item.selected .qq-check-box {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        .qq-check-text {
            font-size: 15px;
            color: var(--text);
        }

        /* --- select: выпадающий список --- */
        .qq-select {
            width: 100%;
            padding: 14px 16px;
            font-size: 15px;
            color: var(--text);
            background: var(--card, #fff);
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            cursor: pointer;
            transition: border-color 0.15s;
        }
        .qq-select:focus { outline: none; border-color: var(--primary); }

        /* --- emoji: горизонтальный ряд эмодзи --- */
        .qq-emoji-row {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
            margin: 16px 0;
        }
        .qq-emoji-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 14px 12px;
            background: var(--card, #fff);
            border: 2px solid #e5e7eb;
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.15s;
            min-width: 70px;
            font: inherit;
        }
        .qq-emoji-btn:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
        }
        .qq-emoji-btn.selected {
            border-color: var(--primary);
            background: var(--background);
        }
        .qq-emoji-icon {
            font-size: 36px;
            line-height: 1;
        }
        .qq-emoji-label {
            font-size: 11px;
            color: var(--text-secondary, #6E6D7A);
            font-weight: 600;
        }

        /* --- rating: звёзды --- */
        .qq-rating-stars {
            display: flex;
            gap: 6px;
            justify-content: center;
            margin: 20px 0;
        }
        .qq-rating-star {
            font-size: 42px;
            color: #d1d5db;
            cursor: pointer;
            transition: all 0.15s;
            background: none;
            border: none;
            padding: 0;
            line-height: 1;
        }
        .qq-rating-star:hover,
        .qq-rating-star.hover,
        .qq-rating-star.selected {
            color: var(--qq-rating-color, #fbbf24);
            transform: scale(1.1);
        }

        /* --- date: input type=date --- */
        .qq-date-input {
            width: 100%;
            padding: 14px 16px;
            font-size: 15px;
            color: var(--text);
            background: var(--card, #fff);
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font: inherit;
            transition: border-color 0.15s;
        }
        .qq-date-input:focus { outline: none; border-color: var(--primary); }

        /* --- file_upload: dropzone --- */
        .qq-file-zone {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 32px 20px;
            background: var(--card, #fff);
            border: 2px dashed #c4b8e0;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.15s;
            text-align: center;
        }
        .qq-file-zone:hover {
            border-color: var(--primary);
            background: var(--background);
        }
        .qq-file-icon {
            font-size: 32px;
            color: var(--primary);
            margin-bottom: 8px;
        }
        .qq-file-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
        }
        .qq-file-hint {
            font-size: 12px;
            color: var(--text-secondary, #6E6D7A);
            margin-top: 4px;
        }
        .qq-file-name {
            font-size: 13px;
            color: var(--primary);
            margin-top: 8px;
            font-weight: 600;
        }

        /* --- info_page: информационный экран --- */
        .qq-info-page {
            text-align: center;
            padding: 24px 16px;
        }
        .qq-info-image {
            max-width: 320px;
            max-height: 320px;
            margin: 0 auto 20px;
            border-radius: 12px;
            display: block;
        }
        /* Волна 8: info_page video */
        .qq-info-video {
            width: 100%;
            max-width: 560px;
            max-height: 340px;
            margin: 0 auto 20px;
            border-radius: 12px;
            display: block;
            background: #000;
        }

        /* --- group: контейнер для подвопросов --- */
        .qq-group {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }
        .qq-group.layout-horizontal {
            flex-direction: row;
            flex-wrap: wrap;
        }
        .qq-group.layout-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }
        .qq-group-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .qq-group-field-label {
            font-size: 13px;
            font-weight: 600;
            color: var(--text);
        }

        /* Floating consultant (Marquiz-style) */
        .qc-float {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 100;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 8px;
            max-width: 260px;
        }
        .qc-float-card {
            text-align: center;
            padding: 16px 20px 12px;
            background: var(--card, #fff);
            border-radius: 14px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.15);
        }
        .qc-float-photo {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary, #3D1D8E);
            margin-bottom: 6px;
        }
        .qc-float-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            text-align: left;
        }
        .qc-float-name {
            font-size: 13px;
            font-weight: 700;
            color: var(--text, #1A1A2E);
        }
        .qc-float-role {
            font-size: 11px;
            color: var(--text-secondary, #6E6D7A);
        }
        /* Приветствие — короткая реплика консультанта из поля `message_text`. */
        .qc-float-greeting {
            font-size: 12px;
            color: var(--text, #1A1A2E);
            opacity: 0.85;
            line-height: 1.4;
            margin-top: 4px;
            max-width: 220px;
        }
        .qc-float-status {
            font-size: 10px;
            color: #22c55e;
            font-weight: 600;
            margin-top: 4px;
        }
        .qc-float-msg {
            padding: 12px 16px;
            background: var(--card, #fff);
            border-radius: 12px;
            border-bottom-right-radius: 4px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.12);
            font-size: 13px;
            color: var(--text-secondary, #6E6D7A);
            line-height: 1.5;
            max-width: 240px;
        }
        /* Мобайл/планшет: консультант НАД вопросами (inline), как у Marquiz.
           Волна 9B fix: консультант виден ТОЛЬКО на экране вопросов,
           ширина 100% родительского контейнера (quiz-body), без bubble-msg. */
        @media (max-width: 768px) {
            body.has-consultant.active-screen-questions .qc-float {
                position: static;
                bottom: auto;
                right: auto;
                display: flex;
                flex-direction: row;
                align-items: center;
                gap: 10px;
                padding: 10px 14px;
                background: var(--option-bg, var(--card));
                border: 1px solid var(--border, #E5E7EB);
                border-radius: 10px;
                box-shadow: none;
                margin: 0 0 14px;
                width: 100%;
                max-width: 100%;
            }
            /* На не-вопросных экранах скрываем — иначе появляется дубликат
               (inline-card в extras-v2 на thank-you + этот). */
            body:not(.active-screen-questions) .qc-float {
                display: none !important;
            }
            body.has-consultant.active-screen-questions .qc-float-card {
                display: flex;
                align-items: center;
                gap: 10px;
                padding: 0;
                box-shadow: none;
                background: transparent;
                border-radius: 0;
                text-align: left;
                flex-shrink: 0;
            }
            body.has-consultant.active-screen-questions .qc-float-photo {
                width: 38px;
                height: 38px;
                margin-bottom: 0;
                border-width: 2px;
            }
            body.has-consultant.active-screen-questions .qc-float-name { font-size: 13px; font-weight: 700; color: var(--text); }
            body.has-consultant.active-screen-questions .qc-float-role {
                display: inline-block;
                font-size: 11px;
                color: var(--text-secondary);
                line-height: 1.2;
                margin-top: 1px;
            }
            body.has-consultant.active-screen-questions .qc-float-status { display: inline-block; font-size: 10px; }
            /* Bubble-сообщение на mobile полностью скрываем — description уже
               рендерится inline под заголовком вопроса (quiz-question-description). */
            .qc-float-msg {
                display: none !important;
            }
            /* Волна 10 · Фаза 8 · hotfix round 5/6: мобильная карточка консультанта.
               Layout:
                 [аватар] Имя                 ● онлайн
                          Роль
                          ┃ Цитата (q.description или consultant.message_text)
                          ┃ полным текстом без обрезки, italic, акцент-полоска слева
               Round 6: убрали line-clamp:2 — клиент видит всё приветствие целиком и
               изменения при смене вопроса (_qcUpdate в showStep) → плавный fade 140ms. */
            body.has-consultant.active-screen-questions .qc-float-greeting {
                display: block !important;
                font-size: 12px;
                line-height: 1.45;
                color: var(--text-secondary);
                margin-top: 8px;
                padding: 2px 0 2px 10px;
                border-left: 3px solid var(--primary, #3D1D8E);
                font-style: italic;
                opacity: 0.92;
                /* Без overflow/clamp — текст показывается полностью, карточка растёт */
            }
            /* Карточка консультанта растягивается вертикально чтобы вместить message */
            body.has-consultant.active-screen-questions .qc-float-card {
                align-items: flex-start;
                padding: 10px 12px;
            }
            body.has-consultant.active-screen-questions .qc-float-card > .qc-float-avatar-wrap {
                align-self: flex-start;
                flex-shrink: 0;
            }
            /* Компактная inline-шапка: name · онлайн рядом, role под ними */
            body.has-consultant.active-screen-questions .qc-float-status {
                display: inline-block;
                margin-left: 6px;
                vertical-align: middle;
                font-size: 10px;
            }
        }

        /* Result extras (stats, trust, consultant, CTAs) */
        /* === РЕЗУЛЬТАТ === */
        .qq-result-extras { margin-top: 20px; text-align: center; }
        /* Волна 8: когда extras содержит только кнопку retry (нет stats/trust/ctas),
           сжимаем gap, чтобы кнопка не висела в воздухе */
        .qq-result-extras:has(> .qq-result-retry:only-child) { margin-top: 8px; }
        .qq-stats-row {
            display: flex;
            justify-content: center;
            gap: 12px;
            margin-bottom: 24px;
            padding: 0;
        }
        .qq-stat {
            text-align: center;
            flex: 1;
            padding: 16px 12px;
            background: var(--background);
            border-radius: 14px;
        }
        .qq-stat-value {
            font-size: 28px;
            font-weight: 900;
            color: var(--primary);
            line-height: 1;
            margin-bottom: 4px;
        }
        .qq-stat-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
        .qq-result-consultant {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 18px;
            background: var(--background);
            border-radius: 16px;
            margin-bottom: 20px;
            border: 1px solid rgba(61, 29, 142, 0.08);
        }
        .qq-result-consultant-photo {
            width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
            border: 3px solid var(--primary);
            box-shadow: 0 2px 8px rgba(61, 29, 142, 0.15);
        }
        .qq-result-consultant-name { font-size: 15px; font-weight: 700; color: var(--text); }
        .qq-result-consultant-role { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
        .qq-trust-list { margin-bottom: 20px; }
        .qq-trust-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 0;
            font-size: 14px;
            color: var(--text);
        }
        .qq-trust-dot {
            width: 20px; height: 20px; border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-hover));
            flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            color: #fff; font-size: 11px; line-height: 1;
        }
        .qq-trust-dot::after { content: '✓'; }
        .qq-result-ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
        .qq-result-cta {
            padding: 14px 24px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
            color: #fff;
            border: none;
            border-radius: var(--radius, 12px);
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s;
            box-shadow: 0 4px 14px rgba(61, 29, 142, 0.2);
        }
        .qq-result-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(61, 29, 142, 0.3); }
        .qq-result-cta:nth-child(n+2) {
            background: transparent; color: var(--primary);
            border: 2px solid var(--primary); box-shadow: none;
        }
        .qq-result-cta:nth-child(n+2):hover { background: var(--background); }
        /* Волна 9A · P1.5: final_mode=price — крупный блок цены на результате */
        .qq-result-price {
            display: flex; align-items: baseline; justify-content: center;
            gap: 8px; flex-wrap: wrap;
            margin: 24px 0 16px;
            font-family: var(--font, inherit);
        }
        .qq-result-price__prefix,
        .qq-result-price__suffix {
            font-size: 18px; font-weight: 500;
            color: var(--text-secondary, #6B7280);
        }
        .qq-result-price__value {
            font-size: 48px; font-weight: 800; line-height: 1;
            color: var(--primary, #3D1D8E);
            letter-spacing: -0.02em;
            font-variant-numeric: tabular-nums;
        }
        @media (max-width: 600px) {
            .qq-result-price__value { font-size: 36px; }
            .qq-result-price__prefix, .qq-result-price__suffix { font-size: 15px; }
        }

        /* Волна 9A · P15: расширенный блок цены с heading + note */
        .qq-result-price-block {
            margin: 24px 0 16px;
            text-align: center;
        }
        .qq-result-price-heading {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary, #6B7280);
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin-bottom: 10px;
        }
        .qq-result-price-note {
            font-size: 12px;
            color: var(--text-secondary, rgba(255,255,255,0.55));
            line-height: 1.45;
            margin-top: 8px;
            max-width: 420px;
            margin-left: auto;
            margin-right: auto;
        }

        /* === Волна 9A · P15 v2: Thank-you linear flow (minimalist) === */
        .qq-result-extras-v2 {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 14px;
            margin: 22px auto 0;
            max-width: 440px;
            width: 100%;
        }

        /* Тонкий urgency-ribbon под subtitle — "· Ссылка действует ещё 4:48 ·" */
        .qq-tx-ribbon {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.6);
            text-align: center;
            font-weight: 500;
            /* Воздух от subtitle сверху + от CTA снизу */
            margin: 14px auto 18px;
            letter-spacing: 0.2px;
        }
        .qq-tx-ribbon b {
            color: #F59E0B;
            font-variant-numeric: tabular-nums;
            font-weight: 700;
        }
        .qq-tx-ribbon--expired { color: rgba(239, 68, 68, 0.9); }
        .qq-tx-ribbon--expired b { color: #EF4444; }

        /* Primary CTA — full-width внутри 440px-контейнера */
        .qq-tx-cta {
            display: block;
            padding: 14px 28px;
            background: var(--primary, #3D1D8E);
            color: #FFFFFF;
            border-radius: 10px;
            font-size: 15px; font-weight: 600;
            text-align: center;
            text-decoration: none;
            box-shadow: 0 4px 14px rgba(61, 29, 142, 0.28);
            transition: all 0.2s;
        }
        .qq-tx-cta:hover {
            filter: brightness(1.08);
            transform: translateY(-1px);
            box-shadow: 0 6px 22px rgba(61, 29, 142, 0.38);
        }

        /* Messenger CTA — secondary кнопка связаться в мессенджер напрямую.
           Брендовый градиент/цвет по channel (max/telegram/whatsapp/vk). */
        .qq-tx-msg-cta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            text-align: center;
            text-decoration: none;
            transition: all 0.2s;
            color: #FFFFFF;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
        }
        .qq-tx-msg-cta:hover {
            filter: brightness(1.10);
            transform: translateY(-1px);
            box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
        }
        .qq-tx-msg-cta svg {
            width: 18px; height: 18px;
            flex-shrink: 0;
        }
        /* Бренд-цвета для каналов */
        .qq-tx-msg-cta--max {
            background: linear-gradient(135deg, #2F8CFF 0%, #B047FF 100%);
        }
        .qq-tx-msg-cta--telegram { background: #26A5E4; }
        .qq-tx-msg-cta--whatsapp { background: #25D366; }
        .qq-tx-msg-cta--vk { background: #0077FF; }

        /* Share-row: "Поделиться:" + 2 мини-иконки */
        .qq-tx-share {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: -4px;
        }
        .qq-tx-share-label {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.5);
            font-weight: 500;
        }
        .qq-tx-share-btn {
            width: 28px; height: 28px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center; justify-content: center;
            color: #FFFFFF;
            transition: transform 0.15s, filter 0.15s;
        }
        .qq-tx-share-btn:hover { transform: scale(1.12); filter: brightness(1.1); }
        .qq-tx-share-btn.wa { background: #25D366; }
        .qq-tx-share-btn.tg { background: #26A5E4; }
        .qq-tx-share-btn svg { width: 14px; height: 14px; }

        /* Волна 10 · hot-fix: соцсети клиента (ссылки на VK/TG/WA/Max/YT/...) */
        .qq-tx-socials {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 8px;
            padding: 10px 14px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }
        .qq-tx-socials-label {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.55);
            font-weight: 500;
            margin-right: 4px;
        }
        .qq-tx-social {
            width: 32px; height: 32px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center; justify-content: center;
            color: #FFFFFF;
            transition: transform 0.15s, box-shadow 0.15s;
            flex-shrink: 0;
        }
        .qq-tx-social:hover { transform: scale(1.12); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
        .qq-tx-social svg { width: 18px; height: 18px; }
        /* Light-theme поддержка: .qq-tx-socials-label в тёмном цвете */
        body.quiz-light-theme .qq-tx-socials-label { color: rgba(40, 40, 72, 0.6); }
        body.quiz-light-theme .qq-tx-socials { border-top-color: rgba(40, 40, 72, 0.08); }

        /* Inline-строка consultant: мини-фото + текст слева */
        .qq-tx-consultant-line {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            margin-top: 8px;
        }
        .qq-tx-consultant-photo {
            width: 34px; height: 34px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
            border: 1.5px solid rgba(255, 255, 255, 0.15);
        }
        .qq-tx-consultant-text {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.45;
            text-align: left;
        }
        .qq-tx-consultant-text b { color: #FFFFFF; font-weight: 600; }

        /* Inline-строка QR: текст слева + мини-QR справа */
        .qq-tx-qr-line {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 10px 10px 14px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
        }
        .qq-tx-qr-text {
            flex: 1;
            font-size: 13px;
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.45;
            text-align: left;
        }
        .qq-tx-qr-text b { color: #FFFFFF; font-weight: 600; display: block; margin-bottom: 2px; }
        .qq-tx-qr-img {
            width: 64px; height: 64px;
            background: #FFFFFF;
            border-radius: 6px;
            padding: 4px;
            flex-shrink: 0;
            display: block;
        }

        /* Retry как text-link внизу */
        .qq-tx-retry-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            align-self: center;
            padding: 6px 10px;
            margin: 6px auto 0;
            background: transparent;
            border: 0;
            color: rgba(255, 255, 255, 0.5);
            font-size: 13px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            text-decoration: none;
            transition: color 0.15s;
        }
        .qq-tx-retry-link:hover {
            color: rgba(255, 255, 255, 0.85);
            text-decoration: underline;
        }

        /* Light theme overrides */
        body.quiz-light-theme .qq-tx-ribbon { color: rgba(17, 24, 39, 0.55); }
        body.quiz-light-theme .qq-tx-share-label { color: rgba(17, 24, 39, 0.45); }
        body.quiz-light-theme .qq-tx-consultant-line,
        body.quiz-light-theme .qq-tx-qr-line {
            background: rgba(17, 24, 39, 0.03);
            border-color: rgba(17, 24, 39, 0.08);
        }
        body.quiz-light-theme .qq-tx-consultant-text,
        body.quiz-light-theme .qq-tx-qr-text { color: rgba(17, 24, 39, 0.8); }
        body.quiz-light-theme .qq-tx-consultant-text b,
        body.quiz-light-theme .qq-tx-qr-text b { color: #111827; }
        body.quiz-light-theme .qq-tx-consultant-photo { border-color: rgba(17, 24, 39, 0.1); }
        body.quiz-light-theme .qq-tx-retry-link { color: rgba(17, 24, 39, 0.5); }
        body.quiz-light-theme .qq-tx-retry-link:hover { color: rgba(17, 24, 39, 0.85); }

        /* Mobile */
        @media (max-width: 560px) {
            .qq-result-extras-v2 { max-width: 100%; gap: 12px; }
            .qq-tx-qr-img { width: 56px; height: 56px; }
        }

        .qq-result-cta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 220px;
            padding: 14px 28px;
            background: var(--primary, #3D1D8E);
            color: #FFFFFF;
            border-radius: 10px;
            font-size: 15px; font-weight: 600;
            text-decoration: none;
            transition: all 0.2s;
            box-shadow: 0 4px 12px rgba(61, 29, 142, 0.25);
        }
        .qq-result-cta:hover {
            filter: brightness(1.08);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(61, 29, 142, 0.35);
        }

        .qq-result-countdown {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.3);
            border-radius: 8px;
            font-size: 13px;
            color: #F59E0B;
            font-weight: 500;
        }
        .qq-result-countdown b {
            font-variant-numeric: tabular-nums;
            font-weight: 700;
        }
        .qq-result-countdown--expired {
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.3);
            color: #EF4444;
        }

        .qq-result-share {
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }
        .qq-result-share-label {
            font-size: 13px;
            color: var(--text-secondary, rgba(255, 255, 255, 0.6));
        }
        .qq-share-btn {
            display: inline-flex;
            align-items: center; justify-content: center;
            width: 36px; height: 36px;
            border-radius: 50%;
            color: #FFFFFF;
            transition: transform 0.15s, filter 0.15s;
        }
        .qq-share-btn:hover { transform: scale(1.1); filter: brightness(1.1); }
        .qq-share-wa { background: #25D366; }
        .qq-share-tg { background: #26A5E4; }

        .qq-result-qr {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 12px;
            background: #FFFFFF;
            border-radius: 12px;
        }
        .qq-result-qr img { display: block; border-radius: 6px; }
        .qq-result-qr span { font-size: 11px; color: #6B7280; font-weight: 500; }

        .qq-result-consultant {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            padding: 12px 18px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            max-width: 360px;
        }
        .qq-result-consultant-photo {
            width: 48px; height: 48px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }
        .qq-result-consultant-info {
            text-align: left;
        }
        .qq-result-consultant-name {
            font-size: 14px; font-weight: 700;
            color: var(--text, #FFFFFF);
        }
        .qq-result-consultant-role {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 2px;
        }

        /* Confetti canvas — на весь экран поверх всего */
        .qq-confetti-canvas {
            position: fixed; inset: 0;
            width: 100vw; height: 100vh;
            pointer-events: none;
            z-index: 9998;
        }

        /* Волна 9A · P1.5: final_mode=multi_result — картинка QuizResult */
        .qq-result-image {
            display: block;
            max-width: 200px; width: 100%; height: auto;
            margin: 0 auto 20px;
            border-radius: 12px;
            object-fit: cover;
        }

        /* Волна 9A · P1.5: final_mode=redirect — loader */
        .qq-redirect-wrap {
            display: flex; flex-direction: column; align-items: center;
            gap: 20px; padding: 40px 20px;
        }
        .qq-redirect-spinner {
            width: 48px; height: 48px;
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-top-color: var(--primary, #3D1D8E);
            border-radius: 50%;
            animation: qq-spin 1s linear infinite;
        }
        @keyframes qq-spin { to { transform: rotate(360deg); } }
        .qq-redirect-text {
            font-size: 18px; font-weight: 600;
            color: var(--text, #111827);
        }
        .qq-redirect-fallback {
            font-size: 13px;
            color: var(--text-secondary, #6B7280);
            text-decoration: underline;
        }

        .qq-result-retry {
            /* Волна 8 v7: inline-block — text-align:center родителя .quiz-result-body
               центрирует автоматически. Простой, проверенный CSS-приём. */
            display: inline-block;
            margin-top: 20px;
            padding: 12px 28px;
            background: transparent;
            border: 2px solid #e5e7eb;
            border-radius: var(--radius, 12px);
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.2s;
        }
        .qq-result-retry:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--background);
        }

        /* ====== Back button + step counter ====== */
        .qq-step-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;               /* Волна 9A: отступ между «Назад» и счётчиком/скидкой */
            padding: 12px 0 20px;    /* больше воздуха сверху и снизу */
            flex-wrap: wrap;
        }
        .qq-back-btn {
            background: none;
            border: 1.5px solid #e5e7eb;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            padding: 8px 16px;
            border-radius: 10px;
            font-family: inherit;
            transition: all 0.2s;
        }
        .qq-back-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--background);
            transform: translateX(-2px);
        }
        .qq-step-counter {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 600;
            background: var(--background);
            padding: 6px 14px;
            border-radius: 999px;
        }

        /* Волна 9A · P1.2: накопительная скидка на progress-панели */
        .qq-discount-badge {
            display: inline-flex; align-items: center; gap: 6px;
            font-size: 13px; font-weight: 700;
            color: #FFFFFF;
            background: linear-gradient(135deg, #10B981, #059669);
            padding: 6px 12px;
            border-radius: 999px;
            margin-left: auto;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
        }
        .qq-discount-badge svg { color: #FFFFFF; opacity: 0.9; }

        /* === Result body — крупнее + шире для читаемости === */
        /* Волна 8 v7: вернули простой text-align:center. Родитель центрирует
           inline/inline-block детей. Retry-кнопка = inline-block с margin-top. */
        .quiz-result-body {
            text-align: center;
            padding: 40px 32px 32px;
        }
        .quiz-result-title {
            font-size: clamp(26px, 3.5vw, 36px);
            font-weight: 900;
            color: var(--text);
            margin: 0 0 14px;
            letter-spacing: -0.02em;
            line-height: 1.2;
        }
        .quiz-result-text {
            color: var(--text-secondary);
            font-size: clamp(15px, 1.3vw, 17px);
            line-height: 1.6;
            max-width: 560px;
            margin: 0 auto;
        }
        /* === Result icon animation === */
        .quiz-result-icon {
            width: 80px; height: 80px;
            margin: 0 auto 20px;
            background: linear-gradient(135deg, var(--background) 0%, rgba(61, 29, 142, 0.08) 100%);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            animation: quizResultPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .quiz-result-icon-lg {
            width: 96px; height: 96px;
            margin-bottom: 24px;
        }
        @keyframes quizResultPop {
            0% { transform: scale(0); opacity: 0; }
            60% { transform: scale(1.15); }
            100% { transform: scale(1); opacity: 1; }
        }

        /* === Powered by footer === */
        .quiz-powered {
            text-align: center;
            padding: 12px 20px 16px;
            font-size: 11px;
            color: var(--text-secondary);
            opacity: 0.6;
        }
        .quiz-powered a {
            color: var(--text-secondary);
            text-decoration: none;
        }
        .quiz-powered a:hover { color: var(--primary); }

        /* ====== Fade/slide анимации ====== */
        .qq-enter {
            animation: qqFadeIn 0.3s ease-out;
        }
        @keyframes qqFadeIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ====== Сессия 5: Dark welcome variant ====== */
        .qw.qw-design-dark {
            grid-template-columns: 55% 45%;
        }
        .qw.qw-design-dark .qw-content {
            background: #1A1A2E;
            color: #fff;
            padding: 40px 36px 32px;
        }
        .qw.qw-design-dark .qw-title {
            color: #fff;
            font-size: 32px;
            font-weight: 900;
        }
        .qw.qw-design-dark .qw-subtitle { color: rgba(255,255,255,0.75); font-size: 16px; }
        .qw.qw-design-dark .qw-badge { color: rgba(255,255,255,0.7); }
        .qw.qw-design-dark .qw-phone a { color: #fff; }
        .qw.qw-design-dark .qw-company { color: rgba(255,255,255,0.5); }
        .qw.qw-design-dark .qw-bonus { background: rgba(78,168,215,0.15); color: #4EA8D7; }
        .qw.qw-design-dark .qw-btn-primary {
            box-shadow: 0 4px 20px rgba(var(--primary-rgb, 61,29,142), 0.4);
        }

        /* Red dot badge animation */
        .qw-badge-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #E53935;
            animation: badgeBlink 1.2s ease-in-out infinite;
            flex-shrink: 0;
        }
        @keyframes badgeBlink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }

        /* Live counter */
        .qw-live-counter {
            font-weight: 700;
            color: var(--primary);
        }
        /* Result emoji bounce */
        #result-screen .quiz-body > div:first-child {
            animation: quizBounce 0.6s ease-out;
        }
        @keyframes quizBounce {
            0% { transform: scale(0); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        /* === Loader & Error === */
        .quiz-loader {
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            min-height: 300px; gap: 16px;
        }
        .quiz-loader-spinner {
            width: 40px; height: 40px; border: 3px solid var(--background, #f3f4f6);
            border-top-color: var(--primary, #3D1D8E); border-radius: 50%;
            animation: quiz-spin 0.8s linear infinite;
        }
        @keyframes quiz-spin { to { transform: rotate(360deg); } }
        .quiz-loader-text {
            color: var(--text-secondary, #6E6D7A); font-size: 14px;
        }
        .quiz-load-error {
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            min-height: 300px; gap: 12px; text-align: center; padding: 40px 20px;
        }
        .quiz-load-error-icon { font-size: 48px; }
        .quiz-load-error-title {
            font-size: 20px; font-weight: 700; color: var(--text, #1a1a2e);
        }
        .quiz-load-error-text {
            font-size: 14px; color: var(--text-secondary, #6E6D7A); max-width: 320px;
        }
        .quiz-load-error-retry {
            margin-top: 8px; padding: 10px 24px; border-radius: var(--radius, 16px);
            background: var(--primary, #3D1D8E); color: #fff; border: none;
            font-size: 14px; font-weight: 600; cursor: pointer;
        }
        .quiz-load-error-retry:hover { opacity: 0.9; }

        /* ====================================================================
           ВОЛНА 8, ФАЗА 3: Публичный рендер welcome-экрана в стиле Marquiz.
           Namespace: .qx-start (qx = Quiz eXperience).
           Фиксированные слоты, 58.333/41.667 колонки, full-bleed, breakpoint 819px.
           ==================================================================== */

        /* Контейнер — full-bleed, без max-width и border-radius */
        .qx-start {
            width: 100vw;
            min-height: 100vh;
            background: var(--background, #282848);
            padding: 0; margin: 0; border-radius: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
            color: var(--text, #FFFFFF);
            font-family: var(--font, 'Manrope', 'Inter', sans-serif);
            box-sizing: border-box;
        }
        .qx-start *, .qx-start *::before, .qx-start *::after { box-sizing: border-box; }

        /* === Brand (лого + тэглайн) — теперь внутри .qx-start__content === */
        .qx-start__brand {
            display: flex; align-items: center; gap: 12px;
            margin-bottom: 24px;
            flex-shrink: 0;
        }
        .qx-start__logo {
            height: 36px; width: auto; max-width: 140px;
            object-fit: contain; flex-shrink: 0;
            border-radius: 6px;
        }
        .qx-start__company {
            font-size: 13px; font-weight: 500; line-height: 1.3;
            color: var(--text, #FFFFFF); opacity: 0.85;
        }

        /* === Media колонка (bg картинка или видео) — full-bleed, без padding === */
        .qx-start__bg {
            position: relative;
            width: 100vw;
            height: 56.25vw;  /* 16:9 aspect на mobile */
            overflow: hidden;
            background: #1a1a2a;
        }
        .qx-start__bg img,
        .qx-start__bg video {
            width: 100%; height: 100%;
            object-fit: cover;
            display: block;
        }

        /* Волна 9A · P0.4: graceful fallback без медиа — блок .qx-start__bg не
           рендерится, content занимает всю ширину. Для background-темы даём
           красивый gradient вместо чёрного прямоугольника. */
        .qx-start--no-media .qx-start__content {
            width: 100% !important;
        }
        .qx-start--no-media.qx-start--theme-background {
            background: linear-gradient(135deg,
                var(--theme-bg, #282848) 0%,
                color-mix(in srgb, var(--theme-accent, #3D1D8E) 40%, var(--theme-bg, #282848)) 100%);
        }
        .qx-start--no-media.qx-start--theme-standard .qx-start__content,
        .qx-start--no-media.qx-start--theme-centered .qx-start__content {
            padding: 32px 24px;
        }

        /* === Content колонка === */
        .qx-start__content {
            width: 100%;
            padding: 16px;
            display: flex; flex-direction: column;
            flex-grow: 1;
        }
        .qx-start__body {
            /* Волна 8: body растягивается и центрирует контент по вертикали.
               Marquiz-стиль — когда мало контента, он в центре колонки, а не
               прижат вверх. Brand сверху, footer снизу, body — центр.
               align-items:flex-start — inline-flex дети (trigger) не растягиваются
               на 100% ширины, остаются компактными слева. */
            flex-grow: 1;
            display: flex; flex-direction: column;
            justify-content: center;
            align-items: flex-start;
        }
        /* Темы centered и background — body выравнивает детей по центру */
        .qx-start--theme-centered .qx-start__body,
        .qx-start--theme-background .qx-start__body {
            align-items: center;
            text-align: center;
        }
        /* Волна 11 · Phase Landing · Hotfix (2026-05-21):
           Badge на mobile в theme-centered/background был выровнен
           `align-self:flex-start` (дефолт ниже на строке 2805). Парент-body
           уже центрирует через align-items:center, но align-self ребёнка
           перекрывает. Десктопная media-query (3236, 3273) фиксит это —
           но на mobile правила не было. Дублируем здесь чтобы фикс работал
           на любом разрешении. */
        .qx-start--theme-centered .qx-start__badge,
        .qx-start--theme-background .qx-start__badge,
        .qx-start--theme-centered .qx-start__conversion-trigger,
        .qx-start--theme-background .qx-start__conversion-trigger {
            align-self: center;
        }
        /* Brand-блок (логотип + tagline) сам по себе flex-row, на mobile
           по дефолту прижат к flex-start = слева. Текст «Спортивный комплекс
           Мурино Арена» уезжал влево. Десктоп фиксил через 3254/3293,
           mobile — нет. Центрируем содержимое flex-row + сам блок. */
        .qx-start--theme-centered .qx-start__brand,
        .qx-start--theme-background .qx-start__brand {
            justify-content: center;
            align-self: stretch;
        }
        /* Bullets с переносом текста: парент text-align:center разворачивает
           wrap-line по центру item'а ("сауной" уезжала вправо относительно
           иконки). Принудительно left для features — иконка+первая строка
           слева, перенос корректно индентируется под первую строку текста. */
        .qx-start--theme-centered .qx-start__features,
        .qx-start--theme-background .qx-start__features,
        .qx-start--theme-centered .qx-start__feature,
        .qx-start--theme-background .qx-start__feature {
            text-align: left;
        }

        /* === Badge (опциональный, над H1) + пульс-точка + live counter === */
        .qx-start__badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            color: var(--text, #FFFFFF);
            margin-bottom: 24px;
            align-self: flex-start;
        }
        /* Волна 9C · QC: цвет точки настраивается через `--badge-dot-color`
           (можно задать inline style в рендере). Дефолт — зелёный (универсально
           для online-индикатора). Раньше был hardcoded #ef4444 (красный) —
           не подходил к большинству тем. */
        .qx-start__badge-dot {
            width: 10px; height: 10px;
            background: var(--badge-dot-color, #22c55e);
            border-radius: 50%;
            flex-shrink: 0;
            position: relative;
        }
        /* Волна 9A: двойная анимация — dot scale + расходящаяся волна.
           Пульс теперь ясно виден (было едва заметно: радиус только 6px). */
        .qx-start__badge-dot--animated {
            animation: qxBadgePulseDot 1.6s ease-in-out infinite;
        }
        .qx-start__badge-dot--animated::before {
            content: '';
            position: absolute;
            inset: -2px;
            border-radius: 50%;
            background: var(--badge-dot-color, #22c55e);
            animation: qxBadgePulseWave 1.6s ease-out infinite;
            z-index: -1;
            /* Полупрозрачная волна расходящаяся — alpha применяется через CSS mix */
            opacity: 0.55;
        }
        @keyframes qxBadgePulseDot {
            0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0 color-mix(in srgb, var(--badge-dot-color, #22c55e) 70%, transparent); }
            50%      { transform: scale(1.15); box-shadow: 0 0 0 3px color-mix(in srgb, var(--badge-dot-color, #22c55e) 35%, transparent); }
        }
        @keyframes qxBadgePulseWave {
            0%   { transform: scale(1);   opacity: 0.75; }
            100% { transform: scale(2.8); opacity: 0;    }
        }
        .qx-start__badge-counter {
            font-weight: 700;
            color: var(--primary, #7C3AED);
        }

        /* === H1 + H2 === */
        .qx-start__header {
            font-size: 26px; font-weight: 700; line-height: 1.2;
            color: var(--text, #FFFFFF);
            margin: 0 0 18px; letter-spacing: -0.01em;
        }
        .qx-start__subheader {
            font-size: 16px; font-weight: 500; line-height: 1.4;
            color: var(--text, #FFFFFF); opacity: 0.7;
            margin: 0 0 32px;
        }

        /* === Features (bullet list преимуществ) === */
        .qx-start__features {
            list-style: none;
            padding: 0;
            margin: 0 0 28px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .qx-start__feature {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 14px;
            line-height: 1.4;
            color: var(--text, #FFFFFF);
            opacity: 0.9;
        }
        .qx-start__feature-check {
            display: inline-flex;
            align-items: center; justify-content: center;
            width: 20px; height: 20px;
            border-radius: 50%;
            background: var(--primary, #7C3AED);
            color: #FFFFFF;
            font-size: 11px;
            font-weight: 700;
            flex-shrink: 0;
            margin-top: 2px;
        }

        /* === CTA кнопка === */
        .qx-start__button-wrapper {
            display: flex; align-items: center; gap: 16px;
            margin: 12px 0 24px;
            flex-wrap: wrap;
        }
        .qx-start__button {
            min-height: 3.5rem;  /* 56px */
            padding: 12px 30px;
            border-radius: 10px; border: 0;
            background: var(--primary, #7C3AED);
            color: #FFFFFF;
            font-size: 18px; font-weight: 500; line-height: 1.15;
            cursor: pointer; flex-shrink: 0;
            box-shadow: 0 1px 4px 0 rgba(0,0,0,0.2);
            transition: all 150ms ease;
            font-family: inherit;
        }
        .qx-start__button:hover {
            filter: brightness(0.92);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px 0 rgba(0,0,0,0.35);
        }
        .qx-start__button:active {
            filter: brightness(0.85);
            transform: translateY(0);
        }

        /* === Conversion trigger (акция) — inline-flex с буллетом === */
        /* Волна 8 v13: был block+absolute::before → в centered/wide-column
           точка отъезжала далеко от текста. Теперь inline-flex — bullet
           всегда рядом с текстом. */
        .qx-start__conversion-trigger {
            display: inline-flex;
            align-items: baseline;
            gap: 8px;
            font-size: 16px; font-weight: 500; line-height: 1.5;
            color: var(--text, #FFFFFF); opacity: 0.8;
            margin: 0 0 16px;
            max-width: calc(100vw - 48px);
        }
        .qx-start__conversion-trigger::before {
            content: "•";
            color: var(--primary, #7C3AED); font-size: 24px; line-height: 0.5;
            flex-shrink: 0;
        }

        /* Волна 9A · P1.2: countdown таймер — «До конца акции: 14:59:58» */
        .qx-start__timer {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            margin: 0 0 16px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            font-size: 15px; font-weight: 500;
            color: var(--text, #FFFFFF);
            max-width: 100%;
        }
        .qx-start__timer svg { flex-shrink: 0; color: var(--primary, #7C3AED); }
        .qx-start__timer-label { opacity: 0.85; }
        .qx-start__timer-value {
            font-family: 'SF Mono', Menlo, Consolas, monospace;
            font-variant-numeric: tabular-nums;
            font-weight: 700;
            color: var(--primary, #7C3AED);
            letter-spacing: 0.5px;
        }
        .qx-start__timer--expired .qx-start__timer-value {
            color: #EF4444;
        }

        /* === Bonuses (карточки под CTA) === */
        .qx-start__bonuses { margin-top: 20px; }
        .qx-start__bonuses-title {
            font-size: 16px; font-weight: 700; line-height: 1.3;
            color: var(--text, #FFFFFF);
            margin: 0 0 12px;
        }
        .qx-start__bonuses-list {
            display: flex; flex-direction: column; gap: 8px;
        }
        .qx-bonus {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 14px;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            color: var(--text, #FFFFFF);
            text-decoration: none;
            transition: background 150ms;
        }
        .qx-bonus:hover { background: rgba(255,255,255,0.1); }
        .qx-bonus__emoji {
            width: 32px; height: 32px; font-size: 26px;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .qx-bonus__emoji img { width: 100%; height: 100%; object-fit: contain; }
        /* Волна 9C.3: inline SVG из bonus SVG-picker'а подхватывает цвет
           через currentColor. Строкам задаём нужный цвет через color. */
        .qx-bonus__emoji svg {
            width: 26px; height: 26px;
            color: var(--primary, #7C3AED);
        }
        .qx-bonus__text {
            font-size: 13px; font-weight: 600; line-height: 1.3;
            flex-grow: 1;
        }
        .qx-bonus__lock {
            width: 14px; height: 14px; opacity: 0.5; flex-shrink: 0;
        }

        /* === Footer === */
        .qx-start__footer {
            display: flex; justify-content: space-between; align-items: center;
            gap: 12px;
            padding: 16px 16px;
            padding-bottom: max(16px, env(safe-area-inset-bottom));
            min-height: 40px;
            margin-top: auto;
            flex-wrap: wrap;
        }
        .qx-start__phone {
            font-size: 16px; font-weight: 500; line-height: 1.5;
            color: var(--text, #FFFFFF); text-decoration: none;
        }
        .qx-start__legal {
            font-size: 10px; font-weight: 500; line-height: 1.4;
            color: var(--text, #FFFFFF); opacity: 0.7;
        }
        .qx-start__watermark {
            font-size: 11px; font-weight: 500; line-height: 1.4;
            color: var(--text, #FFFFFF); opacity: 0.5;
            text-decoration: none;
            margin-left: auto;
        }
        .qx-start__watermark:hover { opacity: 0.9; }

        /* === Волна 9A · P4.5: Hero-overlay на media — декоративный заголовок + benefits === */
        .qx-start__hero-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 16px;
            padding: 40px 40px;
            z-index: 2;
            pointer-events: none;
            /* Градиент от полупрозрачного верха к тёмному низу — чтобы текст всегда читался */
            background: linear-gradient(180deg,
                rgba(0, 0, 0, 0.25) 0%,
                rgba(0, 0, 0, 0.45) 60%,
                rgba(0, 0, 0, 0.65) 100%);
        }

        /* Волна 10 · Фаза 8 · round 7 (P2-2): hero-fallback когда медиа не загружено.
           Клиент включил `show_hero_overlay=ON`, заполнил тексты, но забыл upload →
           показываем hero-контент как декоративный баннер с gradient от primary-цвета. */
        .qx-start__bg--hero-fallback {
            background: linear-gradient(135deg,
                color-mix(in srgb, var(--primary, #3D1D8E) 85%, #000) 0%,
                color-mix(in srgb, var(--primary, #3D1D8E) 45%, var(--background, #282848)) 100%);
            position: relative;
            overflow: hidden;
        }
        /* Декоративный паттерн — диагональные линии чтобы не было плоского градиента */
        .qx-start__bg--hero-fallback::before {
            content: '';
            position: absolute;
            inset: 0;
            background-image:
                repeating-linear-gradient(45deg,
                    rgba(255,255,255,0.03) 0 2px,
                    transparent 2px 20px);
            pointer-events: none;
        }
        .qx-start__hero-overlay--fallback {
            position: absolute;
            inset: 0;
            background: transparent;  /* чтобы не дублировать с gradient от bg */
        }
        .qx-start__hero-title {
            font-size: clamp(28px, 4.5vw, 56px);
            font-weight: 300;
            line-height: 1.08;
            letter-spacing: -0.02em;
            color: #FFFFFF;
            margin: 0;
            font-family: 'Playfair Display', 'Times New Roman', Georgia, serif;
            text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
            text-transform: uppercase;
        }
        .qx-start__hero-tagline {
            font-size: clamp(14px, 1.2vw, 18px);
            font-weight: 500;
            line-height: 1.4;
            color: rgba(255, 255, 255, 0.92);
            max-width: 540px;
        }
        .qx-start__hero-benefits {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 8px;
            pointer-events: auto;
        }
        .qx-start__hero-pill {
            display: inline-flex;
            align-items: center;
            padding: 10px 18px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.35);
            border-radius: 999px;
            font-size: 13px;
            font-weight: 500;
            color: #FFFFFF;
            line-height: 1.3;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            white-space: nowrap;
            transition: background 0.2s;
        }
        .qx-start__hero-pill:hover {
            background: rgba(255, 255, 255, 0.16);
        }
        @media (max-width: 818px) {
            .qx-start__hero-overlay {
                padding: 24px 20px;
                gap: 12px;
            }
            .qx-start__hero-pill { padding: 8px 14px; font-size: 12px; }
        }

        /* === Disclaimer поверх медиа === */
        /* Дисклеймер поверх медиа — компактный квадратик в левом нижнем углу (НЕ на всю ширину) */
        .qx-start__disclaimer {
            position: absolute;
            bottom: 16px; left: 16px;
            right: auto;
            max-width: 280px;
            width: fit-content;
            background: rgba(0, 0, 0, 0.55);
            color: rgba(255, 255, 255, 0.85);
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 11px; line-height: 1.4;
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            pointer-events: none;
            z-index: 3;
            text-align: left;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        /* Волна 9A · фикс композиции: дисклеймер — ЕДИНЫЙ компактный полупрозрачный
           квадратик ВЕЗДЕ (desktop + mobile). Был разнобой position:absolute/static
           и растягивание на всю ширину — клиент попросил «аккуратный квадратик». */
        .qx-start__disclaimer.qx-start__disclaimer--inline {
            position: static;
            max-width: 280px;
            width: fit-content;
            margin: 24px auto 8px;
            padding: 10px 16px;
            font-size: 11px;
            line-height: 1.4;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.55);
            border-radius: 8px;
            text-align: center;
            pointer-events: auto;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }

        /* === Desktop: two-column ≥819px === */
        @media (min-width: 819px) {
            .qx-start { flex-direction: row; }
            /* Media-колонка — полностью full-bleed, без padding, фото впритык к content */
            .qx-start__bg {
                width: 58.333%;
                height: 100vh;
                padding: 0;
                flex-shrink: 0;
            }
            .qx-start__content {
                width: 41.667%;
                height: 100vh;
                padding: 32px 40px;
                display: flex; flex-direction: column;
                /* Волна 8: flex-start + margin-top:auto у footer → body
                   компактно сверху, footer прижат к низу, no "плавание" */
                justify-content: flex-start;
                overflow-y: auto;
            }
            /* Brand у Marquiz — слева от заголовка внутри content */
            .qx-start__brand { margin-bottom: 20px; }

            /* Position: left — медиа справа, контент слева */
            .qx-start--position-left .qx-start__bg { order: 2; }
            .qx-start--position-left .qx-start__content { order: 1; }

            /* Theme: centered — медиа сверху блоком (не на весь экран),
               контент центрирован под фото. Marquiz-стиль «По центру». */
            .qx-start--theme-centered {
                flex-direction: column;
                align-items: center;
                padding: 24px 24px 0;
                overflow-y: auto;
                height: auto;
                min-height: 100vh;
            }
            /* Волна 8 v13: padding-bottom trick для 16:9 aspect —
               надёжнее aspect-ratio в flex-контексте. Img внутри — absolute. */
            .qx-start--theme-centered .qx-start__bg {
                width: 100%;
                max-width: 720px;
                height: 0;
                padding-bottom: min(56.25%, 405px);
                border-radius: 12px;
                overflow: hidden;
                flex-shrink: 0;
                position: relative;
            }
            .qx-start--theme-centered .qx-start__bg img,
            .qx-start--theme-centered .qx-start__bg video {
                position: absolute; inset: 0;
                width: 100%; height: 100%;
                object-fit: cover;
            }
            .qx-start--theme-centered .qx-start__content {
                width: 100%;
                max-width: 720px;
                height: auto;
                padding: 24px 16px 32px;
                align-items: center;
                text-align: center;
            }
            .qx-start--theme-centered .qx-start__brand,
            .qx-start--theme-centered .qx-start__button-wrapper,
            .qx-start--theme-centered .qx-start__footer {
                justify-content: center;
            }
            .qx-start--theme-centered .qx-start__badge,
            .qx-start--theme-centered .qx-start__conversion-trigger { align-self: center; }
            .qx-start--theme-centered .qx-start__features {
                align-self: center;
                max-width: 480px;
            }
            .qx-start--theme-centered .qx-start__bonuses {
                align-self: center;
                max-width: 520px;
                text-align: left;
            }

            /* Theme: background — медиа на весь фон, контент поверх с blur.
               Волна 11 · 2026-05-19 · фикс «серость под фоткой»: при длинном
               контенте (много преимуществ/бонусов) .qx-start выше 100vh, а
               explicit height:100vh держал фон только на первый экран → под
               ним проступал .qx-start bg (серый #4a4a4a и т.п.). Убираем
               фикс-высоту: inset:0 на position:relative-родителе растягивает
               фон на ВСЮ высоту контента. */
            .qx-start--theme-background .qx-start__bg {
                position: absolute; inset: 0;
                width: 100%; height: auto;
            }
            .qx-start--theme-background .qx-start__content {
                position: relative; z-index: 2;
                width: 100%; max-width: 720px;
                margin: 0 auto;
                background: rgba(0,0,0,0.55);
                backdrop-filter: blur(6px);
                align-items: center; text-align: center;
                padding: 48px 32px;
                height: auto;
                min-height: 100vh;
            }
            .qx-start--theme-background .qx-start__brand {
                justify-content: center;
            }
            .qx-start--theme-background .qx-start__badge { align-self: center; }
        }

        /* === Desktop ≥819px — увеличенные шрифты для Marquiz-паритета === */
        @media (min-width: 819px) {
            .qx-start__header { font-size: 32px; line-height: 1.15; }
            .qx-start__subheader { font-size: 17px; line-height: 1.5; }
            .qx-start__button { font-size: 19px; min-height: 60px; padding: 14px 34px; }
        }
        /* === Desktop wide ≥1119px — ещё крупнее === */
        @media (min-width: 1119px) {
            .qx-start__header { font-size: 38px; line-height: 1.15; }
            .qx-start__subheader { font-size: 18px; line-height: 1.5; }
        }

        /* === Mobile fine-tuning === */
        @media (max-width: 465px) {
            .qx-start__brand { padding: 12px 20px; min-height: 60px; }
            .qx-start__content { padding: 20px; }
            .qx-start__button { width: 100%; }
            .qx-start__footer { padding: 12px 20px; }
        }
    