/* 朋友圈 UI v2：跟主页/我 一套浅蓝玻璃风 */
#moments { background: linear-gradient(180deg, #F7FCFF 0%, #EAF4FD 55%, #E2EFF9 100%); }
#moments .topbar {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(74,159,216,.10);
}
#moments .topbar .title { font-size: 18px; font-weight: 800; color: #12303F; letter-spacing: .4px; }

/* 卡片 */
.mo-item {
  margin: 0 12px 10px !important;
  padding: 15px 15px 12px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.9) !important;
  border: 1px solid rgba(255,255,255,.94) !important;
  box-shadow: 0 6px 20px rgba(70,130,180,.07) !important;
}
#moList > .mo-item:first-child { margin-top: 12px !important; }

/* 头像 / 名字 */
.mo-av {
  width: 42px !important; height: 42px !important;
  border-radius: 13px !important;
  box-shadow: 0 4px 12px rgba(70,130,180,.16), inset 0 0 0 1.5px rgba(255,255,255,.6) !important;
  font-size: 16px !important;
}
.mo-name { font-size: 14.5px !important; font-weight: 800 !important; color: #1B3A4D !important; letter-spacing: .1px; }
.mo-text { font-size: 14.5px !important; line-height: 1.62 !important; color: #23435A !important; margin-top: 6px !important; }

/* 九宫格 */
.mo-grid { margin-top: 10px; gap: 5px; }
.mo-cell { border-radius: 10px; overflow: hidden; }
.mo-cell img, .mo-cell video { border-radius: 10px; }
.mo-play { width: 34px; height: 34px; }

/* 时间 + 操作 */
.mo-meta {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid rgba(74,159,216,.08);
  font-size: 11px !important;
  color: #A2B6C4 !important;
}
.mo-acts { gap: 8px !important; }
.mo-act {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px !important; font-weight: 700 !important;
  color: #5D7C90 !important;
  background: rgba(74,159,216,.08);
  padding: 4px 10px; border-radius: 999px;
  line-height: 1;
}
.mo-act .ico-svg { width: 12px; height: 12px; }
.mo-act.on { color: #E2574C !important; background: rgba(226,87,76,.10); }
.mo-act.danger { color: #C1483F !important; background: rgba(226,87,76,.08); }

/* 点赞条 */
.mo-likes {
  margin-top: 9px; padding: 8px 11px;
  border-radius: 12px;
  background: rgba(74,159,216,.07);
  font-size: 12px !important;
  color: #2E7DB2 !important;
  line-height: 1.5;
  display: flex; gap: 6px; align-items: flex-start;
}
.mo-heart { color: #E2574C !important; margin: 0 !important; display: inline-flex; flex: none; margin-top: 1px !important; }
.mo-heart .ico-svg { width: 12px; height: 12px; }

/* 评论 */
.mo-comments {
  margin-top: 8px; padding: 9px 11px;
  border-radius: 12px;
  background: rgba(244,250,255,.9) !important;
  border: 1px solid rgba(74,159,216,.08);
}
.mo-cmt { font-size: 12.5px !important; line-height: 1.6; color: #34566E; }
.mo-cmt + .mo-cmt { margin-top: 4px; }
.mo-cmt b { color: #2E7DB2 !important; font-weight: 700; }

/* 发动态里的选图框 */
.mo-pick {
  border: 1.5px dashed rgba(74,159,216,.28) !important;
  background: rgba(247,252,255,.8);
  border-radius: 14px !important;
  color: #2E7DB2 !important;
  font-weight: 600;
}

/* 空态 */
#moList .empty { color: #8FA5B5; }
#moList .empty .empty-ico {
  width: 68px; height: 68px; margin: 0 auto 14px;
  border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #E7F3FC, #D6EAF8);
  color: #5FA8D6;
}
#moList .empty .empty-ico svg { width: 32px; height: 32px; }

/* ---------------------------------------------------------------
   顶栏钉死在页面顶部：内容只在下面的列表里滚，顶栏绝不跟着走。
   以前只靠 .page 的 flex 布局撑，手机上（尤其地址栏收起/键盘弹起时）
   整页会跟着挪，顶栏看起来就"不是固定的"。
   --------------------------------------------------------------- */
#moments { overflow: hidden !important; }
/* 用 position: fixed 而不是 sticky：sticky 只对「自己的滚动祖先」生效，
   手机 WebView/浏览器里一旦滚动被交给整页，sticky 就跟着跑了。
   fixed 是相对视口的，谁滚都不动。 */
#moments > .topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 720px !important;
  z-index: 40 !important;
  flex: none;
  padding-top: env(safe-area-inset-top, 0px) !important;
  height: calc(54px + env(safe-area-inset-top, 0px)) !important;
  background: #F3F9FD !important;
  border-bottom: 1px solid rgba(74, 159, 216, .10) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}
body.dark #moments > .topbar { background: #0C1C29 !important; }
/* 列表往下让出顶栏的高度，别被盖住 */
#moments > .content,
#moments #moList {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: calc(54px + env(safe-area-inset-top, 0px)) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ---------------------------------------------------------------
   顶栏高度：一个说法说了算
   以前 app.css 里还有一条 #moments > .topbar 把 min/max-height 钉在 52px，
   跟这里的 54px + 安全区打架 —— 带刘海的手机上 max-height 赢，内容被压进
   几像素里，看起来就是「高度不对 / 忽高忽低」。这里用同一个变量把
   height / min-height / max-height 一起定死，安全区只放在 padding 上。
   --------------------------------------------------------------- */
#moments {
  --mo-bar: calc(54px + env(safe-area-inset-top, 0px));
}
#moments > .topbar {
  height: var(--mo-bar) !important;
  min-height: var(--mo-bar) !important;
  max-height: var(--mo-bar) !important;
  padding: 0 14px !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  flex: none !important;
  position: fixed !important;
  top: 0 !important;
  z-index: 40 !important;
}
#moments > .topbar > .ic { flex: 0 0 36px !important; height: 36px !important; }
#moments > .topbar .title,
#moments > .topbar .title * {
  line-height: 1.15 !important;
  max-height: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 列表让出的高度跟着同一个变量走 */
#moments > .content,
#moments #moList {
  padding-top: var(--mo-bar) !important;
}
