/* 校园地图 */
.map-page { padding: 96px 0 70px; background: #f8faff; }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.map-head h1 { font-size: clamp(26px, 3.6vw, 36px); margin: 8px 0 10px; letter-spacing: -.02em; }
.map-head p { color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 560px; margin: 0; }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.map-btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; cursor: pointer; }
.map-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.map-canvas { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; height: 580px; }
#campusMap { touch-action: none; width: 100%; height: 100%; display: block; transform-origin: center center; transition: transform .12s ease-out; cursor: grab; }
#campusMap:active { cursor: grabbing; }
.map-building { cursor: pointer; }
.map-building:hover rect { filter: brightness(.96); }
.map-tip { position: absolute; left: 14px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.9); border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.map-side { display: grid; gap: 14px; }
.map-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.map-card h3 { font-size: 15px; margin: 0 0 10px; }
.map-info { font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.map-info small { color: var(--muted); }
.map-form { display: grid; gap: 10px; }
.map-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.map-note { margin-top: 16px; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-canvas { height: 480px; }
}
@media (max-width: 720px) {
  .map-page { padding: 78px 0 50px; }
  .map-canvas { height: 400px; }
}
.map-nav-link { display: inline-block; margin-top: 8px; color: var(--blue); font-size: 12px; text-decoration: none; border-bottom: 1px dashed rgba(36,95,207,.35); }
.map-nav-link:hover { border-bottom-style: solid; }
.map-locate { position: absolute; right: 14px; bottom: 54px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.94); color: var(--blue); cursor: pointer; box-shadow: 0 6px 18px rgba(36,95,207,.12); }
.map-locate:hover { background: #eef4ff; }
.map-locate span { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #1f3f77; }
.map-locate.is-on { border-color: var(--blue); background: #eef4ff; }
.map-pulse { animation: mapPulse 1.6s ease-out infinite; transform-origin: center; }
@keyframes mapPulse { 0% { opacity: .55; r: 2; } 70% { opacity: 0; r: 5; } 100% { opacity: 0; r: 5; } }
.map-out { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 18px; border-radius: 12px; background: rgba(255,255,255,.96); border: 1px solid #f2d6d3; color: #b23b32; font-size: 13px; font-weight: 700; }
/* 地图图例 */
.map-legend {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  gap: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid #e4eaf4;
  font-size: 11.5px;
  color: #5f6b7d;
  box-shadow: 0 4px 14px rgba(20, 40, 70, .06);
}
.map-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-legend .dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.map-legend .dot.gate { background: #fff2cf; border: 1px solid #e6c46a; }
.map-legend .dot.teach { background: #dbe9ff; border: 1px solid #9fc0f0; }
.map-legend .dot.life { background: #f3edff; border: 1px solid #c3b2e6; }
.map-legend .dot.water { background: #cfe9f7; border: 1px solid #a9d3ee; }
@media (max-width: 720px) {
  .map-legend { right: 10px; top: 10px; gap: 9px; font-size: 10.5px; padding: 5px 8px; }
}

@media (max-width: 720px) {
  .map-tip { display: none; }
  .map-locate { display: none; }
  .map-legend { right: 8px; top: 8px; gap: 8px; font-size: 10px; padding: 4px 7px; }
}
.map-approx { display: flex; flex-wrap: wrap; gap: 8px; }
.map-approx button { min-height: 36px; padding: 0 12px; border: 1px solid #dbe4f2; border-radius: 999px; background: #fff; color: #35619e; font-size: 12.5px; cursor: pointer; }
.map-approx button:hover { background: #eef4ff; border-color: #b9cdf0; }
