.map-title {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem);
  letter-spacing: 0.2px;
  color: #2F3E46;
  /* 深莫兰迪绿 */
  margin-bottom: 1rem;
  margin-top: 100px;
}

.map-subtitle {
  color: #6c757d;
  font-size: 0.98rem;
  margin-bottom: 1.1rem;
}

.title-underline {
  height: 6px;
  width: 200px;
  background: linear-gradient(90deg, #A3B18A, #A78A9A);
  /* 访问(绿) → 居住(梅子灰) */
  border-radius: 999px;
  margin-bottom: .75rem;
}

/* --- Map card & border --- */
.map-card {
  background: #fff;
  border: 1px solid #E6ECE5;
  /* 柔和边框 */
  border-radius: 16px;
  padding: 12px 12px 0;
  /* 让边框和地图之间有呼吸感 */
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  padding-bottom: 12px;
}

#map {
  height: clamp(420px, 60vh, 680px);
  width: 100%;
  border-radius: 12px;
  /* 圆角让视觉更轻 */
  border: 2px solid #DFE6DD;
  /* 地图本身的细边框 */
  overflow: hidden;
  /* 裁掉瓦片边缘毛边 */
}

/* 可选：地图底色更雅致（瓦片没覆盖处） */
.leaflet-container {
  background: #F7FAF6;
}

/* Base circle style */
.modern-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease;
  transform-origin: center center;
}

.modern-marker:hover,
.modern-marker:focus-visible {
  transform: scale(1.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  outline: none;
}

/* Color variants */
.modern-marker.visited {
  background: #A3B18A;
}

/* Morandi green */
.modern-marker.lived {
  background: #A78A9A;
}

/* Morandi plum/gray */

/* Tooltip style */
.leaflet-tooltip.my-tooltip {
  background: #2d2f2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  font-size: 13px;
}

.leaflet-tooltip.my-tooltip:before {
  border-top-color: #2d2f2e;
}

.my-tooltip .tt-title {
  font-weight: 600;
  margin-bottom: 6px
}

.my-tooltip .tt-btn {
  display: inline-block;
  background: #fff;
  color: #2d2f2e;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px
}

.my-tooltip .tt-btn:focus,
.my-tooltip .tt-btn:hover {
  text-decoration: none;
  filter: brightness(0.95)
}

/* Legend */
.legend {
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font: 13px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #333;
}

.legend .row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font-weight: 700;
}

.legend .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
  display: inline-block;
}

.legend .dot.visited {
  background: #A3B18A;
}

.legend .dot.lived {
  background: #A78A9A;
}

/* Dark Mode Styles */
[data-theme="dark"] .map-title {
  color: var(--text-color);
}

[data-theme="dark"] .map-subtitle,
[data-theme="dark"] .text-muted {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .map-card {
  background: rgba(30, 30, 35, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #map {
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .leaflet-container {
  background: #1a1a1e;
}

[data-theme="dark"] .legend {
  background: rgba(30, 30, 35, 0.95);
  color: var(--text-color);
}