/* Shared reflow rules: retain content rather than concealing horizontal overflow. */
.spa *, .spa *::before, .spa *::after { box-sizing:border-box; }
.spa :where(main,section,article,form,fieldset,header,footer,div,dl,dt,dd,label) { min-width:0; }
.spa :where(h1,h2,h3,h4,p,li,dt,dd,label) { overflow-wrap:break-word; word-break:normal; }
.spa :where(img,video,canvas,iframe) { max-width:100%; }
.spa :where(input,textarea,select) { max-width:100%; min-width:0; }
.spa textarea { resize:vertical; }
.spa .login-signup a { white-space:normal; overflow-wrap:anywhere; }
.spa .hero-values { white-space:normal; line-height:1.8; }
.spa :where(.doctor-profile-grid dd,.receipt-meta,.prescription-body,.appointment-info-grid,.patient-profile-section) { overflow-wrap:anywhere; }
.spa :where(.appointments-toolbar,.reports-toolbar,.booking-confirm-actions,.edit-profile-actions,.report-actions,.health-record-actions) { flex-wrap:wrap; gap:12px; }
.spa :where(.booking-confirm-actions,.edit-profile-actions,.report-actions,.health-record-actions) > * { min-width:0; max-width:100%; }
.spa .select2-container { max-width:100%; min-width:0; }
.spa .select2-selection__choice { max-width:100%; white-space:normal!important; overflow-wrap:anywhere; }
.spa .select2-results__option { white-space:normal; overflow-wrap:anywhere; }
.spa .bottom-link { min-width:0; flex:1 1 0; white-space:normal; line-height:1.25; text-align:center; }
.spa .bottom-nav { height:auto; min-height:72px; padding-top:8px; padding-bottom:8px; }
.spa :where(.login-card,.booking-form,.lab-booking-form) button { white-space:normal; line-height:1.4; }
@media(max-width:600px) {
 .spa .hero-copy { width:78%; }
 .spa .hero-copy h1 { font-size:clamp(28px,8.5vw,48px); line-height:1.08; letter-spacing:-1px; overflow-wrap:normal; }
 .spa .card-copy strong { max-width:100%; font-size:clamp(14px,4vw,20px); line-height:1.25; overflow-wrap:normal; }
 .spa .card-copy small { padding-right:16px; line-height:1.5; }
 .spa .card-arrow { right:10px; bottom:16px; }
 .spa :where(.service-card,.action-card) { height:auto; }
 .spa :where(.booking-confirm-actions,.edit-profile-actions) { display:flex; }
 .spa :where(.booking-confirm-actions,.edit-profile-actions) > * { flex:1 1 180px; }
 .spa .doctor-profile-grid dl > div { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); }
 .spa :where(.receipt-brand,.prescription-brand) { flex-wrap:wrap; }
 .spa :where(.receipt-brand,.prescription-brand) > div { flex:1 1 160px; }
 .spa .bottom-nav { max-height:30dvh; overflow-y:auto; }
 .spa .app-drawer { max-width:calc(100vw - 24px); overflow-y:auto; max-height:100dvh; }
}
@media(max-width:359px) {
 .spa .action-grid { grid-template-columns:1fr; }
 .spa .action-card { display:grid; grid-template-columns:52px minmax(0,1fr); align-items:center; gap:12px; min-height:112px; padding:18px; }
 .spa .action-card .card-icon { width:52px; height:52px; font-size:25px; }
 .spa .action-card .card-copy { padding-top:0; padding-right:8px; }
 .spa .card-copy strong { font-size:18px; }
 .spa .hero-copy { width:88%; }
 .spa .service-grid { grid-template-columns:1fr; }
 .spa :where(.appointment-facts,.patient-account-facts,.receipt-meta,.prescription-patient) { grid-template-columns:1fr; }
 .spa .bottom-link { font-size:10px; }
}
@media(max-height:500px) and (orientation:landscape) {
 .spa .app-header { position:relative; }
 .spa .bottom-nav { position:relative; left:auto; bottom:auto; transform:none; margin:18px auto; }
 .spa { padding-bottom:16px; }
}
