/* Phone layout: keep the form readable and reachable when the keyboard opens. */
@media (max-width: 680px) {
    body {
        background: #edf4f0;
    }

    .login-shell {
        width: 100%;
        min-height: 100svh;
        padding: max(20px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(24px, env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left));
        background: linear-gradient(180deg, #e1eee6, #f3f6f4 320px);
    }

    .form-panel {
        min-height: 0;
        width: 100%;
        max-width: 440px;
        margin: 0 auto;
        padding: 28px 24px 24px;
        border: 1px solid #dbe5df;
        border-top: 4px solid #087347;
        border-radius: 22px;
        background: #fff;
        box-shadow: 0 12px 36px #17352b0a;
    }

    .form-content { max-width: none; min-width: 0; }
    .form-brand { margin: 0 0 22px; padding: 0; }
    .form-brand .brand-logo { width: 80px; }
    h2 { font-size: 28px; letter-spacing: -.8px; text-align: center; }
    .subtitle {
        margin: 0 0 26px;
        color: #56667a;
        font-size: 14px;
        line-height: 1.65;
        text-align: center;
    }

    .form-group { margin-bottom: 20px; }
    label { font-size: 14px; margin-bottom: 8px; }
    input:not([type=hidden]) {
        height: 54px;
        padding: 0 14px;
        border-color: #cbd7d0;
        border-radius: 12px;
        background: #f9fbfa;
        font-size: 16px;
        scroll-margin-block: 24px;
    }
    input::placeholder { font-size: 14px; color: #6e7c8c; }
    .field-help { font-size: 12px; line-height: 1.5; }
    .sign-in {
        min-height: 54px;
        height: auto;
        padding: 14px;
        border-radius: 12px;
        font-size: 16px;
        box-shadow: 0 5px 12px #08734720;
        touch-action: manipulation;
    }

    .form-content .phone-app-install {
        margin: 14px 0 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    .form-content .phone-app-install button {
        width: 100%;
        min-height: 50px;
        padding: 12px;
        border: 1px solid #cadbd1;
        border-radius: 12px;
        background: #f2f8f4;
        color: #08613d;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.5;
        touch-action: manipulation;
    }
    .phone-app-install button:focus-visible {
        outline: 3px solid #78b796;
        outline-offset: 3px;
    }
    .phone-app-install button:disabled { opacity: .65; cursor: wait; }
    .form-content .phone-app-install p { font-size: 13px; }
    .help { margin-top: 22px; padding-top: 18px; font-size: 13px; }
    .help strong { font-size: 14px; }
    .privacy-note { margin-top: 18px; font-size: 12px; align-items: flex-start; }
    .privacy-note svg { width: 16px; height: 16px; margin-top: 2px; }
    .alert { font-size: 14px; overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
    .login-shell { padding-left: 10px; padding-right: 10px; }
    .form-panel { padding: 24px 18px 22px; border-radius: 18px; }
    .form-brand .brand-logo { width: 68px; }
    h2 { font-size: 26px; }
}
