/* Login / register — один экран без «расползания» (footer скрыт, dvh) */
body.auth-route-page {
    overflow: hidden;
}

body.auth-route-page .footer,
body.auth-route-page .footer-official-guide {
    display: none !important;
}

body.auth-route-page .z-global-flash-wrap {
    position: fixed;
    top: calc(var(--header-h, 64px) + 0.35rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    width: min(100% - 1rem, 420px);
    pointer-events: none;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    padding: calc(var(--header-h, 64px) + 0.35rem) 0.75rem 0.5rem;
    overflow: hidden;
    background: linear-gradient(160deg, var(--z-surface-page) 0%, var(--color-primary-subtle) 50%, var(--color-secondary-subtle) 100%);
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - var(--header-h, 64px) - 0.85rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-card-body {
    padding: 1.1rem 1.6rem;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-panels-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0 -0.35rem;
    padding: 0 0.35rem 0.15rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.auth-oauth {
    margin-top: 0.8rem;
    text-align: center;
    flex-shrink: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-gray-light);
}

.zc-puzzle-stage {
    max-width: 100%;
    overflow: hidden;
}

.zc-puzzle-bgimg {
    max-width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    .auth-page {
        align-items: stretch;
        padding: calc(var(--header-h, 64px) + 0.25rem) 0.5rem 0.35rem;
    }

    .auth-card {
        max-width: 100%;
        border-radius: var(--radius-xl);
        max-height: calc(100dvh - var(--header-h, 64px) - 0.5rem);
    }

    .auth-card-body {
        padding: 0.85rem 1rem;
    }

    .auth-form {
        gap: 0.55rem;
    }

    .auth-field input:not([type="checkbox"]) {
        min-height: 2.45rem;
        font-size: 16px;
    }

    .auth-oauth-icons {
        flex-wrap: wrap;
    }
}

@media (max-height: 640px) {
    .auth-card-body {
        padding: 0.65rem 1rem;
    }

    .auth-form {
        gap: 0.45rem;
    }

    .auth-oauth {
        margin-top: 0.45rem;
        padding-top: 0.5rem;
    }
}
