/* route.html 带路页 — CLIENT_UI_DESIGN_SYSTEM_V1 视觉统一（仅 body.route-page 覆盖） */

body.route-page {
  --gwm-brand: #A64D79;
  --gwm-brand-highlight: #D86CA0;
  --gwm-glass-dark-bg: rgba(31, 33, 38, 0.62);
  --gwm-glass-light-bg: rgba(255, 255, 255, 0.16);
  --gwm-glass-blur: 24px;
  --gwm-glass-border: rgba(255, 255, 255, 0.10);
  --gwm-active-gradient: linear-gradient(135deg, rgba(166, 77, 121, 0.82), rgba(216, 108, 160, 0.48));
  --gwm-active-border: rgba(216, 108, 160, 0.75);
  --gwm-active-glow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 22px rgba(166, 77, 121, 0.24), 0 0 24px rgba(216, 108, 160, 0.16);
  --gwm-func-green: #37C871;
  --gwm-func-yellow: #F2C94C;
  --gwm-func-orange: #FF9E44;
  --gwm-func-red: #FF4D5A;
  --route-nav-h: var(--gwm-tab-bar-h);
  --route-nav-gap: 7px;
  --route-drawer-handle-bottom: calc(var(--route-nav-h) + var(--route-nav-gap));
  --route-toast-bottom: calc(var(--route-drawer-handle-bottom) + 40px + 1em);
  --route-transition-fast: 180ms ease-out;
  /* V1.3 统一梅红视觉语言 */
  --route-plum-border: rgba(166, 77, 121, 0.75);
  --route-plum-glow: 0 0 16px rgba(166, 77, 121, 0.22);
  --route-weather-gradient: linear-gradient(135deg, rgba(166, 77, 121, 0.32), rgba(95, 130, 180, 0.28));
  --route-glass-light: rgba(255, 255, 255, 0.16);
  --route-glass-dark: rgba(31, 33, 38, 0.58);
  --route-glass-blur: 22px;
  --route-plum-text: #D86CA0;
  /* 场景类型主题色（地图 / 剖面刻度 / 抽屉共用） */
  --scene-terrain: #3DCC6F;
  --scene-manual: #2F6BFF;
  --scene-place: #2F6BFF;
  --scene-surface: #FF9E44;
  --scene-culture: #FF9E44;
  --scene-theme: #A64D79;
  --scene-selected: var(--gwm-active-border);
  --route-track-default: rgba(216, 108, 160, 0.95);
  /* 天气栏 / 抽屉把手栏 — 单层毛玻璃，与底部导航一致 */
  --route-strip-bg: rgba(31, 33, 38, 0.76);
  --route-strip-blur: 24px;
  --route-strip-radius: 12px;
  --route-strip-border: 1px solid rgba(255, 255, 255, 0.10);
  --route-strip-min-h: 34px;
  --route-strip-px: 12px;
  --route-strip-pt: 5px;
  --route-strip-pb: 7px;
  --route-wx-strip-min-h: 36px;
  --route-wx-strip-pt: 6px;
  --route-wx-strip-pb: 8px;
  --route-handle-w: 102px;
  /* 地图可用区（扣除底部 Tab）；svh 上限防止 Chrome 底栏挤出内容 */
  --route-map-h: calc(100% - var(--route-nav-h));
  --route-map-h-cap: calc(100% - var(--route-nav-h));
  --route-elev-panel-h: 28%;
  --route-drawer-h-tall: calc(100% - var(--route-elev-panel-h));
  --route-drawer-h-small: min(36%, 310px);
  --route-weather-total-h: var(--route-wx-strip-min-h);
}

/* §五 页面壳 */
html:has(body.route-page),
body.route-page {
  background: #1F2126 !important;
  width: 100%;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.route-page {
  position: fixed;
  inset: 0;
}

body.route-page .page {
  background: transparent !important;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.route-page .map-wrapper {
  background: transparent !important;
  flex: 0 0 auto !important;
  height: var(--route-map-h) !important;
  max-height: var(--route-map-h-cap) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.route-page #map,
body.route-page #map .leaflet-container,
body.route-page .gwm-map-rotator {
  background: #e4e7d6 !important;
}
body.route-page #gwm3dSat,
body.route-page #gwm3dSat .maplibregl-map {
  background: #d5dcc8 !important;
}
body.route-page #map {
  filter: none !important;
  height: 100%;
  touch-action: none;
  overscroll-behavior: contain;
}
body.route-page #gwm3dSat {
  position: absolute;
  inset: 0;
  z-index: 780;
  display: none;
  pointer-events: auto;
}
body.route-page #gwm3dSat.is-on {
  display: block;
  width: 100%;
  height: 100%;
}
body.route-page #gwm3dSat .maplibregl-ctrl-attrib,
body.route-page #gwm3dSat .maplibregl-ctrl-bottom-right,
body.route-page #gwm3dSat .maplibregl-ctrl-bottom-left {
  display: none !important;
}
body.route-page #btn3dLab {
  display: none !important;
}

body.route-page .map-tools-top {
  top: 12px !important;
  bottom: auto !important;
  z-index: 2600 !important;
}

body.route-page .map-tools-mid {
  top: auto !important;
  bottom: calc(var(--route-drawer-h-small) + 12px) !important;
  z-index: 860 !important;
}

body.route-page .map-tools-bottom {
  right: 12px !important;
  bottom: 52px !important;
  z-index: 880 !important;
  pointer-events: auto !important;
}
body.route-page .map-tools-bottom .tool-round,
body.route-page .map-tools-bottom .tool-btn {
  pointer-events: auto !important;
}

/* §七 地图控件 — 深色毛玻璃圆钮；默认白轮廓图标，激活仅图标玫色 */
body.route-page .tool-btn,
body.route-page .tool-round {
  background: rgba(31, 33, 38, 0.62) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.route-page .tool-btn:active,
body.route-page .tool-round:active {
  transform: scale(0.96);
  background: rgba(68, 72, 80, 0.92) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 0 16px rgba(255, 255, 255, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.28) !important;
}

body.route-page .tool-btn.active,
body.route-page .tool-round.active,
body.route-page #btnLayerToggle.active,
body.route-page #btnNodeToggle.active,
body.route-page #btnNorth.active {
  background: rgba(31, 33, 38, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: rgba(216, 108, 160, 1) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
  font-weight: 500;
}

/* 右下操作钮：仅点按瞬间玫色，非持久切换态 */
body.route-page .tool-round.map-tool-pressed {
  color: rgba(216, 108, 160, 1) !important;
}

body.route-page .tool-round svg,
body.route-page .tool-btn svg {
  stroke: currentColor !important;
}

body.route-page .tool-round svg polygon {
  fill: currentColor !important;
  stroke: currentColor !important;
}

body.route-page .tool-round svg path,
body.route-page .tool-btn svg path {
  fill: currentColor;
}
body.route-page #btnTripReport.tool-round svg path,
body.route-page #btnTripReport .trip-bell-svg path {
  fill: none !important;
  stroke: currentColor !important;
}

body.route-page .tool-round svg [fill="none"],
body.route-page .tool-btn svg [fill="none"] {
  fill: none !important;
}

body.route-page #btnNodeToggle.active .icon-layerstack .layer {
  background: rgba(216, 108, 160, 1) !important;
}

body.route-page .icon-layerstack .layer {
  background: rgba(255, 255, 255, 0.92) !important;
}

body.route-page #btnNorth .compass-icon,
body.route-page #btnNorth .compass-icon-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

body.route-page #btnNorth .compass-icon-inner {
  transition: transform 0.15s ease;
  transform-origin: 50% 50%;
}

body.route-page #btnNorth svg,
body.route-page #btnLayerToggle svg,
body.route-page #btnNodeToggle svg {
  pointer-events: none;
  color: inherit;
}

body.route-page #btnNorth.active svg,
body.route-page #btnLayerToggle.active svg {
  color: rgba(216, 108, 160, 1);
}

body.route-page .gwm-compass-probe {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 805;
  width: 0;
  height: 0;
  pointer-events: none;
}
body.route-page .gwm-compass-inner {
  position: relative;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.route-page .gwm-compass-rose {
  width: 132px;
  height: 132px;
  position: relative;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.32));
}
body.route-page .gwm-compass-rose svg {
  width: 132px;
  height: 132px;
  display: block;
}
body.route-page .gwm-compass-aim {
  position: absolute;
  left: 50%;
  top: 66px;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -18px;
  pointer-events: auto;
  touch-action: none;
  z-index: 2;
}
body.route-page .gwm-compass-aim svg {
  width: 36px;
  height: 36px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
body.route-page .gwm-map-rotator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: auto;
}
body.route-page .gwm-compass-meta {
  margin-top: 6px;
  min-width: 0;
  width: max-content;
  max-width: 160px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(31, 33, 38, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
body.route-page .gwm-compass-meta strong {
  color: #ffd0e6;
  font-weight: 700;
}

body.route-page .gwm-map-scale {
  position: absolute;
  left: 12px;
  bottom: 48px;
  z-index: 800;
  pointer-events: none;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
body.route-page .gwm-map-scale-bar {
  height: 7px;
  margin-top: 3px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}
body.route-page .gwm-map-source-tip {
  margin-top: 4px;
  max-width: 9em;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  user-select: none;
  opacity: 1;
  transition: opacity 0.28s ease;
}
body.route-page .gwm-map-source-tip.is-fading {
  opacity: 0;
}
body.route-page.route-drawer-open .gwm-map-scale {
  bottom: calc(var(--route-drawer-h-small) + 10px);
}
body.route-page.route-drawer-open:has(#sceneDrawerPanel.drawer-tall) .gwm-map-scale {
  display: none;
}

body.route-page #btnOfflineDownload {
  border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
}
body.route-page #btnOfflineDownload.downloading {
  opacity: 0.95 !important;
  color: rgba(216, 108, 160, 1) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
}
body.route-page #btnOfflineDownload.is-active,
body.route-page #btnOfflineDownload:active {
  opacity: 0.95 !important;
  color: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
}
body.route-page #btnOfflineDownload.needs-download {
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

/* 镂空铃铛：全局 tool-round path 会填实，这里强制只描边 */
body.route-page #btnTripReport .trip-clock-icon svg,
body.route-page #btnTripReport .trip-clock-icon svg path,
body.route-page #btnTripReport .trip-bell-svg,
body.route-page #btnTripReport .trip-bell-svg path {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.85 !important;
}
body.route-page #btnTripReport.has-countdown .trip-clock-icon {
  opacity: 1 !important;
}
body.route-page #btnTripReport.has-countdown .trip-countdown-label {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  display: block !important;
  min-width: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.96) !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  z-index: 2;
  text-align: center;
  margin-top: 1px;
}

@media (min-width: 769px) {
  body.route-page .page {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

/* §八 stats-card / 剖面图 — 保留 route.html 原始结构与样式 */
body.route-page .stats-card {
  z-index: 800 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
}

body.route-page .stats-card-line {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
}

body.route-page #weatherSnapshotStatus,
body.route-page #weatherSnapshotStatus[hidden] {
  display: none !important;
}

/* 剖面打开时拿掉白底里程卡。visibility:hidden 仍会被毛玻璃采样，留下白色遗影。 */
body.route-page.route-elev-open .stats-card {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.route-page .stats-card strong {
  color: rgba(216, 108, 160, 0.96) !important;
}

body.route-page .elev-tooltip {
  color: rgba(216, 108, 160, 0.96) !important;
  box-shadow: 0 2px 6px rgba(216, 108, 160, 0.28) !important;
  pointer-events: auto !important;
  z-index: 6 !important;
  cursor: grab !important;
}

body.route-page .elev-tooltip-value {
  color: rgba(216, 108, 160, 1) !important;
}

/* §九 路线标题浮层 */
body.route-page .route-title-overlay {
  background: rgba(31, 33, 38, 0.62) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24) !important;
}

body.route-page .route-title-overlay h1 {
  color: #FFFFFF !important;
}

body.route-page .route-title-overlay small {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 剖面：贴地图顶，高度约 28%；只压缩容器，不减内容 */
body.route-page .elev-panel {
  top: 0 !important;
  bottom: auto !important;
  height: var(--route-elev-panel-h) !important;
  max-height: var(--route-elev-panel-h) !important;
  min-height: var(--route-elev-panel-h) !important;
  padding: 0 !important;
  padding-bottom: var(--route-weather-total-h) !important;
  box-sizing: border-box !important;
  display: none !important;
  flex-direction: column !important;
  overflow: hidden !important;
  transition: box-shadow 0.28s ease, border-radius 0.28s ease;
}

body.route-page .elev-panel.elev-panel--open {
  display: flex !important;
  z-index: 880 !important;
}

body.route-page .elev-panel-header {
  flex: 0 0 auto !important;
  margin: 2px 10px 0 !important;
}

body.route-page #elevCanvas {
  display: block !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* P1 · 全开贴合：高度连续过渡，取消磁吸跳位 */
body.route-page.route-timeline-linked .elev-panel {
  border-radius: 0 0 14px 14px !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16) !important;
  margin-bottom: 0;
}

body.route-page.route-timeline-linked #sceneDrawerPanel.scene-drawer-panel.open {
  margin-top: 0;
  border-top-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow:
    0 -6px 18px rgba(0, 0, 0, 0.18),
    0 -1px 0 rgba(255, 255, 255, 0.12) !important;
}

body.route-page.timeline-magnetic-docking.route-timeline-linked .elev-panel,
body.route-page.timeline-magnetic-docking.route-timeline-linked #sceneDrawerPanel.scene-drawer-panel.open {
  animation: none;
}

@keyframes routeTimelineSnap {
  0%   { filter: brightness(0.96); }
  55%  { filter: brightness(1.04); }
  100% { filter: none; }
}

body.route-page #sceneDrawerPanel.timeline-snap-bounce.open {
  animation: routeTimelineSnap 340ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* §十 天气栏 — 高度 +1/5，文字垂直居中，底边贴合无重叠 */
body.route-page .elev-weather-text {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  touch-action: pan-y !important;
  pointer-events: auto !important;
  padding: var(--route-wx-strip-pt) var(--route-strip-px) var(--route-wx-strip-pb) !important;
  min-height: var(--route-wx-strip-min-h) !important;
  height: var(--route-wx-strip-min-h) !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  font-size: clamp(10px, 3vw, 11px) !important;
  transform: none !important;
  background: var(--route-strip-bg) !important;
  backdrop-filter: blur(var(--route-strip-blur));
  -webkit-backdrop-filter: blur(var(--route-strip-blur));
  border: none !important;
  border-radius: 0 0 var(--route-strip-radius) var(--route-strip-radius) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.route-page.route-elev-open #sceneDrawerPanel.scene-drawer-panel.open.drawer-tall ~ .elev-panel .elev-weather-text,
body.route-page.route-timeline-linked .elev-weather-text {
  border-radius: 0 !important;
}

/* WeatherEngine V1 — 剖面天气栏上沿时间刻度（距离比例，4 点分散） */
body.route-page .elev-wx-ticks {
  position: absolute !important;
  left: 12px !important;
  right: 12px !important;
  bottom: calc(var(--route-weather-total-h) + 7px) !important;
  height: 14px !important;
  z-index: 1000 !important;
  pointer-events: none !important;
}

body.route-page .elev-wx-tick {
  position: absolute !important;
  top: 0 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1px !important;
  color: #ffffff !important;
  font-size: 9px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  opacity: 0.82 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

body.route-page .elev-wx-tick.is-start {
  transform: translateX(0) !important;
  align-items: flex-start !important;
}

body.route-page .elev-wx-tick.is-end {
  transform: translateX(-100%) !important;
  align-items: flex-end !important;
}

body.route-page .elev-wx-tick-mark {
  display: block !important;
  width: 1px !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

body.route-page .elev-wx-tick-label {
  color: #ffffff !important;
  font-size: 9px !important;
  font-weight: 400 !important;
}

body.route-page .elev-wx-tick.is-active {
  opacity: 1 !important;
}

body.route-page .elev-wx-tick.is-active .elev-wx-tick-mark {
  width: 2px !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* 动态天气区段极淡分界（叠在天气栏内） */
body.route-page .elev-wx-seg-marks {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: var(--route-weather-total-h) !important;
  z-index: 998 !important;
  pointer-events: none !important;
}

body.route-page .elev-node-ticks {
  display: none !important;
}

body.route-page .elev-node-tick {
  position: absolute !important;
  bottom: 0 !important;
  width: 1px !important;
  height: 3px !important;
  transform: translateX(-50%) !important;
  border-radius: 0.5px;
  opacity: 0.88;
}

body.route-page .elev-node-tick.is-terrain {
  background: #FF6B45 !important;
}

body.route-page .elev-node-tick.is-manual {
  background: #22B8D6 !important;
}

body.route-page .elev-node-tick.is-weather {
  background: #f5d76e !important;
}

body.route-page .elev-node-tick.is-selected {
  width: 2px !important;
  height: 5px !important;
  opacity: 1;
}

body.route-page .elev-wx-seg-mark {
  position: absolute !important;
  top: 4px !important;
  bottom: 4px !important;
  width: 1px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  transform: translateX(-50%) !important;
}

/* §十一 场景抽屉 — 地图区内百分比高度，底边贴地图底（已在 Tab 上方） */
body.route-page #sceneDrawerPanel.scene-drawer-panel {
  bottom: 0 !important;
  z-index: 850 !important;
  height: var(--route-drawer-h-small) !important;
  max-height: 310px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(var(--route-glass-blur)) !important;
  -webkit-backdrop-filter: blur(var(--route-glass-blur)) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-bottom: none !important;
  border-radius: var(--route-strip-radius) var(--route-strip-radius) 0 0 !important;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.16) !important;
}

body.route-page #sceneDrawerPanel.scene-drawer-panel.drawer-tall {
  height: var(--route-drawer-h-tall) !important;
  max-height: none !important;
  z-index: 870 !important;
}

body.route-page.route-elev-open #sceneDrawerPanel.scene-drawer-panel.open.drawer-tall {
  height: var(--route-drawer-h-tall) !important;
  max-height: none !important;
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
}

body.route-page.route-elev-open #sceneDrawerPanel.scene-drawer-panel.open.drawer-tall .scene-drawer-header {
  border-radius: 14px 14px 0 0 !important;
}

body.route-page #sceneDrawerPanel .scene-drawer-header {
  background: var(--route-strip-bg) !important;
  backdrop-filter: blur(var(--route-strip-blur)) !important;
  -webkit-backdrop-filter: blur(var(--route-strip-blur)) !important;
  min-height: var(--route-strip-min-h) !important;
  padding: var(--route-strip-pt) var(--route-strip-px) !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  border: none !important;
  border-bottom: var(--route-strip-border) !important;
  border-radius: var(--route-strip-radius) var(--route-strip-radius) 0 0 !important;
  box-shadow: none !important;
  color: #FFFFFF !important;
}

body.route-page #sceneDrawerPanel .scene-drawer-header-left {
  color: #FFFFFF !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

body.route-page #sceneDrawerPanel .scene-drawer-header-right {
  color: #FFFFFF !important;
  text-align: right !important;
  justify-content: flex-end !important;
  padding-right: 2px !important;
  font-variant-numeric: tabular-nums;
}

body.route-page #sceneDrawerPanel .drawer-inner,
body.route-page #sceneDrawerPanel .legacy-drawer-inner,
body.route-page #sceneDrawerPanel #dynamicDrawerContent,
body.route-page #sceneDrawerPanel .scene-flow {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.route-page #sceneDrawerPanel .scene-drawer-header-button {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  width: var(--route-handle-w) !important;
  min-width: var(--route-handle-w) !important;
  height: 28px !important;
  position: relative;
}

body.route-page #sceneDrawerPanel .scene-drawer-header-left,
body.route-page #sceneDrawerPanel .scene-drawer-header-right,
body.route-page #sceneDrawerPanel .scene-drawer-header-center {
  display: flex !important;
  align-items: center !important;
}

body.route-page #sceneDrawerPanel .scene-drawer-header-arrow,
body.route-page #sceneDrawerPanel .scene-drawer-header-button .scene-drawer-header-arrow {
  display: none !important;
}

body.route-page #sceneDrawerPanel .scene-drawer-header-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 6px;
  border-radius: 999px;
  background: rgba(220, 230, 245, 0.82);
}

/* §拉手（抽屉关闭）— 相对地图底，Tab 已由 map-wrapper 高度扣除 */
body.route-page .scene-drawer-handle {
  bottom: var(--route-nav-gap) !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.route-page .scene-drawer-handle .scene-drawer-button {
  width: var(--route-handle-w) !important;
  min-width: var(--route-handle-w) !important;
  height: 28px !important;
  background: var(--route-strip-bg) !important;
  backdrop-filter: blur(var(--route-strip-blur)) !important;
  -webkit-backdrop-filter: blur(var(--route-strip-blur)) !important;
  border: var(--route-strip-border) !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
  position: relative;
}

body.route-page .scene-drawer-handle .scene-drawer-arrow {
  display: none !important;
}

body.route-page .scene-drawer-handle .scene-drawer-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 6px;
  border-radius: 999px;
  background: rgba(220, 230, 245, 0.82);
}

body.route-page .scene-drawer-handle--active .scene-drawer-button,
body.route-page .scene-drawer-handle--has-selection .scene-drawer-button {
  background: var(--route-strip-bg) !important;
}

body.route-page .scene-drawer-handle--active .scene-drawer-button::before,
body.route-page .scene-drawer-handle--has-selection .scene-drawer-button::before {
  background: rgba(220, 230, 245, 0.92) !important;
}

/* §十二 场景行 — 左缘贴齐抽屉 + 全行 Timeline 光圈 */
body.route-page #sceneDrawerPanel #dynamicDrawerContent,
body.route-page #sceneDrawerPanel .drawer-inner,
body.route-page #sceneDrawerPanel .legacy-drawer-inner {
  overflow-x: visible !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 16px !important;
}

body.route-page #sceneDrawerPanel .scene-flow {
  padding: 0 !important;
  margin: 0 !important;
}

body.route-page #sceneDrawerPanel .scene-flow-table {
  padding: 0 !important;
  margin: 0 !important;
  gap: 6px !important;
  overflow: visible !important;
}

body.route-page #sceneDrawerPanel .scene-flow-table .scene-flow-row,
body.route-page #sceneDrawerPanel .scene-flow-row {
  position: relative;
  overflow: visible !important;
  background: rgba(31, 33, 38, 0.525) !important;
  background-image: none !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 12px 12px 12px 22px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  font-weight: 500;
}

body.route-page #sceneDrawerPanel .scene-flow-table .scene-flow-row:nth-child(even),
body.route-page #sceneDrawerPanel .scene-flow-table .scene-flow-row:nth-child(odd) {
  background: rgba(31, 33, 38, 0.525) !important;
  background-image: none !important;
}

/* 行走进度 current：仅进度条变化，不加玫红框 */
body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-current {
  background: rgba(31, 33, 38, 0.525) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  font-weight: 500;
}

/* 第一次选中：背景略加深，外框玫红，竖线不加粗 */
body.route-page #sceneDrawerPanel .scene-flow-table .scene-flow-row.scene-flow-row-selected,
body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected {
  background: rgba(18, 22, 28, 0.62) !important;
  background-image: none !important;
  border: 1.25px solid rgba(216, 108, 160, 0.88) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10) inset,
    0 0 14px rgba(216, 108, 160, 0.36),
    0 4px 12px rgba(140, 50, 100, 0.16) !important;
  outline: none !important;
  font-weight: 500;
  animation: sceneSelectedPulse 2.6s ease-in-out infinite;
}

@keyframes sceneSelectedPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 0 10px rgba(216, 108, 160, 0.24),
      0 4px 12px rgba(140, 50, 100, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.16) inset,
      0 0 20px rgba(216, 108, 160, 0.48),
      0 4px 14px rgba(140, 50, 100, 0.20);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected {
    animation: none;
  }
}

/* 每行 Timeline 光圈：默认熄灭（透明心 + 白圈） */
body.route-page #sceneDrawerPanel .scene-flow-row::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5.25px !important;
  height: 5.25px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 1.125px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: none !important;
  filter: none !important;
  z-index: 4;
  pointer-events: none;
}

/* Timeline 竖线：默认熄灭 */
body.route-page #sceneDrawerPanel .scene-flow-row::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.28) !important;
  border: none !important;
  pointer-events: none;
  z-index: 1;
}

body.route-page #sceneDrawerPanel .scene-flow-row:first-child::after {
  top: 50%;
}

body.route-page #sceneDrawerPanel .scene-flow-row:last-child::after {
  bottom: 50%;
}

/* 磁吸联动 / 地图 POI+剖面半联动：第二条位 timeline-lit 点亮 */
body.route-page.route-timeline-linked #sceneDrawerPanel .scene-flow-row.scene-flow-row-timeline-lit::before,
body.route-page.route-poi-elev-sync #sceneDrawerPanel .scene-flow-row.scene-flow-row-timeline-lit::before {
  background: #FFFFFF !important;
  border: 1.125px solid rgba(255, 255, 255, 0.98) !important;
  box-shadow:
    0 0 0 1.5px rgba(216, 108, 160, 0.50),
    0 0 6px rgba(216, 108, 160, 0.80),
    0 0 12px rgba(216, 108, 160, 0.60) !important;
  filter: drop-shadow(0 0 3.75px rgba(216, 108, 160, 0.70));
}

body.route-page.route-timeline-linked #sceneDrawerPanel .scene-flow-row.scene-flow-row-timeline-lit::after,
body.route-page.route-poi-elev-sync #sceneDrawerPanel .scene-flow-row.scene-flow-row-timeline-lit::after {
  background: linear-gradient(
    to bottom,
    rgba(216, 108, 160, 0.55) 0%,
    rgba(216, 108, 160, 0.28) 42%,
    rgba(255, 255, 255, 0.24) 100%
  ) !important;
}

/* 选中项：紫圈白点（与剖面焦点一致）+ 玫红到紫红竖线 */
body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected::before,
body.route-page.route-timeline-linked #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected::before,
body.route-page.route-poi-elev-sync #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected::before {
  background: #FFFFFF !important;
  border: 2px solid #C85A9A !important;
  box-shadow: 0 0 10px rgba(216, 108, 160, 0.7) !important;
  filter: none !important;
  width: 6px !important;
  height: 6px !important;
}

body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected::after,
body.route-page.route-timeline-linked #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected::after,
body.route-page.route-poi-elev-sync #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected::after {
  width: 3px !important;
  box-shadow: 0 0 10px rgba(216, 108, 160, 0.55) !important;
  filter: none !important;
  background: linear-gradient(
    to bottom,
    #E48BB8 0%,
    #D86CA0 42%,
    #8B3A88 100%
  ) !important;
}

@keyframes sceneRowConfirm {
  0%   { transform: scale(1); }
  45%  { transform: scale(0.985); }
  100% { transform: scale(1); }
}

body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-confirm {
  animation: sceneRowConfirm 160ms ease-out;
  transform-origin: center center;
}

/* 第二次点击：明显按下、背景变深灰，再进宝藏卡 */
@keyframes sceneRowActivate {
  0%   { transform: scale(1); }
  35%  { transform: scale(0.97); }
  100% { transform: scale(0.985); }
}

body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-activate,
body.route-page #sceneDrawerPanel .scene-flow-row.scene-flow-row-selected.scene-flow-row-activate {
  background: rgba(62, 66, 74, 0.94) !important;
  animation: sceneRowActivate 240ms ease-out !important;
  transform-origin: center center;
  transition: background 180ms ease, box-shadow 180ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 18px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(216, 108, 160, 0.42) !important;
}

body.route-page #sceneDrawerPanel .scene-flow-empty-dynamic {
  min-height: 120px;
  padding: 28px 16px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.04em;
}

body.route-page #sceneDrawerPanel #dynamicDrawerContent.drawer-pager {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  scroll-snap-type: none !important;
  touch-action: pan-y !important;
  transform: none !important;
  animation: none !important;
  padding-bottom: 0 !important;
}
body.route-page #sceneDrawerPanel #dynamicDrawerContent.drawer-pager .drawer-page {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
  overscroll-behavior-x: none !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  transform: translate3d(var(--swipe-x, 0px), 0, 0) !important;
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
  visibility: hidden !important;
  pointer-events: none !important;
}
body.route-page #sceneDrawerPanel #dynamicDrawerContent.drawer-pager.is-dragging .drawer-page {
  transition: none !important;
}
body.route-page #sceneDrawerPanel #dynamicDrawerContent.drawer-pager .drawer-page.is-active,
body.route-page #sceneDrawerPanel #dynamicDrawerContent.drawer-pager .drawer-page.is-swipe {
  visibility: visible !important;
}
body.route-page #sceneDrawerPanel #dynamicDrawerContent.drawer-pager .drawer-page.is-active {
  pointer-events: auto !important;
}
body.route-page #sceneDrawerPanel.scene-drawer-sliding #dynamicDrawerContent {
  overflow: hidden !important;
  transform: none !important;
}

@keyframes sceneDrawerOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-36%); opacity: 0; }
}
@keyframes sceneDrawerOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(36%); opacity: 0; }
}
@keyframes sceneDrawerInRight {
  from { transform: translateX(36%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes sceneDrawerInLeft {
  from { transform: translateX(-36%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

body.route-page #sceneDrawerPanel #dynamicDrawerContent.scene-drawer-slide-out-left,
body.route-page #sceneDrawerPanel #dynamicDrawerContent.scene-drawer-slide-out-right,
body.route-page #sceneDrawerPanel #dynamicDrawerContent.scene-drawer-slide-in-right,
body.route-page #sceneDrawerPanel #dynamicDrawerContent.scene-drawer-slide-in-left {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* 禁止 distance 列历史红三角，圆点已改到行级 ::before */
body.route-page #sceneDrawerPanel .scene-flow-cell-distance::before {
  display: none !important;
  content: none !important;
}

/* 防止 route.html 内联 overflow:hidden 裁切时间线元素 */
body.route-page #sceneDrawerPanel .scene-flow-cell,
body.route-page #sceneDrawerPanel .scene-flow-cell-distance {
  overflow: visible !important;
}

/* 场景行文字 — 全白体系 V1.3，绿色仅留给 km 标签 */
body.route-page #sceneDrawerPanel .scene-book-mark {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  vertical-align: -1px;
  color: rgba(255, 255, 255, 0.62);
  pointer-events: none;
}
body.route-page #sceneDrawerPanel .scene-book-mark svg {
  display: block;
  width: 11px;
  height: 11px;
}

body.route-page #sceneDrawerPanel .scene-flow-title,
body.route-page #sceneDrawerPanel .scene-flow-table .scene-flow-row.scene-flow-row-current .scene-flow-title,
body.route-page #sceneDrawerPanel .scene-flow-header,
body.route-page #sceneDrawerPanel .scene-flow-cell-main,
body.route-page #sceneDrawerPanel .scene-flow-sub-current,
body.route-page #sceneDrawerPanel .scene-flow-length-text-current {
  color: #FFFFFF !important;
  text-shadow: none !important;
}

body.route-page #sceneDrawerPanel .scene-flow-sub {
  color: #FFFFFF !important;
}

body.route-page #sceneDrawerPanel .scene-flow-sub-param,
body.route-page #sceneDrawerPanel .scene-flow-sub-bind,
body.route-page #sceneDrawerPanel .scene-flow-sub-bind.has-cards,
body.route-page #sceneDrawerPanel .scene-flow-sub-bind.no-cards,
body.route-page #sceneDrawerPanel .scene-flow-sub-param.scene-flow-sub-bind.has-cards,
body.route-page #sceneDrawerPanel .scene-flow-sub-param.scene-flow-sub-bind.no-cards,
body.route-page #sceneDrawerPanel .scene-flow-params,
body.route-page #sceneDrawerPanel .scene-flow-bar-label,
body.route-page #sceneDrawerPanel .scene-flow-length-text,
body.route-page #sceneDrawerPanel .scene-flow-metric-text,
body.route-page #sceneDrawerPanel .scene-flow-cell-bar,
body.route-page #sceneDrawerPanel .scene-flow-cell-bar *:not(.scene-flow-distance):not([class*="scene-flow-distance"]) {
  color: #FFFFFF !important;
}

body.route-page #sceneDrawerPanel .scene-flow-bar {
  background: rgba(255, 255, 255, 0.14) !important;
}

/* §十三 距离 / 风险功能色 */
body.route-page .scene-distance--green,
body.route-page .scene-flow-distance-green,
body.route-page #sceneDrawerPanel .scene-flow-distance,
body.route-page #sceneDrawerPanel .scene-flow-distance.scene-flow-distance-green {
  background: var(--gwm-func-green) !important;
  background-color: var(--gwm-func-green) !important;
  color: #FFFFFF !important;
}

/* 场景类型距离色块：按行节点类型上色，全部图层也能绿/蓝分开 */
body.route-page.route-scene-type-terrain .scene-flow-distance-type,
body.route-page.route-scene-type-terrain #sceneDrawerPanel .scene-flow-distance.scene-flow-distance-type,
body.route-page #sceneDrawerPanel .scene-flow-row[data-node-type="terrain"] .scene-flow-distance-type {
  background: var(--scene-terrain) !important;
  background-color: var(--scene-terrain) !important;
  color: #FFFFFF !important;
}

body.route-page.route-scene-type-manual .scene-flow-distance-type,
body.route-page.route-scene-type-manual #sceneDrawerPanel .scene-flow-distance.scene-flow-distance-type,
body.route-page #sceneDrawerPanel .scene-flow-row[data-node-type="manual"] .scene-flow-distance-type,
body.route-page #sceneDrawerPanel .scene-flow-row[data-node-type="place"] .scene-flow-distance-type {
  background: var(--scene-place) !important;
  background-color: var(--scene-place) !important;
  color: #FFFFFF !important;
}

body.route-page #sceneDrawerPanel .scene-flow-row[data-node-type="surface"] .scene-flow-distance-type {
  background: var(--scene-surface) !important;
  background-color: var(--scene-surface) !important;
  color: #FFFFFF !important;
}

body.route-page #sceneDrawerPanel .scene-flow-row[data-node-type="culture"] .scene-flow-distance-type {
  background: var(--scene-culture) !important;
  background-color: var(--scene-culture) !important;
  color: #FFFFFF !important;
}

body.route-page #sceneDrawerPanel .scene-flow-row[data-node-type="theme"] .scene-flow-distance-type {
  background: var(--scene-theme) !important;
  background-color: var(--scene-theme) !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0 !important;
  border-radius: 8px !important;
}
body.route-page #sceneDrawerPanel .scene-theme-nature-icon {
  width: 18px;
  height: 18px;
  display: block;
}

body.route-page .scene-distance--yellow,
body.route-page .scene-flow-distance-yellow {
  background: var(--gwm-func-yellow) !important;
  background-color: var(--gwm-func-yellow) !important;
  color: #1F2126 !important;
}

body.route-page .scene-distance--orange,
body.route-page .scene-flow-distance-orange {
  background: var(--gwm-func-orange) !important;
  background-color: var(--gwm-func-orange) !important;
  color: #FFFFFF !important;
}

body.route-page .scene-distance--red,
body.route-page .scene-flow-distance-red {
  background: var(--gwm-func-red) !important;
  background-color: var(--gwm-func-red) !important;
  color: #FFFFFF !important;
}

body.route-page #sceneDrawerPanel .scene-flow-bar-fill,
body.route-page .scene-flow-bar-fill {
  background: rgba(255, 255, 255, 0.72) !important;
  background-color: rgba(255, 255, 255, 0.72) !important;
}

/* Phase 2: ETA under km + single bar time/distance copy */
body.route-page #sceneDrawerPanel .scene-flow-cell-distance {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
}

body.route-page #sceneDrawerPanel .scene-flow-eta,
body.route-page #sceneDrawerPanel .scene-flow-eta-text {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
}

body.route-page #sceneDrawerPanel .scene-flow-eta-icon {
  color: rgba(255, 255, 255, 0.72) !important;
}

body.route-page #sceneDrawerPanel .scene-flow-bar-time,
body.route-page #sceneDrawerPanel .scene-flow-bar-point-eta,
body.route-page #sceneDrawerPanel .scene-flow-bar-point-away,
body.route-page #sceneDrawerPanel .scene-flow-bar-label {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  text-align: right !important;
  width: 100% !important;
  white-space: nowrap !important;
}

body.route-page #sceneDrawerPanel .scene-flow-cell-bar {
  width: 78px !important;
  flex: 0 0 78px !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 2px !important;
}

body.route-page #sceneDrawerPanel .scene-flow-cell-bar--point {
  gap: 3px !important;
}

body.route-page #sceneDrawerPanel .scene-flow-row.is-point-node .scene-flow-bar-bg {
  display: none !important;
}

/* §十四 POI：默认小白点；选中时三标签窗口（针尖 = 栈底 = 路线落点） */
body.route-page .poi-marker {
  background: transparent !important;
  border: none !important;
}

body.route-page .poi-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 28px;
  overflow: visible;
  pointer-events: auto;
  transform: rotate(var(--gwm-marker-upright, 0deg));
  transform-origin: 50% 100%;
}

body.route-page .poi-foot {
  position: relative;
  width: 28px;
  height: 0;
  flex-shrink: 0;
  overflow: visible;
}

body.route-page .poi-stack:not(.poi-stack--label) .poi-foot {
  height: 2px;
}

body.route-page .poi-stack.poi-stack--label .poi-foot {
  height: 14px;
}

body.route-page .poi-dot {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 8px;
  height: 8px;
  transform: translate(-50%, 50%);
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--route-track-default);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  padding: 0;
  margin: 0;
  z-index: 3;
  box-sizing: border-box;
}

body.route-page .poi-dot--terrain {
  background: #ffffff;
  border-color: var(--scene-terrain);
}

body.route-page .poi-dot--manual,
body.route-page .poi-dot--place {
  background: #ffffff;
  border-color: var(--scene-place);
}

body.route-page .poi-dot--surface,
body.route-page .poi-dot--culture {
  background: #ffffff;
  border-color: var(--scene-surface);
}

body.route-page .poi-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
}

body.route-page .poi-stack .poi-label {
  display: none !important;
  position: relative;
  flex-shrink: 0;
}

body.route-page .poi-stack.poi-stack--label .poi-dot {
  visibility: hidden !important;
}

body.route-page .poi-stack.poi-stack--label .poi-label {
  display: inline-flex !important;
}

body.route-page .poi-stack.poi-stack--current {
  z-index: 1200;
}

body.route-page .poi-stack.poi-stack--adjacent {
  z-index: 1100;
}

body.route-page .poi-label {
  position: relative;
  align-items: center;
  padding: 4px 11px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  color: #1A1A1A !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
  cursor: pointer;
}

body.route-page .poi-stack.poi-stack--label .poi-label::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 0;
  width: 2px;
  height: 14px;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.72) !important;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

body.route-page .poi-stack.poi-stack--label .poi-label::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 12px;
  width: 72%;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22) !important;
  filter: blur(4px);
  pointer-events: none;
}

body.route-page .poi-label--terrain {
  border-color: rgba(61, 204, 111, 0.62) !important;
}

body.route-page .poi-label--manual {
  border-color: rgba(78, 198, 245, 0.62) !important;
}

body.route-page .poi-label--culture {
  border-color: rgba(255, 158, 68, 0.62) !important;
}

body.route-page .poi-label--weather {
  border-color: rgba(0, 0, 0, 0.10) !important;
}

body.route-page .poi-label--active {
  border: 1.25px solid var(--gwm-active-border) !important;
  color: rgba(216, 108, 160, 1) !important;
  box-shadow: var(--gwm-active-glow) !important;
}

body.route-page .poi-label--active::before {
  background: rgba(216, 108, 160, 0.92) !important;
  box-shadow: 0 1px 3px rgba(216, 108, 160, 0.55) !important;
}

body.route-page .poi-label--active::after {
  background: rgba(216, 108, 160, 0.38) !important;
  filter: blur(5px);
}

/* 三标签窗口：前后节点弱化 */
body.route-page .poi-label--adjacent {
  opacity: 0.78 !important;
  font-weight: 500 !important;
  color: #333333 !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12) !important;
}

body.route-page .poi-label--adjacent::before {
  background: rgba(60, 60, 60, 0.58) !important;
  box-shadow: none !important;
}

body.route-page .poi-label--adjacent::after {
  opacity: 0.45 !important;
  filter: blur(4px);
}

/* §十五 离线 / Toast / Badge */
body.route-page .offline-map-status {
  padding: 2px 4px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.25;
  box-shadow: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
  opacity: 0.72;
  transition: opacity 0.35s ease;
}

body.route-page .offline-map-status.status-installed,
body.route-page .offline-map-status.status-ready,
body.route-page .offline-map-status.status-offline_ready {
  color: rgba(221, 255, 232, 0.76);
}

body.route-page .offline-map-status.status-partial,
body.route-page .offline-map-status.status-preparing {
  color: rgba(255, 222, 186, 0.86);
}

body.route-page .offline-map-status.status-not_installed,
body.route-page .offline-map-status.status-offline_incomplete {
  color: rgba(255, 214, 214, 0.90);
}

body.route-page .offline-map-status.status-zoom_out_of_range {
  color: rgba(255, 236, 173, 0.88);
}

body.route-page .offline-map-status.is-faded {
  opacity: 0;
}

body.route-page .route-toast {
  position: fixed !important;
  bottom: var(--route-toast-bottom) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: min(78vw, 280px) !important;
  width: max-content;
  padding: 9px 14px !important;
  background: rgba(31, 33, 38, 0.72) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px !important;
  color: #FFFFFF !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1250;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.20);
}

body.route-page .route-toast.show {
  opacity: 1 !important;
}

body.route-page .cache-status {
  display: none !important;
}

body.route-page .route-load-mode-badge.pkg {
  background: rgba(55, 200, 113, 0.82) !important;
}

body.route-page .route-load-mode-badge.route {
  background: rgba(255, 158, 68, 0.82) !important;
}

/* §十六 偏航 / 回线 */
body.route-page .off-route-alert {
  bottom: var(--route-toast-bottom) !important;
  background: rgba(31, 33, 38, 0.88) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

body.route-page .off-route-icon {
  color: var(--gwm-func-yellow) !important;
}

body.route-page .back-on-track-alert {
  bottom: var(--route-toast-bottom) !important;
  background: rgba(55, 200, 113, 0.88) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #FFFFFF !important;
}

/* §十七 全屏视频 */
body.route-page .video-controls {
  background: rgba(31, 33, 38, 0.72) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

body.route-page .video-btn-icon,
body.route-page .video-btn-close {
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 15px;
  transition: transform var(--route-transition-fast), background var(--route-transition-fast);
}

body.route-page .video-btn-icon:active,
body.route-page .video-btn-close:active,
body.route-page .video-btn-speed:active {
  transform: scale(0.96);
}

body.route-page .video-btn-speed {
  border: 1px solid rgba(166, 77, 121, 0.75) !important;
  color: #FFFFFF !important;
  background: rgba(31, 33, 38, 0.48) !important;
}

/* §十八 node_guide 侧滑 — solid panel while loading (no transparent black strip) */
body.route-page .node-guide-overlay iframe {
  background: #f4f4f5 !important;
}

/* Client trip-report map FAB — countdown + unread dot */
body.route-page .map-tools {
  /* Map controls stay below every drawer / glass modal / notice. */
  z-index: 820 !important;
}
body.route-page #btnTripReport {
  position: relative;
  z-index: 821 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92) !important;
}
body.route-page #btnTripReport .trip-bell-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
  pointer-events: none;
}
body.route-page #btnTripReport .trip-countdown-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.96);
  pointer-events: none;
  user-select: none;
  text-align: center;
}
body.route-page #btnTripReport .trip-clock-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  pointer-events: none;
  opacity: 1 !important;
}
/* Keep the hollow bell. Unread sits inside; countdown sits below. */
body.route-page #btnTripReport.has-countdown .trip-clock-icon {
  display: inline-flex !important;
  opacity: 1 !important;
}
body.route-page #btnTripReport:not(.has-countdown) .trip-countdown-label {
  display: none;
}
body.route-page #btnTripReport.has-countdown .trip-countdown-label {
  position: static;
  display: block;
  margin-top: 1px;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
  background: transparent;
  box-shadow: none;
}
body.route-page #btnTripReport .trip-report-badge {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.98);
  font-size: 10px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  box-shadow: none;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
body.route-page #btnTripReport .trip-report-badge.hidden {
  display: none !important;
}
body.route-page #btnTripReport.map-tool-pressed,
body.route-page #btnTripReport:active {
  color: rgba(216, 108, 160, 1) !important;
}
body.route-page #btnTripReport.is-neutral {
  opacity: 0.95;
}

body.route-page #btnTripReport.trip-notice-btn {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
}
body.route-page .map-tools #btnTripReport {
  order: -1;
}

/* In-map 行前通知 — full phone content screen above tab-bar (never under tabs). */
body.route-page .page {
  position: relative;
}
.trip-notice-sheet {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--route-nav-h, var(--gwm-tab-bar-h, 64px));
  z-index: 3000 !important;
  pointer-events: none;
  overflow: hidden;
}
.trip-notice-sheet[hidden] {
  display: none !important;
}
.trip-notice-sheet.is-open {
  pointer-events: auto;
}
.trip-notice-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.trip-notice-sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: calc(100% - 24px);
  max-width: 480px;
  height: auto;
  max-height: calc(100% - 24px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: rgba(28, 31, 38, 0.92);
  color: #f8fafc;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, 22px);
  transition: opacity 0.18s ease, transform 0.2s ease;
  overflow: hidden;
  opacity: 0;
}
.trip-notice-sheet.is-open .trip-notice-sheet-panel {
  opacity: 1;
  transform: translate(-50%, 0);
}
.trip-notice-sheet-close {
  position: relative;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
}
.trip-notice-sheet-head {
  position: relative;
  padding: max(14px, env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}
.trip-notice-sheet-heading {
  min-width: 0;
}
.trip-notice-sheet-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  pointer-events: auto;
  touch-action: manipulation;
  gap: 7px;
}
.trip-notice-sheet-actions > button:not(.trip-notice-sheet-close),
.trip-notice-sheet-footer button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.trip-notice-sheet-route {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(248, 250, 252, 0.94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trip-notice-sheet-title {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.trip-notice-sheet-updated {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.82);
}
.trip-notice-sheet-fallback {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 12px;
  color: #fbbf24;
  line-height: 1.4;
}
.trip-notice-sheet-fallback[hidden] {
  display: none !important;
}
.trip-notice-sheet-body {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  /* Bounded scrollport independent of height:auto flex max-height bugs. */
  max-height: calc(100dvh - var(--route-nav-h, var(--gwm-tab-bar-h, 64px)) - 12px - 12px - 9.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 24px;
  overscroll-behavior-y: contain;
  touch-action: pan-y !important;
  pointer-events: auto !important;
  user-select: text;
  -webkit-user-select: text;
}
.trip-notice-sheet-footer {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  pointer-events: auto;
  touch-action: manipulation;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 31, 38, 0.98);
}
.trip-notice-sheet-footer button {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 14px;
}
.report-section {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.report-section:last-child {
  border-bottom: none;
}
.report-section h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}
.report-section p,
.report-section li {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.92);
}


@media print {
  body.route-page > * {
    visibility: hidden !important;
  }
  body.route-page .trip-notice-sheet,
  body.route-page .trip-notice-sheet * {
    visibility: visible !important;
  }
  body.route-page .trip-notice-sheet {
    position: fixed !important;
    inset: 0 !important;
    background: #fff !important;
  }
  body.route-page .trip-notice-sheet-panel {
    background: #fff !important;
    color: #111827 !important;
  }
  body.route-page .trip-notice-sheet-actions,
  body.route-page .trip-notice-sheet-footer,
  body.route-page .trip-notice-sheet-scrim {
    display: none !important;
  }
  body.route-page .trip-notice-sec h3,
  body.route-page .trip-notice-sec p,
  body.route-page .trip-notice-sheet-route,
  body.route-page .trip-notice-sheet-title,
  body.route-page .trip-notice-sheet-updated {
    color: #111827 !important;
  }
}


/* Stacking: map FABs stay at 820/821. Drawer (850) and notice (3000) cover by z-index, not by hiding the whole toolbar. */
