/* ========================================================
   МОДУЛЬ КВИЗА SHARFF.RU (ГК ПРИНТ-ПРОМ)
   ФИКС ДВОЙНЫХ РАДИОКНОПОК (НАДЕЖНОЕ СКРЫТИЕ НА ВЕРХНЕМ УРОВНЕ)
   УВЕЛИЧЕННЫЕ СТИЛИЗОВАННЫЕ КРУГИ 24PX
======================================================== */

:root {
    --quiz-purple: #4a3c5a;
    --quiz-magenta: #df1b53;
    --quiz-accent: #955A94;
    --quiz-gold: #f6d142;
    --quiz-bg: #fdfafb;
    --quiz-border: #ebdbe9;
}

/* 1. ПЛАВАЮЩИЙ ВИДЖЕТ В ЛЕВОМ НИЖНЕМ УГЛУ С ЦИКЛИЧЕСКИМ БЛЕСКОМ */
.quiz-floating-widget {
    position: fixed !important;
    left: 30px !important;
    bottom: 30px !important;
    right: auto !important;
    top: auto !important;
    z-index: 2147483640 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 10px 22px 10px 10px !important;
    border-radius: 30px !important;
    background: linear-gradient(135deg, #df1b53 0%, #936098 100%) !important;
    box-shadow: 0 4px 12px rgba(223, 27, 83, 0.25), 
                inset 0 2px 0 rgba(255, 255, 255, 0.2), 
                inset 0 -2px 0 rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    cursor: pointer !important;
    user-select: none !important;
    font-family: 'Inter', -apple-system, sans-serif !important;
    color: #ffffff !important;
    overflow: hidden !important;
    text-decoration: none !important;
}

.quiz-floating-widget::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 60% !important;
    height: 100% !important;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%) !important;
    transform: skewX(-25deg) !important;
    pointer-events: none !important;
    animation: quizBtnShineAuto 3s ease-in-out infinite !important;
}

.quiz-floating-widget:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 0 8px 20px rgba(147, 96, 152, 0.4), 
                inset 0 2px 0 rgba(255, 255, 255, 0.3), 
                inset 0 -2px 0 rgba(0, 0, 0, 0.15) !important;
    color: #ffffff !important;
}

.quiz-floating-widget:hover::after {
    animation: quizBtnShineHover 0.7s ease-out !important;
}

.quiz-floating-widget:active {
    transform: translateY(1px) scale(0.98) !important;
    box-shadow: 0 2px 5px rgba(223, 27, 83, 0.3), 
                inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

@keyframes quizBtnShineAuto {
    0% { left: -100%; }
    30% { left: 200%; }
    100% { left: 200%; }
}

@keyframes quizBtnShineHover {
    100% { left: 200%; }
}

.quiz-widget-icon-box {
    width: 32px;
    height: 32px;
    background: #ffffff;
    color: #936098;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.quiz-floating-widget:hover .quiz-widget-icon-box {
    color: #df1b53;
    transform: scale(1.05);
}

.quiz-widget-text {
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.6px;
    color: #ffffff;
}

/* 2. ПОЛНОЭКРАННЫЙ ОВЕРЛЕЙ */
.quiz-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(30, 20, 35, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px 20px !important;
    box-sizing: border-box !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    overflow: visible !important;
}

.quiz-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* КОРПУС ОКНА */
.quiz-window-box {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 980px;
    max-height: 94vh;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    border: 1px solid var(--quiz-border);
    font-family: 'Inter', sans-serif;
    color: #333333;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transform: scale(0.96);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible !important;
}

.quiz-overlay.active .quiz-window-box {
    transform: scale(1);
}

/* КНОПКА ЗАКРЫТИЯ ВЫНЕСЕНА ВНЕ ФРЕЙМА */
.quiz-floating-close-btn {
    position: absolute !important;
    top: -18px !important;
    right: -18px !important;
    width: 40px !important;
    height: 40px !important;
    background: #4a3c5a !important;
    border: 2.5px solid #ffffff !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 2147483648 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.quiz-floating-close-btn:hover {
    background: var(--quiz-magenta) !important;
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 6px 20px rgba(223, 27, 83, 0.5) !important;
}

.quiz-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    overflow: hidden;
    border-radius: 18px;
}

.quiz-slide {
    display: none;
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.quiz-slide.active {
    display: flex;
    flex-direction: column;
    animation: quizFadeIn 0.3s ease forwards;
}

@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ШАГ 0: WELCOME */
.quiz-welcome-layout {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: flex;
}

.quiz-welcome-bg {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    background-size: cover;
    background-position: center right;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.quiz-welcome-watermark {
    content: '';
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%) scale(1);
    width: 420px;
    height: 420px;
    background-color: rgba(149, 90, 148, 0.7);
    -webkit-mask: url('/assets/img/logo_watermark.svg') no-repeat center / contain;
    mask: url('/assets/img/logo_watermark.svg') no-repeat center / contain;
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0.95;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-welcome-bg:hover .quiz-welcome-watermark,
.quiz-welcome-watermark:hover {
    background-color: #df1b53 !important;
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.18) rotate(-5deg) !important;
    filter: drop-shadow(0 15px 35px rgba(223, 27, 83, 0.75)) brightness(1.25) !important;
}

.quiz-welcome-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.88) 46%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 2;
    pointer-events: none;
}

.quiz-welcome-content {
    position: relative;
    z-index: 3;
    padding: 40px 50px;
    max-width: 530px;
}

.quiz-ribbon-badge {
    display: inline-block;
    background: linear-gradient(110deg, #d4af37 0%, #ffeb99 25%, #f2c75c 50%, #d4af37 75%, #aa7c11 100%);
    color: #4a3100;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.35);
    letter-spacing: 0.5px;
}

.quiz-ribbon-badge.mb-15 {
    margin-bottom: 12px;
}

.quiz-welcome-title {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--quiz-purple);
    margin: 0 0 14px 0;
    line-height: 1.18;
}

.quiz-welcome-desc {
    font-size: 14.5px;
    color: #555555;
    line-height: 1.55;
    margin: 0 0 28px 0;
}

.quiz-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 32px;
    border-radius: 30px;
    background: linear-gradient(135deg, #df1b53 0%, #936098 100%);
    box-shadow: 0 4px 12px rgba(223, 27, 83, 0.25), 
                inset 0 2px 0 rgba(255, 255, 255, 0.2), 
                inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.quiz-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
}

.quiz-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(147, 96, 152, 0.4), 
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.quiz-btn-primary:hover::after {
    animation: quizBtnShineHover 0.7s ease-out;
}

/* ========================================================
   ВЫРАВНИВАНИЕ ВЫСОТЫ КОЛОНОК (ALIGN-ITEMS: STRETCH)
======================================================== */
.quiz-inner-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 20px;
    padding: 24px 30px 14px 30px;
    flex: 1;
    overflow: hidden;
    align-items: stretch !important;
}

.quiz-body-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.quiz-sidebar-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    height: 100%;
}

/* ЗАГОЛОВОК */
.quiz-step-heading {
    font-family: 'Playfair Display', serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--quiz-purple);
    margin: 0 0 14px 0;
    line-height: 1.3;
}

.quiz-heading-sub {
    display: inline-block;
    margin-top: 3px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #666666;
}

/* ЗОЛОТИСТЫЙ БЕЙДЖ СКИДКИ */
.quiz-discount-badge {
    background: linear-gradient(110deg, #d4af37 0%, #ffeb99 25%, #f2c75c 50%, #d4af37 75%, #aa7c11 100%);
    color: #4a3100;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 15px;
    border-radius: 20px;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.35);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* ИНФО-КАРТОЧКА С АНИМИРОВАННЫМИ ИКОНКАМИ 130PX */
.quiz-side-hint-card {
    background: #ffffff;
    border: 1px solid var(--quiz-border);
    border-radius: 12px;
    padding: 16px 14px 18px 14px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(147, 96, 152, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 0;
}

.quiz-side-hint-card:hover {
    border-color: #936098;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(147, 96, 152, 0.15);
}

.quiz-anim-icon-wrap {
    width: 130px;
    height: 130px;
    position: relative;
    margin: auto 0;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.quiz-side-hint-card:hover .quiz-anim-icon-wrap {
    transform: scale(1.08) translateY(-2px);
}

.bulb-icon-svg,
.gift-icon-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ТОНКАЯ НИТЬ ВЫВЯЗЫВАНИЯ ИКОНОК */
.thread-path {
    stroke: #955A94;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: filter 0.3s ease, stroke 0.3s ease;
}

.quiz-anim-icon-wrap .thread-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawThreadContinuous 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.quiz-inline-anim-icon .thread-path {
    stroke-dasharray: 2500;
    stroke-dashoffset: 2500;
    animation: drawWideThreadContinuous 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.quiz-side-hint-card:hover .thread-path,
.quiz-radio-card:hover .thread-path {
    filter: drop-shadow(0 0 8px rgba(149, 90, 148, 0.6));
    stroke: #df1b53;
}

.quiz-anim-icon-wrap .light-effect {
    transform-origin: 55px 35px;
    animation: lightUp 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transition: all 0.3s ease;
}

.quiz-anim-icon-wrap .light-ray {
    stroke: #bca0ba;
    stroke-width: 2;
    stroke-linecap: round;
    transition: stroke 0.3s ease;
}

.quiz-anim-icon-wrap .bulb-inner-glow {
    fill: #bca0ba;
    opacity: 0.18;
    transition: fill 0.3s ease;
}

.quiz-side-hint-card:hover .light-ray { stroke: #df1b53; }
.quiz-side-hint-card:hover .bulb-inner-glow { fill: #df1b53; opacity: 0.3; }

.accent-sparkle {
    fill: #bca0ba;
    animation: floatSparkle 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.sparkle-1 { transform-origin: 15px 15px; }
.sparkle-2 { transform-origin: 125px 25px; animation-delay: 1s; }
.sparkle-3 { transform-origin: 275px 20px; animation-delay: 2s; }
.sparkle-4 { transform-origin: 5px 95px; animation-delay: 0.5s; }
.sparkle-5 { transform-origin: 250px 95px; animation-delay: 1.5s; }

.sparkle-top-left { transform-origin: 22px 14px; }
.sparkle-bottom-left { transform-origin: 15px 81px; animation-delay: 1.5s; }
.sparkle-bottom-right { transform-origin: 95px 71px; }

.quiz-side-hint-card:hover .accent-sparkle,
.quiz-radio-card:hover .accent-sparkle {
    fill: #df1b53;
    animation: spinSparkle 1s linear infinite;
}

@keyframes drawThreadContinuous {
    0% { stroke-dashoffset: 800; opacity: 0; }
    5% { opacity: 1; }
    40% { stroke-dashoffset: 0; opacity: 1; }
    60% { stroke-dashoffset: 0; opacity: 1; }
    95% { opacity: 1; }
    100% { stroke-dashoffset: -800; opacity: 0; }
}

@keyframes drawWideThreadContinuous {
    0% { stroke-dashoffset: 2500; opacity: 0; }
    5% { opacity: 1; }
    45% { stroke-dashoffset: 0; opacity: 1; }
    60% { stroke-dashoffset: 0; opacity: 1; }
    95% { opacity: 1; }
    100% { stroke-dashoffset: -2500; opacity: 0; }
}

@keyframes lightUp {
    0%, 36% { opacity: 0; transform: scale(0.8); }
    40%, 58% { opacity: 1; transform: scale(1); }
    62%, 100% { opacity: 0; transform: scale(0.8); }
}

@keyframes floatSparkle {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-3px) scale(1.15); }
}

@keyframes spinSparkle {
    0% { transform: rotate(0deg) scale(1.2); }
    100% { transform: rotate(180deg) scale(1.2); }
}

.quiz-side-hint-card p {
    font-size: 11.5px;
    color: #555555;
    line-height: 1.45;
    margin: 0;
    text-align: center;
    transition: opacity 0.25s ease;
}

/* КАРТОЧКА СПРАВА НА ШАГЕ 2 */
.quiz-side-preview-box {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--quiz-border);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(147, 96, 152, 0.1);
    overflow: hidden;
    animation: quizFadeIn 0.35s ease forwards;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quiz-preview-inner {
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.quiz-preview-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.quiz-preview-tag {
    background: #F4EBF6;
    color: #5A2A75;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.quiz-preview-counter {
    color: #888888;
    font-size: 10px;
    font-weight: 700;
}

.quiz-preview-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fdfafb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #f0eaf2;
}

.quiz-preview-img-wrap .quiz-side-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-preview-img-wrap .quiz-side-slide.active {
    opacity: 1;
}

.quiz-preview-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--quiz-purple);
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.quiz-preview-desc {
    font-size: 10px;
    color: #666666;
    line-height: 1.35;
    margin: 0 0 6px 0;
}

.quiz-preview-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px dashed #ebdbe9;
    padding-top: 6px;
}

.quiz-preview-specs li {
    font-size: 9px;
    color: #555555;
    line-height: 1.35;
    position: relative;
    padding-left: 10px;
    margin-bottom: 2px;
}

.quiz-preview-specs li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--quiz-magenta);
    font-weight: 800;
}

/* ========================================================
   ИСПРАВЛЕНИЕ: ЖЕСТКОЕ СКРЫТИЕ БРАУЗЕРНЫХ РАДИОКНОПОК
   И КРУПНЫЕ СТИЛИЗОВАННЫЕ КРУГИ 24PX БЕЗ ДУБЛИРОВАНИЯ
======================================================== */
.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Радиокнопки на шагах 1 и 3 */
.quiz-radio-card,
.quiz-card-with-anim {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1.5px solid var(--quiz-border);
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    position: relative;
}

.quiz-radio-card:hover,
.quiz-card-with-anim:hover {
    border-color: var(--quiz-accent);
    background: #fdfafb;
    transform: translateX(4px);
}

/* ПРИНУДИТЕЛЬНОЕ И ПОЛНОЕ СКРЫТИЕ БРАУЗЕРНОГО INPUT */
.quiz-radio-card input[type="radio"],
.quiz-card-with-anim input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    display: none !important;
}

/* ЕДИНСТВЕННЫЙ УВЕЛИЧЕННЫЙ И СТИЛИЗОВАННЫЙ КРУГ 24PX */
.quiz-custom-radio {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border: 2px solid #bca0ba !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease !important;
    box-sizing: border-box !important;
}

/* При наведении */
.quiz-radio-card:hover .quiz-custom-radio,
.quiz-card-with-anim:hover .quiz-custom-radio {
    border-color: var(--quiz-magenta) !important;
}

/* Внутренняя яркая точка при выборе */
.quiz-custom-radio::after {
    content: '' !important;
    width: 12px !important;
    height: 12px !important;
    background: var(--quiz-magenta) !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    transform: scale(0) !important;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease !important;
}

/* Активное состояние */
.quiz-radio-card input[type="radio"]:checked ~ .quiz-custom-radio,
.quiz-card-with-anim input[type="radio"]:checked ~ .quiz-custom-radio {
    border-color: var(--quiz-magenta) !important;
    box-shadow: 0 0 0 3px rgba(223, 27, 83, 0.12) !important;
}

.quiz-radio-card input[type="radio"]:checked ~ .quiz-custom-radio::after,
.quiz-card-with-anim input[type="radio"]:checked ~ .quiz-custom-radio::after {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.quiz-radio-label {
    font-size: 14px;
    color: #444444;
    transition: color 0.2s ease;
    font-weight: 500;
}

.quiz-radio-card input[type="radio"]:checked ~ .quiz-radio-label,
.quiz-card-with-anim input[type="radio"]:checked ~ .quiz-radio-label {
    font-weight: 700;
    color: var(--quiz-purple);
}

/* Контейнер длинной иконки на шаге 1, прижатый к правому краю */
.quiz-inline-anim-icon {
    width: 140px;
    height: 48px;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-card-with-anim:hover .quiz-inline-anim-icon {
    transform: scale(1.08) translateY(-1px);
}

.horizontal-gift-icon-svg,
.fan-merch-wide-icon-svg,
.winter-merch-wide-icon-svg,
.custom-order-wide-icon-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ========================================================
   ШАГ 2: СЕТКА 4x2 БЕЗ СКРОЛЛА
======================================================== */
.quiz-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    overflow: hidden;
    padding: 2px;
}

.quiz-product-card {
    border: 1.5px solid var(--quiz-border);
    border-radius: 10px;
    background: #ffffff;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    position: relative;
    user-select: none;
    box-sizing: border-box;
}

.quiz-product-card input {
    display: none;
}

.quiz-product-card:hover {
    border-color: var(--quiz-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 96, 152, 0.12);
}

.quiz-product-card:has(input:checked) {
    border-color: var(--quiz-magenta);
    background: #fff8f9;
    box-shadow: 0 5px 14px rgba(223, 27, 83, 0.16);
    transform: translateY(-2px);
}

.quiz-product-card:has(input:checked) .quiz-prod-title {
    color: var(--quiz-magenta);
    font-weight: 700;
}

.quiz-prod-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fcfafc;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid rgba(147, 96, 152, 0.08);
}

.quiz-gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    pointer-events: none;
}

.quiz-gallery-img.active {
    opacity: 1;
}

/* КАРТОЧКА «КОНСУЛЬТАЦИЯ ЭКСПЕРТА» */
.quiz-logo-showcase-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #ffffff 40%, #f9f2f9 100%);
}

.quiz-styled-logo-wrapper {
    width: 66%;
    height: 66%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: quizLogoFloat 4s ease-in-out infinite;
}

.quiz-styled-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 3px 6px rgba(147, 96, 152, 0.25));
}

@keyframes quizLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.quiz-prod-title {
    font-size: 11px;
    line-height: 1.25;
    color: #444444;
    font-weight: 700;
    transition: color 0.2s ease;
}

/* ШАГ 4: ФИНАЛЬНЫЙ ЭКРАН (С ПОЛЕМ EMAIL) */
.quiz-inner-layout.checkout-step {
    grid-template-columns: 1fr 340px;
    align-items: center;
    padding-top: 30px;
    padding-bottom: 30px;
}

.finish-left {
    padding-right: 20px;
}

.quiz-finish-title {
    font-family: 'Playfair Display', serif;
    font-size: 25px;
    color: var(--quiz-purple);
    margin: 0 0 8px 0;
    line-height: 1.25;
}

.quiz-finish-subtitle {
    font-size: 13px;
    color: #666666;
    margin: 0;
}

.finish-form-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.quiz-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    width: 100%;
}

.quiz-field-group label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--quiz-purple);
    text-transform: uppercase;
}

.quiz-text-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dddddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333333;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', sans-serif;
    background: #fdfafb;
}

.quiz-text-input:focus {
    border-color: var(--quiz-accent);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(147, 96, 152, 0.12);
}

.quiz-btn-submit {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 30px;
    background: linear-gradient(135deg, #df1b53 0%, #936098 100%);
    box-shadow: 0 4px 14px rgba(223, 27, 83, 0.28), 
                inset 0 2px 0 rgba(255, 255, 255, 0.2), 
                inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-top: 4px;
}

.quiz-btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
}

.quiz-btn-submit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 22px rgba(147, 96, 152, 0.42), 
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.quiz-btn-submit:hover::after {
    animation: quizBtnShineHover 0.7s ease-out;
}

.quiz-btn-submit:active {
    transform: translateY(1px) scale(0.98);
}

.quiz-agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 10px;
    color: #777777;
    line-height: 1.35;
    cursor: pointer;
    text-align: left;
}

.quiz-agreement-label input {
    margin-top: 2px;
}

/* ШАГ 5: ЭКРАН УСПЕХА */
.quiz-success-box {
    padding: 45px 30px;
    text-align: center;
    max-width: 580px;
    margin: auto;
}

.quiz-success-icon {
    width: 56px;
    height: 56px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.quiz-success-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 25px;
    color: var(--quiz-purple);
    margin: 0 0 8px 0;
}

/* НАВИГАЦИОННЫЙ ФУТЕР (ШАГИ 1–3) */
.quiz-footer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    border-top: 1px solid #eeeeee;
    background: #fdfafb;
}

.quiz-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

.quiz-progress-text {
    font-size: 11px;
    font-weight: 700;
    color: #555555;
}

.quiz-progress-track {
    width: 100%;
    height: 5px;
    background: var(--quiz-border);
    border-radius: 4px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #df1b53, #936098);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quiz-progress-percent {
    font-size: 10px;
    font-weight: 800;
    color: #936098;
    text-align: right;
}

.quiz-nav-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-btn-prev {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--quiz-border);
    color: #666666;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quiz-btn-prev:hover {
    border-color: #936098;
    color: #936098;
}

.quiz-btn-next {
    background: linear-gradient(135deg, #df1b53 0%, #936098 100%);
    box-shadow: 0 4px 12px rgba(223, 27, 83, 0.25), 
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 800;
    padding: 9px 22px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.6px;
}

.quiz-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(147, 96, 152, 0.35);
}

/* АДАПТИВНОСТЬ */
@media (max-width: 860px) {
    .quiz-overlay {
        padding: 10px !important;
        overflow-y: auto !important;
    }
    .quiz-window-box {
        max-height: none;
        overflow: visible !important;
    }
    .quiz-floating-close-btn {
        top: -12px !important;
        right: -12px !important;
        width: 34px !important;
        height: 34px !important;
        font-size: 14px !important;
    }
    .quiz-welcome-watermark {
        display: none !important;
    }
    .quiz-floating-widget {
        left: 15px !important;
        bottom: 20px !important;
        padding: 8px 16px 8px 8px !important;
    }
    .quiz-widget-text {
        font-size: 11px;
    }
    .quiz-inner-layout {
        grid-template-columns: 1fr;
        padding: 16px 14px;
        gap: 12px;
        align-items: start !important;
    }
    .quiz-sidebar-col {
        align-items: stretch;
        height: auto;
    }
    .quiz-side-preview-box,
    .quiz-side-hint-card {
        display: none !important;
    }
    .quiz-inline-anim-icon {
        display: none !important;
    }
    .quiz-products-grid {
        grid-template-columns: repeat(2, 1fr);
        overflow-y: visible;
    }
    .quiz-welcome-content {
        padding: 30px 18px;
    }
    .quiz-welcome-title {
        font-size: 26px;
    }
    .quiz-footer-nav {
        padding: 10px 14px;
    }
}