:root {
  --ink: #171813;
  --ink-soft: #34362f;
  --paper: #e7dec9;
  --paper-deep: #cfc1a3;
  --cinnabar: #9e3d2d;
  --moss: #596054;
  --line: rgba(35, 35, 29, .22);
  --serif: "Songti SC", "STSong", "Noto Serif SC", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.paper-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}
.site-header {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  height: 74px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 70px); color: #eee5d2;
  background: linear-gradient(to bottom, rgba(17,18,15,.84), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: .24em; font-weight: 700; }
.brand-seal { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #b6533f; color: #e9b2a4; font-size: 11px; line-height: 1.1; letter-spacing: .05em; }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 14px; letter-spacing: .12em; }
.text-button { border: 0; background: none; color: inherit; cursor: pointer; }
.text-button span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font-size: 12px; }

.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; color: #f0eadc; background: #161712; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.82) contrast(1.04); animation: reveal 1.6s ease-out both; }
.hero-vignette { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,14,12,.9) 0%, rgba(13,14,12,.55) 35%, rgba(13,14,12,.08) 67%, rgba(13,14,12,.35)), linear-gradient(0deg, rgba(10,11,9,.65), transparent 55%); }
.hero-copy { position: relative; z-index: 2; width: min(590px, 86vw); margin-left: clamp(28px, 8vw, 140px); padding-top: 46px; }
.eyebrow { margin: 0 0 18px; color: #c7bda8; font-size: 13px; letter-spacing: .34em; text-transform: uppercase; }
.eyebrow.dark { color: var(--cinnabar); }
.hero h1 { margin: 0; font-size: clamp(74px, 10vw, 160px); line-height: .82; font-weight: 500; letter-spacing: .06em; text-shadow: 0 5px 30px rgba(0,0,0,.28); }
.hero h1 span { margin-left: .45em; }
.lead { max-width: 470px; margin: 30px 0 32px; color: #ddd4c2; font-size: 18px; }
.primary-action { display: inline-flex; align-items: center; gap: 40px; border: 1px solid rgba(237,229,211,.6); padding: 13px 18px 13px 22px; color: #f0eadc; background: rgba(20,21,18,.24); cursor: pointer; letter-spacing: .15em; transition: .25s ease; }
.primary-action:hover, .primary-action:focus-visible { color: white; border-color: white; background: rgba(158,61,45,.7); transform: translateY(-2px); }
.primary-action.ink { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.hero-note { position: absolute; z-index: 2; right: clamp(28px, 5vw, 90px); bottom: 52px; width: min(330px, 36vw); border-top: 1px solid rgba(255,255,255,.45); padding-top: 13px; font-size: 14px; color: #d8cfbd; }
.hero-note span { font-size: 12px; color: #b95644; letter-spacing: .25em; }
.hero-note p { margin: 7px 0 0; }

.atlas-section { padding: 110px clamp(20px, 5vw, 84px) 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; max-width: 1380px; margin: 0 auto 35px; }
.section-heading h2, .path-copy h2, .summary-dialog h2 { margin: 0; font-size: clamp(42px, 6vw, 78px); line-height: 1; font-weight: 500; letter-spacing: .08em; }
.section-heading > p { max-width: 540px; margin: 0; color: #55564e; }
.atlas-shell { display: grid; grid-template-columns: 1fr 95px; max-width: 1380px; margin: auto; border: 1px solid rgba(25,26,22,.5); box-shadow: 0 24px 60px rgba(31,28,20,.17); background: #20211d; }
.atlas { position: relative; min-height: 610px; overflow: hidden; }
.atlas > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; filter: sepia(.12) saturate(.62) contrast(1.1); transition: transform 1.2s ease; }
.atlas:hover > img { transform: scale(1.015); }
.atlas::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, transparent 30%, rgba(15,16,13,.45)); }
.route-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.route-line path { fill: none; stroke: rgba(229,216,189,.38); stroke-width: 1.3; stroke-dasharray: 6 7; vector-effect: non-scaling-stroke; }
.map-point { position: absolute; z-index: 3; width: 116px; min-height: 116px; border: 1px solid rgba(230,219,196,.7); border-radius: 50%; color: #f1e8d6; background: rgba(25,26,22,.74); backdrop-filter: blur(5px); cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: .3s ease; }
.map-point::before { content: ""; position: absolute; inset: -8px; border: 1px solid rgba(230,219,196,.25); border-radius: 50%; transition: .3s ease; }
.map-point:hover, .map-point:focus-visible, .map-point.visited { transform: translateY(-5px); color: #fff; background: rgba(126,48,36,.84); }
.map-point:hover::before, .map-point:focus-visible::before { inset: -13px; border-color: rgba(230,219,196,.6); }
.point-index { font-size: 12px; color: #d9907f; letter-spacing: .15em; }
.point-name { font-size: 21px; letter-spacing: .1em; }
.point-sub { font-size: 11px; opacity: .7; letter-spacing: .08em; }
.point-zhaoyao { left: 5%; bottom: 11%; }
.point-qingqiu { left: 35%; top: 38%; }
.point-kunlun { left: 62%; top: 12%; }
.point-zhongshan { right: 4%; top: 28%; }
.atlas-aside { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; color: #d9cfba; border-left: 1px solid rgba(230,219,196,.25); padding: 25px 12px; background: #1e201c; }
.vertical-title { writing-mode: vertical-rl; letter-spacing: .27em; font-size: 21px; }
.compass { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 11px; color: #a9a08f; }
.compass b { width: 1px; height: 70px; background: linear-gradient(var(--cinnabar) 0 50%, #9c9687 50%); }
.atlas-aside p { writing-mode: vertical-rl; margin: 0; font-size: 12px; color: #9e9788; letter-spacing: .12em; }

.chapter { position: relative; display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr); gap: clamp(40px, 7vw, 110px); padding: 100px clamp(24px, 8vw, 140px); background: #d6c9ac; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.chapter[hidden] { display: none; }
.chapter-mark { position: absolute; right: 2vw; bottom: -10vw; color: rgba(50,50,42,.055); font-size: clamp(240px, 36vw, 540px); line-height: 1; }
.encounter-stage {
  position: relative; z-index: 2; grid-column: 1 / -1; min-height: clamp(500px, 66vw, 760px);
  margin: -48px 0 20px; overflow: hidden; color: #f0e9db; background: #1a1b17;
  border: 1px solid rgba(33,34,29,.55); box-shadow: 0 30px 70px rgba(43,38,28,.22);
}
.encounter-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: encounterReveal .8s ease both; }
.encounter-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,13,11,.9) 0%, rgba(12,13,11,.62) 40%, rgba(12,13,11,.12) 72%), linear-gradient(0deg, rgba(10,11,9,.7), transparent 56%); }
.encounter-card { position: absolute; z-index: 1; left: clamp(24px, 5vw, 72px); bottom: clamp(24px, 5vw, 66px); width: min(560px, calc(100% - 48px)); }
.encounter-label { margin: 0 0 12px; color: #d77c69; font-size: 13px; letter-spacing: .25em; }
.encounter-card h3 { margin: 0; font-size: clamp(34px, 5vw, 62px); line-height: 1.18; font-weight: 500; letter-spacing: .04em; }
.encounter-situation { margin: 18px 0 22px; color: #ddd4c3; font-size: 17px; }
.encounter-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.encounter-choices button { border: 1px solid rgba(237,229,211,.58); padding: 10px 16px; color: #f0e9db; background: rgba(25,26,22,.48); cursor: pointer; transition: .22s ease; }
.encounter-choices button:hover:not(:disabled), .encounter-choices button:focus-visible { border-color: #fff; background: var(--cinnabar); transform: translateY(-2px); }
.encounter-choices button:disabled { cursor: default; opacity: .38; }
.encounter-choices button.chosen { border-color: #d47a66; color: #fff; background: rgba(158,61,45,.78); opacity: 1; }
.encounter-result { margin-top: 18px; padding: 16px 18px; border-left: 2px solid #c05a45; color: #e9dfce; background: rgba(13,14,12,.72); outline: none; }
.encounter-result span { color: #d98370; font-size: 12px; letter-spacing: .14em; }
.encounter-result p { margin: 4px 0 0; }
.chapter-close { position: absolute; right: 28px; top: 25px; z-index: 2; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 24px; }
.chapter-intro, .chapter-evidence { position: relative; z-index: 1; }
.chapter-intro h2 { margin: 0 0 20px; font-size: clamp(48px, 7vw, 86px); line-height: 1; font-weight: 500; letter-spacing: .1em; }
.chapter-intro > p:not(.eyebrow) { color: #4d4e47; font-size: 18px; }
.chapter-meta { margin-top: 45px; border-top: 1px solid var(--line); }
.chapter-meta div { display: grid; grid-template-columns: 80px 1fr; border-bottom: 1px solid var(--line); padding: 12px 0; }
.chapter-meta dt { color: var(--cinnabar); font-size: 13px; letter-spacing: .15em; }
.chapter-meta dd { margin: 0; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--ink); }
.tabs button { border: 0; border-bottom: 3px solid transparent; padding: 14px 8px 11px; color: #595a52; background: transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--cinnabar); font-weight: 700; }
.evidence-panel { min-height: 320px; padding: 34px 8px; outline: none; }
.evidence-panel h3 { margin: 0 0 18px; font-size: 26px; font-weight: 500; letter-spacing: .08em; }
.evidence-panel blockquote { margin: 0 0 24px; padding: 20px 24px; border-left: 3px solid var(--cinnabar); background: rgba(239,231,213,.55); font-size: 21px; }
.evidence-panel p { color: #3f403a; }
.evidence-panel .note { font-size: 14px; color: #62635b; }
.module-progress { height: 2px; background: rgba(24,25,21,.15); }
.module-progress span { display: block; width: 25%; height: 100%; background: var(--cinnabar); transition: width .3s ease; }

.path-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(50px, 8vw, 130px); padding: 120px clamp(24px, 8vw, 140px); background: #e9e1cf; }
.path-copy p:not(.eyebrow) { max-width: 480px; margin: 24px 0 30px; color: #55564f; }
.reset-button { border: 0; border-bottom: 1px solid #6a685f; margin-left: 18px; padding: 9px 2px; background: transparent; color: #5f6058; cursor: pointer; }
.path-scroll { position: relative; min-height: 320px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 25px 0; }
.empty-path { position: absolute; inset: 0; display: grid; place-items: center; color: #858176; letter-spacing: .2em; }
.empty-path[hidden] { display: none; }
#pathList { list-style: none; padding: 0; margin: 0; counter-reset: journey; }
#pathList li { counter-increment: journey; display: grid; grid-template-columns: 55px 1fr auto; align-items: center; gap: 18px; padding: 16px 10px; border-bottom: 1px solid var(--line); }
#pathList li::before { content: counter(journey, cjk-ideographic); display: grid; place-items: center; width: 38px; height: 38px; color: #f0e6d3; background: var(--ink); border-radius: 50%; }
.path-name { font-size: 21px; letter-spacing: .1em; }
.path-detail { color: #68685f; font-size: 13px; }
.path-time { color: var(--cinnabar); font-size: 12px; }

.summary-dialog { width: min(800px, calc(100vw - 30px)); max-height: 90vh; border: 0; padding: 0; color: var(--ink); background: transparent; }
.summary-dialog::backdrop { background: rgba(15,16,13,.78); backdrop-filter: blur(5px); }
.summary-paper { position: relative; padding: clamp(36px, 6vw, 72px); overflow: hidden; background: #e8deca; border: 1px solid #9e9074; box-shadow: 0 20px 80px rgba(0,0,0,.36); }
.summary-paper::before { content: ""; position: absolute; inset: 13px; border: 1px solid rgba(50,50,42,.18); pointer-events: none; }
.dialog-close { position: absolute; z-index: 3; right: 22px; top: 18px; border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.summary-dialog h2 { font-size: clamp(38px, 6vw, 64px); }
#summaryContent { position: relative; z-index: 1; margin: 30px 0; }
#summaryContent strong { color: var(--cinnabar); }
.summary-route { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 19px; letter-spacing: .06em; }
.summary-stamp { position: absolute; right: 56px; bottom: 40px; width: 80px; height: 80px; display: grid; place-items: center; border: 3px double var(--cinnabar); color: var(--cinnabar); transform: rotate(-9deg); text-align: center; line-height: 1.2; opacity: .65; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px clamp(20px, 5vw, 84px); color: #aaa392; background: var(--ink); font-size: 12px; letter-spacing: .1em; }

@keyframes reveal { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
@keyframes encounterReveal { from { opacity: .2; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 860px) {
  .site-header { height: 64px; }
  .site-header nav > a { display: none; }
  .hero-copy { margin-left: 24px; align-self: end; margin-bottom: 150px; }
  .hero h1 { font-size: clamp(70px, 24vw, 120px); }
  .hero-note { left: 24px; right: 24px; bottom: 28px; width: auto; }
  .section-heading, .chapter, .path-section { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .atlas-shell { grid-template-columns: 1fr; }
  .atlas { min-height: 570px; }
  .atlas-aside { display: none; }
  .map-point { width: 100px; min-height: 100px; }
  .point-zhaoyao { left: 3%; bottom: 8%; }
  .point-qingqiu { left: 31%; top: 39%; }
  .point-kunlun { left: 55%; top: 9%; }
  .point-zhongshan { right: 2%; top: 38%; }
  .chapter { gap: 42px; padding-top: 80px; }
  .encounter-stage { min-height: 620px; margin: -35px -12px 8px; }
  .encounter-shade { background: linear-gradient(0deg, rgba(12,13,11,.96) 0%, rgba(12,13,11,.66) 50%, rgba(12,13,11,.05) 84%); }
  .tabs { overflow-x: auto; }
  .tabs button { min-width: 110px; }
  .path-section { padding-top: 80px; }
}
@media (max-width: 540px) {
  .brand > span:last-child { display: none; }
  .site-header nav { gap: 14px; }
  .hero-image { object-position: 59% center; }
  .lead { font-size: 16px; }
  .atlas-section { padding-left: 12px; padding-right: 12px; }
  .atlas { min-height: 650px; }
  .map-point { width: 92px; min-height: 92px; }
  .point-name { font-size: 18px; }
  .point-zhaoyao { left: 4%; bottom: 8%; }
  .point-qingqiu { left: 13%; top: 35%; }
  .point-kunlun { left: 54%; top: 8%; }
  .point-zhongshan { right: 4%; top: 48%; }
  .chapter { padding-left: 20px; padding-right: 20px; }
  .encounter-stage { min-height: 680px; margin-left: -8px; margin-right: -8px; }
  .encounter-stage > img { object-position: center; }
  .encounter-card { left: 20px; bottom: 24px; width: calc(100% - 40px); }
  .encounter-situation { font-size: 16px; }
  .encounter-choices { display: grid; grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(4, 120px); }
  .reset-button { display: block; margin: 14px 0 0; }
  #pathList li { grid-template-columns: 48px 1fr; }
  .path-time { grid-column: 2; }
  footer { flex-direction: column; }
}
