/* Stable auth composition: keep the illustration and the card anchored across steps. */
@media(min-width:731px){
 .main{align-items:start}
 .auth-flow .hero{align-self:start}
 .auth-flow .health-scene{display:block}
 .auth-flow .hero-description{max-width:none}
}
.phone-entry{display:flex;align-items:stretch;border:1px solid #dce5ef;background:#fafcfe;border-radius:12px;min-height:54px;transition:border-color .2s,box-shadow .2s}
.phone-entry:focus-within{border-color:#6a9ed0;box-shadow:0 0 0 3px #3d8ec410}
.phone-country{display:flex;align-items:center;gap:8px;padding:0 12px;border-right:1px solid #e2eaf2;flex-shrink:0;font-size:13px;min-width:91px;color:var(--ink)}
.phone-country>.icon{width:12px;height:12px;color:var(--muted)}
.phone-country-flag{font-size:20px;line-height:1}
.phone-entry>input{min-width:0;width:100%;border:0;background:transparent;box-shadow:none!important;outline:0;border-radius:0 12px 12px 0;padding:13px 12px;font:inherit;font-size:16px;color:var(--ink);height:auto}
.phone-entry:has(input[aria-invalid=true]){border-color:#c65a63}
.phone-country:focus-visible{outline:2px solid #6a9ed0;outline-offset:-3px;border-radius:10px}
.country-picker{position:fixed;inset:0;margin:auto;width:440px;max-width:calc(100vw - 32px);height:640px;max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce6ef;border-radius:24px;background:#fff;color:var(--ink);box-shadow:0 25px 100px #003f9333;overflow:hidden;overscroll-behavior:contain}
.country-picker[open]{display:flex;flex-direction:column}
.country-picker::backdrop{background:#16334e66;backdrop-filter:blur(5px)}
.country-picker>header{display:flex;align-items:start;justify-content:space-between;gap:20px;padding:25px 24px 16px}
.country-picker-kicker{font-size:9px;letter-spacing:1.3px;color:var(--muted)}
.country-picker h2{font-size:24px;font-weight:650;letter-spacing:-.5px;margin:9px 0 0}
.country-picker .icon-button{width:34px;height:34px;font-size:23px;flex-shrink:0}
.country-search{margin:0 24px 14px;display:flex;align-items:center;gap:10px;border:1px solid #dce6ef;background:#f8fbfe;border-radius:12px;padding:0 13px;flex-shrink:0}
.country-search>.icon{width:18px;height:18px;color:#7e9ab2}
.country-search input{height:47px;min-width:0;width:100%;border:0;background:transparent;outline:0;font:inherit;font-size:16px;color:var(--ink)}
.country-search:focus-within{border-color:#83abd0;box-shadow:0 0 0 3px #3d8ec410}
.country-results{overflow:auto;min-height:0;padding:0 14px 18px;overscroll-behavior:contain}
.country-group{font-size:10px;font-weight:600;letter-spacing:.4px;color:#8395a7;padding:14px 12px 8px}
.country-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:10px 12px;border-radius:11px;text-align:left;color:var(--ink)}
.country-row:hover,.country-row:focus-visible{background:#f0f6fc;outline:0}
.country-row[aria-pressed=true]{background:#edf5fd}
.country-row>span:first-child{font-size:23px;line-height:1}
.country-row strong{font-size:13px;font-weight:500;flex:1;line-height:1.5}
.country-row small{font-size:12px;color:#6e879d}
.country-selected{color:var(--brand-blue);width:18px;text-align:right;font-size:16px}
.country-empty{padding:20px 12px;font-size:13px;line-height:1.8;color:var(--muted)}
/* Native dialogs stay in view, scroll internally, and lock the page behind them. */
html{scrollbar-gutter:stable}
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden;overscroll-behavior:none}
.info-dialog:not(.mobile-menu-sheet){position:fixed;inset:0;margin:auto;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.info-dialog h2{overflow-wrap:anywhere}
.portal-dialog-form>label,.profile-fields>label{min-width:0}
.portal-dialog-form input,.portal-dialog-form select,.profile-fields input,.profile-fields select{max-width:100%;min-width:0}
.call-destination>a{font-size:clamp(18px,4.5vw,24px);overflow-wrap:anywhere}
.step-subtitle strong,.contacts-panel strong,.profile-summary span{overflow-wrap:anywhere}
@media(max-width:730px){
 .phone-entry{min-height:54px}
 .phone-country{gap:6px;min-width:85px;padding:0 10px}
 .phone-entry>input{padding-left:11px;font-size:16px}
 .country-picker{width:100%;max-width:100%;height:min(720px,90dvh);max-height:90dvh;inset:auto 0 0;margin:0;border-radius:25px 25px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom)}
 .country-picker>header{padding-top:24px}
 .country-picker:before{content:'';width:36px;height:4px;border-radius:5px;background:#dce6ef;position:absolute;top:9px;left:calc(50% - 18px)}
 .country-row{min-height:55px}
 .info-dialog:not(.mobile-menu-sheet){max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);padding:24px 21px}
 .mobile-menu-sheet{max-height:calc(100dvh - 20px);overflow:auto}
 .auth-flow .health-scene{display:none}
}
@media(max-width:360px){.phone-country{min-width:77px;gap:5px;padding:0 8px}.phone-country-flag{font-size:18px}.phone-entry>input{padding-left:9px;font-size:15px}}

@media(max-width:680px){
 .panel-heading>button,.visit-bottom>button{min-height:40px;font-size:11px}
 .appointment-row:not(.compact){display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px}
 .appointment-row:not(.compact)>.subtle-button{grid-column:2/-1;justify-self:end;min-height:38px;font-size:11px}
 .profile-fields>label:has(input[name=middleName]){grid-column:1/-1}
 .report-table>div{font-size:12px;line-height:1.6;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr);gap:8px}
 .report-table>.table-header{font-size:10px}
 .report-table small{font-size:10px}
 .portal-workspace:has(.chat-layout){height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .portal-workspace:has(.chat-layout)>.portal-topbar{flex-shrink:0}
 .portal-workspace:has(.chat-layout)>.portal-demo-bar{flex-shrink:0;margin:8px 16px 0;padding:8px 12px;font-size:9px}
 .portal-workspace:has(.chat-layout)>.portal-inner-footer{display:none}
 .portal-page:has(.chat-layout){min-height:0;flex:1;display:flex;flex-direction:column;padding:12px 16px}
 .portal-page:has(.chat-layout) .portal-page-heading{margin-bottom:12px}
 .portal-page:has(.chat-layout) .portal-page-heading h1{font-size:23px;margin:0}
 .portal-page:has(.chat-layout) .portal-page-heading p{display:none}
 .chat-layout{min-height:0;flex:1;display:flex;flex-direction:column}
 .chat-list{flex-shrink:0;gap:4px;padding:7px}
 .chat-list>button{min-height:61px;gap:8px;padding:9px 7px}
 .chat-list strong{font-size:11px;line-height:1.4}
 .chat-list small{font-size:9px;line-height:1.4}
 .chat-list>button>span:last-child{gap:4px}
 .chat-window{min-height:0;flex:1}
 .chat-heading{flex-shrink:0;min-height:58px;padding:11px 13px}
 .chat-messages{min-height:0;flex:1;max-height:none;padding:16px 13px;overscroll-behavior:contain}
 .chat-bubble p{font-size:13px;line-height:1.7}
 .chat-demo-note{flex-shrink:0;font-size:9px;line-height:1.5;margin:0;padding:7px 13px}
 .chat-form{flex-shrink:0;margin:0;padding:10px 12px;gap:8px;border-top:1px solid var(--line)}
}
@media(max-width:360px){.profile-fields{grid-template-columns:minmax(0,1fr)}}
.call-international-note{font-size:11px;line-height:1.7;color:var(--muted);margin:10px 0 0}
/* Keep the profile action in the form flow so it never covers the last field. */
.patient-onboarding .profile-form>.portal-primary{position:static;bottom:auto;z-index:auto}
