/* ТЗ 3.11: длинная переписка NG Couch прокручивается внутри окна чата,
   а нижняя навигация (Главная, Питание…) всегда видна.
   Файл подключается последним и перекрывает прежние правила «всё в потоке»
   из coach-redesign / hosted-screen-fixes / responsive-repair. */
html body #mainApp:has(#coachPage) .bottom-nav {
  position: fixed !important;
  inset: auto auto max(10px, env(safe-area-inset-bottom)) 50% !important;
  transform: translateX(-50%) !important;
  width: min(740px, calc(100% - 20px)) !important;
  margin: 0 !important;
  z-index: 60 !important;
}
html body #mainApp #screenContent:has(#coachPage) .coach-page {
  padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
}
html body #mainApp #screenContent:has(#coachPage) .coach-chat-panel {
  min-height: 0 !important;
}
html body #mainApp #screenContent:has(#coachPage) #chatMessages {
  min-height: 260px !important;
  max-height: min(62vh, 640px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  scrollbar-width: thin !important;
}
html body #mainApp #screenContent:has(#coachPage) .coach-composer-wrap {
  scroll-margin-bottom: 110px;
}
