:root {
  --ink: #182723;
  --muted: #5b655e;
  --paper: #f4f1e8;
  --paper-deep: #e7e2d4;
  --green: #203832;
  --red: #a44835;
  --gold: #b58f58;
  --blue: #4d7f86;
  --line: #c9c5b8;
  --content: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button { font: inherit; }
h1, h2, h3, p { margin-top: 0; }

.site-header {
  position: sticky;
  z-index: 8;
  top: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100% - var(--content)) / 2));
  color: #fff;
  background: var(--green);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  width: 17px;
  height: 17px;
  display: inline-block;
  border: 2px solid var(--gold);
  border-top-width: 5px;
  transform: rotate(45deg);
}

.share-button {
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  background: transparent;
  border: 1px solid #aebbb3;
  border-radius: 3px;
  cursor: pointer;
}
.share-button:hover, .share-button:focus-visible { color: var(--green); background: #fff; border-color: #fff; }

.intro, .highlights, .viewer, .chapters { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.8fr);
  gap: 60px;
  align-items: end;
  padding: 82px 0 55px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.intro h1, .section-heading h2, .viewer h2, .chapter__heading h2 {
  font-family: Georgia, "Noto Serif SC", "SimSun", serif;
  font-weight: 700;
  letter-spacing: 0;
}
.intro h1 { margin-bottom: 12px; font-size: clamp(38px, 5vw, 64px); line-height: 1.08; }
.intro__copy > p:last-child { max-width: 510px; margin-bottom: 0; color: var(--muted); font-size: 16px; }

.route-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.route-button {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}
.route-button:hover, .route-button:focus-visible, .route-button.is-active { color: #fff; background: var(--green); }
.route-button__number { color: var(--red); font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 700; }
.route-button:hover .route-button__number, .route-button:focus-visible .route-button__number, .route-button.is-active .route-button__number { color: #e9c384; }
.route-button__title { font-size: 14px; font-weight: 700; }

.highlights { padding: 66px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin-bottom: 0; font-size: 31px; }
.section-count { margin-bottom: 3px; color: var(--muted); font-size: 13px; }

.highlight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.highlight {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #d9d8d1;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}
.highlight img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 220ms ease; }
.highlight:hover img, .highlight:focus-visible img { transform: scale(1.04); }
.highlight::after { content: ""; position: absolute; inset: 0; border: 3px solid transparent; pointer-events: none; }
.highlight.is-active::after { border-color: var(--gold); }
.highlight__caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 28px 14px 12px; background: linear-gradient(transparent, rgb(14 26 23 / 88%)); }
.highlight__range { display: block; color: #e8c896; font-size: 11px; font-weight: 700; }
.highlight__title { display: block; font-family: Georgia, "Noto Serif SC", "SimSun", serif; font-size: 18px; }

.viewer { padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 84px; }
.viewer__meta { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.viewer__chapter { margin-bottom: 3px; color: var(--blue); font-size: 12px; font-weight: 700; }
.viewer__index { margin-bottom: 2px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.viewer h2 { margin-bottom: 0; font-size: 27px; line-height: 1.2; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.view-toggle__button { min-width: 64px; min-height: 34px; padding: 0 10px; color: var(--muted); background: transparent; border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.view-toggle__button:last-child { border-right: 0; }
.view-toggle__button:hover { color: var(--green); background: #ebe8df; }
.view-toggle__button.is-active { color: #fff; background: var(--green); }

.comparison { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 0; overflow: hidden; background: #d8d7d1; isolation: isolate; }
.comparison__image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; user-select: none; }
.comparison__after { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 0 0 var(--split)); }
.comparison__guide { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--split); width: 2px; display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 18%); pointer-events: none; }
.comparison__label { position: absolute; top: 18px; min-width: 58px; padding: 4px 8px; color: #fff; background: rgb(19 28 25 / 78%); font-size: 12px; line-height: 1.5; text-align: center; white-space: nowrap; }
.comparison__label--before { right: 14px; }
.comparison__label--after { left: 14px; background: var(--red); }
.comparison__handle { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 4px; background: #fff; border: 1px solid rgb(0 0 0 / 18%); border-radius: 50%; box-shadow: 0 2px 8px rgb(0 0 0 / 22%); }
.comparison__handle i { width: 2px; height: 14px; display: block; background: var(--green); }
.comparison__range { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; margin: 0; appearance: none; background: transparent; cursor: col-resize; opacity: 0; }
.comparison__range:focus-visible { opacity: 1; outline: 3px solid var(--gold); outline-offset: -3px; }
.comparison[data-view="before"] .comparison__after { display: none; }
.comparison[data-view="before"] .comparison__guide { left: 100%; }
.comparison[data-view="after"] .comparison__before { visibility: hidden; }
.comparison[data-view="after"] .comparison__after { clip-path: none; }
.comparison[data-view="after"] .comparison__guide { left: 100%; }
.comparison:not([data-view="compare"]) .comparison__range { pointer-events: none; }

.viewer__controls { min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 16px; border-bottom: 1px solid var(--line); }
.viewer__controls p { min-width: 150px; margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.arrow-button { width: 36px; height: 36px; color: var(--green); background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 21px; line-height: 1; }
.arrow-button:hover, .arrow-button:focus-visible { color: #fff; background: var(--green); border-color: var(--green); }

.chapters { padding: 82px 0 92px; }
.chapter { padding: 0 0 66px; scroll-margin-top: 84px; }
.chapter:last-child { padding-bottom: 0; }
.chapter__heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.chapter__range { margin-bottom: 7px; color: var(--red); font-family: Georgia, "Times New Roman", serif; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.chapter__heading h2 { margin-bottom: 0; font-size: 29px; }
.chapter__count { margin-bottom: 3px; color: var(--muted); font-size: 13px; }
.chapter__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.thumb { position: relative; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; color: #fff; background: #dedbd2; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.thumb__after { position: absolute; inset: 0; clip-path: inset(0 0 0 51%); }
.thumb:hover img, .thumb:focus-visible img { transform: scale(1.04); }
.thumb::after { content: ""; position: absolute; inset: 0; border: 3px solid transparent; pointer-events: none; }
.thumb.is-active::after { border-color: var(--red); }
.thumb__caption { position: absolute; z-index: 1; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px 13px 10px; background: linear-gradient(transparent, rgb(20 28 25 / 85%)); font-size: 13px; text-align: left; }
.thumb__caption span:first-child { font-family: Georgia, "Noto Serif SC", "SimSun", serif; font-size: 15px; }
.thumb__caption span:last-child { color: #e8c896; font-size: 11px; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px max(24px, calc((100% - var(--content)) / 2)); color: #d9e0d8; background: var(--green); font-size: 12px; }
.toast { position: fixed; z-index: 10; bottom: 22px; left: 50%; max-width: calc(100% - 40px); padding: 10px 14px; color: #fff; background: var(--green); border: 1px solid #60736c; border-radius: 3px; box-shadow: 0 8px 24px rgb(0 0 0 / 22%); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; gap: 34px; padding-top: 58px; }
  .highlight-grid, .chapter__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header { min-height: 58px; padding-inline: 18px; }
  .brand { font-size: 14px; }
  .brand__mark { width: 14px; height: 14px; }
  .share-button { min-height: 31px; padding-inline: 9px; font-size: 12px; }
  .intro, .highlights, .viewer, .chapters { width: min(100% - 32px, var(--content)); }
  .intro { padding: 48px 0 42px; }
  .intro h1 { font-size: 42px; }
  .intro__copy > p:last-child { font-size: 14px; }
  .route-button { min-height: 68px; padding: 10px; }
  .route-button__number { font-size: 15px; }
  .route-button__title { font-size: 12px; }
  .highlights { padding: 48px 0 55px; }
  .section-heading h2 { font-size: 28px; }
  .section-count { display: none; }
  .highlight__caption { padding: 20px 10px 8px; }
  .highlight__title { font-size: 15px; }
  .viewer__meta { min-height: 126px; align-items: start; flex-direction: column; gap: 13px; padding: 18px 0; }
  .viewer h2 { font-size: 23px; }
  .view-toggle { width: 100%; }
  .view-toggle__button { flex: 1; min-width: 0; padding-inline: 4px; }
  .comparison__label { top: 10px; font-size: 11px; }
  .comparison__label--before { right: 9px; }
  .comparison__label--after { left: 9px; }
  .comparison__handle { width: 32px; height: 32px; }
  .viewer__controls { min-height: 60px; }
  .chapters { padding: 54px 0 60px; }
  .chapter { padding-bottom: 48px; }
  .chapter__heading h2 { font-size: 26px; }
  .chapter__count { display: none; }
  .thumb__caption { padding: 14px 9px 7px; }
  .thumb__caption span:first-child { font-size: 13px; }
  .thumb__caption span:last-child { display: none; }
  .site-footer { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
