/* TiendaRadar 演示地图 v3（官网首页 + 省市报告页共用）：真实底图 + 业态分区/点位（示例数据）+ 脱敏区域报告。
   控件操作区在地图下方；购买弹窗 z-index 3000 必须压过 Leaflet 内部层级（pane 400 / 控件 1000）。 */
/* wrapper 建立独立层叠上下文（z-index:0）：把 Leaflet 内部 400~1000 的层级关进笼子，
   否则会盖住页面吸顶导航（z50）等正常内容；全屏态 .dm-full 显式 2400 不受影响 */
.dm-wrap { position:relative; z-index:0; }
.dm-map { position:relative; width:100%; height:440px; background:#e5e7eb; }
.dm-map .leaflet-container { width:100%; height:100%; font:inherit; background:#e5e7eb; }

/* 右上：全屏按钮 */
.dm-tr { position:absolute; top:10px; inset-inline-end:10px; z-index:1100; display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.dm-fsb { width:34px; height:34px; border:1px solid rgba(15,23,42,.14); border-radius:8px; background:rgba(255,255,255,.95); font-size:16px; line-height:1; color:#0f172a; cursor:pointer; box-shadow:0 2px 8px rgba(15,23,42,.14); font-family:inherit; }
.dm-fsb:hover { border-color:#16a34a; }

/* 底部控件条：业态选择 + 图例 + 提示 */
.dm-ctl { background:#fff; border-top:1px solid #e2e8f0; padding:10px 12px 9px; }
.dm-chips { display:flex; gap:6px; flex-wrap:wrap; }
.dm-chips button { padding:6px 11px; border:1px solid #e2e8f0; border-radius:99px; background:#f8faf9; font-size:12.5px; font-weight:600; color:#0f172a; cursor:pointer; font-family:inherit; white-space:nowrap; }
.dm-chips button:hover { border-color:#16a34a; }
.dm-chips button.on { background:#16a34a; border-color:#16a34a; color:#fff; }
.dm-leg { display:flex; flex-wrap:wrap; gap:5px 18px; margin-top:9px; font-size:12.5px; color:#334155; }
.dm-li { display:inline-flex; align-items:center; gap:6px; }
.dm-li b { font-weight:700; }
.dm-dot { width:10px; height:10px; border-radius:50%; display:inline-block; border:2px solid #fff; box-shadow:0 0 0 1px rgba(15,23,42,.18); flex:0 0 auto; }
.dm-dot.r { background:#dc2626; }
.dm-dot.g { background:#16a34a; }
.dm-note { margin-top:7px; font-size:12px; color:#94a3b8; }

/* 远档城市总计牌 + 中档分区计数牌（正式地图 city-badge / agg-label 同款；
   DOM 标记在 markerPane(600)，天然高于分区画布(overlayPane 400) */
.dm-badge { transform:translate(-50%,-50%); display:flex; align-items:center; gap:5px; background:rgba(15,23,42,.92); color:#fff; border-radius:10px; padding:5px 12px; font-size:13.5px; white-space:nowrap; cursor:pointer; box-shadow:0 3px 12px rgba(15,23,42,.45); }
.dm-badge:hover { background:#0f172a; }
.dm-badge b { font-weight:700; margin-inline-end:2px; }
.dm-badge i, .dm-chip i { width:8px; height:8px; border-radius:50%; display:inline-block; flex:0 0 auto; }
.dm-badge i.r, .dm-chip i.r { background:#ff6b6b; }
.dm-badge i.g, .dm-chip i.g { background:#2ed573; }
.dm-chip { transform:translate(-50%,-50%); display:flex; align-items:center; gap:3px; background:rgba(15,23,42,.85); color:#fff; border-radius:7px; padding:1px 7px; font-size:11px; line-height:1.5; white-space:nowrap; cursor:pointer; box-shadow:0 1px 5px rgba(15,23,42,.4); }
.dm-chip:hover { background:#0f172a; }
.dm-zi { color:#94a3b8; font-size:11.5px; }

/* 区域 hover 计数气泡 */
.dm-ttp { background:rgba(15,23,42,.88); color:#fff; border:none; border-radius:8px; font-size:12.5px; font-weight:600; padding:6px 10px; box-shadow:0 4px 14px rgba(15,23,42,.3); }
.leaflet-tooltip-top.dm-ttp::before { border-top-color:rgba(15,23,42,.88); }

/* 区域报告面板（脱敏：评分/强度可见，精确数值模糊） */
.dm-panel { display:none; position:absolute; top:64px; inset-inline-end:10px; z-index:1150; width:254px; max-height:calc(100% - 74px); overflow:auto; background:#fff; border:1px solid #e2e8f0; border-radius:12px; box-shadow:0 14px 40px rgba(15,23,42,.28); padding:14px 14px 12px; }
.dm-panel.open { display:block; }
.dm-ph { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.dm-ph b { font-size:14.5px; color:#0f172a; }
.dm-px { border:none; background:none; font-size:20px; color:#64748b; cursor:pointer; line-height:1; padding:0 2px; }
.dm-score { display:flex; align-items:center; gap:10px; background:#f8faf9; border-radius:10px; padding:8px 12px; margin-bottom:8px; }
.dm-score em { font-style:normal; font-size:30px; font-weight:800; line-height:1; }
.dm-score span { font-size:11.5px; color:#64748b; line-height:1.35; }
.dm-row { display:flex; align-items:center; gap:8px; margin:7px 0; font-size:12.5px; color:#334155; }
.dm-row > span { flex:0 0 auto; max-width:96px; }
.dm-meter { flex:1; height:6px; background:#e2e8f0; border-radius:99px; overflow:hidden; }
.dm-meter i { display:block; height:100%; border-radius:99px; }
.dm-row > b { flex:0 0 auto; font-size:12px; }
.dm-kv { display:flex; justify-content:space-between; font-size:12.5px; color:#334155; margin:6px 0; }
.dm-kv b { color:#0f172a; }
.dm-blur { filter:blur(4px); user-select:none; pointer-events:none; }
.dm-tt2 { margin-top:9px; font-size:12.5px; font-weight:600; color:#0f172a; }
.dm-rnote { font-size:11.5px; color:#94a3b8; margin:6px 0 10px; }
.dm-rcta { display:block; width:100%; padding:10px; background:#16a34a; color:#fff; border:none; border-radius:8px; font-weight:700; font-size:13.5px; cursor:pointer; font-family:inherit; }
.dm-rcta:hover { background:#15803d; }
.dm-rtry { display:block; width:100%; margin-top:6px; padding:6px; background:none; border:none; color:#64748b; font-size:12.5px; cursor:pointer; text-decoration:underline; font-family:inherit; }

/* 全屏模式（CSS 类实现，兼容 iOS：wrapper 固定铺满视口，地图弹性撑满） */
.dm-wrap.dm-full { position:fixed; inset:0; z-index:2400; display:flex; flex-direction:column; background:#fff; }
.dm-wrap.dm-full .dm-map { flex:1 1 auto; height:auto; min-height:0; }
.dm-wrap.dm-full .dm-ctl { flex:0 0 auto; max-height:38vh; overflow:auto; }

/* 购买会员弹窗（必须在 Leaflet 层级之上） */
.dm-mask { display:none; position:fixed; inset:0; z-index:3000; background:rgba(15,23,42,.55); align-items:center; justify-content:center; padding:16px; }
.dm-mask.open { display:flex; }
.dm-box { background:#fff; border-radius:14px; padding:24px 22px 18px; width:100%; max-width:380px; position:relative; box-shadow:0 24px 64px rgba(15,23,42,.35); text-align:center; }
.dm-box h3 { font-size:19px; margin:0 0 8px; color:#0f172a; }
.dm-box .dm-sub { font-size:13.5px; color:#64748b; margin:0 0 14px; line-height:1.6; }
/* 套餐选择弹窗（已登录直付）：周期切换 + 三档卡片 */
.dm-per { display:flex; gap:6px; margin-bottom:12px; }
.dm-per button { flex:1; padding:7px 4px; font-size:12.5px; border:1px solid #e2e8f0; background:#fff; border-radius:6px; cursor:pointer; color:#64748b; font-family:inherit; }
.dm-per button.on { background:#dcfce7; border-color:#16a34a; color:#15803d; font-weight:700; }
.dm-pks { display:flex; gap:8px; margin-bottom:10px; }
.dm-pk { flex:1; border:2px solid #e2e8f0; border-radius:10px; padding:12px 6px 10px; position:relative; }
.dm-pk.hot { border-color:#16a34a; }
.dm-pk .tag { position:absolute; top:-9px; left:50%; transform:translateX(-50%); background:#16a34a; color:#fff; font-size:10px; font-weight:700; font-style:normal; padding:1px 8px; border-radius:99px; white-space:nowrap; }
.dm-pk .n { display:block; font-size:13px; font-weight:700; color:#0f172a; }
.dm-pk .p { display:block; font-size:19px; font-weight:800; color:#0f172a; margin:4px 0 1px; }
.dm-pk .u { display:block; font-size:11px; color:#94a3b8; margin-bottom:8px; }
.dm-pk .go { width:100%; padding:8px 4px; background:#16a34a; color:#fff; border:none; border-radius:7px; font-weight:700; font-size:12.5px; cursor:pointer; font-family:inherit; }
.dm-pk .go:hover { background:#15803d; }
.dm-pknote { font-size:11.5px; color:#94a3b8; margin:2px 0 0; }
.dm-a { display:block; width:100%; margin-top:8px; padding:11px; border-radius:8px; font-weight:700; font-size:14.5px; cursor:pointer; border:none; font-family:inherit; }
.dm-a-p { background:#16a34a; color:#fff; }
.dm-a-p:hover { background:#15803d; }
.dm-a-o { background:#fff; color:#0f172a; border:1px solid #e2e8f0; }
.dm-x { position:absolute; top:8px; inset-inline-end:12px; border:none; background:none; font-size:24px; color:#64748b; cursor:pointer; line-height:1; }

/* 点位悬停店铺列表气泡（dm-ttp 深色气泡内的列表排版） */
.dm-shl { text-align:start; font-weight:400; line-height:1.55; }
.dm-shl > b { display:block; margin-bottom:2px; }
.dm-shl .mut { opacity:.72; }

@media (max-width:640px) {
  .dm-map { height:300px; }
  .dm-chips { flex-wrap:nowrap; overflow-x:auto; padding-bottom:3px; }
  .dm-chips button { flex:0 0 auto; }
  /* 移动端报告改为底部抽屉（盖在控件条上方） */
  .dm-panel { top:auto; bottom:0; inset-inline-start:0; inset-inline-end:0; width:auto; max-height:72%; border-radius:14px 14px 0 0; }
}
