/* 地图组件样式（天地图 + Leaflet） */

.location-map {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef1f5;
  margin: 18px 0;
  border: 1px solid var(--c-line, #e3ddd0);
}

.location-map__caption {
  margin: 8px 2px 20px;
}

.location-map__name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-ink, #3a2317);
  margin: 0 0 4px;
}

.location-map__addr {
  color: #6b5b4d;
  margin: 0 0 4px;
}

.location-map__desc {
  color: #8a7a6b;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.location-map__fallback {
  padding: 18px 20px;
  background: #fbf7ef;
  border: 1px dashed #d8cdb8;
  border-radius: 10px;
  color: #6b5b4d;
}

.location-map__fallback .location-map__name {
  color: #3a2317;
}

.location-map__coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: #8a7a6b;
  margin: 8px 0 4px;
}

.location-map__hint {
  font-size: 0.85rem;
  margin: 0;
}

/* 全球宗亲分布聚合页 */
.cluster-map {
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--c-line, #e3ddd0);
  background: #eef1f5;
}

.location-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.location-list__item {
  padding: 12px 14px;
  border: 1px solid var(--c-line, #e3ddd0);
  border-radius: 10px;
  background: #fffdf8;
}

.location-list__item .location-map__name {
  font-size: 0.98rem;
}

.location-list__item .location-map__addr {
  font-size: 0.86rem;
}

/* ── 全球宗亲分布 · 重设计（2026-08-10） ── */
.dist-map-card {
  position: relative;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #eef0ea;
}

.dist-map-card .cluster-map {
  border: 0;
  border-radius: 0;
}

.dist-map-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--smoke);
}

.dist-map-card__src {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 10;
  font-size: 0.75rem;
  color: var(--bronze);
}

.dist-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0 28px;
}

.dist-legend__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  border-radius: 999px;
  padding: 5px 14px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.dist-legend__pill:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.dist-legend__pill.is-active {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  border-color: var(--gold);
  font-weight: 600;
}

.dist-legend__pill:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.dist-legend__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mc, #9e1c13);
  flex: none;
}

.dist-list {
  margin-top: 8px;
}

.dist-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px 18px 16px 42px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.dist-card__dot {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mc, #9e1c13);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc, #9e1c13) 22%, transparent);
}

.dist-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 20, 16, 0.08);
}

.dist-card__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 6px;
}

.dist-card__addr {
  font-size: 0.88rem;
  color: var(--smoke);
  margin: 0 0 4px;
}

.dist-card__coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--gold-deep);
  margin: 0;
}

.dist-empty {
  text-align: center;
  color: var(--smoke);
  padding: 40px 0;
}

/* ── 自定义地图标注（divIcon，纯 CSS 不依赖图片） ── */
.dist-marker { background: transparent; border: none; }

.dist-marker__pin {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--mc, #9e1c13);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  transition: transform .2s ease;
}

.dist-marker__pin::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
}

/* hover 放大（非触屏设备） */
@media (hover: hover) {
  .dist-marker:hover .dist-marker__pin {
    transform: rotate(-45deg) scale(1.25);
  }
}

/* markercluster 聚合圈配色（与品牌色协调） */
.cluster-map .marker-cluster-small { background-color: rgba(200, 164, 92, .35); }
.cluster-map .marker-cluster-small div { background-color: rgba(200, 164, 92, .7); }
.cluster-map .marker-cluster-medium { background-color: rgba(158, 28, 19, .35); }
.cluster-map .marker-cluster-medium div { background-color: rgba(158, 28, 19, .7); }
.cluster-map .marker-cluster-large { background-color: rgba(26, 20, 16, .35); }
.cluster-map .marker-cluster-large div { background-color: rgba(26, 20, 16, .7); }
.cluster-map .marker-cluster { color: #fff; }

/* ── 全球分布 · 两 Tab 设计（2026-08-11 凌晨功能设计） ── */
.dist-tabs {
  display: flex;
  gap: 6px;
  margin: 28px 0 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.dist-tabs__btn {
  position: relative;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--smoke);
  padding: 10px 18px 14px;
  cursor: pointer;
  transition: color .2s var(--ease);
}

.dist-tabs__btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}

.dist-tabs__btn:hover { color: var(--ink); }

.dist-tabs__btn.is-active {
  color: var(--ink);
  font-weight: 600;
}

.dist-tabs__btn.is-active::after { transform: scaleX(1); }

.dist-panel.is-hidden { display: none; }

/* 双语卡片（中上英下） */
.dist-card--bilingual { padding-left: 42px; cursor: pointer; }
.dist-card--bilingual:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.dist-card__name-en {
  font-size: 0.82rem;
  letter-spacing: .02em;
  color: var(--bronze);
  margin: 0 0 6px;
}

.dist-card.is-active {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(26, 20, 16, .1);
}

/* 聚居地：大洲图标网格（空态占位，会员经纬度录入后接聚类） */
.dist-continents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin: 8px 0 0;
}

.dist-continent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}

.dist-continent:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.dist-continent__icon {
  width: 34px;
  height: 34px;
  color: var(--gold-deep);
}

.dist-continent__name { font-size: 0.95rem; color: var(--ink); }
.dist-continent__name-en { font-size: 0.76rem; color: var(--bronze); }

.dist-settlement-empty {
  text-align: center;
  color: var(--smoke);
  padding: 28px 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-card);
  margin: 16px 0 0;
  background: color-mix(in srgb, var(--surface-card) 70%, transparent);
}

/* ── hover 复制坐标按钮（08-11 凌晨第16行约定） ── */
.dist-card__copy {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: 999px;
  background: var(--surface-card);
  font: inherit;
  font-size: 0.78rem;
  color: var(--smoke);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.dist-card:hover .dist-card__copy,
.dist-card:focus-within .dist-card__copy,
.dist-card__copy.is-shown {
  opacity: 1;
  transform: translateY(0);
}
.dist-card__copy:hover { color: var(--gold-deep); border-color: var(--gold); }
.dist-card__copy svg { color: currentColor; }
