/* Keep the birth form and its submit action within the visible phone viewport. */
#profile-dialog#profile-dialog{position:fixed;inset:0;margin:auto;width:min(620px,calc(100vw - 24px));max-width:none;max-height:none;overflow:hidden;background:#faf7ef;box-sizing:border-box}
#profile-dialog #profile-form{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0;height:min(760px,calc(var(--profile-viewport-height,100dvh) - 24px));padding:0;min-height:0}
#profile-dialog .dialog-heading{padding:14px 18px;border-bottom:1px solid #d7c9ae;gap:12px}
#profile-dialog .dialog-heading>div{min-width:0}
#profile-dialog .dialog-heading .eyebrow{display:none}
#profile-dialog .dialog-heading .icon-button{flex:0 0 44px;width:44px;height:44px;padding:0}
#profile-dialog .profile-fields{min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:grid;align-content:start;gap:14px;padding:16px 18px;scroll-padding-block:12px}
#profile-dialog .profile-fields>p{margin:0}
#profile-dialog .field,#profile-dialog fieldset,#profile-dialog .field-grid{min-width:0}
#profile-dialog .profile-fields .field{padding:0!important;margin:0!important;border:0!important;background:transparent!important}
#profile-dialog .field-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
#profile-dialog#profile-dialog :is(input:not([type=radio]),select){min-width:0;width:100%;box-sizing:border-box;min-height:44px;font-size:16px!important;line-height:1.4!important}
#profile-dialog .field-group legend{line-height:1.5}
#profile-dialog .radio-card{display:inline-flex;align-items:center;gap:7px;min-height:44px;box-sizing:border-box}
#profile-dialog .profile-hour-select{display:none}
#profile-dialog .dialog-actions{padding:12px 18px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid #d7c9ae;background:#faf7ef;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:10px}
#profile-dialog .dialog-actions button{width:100%;min-height:46px;white-space:normal}
#profile-dialog #profile-form-error{color:#a33b2a;margin:0}
#profile-dialog #profile-form-error:empty,#profile-dialog #profile-transfer-status:empty{display:none}
#profile-dialog .profile-transfer-actions{margin:0}
@media(max-width:700px){
 #profile-dialog#profile-dialog{width:calc(100vw - 16px);inset:calc(var(--profile-viewport-top,0px) + 8px) 0 auto;margin:0 auto;border-radius:12px}
 #profile-dialog #profile-form{height:calc(var(--profile-viewport-height,100dvh) - 16px)}
 #profile-dialog .dialog-heading{padding:10px 12px}
 #profile-dialog .profile-fields{padding:12px;gap:12px}
 #profile-dialog .hour-options{display:none}
 #profile-dialog .profile-hour-select{display:grid;width:100%}
 #profile-dialog .dialog-actions{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))}
 #profile-dialog .field-grid input{padding-inline:8px}
}
