/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --paper: #f3edde;
  --paper2: #fbf7ec;
  --ink: #332e26;
  --ink2: #7d7261;
  --accent: #a63b2a;
  --accent-soft: #f3e3dc;
  --bamboo: #5a7a58;
  --gold: #a9853f;
  --line: #ddd2ba;
  --shadow: 0 2px 10px rgba(80,64,36,.07);
  --radius: 12px;
}
html, body { height: 100%; }
body {
  font-family: "Kaiti SC", "STKaiti", KaiTi, "Noto Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; outline: none; }

/* ============ 登录页 ============ */
#loginPage {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #efe9dd 0%, var(--paper) 55%, #ece4d4 100%);
  overflow: hidden;
}
.login-bg { position: absolute; inset: 0; }
.ink-circle { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; animation: drift 14s ease-in-out infinite alternate; }
.ink-circle.c1 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(90,122,88,.25), transparent 70%); top: -60px; right: -60px; }
.ink-circle.c2 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(168,63,46,.14), transparent 70%); bottom: -100px; left: -100px; animation-delay: -5s; }
.ink-circle.c3 { width: 160px; height: 160px; background: radial-gradient(circle, rgba(184,147,90,.25), transparent 70%); top: 30%; left: 12%; animation-delay: -9s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,20px) scale(1.12); } }

.login-card {
  position: relative; width: min(360px, 90vw);
  background: var(--paper2); border: 1px solid var(--line);
  border-radius: 20px; padding: 40px 32px 32px; text-align: center; box-shadow: var(--shadow);
}
.login-logo {
  position: relative; display: inline-block;
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: 46px; letter-spacing: 10px; color: var(--ink);
  margin-bottom: 4px; text-indent: 10px;
}
/* 登录卡右下角朱印（纯装饰） */
.login-card::after {
  content: "修道真功"; position: absolute; right: 13px; bottom: 13px;
  writing-mode: vertical-rl; font-family: "Kaiti SC", KaiTi, serif;
  font-size: 10px; letter-spacing: 2px; line-height: 1.15;
  color: #f5ecd6; background: var(--accent); padding: 7px 4px;
  border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(245,236,214,.35);
  opacity: .92; pointer-events: none;
}
.login-sub { color: var(--ink2); letter-spacing: 4px; font-size: 13px; margin-bottom: 18px; }
.login-tabs { display: flex; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.login-tab {
  flex: 1; height: 40px; font-size: 14px; letter-spacing: 4px; text-indent: 4px;
  color: var(--ink2); background: #f4efe5; transition: background .15s, color .15s;
}
.login-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.login-form .input-row {
  display: flex; align-items: center; gap: 8px;
  background: #f4efe5; border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px; margin-bottom: 14px; height: 46px;
}
.input-icon { font-size: 16px; }
.input-row input { flex: 1; border: none; background: none; font-size: 15px; }
.btn-code {
  flex-shrink: 0; color: var(--accent); font-size: 13px; padding: 6px 10px;
  border-left: 1px solid var(--line); height: 28px;
}
.btn-code:disabled { color: var(--ink2); cursor: not-allowed; }
.btn-primary {
  width: 100%; height: 46px; border-radius: 10px; margin-top: 6px;
  background: linear-gradient(135deg, #b5472f, var(--accent));
  color: #fff; font-size: 16px; letter-spacing: 6px; text-indent: 6px;
  box-shadow: 0 4px 14px rgba(168,63,46,.3); transition: transform .15s;
}
.btn-primary:active { transform: scale(.97); }
.login-tip { margin-top: 16px; font-size: 12px; color: var(--ink2); }

/* ============ 应用框架 ============ */
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.site-announce {
  margin: 12px 16px 0; padding: 10px 14px; border-radius: 10px;
  background: rgba(176,141,79,.08); border: 1px dashed var(--gold);
  color: var(--ink2); font-size: 13px; line-height: 1.7; word-break: break-all;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: rgba(243,237,222,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-title {
  font-family: "Kaiti SC", KaiTi, STKaiti, serif; font-size: 20px; letter-spacing: 4px;
}
/* 顶栏标题后的小朱印（纯装饰，不占结构） */
.topbar-title::after {
  content: "修"; display: inline-block; margin-left: 9px;
  width: 21px; height: 21px; line-height: 21px; text-align: center;
  background: var(--accent); color: #f5ecd6; font-size: 12px;
  font-family: "Kaiti SC", KaiTi, serif;
  letter-spacing: 0; text-indent: 0; border-radius: 4px; vertical-align: 2px;
  box-shadow: inset 0 0 0 1px rgba(245,236,214,.4);
}
/* 网站 LOGO：放大 2 倍（2em），与文字基线对齐；multiply 让白底融入纸色背景 */
.site-logo { height: 2em; width: 2em; vertical-align: -0.55em; margin-right: 0.12em; mix-blend-mode: multiply; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bamboo), #3d5a3c);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-family: "Kaiti SC", KaiTi, serif;
}
.avatar.big { width: 56px; height: 56px; font-size: 24px; }

#main { flex: 1; padding: 14px 16px 90px; overflow-y: auto; }
.view { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ 通用卡片 ============ */
.card {
  background: var(--paper2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-tag {
  font-size: 13px; color: var(--accent); letter-spacing: 2px;
  padding-left: 8px; border-left: 3px solid var(--accent); font-weight: 600;
}
.card-sub { font-size: 12px; color: var(--ink2); }

/* ============ 每日打卡（小卡片） ============ */
.checkin-mini {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, #33473a, #243629);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
  color: #e8e3d6; box-shadow: var(--shadow);
}

/* ---- 首页快捷入口（打卡卡下方） ---- */
.home-quick { display: flex; gap: 10px; margin-bottom: 14px; }
.hq-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 0; border-radius: var(--radius); font-size: 13px; letter-spacing: 1px;
  background: var(--paper2); border: 1px solid var(--gold); color: var(--gold);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.hq-btn:active { transform: scale(.97); background: rgba(201,163,92,.12); }
.hq-icon { font-size: 15px; }

/* ---- 养生页 ---- */
.btn-back {
  display: inline-block; margin-bottom: 12px; padding: 6px 14px 6px 8px;
  background: var(--paper2); border: 1px solid var(--line); border-radius: 16px;
  font-size: 13px; color: var(--ink2); cursor: pointer;
}

/* ---- 我的邀请码 ---- */
.inv-desc { font-size: 12px; color: var(--ink2); line-height: 1.7; margin: 2px 2px 10px; }
.btn-inv-gen {
  width: 100%; padding: 10px 0; border-radius: var(--radius); font-size: 13px; letter-spacing: 2px;
  background: var(--paper2); border: 1px solid var(--gold); color: var(--gold);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.btn-inv-gen:active { transform: scale(.98); }
.btn-inv-gen:disabled { opacity: .4; cursor: default; }
.inv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.inv-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--paper2); border-radius: 10px;
}
.inv-code {
  font-family: Georgia, serif; font-size: 15px; letter-spacing: 3px;
  color: var(--gold); cursor: pointer; user-select: all;
}
.inv-status { flex: 1; font-size: 12px; color: var(--bamboo); }
.inv-status.used { color: var(--ink2); }
.inv-time { font-size: 11px; color: var(--ink2); }

/* ---- 动态列表：更多链接 + 分页 ---- */
.feed-more {
  text-align: center; padding: 10px 0 4px; margin-top: 4px;
  font-size: 13px; color: var(--gold); letter-spacing: 1px;
  border-top: 1px dashed var(--line); cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.feed-more:active { opacity: .7; }
.feed-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 0 4px; border-top: 1px dashed var(--line); margin-top: 4px;
}
.fp-btn {
  padding: 7px 18px; border-radius: 16px; font-size: 13px; letter-spacing: 1px;
  background: var(--paper2); border: 1px solid var(--gold); color: var(--gold);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.fp-btn:active { transform: scale(.96); }
.fp-btn:disabled { opacity: .35; border-color: var(--line); color: var(--ink2); cursor: default; }
.fp-info { font-size: 12px; color: var(--ink2); letter-spacing: 1px; }
.shichen-card { border-color: #a8c0a0; }
.shichen-body { padding: 4px 2px 2px; text-align: center; }
.shichen-name {
  font-family: Georgia, serif; font-size: 30px; color: var(--ink);
  letter-spacing: 6px; margin: 6px 0 2px;
}
.shichen-time { font-size: 13px; color: var(--ink2); letter-spacing: 2px; }
.shichen-organ {
  display: inline-block; margin: 10px 0; padding: 3px 14px;
  border: 1px solid var(--gold); border-radius: 12px;
  color: var(--gold); font-size: 13px; letter-spacing: 2px;
}
.shichen-tip { font-size: 14px; line-height: 1.8; color: var(--ink); margin: 8px 4px 10px; }
.shichen-avoid { font-size: 12px; color: #b06a55; letter-spacing: 1px; margin-bottom: 4px; }

/* ---- 养生功：大圆圈静修倒计时 ---- */
.pc-card { text-align: center; padding-bottom: 20px; }
.pc-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.pc-empty { font-size: 12.5px; color: var(--ink2); letter-spacing: 1px; padding: 6px 0; }
.pc-tab {
  padding: 6px 16px; border-radius: 16px; font-size: 13px; letter-spacing: 2px;
  background: transparent; border: 1px solid var(--line); color: var(--ink2); cursor: pointer;
  transition: all .15s ease; -webkit-tap-highlight-color: transparent;
}
.pc-tab.active {
  background: linear-gradient(135deg, var(--bamboo), #3d5a3c); color: #fff; border-color: transparent;
}
.pc-durs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.pc-dur {
  padding: 4px 12px; border-radius: 999px; font-size: 11.5px;
  background: #f4f1e8; border: 1px solid transparent; color: var(--ink2); cursor: pointer;
  transition: all .15s ease; -webkit-tap-highlight-color: transparent;
}
.pc-dur.active { border-color: var(--gold); color: var(--gold); background: rgba(217,169,63,.1); }
.pc-circle { position: relative; width: 230px; height: 230px; margin: 0 auto 14px; }
.pc-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.pc-ring-bg { fill: none; stroke: #e8e0cc; stroke-width: 7; }
.pc-ring-fill {
  fill: none; stroke: url(#pcGrad); stroke: var(--bamboo); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 653.45; stroke-dashoffset: 0; transition: stroke-dashoffset .8s linear, stroke .3s;
}
.pc-core {
  position: absolute; inset: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fdfaf2, #efe6d2);
  box-shadow: inset 0 2px 8px rgba(120,100,60,.18), 0 3px 10px rgba(90,80,50,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pc-figure { font-size: 44px; line-height: 1; margin-bottom: 4px; }
.pc-core.running .pc-figure { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.pc-count { font-size: 34px; font-family: Georgia, serif; color: var(--ink); line-height: 1.1; letter-spacing: 1px; }
.pc-goal { font-size: 11px; color: var(--gold); letter-spacing: 2px; margin-top: 5px; }
.pc-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.pc-btn {
  padding: 10px 26px; border-radius: 20px; font-size: 13.5px; letter-spacing: 2px; border: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.pc-btn.main { background: linear-gradient(135deg, var(--bamboo), #3d5a3c); color: #fff; min-width: 96px; }
.pc-btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink2); }
.pc-btn.music.on { border-color: var(--gold); color: var(--gold); background: rgba(217,169,63,.08); }
.pc-btn:active { transform: scale(.95); }
.pc-tip { font-size: 11.5px; color: var(--ink2); line-height: 1.7; padding: 0 10px; }
.pc-video {
  margin-top: 10px; padding: 8px 18px; border-radius: 16px; font-size: 12.5px; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--gold), #c9a35c); color: #fff; border: none; cursor: pointer;
}
.pc-video:active { transform: scale(.95); }
.health-tip-title {
  text-align: center; font-size: 16px; color: var(--gold);
  letter-spacing: 2px; margin: 10px 0 6px; font-weight: 600;
}
.health-tip-text { font-size: 14px; line-height: 1.9; color: var(--ink); padding: 0 4px 6px; }
.checkin-label { font-size: 12px; letter-spacing: 2px; opacity: .75; }
.checkin-stats { font-size: 12px; opacity: .9; margin-top: 2px; }
.checkin-stats b { font-size: 16px; color: #f0d9a8; margin: 0 2px; font-family: Georgia, serif; }
.lv-line { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.lv-badge { color: #f0d9a8; letter-spacing: 1px; font-weight: 600; }
.lv-pts { opacity: .8; }
.lv-bar { margin-top: 5px; height: 4px; width: 160px; border-radius: 2px; background: rgba(255,255,255,.22); overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #e8cf9a, #c9a35c); transition: width .5s ease; }
.btn-checkin {
  padding: 7px 18px; border-radius: 20px; font-size: 14px; letter-spacing: 2px;
  background: linear-gradient(135deg, #e0b96a, var(--gold)); color: #3a2f1d; font-weight: 600;
  transition: transform .15s, filter .2s;
}
.btn-checkin:active { transform: scale(.94); }
.btn-checkin.done { background: rgba(255,255,255,.15); color: #f0d9a8; filter: none; cursor: default; }
.btn-checkin.pop { animation: pop .4s ease; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ============ 道德经卡片 ============ */
.ddj-card { background: linear-gradient(170deg, #fdfbf7, #f7f1e4); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ddj-card:active { opacity: .96; }
.ddj-jump { margin-top: 10px; text-align: center; font-size: 12px; color: var(--gold); letter-spacing: 1px; opacity: .9; }
.ddj-date { font-size: 12px; color: var(--ink2); }
.ddj-chapter {
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: 22px; letter-spacing: 6px; text-align: center; margin: 6px 0 12px; color: var(--ink);
}
.ddj-text {
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: 18px; line-height: 2; text-align: center; color: #3d3931;
  padding: 0 6px;
}
.ddj-explain {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 14px; color: var(--ink2); line-height: 1.8;
}
.ddj-explain-title { font-size: 12px; color: var(--gold); letter-spacing: 3px; margin-bottom: 4px; }
.btn-ghost {
  width: 100%; margin-top: 14px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--accent); color: var(--accent); font-size: 14px; letter-spacing: 2px;
  background: transparent; transition: background .2s;
}
.btn-ghost:active { background: var(--accent-soft); }
.btn-ghost.danger { border-color: #c06562; color: #b05450; }

/* ============ 最新评论 ============ */
.recent-comments .rc-item {
  display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.recent-comments .rc-item:last-child { border-bottom: none; }
/* 用户主页动态：可点击进入详情 */
.rc-item.rc-link { cursor: pointer; border-radius: 8px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; transition: background .15s; }
.rc-item.rc-link:active { background: rgba(166,127,69,.1); }
.rc-link .rc-book::after { content: " · 点击查看 ›"; color: var(--gold); font-size: 11px; }
#pdBody .post { margin-bottom: 10px; }
/* 动态详情浮层须高于用户主页/消息等浮层（DOM 靠前，否则会被盖住） */
#postDetail { z-index: 65; }

/* ---- 关注列表浮层 ---- */
.fw-tabs { display: flex; gap: 8px; padding: 10px 16px 0; border-bottom: 1px solid var(--line); }
.fw-tab {
  flex: 1; padding: 8px 0; border: 1px solid var(--line); background: #f4efe5;
  border-radius: 8px; font-size: 13px; letter-spacing: 2px; color: var(--ink2);
  transition: all .15s;
}
.fw-tab.active { background: #33473a; color: #f0e9d8; border-color: #33473a; }
.fw-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.fw-item:last-child { border-bottom: none; }
.fw-info { flex: 1; min-width: 0; }
.fw-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.fw-sub { font-size: 11px; color: var(--ink2); margin-top: 2px; letter-spacing: 1px; }
.fw-btn {
  padding: 5px 16px; border-radius: 16px; font-size: 12px; flex-shrink: 0;
  border: 1px solid var(--gold); color: var(--gold); background: transparent;
  transition: all .15s;
}
.fw-btn.on { background: linear-gradient(180deg, #c9a05a, #b08245); color: #fff; border-color: transparent; }
.fw-empty { text-align: center; color: var(--ink2); font-size: 12px; padding: 40px 0; letter-spacing: 1px; }
.rc-item .avatar { width: 34px; height: 34px; font-size: 15px; flex-shrink: 0; }
.rc-body { flex: 1; min-width: 0; }
.rc-name { font-size: 13px; color: var(--bamboo); font-weight: 600; }
.rc-book { font-size: 11px; color: var(--gold); margin-left: 6px; }
.rc-text { font-size: 13px; color: var(--ink); margin: 2px 0; word-break: break-all; }
.rc-time { font-size: 11px; color: #a9a294; }
.rc-empty { text-align: center; color: var(--ink2); font-size: 13px; padding: 16px 0; }

/* ============ 我的修习 · 格子 ============ */
#myRecords .admin-sub { margin-top: 4px; }
.rec-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px; padding: 4px 0 10px;
}
.rec-cell {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); cursor: pointer; user-select: none;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.rec-cell:active { transform: scale(.96); border-color: var(--gold); }
.rec-cell:hover { border-color: var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.rec-fig { font-size: 24px; line-height: 1; margin-bottom: 6px; }
.rec-name {
  font-size: 12px; color: var(--bamboo); font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rec-sub { font-size: 11px; color: #a9a294; margin-top: 3px; }

/* ============ 书架 ============ */
.shelf-tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }

.tier-head {
  font-size: 13px; letter-spacing: 2px; color: var(--gold); font-weight: 600;
  margin: 18px 2px 10px; padding-left: 10px; position: relative;
}
.tier-head:first-child { margin-top: 4px; }
.tier-head::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px; background: var(--gold); border-radius: 2px; }

.shelf-empty {
  padding: 56px 20px; text-align: center; color: var(--sub); font-size: 14px;
  letter-spacing: 2px; line-height: 2.2; border: 1px dashed var(--line); border-radius: 12px;
}
.shelf-empty span { font-size: 12px; opacity: .8; }
.shelf-tab {
  flex-shrink: 0; padding: 8px 14px; border-radius: 20px; font-size: 13px; letter-spacing: 1px;
  background: var(--paper2); border: 1px solid var(--line); color: var(--ink2); transition: all .2s;
}
.shelf-tab.active { background: var(--ink); color: #f4efe3; border-color: var(--ink); }

.book-list { display: flex; flex-direction: column; gap: 12px; }
.book-item {
  display: flex; gap: 14px; background: var(--paper2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .15s;
}
.book-item:active { transform: scale(.98); }
.book-cover {
  position: relative;
  width: 64px; height: 88px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Kaiti SC", KaiTi, serif; font-size: 26px; color: #fff;
  writing-mode: vertical-rl; letter-spacing: 4px;
  box-shadow: 2px 3px 8px rgba(60,50,30,.25);
}
/* 书封线装双线描边（仿古籍书框，纯装饰） */
.book-cover::before, .bd-cover::before {
  content: ""; position: absolute; inset: 4px;
  border: 1px solid rgba(245,236,214,.4); border-radius: 3px;
  pointer-events: none;
}
.book-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.book-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.book-author { font-size: 12px; color: var(--ink2); margin-bottom: 6px; }
.book-desc { font-size: 12px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-badge {
  margin-top: auto; align-self: flex-start;
  font-size: 11px; color: var(--bamboo); background: #eaf0e6;
  padding: 2px 10px; border-radius: 10px; margin-top: 8px;
}
/* 书架每本书的问答入口按钮 */
.book-actions-row { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.book-qa-btn {
  font-size: 11px; color: var(--bamboo); background: #eaf0e6;
  padding: 3px 12px; border-radius: 10px; border: 1px solid transparent;
  letter-spacing: .5px; cursor: pointer;
}
.book-qa-btn:active { background: #dce7d6; transform: scale(.96); }
.book-fin { font-size: 11px; color: var(--gold); }
/* 书籍打卡信息浮层（读完打卡 · 次数与功德列表） */
.rd-head { display: flex; gap: 10px; }
.rd-stat { flex: 1; background: #f6f2ea; border-radius: 10px; padding: 12px 8px; text-align: center; }
.rd-stat b { font-size: 24px; font-family: Georgia, serif; color: var(--gold); display: block; }
.rd-stat span { font-size: 11px; color: var(--ink2); letter-spacing: 2px; }
.rd-note { font-size: 11px; color: var(--ink2); letter-spacing: 1px; margin: 10px 2px 4px; }
.rd-list .fw-item .fw-sub em { font-style: normal; color: var(--gold); }
.rd-me { font-size: 11px; color: var(--gold); }
.rd-today {
  font-size: 11px; color: var(--bamboo); background: #eaf0e6;
  padding: 1px 8px; border-radius: 10px; margin-left: 4px; letter-spacing: 1px;
}
.book-badge .fin { color: var(--gold); margin-left: 6px; }
.book-item.locked .book-cover { position: relative; filter: saturate(.55) brightness(.92); }
.book-item.locked .book-name::after { content: " 🔒"; font-size: 12px; }
.cover-lock {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: rgba(0, 0, 0, .25); border-radius: inherit;
}
.book-badge.lock { color: #b06a55; letter-spacing: 1px; margin-top: 4px; }
.book-item.locked { cursor: pointer; }

/* ---- 经阶解锁浮层 ---- */
.um-card { text-align: center; padding: 22px 18px 16px; }
.um-icon { font-size: 34px; }
.um-title { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: 2px; margin-top: 8px; }
.um-book { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.um-cost { font-size: 15px; color: var(--gold); letter-spacing: 1px; margin: 12px 0 4px; font-weight: 600; }
.um-points { font-size: 12px; color: var(--ink2); }
.um-actions { display: flex; gap: 10px; margin-top: 16px; }
.um-actions button { flex: 1; }
.um-tip { font-size: 11px; color: var(--ink2); margin-top: 14px; line-height: 1.6; opacity: .85; }

/* ============ 排行榜 ============ */
.rank-period { display: flex; gap: 8px; margin-bottom: 14px; }
.rp-btn {
  flex: 1; padding: 9px 0; border-radius: 20px; font-size: 13px;
  background: var(--paper2); border: 1px solid var(--line); color: var(--ink2);
}
.rp-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.rank-list .rank-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
}
.rank-item.me { border-color: var(--gold); background: #fbf6ec; }
.rank-no {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 15px; font-weight: 700;
  background: #efe9dc; color: var(--ink2);
}
.rank-no.n1 { background: linear-gradient(135deg,#f2d488,#d9a93f); color: #5c4413; }
.rank-no.n2 { background: linear-gradient(135deg,#dcdcdc,#b8b8b8); color: #4a4a4a; }
.rank-no.n3 { background: linear-gradient(135deg,#e5b98f,#c68a4e); color: #5c3d18; }
.rank-item .avatar { width: 36px; height: 36px; font-size: 15px; }
.rank-info { flex: 1; }
.rank-name { font-size: 14px; font-weight: 600; }
.rank-sub { font-size: 11px; color: var(--ink2); }
.rank-val { font-size: 18px; font-family: Georgia, serif; color: var(--accent); font-weight: 700; }
.rank-val small { font-size: 11px; color: var(--ink2); font-family: inherit; font-weight: 400; }

/* ============ 持念 ============ */
.mantra-card { text-align: center; padding-bottom: 20px; }

/* 分类分段器：圣号 / 咒语 / 宝诰 / 我的（深墨绿玉底 + 金牌选中；宽度自适应：小屏占满平分，大屏限宽居中） */
.mcat-seg {
  display: flex; justify-content: center; gap: 4px;
  width: min(100%, 520px); max-width: 100%;
  margin: 0 auto 14px; padding: 4px;
  background: linear-gradient(180deg, #3c4c41, #2b382f);
  border: 1px solid #243028; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(30,45,35,.3);
  box-sizing: border-box;
}
.mcat-btn {
  flex: 1 1 0; min-width: 0;                          /* 平分可用宽度 */
  padding: 8px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: none; background: transparent; border-radius: 999px;
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: clamp(13px, 3.4vw, 16px);               /* 字号随视口缩放 */
  letter-spacing: clamp(1px, 1vw, 3px);
  color: rgba(240,233,216,.5);
  transition: all .15s; -webkit-tap-highlight-color: transparent;
}
.mcat-btn.active {
  background: linear-gradient(180deg, #c9a05a, #b08245);
  color: #fff; text-shadow: 0 1px 2px rgba(90,60,20,.4);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.mantra-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.mantra-tabs-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 16px; }
.mantra-tabs-row .mantra-tabs { flex: 1; margin-bottom: 0; }
.mantra-add-btn {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(180deg, #b58a4e, #a06a35); color: #fff;
  font-size: 18px; line-height: 1; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 5px rgba(120,80,30,.3);
}
.mantra-add-btn:active { transform: scale(0.94); }
.mantra-tab {
  padding: 6px 14px; border-radius: 16px; font-size: 12px;
  background: #f4efe5; border: 1px solid var(--line); color: var(--ink2);
}
.mantra-tab .mine-flag {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  font-size: 9px; color: #a06a35; border: 1px solid #d9b78a;
  border-radius: 8px; line-height: 14px; vertical-align: middle;
}
.mantra-tab.mine { background: #fbf4e4; border-color: #d9b78a; }
.mantra-tab.active { background: #33473a; color: #f0e9d8; border-color: #33473a; }

/* 「我的」分类按钮（与 圣号/咒语/宝诰 同排） */
.mcat-btn.mine-cat { color: #a06a35; border-color: #d9b78a; }
.mcat-btn.mine-cat.active { background: #8a6526; border-color: #8a6526; color: #f7f0df; }

/* 「编辑 / 删除」按钮 —— 个人经文内容下方（不遮挡正文） */
.mantra-frame-actions {
  display: flex; justify-content: center; gap: 10px; margin-top: 14px;
}
.mantra-act {
  border: 1px solid #d9b78a; background: #fbf4e4;
  color: #8a6526; font-size: 13px; line-height: 1; padding: 8px 22px; border-radius: 18px;
  font-family: inherit; cursor: pointer; transition: background .15s, color .15s;
}
.mantra-act:hover { background: #fff; color: #5a3f12; }
.mantra-act.danger { color: #a04545; border-color: #d8a8a8; background: #fdf6f6; }
.mantra-act.danger:hover { background: #fff5f5; color: #8a2a2a; }

/* 咒文展示框：宣纸底 + 双线框 + 顶部分类徽章 + 全文展开（无内部滚动） */
.mantra-display { margin-top: 4px; margin-bottom: 18px; }
.mantra-frame {
  position: relative; margin: 18px 4px 0; padding: 22px 16px 16px;
  border: 1px solid #ddd0b5; border-radius: 10px;
  background: linear-gradient(180deg, #fbf7ee, #f5edd9);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.75), 0 2px 8px rgba(80,60,30,.08);
}
.mantra-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 3px; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, #b58a4e, #a06a35);
  padding: 3px 16px; border-radius: 999px;
  box-shadow: 0 2px 5px rgba(120,80,30,.3);
}
.mantra-text {
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: 28px; letter-spacing: 4px; text-indent: 4px; line-height: 1.75;
  color: var(--accent); word-break: break-word; text-align: center;
}
/* 持念全文所见即所得：换行分段、空行占位 */
.mantra-text .mt-line { display: block; }
.mantra-text .mt-blank { display: block; height: .7em; }
.mantra-orn { color: var(--gold); font-size: 10px; letter-spacing: 14px; text-indent: 14px; margin: 6px 0 4px; opacity: .85; }
.mantra-note { font-size: 12px; color: var(--ink2); margin-top: 10px; letter-spacing: 1px; }
.mala { position: relative; width: 230px; height: 230px; margin: 0 auto 16px; }
.mala-core {
  position: absolute; inset: 43px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fdfaf2, #efe6d2);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 2px 10px rgba(90,70,40,.12), 0 4px 16px rgba(60,50,30,.12);
  cursor: pointer; user-select: none; transition: transform .1s;
}
.mala-core:active { transform: scale(.95); }
.mala-count { font-size: 52px; font-family: Georgia, serif; color: var(--ink); line-height: 1; }
.mala-goal { font-size: 11px; color: var(--gold); letter-spacing: 2px; margin-top: 6px; }
.mala-beads { position: absolute; inset: 0; pointer-events: none; }
.bead {
  position: absolute; width: 17px; height: 17px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b97a4f, #8a5433);
  box-shadow: 0 2px 4px rgba(60,40,20,.3);
  left: calc(50% + var(--x)); top: calc(50% + var(--y));
  transform: translate(-50%,-50%); transition: all .2s;
}
.bead.lit { background: radial-gradient(circle at 35% 30%, #f2d488, #d9a93f); transform: translate(-50%,-50%) scale(1.25); }
.mala-ring { position: absolute; inset: 12px; border-radius: 50%; border: 2px dashed #d9cdb4; }
.mala-core.chant { animation: chant .35s ease; }
@keyframes chant { 0% { box-shadow: 0 0 0 0 rgba(217,169,63,.5); } 100% { box-shadow: 0 0 0 22px rgba(217,169,63,0); } }
/* 统计条：圆角底板 + 竖分隔线 */
.mantra-stats {
  display: flex; justify-content: center; margin: 4px 6px 6px;
  background: #f6f0e2; border: 1px solid var(--line); border-radius: 10px; padding: 10px 0;
}
.ms-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.ms-item + .ms-item::before {
  content: ""; position: absolute; left: 0; top: 18%; height: 64%; width: 1px; background: #ddd0b5;
}
.ms-item b { font-size: 20px; font-family: Georgia, serif; color: var(--ink); }
.ms-item span { font-size: 11px; color: var(--ink2); letter-spacing: 2px; }
.mantra-actions { margin-top: 14px; }
.mantra-actions .btn-ghost { margin-top: 0; width: auto; padding: 7px 26px; }
.mantra-tip { font-size: 11px; color: #b3ab99; margin-top: 12px; letter-spacing: 1px; }

/* ---- 我的持念编辑表单 ---- */
.mme-form { display: flex; flex-direction: column; gap: 12px; }
.mme-field { display: flex; flex-direction: column; gap: 5px; }
.mme-field label { font-size: 12px; color: var(--ink2); letter-spacing: 1px; }
.mme-field input[type=text], .mme-field input[type=number], .mme-field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  background: #fdfaf2; font-size: 14px; color: var(--ink);
  font-family: inherit; outline: none; resize: vertical;
}
.mme-field input:focus, .mme-field textarea:focus { border-color: var(--gold); background: #fff; }
.mme-row { display: flex; gap: 10px; }
.mme-half { flex: 1; }
.mme-cats { display: flex; gap: 6px; }
.mme-cat {
  flex: 1; text-align: center; padding: 7px 0; border-radius: 18px;
  background: #f4efe5; border: 1px solid var(--line); font-size: 13px;
  color: var(--ink2); cursor: pointer; letter-spacing: 2px;
}
.mme-cat input { display: none; }
.mme-cat:has(input:checked) { background: #33473a; color: #f0e9d8; border-color: #33473a; }
.mme-count { font-size: 10px; color: #b3ab99; text-align: right; }
.mme-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.mme-actions .btn-ghost { padding: 7px 18px; margin-top: 0; }
.mme-actions .btn-ghost.danger { color: #a83f2e; border-color: #e7c8c0; background: #fdf3f1; margin-right: auto; }

/* ---- 歌词显示功能已移除 ---- */

/* ---- 持念页 · 流珠小考 ---- */
.mantra-lore { text-align: left; }
.lore-title {
  font-size: 14px; font-weight: 700; color: var(--accent); text-align: center;
  letter-spacing: 2px; margin-bottom: 10px;
}
.mantra-lore p { font-size: 13px; line-height: 1.9; color: var(--ink); margin: 0 0 8px; text-indent: 2em; }
.mantra-lore blockquote {
  margin: 0 0 8px; padding: 8px 12px; text-indent: 0;
  font-size: 13px; line-height: 1.9; color: var(--ink2);
  border-left: 2px solid var(--accent); background: rgba(166, 127, 69, .06); border-radius: 0 8px 8px 0;
}
.mantra-lore p:last-child { margin-bottom: 0; }

/* ============ 我的 ============ */
.me-card { text-align: center; }
.me-top { display: flex; align-items: center; gap: 16px; text-align: left; margin-bottom: 16px; }
.me-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-name { font-size: 18px; font-weight: 700; }
.me-home-link { font-size: 11px; color: var(--gold); border: 1px solid var(--gold); border-radius: 10px; padding: 1px 8px; letter-spacing: 1px; }
.me-phone { font-size: 12px; color: var(--ink2); margin-top: 2px; }
.me-level { font-size: 12px; color: var(--gold); letter-spacing: 1px; margin-top: 4px; }
.ulink { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ulink:active { opacity: .75; }
.up-me-flag { margin-left: auto; font-size: 11px; color: var(--gold); border: 1px solid var(--gold); padding: 2px 10px; border-radius: 10px; }
.me-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px;
  padding: 14px 10px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  margin-bottom: 16px;
}
/* 网格多行：每格独立圆角底板，去掉竖分隔线 */
.me-stats .ms-item { padding: 10px 4px; background: rgba(166, 127, 69, .05); border-radius: 10px; }
.me-stats .ms-item + .ms-item::before { display: none; }
.me-stats .stat-link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.me-stats .stat-link:active { opacity: .65; }
.me-stats .stat-link span::after { content: "›"; margin-left: 2px; color: var(--gold); }

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 30;
  display: flex; background: rgba(251,247,236,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink2); padding: 4px 0; }
.tab-icon { font-size: 20px; filter: grayscale(60%); transition: filter .2s; }
.tab.active { color: var(--accent); font-weight: 600; }
.tab.active .tab-icon { filter: none; }

/* ============ 书籍详情浮层 ============ */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(40,35,25,.35);
  display: flex; justify-content: center; animation: fadein .2s;
}
.overlay-panel {
  width: min(520px, 100%); height: 100%; background: var(--paper);
  display: flex; flex-direction: column; animation: slideup .25s ease;
}
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: rgba(251,247,236,.95); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; font-weight: 600; letter-spacing: 1px;
}
.btn-back { font-size: 15px; color: var(--accent); padding: 4px 8px; }
.overlay-body { flex: 1; overflow-y: auto; padding: 14px 16px 30px; }
.bd-info { display: flex; gap: 16px; }
.bd-cover {
  position: relative;
  width: 84px; height: 116px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Kaiti SC", KaiTi, serif; font-size: 30px; color: #fff;
  writing-mode: vertical-rl; letter-spacing: 6px;
  box-shadow: 3px 4px 12px rgba(60,50,30,.28);
}
.bd-meta { flex: 1; min-width: 0; }
.bd-name { font-size: 19px; font-weight: 700; }
.bd-author { font-size: 13px; color: var(--ink2); margin: 3px 0 8px; }
.bd-desc { font-size: 13px; color: var(--ink2); }
.bd-content {
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: 17px; line-height: 2.1; color: #3d3931;
  white-space: pre-line; text-align: justify;
}

/* ============ 问答评论 ============ */
.qa-input { display: flex; gap: 8px; margin-bottom: 14px; }
.qa-input input {
  flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: #f4efe5; padding: 0 12px; font-size: 14px;
}
.btn-mini {
  padding: 0 18px; border-radius: 10px; background: var(--accent);
  color: #fff; font-size: 14px; flex-shrink: 0;
}
.qa-item { border-bottom: 1px dashed var(--line); padding: 12px 0; }
.qa-item:last-child { border-bottom: none; }
.qa-q { display: flex; gap: 10px; }
.qa-q .avatar { width: 34px; height: 34px; font-size: 14px; flex-shrink: 0; }
.qa-q-body { flex: 1; min-width: 0; }
.qa-q-text { font-size: 14px; color: var(--ink); margin: 2px 0 4px; word-break: break-all; }
.qa-q-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #a9a294; }
.qa-like { color: #a9a294; font-size: 12px; padding: 2px 6px; border-radius: 10px; }
.qa-like.liked { color: var(--accent); }
.qa-answers { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line); }
.qa-a { display: flex; gap: 8px; margin-bottom: 10px; }
.qa-a .avatar { width: 26px; height: 26px; font-size: 12px; flex-shrink: 0; }
.qa-a-body { flex: 1; min-width: 0; }
.qa-a-text { font-size: 13px; color: var(--ink2); word-break: break-all; }
.qa-a-head { font-size: 12px; color: var(--bamboo); }
.qa-a-time { font-size: 10px; color: #b3ab99; margin-left: 6px; }
.qa-answer-row { display: flex; gap: 6px; margin-top: 6px; }
.qa-answer-row input {
  flex: 1; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  background: #f7f3ea; padding: 0 10px; font-size: 12px;
}
.qa-answer-row button {
  padding: 0 12px; border-radius: 8px; background: #33473a; color: #f0e9d8; font-size: 12px;
}
.qa-empty { text-align: center; color: var(--ink2); font-size: 13px; padding: 18px 0; }

/* ============ AI 浮动框 ============ */
.ai-fab {
  position: fixed; right: 18px; bottom: 96px; z-index: 40;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #33473a, #22352a);
  color: #f0d9a8; font-size: 22px;
  box-shadow: 0 4px 18px rgba(35,55,42,.4);
  animation: fabpulse 3s ease-in-out infinite;
}
@keyframes fabpulse { 0%,100% { box-shadow: 0 4px 18px rgba(35,55,42,.4); } 50% { box-shadow: 0 4px 26px rgba(217,169,63,.45); } }
.ai-panel {
  position: fixed; right: 16px; bottom: 96px; z-index: 45;
  width: min(340px, calc(100vw - 32px)); height: min(480px, 62vh);
  background: var(--paper2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 10px 40px rgba(50,40,20,.25);
  display: flex; flex-direction: column; overflow: hidden;
  animation: slideup .25s ease;
}
.ai-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: linear-gradient(120deg, #33473a, #243629); color: #f0e9d8;
  font-size: 14px; letter-spacing: 1px;
}
.ai-head button { color: #f0e9d8; font-size: 14px; padding: 2px 6px; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.7; word-break: break-all; }
.ai-msg.bot { background: #f0ebdf; color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; }
.ai-msg.user { background: #33473a; color: #f0e9d8; border-bottom-right-radius: 4px; align-self: flex-end; }
.ai-typing { align-self: flex-start; font-size: 13px; color: var(--ink2); padding: 8px 13px; background: #f0ebdf; border-radius: 14px; }
.ai-dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } }
.ai-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #faf7f0; }
.ai-input input {
  flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; padding: 0 12px; font-size: 13px;
}
.ai-input button {
  padding: 0 16px; border-radius: 10px; background: linear-gradient(135deg,#e0b96a,var(--gold));
  color: #3a2f1d; font-size: 13px; font-weight: 600;
}

/* ============ 管理员面板 ============ */
#adminCard { border-color: #c9a86a; background: linear-gradient(170deg, #fdfbf7, #fbf5e8); }
.admin-sub {
  font-size: 12px; color: var(--gold); letter-spacing: 3px;
  margin: 14px 0 8px; padding-left: 8px; border-left: 3px solid var(--gold);
}
#adminCard .admin-sub:first-of-type { margin-top: 4px; }
.admin-list { display: flex; flex-direction: column; }
.admin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.admin-row:last-child { border-bottom: none; }
.admin-row .avatar { width: 34px; height: 34px; font-size: 14px; flex-shrink: 0; }
.admin-info { flex: 1; min-width: 0; }
.admin-name { font-size: 14px; font-weight: 600; }
.admin-name .adm-flag { font-size: 10px; color: #fff; background: var(--gold); border-radius: 8px; padding: 1px 8px; margin-left: 6px; letter-spacing: 1px; }
.admin-subinfo { font-size: 11px; color: var(--ink2); margin-top: 2px; word-break: break-all; }
.btn-del {
  flex-shrink: 0; padding: 5px 12px; border-radius: 8px; font-size: 12px;
  background: #f7e8e5; color: #a83f2e; border: 1px solid #e3c3bb;
}
.btn-del:active { background: #f0d5cf; }

/* ============ 朋友圈式问答动态 ============ */
.post-input { margin-bottom: 14px; }
.post-input textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: #f4efe5; padding: 10px 12px; font-size: 14px; font-family: inherit;
  resize: none; line-height: 1.6;
}
.post-input textarea:focus { border-color: var(--gold); background: #fff; }
.post-input-row { display: flex; gap: 8px; margin-top: 8px; }
.emoji-btn {
  width: 36px; height: 36px; border-radius: 10px; font-size: 17px; flex-shrink: 0;
  background: #f4efe5; border: 1px solid var(--line); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.emoji-btn:active { transform: scale(.92); background: rgba(201,163,92,.15); }
.emoji-panel {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  margin-top: 8px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px;
  background: #f4efe5;
}
.emoji-panel button {
  font-size: 19px; padding: 5px 0; background: none; border: none; border-radius: 8px;
  cursor: pointer; line-height: 1.2; -webkit-tap-highlight-color: transparent; transition: all .12s ease;
}
.emoji-panel button:active { background: rgba(201,163,92,.22); transform: scale(1.15); }
.post-input-row select {
  flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 10px;
  background: #f4efe5; padding: 0 8px; font-size: 13px; color: var(--ink2); font-family: inherit;
}
.post { border-bottom: 1px dashed var(--line); padding: 14px 0; }
.post:last-child { border-bottom: none; padding-bottom: 4px; }
.post-head { display: flex; gap: 10px; }
.post-head .avatar { width: 38px; height: 38px; font-size: 16px; flex-shrink: 0; }
.post-hinfo { flex: 1; min-width: 0; }
.post-author { font-size: 14px; font-weight: 700; color: var(--bamboo); }
.post-meta { font-size: 11px; color: #a9a294; margin-top: 1px; }
.post-meta .post-book { color: var(--gold); }
.post-text { font-size: 14px; color: var(--ink); margin: 8px 0 6px; line-height: 1.7; word-break: break-all; white-space: pre-wrap; }

/* ··· 按钮（朋友圈操作入口） */
.post-more {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  background: #f4efe5; color: var(--ink2); font-weight: 700;
  font-size: 15px; letter-spacing: 1px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding-bottom: 3px;
}
.post-more:active { background: #eae3d3; }

/* 赞/评论 操作条（微信读书绿条） */
.post-actionbar {
  display: flex; align-items: stretch; margin: 8px 0 0 auto;
  width: max-content; border-radius: 8px; overflow: hidden;
  background: #4c5f50; animation: fadein .15s ease;
}
.pab { color: #f2efe3; font-size: 13px; padding: 7px 18px; letter-spacing: 1px; }
.pab.liked { color: #ffe3a0; font-weight: 600; }
.pab:active { background: rgba(255,255,255,.12); }
.pab-sep { width: 1px; background: rgba(255,255,255,.28); margin: 7px 0; }

/* 朋友圈式灰框：点赞行 + 扁平评论 */
.post-cms {
  margin-top: 10px; margin-left: 42px;
  background: #f4f1e8; border-radius: 8px; padding: 8px 12px;
}
.like-row { font-size: 13px; color: var(--ink); padding: 3px 0; display: flex; align-items: center; flex-wrap: wrap; }
.like-row b { color: var(--accent); font-family: Georgia, serif; }
.like-avatars { display: inline-flex; align-items: center; margin-left: 8px; }
.like-avatars .avatar.xs {
  width: 22px; height: 22px; font-size: 11px; flex-shrink: 0;
  border: 1.5px solid #f4f1e8; cursor: pointer; -webkit-tap-highlight-color: transparent;
  margin-left: -5px; transition: transform .15s ease;
}
.like-avatars .avatar.xs:first-child { margin-left: 0; }
.like-avatars .avatar.xs:hover { transform: scale(1.18); z-index: 2; }
.like-more { font-size: 12px; color: var(--ink2); margin-left: 5px; }
.cms-div { height: 1px; background: #e6e0cf; margin: 6px -12px; }
.cm {
  font-size: 13.5px; color: var(--ink); line-height: 1.65;
  padding: 4px 6px; margin: 0 -6px; border-radius: 6px;
  word-break: break-all; cursor: pointer;
}
.cm:active { background: rgba(90,80,50,.08); }
.cm-name { color: var(--bamboo); font-weight: 600; }
.cm-rto { color: inherit; }
.cm-input { display: flex; gap: 8px; margin: 8px 0 0 42px; }
.cm-input input {
  flex: 1; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; padding: 0 10px; font-size: 13px;
}
.cm-input button {
  flex-shrink: 0; padding: 0 14px; border-radius: 9px; background: #33473a;
  color: #f0e9d8; font-size: 13px;
}

/* ============ 跟练视频浮窗（可拖拽/缩放/最小化） ============ */
.vfloat { position: fixed; z-index: 320; right: 16px; bottom: 92px; width: 340px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 34px rgba(0,0,0,.28); display: flex; flex-direction: column; }
.vfloat.hidden { display: none; }
.vfloat-head { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 11px;
  background: linear-gradient(135deg, #f4f1e8, #ece7d9); cursor: move; user-select: none; touch-action: none; }
.vfloat-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vfloat-ops { display: flex; gap: 2px; }
.vfloat-ops button { border: none; background: none; cursor: pointer; font-size: 13px;
  color: var(--ink2); padding: 3px 8px; border-radius: 6px; line-height: 1; }
.vfloat-ops button:hover { background: rgba(0,0,0,.07); color: var(--ink); }
.vfloat-body { width: 100%; aspect-ratio: 16 / 9; background: #000; min-height: 0; }
.vfloat-body iframe, .vfloat-body video { width: 100%; height: 100%; display: block; border: 0; }
.vfloat.min .vfloat-body, .vfloat.min .vfloat-rs { display: none; }
.vfloat-rs { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize;
  touch-action: none;
  background: linear-gradient(135deg, transparent 46%, rgba(0,0,0,.18) 50%, transparent 54%, rgba(0,0,0,.18) 62%, transparent 66%); }

/* ============ 今日宜忌（黄历 + 五行穿衣） ============ */
.alm-body { background: var(--bg); }
.alm-date-card { text-align: center; }
.alm-date-row { display: flex; align-items: center; justify-content: space-between; }
.alm-date-main { text-align: left; }
.alm-date { font-family: "Kaiti SC", KaiTi, STKaiti, serif; font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: 2px; }
.alm-week { font-size: 13px; color: var(--ink2); margin-top: 3px; }
.alm-animal { font-size: 15px; color: var(--gold); letter-spacing: 2px; font-family: "Kaiti SC", KaiTi, STKaiti, serif; }
.alm-gz-row { display: flex; gap: 10px; margin: 14px 0 12px; }
.alm-gz { flex: 1; background: #f4f1e8; border-radius: 9px; padding: 9px 4px; }
.alm-gz span { display: block; font-size: 11px; color: var(--ink2); margin-bottom: 3px; }
.alm-gz b { font-size: 17px; color: var(--ink); letter-spacing: 3px; font-family: "Kaiti SC", KaiTi, STKaiti, serif; }
.alm-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.alm-tag { font-size: 12px; padding: 4px 11px; border-radius: 999px; background: #f4f1e8; color: var(--ink2); }
.alm-tag.luck-ji { background: rgba(90,140,80,.14); color: #4a7d43; }
.alm-tag.luck-xiong { background: rgba(180,70,60,.12); color: #a8433a; }
.alm-tag.luck-ping { background: rgba(176,141,79,.14); color: #8a6b34; }

.alm-yiji { display: flex; gap: 10px; }
.alm-yi, .alm-ji { flex: 1; min-width: 0; }
.alm-yiji-head { font-family: "Kaiti SC", KaiTi, STKaiti, serif; font-size: 20px; font-weight: 700;
  text-align: center; border-radius: 8px; padding: 5px 0; margin-bottom: 9px; letter-spacing: 2px; }
.alm-yiji-head.yi { background: rgba(90,140,80,.14); color: #4a7d43; }
.alm-yiji-head.ji { background: rgba(180,70,60,.1); color: #a8433a; }
.alm-yiji-items { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.yiji-item { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: #f4f1e8; color: var(--ink); }
.yiji-item.ji { color: #a8433a; }

.alm-wx-list { display: flex; flex-direction: column; gap: 10px; }
.alm-wx-row { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.alm-wx-row.lv-best { background: rgba(90,140,80,.08); border-color: rgba(90,140,80,.3); }
.alm-wx-row.lv-good { background: rgba(176,141,79,.07); border-color: rgba(176,141,79,.3); }
.alm-wx-row.lv-plain { background: rgba(120,120,120,.05); }
.alm-wx-row.lv-bad { background: rgba(180,70,60,.05); border-color: rgba(180,70,60,.2); }
.aw-title { font-size: 13.5px; font-weight: 700; margin-bottom: 7px; color: var(--ink); }
.alm-wx-row.lv-bad .aw-title { color: #a8433a; }
.aw-main { display: flex; gap: 10px; align-items: center; }
.aw-colors { display: flex; gap: 5px; flex-shrink: 0; }
.aw-colors i { width: 20px; height: 20px; border-radius: 50%; display: block; border: 1px solid rgba(0,0,0,.08); }
.aw-info { flex: 1; min-width: 0; }
.aw-info b { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 2px; }
.aw-info span { font-size: 12px; color: var(--ink2); line-height: 1.5; }
.alm-wx-note { font-size: 11.5px; color: var(--ink2); margin-top: 11px; line-height: 1.7;
  padding: 8px 11px; background: rgba(176,141,79,.07); border-radius: 8px; }
.alm-wx-note b { color: var(--gold); }

/* ============ 沉浸式阅读器（微信读书风格） ============ */
.reader {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column;
  background: var(--r-bg); color: var(--r-fg);
  transition: background .25s, color .25s;
  --r-bg: #f6f2ea; --r-fg: #2c2a26; --r-bar: rgba(246,242,234,.95); --r-dim: #8d8574; --r-line: #e5ded1;
}
.reader[data-theme="sepia"] { --r-bg: #f0e6cf; --r-fg: #4a4231; --r-bar: rgba(240,230,207,.95); --r-dim: #94896c; --r-line: #ddd0b2; }
.reader[data-theme="green"] { --r-bg: #cfe5cd; --r-fg: #2f4230; --r-bar: rgba(207,229,205,.95); --r-dim: #6d846c; --r-line: #b7d2b4; }
.reader[data-theme="night"] { --r-bg: #1e1d1b; --r-fg: #b8b2a4; --r-bar: rgba(30,29,27,.95); --r-dim: #726d61; --r-line: #3a3833; }

.reader-top, .reader-bottom {
  display: flex; align-items: center; gap: 12px;
  background: var(--r-bar); backdrop-filter: blur(8px);
  transition: transform .25s, opacity .25s;
}
.reader-top { padding: 10px 16px; border-bottom: 1px solid var(--r-line); }
.reader-bottom { padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--r-line); flex-direction: column; gap: 6px; }
.reader.chrome-hidden .reader-top { transform: translateY(-100%); opacity: 0; }
.reader.chrome-hidden .reader-bottom { transform: translateY(100%); opacity: 0; }
.reader.chrome-hidden .reader-music { transform: translateY(-100%); opacity: 0; }

/* 背景音乐条：播放/暂停 + 可拖动进度（随阅读主题取色） */
.reader-music {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 9px; background: var(--r-bar); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--r-line);
  transition: transform .25s, opacity .25s;
}
#rmPlay {
  flex: none; width: 30px; height: 30px; border-radius: 50%; font-size: 12px;
  color: var(--r-fg); border: 1px solid var(--r-line); background: rgba(128,128,120,.06);
  display: flex; align-items: center; justify-content: center;
}
#rmPlay:active { transform: scale(.94); }
.rm-time { flex: none; min-width: 40px; font-size: 11px; color: var(--r-dim); font-variant-numeric: tabular-nums; }
.rm-time:last-child { text-align: right; }
.rm-seek { -webkit-appearance: none; appearance: none; flex: 1; height: 22px; background: transparent; margin: 0; }
.rm-seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--gold, #b8935a) var(--p, 0%), var(--r-line) var(--p, 0%));
}
.rm-seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--gold, #b8935a); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.rm-seek::-moz-range-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--gold, #b8935a) var(--p, 0%), var(--r-line) var(--p, 0%));
}
.rm-seek::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--gold, #b8935a); border: 2px solid #fff;
}
.rm-seek:disabled { opacity: .5; }
.reader-title { flex: 1; text-align: center; font-size: 15px; letter-spacing: 1px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#readerBack, #readerAa, #readerTocBtn, #readerMusic {
  font-size: 16px; color: var(--r-fg); width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
#readerBack:active, #readerAa:active { background: rgba(128,128,120,.12); }
#readerMusic.on { color: var(--bamboo, #4a7c3f); background: rgba(74,124,63,.14); }
#readerMusic:active { background: rgba(128,128,120,.12); }

.reader-stage { position: relative; flex: 1; overflow: hidden; }
.reader-cols {
  height: 100%; padding: 28px 26px;
  column-gap: 52px; column-fill: auto;
  transition: transform .28s ease;
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  line-height: 2.05; letter-spacing: 1px;
}
.reader-cols p { margin: 0 0 1.1em; text-align: justify; }
/* 空行占位：后台录入的空行原样显示（保持排版一致） */
.reader-cols .rc-blank { margin: 0; height: 1.05em; }
.reader-cols .rc-title {
  text-align: center; color: var(--r-dim); font-size: .9em; letter-spacing: 6px; text-indent: 6px;
  margin: 1.6em 0 1em; font-family: inherit;
}
.reader-cols .rc-end { text-align: center; color: var(--r-dim); font-size: .85em; letter-spacing: 4px; margin-top: 2em; }
.reader-cols .rc-end-qa {
  display: block; margin: 1.2em auto 0; padding: 9px 26px; border-radius: 20px;
  border: 1px solid var(--r-dim); color: var(--r-fg); font-family: inherit; font-size: .82em; letter-spacing: 2px;
  animation: qaPulse 2.2s ease-in-out infinite; cursor: pointer;
}
@keyframes qaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 163, 92, .35); }
  50% { box-shadow: 0 0 0 9px rgba(201, 163, 92, 0); }
}

.tap-zone { position: absolute; top: 0; bottom: 0; z-index: 5; }
.tz-left { left: 0; width: 28%; }
.tz-mid { left: 28%; right: 28%; }
.tz-right { right: 0; width: 28%; }

.reader-progress { width: 100%; height: 3px; background: var(--r-line); border-radius: 3px; overflow: hidden; }
.rp-fill { height: 100%; width: 0; background: var(--gold, #b8935a); transition: width .25s; border-radius: 3px; }
.reader-bottom-row { width: 100%; display: flex; align-items: center; justify-content: space-between; }
#readerPageNo { font-size: 12px; color: var(--r-dim); letter-spacing: 1px; }
#readerQA {
  font-size: 13px; color: var(--r-fg); padding: 6px 16px; border-radius: 18px;
  border: 1px solid var(--r-line); background: rgba(128,128,120,.06); letter-spacing: 1px;
}
#readerQA:active { transform: scale(.95); }

.reader-settings {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  background: var(--r-bar); backdrop-filter: blur(10px);
  border-top: 1px solid var(--r-line);
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(30,25,10,.14);
  animation: slideup .22s ease;
}
.rs-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rs-row:last-child { margin-bottom: 0; }
.rs-label { font-size: 13px; color: var(--r-dim); letter-spacing: 2px; flex-shrink: 0; }
.rs-row button { color: var(--r-fg); font-size: 15px; }
#rsFontMinus, #rsFontPlus {
  width: 44px; height: 36px; border-radius: 10px; border: 1px solid var(--r-line); background: rgba(128,128,120,.06);
}
#rsFontSize { min-width: 34px; text-align: center; font-size: 15px; font-family: Georgia, serif; }
.rs-theme {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--r-line); padding: 0;
}
.rs-theme[data-theme="paper"] { background: #f6f2ea; }
.rs-theme[data-theme="sepia"] { background: #f0e6cf; }
.rs-theme[data-theme="green"] { background: #cfe5cd; }
.rs-theme[data-theme="night"] { background: #1e1d1b; }
.rs-theme.active { border-color: var(--gold, #b8935a); box-shadow: 0 0 0 2px rgba(184,147,90,.35); }

/* 阅读方式切换（全文连读 / 逐章阅读） */
.rs-mode {
  flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--r-line);
  background: rgba(128,128,120,.06); color: var(--r-fg); font-size: 14px; letter-spacing: 2px;
  font-family: inherit; transition: all .15s;
}
.rs-mode.active {
  background: #33473a; color: #f0e9d8; border-color: #33473a;
}
[data-theme="night"] .rs-mode.active { background: #8a6d3b; border-color: #8a6d3b; }

/* 章末「下一章」按钮（与 rc-end-qa 一致的风格） */
.reader-cols .rc-next-ch {
  display: block; margin: 1.2em auto 0; padding: 9px 26px; border-radius: 20px;
  border: 1px solid var(--r-dim); color: var(--r-fg); font-family: inherit; font-size: .82em; letter-spacing: 2px;
  background: transparent;
}

/* 章节目录浮层 */
.reader-toc {
  position: absolute; inset: 0; z-index: 12;
  background: var(--r-bg, #f6f2ea); display: flex; flex-direction: column;
  animation: slideup .22s ease;
}
.rt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; border-bottom: 1px solid var(--r-line);
}
.rt-title { font-size: 15px; letter-spacing: 3px; color: var(--r-fg); }
.rt-close { font-size: 16px; color: var(--r-dim); padding: 4px 8px; }
.rt-list { flex: 1; overflow-y: auto; padding: 8px 12px 20px; }
.rt-item {
  display: block; width: 100%; text-align: left; padding: 12px 14px; margin: 4px 0;
  border-radius: 10px; border: 1px solid transparent;
  color: var(--r-fg); font-size: 14px; letter-spacing: 1px; font-family: inherit;
  background: transparent; transition: background .15s;
}
.rt-item:active { background: rgba(128,128,120,.08); }
.rt-item.cur {
  background: rgba(51,71,58,.08); border-color: var(--gold, #b8935a); color: var(--gold, #8a6526);
  font-weight: 600;
}

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 160px; transform: translateX(-50%);
  z-index: 99; background: rgba(44,42,38,.92); color: #f4efe3;
  padding: 10px 22px; border-radius: 22px; font-size: 14px; letter-spacing: 1px;
  animation: toastin .25s ease; max-width: 80vw; text-align: center;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 注册表单常驻错误提示（邀请码已被使用等） */
.reg-err {
  font-size: 12px; color: #a83f2e; line-height: 1.6; letter-spacing: .5px;
  background: #fbecea; border: 1px solid #f0d6d2; border-radius: 8px;
  padding: 8px 12px; margin: 2px 0 10px;
}
.reg-err.hidden { display: none; }

/* 滚动条 */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #d8cfba; border-radius: 4px; }

/* ============ 下拉刷新提示 ============ */
#pullTip {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 999; pointer-events: none;
  padding: 7px 18px; border-radius: 999px;
  background: var(--paper2); color: var(--ink2);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 12px; letter-spacing: 1px;
  opacity: 0; transition: opacity .25s;
}

/* ============ 关注按钮（用户主页） ============ */
.up-follow-btn {
  margin-left: auto; align-self: center; flex: none;
  padding: 7px 16px; border-radius: 999px;
  font-size: 13px; letter-spacing: 1px;
  border: 1px solid var(--accent); color: var(--accent);
  background: transparent; transition: all .2s;
}
.up-follow-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.up-me-flag { margin-left: auto; }

/* ============ 回向功德申请（持念页） ============ */
.hx-card { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--gold); border-radius: 12px; background: rgba(197,165,86,.06); }
.hx-head { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.hx-ico { font-size: 17px; }
.hx-sub { margin-left: auto; font-size: 11px; color: var(--ink2); letter-spacing: .5px; }
.hx-progress { font-size: 12px; color: var(--ink2); margin: 7px 0 6px; }
.hx-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.hx-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--bamboo)); transition: width .4s; }
.hx-apply { display: block; width: 100%; margin-top: 10px; padding: 9px 0; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #b08d3e); color: #fff; font-size: 14px; letter-spacing: 3px; cursor: pointer; }
.hx-apply:active { transform: scale(.98); }
.hx-mine-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 8px; flex-wrap: wrap; }
.hx-st { padding: 1px 8px; border-radius: 999px; font-size: 11px; }
.hx-st.wait { background: rgba(197,165,86,.15); color: var(--gold); }
.hx-st.ok { background: rgba(61,90,60,.12); color: var(--bamboo); }
.hx-st.no { background: rgba(180,80,80,.1); color: #b45050; }
.hx-mine-time { color: var(--ink2); }
.hx-mine-wish { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.hx-modal-info { font-size: 13px; line-height: 1.7; color: var(--ink2); padding: 4px 2px 10px; border-bottom: 1px dashed var(--line); margin-bottom: 12px; }
.hx-modal-info b { color: var(--gold); }

/* ============ 消息中心 ============ */
/* 后台管理入口（仅管理员可见）：复用消息入口样式 */
.admin-entry { display: flex; align-items: center; gap: 13px; padding: 4px 2px; text-decoration: none; color: var(--ink); cursor: pointer; }

.msg-entry { display: flex; align-items: center; gap: 13px; padding: 4px 2px; cursor: pointer; }
.msg-entry-icon { width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.msg-entry-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-entry-body b { font-size: 15px; }
.msg-entry-body span { font-size: 12px; color: var(--ink2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-arr { color: var(--ink2); font-size: 20px; opacity: .6; }
.msg-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; flex: none;
  background: var(--accent); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; }

.tab { position: relative; }
.tab-badge { position: absolute; top: 0; right: calc(50% - 26px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }

.msg-list { display: flex; flex-direction: column; }
.msg-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line);
  align-items: flex-start; cursor: pointer; }
.msg-item .avatar { flex: none; }
.msg-item.unread { background: rgba(168,63,46,.05); }
.msg-main { flex: 1; min-width: 0; }
.msg-line { font-size: 14px; line-height: 1.5; }
.msg-quote { margin-top: 6px; padding: 7px 10px; background: var(--paper2);
  border-left: 3px solid var(--gold); border-radius: 6px; font-size: 13px; color: var(--ink2); }
.msg-ref { margin-top: 5px; font-size: 12px; color: var(--ink2); opacity: .8; }
.msg-time { margin-top: 4px; font-size: 11px; color: var(--ink2); opacity: .7; }
.msg-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 7px; }

/* 消息跳转后动态高亮闪烁 */
@keyframes postflash { 0%,100% { box-shadow: 0 0 0 0 rgba(168,63,46,0); } 40% { box-shadow: 0 0 0 4px rgba(168,63,46,.45); } }
.post.flash { animation: postflash 1.8s ease; border-radius: 12px; }
