/* =========================================================
   Outmap 3D GIS - Office 365 / Windows 11 Fluent 一体化主题
   单行极简高整合顶栏 (高仅 46px)，最大化释放三维立体地图
   ========================================================= */

:root {
  --header-bg: #ffffff;
  --header-border: #e2e8f0;
  --header-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-sub: #64748b;
  --accent-blue: #0284c7;
  --accent-indigo: #6366f1;
  --accent-green: #16a34a;
  --accent-orange: #ea580c;
  --map-bg: #dce8dc;
  --status-bg: #0f172a;
  --status-text: #94a3b8;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "Consolas", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-base);
  color: var(--text-main);
  font-size: 12px;
  background-color: var(--map-bg);
}

#app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* =========================================================
   1. Office 365 现代极简一体化顶栏 (高 44px，与操作系统标题栏完全融合)
   ========================================================= */
#unified-header {
  position: relative;
  height: 44px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 145px 0 12px; /* 右侧留出 145px 空间容纳 Windows 原生最小化/最大化/关闭按钮 */
  gap: 8px;
  -webkit-app-region: drag; /* 允许在顶栏任意空白与容器间隙直接拖拽移动整个程序窗口 */
}

.brand-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  -webkit-app-region: no-drag;
}

.header-brand-container {
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-app-region: no-drag;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  margin-right: 4px;
}

.header-brand-container:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header-brand-container:active {
  transform: scale(0.97);
}

.header-brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  -webkit-app-region: no-drag;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-brand-logo.checking-spin {
  animation: logoCheckSpin 0.8s ease-in-out;
}

@keyframes logoCheckSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

/* 顶栏品牌 3D 原地翻转卡片 (Outmap <-> 版本号) */
.brand-flip-card {
  perspective: 600px;
  display: inline-flex;
  align-items: center;
  height: 24px;
  user-select: none;
  -webkit-app-region: no-drag !important;
  cursor: pointer;
  position: relative;
  min-width: 58px;
}

.brand-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
}

.brand-flip-card.flipped .brand-flip-inner {
  transform: rotateX(180deg);
}

.brand-flip-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.brand-flip-front {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.brand-flip-back {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.28);
  border-radius: 4px;
  padding: 1px 6px;
  transform: rotateX(180deg);
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-flip-back.latest {
  color: #15803d;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.35);
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.2);
}

.brand-flip-back.has-update {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.38);
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
  cursor: pointer;
}

.brand-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(59, 130, 246, 0.35);
  border-radius: 3px;
  pointer-events: none;
  transition: width 0.12s ease;
}

.brand-ver-badge {
  position: relative;
  z-index: 1;
}

.btn-fast-install {
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  cursor: pointer;
}
.btn-fast-install:hover {
  background: #059669;
}

.brand-wrapper::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #cbd5e1;
  margin-left: 8px;
}

/* 绿色圆点已下载标识 */
.downloaded-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.7);
  margin-left: 5px;
  vertical-align: middle;
}

.layer-download-dot {
  display: none;
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.7);
  margin-left: 6px;
  vertical-align: middle;
}

.layer-download-dot.active {
  display: inline-block;
}



/* 容器本身保持 drag，只有具体按钮和输入框才设为 no-drag */
.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-app-region: drag;
}

.header-left {
  flex-shrink: 0;
}

.header-center {
  flex: 1;
  max-width: 320px;
  min-width: 140px;
  margin: 0 4px;
}

.header-right {
  flex-shrink: 0;
}

/* 交互控件明确声明 no-drag */
.office-btn,
.office-btn-primary,
.office-btn-icon-capsule,
.office-slider-group,
.office-slider-group input,
.office-search-trigger-btn,
.search-popover-box,
.office-search-capsule,
.office-search-capsule input,
.search-action-btn,
.office-prov-group,
.office-fluent-select,
.fluent-select-wrapper,
.cache-badge,
#fab-dock,
.floating-card,
.floating-panel {
  -webkit-app-region: no-drag;
}

.header-sep {
  width: 1px;
  height: 18px;
  background: var(--header-border);
  margin: 0 2px;
}

/* Office 风格扁平按钮 */
.office-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.office-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.office-btn.active {
  background: #e0f2fe;
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 700;
}

.office-btn-primary {
  background: var(--accent-green);
  border: 1px solid #15803d;
  color: #ffffff;
  font-weight: 600;
  font-size: 11px;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.office-btn-primary:hover {
  background: #15803d;
}

.office-btn-primary:disabled {
  background: #94a3b8;
  border-color: #94a3b8;
  cursor: not-allowed;
}

/* 离线下载紧凑图标与展开折叠胶囊 (支持缩放回图标，后台下载发光蓝点) */
.office-btn-icon-capsule {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              transform 0.15s ease;
  overflow: visible;
  -webkit-app-region: no-drag;
}

.office-btn-icon-capsule:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.office-btn-icon-capsule:active {
  transform: scale(0.95);
}

.office-btn-icon-capsule.expanded {
  width: 86px;
  min-width: 86px;
  padding: 0 8px;
  gap: 5px;
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(22, 163, 74, 0.28);
}

.office-btn-icon-capsule.expanded:hover {
  background: #15803d;
  color: #ffffff;
}

.office-btn-icon-capsule.expanded:active {
  transform: scale(0.97);
}

.dl-btn-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.office-btn-icon-capsule:hover .dl-btn-icon-wrap {
  transform: translateY(1px);
}

.office-btn-icon-capsule.expanded:hover .dl-btn-icon-wrap {
  transform: none;
}

.dl-btn-label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-4px);
  transition: max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.18s ease,
              transform 0.2s ease;
}

.office-btn-icon-capsule.expanded .dl-btn-label {
  max-width: 60px;
  opacity: 1;
  overflow: visible;
  transform: translateX(0);
}

/* 离线下载状态圆点指示：正在下载显示静默蓝点，下载完成显示绿点，未下载不显示 */
.dl-live-blue-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #2563eb;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.5);
  pointer-events: none;
  z-index: 10;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* 下载完成状态：绿色圆点 */
.dl-live-blue-dot.completed {
  background-color: #16a34a !important;
  box-shadow: 0 1px 4px rgba(22, 163, 74, 0.6) !important;
}

/* 高程滑块胶囊 (加长滑块长度，细腻微调3D高程) */
.office-slider-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 10px;
}

.slider-lbl {
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
}

.slider-lbl b {
  color: var(--accent-blue);
  font-weight: 700;
}

.office-slider-group input[type="range"] {
  width: 140px;
  height: 4px;
  cursor: pointer;
  accent-color: var(--accent-blue);
}

/* 搜索触发框 (Fluent 现代化长条搜索框，大气美观) */
.office-search-trigger-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 10px;
  width: 300px;
  height: 30px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  -webkit-app-region: no-drag;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.search-trigger-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.search-trigger-placeholder {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  user-select: none;
}

.office-search-trigger-btn:hover {
  background: #ffffff;
  border-color: #94a3b8;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.office-search-trigger-btn:hover .search-trigger-svg {
  color: #0284c7;
}

.office-search-trigger-btn:hover .search-trigger-placeholder {
  color: #64748b;
}

.search-trigger-svg {
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.search-kbd-hint {
  font-size: 10px;
  font-family: var(--font-mono);
  background: #e2e8f0;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
}

/* Spotlight 风格沉浸式搜索面板 (加长加宽至 560px，视野开阔) */
.search-popover-box {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18), 0 4px 14px rgba(15, 23, 42, 0.08);
  z-index: 1250;
  animation: searchFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-app-region: no-drag;
  overflow: hidden;
}

@keyframes searchFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.spotlight-search-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  gap: 8px;
}

.spotlight-ico {
  flex-shrink: 0;
}

.spotlight-search-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--font-base);
  color: #0f172a;
  background: transparent;
}

.spotlight-search-header input::placeholder {
  color: #94a3b8;
  font-size: 12px;
}

.search-locate-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #0284c7;
  border: 1px solid #0369a1;
  color: #ffffff;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.search-locate-btn:hover {
  background: #0369a1;
}

.search-close-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

.search-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* 历史搜索头部栏 */
.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.btn-clear-history {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 10.5px;
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 3px;
  transition: all 0.12s ease;
}

.btn-clear-history:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* 搜索下拉候选匹配与历史列表 */
.search-results-list {
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.12s ease;
  border-bottom: 1px solid #f8fafc;
}

.search-result-item:hover, .search-result-item.active {
  background: #f0fdf4;
}

.search-result-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-desc {
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.search-empty-tip {
  padding: 22px 14px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
}

/* 全局现代极简流线型滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.15s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* 地图图层右上角视口控制浮动坞 (极简纯图标无文字) */
.map-view-dock {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.map-dock-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-dock-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.map-dock-btn.active {
  background: #e0f2fe;
  color: #0284c7;
  box-shadow: inset 0 0 0 1px #38bdf8;
}

/* 飞跃定位着陆标记与高质感操作卡片 */
.landing-pulse-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  cursor: default;
  z-index: 1200;
  user-select: none;
  -webkit-user-select: none;
}

.pulse-pin-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 2;
}

.pulse-core {
  font-size: 28px;
  line-height: 1;
  animation: bounceLanding 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.pulse-ring {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid #0284c7;
  animation: landingRing 1.8s infinite ease-out;
  pointer-events: none;
}

/* 优雅紧凑的落地交互卡片 (常驻显示，支持关闭、收藏、设为途径点、起终点) */
.landing-card {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 185px;
  max-width: 240px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
  z-index: 1210;
  animation: fadeInLabel 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.landing-card::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

.landing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.landing-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.landing-card-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 0 3px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.landing-card-close:hover {
  color: #ef4444;
  background: #f1f5f9;
}

.landing-card-desc {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 7px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.landing-act-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.landing-act-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.landing-act-btn.primary {
  background: #eff6ff;
  color: #0284c7;
  border-color: #bfdbfe;
  font-weight: 600;
}

.landing-act-btn.primary:hover {
  background: #0284c7;
  color: #ffffff;
}

@keyframes landingRing {
  0% { transform: translateX(-50%) scale(0.3); opacity: 1; }
  100% { transform: translateX(-50%) scale(2.4); opacity: 0; }
}

@keyframes bounceLanding {
  0% { transform: translateY(-40px); opacity: 0; }
  60% { transform: translateY(6px); }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInLabel {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 省份下拉选择器容器 */
.office-prov-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Fluent 风格精美省份下拉触发胶囊与拼音悬浮面板 */
.fluent-dropdown-wrapper {
  position: relative;
  display: inline-block;
  -webkit-app-region: no-drag;
}

.office-fluent-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  height: 28px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.office-fluent-dropdown-btn:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.office-fluent-dropdown-btn.active,
.office-fluent-dropdown-btn:focus-visible {
  background-color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 2.5px rgba(2, 132, 199, 0.18);
}

.fluent-caret-svg {
  color: #64748b;
  transition: transform 0.2s ease;
}

.office-fluent-dropdown-btn.active .fluent-caret-svg {
  transform: rotate(180deg);
  color: #0284c7;
}

/* 全国总览展开式拼音 A-Z 悬浮面板 */
.prov-popover-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 380px;
  max-height: 480px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1200;
  animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.prov-menu-header {
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.prov-menu-header-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.prov-menu-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.prov-menu-hint {
  font-size: 11px;
  color: #64748b;
}

#btn-close-prov-menu {
  width: 26px;
  height: 26px;
  min-width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

#btn-close-prov-menu:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* A-Z 快捷索引胶囊条 */
.prov-menu-quick-index {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.prov-quick-idx-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
}

.prov-quick-idx-btn:hover {
  background: #0284c7;
  color: #ffffff;
  transform: scale(1.08);
}

/* 省份列表滚动区 */
.prov-menu-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 14px 12px;
  max-height: 380px;
}

/* 全国总览置顶大胶囊 */
.prov-all-china-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 7px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.15s ease;
  text-align: left;
}

.prov-all-china-btn:hover {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.15);
}

.prov-all-china-btn .p-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0369a1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prov-all-china-btn .p-tag {
  font-size: 10px;
  font-weight: 600;
  background: #0284c7;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 999px;
}

/* 拼音分组标题 */
.prov-group-section {
  margin-bottom: 8px;
}

.prov-group-header {
  font-size: 11px;
  font-weight: 800;
  color: #0284c7;
  padding: 4px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prov-group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.prov-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  transition: all 0.12s ease;
  text-align: left;
  outline: none;
}

.prov-item-btn:hover {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0369a1;
  transform: translateY(-1px);
}

.prov-item-btn.selected {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.prov-item-btn .prov-offline-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.7);
  margin-left: 5px;
  flex-shrink: 0;
}

.prov-item-btn.selected .prov-offline-dot {
  background-color: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.9);
}

/* 弹窗中的就绪与操作样式 */
.prov-status-line {
  color: #047857;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 0;
  padding: 4px 8px;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.modal-btn.success {
  background: #10b981;
  color: #ffffff;
  border: none;
}

.modal-btn.success:hover {
  background: #059669;
}

.cache-badge {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.cache-badge:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* =========================================================
   2. 三维地图视口 (100% 满屏沉浸式)
   ========================================================= */
#map-wrap {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #dce8dc;
}

#map {
  width: 100%;
  height: 100%;
}

/* 天光地平线渐变氛围 */
#map-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(210, 230, 245, 0.4) 0%, rgba(210, 230, 245, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

/* =========================================================
   3. 全量注记与地标样式 (微观全量要素)
   ========================================================= */

/* 各省大字 (如 SICHUAN PROVINCE 四川省) */
.province-title-marker {
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
}

.province-en {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(90, 105, 95, 0.85);
  text-shadow: 0 1px 3px #ffffff, 0 -1px 3px #ffffff, 1px 0 3px #ffffff, -1px 0 3px #ffffff;
  text-transform: uppercase;
}

.province-cn {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #2e4438;
  text-shadow: 0 1px 3px #ffffff, 0 -1px 3px #ffffff, 1px 0 3px #ffffff, -1px 0 3px #ffffff;
}

/* 地级市与重点城镇注记 */
.city-label-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: translate(-50%, -100%);
  transition: transform 0.15s ease;
}

.city-label-marker:hover {
  transform: translate(-50%, -100%) scale(1.15);
  z-index: 50;
}

.city-name-cn {
  font-size: 11.5px;
  font-weight: 800;
  color: #1f2937;
  white-space: nowrap;
  text-shadow: 0 1px 2px #fff, 0 -1px 2px #fff, 1px 0 2px #fff, -1px 0 2px #fff;
  line-height: 1.1;
}

.city-name-en {
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  text-shadow: 0 1px 1px #fff;
  margin-bottom: 2px;
}

.city-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border: 2px solid #1f2937;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* 自然山峰 POI (如 泰山 · 玉皇顶, 贡嘎山) */
.mountain-peak-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: translate(-50%, -100%);
  transition: transform 0.15s ease;
}

.mountain-peak-marker:hover {
  transform: translate(-50%, -100%) scale(1.18);
  z-index: 60;
}

.peak-triangle {
  font-size: 11px;
  color: #854d0e;
  line-height: 1;
}

.peak-title {
  font-size: 11px;
  font-weight: 800;
  color: #14532d;
  white-space: nowrap;
  text-shadow: 0 1px 2px #ffffff, 0 -1px 2px #ffffff, 1px 0 2px #ffffff, -1px 0 2px #ffffff;
  margin-top: 1px;
}

.peak-elevation {
  font-size: 9.5px;
  font-weight: 800;
  color: #0284c7;
  text-shadow: 0 1px 2px #ffffff;
}

/* =========================================================
   4. 底部状态栏 (Office 365 / Windows 11 Fluent 纯白极简风格)
   ========================================================= */
#status-bar {
  height: 26px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 11px;
  color: #475569;
  z-index: 100;
}

.sb-col-left, .sb-col-center, .sb-col-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

#status-region {
  font-weight: 600;
  color: #0f172a;
}

.sb-div {
  color: #cbd5e1;
}

.sb-item {
  color: #475569;
}

.sb-item.highlight {
  color: #0284c7;
  font-weight: 700;
  font-family: var(--font-mono);
}

.sb-item.lock-indicator {
  color: #7c3aed;
  font-weight: 700;
}

.sb-item.fps {
  color: #16a34a;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* =========================================================
   5. 瓦片金字塔多级离线下载器对话框 (Office 365 / Windows 11 Fluent 风格)
   ========================================================= */
.modal-overlay {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
}

.modal-card {
  width: 540px;
  max-width: 92vw;
  max-height: calc(100vh - 36px);
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  animation: modalFadeIn 0.18s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}

.form-control {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: #0284c7;
  background: #ffffff;
}

.check-group {
  display: flex;
  gap: 16px;
  margin-top: 2px;
}

.check-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #334155;
  cursor: pointer;
}

.stat-summary-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-info-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-line {
  font-size: 12px;
  color: #166534;
  white-space: nowrap;
}

.stat-line b {
  color: #15803d;
  font-weight: 700;
  margin-left: 3px;
}

.dl-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #2563eb);
  transition: width 0.15s ease;
}

.progress-text-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  font-family: var(--font-mono);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.modal-btn {
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.modal-btn.primary {
  background: #16a34a;
  border: 1px solid #15803d;
  color: #ffffff;
}

.modal-btn.primary:hover {
  background: #15803d;
}

.modal-btn.secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.modal-btn.secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* =========================================================
   彻底移除右下角 MapLibre 属性控件与标识
   ========================================================= */
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-attrib-button,
.maplibregl-compact {
  display: none !important;
}

/* =========================================================
   右下角户外核心工具坞 (简约无汉字标注，纯净精致图标)
   ========================================================= */
#fab-dock {
  position: absolute;
  right: 18px;
  bottom: 38px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 80;
  -webkit-app-region: no-drag;
}

.fab-btn {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #475569;
}

.fab-btn:hover {
  transform: translateY(-1px);
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.18);
}

.fab-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.fab-svg {
  flex-shrink: 0;
}

/* Fluent 风格右键交互快捷菜单 (紧凑纤巧，消除多余空白) */
.fluent-context-menu {
  position: absolute;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 4px;
  min-width: 148px;
  max-width: 220px;
  width: max-content;
  z-index: 3000;
  animation: ctxFadeIn 0.12s ease-out;
  -webkit-app-region: no-drag;
}

@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.0); }
}

.ctx-header {
  padding: 4px 6px 3px 6px;
}

.ctx-title {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctx-sub {
  font-size: 9px;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctx-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 3px 0;
}

.ctx-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: all 0.1s ease;
  white-space: nowrap;
}

.ctx-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ctx-item.primary {
  color: #0284c7;
  font-weight: 600;
}

.ctx-item.primary:hover {
  background: #e0f2fe;
  color: #0369a1;
}

.ctx-icon {
  font-size: 13px;
  line-height: 1;
}

/* 浮动卡片与侧边面板 (Office 365 / Windows 11 Fluent 风格) */
.floating-card, .floating-panel {
  position: absolute;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: panelSlideIn 0.16s ease-out;
  -webkit-app-region: no-drag;
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-header, .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.card-title, .panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.card-close {
  background: transparent;
  border: none;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.card-body, .panel-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 选点弹窗位置 (右下角展开) */
#waypoint-modal {
  right: 68px;
  bottom: 38px;
  width: 320px;
}

.type-pill-group {
  display: flex;
  gap: 5px;
  width: 100%;
}

.type-pill {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 5px 0;
  font-size: 11px;
  color: #475569;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.type-pill.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
  font-weight: 600;
}

.folder-select-row {
  display: flex;
  gap: 6px;
}

.new-folder-inline-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 6px;
  border: 1px dashed #cbd5e1;
}

.new-folder-inline-box input {
  flex: 1;
  font-size: 11.5px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  outline: none;
}

.new-folder-inline-box input:focus {
  border-color: #0284c7;
}

.office-btn-primary.sm, .office-btn-subtle.sm {
  padding: 3px 8px;
  font-size: 11px;
}

.office-btn-subtle {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
}

.office-btn-subtle:hover {
  background: #f8fafc;
  color: #0f172a;
}

.point-meta-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}

.point-meta-box b {
  color: #0284c7;
}

.card-footer {
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 路线规划面板 (右下角展开) */
#route-panel {
  right: 68px;
  bottom: 38px;
  width: 420px;
  max-height: 80vh;
  overflow-y: auto;
}

.route-mode-pills {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
}

.route-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.route-mode-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.route-points-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.route-point-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-tag {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pt-tag.start { background: #16a34a; }
.pt-tag.end { background: #ef4444; }

.route-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
}

.route-pt-input {
  width: 100%;
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 11.5px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.route-pt-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* 路线输入框实时联想搜索候选下拉列表 */
.route-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1200;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.route-search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s ease;
  text-align: left;
}

.route-search-item:hover, .route-search-item.active {
  background: #f0f9ff;
}

.route-search-item-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.route-search-item-info {
  flex: 1;
  min-width: 0;
}

.route-search-item-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-search-item-desc {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-search-empty {
  padding: 10px;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

.route-search-pick-map {
  border-top: 1px dashed #e2e8f0;
  margin-top: 2px;
  padding-top: 6px;
  color: #0284c7;
  font-weight: 600;
}

.btn-pick-pt {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.btn-pick-pt:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

/* 动态途径点列表 (支持数十个点纵向顺滑滚动) */
.route-via-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 2px;
}

.route-via-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 3px 8px;
  transition: all 0.12s ease;
}

.route-via-item:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.pt-tag.via {
  background: #0284c7;
  font-size: 9.5px;
}

.via-item-title {
  flex: 1;
  font-size: 11px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.via-item-title:hover {
  color: #0284c7;
  text-decoration: underline;
}

.btn-via-del {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
}

.btn-via-del:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* 途径点管理与连续拾点工具条 */
.route-tools-row {
  display: flex;
  gap: 6px;
  margin: 4px 0 8px 0;
}

.route-tool-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s ease;
}

.route-tool-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

.continuous-pick-btn.active {
  background: #0284c7 !important;
  border: 1px solid #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

.pick-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

.continuous-pick-btn.active .pick-pulse-dot {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulseDot 0.9s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.3); }
}

.route-actions-row {
  display: flex;
  gap: 6px;
}

.route-actions-row .modal-btn {
  flex: 1;
}

.route-export-dropdown-wrap {
  position: relative;
  flex: 1;
  display: flex;
}

.route-export-dropdown-wrap .modal-btn {
  width: 100%;
}

.route-export-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  min-width: 125px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 1250;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.route-export-menu-item {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #334155;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  transition: background 0.12s ease;
}

.route-export-menu-item:hover {
  background: #e0f2fe;
  color: #0284c7;
}

.modal-btn.full {
  flex: 1;
}

.modal-btn.secondary-sm {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}

.modal-btn.secondary-sm:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.route-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
}

.stat-card-clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.stat-card-clickable:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.stat-chart-hint {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 10.5px;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px dashed #bae6fd;
  border-radius: 5px;
  padding: 5px 8px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.stat-chart-hint:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

.stat-card .stat-lbl {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 2px;
}

.stat-card .stat-num {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-mono);
}

.stat-card .stat-num.green { color: #16a34a; }
.stat-card .stat-num.red { color: #ef4444; }
.stat-card .stat-num.blue { color: #0284c7; }

.elevation-chart-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
}

.chart-lbl {
  font-weight: 700;
  color: #334155;
}

.chart-hover-val {
  font-family: var(--font-mono);
  color: #0284c7;
  font-weight: 600;
}

.chart-canvas-wrap {
  width: 100%;
  height: 115px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

/* 收藏夹抽屉 (右下角展开) */
#favorites-drawer {
  right: 68px;
  bottom: 38px;
  width: 330px;
  max-height: 75vh;
  overflow-y: auto;
}

.fav-folder-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.fav-tab {
  background: #f1f5f9;
  border: none;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}

.fav-tab.active {
  background: #0284c7;
  color: #ffffff;
  font-weight: 600;
}

.fav-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.fav-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.fav-item-card:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

.fav-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.fav-item-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #0f172a;
}

.fav-item-meta {
  font-size: 10px;
  color: #64748b;
  font-family: var(--font-mono);
}

.fav-item-del {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
}

.fav-item-del:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* 收藏夹主分类切换 (地点 vs 路线) */
.fav-main-type-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  gap: 4px;
}

.fav-main-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.fav-main-tab.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 收藏路线列表 */
.fav-routes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.fav-route-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.fav-route-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

.fav-route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.fav-route-title-box {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.fav-route-mode-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: #e0f2fe;
  color: #0284c7;
  white-space: nowrap;
}

.fav-route-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-route-date {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.fav-route-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: #475569;
  background: #f8fafc;
  padding: 4px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.fav-route-stats span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.fav-route-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed #f1f5f9;
}

.fav-route-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.fav-route-btn.primary {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  font-weight: 600;
}

.fav-route-btn.primary:hover {
  background: #0369a1;
}

.fav-route-btn.gpx {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.fav-route-btn.gpx:hover {
  background: #dcfce7;
}

.fav-route-btn.del {
  color: #94a3b8;
  border-color: transparent;
  background: transparent;
  padding: 2px 4px;
}

.fav-route-btn.del:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* =========================================================
   7. 软件自动热更新弹窗与进度 (Office / Fluent 极简现代风格)
   ========================================================= */
.update-modal-card {
  width: 490px;
  max-width: 92vw;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.28), 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid #cbd5e1;
}

.update-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
}

.version-badge-group {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.version-label {
  color: #64748b;
  font-weight: 500;
}

.version-val {
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

.version-val.current {
  background: #e2e8f0;
  color: #475569;
}

.version-arrow {
  color: #0284c7;
  font-weight: 800;
  font-size: 13px;
}

.version-val.latest {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.update-meta-info {
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono);
}

.update-notes-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.update-notes-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.update-notes-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: #334155;
  line-height: 1.65;
  max-height: 150px;
  overflow-y: auto;
  font-family: var(--font-base);
  word-break: break-word;
}

.update-notes-content::-webkit-scrollbar {
  width: 5px;
}

.update-notes-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.update-btn-pulse {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  transition: all 0.15s ease;
}

.update-btn-pulse:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

.update-btn-pulse:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* =========================================================
   8. 软件版本与在线更新状态呈现组件
   ========================================================= */
.update-info-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.update-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: updateSpin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes updateSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.update-checking-text {
  font-size: 14.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

.update-checking-ver {
  font-size: 12px;
  color: #64748b;
  font-family: var(--font-mono);
}

.update-state-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.update-state-icon.uptodate {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.update-state-icon.offline {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.update-state-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.update-state-badge {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #bae6fd;
}

.update-state-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.6;
  max-width: 380px;
}

/* 系统标准手势光标适配 */
.maplibregl-canvas-container.maplibregl-interactive {
  cursor: grab;
}

.maplibregl-canvas-container.maplibregl-interactive:active {
  cursor: grabbing;
}

/* 多省批量选择：下拉菜单触发器与展开浮层面板 */
.prov-selection-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.prov-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prov-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.prov-act-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11px;
  color: #334155;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.prov-act-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.prov-selected-badge {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 10px;
}

/* 省份下拉菜单包裹层与触发器 */
.prov-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.prov-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 12px;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  user-select: none;
}

.prov-dropdown-trigger:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.prov-dropdown-trigger.active,
.prov-dropdown-trigger:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.prov-dropdown-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.prov-summary-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e293b;
  font-weight: 500;
  font-size: 12px;
}

.prov-dropdown-caret {
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  margin-left: 6px;
}

.prov-dropdown-trigger.active .prov-dropdown-caret {
  transform: rotate(180deg);
  color: #0284c7;
}

/* 下拉选择面板：自然在表单流中展开，不绝对浮动遮挡底部内容与按钮 */
.prov-dropdown-panel {
  position: relative;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  padding: 8px;
  z-index: 5;
  animation: provDropdownFade 0.15s ease-out;
}

@keyframes provDropdownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.prov-dropdown-panel-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px 4px;
  font-size: 11px;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}

.prov-multi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  max-height: 165px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px;
}

.prov-chip-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 4px 7px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap; /* 禁止折行 */
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.12s ease;
  min-width: 0;
}

.prov-chip-item:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.prov-chip-item.checked {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
  font-weight: 600;
}

.prov-chip-item input[type="checkbox"] {
  accent-color: #16a34a;
  cursor: pointer;
  flex-shrink: 0;
}

.prov-chip-name {
  white-space: nowrap; /* 绝对禁止折行 */
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.prov-chip-dot {
  display: none;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 5px #10b981;
  margin-left: auto;
  flex-shrink: 0;
}

.prov-chip-item.ready .prov-chip-dot {
  display: inline-block;
}

/* 单行内联表单行 (离线层级与下载图层放到同一行) */
.form-row-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.form-row-inline > .form-lbl {
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
  width: 58px;
}

/* 离线层级极简化卡片 (同一行排布 L10-L14 + 翠绿发光圆点 ●) */
.zoom-pill-group.inline-pills {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.zoom-pill-group.inline-pills .zoom-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  text-align: center;
}

.zoom-pill-group.inline-pills .zoom-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.zoom-pill-group.inline-pills .zoom-pill.active {
  background: #f0f9ff;
  border-color: #38bdf8;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}

.zoom-pill-dot {
  font-size: 11px;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.zoom-pill-dot.ready {
  color: #10b981 !important;
  text-shadow: 0 0 6px rgba(16, 185, 129, 0.9) !important;
}

/* 下载图层单行对齐 */
.check-group.inline-checks {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 0;
}

/* 云端同步弹窗样式 */
.sync-modal-card {
  width: 440px;
}

.sync-auto-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.sync-auto-switch-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sync-switch-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.sync-switch-sub {
  font-size: 11.5px;
  color: #64748b;
}

/* Fluent 风格开关 Switch */
.fluent-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.fluent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.fluent-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 22px;
}

.fluent-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.fluent-switch input:checked + .fluent-slider {
  background-color: #16a34a;
}

.fluent-switch input:checked + .fluent-slider:before {
  transform: translateX(16px);
}

.sync-check-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.sync-check-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.sync-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #166534;
}

.sync-dot-live {
  color: #16a34a;
  font-size: 11px;
  text-shadow: 0 0 6px rgba(22, 163, 74, 0.8);
}

.sync-advanced-details {
  font-size: 11.5px;
  color: #64748b;
  margin-top: -2px;
}

.sync-advanced-summary {
  cursor: pointer;
  user-select: none;
  color: #64748b;
  outline: none;
}

.sync-advanced-summary:hover {
  color: #0284c7;
}

.sync-advanced-content {
  margin-top: 6px;
}

/* =========================================================
   Web 纯浏览器在线运行模式样式适配
   ========================================================= */
body.web-mode #unified-header {
  padding: 0 16px 0 12px;
  -webkit-app-region: no-drag;
}

body.web-mode #btn-open-pyramid-dl {
  display: none !important;
}

body.web-mode .office-prov-group {
  gap: 6px;
}

/* =========================================================
   移动端触屏与窄屏自适应响应式系统 (Mobile Responsive UI)
   ========================================================= */
@media (max-width: 768px) {
  /* 1. 顶栏紧凑轻量化 */
  #unified-header {
    height: 46px;
    padding: 0 8px !important;
    gap: 4px;
    overflow: visible;
  }

  /* 隐藏桌面专用/非核心元素与底部PC状态栏 */
  #titlebar-cache-stat,
  #status-bar,
  .brand-wrapper::after,
  .search-kbd-hint {
    display: none !important;
  }

  #map-wrap {
    height: calc(100vh - 46px) !important;
    height: calc(100dvh - 46px) !important;
  }

  .header-left {
    gap: 4px;
  }

  .header-brand-container {
    padding: 2px 4px;
    margin-right: 0;
    gap: 4px;
  }

  .header-brand-logo {
    width: 20px;
    height: 20px;
  }

  .brand-flip-card {
    min-width: 48px;
    height: 22px;
  }

  .brand-flip-front {
    font-size: 12px;
  }

  .office-prov-group {
    gap: 4px;
  }

  .office-fluent-dropdown-btn {
    padding: 4px 6px;
    font-size: 11px;
  }

  #current-prov-label {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }

  /* 顶栏搜索栏自适应：手机端仅保留圆形搜索图标 */
  .header-center {
    flex: 0 0 auto !important;
    margin: 0 2px !important;
  }

  .office-search-trigger-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
  }

  .search-trigger-left {
    margin: 0 !important;
    gap: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .search-trigger-placeholder,
  .search-kbd-hint {
    display: none !important;
  }

  .search-trigger-svg {
    width: 16px !important;
    height: 16px !important;
    color: #0284c7 !important;
  }

  /* 顶栏高程胶囊按钮化 (点击呼出大拖动条抽屉) */
  .header-right {
    flex-shrink: 0;
  }

  .office-slider-group {
    padding: 4px 9px !important;
    gap: 4px !important;
    border-radius: 14px !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
  }

  .office-slider-group:active {
    background: #dcfce7 !important;
  }

  .slider-lbl {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #16a34a !important;
    pointer-events: none;
    white-space: nowrap;
  }

  #exaggeration-slider {
    display: none !important;
  }

  /* 2. 下拉弹窗移动端全宽居中防溢出 */
  .prov-popover-menu {
    position: fixed !important;
    top: 50px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 72vh !important;
    z-index: 2500 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28) !important;
  }

  .search-popover-box {
    position: fixed !important;
    top: 50px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    z-index: 2500 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28) !important;
  }

  .spotlight-search-header input {
    font-size: 14px !important;
  }

  /* 移动端加大关闭按钮尺寸，便于拇指点击 (路线、收藏、搜索、省份等所有面板) */
  .card-close, .modal-close-btn, .search-close-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    padding: 0 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .card-close:active, .modal-close-btn:active, .search-close-btn:active {
    background: #e2e8f0 !important;
    transform: scale(0.92);
  }

  /* 3. 路线规划面板 -> 移动端底部抽屉 (Bottom Sheet) */
  #route-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 80vh !important;
    border-radius: 18px 18px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.28) !important;
    z-index: 1200 !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  }

  #route-panel .panel-header {
    padding: 12px 14px 8px;
    position: relative;
  }

  #route-panel .panel-header::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
  }

  .route-mode-btn {
    padding: 7px 4px;
    font-size: 12px;
  }

  .route-point-row {
    gap: 6px;
  }

  .route-pt-input {
    font-size: 13px !important;
  }

  .route-actions-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }

  .route-actions-row .modal-btn,
  .route-actions-row .modal-btn.secondary-sm {
    padding: 8px 2px !important;
    font-size: 11px !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .route-export-dropdown-wrap {
    width: 100% !important;
  }

  .route-export-dropdown-wrap .modal-btn {
    height: 100% !important;
    padding: 8px 2px !important;
    font-size: 11px !important;
  }

  .route-stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
  }

  .stat-card {
    padding: 6px 4px !important;
  }

  .stat-lbl {
    font-size: 9.5px !important;
  }

  .stat-num {
    font-size: 12px !important;
  }

  .chart-canvas-wrap {
    width: 100% !important;
    overflow: hidden !important;
  }

  #elevation-chart-canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: 110px !important;
  }

  /* 4. 收藏夹管理 -> 移动端底部抽屉 */
  #favorites-drawer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 75vh !important;
    border-radius: 18px 18px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.28) !important;
    z-index: 1200 !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  }

  #favorites-drawer .panel-header {
    padding: 12px 14px 8px;
    position: relative;
  }

  #favorites-drawer .panel-header::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
  }

  /* 5. 移动端大尺寸高程起伏调节抽屉 */
  #mobile-ele-sheet {
    display: none;
    flex-direction: column !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    border: none !important;
    background: #ffffff !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.32) !important;
    z-index: 1250 !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
    touch-action: pan-y;
  }

  #mobile-ele-sheet.active {
    display: flex !important;
  }

  #mobile-ele-sheet .panel-header {
    position: relative;
    padding: 14px 16px 8px;
  }

  #mobile-ele-sheet .panel-header::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
  }

  .mobile-ele-panel-body {
    padding: 12px 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-ele-display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-ele-lbl {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
  }

  .mobile-ele-num {
    font-size: 26px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #16a34a;
  }

  .mobile-ele-slider-wrap {
    width: 100%;
    padding: 4px 0;
  }

  .mobile-big-range {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: #e2e8f0;
    outline: none;
    touch-action: pan-y;
  }

  .mobile-big-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #16a34a;
    border: 4px solid #ffffff;
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.45);
    cursor: pointer;
  }

  .mobile-ele-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    margin-top: -4px;
  }

  .mobile-ele-presets {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
  }

  .mobile-ele-preset-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
  }

  .mobile-ele-preset-btn.active {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
  }

  /* 6. 地标收藏弹窗 & 路线保存对话框 */
  #waypoint-modal {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 16px !important;
    top: auto !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    z-index: 1300 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25) !important;
  }

  #save-route-modal {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 16px !important;
    top: auto !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    z-index: 1350 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25) !important;
  }

  .modal-card {
    width: calc(100vw - 20px) !important;
    max-width: 440px !important;
    max-height: calc(100vh - 24px) !important;
    margin: 10px auto !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .prov-multi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    max-height: 140px !important;
  }

  /* 7. 右侧核心功能浮动坞：位置微调，完美避开苹果 Safari 底部地址栏与刘海/顶栏 */
  #map-view-dock {
    right: 10px !important;
    top: 10px !important; /* 紧贴顶栏下方，往上移！消除原本 50px 的过大留白 */
    gap: 6px !important;
    z-index: 100 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
  }

  .map-dock-btn {
    width: 38px !important;
    height: 38px !important;
  }

  #fab-dock {
    right: 12px !important;
    /* 重点：向上大幅垫高 (+82px)，彻底避开 iPhone Safari 底部悬浮地址栏与 Home Indicator */
    bottom: calc(env(safe-area-inset-bottom, 20px) + 82px) !important;
    gap: 10px !important;
    z-index: 100 !important;
  }

  .fab-btn {
    width: 44px !important;
    height: 44px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  }

  /* 8. 上下文菜单 */
  #map-context-menu {
    max-width: calc(100vw - 32px);
    border-radius: 10px;
  }

  .ctx-item {
    padding: 10px 14px;
    font-size: 13px;
  }
}
