/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --paper: #f6f2ea;
  --paper2: #fdfbf7;
  --ink: #2c2a26;
  --ink2: #6b665c;
  --accent: #a83f2e;
  --accent-soft: #f3e3dc;
  --bamboo: #5a7a58;
  --gold: #b8935a;
  --line: #e5ded1;
  --shadow: 0 2px 12px rgba(60,50,30,.08);
  --radius: 14px;
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-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 {
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: 46px; letter-spacing: 10px; color: var(--ink);
  margin-bottom: 4px; text-indent: 10px;
}
.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(246,242,234,.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-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; }
.gongfa-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.gongfa { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gongfa summary {
  padding: 11px 12px; font-size: 13px; color: var(--ink); cursor: pointer;
  list-style: none; letter-spacing: 1px; user-select: none;
}
.gongfa summary::-webkit-details-marker { display: none; }
.gongfa summary::after { content: "＋"; float: right; color: var(--gold); }
.gongfa[open] summary::after { content: "－"; }
.gongfa[open] summary { color: var(--gold); border-bottom: 1px dashed var(--line); }
.gongfa p { margin: 0; padding: 10px 12px 12px; font-size: 13px; line-height: 1.9; color: var(--ink2); }
.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 .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 {
  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-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-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; }
.mantra-select-label { font-size: 12px; color: var(--ink2); letter-spacing: 3px; margin-bottom: 10px; }
.mantra-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.mantra-tab {
  padding: 6px 14px; border-radius: 16px; font-size: 12px;
  background: #f4efe5; border: 1px solid var(--line); color: var(--ink2);
}
.mantra-tab.active { background: #33473a; color: #f0e9d8; border-color: #33473a; }
.mantra-display { margin-bottom: 18px; }
.mantra-text {
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-size: 26px; letter-spacing: 8px; color: var(--accent); text-indent: 8px;
}
.mantra-name { font-size: 12px; color: var(--ink2); margin-top: 4px; letter-spacing: 2px; }
.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: space-around; margin-bottom: 6px; }
.ms-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ms-item b { font-size: 20px; font-family: Georgia, serif; color: var(--ink); }
.ms-item span { font-size: 11px; color: var(--ink2); }
.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; }

/* ============ 我的 ============ */
.me-card { text-align: center; }
.me-top { display: flex; align-items: center; gap: 16px; text-align: left; margin-bottom: 16px; }
.me-name { font-size: 18px; font-weight: 700; }
.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: flex; justify-content: space-around; padding: 14px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin-bottom: 16px; }

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 30;
  display: flex; background: rgba(253,251,247,.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(253,251,247,.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 {
  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; }

/* ··· 按钮（朋友圈操作入口） */
.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-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 {
  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); }

.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-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); }

/* ============ 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); } }

/* 滚动条 */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #d8cfba; border-radius: 4px; }
