/* Grandpa's Atlas — site styles. Parchment, ink, compass gold, deep sea blue. */
:root {
  --ink: #2b2117;
  --ink-soft: #5a4a3a;
  --paper: #fbf3df;
  --parchment: #f1e2c2;
  --gold: #c9962b;
  --gold-deep: #9a6d14;
  --sea: #163a5c;
  --sea-deep: #0b2640;
  --wax: #b23a2f;
  --rule: rgba(43, 33, 23, .18);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }

/* 顶栏：实心墨色条，隐私 / 条款就在这里 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: var(--sea-deep);
  color: #f3e8cf;
  border-bottom: 3px solid var(--gold);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.wordmark img { width: 36px; height: 36px; border-radius: 9px; }
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 22px);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}
.menu a { padding: 6px 2px; border-bottom: 2px solid transparent; opacity: .88; }
.menu a:hover { opacity: 1; border-bottom-color: var(--gold); }

/* 首屏 */
.cover {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  background: var(--sea);
}
.cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
}
.cover-card {
  position: relative;
  z-index: 1;
  width: min(470px, calc(100% - 32px));
  margin: clamp(220px, 38svh, 440px) auto 56px clamp(16px, 5vw, 80px);
  padding: 30px 32px 26px;
  background: var(--parchment);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 rgba(11, 38, 64, .55);
  transform: rotate(-1deg);
}
.stamp {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  border: 2px solid var(--wax);
  color: var(--wax);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(1.5deg);
}
.cover h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.05;
}
.lede { margin: 16px 0 0; font-size: 17px; color: var(--ink-soft); }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sea);
  color: #f3e8cf;
  font-size: 13px;
  font-weight: 600;
}
.soon { margin: 20px 0 0; font-family: var(--serif); font-style: italic; color: var(--gold-deep); }

/* 通用区块 */
.block { padding: clamp(56px, 8vw, 104px) clamp(16px, 6vw, 96px); }
.block-head { max-width: 760px; margin-bottom: 36px; }
.block-head h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.block-head p { margin: 12px 0 0; font-size: 17px; color: var(--ink-soft); }
.paper { background: var(--parchment); border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
.ink { background: var(--sea-deep); color: #f3e8cf; }
.ink .block-head p { color: rgba(243, 232, 207, .8); }

/* 七章远征带：横向可滚的卡片，用虚线路径连起来 */
.route {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 18px;
  margin: 0;
  padding: 24px 0 12px;
  list-style: none;
  overflow-x: auto;
  counter-reset: stop;
  position: relative;
  scroll-snap-type: x proximity;
}
.route::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  border-top: 3px dashed var(--gold);
}
.route li {
  position: relative;
  scroll-snap-align: start;
  padding: 0 0 14px;
  counter-increment: stop;
}
.route li::before {
  content: counter(stop);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wax);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--paper);
}
.route img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 35%;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--parchment), 6px 6px 0 2px var(--ink);
}
.route b { display: block; margin: 22px 0 2px; font-family: var(--serif); font-size: 20px; }
.route span { display: block; color: var(--ink-soft); font-size: 14px; }

/* 玩法：交替图文 */
.row {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  max-width: 980px;
  margin: 0 auto 48px;
}
.row.flip { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); }
.row.flip img { order: 2; }
.row img {
  width: 100%;
  border-radius: 28px;
  border: 3px solid var(--ink);
  box-shadow: 0 18px 40px rgba(43, 33, 23, .28);
}
.row h3 { margin: 0 0 10px; font-size: 28px; line-height: 1.15; }
.row p { margin: 0; font-size: 17px; color: var(--ink-soft); }

/* 截图廊：胶片条 */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 230px);
  gap: 18px;
  padding: 18px;
  overflow-x: auto;
  background: var(--ink);
  border-top: 10px dashed var(--paper);
  border-bottom: 10px dashed var(--paper);
}
.strip figure { margin: 0; }
.strip img { width: 100%; border-radius: 18px; }
.strip figcaption { margin-top: 8px; color: #f3e8cf; font-size: 13px; text-align: center; letter-spacing: .04em; }

/* 家长要看的清单 */
.ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
}
.ledger div { padding: 20px 22px; border: 1px solid rgba(243, 232, 207, .25); border-left: 4px solid var(--gold); }
.ledger dt { margin: 0 0 6px; font-family: var(--serif); font-size: 21px; }
.ledger dd { margin: 0; color: rgba(243, 232, 207, .82); }

/* 联系与页脚 */
.contact-line { margin: 0; font-size: clamp(20px, 3vw, 30px); font-family: var(--serif); }
.contact-line a { border-bottom: 2px solid var(--gold); }
.contact-line.small { margin-top: 10px; font-size: 16px; font-family: var(--sans); color: var(--ink-soft); }
.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 22px clamp(16px, 6vw, 96px);
  background: var(--ink);
  color: rgba(243, 232, 207, .8);
  font-size: 14px;
}
.colophon a:hover { color: var(--gold); }

/* 文档页（隐私 / 条款）：左目录 + 右正文 */
.doc {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 48px) 80px;
}
.doc-toc { position: sticky; top: 86px; align-self: start; }
.doc-toc ol { margin: 10px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14px; }
.doc-toc li { margin: 6px 0; }
.doc-toc a:hover { color: var(--gold-deep); }
.doc-body h1 { margin: 0 0 6px; font-size: clamp(32px, 4vw, 44px); }
.doc-body .updated { margin: 0 0 28px; color: var(--ink-soft); font-style: italic; }
.doc-body h2 { margin: 36px 0 10px; font-size: 24px; padding-top: 10px; border-top: 1px solid var(--rule); }
.doc-body p, .doc-body li { color: var(--ink-soft); font-size: 16px; }
.doc-body .plain { padding: 16px 20px; background: var(--parchment); border-left: 4px solid var(--gold); color: var(--ink); }

@media (max-width: 900px) {
  .row, .row.flip { grid-template-columns: 1fr; }
  .row.flip img { order: 0; }
  .row img { max-width: 300px; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .doc { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
}
@media (max-width: 600px) {
  .masthead { flex-direction: column; align-items: flex-start; }
  .cover-card { width: calc(100% - 32px); margin-left: 16px; margin-right: 16px; padding: 22px 20px 20px; transform: none; }
  .cover h1 { font-size: 30px; }
  .ledger { grid-template-columns: 1fr; }
}
