:root {
  --paper: #f7f4ee;
  --card: #fffdf9;
  --ink: #20241f;
  --muted: #6f766e;
  --faint: #9aa199;
  --line: #e3ded1;
  --accent: #0a7d55;
  --warm: #b0552c;
  --serif: "Songti SC", "Noto Serif SC", Georgia, "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0 auto;
  max-width: 620px;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding: 0 0 calc(76px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
svg { display: block; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.ph { display: block; width: 100%; height: auto; background: #e8e4d8; object-fit: cover; }

/* ---------------- 顶栏 ---------------- */
.top { padding: 22px 22px 16px; }
.brand { font-family: var(--serif); font-size: 21px; letter-spacing: .16em; display: inline-block; line-height: 1.25; }
.brand small { display: block; margin-top: 5px; font-family: var(--sans); font-size: 8.5px; letter-spacing: .26em; color: var(--faint); }

/* ---------------- 底部标签栏 ---------------- */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 620px; z-index: 50;
  display: flex; background: rgba(247, 244, 238, .93);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 2px; color: #8b928c; font-size: 10.5px; letter-spacing: .06em;
}
.tabbar svg { width: 21px; height: 21px; }
.tabbar a.on { color: var(--accent); }

/* ---------------- 首页首屏 ---------------- */
.hero { position: relative; margin: 4px 16px 0; border-radius: 18px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 12, .88) 0%, rgba(10, 14, 12, .30) 46%, rgba(10, 14, 12, .05) 78%);
}
.hero-body {
  position: relative; z-index: 2; min-height: 440px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px 22px 24px; color: #fff;
}
.eyebrow { font-size: 11.5px; letter-spacing: .2em; color: rgba(255, 255, 255, .72); }
.hero h1 { font-family: var(--serif); font-size: 29px; line-height: 1.45; margin: 12px 0 10px; letter-spacing: .02em; text-wrap: balance; }
.hero-sub { font-size: 12.5px; letter-spacing: .1em; color: rgba(255, 255, 255, .62); }
.hero-link {
  margin-top: 18px; align-self: flex-start; font-size: 13px; letter-spacing: .1em;
  padding: 8px 18px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 99px;
  color: #fff;
}

/* ---------------- 数字条 ---------------- */
.stats { display: flex; flex-wrap: wrap; margin: 22px 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { flex: 0 0 50%; padding: 16px 0 14px; text-align: center; }
.stats div:nth-child(odd) { border-right: 1px solid var(--line); }
.stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stats b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.stats span { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .18em; color: var(--faint); }

/* ---------------- 区块 ---------------- */
.sec { padding: 34px 22px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.sec-head h2 { font-family: var(--serif); font-size: 20px; letter-spacing: .1em; }
.sec-head a { font-size: 12px; color: var(--muted); }
.count { font-size: 12px; color: var(--faint); letter-spacing: .1em; }

/* ---------------- 行程卡 ---------------- */
.trip-card { display: block; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.trip-card .ph { aspect-ratio: 16 / 10; }
.trip-card-body { padding: 14px 16px 16px; }
.trip-card .eyebrow { color: var(--warm); }
.trip-card h3 { font-family: var(--serif); font-size: 18px; line-height: 1.55; margin: 6px 0 6px; }
.trip-card p:not(.eyebrow) { font-size: 13.5px; color: var(--muted); line-height: 1.8; }

/* ---------------- 时间线 ---------------- */
.year { font-family: var(--serif); font-size: 15px; color: #b3aa99; letter-spacing: .14em; margin: 22px 0 10px; }
.tl { border-top: 1px solid var(--line); }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.tl-date { flex: 0 0 42px; font-family: var(--serif); font-size: 12.5px; color: var(--faint); letter-spacing: .04em; }
.tl-body { flex: 1; min-width: 0; }
.tl-body b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-body em { display: block; font-style: normal; font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.tl-thumb { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 10px; }

/* ---------------- 计划卡 ---------------- */
.plan-list { padding: 0 22px; }
.plan-card { display: block; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; }
.plan-card b { display: block; font-family: var(--serif); font-size: 19px; margin: 8px 0 2px; }
.plan-card em { display: block; font-style: normal; font-size: 11.5px; color: var(--faint); letter-spacing: .08em; }
.plan-card p { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 10.5px; letter-spacing: .1em; background: #eef4ef; color: var(--accent); }
.plan-card.big h3 { font-family: var(--serif); font-size: 23px; }
.plan-card.big h3 span { font-size: 12px; color: var(--faint); margin-left: 8px; letter-spacing: .1em; }
.plan-top { display: flex; justify-content: space-between; align-items: center; }
.plan-top em { font-size: 11.5px; color: var(--faint); }
.big-link { display: block; margin: 20px 22px 0; padding: 14px; text-align: center; font-size: 13px; color: var(--accent); border: 1px dashed #bcd2c5; border-radius: 14px; }

/* ---------------- 页头 ---------------- */
.page-head { padding: 10px 22px 18px; }
.page-head h1 { font-family: var(--serif); font-size: 30px; letter-spacing: .12em; }
.page-head p { margin-top: 8px; font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }

/* ---------------- 地图 ---------------- */
.map-wrap { margin: 0 16px; }
.map {
  position: relative; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden;
  background:
    repeating-linear-gradient(to right, rgba(110, 122, 110, .085) 0 1px, transparent 1px 12.5%),
    repeating-linear-gradient(to bottom, rgba(110, 122, 110, .085) 0 1px, transparent 1px 12.5%),
    radial-gradient(72% 62% at 50% 42%, #fdfbf4 0%, #f2eee2 58%, #e9e4d5 100%);
  border: 1px solid var(--line);
}
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-route polyline { fill: none; stroke: rgba(10, 125, 85, .38); stroke-width: 1.4; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pin { position: absolute; width: 0; height: 0; }
.pin i {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 5px rgba(10, 125, 85, .12);
}
.pin b {
  position: absolute; top: 0; left: 11px; transform: translateY(-50%);
  white-space: nowrap; font-size: 11px; font-weight: 500; color: #2f3b34; letter-spacing: .04em;
}
.pin.left b { left: auto; right: 11px; }
.map-note { margin-top: 8px; text-align: center; font-size: 11px; color: var(--faint); letter-spacing: .06em; }
.map.has-map { background: #eef1ea; }
.amap-dot {
  position: relative; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 5px rgba(10, 125, 85, .15);
}
.amap-dot span {
  position: absolute; left: 16px; top: -9px; white-space: nowrap;
  font-size: 12px; color: #2f3b34; padding: 2px 7px; border-radius: 6px;
  background: rgba(255, 253, 249, .88);
}
.amap-dot.left span { left: auto; right: 16px; }

.city-list { margin: 24px 22px 0; border-top: 1px solid var(--line); }
.city-row { display: flex; align-items: baseline; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.city-row b { font-family: var(--serif); font-size: 16px; }
.city-row span { font-size: 11.5px; color: var(--faint); }
.city-row em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--faint); }

/* ---------------- 筛选 ---------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 22px 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: 0 0 auto; padding: 7px 15px; border-radius: 99px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 12.5px; font-family: inherit; letter-spacing: .04em;
}
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------------- 相册 ---------------- */
.masonry { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px; }
.masonry figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; }
.masonry figure::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52%;
  background: linear-gradient(to top, rgba(10, 14, 12, .74), rgba(10, 14, 12, 0));
  pointer-events: none;
}
.masonry .ph { aspect-ratio: 4 / 5; }
.masonry figcaption {
  position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 2; color: #fff;
  font-size: 11px; letter-spacing: .06em;
}
.masonry figcaption b { display: block; font-weight: 500; }
.masonry figcaption i { font-style: normal; opacity: .75; }

/* ---------------- 留言 ---------------- */
.msg-form { margin: 0 22px; display: flex; flex-direction: column; gap: 10px; }
.msg-form input, .msg-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); font: inherit; font-size: 14px; color: var(--ink); resize: vertical;
}
.msg-form input:focus, .msg-form textarea:focus { outline: none; border-color: #b6c9bd; }
.msg-form button {
  align-self: flex-start; padding: 10px 26px; border: 0; border-radius: 99px;
  background: var(--accent); color: #fff; font: inherit; font-size: 14px; letter-spacing: .08em;
}
.msg-form button:disabled { opacity: .55; }
.form-hint { font-size: 12px; color: var(--muted); min-height: 18px; }
.msg-list { margin: 16px 22px 0; border-top: 1px solid var(--line); }
.msg { padding: 15px 0; border-bottom: 1px solid var(--line); }
.msg-top { display: flex; justify-content: space-between; align-items: baseline; }
.msg-top b { font-size: 14px; font-weight: 500; }
.msg-top time { font-size: 11px; color: var(--faint); }
.msg p { margin-top: 6px; font-size: 14px; color: #3c453f; line-height: 1.8; }
.loading, .empty { padding: 24px 0; text-align: center; font-size: 13px; color: var(--faint); }

/* ---------------- 游记详情 ---------------- */
.trip { padding-bottom: 8px; }
.trip-cover { border-radius: 0; }
.trip-head { padding: 20px 22px 0; }
.trip-head .eyebrow { color: var(--warm); }
.trip-head h1 { font-family: var(--serif); font-size: 27px; line-height: 1.5; margin: 10px 0 10px; letter-spacing: .02em; }
.trip-meta { font-size: 12px; color: var(--faint); letter-spacing: .1em; }
.trip-body { padding: 22px 22px 0; }
.trip-body p { font-size: 15.5px; line-height: 2.05; color: #2c342e; margin-bottom: 18px; }
.trip-photos { padding: 8px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.trip-photos figure { margin: 0; }
.trip-photos .ph { aspect-ratio: 4 / 3; border-radius: 14px; }
.trip-photos figcaption { margin-top: 6px; font-size: 12px; color: var(--faint); text-align: center; }
.trip-nav { display: flex; gap: 12px; padding: 26px 16px 10px; }
.trip-nav a { flex: 1; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.trip-nav em { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); letter-spacing: .14em; }
.trip-nav b { display: block; font-weight: 500; font-size: 13.5px; margin-top: 5px; line-height: 1.5; }
.trip-nav .next { text-align: right; }

/* 截图模式：把固定标签栏放回文档流，方便截整页长图 */
body.cap .tabbar { position: static; transform: none; margin: 26px auto 0; }

/* ---------------- 页脚署名 ---------------- */
.site-foot { padding: 36px 22px 14px; text-align: center; }
.site-foot .sign { font-family: var(--serif); font-size: 15px; letter-spacing: .18em; color: var(--muted); }
.site-foot .note { margin-top: 7px; font-size: 11px; letter-spacing: .08em; color: var(--faint); }

/* ---------------- 大屏 ---------------- */
@media (min-width: 760px) {
  body { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .hero-body { min-height: 520px; }
  .hero h1 { font-size: 34px; }
  .masonry { grid-template-columns: repeat(3, 1fr); }
  .stats div { flex: 0 0 25%; border-bottom: 0 !important; }
  .stats div:nth-child(2) { border-right: 1px solid var(--line); }
}

/* ---------------- 诗句 / 印章 / 家 ---------------- */
.poem { margin: 18px 22px 0; padding: 12px 16px; border-left: 2px solid #dcccb8; background: #fbf8f1; border-radius: 0 10px 10px 0; }
.poem b { display: block; font-family: var(--serif); font-weight: 400; font-size: 15px; color: #3c453f; line-height: 1.9; }
.poem span { display: block; margin-top: 4px; font-size: 11px; color: var(--faint); letter-spacing: .12em; }
.seal-row { display: flex; justify-content: flex-end; padding: 18px 22px 0; }
.seal-row .seal { display: block; }
.site-foot .tagline { margin-top: 6px; font-family: var(--serif); font-size: 13px; letter-spacing: .12em; color: #b3aa99; }
.pin.home i { background: #b23a2e; box-shadow: 0 0 0 5px rgba(178, 58, 46, .14); }
.pin.home b { color: #b23a2e; }