:root {
    --bg: #090807;
    --card: #17120e;
    --card-soft: #201811;
    --line: rgba(212, 160, 91, 0.28);
    --line-strong: rgba(212, 160, 91, 0.62);
    --gold: #d4a05b;
    --gold-dark: #9b652d;
    --text: #f5e8cd;
    --muted: #cbb99c;
    --danger: #ff8a80;
    --success: #91d9aa;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 8%,
            rgba(173, 112, 40, 0.18),
            transparent 28%),
        radial-gradient(circle at 88% 20%,
            rgba(212, 160, 91, 0.08),
            transparent 25%),
        var(--bg);
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.page {
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0;
    display: grid;
    place-items: center;
}

.quiz {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.35fr);
    border: 1px solid var(--line);
    border-radius: 30px;
    overflow: hidden;
    background:
        linear-gradient(180deg,
            rgba(25, 19, 15, 0.99),
            rgba(12, 10, 8, 0.99));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
}

.quiz__visual {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #100d0a;
}

.quiz__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.06),
            rgba(0, 0, 0, 0.68));
    pointer-events: none;
}

.quiz__visual img {
    width: 100%;
    height: 100%;
    min-height: 720px;
    display: block;
    object-fit: cover;
    object-position: 68% center;
}

.quiz__visual-content {
    position: absolute;
    z-index: 2;
    left: 28px;
    right: 28px;
    bottom: 28px;
    padding: 24px;
    border: 1px solid rgba(212, 160, 91, 0.3);
    border-radius: 20px;
    background: rgba(15, 12, 9, 0.88);
    backdrop-filter: blur(12px);
}

.quiz__eyebrow {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.quiz__visual-title {
    margin: 16px 0 8px;
    font-size: 27px;
    line-height: 1.15;
}

.quiz__visual-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.quiz__main {
    min-width: 0;
    padding: 42px;
}

.quiz__progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.quiz__step-label {
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quiz__progress-number {
    color: var(--muted);
    font-size: 13px;
}

.quiz__progress {
    height: 7px;
    margin-bottom: 32px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
}

.quiz__progress-bar {
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg,
            var(--gold-dark),
            #e0af68);
    transition: width 0.25s ease;
}

.quiz__title {
    max-width: 720px;
    margin: 0;
    font-size: clamp(31px, 4vw, 48px);
    line-height: 1.07;
    text-wrap: balance;
}

.quiz__subtitle {
    max-width: 690px;
    margin: 15px 0 28px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.quiz__options {
    display: grid;
    gap: 12px;
}

.quiz-option {
    width: 100%;
    min-height: 62px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(26, 20, 15, 0.88);
    color: var(--text);
    text-align: left;
    transition: 0.18s ease;
}

.quiz-option:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.quiz-option.is-selected {
    border-color: var(--gold);
    background: rgba(70, 46, 21, 0.68);
    box-shadow: inset 0 0 0 1px rgba(212, 160, 91, 0.22);
}

.quiz-option__mark {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 2px solid rgba(245, 232, 205, 0.58);
    border-radius: 50%;
    background: transparent;
}

.quiz-option.is-selected .quiz-option__mark {
    border: 6px solid var(--gold);
    background: #fff3d9;
}

.quiz__actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.button {
    min-height: 54px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid transparent;
    font-weight: 800;
}

.button--primary {
    flex: 1;
    color: #211407;
    background:
        linear-gradient(180deg,
            #dfae66,
            #ac722f);
}

.button--primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.button--secondary {
    border-color: var(--line);
    background: rgba(21, 16, 12, 0.88);
    color: var(--text);
}

.lead-form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label,
.field__label {
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    background: rgba(17, 14, 11, 0.95);
    color: var(--text);
    padding: 16px 17px;
    transition: 0.18s ease;
}

.field input {
    min-height: 54px;
}

.field textarea {
    min-height: 105px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 91, 0.1);
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(203, 185, 156, 0.48);
}

.field__hint {
    color: rgba(203, 185, 156, 0.72);
    font-size: 12px;
    line-height: 1.45;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.contact-method {
    position: relative;
}

.contact-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.contact-method span {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(22, 17, 13, 0.92);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.contact-method input:checked+span {
    border-color: #25c96b;
    background:
        linear-gradient(180deg,
            rgba(20, 113, 58, 0.92),
            rgba(7, 59, 31, 0.96));
    box-shadow: inset 0 0 0 1px rgba(72, 244, 138, 0.22);
}

.request-formats {
    display: grid;
    gap: 10px;
}

.request-format {
    position: relative;
}

.request-format input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.request-format span {
    min-height: 58px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(22, 17, 13, 0.92);
    cursor: pointer;
}

.request-format span::before {
    content: "";
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    border: 2px solid rgba(245, 232, 205, 0.7);
    border-radius: 50%;
}

.request-format input:checked+span {
    border-color: var(--gold);
    background: rgba(70, 46, 21, 0.62);
}

.request-format input:checked+span::before {
    border: 5px solid var(--gold);
    background: #fff1d0;
}

.form-status {
    min-height: 22px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.form-status.is-error {
    color: var(--danger);
}

.form-status.is-success {
    color: var(--success);
}

.success {
    padding: 30px 0;
    text-align: center;
}

.success__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(145, 217, 170, 0.45);
    border-radius: 50%;
    background: rgba(31, 105, 59, 0.25);
    color: var(--success);
    font-size: 36px;
}

.success h2 {
    margin: 0 0 12px;
    font-size: 34px;
}

.success p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.bot-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .page {
        width: min(760px, calc(100% - 22px));
        padding: 12px 0;
    }

    .quiz {
        grid-template-columns: 1fr;
    }

    .quiz__visual {
        min-height: 330px;
    }

    .quiz__visual img {
        min-height: 330px;
        height: 330px;
        object-position: 63% 36%;
    }

    .quiz__visual-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
        padding: 18px;
    }

    .quiz__visual-title {
        font-size: 23px;
    }

    .quiz__main {
        padding: 30px 24px 34px;
    }
}

@media (max-width: 560px) {
    .page {
        width: 100%;
        padding: 0;
    }

    .quiz {
        min-height: 100vh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .quiz__visual {
        min-height: 275px;
    }

    .quiz__visual img {
        height: 275px;
        min-height: 275px;
    }

    .quiz__visual-content {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .quiz__visual-text {
        font-size: 14px;
    }

    .quiz__main {
        padding: 26px 18px 32px;
    }

    .quiz__title {
        font-size: 30px;
    }

    .quiz__subtitle {
        font-size: 15px;
    }

    .button {
        width: 100%;
    }

    .contact-methods {
        grid-template-columns: 1fr 1fr;
    }
}

/* WhatsApp */

.contact-method input[value="WhatsApp"]:checked+span {
    color: #ffffff;
    border-color: #25d366;
    background: linear-gradient(180deg,
            #159447,
            #075c2a);
    box-shadow:
        inset 0 0 0 1px rgba(100, 255, 158, 0.22),
        0 7px 18px rgba(37, 211, 102, 0.14);
}

/* Telegram */

.contact-method input[value="Telegram"]:checked+span {
    color: #ffffff;
    border-color: #2aabee;
    background: linear-gradient(180deg,
            #229ed9,
            #126c9d);
    box-shadow:
        inset 0 0 0 1px rgba(180, 230, 255, 0.22),
        0 7px 18px rgba(34, 158, 217, 0.14);
}

/* MAX */

.contact-method input[value="MAX"]:checked+span {
    color: #ffffff;
    border-color: #7367ff;
    background: linear-gradient(135deg,
            #246de8,
            #7152d7);
    box-shadow:
        inset 0 0 0 1px rgba(208, 204, 255, 0.2),
        0 7px 18px rgba(92, 87, 230, 0.15);
}

/* VK */

.contact-method input[value="VK"]:checked+span {
    color: #ffffff;
    border-color: #0077ff;
    background: linear-gradient(180deg,
            #1684ff,
            #075bbb);
    box-shadow:
        inset 0 0 0 1px rgba(179, 218, 255, 0.22),
        0 7px 18px rgba(0, 119, 255, 0.15);
}

/* =========================================================
   Компактный финальный экран
========================================================= */

#leadScreen .quiz__progress-top {
    margin-bottom: 8px;
}

#leadScreen .quiz__progress {
    margin-bottom: 17px;
}

#leadScreen .quiz__title {
    font-size: clamp(30px, 3.2vw, 42px);
}

#leadScreen .quiz__subtitle {
    margin: 8px 0 16px;
    line-height: 1.45;
}

#leadScreen .lead-form {
    gap: 11px;
}

#leadScreen .field {
    gap: 5px;
}

#leadScreen .field input {
    min-height: 46px;
    padding: 11px 14px;
}

#leadScreen .field textarea {
    min-height: 72px;
    max-height: 100px;
    padding: 11px 14px;
}

#leadScreen .contact-method span {
    min-height: 42px;
}

#leadScreen .field__hint {
    margin-top: -1px;
}

#leadScreen .quiz__actions {
    margin-top: 11px;
}

#leadScreen .button {
    min-height: 46px;
}

@media (min-width: 901px) {
    .quiz__main {
        padding-top: 27px;
        padding-bottom: 27px;
    }

    #leadScreen {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    #leadScreen .lead-form {
        gap: 10px;
    }

    #leadScreen .field textarea {
        min-height: 84px;
    }
}

/* =========================================================
   АНИМАЦИИ КВИЗА
========================================================= */

/*
  Плавное появление всего квиза
*/

.quiz {
    animation: quizAppear 0.65s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes quizAppear {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/*
  Живое медленное движение фотографии
*/

.quiz__visual img {
    transform: scale(1.045);
    animation: visualSlowMove 14s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes visualSlowMove {
    0% {
        transform: scale(1.045) translate3d(0, 0, 0);
    }

    50% {
        transform: scale(1.075) translate3d(-1.2%, -0.5%, 0);
    }

    100% {
        transform: scale(1.055) translate3d(0.7%, -1%, 0);
    }
}


/*
  Мягкий золотой свет поверх изображения
*/

.quiz__visual::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: -20%;
    pointer-events: none;

    background:
        radial-gradient(circle at 42% 42%,
            rgba(229, 168, 87, 0.15),
            transparent 34%);

    opacity: 0.55;
    animation: visualGlow 6s ease-in-out infinite alternate;
}

@keyframes visualGlow {
    from {
        opacity: 0.28;
        transform: translate3d(-2%, 1%, 0);
    }

    to {
        opacity: 0.68;
        transform: translate3d(2%, -1%, 0);
    }
}


/*
  Появление карточки Алексея
*/

.quiz__visual-content {
    animation: visualCardAppear 0.85s 0.22s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes visualCardAppear {
    from {
        opacity: 0;
        transform: translateY(24px);
        backdrop-filter: blur(0);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        backdrop-filter: blur(12px);
    }
}


/*
  Пульсация надписи «Индивидуальный подход»
*/

.quiz__eyebrow {
    position: relative;
    overflow: hidden;
}

.quiz__eyebrow::after {
    content: "";
    position: absolute;
    top: -50%;
    bottom: -50%;
    left: -45%;
    width: 30%;

    background: linear-gradient(90deg,
            transparent,
            rgba(255, 231, 185, 0.42),
            transparent);

    transform: rotate(18deg);
    animation: eyebrowShine 5s ease-in-out infinite;
}

@keyframes eyebrowShine {

    0%,
    60% {
        left: -45%;
    }

    82%,
    100% {
        left: 130%;
    }
}


/*
  Контейнер вопроса
*/

#questionScreen {
    position: relative;
}

#questionScreen.is-entering {
    animation: questionEnter 0.42s cubic-bezier(.22, 1, .36, 1) both;
}

#questionScreen.is-leaving {
    animation: questionLeave 0.18s ease both;
    pointer-events: none;
}

@keyframes questionEnter {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes questionLeave {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-16px);
    }
}


/*
  Поочерёдное появление ответов
*/

.quiz-option {
    opacity: 0;
    transform: translateY(13px);
    animation: answerAppear 0.38s cubic-bezier(.22, 1, .36, 1) forwards;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.quiz-option:nth-child(1) {
    animation-delay: 0.04s;
}

.quiz-option:nth-child(2) {
    animation-delay: 0.09s;
}

.quiz-option:nth-child(3) {
    animation-delay: 0.14s;
}

.quiz-option:nth-child(4) {
    animation-delay: 0.19s;
}

.quiz-option:nth-child(5) {
    animation-delay: 0.24s;
}

.quiz-option:nth-child(6) {
    animation-delay: 0.29s;
}

@keyframes answerAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*
  Наведение на вариант
*/

.quiz-option:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);

    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.18),
        inset 0 0 0 1px rgba(212, 160, 91, 0.06);
}


/*
  Выбранный ответ
*/

.quiz-option.is-selected {
    position: relative;
    overflow: hidden;

    opacity: 1;
    transform: translateY(-2px) scale(1.008);

    border-color: var(--gold);
    background: rgba(70, 46, 21, 0.68);

    box-shadow:
        0 11px 28px rgba(126, 77, 29, 0.2),
        inset 0 0 0 1px rgba(235, 184, 111, 0.26);

    animation:
        answerAppear 0.01s linear forwards,
        answerSelected 0.32s cubic-bezier(.22, 1, .36, 1),
        selectedGlow 2.4s ease-in-out infinite alternate;
}

.quiz-option.is-selected::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background: linear-gradient(105deg,
            transparent 20%,
            rgba(255, 225, 174, 0.11) 48%,
            transparent 74%);

    transform: translateX(-110%);
    animation: selectedSweep 0.62s ease forwards;
}

@keyframes answerSelected {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    55% {
        opacity: 1;
        transform: translateY(-2px) scale(1.012);
    }

    100% {
        opacity: 1;
        transform: translateY(-2px) scale(1.008);
    }
}

@keyframes selectedGlow {
    from {
        border-color: rgba(212, 160, 91, 0.7);
    }

    to {
        border-color: rgba(238, 190, 119, 1);
    }
}

@keyframes selectedSweep {
    to {
        transform: translateX(110%);
    }
}


/*
  Кружок выбранного ответа
*/

.quiz-option__mark {
    transition:
        border-width 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.quiz-option.is-selected .quiz-option__mark {
    transform: scale(1.08);

    box-shadow:
        0 0 0 4px rgba(212, 160, 91, 0.12),
        0 0 16px rgba(212, 160, 91, 0.25);
}


/*
  Прогресс
*/

.quiz__progress-bar {
    position: relative;
    overflow: hidden;

    transition:
        width 0.5s cubic-bezier(.22, 1, .36, 1);
}

.quiz__progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(90deg,
            transparent,
            rgba(255, 240, 209, 0.48),
            transparent);

    transform: translateX(-100%);
    animation: progressShine 2.2s ease-in-out infinite;
}

@keyframes progressShine {

    0%,
    35% {
        transform: translateX(-100%);
    }

    75%,
    100% {
        transform: translateX(110%);
    }
}


/*
  Основная кнопка
*/

.button--primary:not(:disabled) {
    position: relative;
    overflow: hidden;

    transition:
        transform 0.18s ease,
        filter 0.18s ease,
        box-shadow 0.18s ease;

    box-shadow:
        0 10px 28px rgba(177, 113, 43, 0.18);
}

.button--primary:not(:disabled)::after {
    content: "";
    position: absolute;
    top: -40%;
    bottom: -40%;
    left: -40%;
    width: 24%;

    background: linear-gradient(90deg,
            transparent,
            rgba(255, 245, 218, 0.52),
            transparent);

    transform: rotate(15deg);
    animation: buttonShine 3.8s ease-in-out infinite;
}

.button--primary:not(:disabled):hover {
    transform: translateY(-2px);
    filter: brightness(1.06);

    box-shadow:
        0 14px 34px rgba(177, 113, 43, 0.27);
}

.button--primary:not(:disabled):active {
    transform: translateY(0) scale(0.992);
}

@keyframes buttonShine {

    0%,
    62% {
        left: -40%;
    }

    82%,
    100% {
        left: 130%;
    }
}


/*
  Финальная форма
*/

#leadScreen.is-entering {
    animation: leadScreenEnter 0.5s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes leadScreenEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#leadScreen .field {
    opacity: 0;
    transform: translateY(10px);
    animation: fieldAppear 0.36s ease forwards;
}

#leadScreen .field:nth-child(1) {
    animation-delay: 0.06s;
}

#leadScreen .field:nth-child(2) {
    animation-delay: 0.12s;
}

#leadScreen .field:nth-child(3) {
    animation-delay: 0.18s;
}

#leadScreen .field:nth-child(4) {
    animation-delay: 0.24s;
}

@keyframes fieldAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*
  Анимация кнопок мессенджеров
*/

.contact-method span {
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.contact-method span:hover {
    transform: translateY(-2px);
}

.contact-method input:checked+span {
    animation: messengerSelected 0.32s cubic-bezier(.22, 1, .36, 1);
}

@keyframes messengerSelected {
    0% {
        transform: scale(0.97);
    }

    55% {
        transform: scale(1.025);
    }

    100% {
        transform: scale(1);
    }
}


/*
  Анимация успешной отправки
*/

.success:not([hidden]) {
    animation: successAppear 0.5s cubic-bezier(.22, 1, .36, 1) both;
}

.success:not([hidden]) .success__icon {
    animation: successIcon 0.6s 0.12s cubic-bezier(.22, 1.4, .36, 1) both;
}

@keyframes successAppear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successIcon {
    from {
        opacity: 0;
        transform: scale(0.45) rotate(-15deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}


/*
  Уважение системной настройки:
  уменьшить движение
*/

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   Фиксированная высота шагов квиза на компьютере
   Не даёт рамке и фотографии прыгать между вопросами
========================================================= */

@media (min-width: 901px) {
    .quiz {
        min-height: 760px;
    }

    .quiz__visual {
        min-height: 760px;
    }

    .quiz__visual img {
        min-height: 760px;
    }

    .quiz__main {
        min-height: 760px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #questionScreen {
        width: 100%;
    }
}

/* =========================================================
   МОБИЛЬНАЯ ВЕРСИЯ КВИЗА
   Компактная фотография и быстрый доступ к вопросам
========================================================= */

@media (max-width: 900px) {

    body {
        min-height: 100%;
    }

    .page {
        width: 100%;
        min-height: 100vh;
        padding: 0;
        display: block;
    }

    .quiz {
        width: 100%;
        min-height: 100vh;
        display: block;
        border: 0;
        border-radius: 0;
        overflow: visible;
        box-shadow: none;
    }

    /*
      Короткая фотография вместо большой левой колонки
    */

    .quiz__visual {
        width: 100%;
        height: 165px;
        min-height: 165px;
        position: relative;
        border-bottom: 1px solid var(--line);
    }

    .quiz__visual img {
        width: 100%;
        height: 165px;
        min-height: 165px;
        object-fit: cover;
        object-position: 50% 29%;
    }

    /*
      Затемнение снизу, чтобы имя хорошо читалось
    */

    .quiz__visual::after {
        background:
            linear-gradient(180deg,
                rgba(0, 0, 0, 0.03) 20%,
                rgba(0, 0, 0, 0.78) 100%);
    }

    /*
      Убираем огромную карточку.
      Оставляем только компактное имя поверх фотографии.
    */

    .quiz__visual-content {
        left: 14px;
        right: 14px;
        bottom: 10px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
    }

    .quiz__eyebrow,
    .quiz__visual-text {
        display: none;
    }

    .quiz__visual-title {
        margin: 0;
        font-size: 18px;
        line-height: 1.2;
        text-shadow:
            0 2px 8px rgba(0, 0, 0, 0.9);
    }

    /*
      Правая часть становится основной частью экрана
    */

    .quiz__main {
        width: 100%;
        min-height: 0;
        padding: 18px 15px 28px;
        display: block;
    }

    .quiz__progress-top {
        margin-bottom: 10px;
    }

    .quiz__progress {
        height: 5px;
        margin-bottom: 20px;
    }

    .quiz__step-label,
    .quiz__progress-number {
        font-size: 11px;
    }

    .quiz__title {
        margin: 0;
        font-size: clamp(27px, 8vw, 34px);
        line-height: 1.08;
    }

    .quiz__subtitle {
        margin: 10px 0 18px;
        font-size: 14px;
        line-height: 1.45;
    }

    /*
      Более компактные ответы
    */

    .quiz__options {
        gap: 8px;
    }

    .quiz-option {
        min-height: 52px;
        padding: 12px 13px;
        gap: 11px;
        border-radius: 11px;
        font-size: 14px;
        line-height: 1.3;
    }

    .quiz-option__mark {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }

    /*
      Кнопки навигации
    */

    .quiz__actions {
        gap: 9px;
        margin-top: 16px;
    }

    .button {
        min-height: 50px;
        padding: 0 16px;
        font-size: 14px;
    }

    .button--secondary {
        flex: 0 0 auto;
    }

    /*
      Финальная форма
    */

    #leadScreen .quiz__title {
        font-size: 29px;
    }

    #leadScreen .quiz__subtitle {
        margin-bottom: 16px;
    }

    #leadScreen .lead-form {
        gap: 12px;
    }

    #leadScreen .contact-methods {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    #leadScreen .contact-method span {
        min-height: 46px;
    }

    #leadScreen .field input {
        min-height: 49px;
    }

    #leadScreen .field textarea {
        min-height: 88px;
    }
}


/* =========================================================
   ОЧЕНЬ МАЛЕНЬКИЕ ТЕЛЕФОНЫ
   Например iPhone SE 320 × 568
========================================================= */

@media (max-width: 360px) {

    .quiz__visual {
        height: 118px;
        min-height: 118px;
    }

    .quiz__visual img {
        height: 118px;
        min-height: 118px;
        object-position: 50% 27%;
    }

    /*
      На совсем маленьком экране убираем даже имя,
      чтобы сразу показать вопрос.
    */

    .quiz__visual-content {
        display: none;
    }

    .quiz__main {
        padding: 15px 12px 24px;
    }

    .quiz__progress {
        margin-bottom: 16px;
    }

    .quiz__title {
        font-size: 26px;
    }

    .quiz__subtitle {
        margin: 8px 0 15px;
        font-size: 13px;
    }

    .quiz-option {
        min-height: 48px;
        padding: 10px 11px;
        font-size: 13px;
    }

    .quiz__actions {
        margin-top: 13px;
    }

    .button {
        min-height: 47px;
        padding: 0 12px;
    }
}

/* =========================================================
   ИСПРАВЛЕНИЕ МОБИЛЬНЫХ КНОПОК
   Кнопка «Продолжить» больше не уезжает вправо
========================================================= */

@media (max-width: 900px) {

    #questionScreen .quiz__actions,
    #leadScreen .quiz__actions {
        width: 100%;
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 9px;
        align-items: stretch;
        overflow: visible;
    }

    #questionScreen .quiz__actions .button,
    #leadScreen .quiz__actions .button {
        width: auto;
        min-width: 0;
        max-width: 100%;
        margin: 0;
    }

    #questionScreen .button--secondary,
    #leadScreen .button--secondary {
        grid-column: 1;
    }

    #questionScreen .button--primary,
    #leadScreen .button--primary {
        grid-column: 2;
        width: 100%;
    }

    /*
      На первом вопросе кнопка «Назад» скрыта.
      Тогда «Продолжить» занимает всю строку.
    */

    #questionScreen #backButton[hidden]+#nextButton {
        grid-column: 1 / -1;
    }
}


/* Очень маленькие телефоны */

@media (max-width: 360px) {

    #questionScreen .quiz__actions,
    #leadScreen .quiz__actions {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 7px;
    }

    #questionScreen .quiz__actions .button,
    #leadScreen .quiz__actions .button {
        min-height: 46px;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 13px;
    }
}

/* Фоновое изображение левой части */

.quiz__visual {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.quiz__visual>.quiz__visual-image {
    position: absolute;
    inset: 0;
    z-index: 0;

    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;

    object-fit: cover;
    object-position: center;
}


/* Затемнение изображения для читаемости текста */

.quiz__visual-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background:
        linear-gradient(180deg,
            rgba(5, 4, 3, 0.06) 0%,
            rgba(5, 4, 3, 0.18) 45%,
            rgba(5, 4, 3, 0.88) 100%);
}


/* Карточка поверх изображения */

.quiz__visual-content {
    position: absolute;
    right: 28px;
    bottom: 28px;
    left: 28px;
    z-index: 2;
}


/* Логотип */

.quiz__visual-content .quiz__brand-logo {
    display: block;

    width: min(100%, 290px);
    height: auto !important;
    min-height: 0 !important;

    margin: 0 0 18px;

    object-fit: contain;
    object-position: left center;
}


/* Мобильная версия */

@media (max-width: 900px) {
    .quiz__visual>.quiz__visual-image {
        object-position: center 62%;
    }

    .quiz__visual-content {
        right: 18px;
        bottom: 18px;
        left: 18px;
    }

    .quiz__visual-content .quiz__brand-logo {
        width: min(100%, 220px);
        margin-bottom: 12px;
    }
}