/* Inside V12.15.3 — native iOS rubber-band belongs to the content, not the header.
   Keep the root stationary; use a single momentum-scrolling surface inside the shell.
   Do not alter normal Safari login scrolling, modal focus or desktop layout. */
@media (max-width: 840px) {
  html, body {
    overscroll-behavior-y: none;
  }
  #app-shell {
    height: 100dvh;
    min-height: 0;
    overflow-y: clip;
    overscroll-behavior-y: none;
  }
  #app-shell .main-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  /* Outside the scroll surface: the header remains in place during the bounce. */
  #app-shell .topbar {
    flex: 0 0 auto;
  }
  /* Native WebKit momentum + elastic edges, without dragging the document. */
  #app-shell .content {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  /* Independent scroll surfaces do not chain touch gestures to the main view. */
  .sidebar, .modal, .notification-list, .gc-month-sheet-dialog {
    overscroll-behavior-y: contain;
  }
}
