:root {
  --ink: #17232d;
  --muted: #687481;
  --canvas: #f4f6f7;
  --paper: #fff;
  --line: #dce3e7;
  --brand: #1456a0;
  --red: #bd2635;
  --shell: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; line-height: 1.6; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.map-shell { width: min(var(--shell), calc(100% - 32px)); margin-inline: auto; }
.map-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(244, 246, 247, .94); backdrop-filter: blur(14px); }
.map-header-inner { min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; width: max-content; color: #4d5c68; font-size: 12px; font-weight: 700; }
.back-link svg, .icon-link svg { width: 18px; }
.map-brand { display: flex; align-items: center; gap: 10px; }
.map-brand img { width: 42px; height: 42px; object-fit: contain; }
.map-brand strong, .map-brand small { display: block; text-align: center; }
.map-brand strong { font-size: 15px; }
.map-brand small { color: var(--muted); font-size: 9px; }
.icon-link { justify-self: end; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #d6dfe4; border-radius: 50%; background: #fff; }

main { padding-block: 30px 46px; }
.map-intro { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; }
.map-intro > p, .facts-heading p, .map-sources > div > p { grid-column: 1 / -1; margin: 0 0 -16px; color: var(--brand); font-size: 10px; font-weight: 800; }
.map-intro h1 { margin: 0; font-size: 30px; line-height: 1.2; }
.map-actions { display: flex; align-items: center; gap: 10px; }
.campus-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.campus-switch a { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 5px; color: #586671; font-size: 11px; font-weight: 700; }
.campus-switch a:hover, .campus-switch a:focus-visible { color: var(--brand); background: #edf4fd; }
.map-actions > a { min-height: 40px; padding: 0 13px; display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; color: #fff; background: var(--brand); font-size: 11px; font-weight: 800; }
.map-actions > a svg { width: 15px; }

.map-tool { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(32, 53, 68, .08); }
.map-toolbar { min-height: 52px; padding: 8px 12px 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.map-toolbar > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.map-toolbar > span svg { width: 15px; }
.map-toolbar > a { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-size: 10px; font-weight: 800; }
.map-toolbar > a svg { width: 14px; }
.amap-frame-wrap { height: clamp(480px, 64vh, 640px); overflow: hidden; background: #e8ecef; }
.amap-frame-wrap iframe { width: 100%; height: 100%; display: block; border: 0; }
.map-place-summary { min-height: 72px; padding: 12px 14px 12px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); }
.map-place-summary span, .map-place-summary small { display: block; }
.map-place-summary span { font-size: 14px; font-weight: 800; }
.map-place-summary small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.map-place-actions { display: flex; gap: 7px; }
.map-place-actions a { min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; color: #52616c; background: #fff; font-size: 10px; font-weight: 800; }
.map-place-actions a.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.map-place-actions svg { width: 14px; }

.campus-facts { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts-heading { grid-column: 1 / -1; margin-bottom: 7px; }
.facts-heading p, .map-sources > div > p { margin-bottom: 2px; }
.facts-heading h2, .map-sources h2 { margin: 0; font-size: 21px; }
.campus-facts article { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.campus-facts article header { display: flex; align-items: center; gap: 10px; }
.campus-facts article header > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--brand); font-size: 10px; font-weight: 800; }
.campus-facts article:nth-of-type(2) header > span { background: #2f8b70; }
.campus-facts article:nth-of-type(3) header > span { background: #b9872d; }
.campus-facts strong, .campus-facts small { display: block; }
.campus-facts strong { font-size: 14px; }
.campus-facts small { color: var(--muted); font-size: 9px; }
.campus-facts article p { margin: 12px 0 0; color: #5f6d78; font-size: 11px; }

.map-sources { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.map-sources > p { max-width: 780px; margin: 10px 0 0; color: #5f6d78; font-size: 12px; }
.source-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.source-links a { min-height: 38px; padding: 0 11px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 10px; font-weight: 700; }
.source-links svg { width: 13px; color: var(--brand); }
.source-preview { width: 100%; margin: 20px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.source-preview img { width: 100%; max-width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 6px; }
.source-preview figcaption strong, .source-preview figcaption span { display: block; }
.source-preview figcaption strong { font-size: 13px; }
.source-preview figcaption span { margin-top: 5px; color: #687681; font-size: 10px; }
.source-preview figcaption { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; }
.source-preview figcaption strong, .source-preview figcaption span { grid-column: 1; }
.source-preview figcaption a { grid-column: 2; grid-row: 1 / span 2; min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; color: var(--brand); background: #edf4fd; border-radius: 6px; font-size: 10px; font-weight: 800; }
.source-preview figcaption a svg { width: 13px; }
.map-sources > small { display: block; margin-top: 12px; color: #7b8790; font-size: 9px; }
footer { padding: 24px 0; color: #cbd3d8; background: #202a31; text-align: center; font-size: 10px; }

@media (max-width: 760px) {
  .map-shell { width: min(var(--shell), calc(100% - 20px)); }
  .map-header-inner { min-height: 60px; grid-template-columns: auto 1fr auto; }
  .back-link span { display: none; }
  .map-brand { justify-self: center; }
  .map-brand img { width: 34px; height: 34px; }
  .map-brand strong { font-size: 13px; }
  .map-brand small { font-size: 8px; }
  .icon-link { width: 36px; height: 36px; }
  main { padding-top: 22px; }
  .map-intro { grid-template-columns: 1fr; align-items: stretch; }
  .map-intro > p { margin-bottom: -14px; }
  .map-intro h1 { font-size: 25px; }
  .map-actions { justify-content: space-between; }
  .campus-switch { min-width: 0; }
  .campus-switch a { padding-inline: 8px; font-size: 10px; }
  .map-actions > a { padding-inline: 10px; }
  .map-toolbar > span { font-size: 9px; }
  .map-toolbar > a { font-size: 9px; }
  .amap-frame-wrap { height: clamp(430px, 56vh, 560px); }
  .map-place-summary { align-items: stretch; flex-direction: column; gap: 10px; }
  .map-place-actions { width: 100%; }
  .map-place-actions a { flex: 1; justify-content: center; }
  .campus-facts { grid-template-columns: 1fr; }
  .campus-facts article { padding: 15px; }
  .source-preview { gap: 9px; }
  .source-preview figcaption { grid-template-columns: 1fr; }
  .source-preview figcaption a { grid-column: 1; grid-row: auto; width: max-content; margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
