
/* 顶栏视觉层级：主标题最大；路线与功能按钮明显放大，但始终低于主标题。 */
#app:not(.is-map-focus) .commandbar,
#app:not(.is-map-focus) .commandbar.v76-fit,
#app:not(.is-map-focus) .commandbar.v76-stack,
html.force-css-landscape #app:not(.is-map-focus) .commandbar {
  display: grid !important;
  grid-template-columns: minmax(242px, 30%) minmax(0, 1fr) max-content !important;
  grid-template-rows: 48px !important;
  min-height: 56px !important;
  height: 56px !important;
  column-gap: 5px !important;
  row-gap: 0 !important;
  padding: 4px 8px 4px 10px !important;
  align-items: center !important;
}
#app:not(.is-map-focus) .commandbar .brand-lockup,
#app:not(.is-map-focus) .commandbar.v76-stack .brand-lockup {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  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 > div:last-child {
  min-width: 0 !important;
  overflow: hidden !important;
}
#app:not(.is-map-focus) .commandbar .brand-lockup h1,
#app:not(.is-map-focus) .commandbar.v76-fit .brand-lockup h1,
#app:not(.is-map-focus) .commandbar.v76-stack .brand-lockup h1 {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 24px !important;
  line-height: 1.05 !important;
  font-weight: 720 !important;
  letter-spacing: .025em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
#app:not(.is-map-focus) .commandbar .route-switch,
#app:not(.is-map-focus) .commandbar.v76-stack .route-switch {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 38px !important;
  padding: 1px !important;
  margin: 0 !important;
  display: flex !important;
  overflow: hidden !important;
}
#app:not(.is-map-focus) .commandbar .route-tab,
#app:not(.is-map-focus) .commandbar.v76-fit .route-tab,
#app:not(.is-map-focus) .commandbar.v76-stack .route-tab,
#app:not(.is-map-focus) .commandbar #route-toggle {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: 36px !important;
  padding: 0 4px !important;
  gap: 3px !important;
  justify-content: center !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 630 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
#app:not(.is-map-focus) .commandbar .route-tab i {
  flex: 0 0 auto !important;
  width: 5px !important;
  height: 5px !important;
}
#app:not(.is-map-focus) .commandbar .commandbar__actions,
#app:not(.is-map-focus) .commandbar.v76-stack .commandbar__actions {
  grid-column: 3 !important;
  grid-row: 1 !important;
  min-width: max-content !important;
  max-width: max-content !important;
  gap: 4px !important;
  align-items: center !important;
}
#app:not(.is-map-focus) .commandbar .primary-button,
#app:not(.is-map-focus) .commandbar .commandbar__actions button {
  height: 38px !important;
  padding-left: 9px !important;
  padding-right: 9px !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}
#app:not(.is-map-focus) .commandbar .icon-button {
  width: 38px !important;
  min-width: 38px !important;
  padding: 0 !important;
}
/* 常见较窄手机仍保持单行：只轻微缩小次级文字，主标题仍明显最大。 */
@media (max-width: 880px), (max-height: 520px) {
  #app:not(.is-map-focus) .commandbar,
  #app:not(.is-map-focus) .commandbar.v76-fit,
  #app:not(.is-map-focus) .commandbar.v76-stack {
    grid-template-columns: minmax(220px, 28%) minmax(0, 1fr) max-content !important;
    column-gap: 3px !important;
    padding-left: 7px !important;
    padding-right: 6px !important;
  }
  #app:not(.is-map-focus) .commandbar .brand-lockup h1 { font-size: 22px !important; }
  #app:not(.is-map-focus) .commandbar .route-tab,
  #app:not(.is-map-focus) .commandbar #route-toggle,
  #app:not(.is-map-focus) .commandbar .primary-button,
  #app:not(.is-map-focus) .commandbar .commandbar__actions button { font-size: 14px !important; }
  #app:not(.is-map-focus) .commandbar .route-tab { padding-left: 2px !important; padding-right: 2px !important; gap: 2px !important; }
  #app:not(.is-map-focus) .commandbar .primary-button,
  #app:not(.is-map-focus) .commandbar .commandbar__actions button { padding-left: 6px !important; padding-right: 6px !important; }
}
