.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100dvh;
}

.auth-intro {
    --panel: #15203f;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 48px max(48px, env(safe-area-inset-left, 0px)) 0 48px;
    overflow: hidden;
    background-color: var(--panel);
    background-image:
        radial-gradient(circle at 80% 15%, rgb(91 143 255 / 28%), transparent 50%),
        linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
    background-size: auto, 28px 28px, 28px 28px;
    color: #eef2fb;
}

.auth-intro .brand {
    color: #fff;
}

.auth-headline {
    max-width: 15ch;
    margin-top: 24px;
    font-size: clamp(32px, 4vw, 46px);
    color: #fff;
}

.auth-headline em {
    font-style: normal;
    color: var(--gold);
}

.auth-points {
    display: grid;
    gap: 10px;
    max-width: 36ch;
    color: #c9d3ec;
}

.auth-points li {
    display: flex;
    gap: 10px;
}

.auth-points li::before {
    content: "✓";
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgb(244 165 28 / 18%);
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
}

.auth-mascot-slot {
    width: 170px;
    margin-top: auto;
    padding-top: 30px;
}

.auth-mascot-slot .mascot-bubble {
    max-width: 230px;
}

.auth-main {
    display: grid;
    place-items: center;
    padding: 40px max(24px, env(safe-area-inset-right, 0px)) 40px 24px;
}

.auth-main.is-standalone {
    min-height: 100dvh;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 36px;
    box-shadow: var(--shadow);
    animation: rise-in 0.5s var(--ease) both;
}

.auth-card h1 {
    font-size: 30px;
}

.auth-card > .muted {
    margin: 4px 0 24px;
}

.auth-card > .button {
    width: 100%;
    margin-top: 20px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form > .button {
    margin-top: 6px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.field-error {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--error);
}

.field-error:not(:empty) {
    margin-top: 6px;
}

.password {
    position: relative;
}

.password .input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    padding: 7px;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--muted);
    translate: 0 -50%;
}

.password-toggle:hover {
    color: var(--text);
    background: var(--surface-2);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--muted);
}

.password-rules li::before {
    content: "○";
    display: inline-block;
    width: 18px;
}

.password-rules .is-met {
    color: var(--success);
}

.password-rules .is-met::before {
    content: "✓";
}

.field .checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.auth-switch {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

@media (max-width: 860px) {
    .auth {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-intro {
        display: grid;
        grid-template-columns: 1fr 96px;
        align-items: end;
        gap: 0 12px;
        padding: 20px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
        border-radius: 0 0 26px 26px;
    }

    .auth-intro .brand {
        grid-column: 1 / -1;
        font-size: 24px;
    }

    .auth-headline {
        max-width: none;
        margin: 14px 0 20px;
        font-size: 24px;
    }

    .auth-points {
        display: none;
    }

    .auth-mascot-slot {
        grid-row: 2;
        grid-column: 2;
        width: 96px;
        padding-top: 0;
    }

    .auth-mascot-slot .mascot-bubble {
        display: none;
    }

    .auth-main {
        place-items: start center;
        padding: 20px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px));
    }

    .auth-card {
        padding: 26px 20px;
    }
}
