
/* 1) 无论 v76 脚本判定 fit/stack，都强制顶栏保持与本地版一致的一行结构。 */
#app:not(.is-map-focus) .commandbar,
#app:not(.is-map-focus) .commandbar.v76-fit,
#app:not(.is-map-focus) .commandbar.v76-stack {
  display: grid !important;
  grid-template-columns: minmax(190px, 25vw) minmax(0, 1fr) max-content !important;
  grid-template-rows: 44px !important;
  min-height: 52px !important;
  height: 52px !important;
  row-gap: 0 !important;
  column-gap: 5px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !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;
  max-width: 100% !important;
  overflow: hidden !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;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 36px !important;
  display: flex !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 2px !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;
  align-self: center !important;
}
#app:not(.is-map-focus) .commandbar .route-tab,
#app:not(.is-map-focus) .commandbar.v76-stack .route-tab {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: 32px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  gap: 2px !important;
  justify-content: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  font-size: clamp(9px, 1.25vw, 12.5px) !important;
}
#app:not(.is-map-focus) .commandbar .brand-lockup h1 {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  font-size: clamp(16px, 2.05vw, 22px) !important;
  line-height: 1.08 !important;
}

/* 2) 节点档案固定为“头部 + 可滚动正文 + 底部按钮”的三段式结构。 */
#node-detail.node-detail {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
}
#node-detail .node-detail__header,
#node-detail .node-detail__actions {
  flex: 0 0 auto !important;
}
#node-detail .node-detail__scroll {
  position: relative !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  pointer-events: auto !important;
}
#node-detail .node-detail__copy-wrap,
#node-detail.is-copy-expanded .node-detail__copy-wrap,
#node-detail.mobile-history-card .node-detail__copy-wrap,
#node-detail.mobile-history-card.is-copy-expanded .node-detail__copy-wrap {
  max-height: none !important;
  overflow: visible !important;
}
#node-detail .node-detail__copy-wrap::after { display: none !important; }
#node-detail .detail-copy-toggle,
#node-detail .detail-copy-toggle.is-visible { display: none !important; }
