* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #eef4f8;
  color: #2c3340;
  font: 14px/1.5 var(--font, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif);
  overflow: hidden;
}

/* 顶部标题 */
.hd {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  z-index: 400;
  pointer-events: none;
}
.hd h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .6px;
  color: #232935;
}
.hd .hint { font-size: 12px; color: #94a1ad; }

/* 舞台 */
.stage { position: absolute; inset: 0; }
.map { width: 100%; height: 100%; position: relative; z-index: 0; isolation: isolate; }

/* 引线层 */
.link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 15;
}
.link path.ln {
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: .8;
}
.link path.ln.on { stroke-width: 2.4; opacity: 1; }

/* 照片气泡层 */
.cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
.bub {
  position: absolute;
  left: 0; top: 0;
  width: 70px;
  height: 70px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  transition: opacity .2s, filter .2s;
}
.bub-in {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 3px;
  background: #fff;
  border: var(--bub-w, 2.5px) solid var(--bub, #334155);
  border-radius: var(--bub-r, 9px);
  box-shadow: var(--bub-sh, 0 5px 12px rgba(30,41,59,.28), 0 1px 3px rgba(30,41,59,.22));
  transition: transform .17s cubic-bezier(.2,.8,.3,1.3), box-shadow .17s, border-color .17s;
}
/* 气泡尾巴：指向城市点 */
.bub::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  margin-left: -7px;
  border-width: var(--tail-w, 9px) var(--tail-x, 7px) 0;
  border-style: solid;
  border-color: var(--bub, #334155) transparent transparent transparent;
  transition: border-color .17s;
}
.bub-in i {
  position: absolute;
  left: 3px; right: 3px; bottom: 3px;
  height: 13px;
  line-height: 13px;
  font-size: 8.5px;
  font-style: normal;
  text-align: center;
  color: var(--bub, #334155);
  background: rgba(255,255,255,.9);
  border-radius: 0 0 4px 4px;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bub img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  background: #f1f5f9;
}
.bub:hover { z-index: 800 !important; }
.bub:hover .bub-in {
  transform: scale(1.22) translateY(-3px);
  box-shadow: 0 10px 22px rgba(30,41,59,.34), 0 2px 5px rgba(30,41,59,.25);
  border-color: var(--bub, #1f2a3a);
}
.bub.muted { opacity: .28; filter: saturate(.35); }


/* 多图缩略图条 */
.pop-thumbs {
  display: flex;
  gap: 4px;
  padding: 5px 2px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.pop-thumbs:empty { display: none; }
.pop-thumbs::-webkit-scrollbar { display: none; }
.pth {
  flex: 0 0 auto;
  width: 38px;
  height: 28px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: #f1f5f9;
  cursor: pointer;
  opacity: .62;
  transition: opacity .15s, border-color .15s, transform .15s;
}
.pth img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pth:hover { opacity: 1; transform: translateY(-1px); }
.pth.on { opacity: 1; border-color: #e0356e; }

/* 多图气泡右上角的数量角标 */
.bub .cnt {
  position: absolute;
  top: -7px; right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e0356e;
  border: 2px solid #fff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  font-style: normal;
  box-shadow: 0 2px 5px rgba(224,53,110,.45);
  z-index: 2;
}

/* ---------- 拖动 ---------- */
.bub.drag { cursor: grabbing; transition: none; }
.bub.drag .bub-in {
  transform: scale(1.1) rotate(-1.2deg);
  box-shadow: 0 16px 32px rgba(30,41,59,.42), 0 3px 8px rgba(30,41,59,.3);
  border-color: #e0356e;
}
.bub { cursor: grab; touch-action: none; }

/* ---------- 大屏展示 ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 72px;
  background: rgba(16,22,32,.82);
  backdrop-filter: blur(6px) saturate(.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.lb.on { opacity: 1; pointer-events: auto; }

.lb-fig {
  margin: 0;
  max-width: min(1180px, 92vw);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(.94);
  transition: transform .22s cubic-bezier(.2,.8,.3,1.12);
}
.lb.on .lb-fig { transform: none; }

.lb-body {
  position: relative;
  max-width: 100%;
  padding: 8px;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 12px;
  box-shadow: 0 28px 70px rgba(0,0,0,.55);
  display: flex;
  cursor: zoom-in;
}
.lb-body img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1120px, 88vw);
  max-height: calc(100vh - 210px);
  border-radius: 6px;
  object-fit: contain;
  background: #0d1117;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-fig.zoomed { cursor: grab; transition: none; }
.lb-fig.zoomed.panning { cursor: grabbing; }
.lb-zoomui {
  position: absolute;
  right: 18px; bottom: 16px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.lb-zoomui button {
  width: 32px; height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(17,24,39,.62);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .15s;
}
.lb-zoomui button:hover { background: #e0356e; }
.lb-zoomui button.on { background: #e0356e; }
#lbOrig { width: auto; padding: 0 10px; font-size: 12px; letter-spacing: .5px; }
.lb-tip {
  position: absolute;
  left: 18px; bottom: 20px;
  font-size: 11.5px;
  color: rgba(255,255,255,.55);
  pointer-events: none;
}
.lb-tip em { font-style: normal; color: rgba(255,255,255,.8); }

.lb-cap {
  margin-top: 12px;
  text-align: center;
  color: #fff;
  line-height: 1.35;
}
.lb-cap b { display: block; font-size: 18px; font-weight: 700; letter-spacing: .6px; }
.lb-cap span { display: block; margin-top: 3px; font-size: 13px; color: #b9c6d6; }

.lb-thumbs {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  padding: 2px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.lb-thumbs:empty { display: none; }
.lb-thumbs::-webkit-scrollbar { display: none; }
/* 分组小标题：竖排小标签，夹在图带里 */
.lth-g {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0 3px 0 9px;
  padding: 0 8px;
  font-size: 11px;
  color: #dbe6f2;
  letter-spacing: .5px;
  white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,.22);
}
.lth-g:first-child { border-left: 0; margin-left: 0; }
.lth-g i {
  font-style: normal;
  font-size: 9.5px;
  color: #ff7fa8;
}
.lth {
  flex: 0 0 auto;
  width: 58px; height: 43px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.28);
  border-radius: 5px;
  overflow: hidden;
  background: #1b2432;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s, border-color .15s, transform .15s;
}
.lth img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lth:hover { opacity: 1; transform: translateY(-2px); }
.lth.on { opacity: 1; border-color: #ff3d7f; }

.lb-close {
  position: absolute;
  top: 18px; right: 20px;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.lb-close:hover { background: #e0356e; }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

@media (max-width: 900px) {
  .hd .hint { display: none; }
  .lb { padding: 20px 12px; }
  .lb-nav { width: 36px; height: 36px; font-size: 24px; }
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
}

/* 落地动画 */
@keyframes bubFall {
  from { opacity: 0; transform: translate3d(var(--cx), calc(var(--cy) - 34px), 0) scale(.86); }
  to   { opacity: 1; transform: translate3d(var(--cx), var(--cy), 0) scale(1); }
}
.bub.fall { animation: bubFall .5s cubic-bezier(.22,.9,.3,1) both; }
