@charset "UTF-8";

:root {
  color-scheme: light;
  --ink: #183c37;
  --subtle: #4f6660;
  --paper: #f8f5ec;
  --card: #fffdf6;
  --line: #dfdfd1;
  --accent: #c45736;
  --green: #286455;
  --focus: #b74827;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
button, summary { cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
.skip { position: absolute; top: 8px; left: -100vw; z-index: 5; background: white; padding: 10px; }
.skip:focus { left: 8px; }

.topbar { border-bottom: 1px solid #e9e5d8; background: #fbf9f0; }
.top-inner, .page { width: min(1370px, 100% - 64px); margin-inline: auto; }
.top-inner { display: flex; min-height: 66px; justify-content: space-between; align-items: center; gap: 16px; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 11px; font-size: 1.03rem; font-weight: 800; }
.brand-icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px;
  color: #fff9df; background: var(--green); font: 24px/1 Georgia, serif;
}
.quiet, .primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 7px 15px; border-radius: 10px; border: 1px solid #dcded0;
  background: var(--card); color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none;
}
.quiet:hover { background: #f1f1e6; }
.primary { background: var(--green); border-color: var(--green); color: white; }
.primary:hover { background: #204e43; }
.page { padding-block: 29px 42px; }

.intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px; color: var(--green);
  font-size: .9rem; font-weight: 800; letter-spacing: .12em;
}
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: #d27853; }
.intro h1 { font-size: clamp(2.8rem, 5.5vw, 5.1rem); letter-spacing: -.07em; line-height: 1.05; margin: 7px 0 12px; font-weight: 900; }
.intro h1 span { color: var(--accent); margin-left: .07em; }
.intro-copy > p:last-child { color: var(--subtle); line-height: 1.7; }
.progress-panel {
  flex: 0 0 290px; padding: 14px 17px; border: 1px solid #dfe2d2;
  border-radius: 15px; background: #f0f1e5;
}
.progress-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .9rem; font-weight: 700; }
.progress-label strong { color: var(--green); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.progress-panel progress { display: block; width: 100%; height: 9px; margin: 10px 0 9px; border: 0; appearance: none; border-radius: 99px; overflow: hidden; background: #dde3d4; }
progress::-webkit-progress-bar { background: #dde3d4; }
progress::-webkit-progress-value { background: #438270; }
progress::-moz-progress-bar { background: #438270; }
.progress-panel p { font-size: .86rem; color: var(--subtle); }

.explore { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 18px; align-items: start; }
.atlas, .passport { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 7px 25px #333a2110; }
.atlas { overflow: hidden; }
.atlas-header, .atlas-footer {
  min-height: 49px; display: flex; justify-content: space-between; align-items: center; gap: 9px 13px; padding: 9px 16px;
}
.atlas-header h2, .passport h2 { font-size: 1.12rem; font-weight: 850; }
.map-glyph { color: var(--accent); margin-right: 3px; }
.legend { display: flex; align-items: center; gap: 13px; font-size: .86rem; color: var(--subtle); }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.legend-new { background: #b2b8b3; }
.legend-done { background: #489478; }
.map-scroll { overflow: auto; background: #dceceb; }
.map-scroll-tip { display: none; }
.map-stage { position: relative; isolation: isolate; aspect-ratio: 860 / 552; }
#geography, .markers { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
#geography { background: #dceceb; }
.country { fill: #f0eddb; stroke: #a9b3a0; stroke-width: .75; stroke-linejoin: round; }
.country.neighbor { fill: #e8e7d8; }
.country.featured { fill: #faf1d2; stroke: #a8ac92; }
.country.featured.active { fill: #e5eccd; }
.grid-line { fill: none; stroke: #8aaca9; stroke-width: .6; opacity: .36; stroke-dasharray: 2 6; }
.map-note { fill: #537c7d; font-size: 12px; letter-spacing: .17em; font-weight: 700; }
.map-place { fill: #667260; font-size: 10px; letter-spacing: .06em; paint-order: stroke; stroke: #f0eddb; stroke-width: 2px; }
.compass { fill: #3b6b67; stroke: #3b6b67; }
.route { fill: none; stroke: #76988b; stroke-width: 1.45; stroke-dasharray: 3 5; opacity: .8; }
.position-dot { fill: #578070; stroke: #f8f5e9; stroke-width: 1.25; }
.atlas-footer { min-height: 41px; color: var(--subtle); font-size: .83rem; }

.pin {
  display: grid; justify-items: center; position: absolute; z-index: 1;
  left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  text-decoration: none; border-radius: 12px; min-width: 44px;
}
.pin:hover, .pin:focus-visible { z-index: 4; }
.pin-medallion {
  width: clamp(40px, 4.3vw, 61px); aspect-ratio: 1; position: relative;
  border: 2px solid #b5bcb4; border-radius: 50%;
  box-shadow: 0 2px 5px #2d463845; background: #faf6ea;
  transition: border-color .25s, scale .2s;
}
.pin:hover .pin-medallion, .pin:focus-visible .pin-medallion { scale: 1.13; border-color: var(--green); }
.pin img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; filter: grayscale(1); transition: filter .45s ease; }
.pin-name {
  color: #203a32; background: #fffdf2; border: 1px solid #dfdecf;
  border-radius: 30px; margin-top: -5px; padding: 1px 6px 2px;
  position: relative; font-size: .8rem; font-weight: 800; line-height: 1.25; white-space: nowrap;
}
.pin-mark {
  position: absolute; top: -3px; right: -4px; width: 19px; height: 19px;
  display: none; align-items: center; justify-content: center; border-radius: 50%;
  border: 2px solid white; color: white; background: var(--green); font: 700 11px/1 sans-serif;
}
.pin.visited img, .stop-row.visited img { filter: none; }
.pin.visited .pin-medallion { border-color: var(--green); animation: float 3.8s ease-in-out infinite; animation-delay: var(--delay); }
.pin.visited .pin-mark { display: flex; }
.pin.just-unlocked .pin-medallion { animation: unlock .85s both, float 3.8s .85s ease-in-out infinite; }
.pin.just-unlocked .pin-medallion::after {
  content: ''; position: absolute; inset: -4px; border: 2px solid #d88a31; border-radius: 50%;
  animation: ripple .95s ease-out both; pointer-events: none;
}
@keyframes unlock { 0% { transform: scale(.8); } 48% { transform: scale(1.26) rotate(-8deg); } 73% { transform: scale(1.1) rotate(5deg); } }
@keyframes ripple { from { opacity: 1; scale: .85; } to { opacity: 0; scale: 1.75; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }

.passport { padding: 13px 12px 11px; }
.passport-header { display: flex; gap: 10px; align-items: center; padding: 1px 4px 12px; border-bottom: 1px solid #e9e7db; }
.stamp-icon, .activity-icon {
  width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 10px; background: #f8e5cf; color: #994825; font: 22px/1 Georgia, serif;
}
.passport-header p { color: var(--subtle); font-size: .82rem; margin-top: 3px; }
.stop-list { display: grid; padding-top: 5px; }
.stop-row {
  display: grid; grid-template-columns: 33px minmax(0, 1fr) auto; gap: 8px; min-height: 42px;
  align-items: center; text-decoration: none; padding: 3px 5px; border-radius: 8px;
}
.stop-row:hover { background: #edf0e2; }
.stop-row img { width: 33px; height: 33px; object-fit: cover; filter: grayscale(1); border: 1px solid #e0ddcf; border-radius: 8px; }
.stop-row span:nth-child(2) { min-width: 0; }
.stop-row strong { display: inline; font-size: .87rem; margin-right: .42em; }
.stop-row small { font-size: .78rem; color: var(--subtle); }
.stop-row .stop-state { color: #707d74; font-size: .76rem; white-space: nowrap; }
.stop-row.visited .stop-state { color: #236550; font-weight: 800; }

#story-view { width: min(1120px, 100%); margin-inline: auto; }
.story-nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.story-region { color: var(--subtle); font-size: .92rem; text-align: right; }
.story-hero { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.story-picture {
  border-radius: 21px; display: grid; place-items: center; position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; background: #fff9eb; box-shadow: inset 0 0 0 1px #e4d8c1;
}
.story-picture img { width: 100%; height: 100%; object-fit: contain; }
.story-picture figcaption { position: absolute; bottom: 10px; right: 14px; color: #546059; background: #fffaf0dd; border-radius: 6px; padding: 3px 7px; font-size: .8rem; }
.story-copy h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.12; margin-block: 8px 16px; letter-spacing: -.06em; }
.story-lead { font-size: 1.12rem; line-height: 1.85; color: var(--ink); }
.facts { display: grid; gap: 14px; margin-top: 17px; color: var(--subtle); line-height: 1.75; }
.facts div { border-left: 3px solid var(--story-accent); padding-left: 12px; }
.facts h2 { font-size: 1.04rem; color: var(--ink); margin-bottom: 2px; }
.activity {
  margin-block: 24px 17px; padding: 18px 20px; border: 1px solid #e5ddc4; border-radius: 16px;
  background: #f9f0d9; display: flex; gap: 13px; line-height: 1.7;
}
.activity h2 { font-size: 1.12rem; margin-bottom: 3px; }
.activity details { margin-top: 8px; }
.activity summary { width: fit-content; color: #235b4a; font-weight: 800; }
.activity-answer { margin-top: 5px; }
.story-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.story-source { color: var(--subtle); font-size: .85rem; text-underline-offset: 3px; }

dialog { max-width: min(430px, 100% - 28px); border: 1px solid var(--line); border-radius: 18px; padding: 21px; color: var(--ink); background: var(--card); }
dialog::backdrop { background: #19332d80; }
dialog h2 { font-size: 1.2rem; margin-bottom: 11px; }
dialog p { color: var(--subtle); line-height: 1.6; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 16px; }

@media (min-width: 1180px) { .map-stage { min-height: 0; } }
@media (max-width: 1090px) { .explore { grid-template-columns: minmax(0, 1fr) 247px; gap: 12px; } .top-inner, .page { width: min(1370px, 100% - 36px); } }
@media (max-width: 900px) {
  .explore { grid-template-columns: minmax(0, 1fr); }
  .stop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .pin-medallion { width: 48px; }
}
@media (max-width: 650px) {
  .top-inner, .page { width: calc(100% - 24px); }
  .top-inner { min-height: 54px; }
  .page { padding-block: 19px 30px; }
  .intro { display: grid; gap: 13px; margin-bottom: 14px; }
  .progress-panel { padding: 10px 12px; }
  .atlas-header, .atlas-footer { padding-inline: 10px; flex-wrap: wrap; }
  .map-scroll-tip { display: block; padding: 4px 10px 8px; color: var(--subtle); font-size: .82rem; }
  .map-stage { min-width: 660px; }
  .stop-list { grid-template-columns: 1fr; }
  .stop-row { min-height: 46px; }
  .stop-row strong, .stop-row small, .stop-row .stop-state { font-size: .88rem; }
  .story-hero { grid-template-columns: minmax(0, 1fr); }
  .story-picture { aspect-ratio: 1; width: min(100%, 420px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
