/* Keep the action reachable while longer forms scroll on small screens. */
.phone-auth-dialog{box-sizing:border-box;width:min(390px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - max(24px,env(safe-area-inset-top) + env(safe-area-inset-bottom) + 24px));margin:auto;padding:0;border:1px solid #d8e5d6;border-radius:16px;background:#fffdfa;color:#143a29;box-shadow:0 18px 55px #06382740;overflow:hidden}
.phone-auth-dialog[open]{display:flex;flex-direction:column}
.phone-auth-dialog::backdrop{background:rgba(1,29,20,.62)}
.phone-auth-dialog [hidden]{display:none!important}
.phone-auth-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #e4eade}
.phone-auth-head h2{margin:0;font-size:18px;line-height:1.35;color:#123d2b}
.phone-auth-head .phone-auth-close{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;padding:0;border:1px solid #d8e5d6;border-radius:9px;background:#f3f8ef;color:#164b32;font-size:24px;line-height:1}
.phone-auth-form{display:flex;flex-direction:column;min-height:0;margin:0}
.phone-auth-body{padding:14px 16px 4px;overflow-y:auto;overscroll-behavior:contain}
.phone-auth-tabs,.phone-auth-methods div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.phone-auth-tabs{margin-bottom:14px;padding:3px;border-radius:10px;background:#edf3ec}
.phone-auth-tabs button,.phone-auth-methods button{min-width:0;min-height:44px;padding:5px;border:1px solid transparent;border-radius:8px;background:transparent;color:#385843;font-size:13px;font-weight:650;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.phone-auth-tabs button[aria-pressed=true]{background:#fff;color:#155335;border-color:#bdcebd}
.phone-auth-methods{min-width:0;margin:0 0 14px;padding:0;border:0}
.phone-auth-methods legend,.phone-auth-form label{margin:0 0 5px;color:#254633;font-size:13px;font-weight:650;line-height:1.4}
.phone-auth-methods div{display:flex}
.phone-auth-methods div button{flex:1 1 0}
.phone-auth-methods button{border-color:#cbdcc8;background:#fff}
.phone-auth-methods button[aria-pressed=true]{border-color:#087443;background:#e5f3e9;color:#095231;box-shadow:inset 0 0 0 1px #087443}
.phone-auth-form label{display:block;margin-bottom:12px}
.phone-auth-form input,.phone-auth-form select{box-sizing:border-box;display:block;width:100%;min-height:44px;margin:4px 0 0;padding:8px 10px;border:1px solid #bed1c0;border-radius:9px;background:#fff;color:#173729;font-size:16px;line-height:1.4}
.phone-auth-form small{display:block;margin-top:4px;color:#536858;font-size:12px;font-weight:400;line-height:1.4}
.phone-auth-form .phone-auth-session-notice{margin:4px 0 12px}
.phone-auth-linked{margin:0 0 12px;overflow-wrap:anywhere;font-size:14px}
.phone-auth-linked strong{display:block}
.phone-auth-form .phone-auth-forgot{display:block;min-height:44px;padding:4px 0;border:0;background:transparent;color:#0a7044;font-size:13px;font-weight:650;text-align:left}
.phone-auth-footer{flex:none;padding:10px 16px 12px;border-top:1px solid #e4eade;background:#fffdfa}
.phone-auth-message{margin:0;color:#9b3026;font-size:13px;line-height:1.4;overflow-wrap:anywhere;max-height:16vh;overflow:auto}
.phone-auth-message:not(:empty){margin-bottom:8px}
.phone-auth-form .phone-auth-submit{width:100%;min-height:44px;padding:9px 12px;border:0;border-radius:9px;background:#077848;color:#fff;font-size:14px;font-weight:700;line-height:1.35;white-space:normal}
.phone-auth-dialog button:disabled{opacity:.55;cursor:not-allowed}
.phone-auth-dialog :is(button,input,select):focus-visible{outline:3px solid #8aab4b;outline-offset:2px}
