/* Keep each desktop pane inside the viewport and make its body independently scrollable. */
@media (min-width: 641px) {
  .app-shell > .rail,
  .app-shell > .thread-list,
  .app-shell > .conversation,
  .app-shell > .assistant {
    min-height: 0;
    height: 100%;
  }

  .thread-scroll,
  .message-scroll,
  .assistant-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 640px) {
  .thread-list {
    min-height: 0;
  }

  .thread-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .message-scroll {
    overflow: visible;
  }
}
