
/* V74 — OPPO/ColorOS 顶栏硬隔离修复。
   不再依赖 orientation + 840px 的窄条件；直接给品牌区独立网格列，
   并禁止标题越界进入路线栏。仅影响顶栏排版。 */
#app:not(.is-map-focus) .commandbar {
  grid-template-columns: minmax(230px, 27vw) minmax(0, 1fr) max-content !important;
  grid-template-rows: minmax(44px, auto) !important;
  column-gap: 8px !important;
}
#app:not(.is-map-focus) .commandbar .brand-lockup {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 2 !important;
}
#app:not(.is-map-focus) .commandbar .brand-lockup > div:last-child {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
#app:not(.is-map-focus) .commandbar .brand-lockup h1 {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  font-size: clamp(16px, 2.05vw, 23px) !important;
  line-height: 1.12 !important;
  letter-spacing: .02em !important;
}
#app:not(.is-map-focus) .commandbar .route-switch {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
}
#app:not(.is-map-focus) .commandbar .route-tab {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
  gap: 3px !important;
  justify-content: center !important;
  white-space: nowrap !important;
  font-size: clamp(10px, 1.28vw, 13px) !important;
}
#app:not(.is-map-focus) .commandbar .commandbar__actions {
  grid-column: 3 !important;
  grid-row: 1 !important;
  min-width: max-content !important;
  position: relative !important;
  z-index: 2 !important;
}

/* 常见手机横屏逻辑宽度（包括 OPPO/ColorOS 浏览器）进一步收紧品牌列，
   仍完整保留“万水千山只等闲”，路线栏与按钮互不覆盖。 */
@media (max-width: 1100px), (max-height: 560px) {
  #app:not(.is-map-focus) .commandbar {
    grid-template-columns: minmax(205px, 25vw) minmax(0, 1fr) max-content !important;
    column-gap: 6px !important;
  }
  #app:not(.is-map-focus) .commandbar .brand-lockup { gap: 7px !important; }
  #app:not(.is-map-focus) .commandbar .brand-star {
    width: 34px !important;
    height: 34px !important;
  }
  #app:not(.is-map-focus) .commandbar .brand-lockup h1 {
    font-size: clamp(15px, 2.15vw, 21px) !important;
    letter-spacing: 0 !important;
  }
  #app:not(.is-map-focus) .commandbar .route-tab {
    font-size: clamp(9.5px, 1.35vw, 12px) !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    gap: 2px !important;
  }
}
