@media (max-width: 900px) {
    html,
    body {
        height: auto;
        overflow: visible;
    }

    body {
        min-height: 100vh;
    }

    .auth-container {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .auth-image {
        display: none;
    }

    .auth-panel {
        width: 100%;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        justify-content: flex-start;
        padding: 20px 16px 28px;
    }

    .auth-content {
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
        align-items: stretch;
    }

    .auth-logo {
        position: static;
        width: 120px;
        margin-bottom: 28px;
    }

    .top-actions {
        top: 16px;
        right: 16px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .language-switch:focus-within .language-menu {
        display: flex;
    }

    .auth-box,
    .auth-box.flipped {
        width: 100%;
        height: auto;
        top: auto;
    }

    .auth-footer {
        position: static;
        width: 100%;
        max-width: 540px;
        margin: auto auto 0;
        padding: 28px 0 0;
    }

    .store-block {
        text-align: center;
    }

    .store-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-box input:not([type="hidden"]),
    .auth-box select {
        font-size: 16px;
    }

    .form-row > *,
    .form-phone input {
        min-width: 0;
    }

    .form-phone select {
        width: 108px;
        flex: 0 0 108px;
    }

    .form-phone input {
        flex: 1;
    }

    /* On mobile, the OTP step uses its own height instead of the registration form's height. */
    .auth-box-inner {
        display: block;
        transform-style: flat;
        transition: none;
    }

    #otp-block {
        display: none;
    }

    .auth-box.flipped .auth-box-inner,
    .auth-box.flipped #otp-block {
        transform: none;
    }

    .auth-box.flipped #register-side {
        display: none;
    }

    .auth-box.flipped #otp-block {
        display: block;
    }
}

@media (max-width: 480px) {
    .auth-panel {
        padding: 16px 12px 28px;
    }

    .auth-logo {
        width: 110px;
        margin-bottom: 24px;
    }

    .top-actions {
        top: 16px;
        right: 12px;
    }

    .auth-box,
    .auth-box.flipped {
        padding: 20px 16px;
    }

    .auth-title {
        font-size: 24px;
    }

    #register-side .auth-title,
    #otp-block .auth-title {
        font-size: 22px;
    }

    .auth-box > .auth-subtitle {
        margin-bottom: 22px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .switch label {
        font-size: 16px;
    }

    .switch .tooltip-text {
        max-width: 200px;
        white-space: normal;
    }

    .switch label:first-of-type .tooltip-text {
        left: 0;
        transform: none;
    }

    .switch label:last-of-type .tooltip-text {
        left: auto;
        right: 0;
        transform: none;
    }

    .invite-banner {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 359px) {
    .g-recaptcha {
        width: 100%;
        height: 66px;
        transform: scale(.82);
        transform-origin: left top;
    }
}
