:root {
    --astro-birth-bg: #000520;
    --astro-birth-panel: #18296c;
    --astro-birth-panel-shadow: #18296c;
    --astro-birth-accent: #e3f16e;
    --astro-birth-text: #ffffff;
    --astro-birth-muted: #9e9e9e;
    --astro-birth-input-border: #d4d4d4;
}

html {
    background: #101010;
}

.astro-birth-date__shell {
    background: var(--astro-birth-bg);
}

.astro-birth-date__shell::after {
    content: "";
    position: absolute;
    inset: 534px 0 0;
    background: var(--astro-birth-panel);
    z-index: 0;
    pointer-events: none;
}

.astro-birth-date__back img {
    width: 25px;
    height: 25px;
}

.astro-birth-date__panel {
    width: calc(100% + 64px);
    margin-top: 340px;
    margin-left: -32px;
    padding: 70px 72px 40px;
    background: var(--astro-birth-panel);
    border-radius: 120px 120px 0 0;
}

.astro-birth-date__title-wrap {
    position: relative;
    width: 283px;
    max-width: 100%;
    margin: 0 auto 72px;
}

.astro-birth-date__title {
    margin: 0;
    color: var(--astro-birth-text);
    font-family: "Oblata Display", "Times New Roman", Georgia, serif;
    font-size: 64px;
    line-height: 52px;
    font-weight: 400;
    text-align: center;
    letter-spacing: 0;
}

.astro-birth-date__title span {
    display: block;
}

.astro-birth-date__title-underline {
    position: absolute;
    left: 24px;
    bottom: -7px;
    width: 111px;
    height: auto;
}

.astro-birth-date__error {
    margin: 0 0 18px;
    color: #ffe2e2;
    text-align: center;
    font-size: 13px;
    line-height: 18px;
}

.astro-birth-date__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 66px;
}

.astro-birth-date__field {
    display: block;
    width: 100%;
}

.astro-birth-date__input {
    width: 100%;
    height: 58px;
    padding: 16px;
    border: 1px solid var(--astro-birth-input-border);
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.astro-birth-date__input::placeholder {
    color: #a3a3a3;
    opacity: 1;
}

.astro-birth-date__input:focus {
    border-color: #b9c3ff;
    box-shadow: 0 0 0 4px rgba(227, 241, 110, 0.12);
}

.astro-birth-date__submit img {
    width: 85px;
    height: 85px;
}

.astro-birth-date__legal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 25px auto 0;
    color: var(--astro-birth-muted);
    text-align: center;
}

.astro-birth-date__legal span {
    display: inline-block;
    text-align: center;
}

.astro-birth-date__legal img {
    width: 11px;
    height: 12px;
    flex: 0 0 auto;
}

@media (min-width: 381px) {
    body.astro-birth-date-page {
        overflow: hidden;
    }

    .astro-birth-date__shell {
        --astro-birth-date-panel-top: clamp(180px, calc(41.5vh - 56.8px), 340px);
        --astro-birth-date-panel-padding-top: clamp(24px, calc(12.5vh - 49.4px), 70px);
        --astro-birth-date-panel-padding-bottom: clamp(12px, calc(8.3vh - 39.4px), 40px);
        --astro-birth-date-title-gap: clamp(18px, calc(15.2vh - 73.4px), 72px);
        --astro-birth-date-form-gap: clamp(20px, calc(13.1vh - 59.4px), 66px);
        --astro-birth-date-legal-gap: clamp(14px, calc(3.8vh - 9.3px), 25px);
        --astro-birth-date-error-gap: clamp(8px, calc(3.5vh - 15.3px), 18px);
        --astro-birth-date-panel-top: clamp(180px, calc(41.5svh - 56.8px), 340px);
        --astro-birth-date-panel-padding-top: clamp(24px, calc(12.5svh - 49.4px), 70px);
        --astro-birth-date-panel-padding-bottom: clamp(12px, calc(8.3svh - 39.4px), 40px);
        --astro-birth-date-title-gap: clamp(18px, calc(15.2svh - 73.4px), 72px);
        --astro-birth-date-form-gap: clamp(20px, calc(13.1svh - 59.4px), 66px);
        --astro-birth-date-legal-gap: clamp(14px, calc(3.8svh - 9.3px), 25px);
        --astro-birth-date-error-gap: clamp(8px, calc(3.5svh - 15.3px), 18px);
        height: 100vh;
        height: 100svh;
        min-height: 0;
    }

    .astro-birth-date__shell::after {
        inset: clamp(406px, calc(var(--astro-birth-date-panel-top) + 194px), 534px) 0 0;
    }

    .astro-birth-date__panel {
        display: flex;
        flex-direction: column;
        min-height: calc(100% - var(--astro-birth-date-panel-top));
        margin-top: var(--astro-birth-date-panel-top);
        padding-top: var(--astro-birth-date-panel-padding-top);
        padding-bottom: var(--astro-birth-date-panel-padding-bottom);
    }

    .astro-birth-date__title-wrap {
        flex: 0 0 auto;
        margin-bottom: var(--astro-birth-date-title-gap);
    }

    .astro-birth-date__error {
        flex: 0 0 auto;
        margin-bottom: var(--astro-birth-date-error-gap);
    }

    .astro-birth-date__form {
        flex: 1 1 auto;
        display: grid;
        grid-template-rows: auto minmax(var(--astro-birth-date-form-gap), 1fr) auto;
        align-items: center;
        width: 100%;
        min-height: calc(145px + var(--astro-birth-date-form-gap));
        gap: 0;
    }

    .astro-birth-date__field {
        grid-row: 1;
    }

    .astro-birth-date__submit {
        grid-row: 3;
        justify-self: center;
    }

    .astro-birth-date__legal {
        flex: 0 0 auto;
        margin-top: var(--astro-birth-date-legal-gap);
    }
}

@media (min-width: 381px) and (max-height: 600px) {
    .astro-birth-date__shell {
        --astro-birth-date-panel-top: clamp(150px, calc(20vh + 46px), 166px);
        --astro-birth-date-panel-padding-top: 20px;
        --astro-birth-date-panel-padding-bottom: 8px;
        --astro-birth-date-title-gap: 12px;
        --astro-birth-date-form-gap: 14px;
        --astro-birth-date-legal-gap: 10px;
        --astro-birth-date-error-gap: 6px;
        --astro-birth-date-panel-top: clamp(150px, calc(20svh + 46px), 166px);
    }

    .astro-birth-date__input {
        height: 56px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .astro-birth-date__submit img {
        width: 80px;
        height: 80px;
    }

    .astro-birth-date__form {
        min-height: calc(136px + var(--astro-birth-date-form-gap));
    }
}

@media (max-width: 380px) {
    .astro-birth-date__shell {
        background: var(--astro-birth-bg);
    }

    .astro-birth-date__shell::after {
        inset: 406px 0 0;
    }

    .astro-birth-date__panel {
        width: calc(100% + 48px);
        min-height: auto;
        margin-top: 240px;
        margin-left: -24px;
        padding: 50px 56px 15px;
        border-radius: 92px 92px 0 0;
    }

    .astro-birth-date__title {
        font-size: 54px;
        line-height: 46px;
    }

    .astro-birth-date__title-wrap {
        margin-bottom: 40px;
    }

    .astro-birth-date__form {
        gap: 40px;
    }

    .astro-birth-date__title-underline {
        left: 37px;
    }
}
