:root {
  color-scheme: dark;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #f2f2e9;
  background: #101a20;
  --gold: #ebc27a;
  --panel: rgba(18, 29, 35, .93);
  --muted: #aab9ba;
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; border: 0; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button:hover { filter: brightness(1.18); }
button:active { transform: translateY(1px); }
[hidden] { display: none !important; }
#county-world { display: block; position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
.topbar {
  position: fixed; inset: 0 0 auto; height: 92px; padding: 23px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(#101a20e8, #101a2000); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-size: 21px; font-weight: 650; }
.brand-symbol { display: grid; place-items: center; border: 1px solid #ebc27a75; border-radius: 9px; width: 43px; height: 43px; color: var(--gold); font-family: serif; }
.brand small { display: block; font-size: 10px; font-weight: 400; letter-spacing: 3px; color: var(--muted); margin-top: 3px; }
nav { display: flex; gap: 5px; background: #101b22d9; padding: 5px; border: 1px solid #ffffff12; border-radius: 12px; }
nav button { background: transparent; border-radius: 8px; padding: 10px 21px; font-size: 13px; color: #bcc9c9; }
nav .active { color: #fff3d9; background: #46534a; }
.quiet { padding: 12px 0 12px 16px; color: #bfcdcc; background: transparent; font-size: 12px; }
.intro { position: fixed; left: 42px; top: 24%; z-index: 2; pointer-events: none; transition: opacity .4s, transform .4s; }
.intro.collapsed { opacity: 0; transform: translateX(-25px); visibility: hidden; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--gold); }
h1 { font-size: clamp(28px, 3vw, 43px); line-height: 1.48; letter-spacing: 1px; font-weight: 550; margin: 20px 0; text-shadow: 0 2px 35px #101a20; }
.intro p { color: #b4c4c4; font-size: 13px; line-height: 2; margin: 0 0 27px; }
.primary { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 15px 19px; color: #182424; background: var(--gold); border-radius: 7px; font-size: 13px; font-weight: 650; text-decoration: none; pointer-events: auto; }
.primary span { font-size: 19px; line-height: 1; }
.intro .primary { width: 208px; }
.coverage { font-size: 10px; letter-spacing: .5px; color: #8ea4a5; margin-top: 26px; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #a5c39d; margin-right: 7px; }
#map-labels { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.map-label { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; }
.school-label { pointer-events: auto; border: 1px solid #ebc27a99; padding: 10px 15px; background: #17272af2; border-radius: 7px; color: #ffe4b5; box-shadow: 0 8px 30px #0006; font-size: 13px; }
.school-label:after { content: ''; position: absolute; width: 1px; height: 30px; background: var(--gold); left: 50%; top: 100%; }
.school-label small { margin-left: 12px; color: #90a5a7; font-size: 10px; }
.city-label { font-size: 13px; letter-spacing: 4px; font-weight: 500; color: #e0e6d9; text-shadow: 0 2px 5px #000, 0 0 8px #000; }
.landmark { width: 290px; position: fixed; left: 34px; top: 128px; z-index: 5; border: 1px solid #ffffff16; border-radius: 13px; background: var(--panel); box-shadow: 0 14px 50px #0003; overflow: hidden; }
.card-top { display: flex; align-items: center; justify-content: space-between; padding: 13px 17px; }
.card-top button, .dialog-close { background: transparent; color: #bdc9c6; font-size: 25px; }
.landmark img { width: 100%; height: 135px; object-fit: cover; display: block; }
.card-body { padding: 19px; }
h2 { font-size: 21px; font-weight: 550; margin: 0 0 7px; }
.card-body p { margin: 0; font-size: 11px; color: var(--muted); }
.coordinates { font: 10px ui-monospace, monospace; color: #9ab0ad; margin: 15px 0 22px; }
.card-body .primary { font-size: 12px; padding: 13px; }
.card-body small { display: block; margin-top: 13px; color: #8fa4a4; font-size: 10px; }
.map-tools { position: fixed; right: 29px; bottom: 119px; display: flex; flex-direction: column; gap: 9px; z-index: 6; }
.map-tools button { width: 44px; height: 44px; background: var(--panel); border: 1px solid #ffffff1b; border-radius: 9px; font-size: 11px; }
#north-button { height: 57px; display: grid; place-items: center; align-content: center; gap: 3px; }
#north-arrow { display: block; color: var(--gold); font-size: 22px; }
#north-button small { font-size: 9px; color: #a8b8b7; }
.zoom-buttons { display: grid; }
.zoom-buttons button { font-size: 23px; }
.zoom-buttons button:first-child { border-radius: 9px 9px 0 0; border-bottom: 0; }
.zoom-buttons button:last-child { border-radius: 0 0 9px 9px; }
.settings { position: fixed; bottom: 120px; right: 86px; width: 248px; background: var(--panel); padding: 23px; border: 1px solid #ffffff1b; border-radius: 12px; z-index: 6; box-shadow: 0 12px 40px #0004; }
.settings h2 { font-size: 14px; margin-bottom: 21px; }
.settings label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #c0cecb; margin: 15px 0; }
.settings input[type=checkbox] { accent-color: var(--gold); width: 15px; height: 15px; }
.settings output { margin-left: auto; color: var(--gold); }
.settings input[type=range] { width: 100%; accent-color: var(--gold); }
.settings p { color: #8da1a1; font-size: 10px; line-height: 1.8; margin-bottom: 0; }
.bottom-bar { position: fixed; bottom: 41px; left: 36px; right: 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; pointer-events: none; z-index: 4; }
.interaction-hint { font-size: 10px; color: #b3c2c2; text-shadow: 0 1px 4px #000; }
.interaction-hint span { padding: 0 9px; color: #687f80; }
.scale-wrap { width: 122px; font-size: 10px; text-align: center; color: #bcc9c6; }
#scale-bar { height: 6px; border: 1px solid #b3c6bf; border-top: 0; margin: 5px auto 0; }
.attribution { position: fixed; left: 36px; right: 26px; bottom: 12px; color: #8b9c9e; font-size: 9px; z-index: 5; }
.attribution button { background: transparent; color: #c8d4ce; font-size: inherit; padding-left: 6px; text-decoration: underline; }
.readout { position: fixed; bottom: 87px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 15px; background: var(--panel); border: 1px solid #ffffff20; padding: 13px 17px; border-radius: 8px; z-index: 5; font-size: 11px; }
.readout button { background: transparent; font-size: 18px; }
#point-coordinates { font-family: ui-monospace, monospace; color: #d1dfd7; }
#point-distance { color: var(--gold); }
#loading { position: fixed; inset: 0; background: #101a20f5; z-index: 30; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 22px; font-size: 13px; color: #b8c8c5; padding: 30px; text-align: center; line-height: 1.8; }
#loading button { background: var(--gold); color: #172424; padding: 12px 22px; border-radius: 6px; }
.loader { width: 30px; height: 30px; border: 2px solid #ffffff12; border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-status { position: fixed; bottom: 115px; left: 50%; transform: translateX(-50%); color: #e6cc9e; font-size: 11px; pointer-events: none; }
dialog { max-width: 640px; width: calc(100% - 32px); max-height: 84dvh; background: #17252b; color: #d8e2dc; border: 1px solid #ffffff26; border-radius: 14px; padding: 34px; box-shadow: 0 20px 100px #0008; }
dialog::backdrop { background: #061015b8; backdrop-filter: blur(7px); }
.dialog-close { position: absolute; right: 16px; top: 12px; }
dialog h2 { font-size: 24px; margin: 17px 0; }
dialog p { font-size: 12px; line-height: 1.9; color: #a8bcb7; }
.source-item { border-top: 1px solid #ffffff14; padding: 15px 0; }
.source-item h3 { font-size: 13px; margin: 0; font-weight: 550; }
.source-item p { margin: 8px 0; font-size: 11px; }
.source-item a { font-size: 11px; color: var(--gold); text-decoration: none; }
.source-note { background: #ffffff05; padding: 14px; border-radius: 6px; }
@media (max-width: 800px) {
  .topbar { padding: 18px 20px; }
  .brand { font-size: 18px; gap: 8px; }
  nav button { padding: 10px 14px; }
  .intro { left: 24px; top: 20%; }
  .intro h1 { font-size: 30px; }
  #sources-button { display: none; }
  .landmark { left: 21px; width: 250px; }
  .map-tools { right: 18px; }
  .bottom-bar { left: 20px; right: 20px; }
  .interaction-hint { max-width: 270px; line-height: 1.8; }
  .attribution { left: 20px; font-size: 8px; }
}
@media (max-width: 520px) {
  .topbar { padding: 16px; height: 81px; gap: 10px; }
  .brand-symbol { width: 32px; height: 37px; }
  .brand small { font-size: 8px; letter-spacing: 1px; }
  nav { gap: 0; padding: 3px; }
  nav button { padding: 9px 10px; font-size: 11px; }
  .intro { top: 100px; left: 22px; }
  .intro h1 { font-size: 27px; line-height: 1.4; margin: 12px 0; }
  .intro p { display: none; }
  .intro .primary { padding: 11px 13px; width: 180px; font-size: 12px; margin-top: 17px; }
  .coverage { margin-top: 14px; font-size: 8px; }
  .landmark { left: 14px; top: auto; bottom: 103px; width: 240px; }
  .landmark img { height: 85px; }
  .card-top { padding: 7px 14px; }
  .card-body { padding: 14px; }
  .coordinates { margin: 10px 0 14px; font-size: 9px; }
  .card-body h2 { font-size: 20px; }
  .card-body small { font-size: 9px; }
  .map-tools { right: 14px; bottom: 130px; }
  .map-tools button { width: 39px; height: 40px; }
  .settings { bottom: 130px; right: 63px; width: 230px; padding: 19px; }
  .interaction-hint { font-size: 0; max-width: 170px; }
  .interaction-hint:after { content: '单指旋转 · 双指缩放 / 平移'; font-size: 9px; }
  .interaction-hint span { display: none; }
  .bottom-bar { bottom: 57px; }
  .attribution { line-height: 1.6; bottom: 14px; max-width: 320px; }
  .readout { width: calc(100% - 28px); bottom: 88px; padding: 10px; font-size: 9px; gap: 8px; justify-content: space-between; }
  .school-label { padding: 8px 10px; font-size: 11px; }
  .school-label small { margin-left: 7px; font-size: 9px; }
  .city-label { font-size: 10px; }
  dialog { padding: 25px; }
  .map-status { bottom: 101px; font-size: 10px; width: 90%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .loader { animation: none; } .intro { transition: none; } }
.site-picker{position:fixed;right:30px;top:91px;z-index:6;display:flex;align-items:center;gap:8px;background:var(--panel);border-radius:6px;padding:9px;font-size:11px}.site-picker select{color:#e5eadd;background:#263832;max-width:160px;padding:5px;border-radius:3px}.site-picker a{color:var(--gold);text-decoration:none}@media(max-width:600px){.site-picker{right:10px;top:76px}.site-picker label{display:none}.intro{top:129px}}
