:root {
    --bg-main: #dcc8ff;
    --bg-alt: #f0e7ff;
    --ink: #241838;
    --ink-soft: rgba(36, 24, 56, 0.74);
    --paper: #f8edd6;
    --paper-strong: #f3e2be;
    --dash: #413152;
    --yellow: #f5cb3d;
    --yellow-strong: #d2a100;
    --lavender: #ebe1ff;
    --white: #fffdf7;
    --danger: #9d2740;
    --success: #2c5f4b;
    --shadow: 0 28px 0 rgba(89, 61, 127, 0.12), 0 38px 70px rgba(62, 36, 100, 0.18);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --max-width: 980px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: clip;
}

body {
    font-family: "Avenir Next", "Trebuchet MS", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 24%),
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.4), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(186, 157, 243, 0.24), transparent 32%),
        linear-gradient(135deg, var(--bg-main), var(--bg-alt));
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow-x: hidden;
}

.scene {
    position: relative;
    width: 100%;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 40px);
    overflow: clip;
}

.scene::before,
.scene::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.45;
    pointer-events: none;
}

.scene::before {
    width: clamp(180px, 22vw, 260px);
    height: clamp(180px, 22vw, 260px);
    top: 6%;
    left: 3%;
    background: rgba(255, 255, 255, 0.34);
    filter: blur(14px);
}

.scene::after {
    width: clamp(220px, 28vw, 340px);
    height: clamp(220px, 28vw, 340px);
    right: max(-90px, -6vw);
    bottom: max(-60px, -4vw);
    background: rgba(200, 177, 255, 0.6);
    filter: blur(18px);
}

.card {
    position: relative;
    width: min(100%, var(--max-width));
    max-width: 100%;
    min-height: auto;
    padding: clamp(54px, 4vw, 86px);
    background: #fff;
    border: 2px dashed var(--dash);
    border-radius: var(--radius-xl);
}


.panel {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question {
    margin: 0;
    font-family: "montserrat", sans-serif;
    font-weight: 600;
    font-size: 40px;
    line-height: 0.94;
    letter-spacing: -0.04em;
}

.helper {
    margin: 16px 0 0;
    max-width: 42rem;
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.45;
}

.choice-row,
.input-row {
    margin-top: 48px;
    display: grid;
    gap: 18px;
}

.choice-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.input-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.control,
.choice-button,
.ghost-button {
    appearance: none;
    border: 2px solid rgba(65, 49, 82, 0.34);
    border-radius: var(--radius-md);
    font: inherit;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}

.control {
    min-height: 56px;
    padding: 14px 16px;
    color: var(--ink);
    background: var(--white);
    box-shadow: inset 0 -2px 0 rgba(65, 49, 82, 0.05);
}

.control::placeholder {
    color: rgba(36, 24, 56, 0.42);
}

.choice-button,
.ghost-button {
    min-height: 56px;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 700;
}

.choice-button {
    background: #ffe9e9;
    color: var(--ink);
    border: none;
}

.choice-button--primary,
.submit-button {
    background: #beead7;
    border: none;
}

.submit-button {
    min-width: 142px;
    white-space: nowrap;
}

.choice-button:hover,
.choice-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.control:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.choice-button:focus-visible,
.ghost-button:focus-visible,
.control:focus-visible {
    box-shadow:
        0 0 0 3px rgba(124, 90, 199, 0.2),
        0 10px 18px rgba(36, 24, 56, 0.1);
    border-color: #7c5ac7;
}

.status {
    min-height: 24px;
    margin-top: 16px;
    font-size: 0.96rem;
    color: var(--ink-soft);
}

.status.is-error {
    color: var(--danger);
}

.status.is-success {
    color: var(--success);
}

.actions {
    margin-top: 26px;
}

.ghost-button {
    background: transparent;
    color: var(--ink);
}

.fade-enter {
    animation: fadeInUp 320ms ease both;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .card {
        min-height: auto;
        border-radius: 24px;
        padding: 28px 22px 24px;
    }

    .card::before {
        inset: 8px;
        border-radius: 18px;
    }

    .question {
        font-size: clamp(1.95rem, 9vw, 3.1rem);
    }

    .helper {
        font-size: 0.96rem;
    }

    .choice-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .submit-button {
        min-width: 100%;
    }
}

@media (max-width: 560px) {
    .scene {
        min-height: 100svh;
        padding: 34px;
    }

    .scene::before {
        width: 32vw;
        height: 32vw;
        top: 4%;
        left: -10%;
    }

    .scene::after {
        width: 42vw;
        height: 42vw;
        right: -14%;
        bottom: -6%;
    }

    .card {
        border-radius: 22px;
        width: 100%;
        min-height: auto;
        padding: 38px 26px;
    }

    .question {
        max-width: none;
        font-size: 26px;
        line-height: 1;
    }

    .helper {
        margin-top: 12px;
        font-size: 0.94rem;
    }

    .choice-row,
    .input-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .choice-button,
    .ghost-button,
    .control {
        min-height: 54px;
        font-size: 20px;
        font-weight: 600;
    }
}
