/* iPhone / browser build: the bottom bar stays put.
   Root cause of the bar "scrolling up with the content": the whole document was the scroll container, so on iOS
   (Safari, the home-screen app and the WKWebView) rubber-banding, the keyboard panning the page and the toolbar
   resizing all move the document, and position:fixed bars ride along with it.
   Fix: the page itself never scrolls (html/body fixed, overflow hidden, no overscroll). The content (main.app) is
   the only scroll container, the nav / fab / composer / sheets are fixed to the viewport outside of it.
   Only when web-native.js sets html.pinned (iPhone, browser); the Android WebView keeps its own layout. */
html.pinned, html.pinned body {
  position: fixed; inset: 0; width: 100%; height: 100%; margin: 0;
  overflow: hidden; overscroll-behavior: none;
}
html.pinned #root { height: 100%; }
html.pinned main.app {
  position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto;
  min-height: 0; box-sizing: border-box;
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
}
/* the nav and the composer: never part of the scrolling content */
html.pinned .nav, html.pinned .composer { position: fixed; bottom: 0; transform: translateZ(0); }
/* the "how to bring WhatsApp messages in" answer has line breaks */
html.pinned .msg.guide .ai-row p { white-space: pre-line; }
/* the chat scrolls to its end: leave room for the composer that is fixed over the bottom */
html.pinned .chat-log > div:last-child { scroll-margin-bottom: calc(var(--safe-b) + 8.5rem); }
