/* Touch/viewport repair: preserve the existing colours and card layout. */
:root { --pwa-nav-height: 90px; --pwa-actions-height: 0px; }
a, button, summary, select, [role="button"] { touch-action: manipulation; }
.pwa-bottom-nav { padding-top: 10px !important; padding-bottom: max(12px, env(safe-area-inset-bottom)) !important; }
.pwa-bottom-nav > a { flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
body.pwa-has-nav { padding-bottom: calc(var(--pwa-nav-height) + var(--pwa-actions-height) + 16px) !important; }
.pwa-visit-actions { bottom: var(--pwa-nav-height) !important; z-index: 1030 !important; }
/* Fixed work controls must stay below Bootstrap's backdrop and confirmation. */
body.modal-open .pwa-visit-actions { visibility: hidden; pointer-events: none; }
#visitFinishNotice { max-height: 96px; overflow-y: auto; overflow-wrap: anywhere; }
.category-finish-button { min-height: 48px; scroll-margin-bottom: calc(var(--pwa-nav-height) + var(--pwa-actions-height) + 24px); }
.category-save-status { overflow-wrap: anywhere; }
#pwaConnectionStatus { max-height: 80px; overflow-y: auto; overflow-wrap: anywhere; }
#pwaNavigationStatus { position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 1999; padding: 8px 14px; max-width: calc(100% - 24px); border-radius: 18px; background: #2f211a; color: #fff; font: 600 13px system-ui; box-shadow: 0 4px 16px #0003; pointer-events: none; }
#pwaNavigationStatus[hidden] { display: none; }
@media (pointer: coarse) {
  .route-date-tabs .nav-link, .category-selector-grid .cat-item { min-height: 44px; }
}
