/* GX Tracking History Mobile 0.10.39 — list follow + compact timeline.
   Deliberately scoped to mobile; preserve dark/light themes and Leaflet.
*/
@media (max-width:850px){
  /* The controls were reduced in v0.10.38, but their original layout left
     unused vertical spacing. Keep ~20px between play circles and timeline. */
  html body.tracking-dashboard #historyPanel #historyPlayback{
    padding:0!important;gap:0!important;min-height:0!important;
  }
  html body.tracking-dashboard #historyPanel #historyPlayback .history-playback-buttons{
    padding-top:0!important;padding-bottom:0!important;
    margin-bottom:0!important;min-height:55px!important;
  }
  html body.tracking-dashboard #historyPanel .gx-history-timeline-v01037{
    margin-top:12px!important;margin-bottom:8px!important;
    padding-top:0!important;padding-bottom:0!important;
  }
  html body.tracking-dashboard #historyPanel .history-list-section{
    margin-top:4px!important;
  }
  /* The list scrolls without moving the playback controls or taking over
     the whole bottom sheet. Max-height is responsive to available space. */
  html body.tracking-dashboard #historyPanel #historyPositionList{
    display:flex!important;flex-direction:column!important;
    max-height:clamp(180px,38dvh,440px)!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:thin;
    scrollbar-color:rgba(86,133,168,.65) transparent;
    scroll-behavior:auto!important;
    scroll-padding-top:8px!important;
    touch-action:pan-y!important;
    contain:layout style!important;
  }
  html body.tracking-dashboard #historyPanel #historyPositionList .gx-history-card-v01037{
    flex:0 0 auto!important;
  }
}
