* { box-sizing: border-box; }

:root {
  --primary: #2f6bff;
  --primary-dark: #1f4fd8;
  --text: #1b2434;
  --muted: #6b7689;
  --line: #e8edf5;
  --bg: #f5f7fb;
}

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body.map-panel-open { overflow: hidden; }

.page {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.hero {
  border-radius: 24px;
  padding: 28px 24px 26px;
  color: #fff;
  background: linear-gradient(135deg, #3b7cff 0%, #6a5cf6 100%);
  box-shadow: 0 14px 30px rgba(59, 124, 255, 0.22);
}

.hero__badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.hero h1 {
  margin: 16px 0 8px;
  font-size: 28px;
  line-height: 1.25;
}

.hero p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 2px 14px;
  font-size: 15px;
  font-weight: 600;
}

.section-title span { font-size: 12px; font-weight: 400; color: var(--muted); }

.nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(27, 36, 52, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-card:active { transform: scale(0.985); }
.nav-card:hover { box-shadow: 0 10px 24px rgba(47, 107, 255, 0.12); }

.nav-card__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #edf3ff;
  color: var(--primary);
}

.nav-card__icon svg { width: 22px; height: 22px; }

.nav-card__body { flex: 1; min-width: 0; }
.nav-card__title { font-size: 16px; font-weight: 600; }
.nav-card__desc { margin-top: 4px; font-size: 13px; color: var(--muted); }
.nav-card__arrow { color: #b3bdcc; font-size: 20px; }

.map-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  padding: 16px 20px;
  border: 0;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(47, 107, 255, 0.25);
}

.map-trigger:active { background: var(--primary-dark); transform: translateY(1px); }
.map-trigger svg { width: 19px; height: 19px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.back-link:hover { color: var(--primary); border-color: #c9d9ff; }

.info-card {
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.info-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.info-card__name { font-size: 16px; font-weight: 600; }
.info-card__tag {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecf6f1;
  color: #15803d;
  font-size: 12px;
}

.info-card__desc { margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--muted); }

.route-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}

.route-step:last-child { border-bottom: 0; padding-bottom: 0; }

.route-step__dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px #e8f0ff;
}

.route-step__text { font-size: 15px; font-weight: 600; }
.route-step__sub { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* 地图面板 */
.map-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-panel.is-open { opacity: 1; pointer-events: auto; }

.map-panel__box {
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  transform: translateY(14px);
  transition: transform 0.2s ease;
}

.map-panel.is-open .map-panel__box { transform: translateY(0); }

.map-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.map-panel__title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; }

.map-panel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px #e7f9ee;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f2f5fa;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover { background: #e6ecf5; color: var(--text); }

/* 地图容器必须有固定高度，否则不渲染 */
.map-panel__map {
  width: 100%;
  height: 56vh;
  min-height: 320px;
  background: #eef2f7;
}

.map-panel__error {
  margin: 0;
  padding: 14px 18px;
  background: #fff5f5;
  color: #c53030;
  font-size: 13px;
}

.map-panel__info { padding: 14px 18px 10px; }
.map-panel__place { font-size: 15px; font-weight: 600; }
.map-panel__coord { margin-top: 6px; font-size: 12px; color: var(--muted); }

.app-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 6px 18px 18px;
}

.app-link {
  padding: 12px 4px;
  border: 1px solid #d9e4ff;
  border-radius: 12px;
  background: #f4f8ff;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.app-link:hover { background: #e8f0ff; }
.app-link:active { transform: translateY(1px); }

/* 图片热区 */
.page-head { padding: 6px 2px 18px; }
.page-head h1 { margin: 0 0 6px; font-size: 24px; }
.page-head p { margin: 0; font-size: 13px; color: var(--muted); }

.hotspot-image {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(27, 36, 52, 0.08);
}

.hotspot-image > img { display: block; width: 100%; height: auto; }
.hotspot-overlay { position: absolute; inset: 0; pointer-events: none; }

.hotspot {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 16px;
  text-decoration: none;
  pointer-events: auto;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.hotspot:hover, .hotspot:focus-visible {
  background: rgba(47, 107, 255, 0.14);
  border-color: rgba(47, 107, 255, 0.85);
  outline: none;
}

.hotspot__label {
  margin: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label,
.show-hotspots .hotspot__label { opacity: 1; }

.show-hotspots .hotspot {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.14);
}

.hotspot-image__error {
  padding: 28px 18px;
  background: #fff5f5;
  color: #c53030;
  font-size: 13px;
  text-align: center;
}

.hotspot-tip { margin: 14px 2px 0; font-size: 12px; color: var(--muted); text-align: center; }

@media (max-width: 360px) {
  .hero h1 { font-size: 24px; }
  .app-links { gap: 6px; }
  .app-link { font-size: 13px; }
}
