/* Korovka v80: synchronized sticky current-stop and route controls.
   Both stay visible; controls never cover the current stop.
   No React-owned nodes are moved or recreated. */
@media (max-width:760px) {
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .current-stop:not(.current-stop-map) {
    position:sticky!important;
    top:env(safe-area-inset-top,0px)!important;
    z-index:35!important;
    margin-bottom:0!important;
    border-radius:12px 12px 0 0!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools {
    position:sticky!important;
    top:calc(env(safe-area-inset-top,0px) + var(--k80-stop-height,0px))!important;
    z-index:34!important;
    margin-top:0!important;
    margin-bottom:0!important;
    border-top:0!important;
    border-radius:0 0 12px 12px!important;
    background:#fff!important;
    box-shadow:0 4px 8px rgba(25,51,89,.09)!important;
    padding:6px 8px 7px!important;
    display:grid!important;
    grid-template-columns:minmax(0,auto) minmax(0,1fr)!important;
    column-gap:5px!important;
    row-gap:5px!important;
    align-items:center!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .overview-tool-top {
    grid-column:1/-1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:6px!important;
    min-width:0!important;
    margin:0!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .route-bulk-entry {
    grid-column:1!important;
    grid-row:2!important;
    margin:0!important;
    padding:0!important;
    min-width:0!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .route-bulk-entry > button {
    height:32px!important;
    min-height:32px!important;
    width:auto!important;
    padding:4px 7px!important;
    font-size:11px!important;
    line-height:1.12!important;
    white-space:nowrap!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .overview-jump-buttons {
    grid-column:2!important;
    grid-row:2!important;
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:4px!important;
    min-width:0!important;
    margin:0!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .overview-jump-buttons > button:not(.overview-collapse-all) {
    flex:0 0 auto!important;
    height:32px!important;
    min-height:32px!important;
    width:auto!important;
    padding:4px 7px!important;
    font-size:11px!important;
    line-height:1.15!important;
    margin:0!important;
    white-space:nowrap!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .overview-jump-buttons > .overview-collapse-all {
    /* Extra compact-mode command remains accessible if it needs to wrap. */
    max-width:100%!important;
    font-size:10px!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-list-surface [data-point-id],
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .overview-point {
    scroll-margin-top:calc(env(safe-area-inset-top,0px) + var(--k80-route-anchor,165px))!important;
  }
  /* Bulk selection mode adds controls dynamically: allow a full-width row instead of clipping them. */
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools:has(.route-bulk-toolbar) > .route-bulk-toolbar {
    grid-column:1/-1!important;
    width:100%!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .bulk-jumps-hidden {
    display:none!important;
  }
}
@media (max-width:355px) {
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools {
    column-gap:3px!important;
    padding-left:5px!important;
    padding-right:5px!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .route-bulk-entry > button {
    font-size:10px!important;
    padding:4px 5px!important;
  }
  body:not(.k67-mode):not(.k67-fridge-mode):not(.k68-goods-mode):not(.k71-map-view) .route-overview-tools .overview-jump-buttons > button:not(.overview-collapse-all) {
    font-size:10px!important;
    padding:4px 5px!important;
  }
}
