        #quiz-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #f5f5f5;
            z-index: 1000;
            justify-content: center;
            align-items: center;
            overflow-y: auto;
            overflow-x: hidden;
        }

        #quiz-content {
            width: 100%;
            max-width: 550px;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 20px 15px;
        }

        .quiz-header {
            margin-bottom: 25px;
        }

        .quiz-step-label {
            text-align: center;
            font-size: 14px;
            color: #666;
            margin-bottom: 10px;
        }

        .quiz-progress {
            width: 100%;
            height: 6px;
            background: #e0e0e0;
            border-radius: 3px;
            margin-bottom: 12px;
            overflow: hidden;
        }

        .quiz-progress-bar {
            height: 100%;
            background: #2E50E6;
            border-radius: 3px;
            transition: width 0.4s;
        }

        .quiz-segments {
            display: flex;
            gap: 6px;
        }

        .seg {
            flex: 1;
            height: 5px;
            border-radius: 3px;
        }

        .seg-filled { background: #2E50E6; }
        .seg-empty { background: #ccc; }

        .quiz-body {
            background: #fff;
            border-radius: 16px;
            padding: 24px 22px;               /* макет oOOtK Body padding 28 (мобайл-адапт под ширину) */
            border: 1px solid #E4E8F0;
        }

        .quiz-label {
            font-size: 12px;                  /* макет: 12/700 #2E50E6 ls 1.2 Alegreya */
            font-weight: 700;
            color: #2E50E6;
            letter-spacing: 1.2px;
            font-family: 'Alegreya', Georgia, serif;
            margin-bottom: 8px;
        }

        .quiz-question {
            font-size: 24px;                  /* макет: 24/800 Alegreya ls -0.3 lh 1.25 */
            font-weight: 800;
            font-family: 'Alegreya', Georgia, serif;
            letter-spacing: -0.3px;
            margin-bottom: 22px;
            line-height: 1.25;
        }

        .quiz-option {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 18px;               /* макет: opt padding 16/18, radius 10, border 1.5 */
            border: 1.5px solid #E4E8F0;
            border-radius: 10px;
            margin-bottom: 12px;
            cursor: pointer;
            color: #0F1B2D;
            font-size: 15px;                  /* макет: опция 15px (НЕ 16) — иначе перенос */
            /* фон/рамку выделения НЕ анимируем — иначе при быстром автопереходе (400мс)
               подсветка выбранной опции не успевает проявиться, кнопка кажется «мёртвой» */
            transition: none;
        }

        .quiz-option:hover {
            border-color: #2E50E6;
            background: #f2f6fb;
        }

        .quiz-option.selected {
            border-color: #2E50E6;
            background: #EEF1FE;              /* макет: выбранная опция brand-50 */
            font-weight: 600;                 /* макет: выбранная 600, остальные 400 */
        }

        .quiz-radio {
            width: 22px;
            height: 22px;
            min-width: 22px;
            border: 1.5px solid #E4E8F0;     /* макет: радио 22, border 1.5 #E4E8F0 */
            border-radius: 50%;
            position: relative;
            transition: none;   /* выделение радио — мгновенно (как у .quiz-option) */
        }

        .quiz-option.selected .quiz-radio {
            border-color: #2E50E6;
        }

        .quiz-option.selected .quiz-radio::after {
            content: '';
            position: absolute;
            top: 4px;
            left: 4px;
            width: 10px;
            height: 10px;
            background: #2E50E6;
            border-radius: 50%;
        }

        .quiz-checkbox {
            width: 22px;
            height: 22px;
            min-width: 22px;
            border: 2px solid #ccc;
            border-radius: 4px;
            position: relative;
            transition: none;   /* выделение чекбокса — мгновенно */
        }

        .quiz-option.selected .quiz-checkbox {
            border-color: #2E50E6;
            background: #2E50E6;
        }

        .quiz-option.selected .quiz-checkbox::after {
            content: '\2713';
            position: absolute;
            top: -1px;
            left: 3px;
            color: #fff;
            font-size: 14px;
            font-weight: 700;
        }

        .quiz-subtitle {
            font-size: 14px;
            color: #666;
            margin-top: -18px;
            margin-bottom: 15px;
        }

        .quiz-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 16px 28px;               /* макет Next: padding 16/28, radius 12, синий #2E50E6 */
            margin-top: 20px;
            background: #2E50E6;
            color: #fff;
            border: none;
            border-radius: 12px;
            font-family: 'Alegreya', Georgia, serif;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0;
            cursor: pointer;
            transition: background 0.3s;
        }

        .quiz-btn:hover { background: #2440C4; }

        .quiz-btn-disabled {
            background: #ccc;
            cursor: not-allowed;
            opacity: 0.75;
        }

        .quiz-btn-disabled:hover { background: #ccc; }

        .quiz-btn:focus-visible {
            outline: 3px solid #fdb913;
            outline-offset: 2px;
        }

        .quiz-warning {
            text-align: center;
            color: #9FB0C7;                   /* макет: warn серый #9FB0C7 13px, точка янтарная */
            font-size: 13px;
            margin-top: 14px;
        }

        /* Files step */
        .quiz-files-hook {
            font-size: 16px;
            color: #d52b1e;
            margin-bottom: 20px;
        }

        .quiz-link {
            color: #2E50E6;
            font-weight: 700;
            text-decoration: underline;
        }

        .quiz-lead-list {
            display: none;
            grid-template-columns: 230px 230px;
            gap: 20px 24px;
            margin-bottom: 10px;
        }

        .quiz-lead-item {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .quiz-lead-item img {
            width: 80px;
            height: auto;
            flex-shrink: 0;
        }

        .quiz-lead-item span {
            font-size: 15px;
            line-height: 1.4;
        }

        .quiz-lead-mobile {
            display: block;
            margin-bottom: 10px;
        }

        .quiz-lead-mobile-imgs {
            display: flex;
            justify-content: center;
            margin-bottom: 16px;
        }

        .quiz-lead-mobile-imgs img {
            width: 70px;
            height: auto;
            margin-left: -8px;
        }

        .quiz-lead-mobile-imgs img:first-child {
            margin-left: 0;
        }

        .quiz-lead-mobile-texts {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .quiz-lead-mobile-text {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 14px;
            line-height: 1.4;
        }

        .quiz-single-layout {
            display: flex;
            flex-direction: column-reverse;
            gap: 20px;
            align-items: center;
            margin-bottom: 10px;
        }

        .quiz-numbered-list {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .quiz-numbered-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            font-size: 15px;
            line-height: 1.4;
        }

        .quiz-number {
            font-size: 28px;
            font-weight: 900;
            color: #d52b1e;
            line-height: 1;
            min-width: 24px;
        }

        .quiz-single-img {
            flex-shrink: 0;
            width: 120px;
        }

        .quiz-single-img img {
            width: 100%;
            height: auto;
        }

        /* Phone step */
        .quiz-phone-step {
            border-radius: 16px;
            padding: 35px 25px;
        }

        .quiz-question-green {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 12px;
            color: #2E50E6;
        }

        .quiz-phone-desc {
            font-size: 16px;
            line-height: 1.5;
            margin-bottom: 25px;
            color: #444;
        }

        .quiz-input-label {
            display: block;
            font-size: 12px;
            letter-spacing: 1px;
            margin-bottom: 8px;
            color: #666;
        }

        .quiz-input {
            display: block;
            width: 100%;
            padding: 16px;
            font-size: 20px;
            font-family: 'Fira Sans Condensed', Arial, sans-serif;
            border: 2px solid #ddd;
            border-radius: 8px;
            background: #fff;
            color: #1a1a1a;
            margin-bottom: 16px;
            outline: none;
        }

        .quiz-input:focus {
            border-color: #2E50E6;
        }

        .quiz-checkbox-label {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 13px;
            margin-bottom: 20px;
            cursor: pointer;
            line-height: 1.4;
            color: #666;
        }

        .quiz-checkbox-label input {
            margin-top: 2px;
            min-width: 18px;
            min-height: 18px;
        }

        .quiz-checkbox-label a {
            color: #2E50E6;
        }

        .quiz-messengers {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .quiz-messenger {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 14px 10px;
            border: 2px solid #ddd;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 700;
            color: #1a1a1a;
            background: #fff;
            transition: all 0.2s;
        }

        .quiz-messenger:hover {
            border-color: #2E50E6;
        }

        .quiz-messenger.selected {
            border-color: #2E50E6;
            background: #f2f6fb;
        }

        .quiz-messenger-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            object-fit: cover;
        }

        .quiz-messenger-sms-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: #2E50E6;
            color: #fff;
            font-size: 12px;
            font-weight: 900;
        }

        .quiz-messenger.selected .quiz-radio::after {
            content: '';
            position: absolute;
            top: 4px;
            left: 4px;
            width: 10px;
            height: 10px;
            background: #2E50E6;
            border-radius: 50%;
        }

        /* Quiz slide animation */
        @keyframes slideOutLeft {
            from { transform: translateX(0); opacity: 1; }
            to { transform: translateX(-80px); opacity: 0; }
        }

        @keyframes slideInRight {
            from { transform: translateX(80px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        .quiz-slide-out-left {
            animation: slideOutLeft 0.22s ease-in forwards;
        }

        .quiz-slide-in-right {
            animation: slideInRight 0.22s ease-out forwards;
        }

        /* Respect reduced-motion preference */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
            .btn::after { display: none; }
            .btn:hover { transform: none; }
        }

        /* Шаг ≥768: квиз в desktop-формате — крупнее, lead-list в 2 колонки */
        @media (min-width: 768px) {
            #quiz-content {
                padding: 30px 20px;
            }

            .quiz-question {
                font-size: 24px;
            }

            .quiz-option {
                padding: 16px 18px;
                font-size: 15px;              /* макет: опция 15px на всех ширинах (не 16) */
            }

            .quiz-lead-list {
                display: grid;
            }

            .quiz-lead-mobile {
                display: none;
            }

            .quiz-single-layout {
                flex-direction: row;
                gap: 24px;
            }

            .quiz-single-img {
                width: 160px;
            }

            .quiz-question-green {
                font-size: 26px;
            }
        }

        /* ===== Site header — 3 ступени: <768 / ≥768 / ≥1280 ===== */
        /* База (<768): logo + ratings, без title, компактный размер */

/* Инлайн-хост квиза */
#inline-quiz-content { width: 100%; max-width: 550px; margin: 0 auto; text-align: left; }
