/* Five primary phone destinations and a full-height action surface. */
.mobile-dock { display: none; }
@media (max-width: 768px) {
  html, body { overflow-x: clip; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .container, .nav-inner { padding-inline: 16px !important; min-width: 0; }
  .page, .page * { max-width: 100%; }
  .mobile-dock { top: auto !important; position: fixed; z-index: 190; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-top: 1px solid var(--border); background: #fff !important; color: #172337 !important; }
  .mobile-dock button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 48px; border: 0; background: #fff !important; color: #42536a !important; font-size: 10px; font-weight: 650; white-space: nowrap; cursor: pointer; }
  .mobile-dock button[aria-current="page"] { color: #ba401c !important; font-weight: 800; }
  .mobile-dock__icon { font-size: 23px; line-height: 1; color: inherit !important; }
  nav .nav-menu { position: fixed !important; top: auto !important; bottom: calc(68px + env(safe-area-inset-bottom)); max-height: min(70dvh,600px) !important; overflow-y: auto; z-index: 191 !important; }
  .modal-overlay { padding: 8px 0 0 !important; align-items: flex-end !important; }
  .modal-overlay .modal { width: 100% !important; max-width: 100% !important; max-height: calc(100dvh - 8px) !important; border-radius: 18px 18px 0 0 !important; background: #fff !important; color: #172337 !important; }
  .modal-header { position: sticky; top: 0; z-index: 2; padding: 14px 16px !important; background: #fff !important; color: #172337 !important; border-bottom: 1px solid var(--border); }
  .modal-header h2, .modal-close { color: #172337 !important; }
  .modal-body { padding: 16px !important; overflow-x: clip; }
  :is(input,select,textarea) { font-size: 16px !important; max-width: 100%; }
  :is(.page,.modal) :is(button,.btn) { min-height: 42px; }
  :is(.page,.modal) :is(table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  :is(.page,.modal) :is(.form-row,.form-row.three) { grid-template-columns: minmax(0,1fr) !important; }
  #chat-bubble { bottom: calc(74px + env(safe-area-inset-bottom)) !important; right: 14px !important; width: 48px !important; height: 48px !important; }
  body:has(#nav-menu.open) #chat-bubble { display: none !important; }
  .hero { padding-block: 46px !important; }
  .hero h1 { font-size: clamp(28px,8vw,36px) !important; overflow-wrap: anywhere; }
}
@media (max-width: 374px) {
  .container, .nav-inner { padding-inline: 12px !important; }
  .mobile-dock button { font-size: 9px; }
}

/* Keep the floating support shortcut clear of every open workflow dialog. */
body:has(.modal-overlay.open) #chat-bubble{display:none!important}

@media(max-width:640px){
  #modal-ext-campaign .inv-person-row{display:grid!important;grid-template-columns:22px minmax(0,1fr);gap:5px 9px!important;align-items:start!important;padding:11px 4px!important}
  #modal-ext-campaign .inv-person-row>.inv-cb{grid-column:1;grid-row:1;margin-top:12px}
  #modal-ext-campaign .inv-person-main{grid-column:2;grid-row:1;min-width:0!important;align-items:flex-start!important}
  #modal-ext-campaign .inv-person-actions{grid-column:2;grid-row:2;display:flex!important;flex-wrap:wrap!important;min-width:0!important;gap:6px!important;padding:2px 0 4px}
  #modal-ext-campaign .inv-person-actions>*{min-height:32px;color:#172b36!important;background:#fff!important}
}
