/* 移动数据地图工作台（/tools/map 手机端）：地图铺满主屏 + 底部控制条；
   指标/范围常驻，AI 走统一底部抽屉（地图不被挡）。复用 index-map.js（GhMapWorkbench）。 */
.m-map-body .mobile-footer { display: none; }
.m-map-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  overflow: hidden;
  background: #fff;
}
/* AI 底部抽屉打开时让位：整页高度减去抽屉实高（--gha-sheet-h 由 GhAiAssistant.mountSheet 发布），
   地图收进上半屏——不减的话地图仍按整屏排版，图心正落在抽屉背后 */
.gha-sheet-open .m-map-page {
  height: max(120px, calc(100vh - 48px - var(--gha-sheet-h, 0px)));
  height: max(120px, calc(100dvh - 48px - var(--gha-sheet-h, 0px)));
}
.m-map-stage { position: relative; flex: 1; min-height: 0; }
#homeMapCanvas { width: 100%; height: 100%; }

/* 读数面板：浮于地图左上角的半透明白底卡片 */
.m-map-panel {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: 62%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-dark);
  font-family: var(--font-ui);
  pointer-events: none;
}
.m-map-panel .home-map-panel-empty { color: var(--text-muted); font-family: var(--font-ui); }
.m-map-panel .hm-region { font-family: var(--font-ui); font-weight: 600; }

/* 底部控制条：范围/分省/指标/年份四个入口**等分整行**，不横滚——四个是固定集合，
   横滚会让后面的入口要划一下才看得见（范围切「全球」时分省隐藏、单年份时年份隐藏，剩下的自动均分） */
.m-map-bar {
  flex: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
}
.m-map-chip-wrap { flex: 1; min-width: 0; display: flex; }
.m-map-chip { flex: 1; min-width: 0; justify-content: center; }
/* 等分后单格变窄：长指标名截断，不撑破格子也不换行 */
.m-map-chip .ap-trigger-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-map-chip .ap-trigger-arrow { flex: none; }

/* 地图右上角浮动工具条：AI 地图 + 保存图片（与左上读数面板同款半透明白底，克制、无弥散阴影） */
.m-map-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
}
.m-map-aibtn,
.m-map-savebtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  border: none;
  border-radius: 4px;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  cursor: pointer;
}
.m-map-savebtn { color: var(--text-muted); }
.m-map-savebtn .iconfont { font-size: 15px; }
.m-map-aibtn svg { width: 15px; height: 15px; }
/* 抽屉开着时入口转灰：说明「再点一下收起」，不做反色跳变 */
.m-map-aibtn.active { color: var(--text-muted); }

.m-map-empty { padding: 60px 24px; text-align: center; color: var(--text-muted); line-height: 1.8; }
