/* Destinations map — Field Guide skin (matches global.css palette; page vars
   --paper/--paper-hi/--ink/--ink-soft/--line/--seal etc. come from the site). */
.explore-map { margin: 1.4rem 0 0; }
.map-stage {
  position: relative;
  background: var(--paper-hi, #fbf8f1);
  border: 1px solid var(--line, #d9d1bf);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(35, 32, 26, 0.12);
  padding: 10px;
}
.map-watermark {
  position: absolute; right: -1%; top: -12%;
  font-family: Georgia, 'Palatino Linotype', serif;
  font-size: min(30vw, 360px); line-height: 1;
  color: rgba(35, 32, 26, 0.05);
  pointer-events: none; user-select: none; z-index: 0;
}
.explore-map svg { position: relative; z-index: 1; width: 100%; height: auto; display: block; cursor: grab; touch-action: none; }
.explore-map svg.panning { cursor: grabbing; }
.province { fill: #ece6d6; stroke: #b9ae94; stroke-width: 0.9; stroke-linejoin: round; }
.nine-dash { fill: none; stroke: #8a8267; stroke-width: 1.5; opacity: 0.75; stroke-dasharray: 5 4; stroke-linecap: round; }

/* city markers — two layers: hit (map coords, grows with zoom) + mk (counter-scaled) */
.hit { cursor: pointer; }
.hit:focus-visible { outline: 2px dashed var(--seal, #b03a26); }
.hit circle { fill: transparent; }
.mk { pointer-events: none; }
.mk .label { pointer-events: auto; cursor: pointer; }
.mk .label:hover { font-size: 13px; }
.mk .ring {
  fill: none; stroke-width: 1.5; opacity: 0.85;
  transform-box: fill-box; transform-origin: center;
  animation: cn-pulse 2.6s ease-out infinite;
}
.hit:hover + .mk .ring, .mk.active .ring { animation-duration: 1.2s; }
@keyframes cn-pulse { 0% { transform: scale(0.55); opacity: 0.9; } 70%, 100% { transform: scale(2); opacity: 0; } }
.mk .dot { stroke: var(--paper-hi, #fbf8f1); stroke-width: 1.6; }
.mk .label {
  fill: var(--ink, #23201a); font-family: Georgia, 'Palatino Linotype', serif;
  font-size: 12.5px; font-weight: 600;
  paint-order: stroke; stroke: rgba(245, 240, 230, 0.92); stroke-width: 3px;
  transition: font-size 0.15s;
}
.mk.active .label { font-size: 13.5px; fill: #8a2c1c; }

/* overlays */
.mapctl { position: absolute; right: 12px; top: 10px; display: flex; gap: 8px; align-items: center; z-index: 2; }
.mapctl .zoomlvl {
  font-size: 12px; color: var(--ink-soft, #4e483d);
  background: var(--paper-hi, #fbf8f1); border: 1px solid var(--line, #d9d1bf);
  border-radius: 2px; padding: 3px 10px; font-variant-numeric: tabular-nums;
}
.mapctl button, .legend .lg {
  font-size: 12px; color: var(--ink, #23201a);
  background: var(--paper-hi, #fbf8f1);
  border: 1px solid var(--ink, #23201a); border-radius: 2px;
  padding: 3px 12px; cursor: pointer; font-weight: 600;
}
.mapctl button:hover { color: var(--seal, #b03a26); border-color: var(--seal, #b03a26); }
.legend {
  position: absolute; left: 12px; bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 2;
  background: var(--paper-hi, #fbf8f1); border: 1px solid var(--line, #d9d1bf);
  border-radius: 2px; padding: 6px 12px;
}
.legend .lg { border: 1px solid transparent; padding: 1px 2px; font-weight: 400; color: var(--ink-soft, #4e483d); }
.legend .lg:hover { color: var(--ink, #23201a); }
.legend .lg.off { opacity: 0.4; text-decoration: line-through; }
.legend i { width: 8px; height: 8px; border-radius: 1px; display: inline-block; margin-right: 6px; }
.map-hint { padding: 6px 4px 2px; }

/* tooltip card — paper card, hard shadow, square corners (site idiom) */
.cn-tip {
  position: fixed; z-index: 90; width: 266px; pointer-events: none;
  background: var(--paper-hi, #fbf8f1);
  border: 1px solid var(--ink, #23201a); border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(35, 32, 26, 0.18);
  padding: 13px 15px 11px; opacity: 0; transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.cn-tip.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cn-tip h3 {
  font-family: Georgia, 'Palatino Linotype', serif; font-size: 17.5px; color: var(--ink, #23201a);
  display: flex; align-items: baseline; gap: 8px; margin: 0; letter-spacing: -0.01em;
}
.cn-tip h3 .zh { font-size: 12px; color: var(--ink-soft, #4e483d); font-weight: 400; }
.cn-tip .tag {
  display: inline-block; margin-top: 7px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; padding: 2px 9px;
  border-radius: 2px; border: 1px solid;
}
.cn-tip .desc { margin-top: 8px; font-size: 12.6px; line-height: 1.6; color: var(--ink-soft, #4e483d); }
.cn-tip .stats { margin-top: 9px; border-top: 1px dashed var(--line, #d9d1bf); padding-top: 7px; }
.cn-tip .row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.3px; padding: 2.5px 0; }
.cn-tip .row span { color: var(--ink-soft, #4e483d); }
.cn-tip .row .v { text-align: right; color: var(--ink, #23201a); }
.cn-tip .pairs { margin-top: 7px; font-size: 11.8px; color: var(--ink-soft, #4e483d); }
.cn-tip .cta {
  display: block; margin-top: 10px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--paper-hi, #fbf8f1);
  background: var(--seal, #b03a26); border-radius: 2px; padding: 7px 10px;
  text-decoration: none;
}
.cn-tip .cta:hover { background: #8a2c1c; }
.cn-tip .foot {
  margin-top: 8px; font-size: 10.5px; color: #9a927f;
  text-transform: uppercase; letter-spacing: 0.08em; text-align: center;
}

/* text catalog under the map (SEO + no-JS + mobile-friendly list) */
.map-catalog { margin-top: 1.2rem; }
.map-catalog h3 { margin-bottom: 0.4rem; }
.map-catalog ul { margin: 0; }

@media (max-width: 640px) {
  .legend { position: static; margin: 6px 4px 0; width: max-content; max-width: 100%; }
  .cn-tip { width: min(92vw, 300px); }
}
