/* ============ 人物朋友圈 ============ */

/* —— 封面 —— */
.mo-cover {
  position: relative;
  height: clamp(300px, 54vh, 580px);
  overflow: visible;
  background: #cfc6b2;
}
.mo-cover-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.mo-cover::after {           /* 只压暗底部，给名字留对比度 */
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(180deg, rgba(30, 26, 20, 0), rgba(30, 26, 20, .42));
  pointer-events: none;
}
.mo-cover-cap {
  position: absolute; left: max(20px, calc(50% - 620px)); bottom: 14px; z-index: 2;
  font-size: var(--fs-xs); color: rgba(246, 241, 230, .78);
}
.mo-id {
  position: absolute; z-index: 3;
  right: max(20px, calc(50% - 620px)); bottom: -46px;
  display: flex; align-items: flex-end; gap: 18px;
}
.mo-id-name {
  margin: 0 0 54px;
  font: 900 var(--fs-2xl)/1 var(--f-title); letter-spacing: .14em;
  color: #FBF7EE; text-shadow: 0 1px 12px rgba(20, 16, 10, .45);
}
.mo-id-ava {
  width: 112px; height: 112px; border-radius: 6px;
  border: 4px solid var(--paper-hi);
  box-shadow: 0 6px 20px rgba(40, 30, 15, .22);
  background: var(--paper-hi); object-fit: cover;
}
.mo-sign {
  max-width: calc(var(--w-rail) + var(--w-feed) + var(--w-margin) + 2 * var(--gap));
  margin: 0 auto; padding: 58px 20px 0;
  display: flex; justify-content: flex-end; gap: 18px; align-items: baseline; flex-wrap: wrap;
  text-align: right;
}
.mo-sign-one { font: 400 var(--fs-lg)/1.6 var(--f-kai); color: var(--ink-2); }
.mo-sign-meta { font-size: var(--fs-sm); color: var(--ink-3); }

/* —— 三栏：行迹 | 动态 | 批注 —— */
.mo-body {
  display: grid;
  grid-template-columns: var(--w-rail) minmax(0, calc(var(--w-feed) + var(--gap) + var(--w-margin)));
  gap: var(--gap);
  justify-content: center;
  padding: 40px 20px 120px;
}

/* 左栏：行迹地图 + 章节 */
.mo-rail { position: sticky; top: calc(var(--topbar-h) + 22px); align-self: start; }
.mo-map {
  position: relative;
  background: var(--paper-hi);
  border: 1px solid var(--line);
  padding: 10px 10px 8px;
}
.mo-map svg { display: block; width: 100%; height: auto; }
.mo-map .prov { fill: rgba(140, 106, 68, .06); stroke: rgba(43, 38, 32, .22); stroke-width: .6; }
.mo-map .route { fill: none; stroke: var(--zhe); stroke-width: 1; stroke-dasharray: 2 3; opacity: .28; }
.mo-map .route-done { fill: none; stroke: var(--zhe); stroke-width: 1.8; }
.mo-map .stop { fill: var(--paper-hi); stroke: var(--zhe); stroke-width: 1.2; }
.mo-map .stop.seen { fill: var(--zhe); }
.mo-map .here { fill: var(--qing); stroke: var(--paper-hi); stroke-width: 2; transition: cx .5s ease, cy .5s ease; }
.mo-map .here-ring { fill: none; stroke: var(--qing); stroke-width: 1; opacity: .5; transition: cx .5s ease, cy .5s ease; }
.mo-map-now {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 6px; font-size: var(--fs-sm); line-height: 1.5;
}
.mo-map-now b { font-weight: 600; color: var(--qing); }
.mo-map-now span { color: var(--ink-3); white-space: nowrap; }

.mo-chapters { list-style: none; margin: 22px 0 0; padding: 0; }
.mo-chapters a {
  display: grid; grid-template-columns: 74px 1fr; gap: 2px 10px;
  padding: 9px 0 9px 14px; border-left: 2px solid var(--line);
  color: var(--ink-3);
}
.mo-chapters .yr { font-size: var(--fs-xs); padding-top: 3px; font-variant-numeric: tabular-nums; }
.mo-chapters .tt { font-size: 15.5px; line-height: 1.5; }
.mo-chapters a:hover { color: var(--ink-2); }
.mo-chapters a.on { border-left-color: var(--qing); color: var(--ink); }
.mo-chapters a.on .tt { font-weight: 600; }

.mo-order { display: flex; margin-top: 20px; border: 1px solid var(--line); width: max-content; }
.mo-order button { padding: 5px 14px; font-size: var(--fs-sm); color: var(--ink-2); }
.mo-order button[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); }

/* 中栏 + 右栏 */
.mo-stream { min-width: 0; }

/* 章节分隔 */
.mo-chap {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; align-items: baseline;
  margin: 0 0 8px; padding: 30px 0 22px;
  max-width: var(--w-feed);
}
.mo-stream > .mo-chap:first-child { padding-top: 4px; }
.mo-chap-yr {
  grid-row: span 2;
  font: 900 15px/1.3 var(--f-title); color: var(--zhe);
  writing-mode: vertical-rl; letter-spacing: .08em;
  border-right: 1px solid var(--zhe); padding-right: 6px; height: 100%;
}
.mo-chap h2 { margin: 0; font: 900 var(--fs-xl)/1.3 var(--f-title); letter-spacing: .06em; }
.mo-chap p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* 一条动态 */
.mo-post {
  display: grid;
  grid-template-columns: minmax(0, var(--w-feed)) var(--w-margin);
  gap: var(--gap);
  padding: 22px 0 24px;
  border-top: 1px solid var(--line);
}
.mo-post-main { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 14px; }
.ava {
  width: 46px; height: 46px; border-radius: 4px; object-fit: cover;
  background: var(--fold);
}
.ava-txt {
  display: grid; place-items: center;
  font: 400 22px/1 var(--f-kai); color: var(--zhe);
  border: 1px solid rgba(140, 106, 68, .35);
}
.mo-name { font-weight: 600; font-size: 15.5px; color: var(--qing); line-height: 1.4; }
.mo-text {
  margin: 4px 0 0;
  font: 400 var(--fs-lg)/1.9 var(--f-kai);
  white-space: pre-line;
}

/* 配图：1 张 / 多张 */
.mo-imgs { margin-top: 12px; display: grid; gap: 5px; }
.mo-imgs button { display: block; overflow: hidden; background: var(--fold); border-radius: 2px; }
.mo-imgs img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mo-imgs button:hover img { transform: scale(1.025); }
.mo-imgs.n1 { max-width: 420px; }
.mo-imgs.n1 button { aspect-ratio: 4 / 3; }
.mo-imgs.n1.tall { max-width: 300px; }
.mo-imgs.n1.tall button { aspect-ratio: 3 / 4; }
.mo-imgs.grid { grid-template-columns: repeat(3, 1fr); max-width: 450px; }
.mo-imgs.grid button { aspect-ratio: 1; }
.mo-imgs.n2, .mo-imgs.n4 { grid-template-columns: repeat(2, 1fr); max-width: 320px; }

/* 诗笺：八行笺，竖排 */
.mo-poem {
  margin-top: 14px; display: flex; gap: 0; width: max-content; max-width: 100%;
  background: var(--paper-hi);
  border: 1px solid rgba(163, 54, 31, .28);
  box-shadow: 0 1px 0 rgba(43, 38, 32, .05);
}
.mo-poem-sheet {
  writing-mode: vertical-rl;
  display: block; padding: 16px 10px;
  font: 400 16.5px/1 var(--f-kai);
  letter-spacing: .14em;
}
.mo-poem-sheet > span { display: block; padding: 0 9px; border-left: 1px solid rgba(163, 54, 31, .24); line-height: 1.6; }
.mo-poem-sheet > span:last-child { border-left: 0; }
.mo-poem-sheet .t { font-family: var(--f-title); font-weight: 900; color: var(--ink); }
.mo-poem-side {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px 16px; min-width: 150px;
  border-right: 1px solid rgba(163, 54, 31, .2);
  font-size: var(--fs-sm); color: var(--ink-2);
}
.mo-poem-side .go { color: var(--qing); }
.mo-poem:hover { border-color: var(--qing); }

.mo-quote { margin: 10px 0 0; font: var(--fs-sm)/1.8 var(--f-kai); color: var(--ink-2); }

/* 时间、地点、操作 */
.mo-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5;
  position: relative;
}
.mo-place { color: var(--qing); display: inline-flex; gap: 3px; align-items: center; }
.mo-place svg { width: 12px; height: 12px; }
a.mo-place:hover { text-decoration: underline; text-underline-offset: 3px; }
.mo-age { font-variant-numeric: tabular-nums; }
.mo-more {
  margin-left: auto;
  width: 34px; height: 22px; border-radius: 3px;
  background: var(--fold); color: var(--qing);
  display: grid; place-items: center; font-weight: 900; letter-spacing: 1px; line-height: 1;
}
.mo-more:hover { background: var(--qing-soft); }
.mo-pop {
  position: absolute; right: 42px; top: 50%; transform: translateY(-50%); z-index: 5;
  display: flex; background: #3A342C; border-radius: 4px; overflow: hidden;
}
.mo-pop[hidden] { display: none; }
.mo-pop button { color: var(--paper-hi); padding: 6px 16px; font-size: var(--fs-sm); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.mo-pop button:hover { background: rgba(255, 255, 255, .08); }

/* 点赞 + 评论：微信那块带小尖角的灰底 */
.mo-react {
  position: relative; margin-top: 12px;
  background: var(--fold); border-radius: 3px;
  font-size: 15px; line-height: 1.75;
}
.mo-react::before {
  content: ""; position: absolute; left: 14px; top: -6px;
  border: 6px solid transparent; border-top: 0; border-bottom-color: var(--fold);
}
.mo-likes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 8px 12px;
}
.mo-likes .heart { color: var(--qing); width: 15px; height: 15px; flex: none; }
.mo-liker { display: inline-flex; align-items: center; gap: 5px; color: var(--qing); }
.mo-liker img, .mo-liker .mini { width: 22px; height: 22px; border-radius: 3px; object-fit: cover; }
.mo-liker .mini { display: grid; place-items: center; font: 13px/1 var(--f-kai); color: var(--zhe); background: var(--paper-hi); }
.mo-liker.you { color: var(--ink); }
.mo-cmts { padding: 6px 12px 8px; }
.mo-likes + .mo-cmts { border-top: 1px solid rgba(43, 38, 32, .08); }
.mo-cmt { margin: 2px 0; }
.mo-cmt a { color: var(--qing); font-weight: 600; }
.mo-cmt .src { color: var(--ink-3); font-size: var(--fs-xs); margin-left: 4px; white-space: nowrap; }

/* 史注：页边朱批 */
.mo-note {
  align-self: start;
  margin-top: 26px;
  font: 400 15px/1.85 var(--f-kai);
  color: var(--zhu);
}
.mo-note-seal {
  display: inline-block; margin: 0 6px 2px 0; padding: 1px 4px;
  font: 900 12px/1.3 var(--f-title); letter-spacing: .1em;
  color: var(--paper-hi); background: var(--zhu); border-radius: 2px;
  vertical-align: 2px;
}

/* 页尾说明 */
.mo-foot {
  max-width: var(--w-feed); margin-top: 30px; padding: 16px 20px;
  border-top: 2px solid var(--ink);
  font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.9;
}
.mo-foot b { color: var(--zhu); font-weight: 600; }

/* 大图 */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(32, 28, 22, .92);
  display: grid; grid-template-rows: 1fr auto; place-items: center;
  padding: 4vh 4vw 3vh;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.lightbox figcaption { margin-top: 14px; color: #E9E1D0; font-size: 15px; text-align: center; }
.lightbox figcaption small { display: block; color: #A99E8B; font-size: var(--fs-xs); }
.lightbox .lb-close, .lightbox .lb-nav {
  position: absolute; color: #E9E1D0; font-size: 28px; width: 48px; height: 48px; display: grid; place-items: center;
}
.lightbox .lb-close { top: 12px; right: 16px; }
.lightbox .lb-prev { left: 12px; top: 50%; }
.lightbox .lb-next { right: 12px; top: 50%; }

/* —— 中屏：批注收进正文下方 —— */
@media (max-width: 1240px) {
  .mo-body { grid-template-columns: var(--w-rail) minmax(0, var(--w-feed)); }
  .mo-post { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mo-note {
    margin: 12px 0 0 60px; padding-left: 12px;
    border-left: 2px solid var(--zhu);
  }
}
/* —— 手机：单栏，行迹收成顶部一条 —— */
@media (max-width: 900px) {
  .mo-body { grid-template-columns: minmax(0, 1fr); padding: 18px 14px 90px; gap: 0; }
  .mo-rail {
    top: var(--topbar-h); z-index: 20; margin: 0 -14px 6px;
    background: rgba(236, 229, 214, .94); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line); padding: 8px 14px;
  }
  .mo-map { display: none; }
  .mo-chapters { display: flex; gap: 0; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .mo-chapters a { display: block; white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; padding: 4px 10px; }
  .mo-chapters a.on { border-bottom-color: var(--qing); }
  .mo-chapters .yr { display: none; }
  .mo-order { display: none; }
  .mo-cover { height: 46vh; min-height: 260px; }
  .mo-id { bottom: -36px; right: 14px; gap: 12px; }
  .mo-id-ava { width: 84px; height: 84px; }
  .mo-id-name { font-size: 27px; margin-bottom: 44px; }
  .mo-sign { padding: 44px 14px 0; }
  .mo-sign-one { font-size: var(--fs-md); }
  .mo-cover-cap { display: none; }
  .mo-post-main { grid-template-columns: 40px minmax(0, 1fr); gap: 0 10px; }
  .ava { width: 40px; height: 40px; }
  .mo-text { font-size: var(--fs-md); }
  .mo-note { margin-left: 50px; font-size: 14.5px; }
  .mo-imgs.grid { max-width: 100%; }
  .mo-chap h2 { font-size: 22px; }
}
