/* ============================================================
 * 娲书网站 · 全局样式（对齐小程序 app.wxss，rpx→px ÷2，HTML 化）
 * 紫色主题，移动端优先；桌面端用 .app 容器限宽居中。
 * ============================================================ */

:root {
  --purple: #9575CD;
  --purple-deep: #7E57C2;
  --purple-light: #EDE7F6;
  --purple-soft: #F3EEFB;
  --pink: #F48FB1;
  --pink-soft: #FCE4EC;
  --ink: #3A2E4D;
  --ink-soft: #6E6382;
  --bg: #FAF7FE;
  --card: #FFFFFF;
  --line: #ECE6F5;
  --good: #66BB6A;
  --warn: #FF8A65;
  --shadow: 0 4px 16px rgba(126, 87, 194, 0.10);
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 关闭滚动锚定：详情页异步填充内容时，浏览器不会为「保持锚点可见」而偷偷把页面往下推 */
html, body, .app, .page { overflow-anchor: none; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* 移动端优先：桌面用限宽容器，模拟手机屏 */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(126, 87, 194, 0.06);
  padding-bottom: 62px; /* 给底部导航栏留位 */
}

a { color: inherit; text-decoration: none; }

/* ---------- 通用页头 ---------- */
.page-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: rgba(250, 247, 254, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.page-head .back { font-size: 22px; color: var(--purple-deep); width: 28px; text-align: center; cursor: pointer; flex-shrink: 0; }
.page-head .title { font-size: 17px; font-weight: 700; flex: 1; }
.page-head .right { font-size: 13px; color: var(--purple-deep); }
/* 详情页右上角：三点菜单（举报本书） */
.page-head .head-dots { font-size: 22px; line-height: 1; color: var(--purple-deep); cursor: pointer; flex-shrink: 0; padding: 0 2px 0 10px; user-select: none; }
.page-head .head-dots:active { opacity: .6; }
/* 三点菜单（举报 / 拉黑）：挂在页头右下角 */
.more-menu {
  position: absolute; right: 10px; top: 44px; z-index: 60;
  min-width: 148px; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(60, 40, 90, .16); border: 1px solid var(--line);
}
.mm-item { padding: 12px 16px; font-size: 14px; color: var(--ink); cursor: pointer; }
.mm-item + .mm-item { border-top: 1px solid var(--line); }
.mm-item:active { background: var(--purple-soft); }

/* ---------- 搜索栏 ---------- */
.search-bar {
  display: flex; align-items: center; gap: 8px; margin: 12px 14px;
  background: #fff; border-radius: 22px; padding: 9px 14px; box-shadow: var(--shadow);
}
.search-bar input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--ink); }
.search-bar .s-go { font-size: 16px; padding: 2px 4px; color: var(--purple-deep); cursor: pointer; flex-shrink: 0; }
.search-bar .s-clear { font-size: 15px; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: var(--purple-light); color: var(--purple-deep); cursor: pointer; flex-shrink: 0; }

/* ---------- 区块标题 ---------- */
.section-title { font-size: 15px; font-weight: 700; margin: 16px 14px 8px; display: flex; align-items: center; gap: 6px; }
.section-title .more { margin-left: auto; font-size: 12px; color: var(--ink-soft); font-weight: 400; }
/* 随机推荐「换一批」：低调的小胶囊，不抢书的视觉重心 */
.rec-refresh {
  margin-left: auto; flex: 0 0 auto; font-family: inherit;
  font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer;
  color: var(--purple-deep); background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(126, 87, 194, .08);
  transition: background .18s ease, transform .18s ease;
}
.rec-refresh:hover { background: var(--purple-light); }
.rec-refresh:active { transform: scale(.96); }
.rec-refresh.spin { animation: recSpin .45s ease; }
@keyframes recSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ---------- 书籍卡片（横向列表） ---------- */
.book-row { display: flex; gap: 14px; padding: 14px; background: var(--card); border-bottom: 1px solid var(--line); cursor: pointer; }
.book-cover {
  width: 78px; height: 108px; border-radius: 9px; flex-shrink: 0;
  box-shadow: var(--shadow); display: flex; align-items: flex-end; justify-content: flex-start;
  color: #fff; text-align: left; padding: 9px 7px; overflow: hidden;
  background-color: #EDE7F6; /* 封面图未到时先铺淡紫底，避免长时间白块 */
}
/* 与审核端 / 投稿端一致：渐变封面左下角放完整书名，长标题自动换行 */
.book-cover-title { display: block; width: 100%; color: #fff; font-weight: 700; line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); word-break: break-all; overflow-wrap: anywhere; }
.mini-cover .book-cover-title { font-size: 10px; line-height: 1.2; }
.book-cover-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 78px; }
.book-meta { flex: 1; min-width: 0; }
.book-meta .bt { font-size: 15px; font-weight: 700; }
/* 允许在「长笔名 + 女男比 + 三项评分」同时出现时换行兜底：
   女男比与评分都不截断，宁可多占一行也不撑破书籍片。线上评分人数未达 RATE_MIN 时不会触发。 */
.book-meta .ba-row { display: flex; align-items: center; gap: 2px 6px; flex-wrap: wrap; margin: 3px 0 4px; }
.book-meta .ba-author { font-size: 13px; font-weight: 600; color: var(--purple-deep); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 作者行右侧三项评分：小字胶囊（两端全圆，与站内其他圆角框一致） */
.book-meta .rate-tags {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: stretch;
  border-radius: 99px;
  background: var(--purple-light);
  overflow: hidden;
}
.book-meta .rate-tag {
  display: inline-flex; align-items: center; gap: 1px;
  font-size: 9px; line-height: 1; font-weight: 700;
  padding: 3px 5px; color: var(--purple-deep);
  white-space: nowrap; letter-spacing: 0.2px;
}
.book-meta .rate-tag i { font-style: normal; font-weight: 500; opacity: 0.7; }
.book-meta .rate-tag:first-child { padding-left: 7px; }
.book-meta .rate-tag:last-child { padding-right: 7px; }
.book-meta .rate-tag + .rate-tag { border-left: 1px solid rgba(124, 90, 180, 0.18); }
.book-meta .ba-cats { font-size: 11px; color: var(--ink-soft); line-height: 1.4; margin-bottom: 5px; }
/* 短简介：比分类/标签稍大一点，阅读更舒展 */
.book-meta .bintro { font-size: 13px; color: var(--ink-soft); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 女男比：淡紫色文本框。作者填了就显示，与作品是否完结无关。
   数值必须完整显示，不做省略号截断（r27：旧版 max-width:108px + ellipsis 会截掉「女：男=1：1」）。 */
.nvnan-box {
  display: inline-block; box-sizing: border-box;
  padding: 1px 6px; border: 1px solid #E3D5F5; border-radius: 6px;
  background: #F3EDFB; color: var(--purple-deep);
  font-size: 11px; font-weight: 400; line-height: 1.45;
  white-space: nowrap; vertical-align: middle;
}
/* 书籍片：女男比在作者行右侧留白，与评分胶囊同处右端。
   女男比不收缩、不截断，窄屏时优先压缩作者名，保证数值完整可见。 */
.book-meta .ba-row .nvnan-inline {
  margin-left: auto; flex: 0 0 auto; min-width: 0;
}
.book-meta .ba-row .nvnan-inline + .rate-tags { margin-left: 6px; }
.tag-line { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
/* 书籍片里的标签：全部保留、最多两行；由 common.js 的 fitTags() 逐级缩小字号/间距实现，
   不再用 max-height + overflow:hidden 裁掉标签（r9 用户明确纠正）。详情页 #bTags 不受限。 */
.book-row .tag-line { max-height: none; overflow: visible; align-content: flex-start; }
.tag { font-size: 11px; color: var(--purple-deep); background: var(--purple-light); box-sizing: border-box; height: 22px; line-height: 22px; padding: 0 9px; border-radius: 9px; white-space: nowrap; }
/* 作者作品栏：题材行 + 顶部总数 + 频道分组 */
.book-meta .ba-theme { font-size: 11px; color: var(--purple-deep); margin-bottom: 5px; }
.author-count { padding: 10px 14px 4px; font-size: 12px; color: var(--purple-deep); font-weight: 600; }
.author-channel { margin: 4px 0 10px; }
.author-channel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; background: var(--purple-light); color: var(--purple-deep);
  font-size: 13px; font-weight: 600; position: sticky; top: 0; z-index: 2;
}
.author-channel-n { font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.author-channel .book-row:first-of-type { border-top: none; }

/* 书籍片：封面下方小字 */
.book-status-badge {
  display: inline-block; margin-top: 6px; padding: 1px 7px; border-radius: 4px;
  background: var(--purple-deep); color: #fff; font-size: 10px; line-height: 1.5; letter-spacing: 0.5px;
}
/* 字数 · 章节数固定同一行：不折行、略收字距，封面列已加宽到 78px 承接长文案 */
.book-submeta { margin-top: 6px; font-size: 9.5px; color: #9a8db2; text-align: center; line-height: 1.4; white-space: nowrap; letter-spacing: -0.2px; }
.cover-rate { margin-top: 4px; font-size: 10px; font-weight: 600; color: var(--purple-deep); text-align: center; line-height: 1.3; }

/* ---------- 分类筛选 ---------- */
.cat-panel { background: var(--card); margin: 0 14px 10px; border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.cat-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cat-panel-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.block-btn { font-size: 11px; color: var(--ink-soft); background: var(--purple-soft); border-radius: 12px; padding: 2px 10px; font-weight: 600; cursor: pointer; }
.cat-level { margin-bottom: 10px; }
.cat-level:last-child { margin-bottom: 0; }
.cat-level .lv-label { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 12px; padding: 5px 12px; border-radius: 14px; background: var(--purple-soft); color: var(--ink); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chip.on { background: var(--purple); color: #fff; }
.chip.tag-chip { background: #fff; border: 1px solid var(--line); }
.chip.tag-chip.on { border-color: var(--purple); background: var(--purple-light); color: var(--purple-deep); }
.chip.more-chip { background: var(--purple-deep); color: #fff; border-color: transparent; }
.block-hint { font-size: 10px; color: rgba(120, 110, 140, .45); font-weight: 400; margin-left: 4px; }

/* ---------- 按钮 ---------- */
.filter-actions { padding: 0 14px 14px; }
.btn {
  border: none; border-radius: 20px; padding: 9px 16px; font-size: 14px; font-weight: 600;
  background: var(--purple-light); color: var(--purple-deep); display: inline-flex; align-items: center; justify-content: center;
  text-align: center; line-height: 1; cursor: pointer; user-select: none;
}
.btn.primary { background: var(--purple); color: #fff; }
.btn.pink { background: var(--pink); color: #fff; }
.btn.ghost { background: #fff; border: 1px solid var(--purple); color: var(--purple-deep); }
.btn.warn { background: var(--warn); color: #fff; }
.btn:active { transform: scale(0.97); }
.btn.block { display: flex; width: 100%; }
.btn.disabled { opacity: .6; pointer-events: none; }
.btn.sm { font-size: 12px; padding: 6px 13px; border-radius: 16px; }

/* ---------- 通用卡片 ---------- */
.card { background: #fff; margin: 10px 14px; border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.req { color: var(--warn); font-weight: 700; margin-left: 2px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; background: #fff; color: var(--ink); font-family: inherit; outline: none;
}
.field textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
.char-count { text-align: right; font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
.tip-box { background: var(--purple-soft); border-left: 3px solid var(--purple); padding: 10px 12px; border-radius: 8px; font-size: 12px; color: var(--purple-deep); line-height: 1.6; }

/* ---------- 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 16px 16px 0 0; padding: 18px 18px 22px; box-shadow: 0 -6px 24px rgba(0,0,0,.18); max-height: 70vh; overflow-y: auto; }
.sheet h4 { margin: 0 0 12px; font-size: 15px; }
.modal-btns2 { display: flex; gap: 10px; margin-top: 14px; }
.modal-btns2 .btn { flex: 1; }
/* 意见箱弹窗（阅读端「我的—意见箱」） */
#sugMask .full { display: block; margin: 10px 0; }
#sugMask .full > span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
#sugMask .full textarea, #sugMask .full input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; background: #fff; color: var(--ink); outline: none; font-family: inherit;
}
#sugMask .full textarea { resize: vertical; line-height: 1.6; }
#sugMask .full textarea:focus, #sugMask .full input:focus { border-color: var(--purple); }

/* ---------- 详情页 ---------- */
.detail-hero { display: flex; gap: 14px; padding: 16px 14px; background: linear-gradient(160deg, var(--purple-soft), #fff); }
.detail-hero .book-cover { width: 96px; height: 132px; padding: 10px 8px; }
.detail-info { flex: 1; min-width: 0; }
.detail-info .dt { font-size: 19px; font-weight: 800; }
.detail-info .da { font-size: 13px; color: var(--ink-soft); margin: 4px 0; }
/* 详情页作者笔名：同色描边文本框（无底色），点击跳作者作品页 */
.detail-info .link-author { display: inline-block; border: 1px solid var(--purple-deep); border-radius: 6px; padding: 1px 8px; color: var(--purple-deep); text-decoration: none; cursor: pointer; }
/* 「简介 & 标签」栏标题旁的括号书名：更小更淡，只作补充信息，不抢标题视觉 */
.section-title .b-title-hint {
  font-size: 11px; font-weight: 400;
  color: #9A90AB; word-break: break-all;
  flex: 0 1 auto; min-width: 0;
}
/* 详情页作者笔名下方：沿用统一的淡紫文本框（视觉由 .nvnan-box 提供） */
.detail-info .dnv { display: inline-block; margin-top: 4px; }
.detail-info .book-no { text-align: right; font-size: 11px; color: var(--ink-soft); margin-top: 10px; }
.copy-mini { color: var(--ink-soft); font-size: 11px; padding: 1px 6px; border-radius: 8px; margin-left: 6px; cursor: pointer; }

.action-row { display: flex; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.action-row .btn { flex: 1; min-width: 0; }

.latest-ch.sm { margin: 10px 14px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); cursor: pointer; }
.latest-ch.sm .lc-head { font-size: 12px; color: var(--ink-soft); }
.latest-ch.sm .lc-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 4px; }
/* 「点击前往阅读最新章」是独立按钮：点它直接读最新章，不弹章节目录 */
.latest-ch.sm .lc-go { display: inline-block; font-size: 12px; font-weight: 600; color: var(--purple-deep);
  margin-top: 6px; padding: 4px 10px; border-radius: 8px; background: var(--purple-light); }
.latest-ch.sm .lc-go:active { background: #ded0f2; }
.latest-ch.sm .lc-tip { font-size: 11px; color: var(--ink-soft); margin-top: 6px; }

/* 章节目录弹层：点章节条框内空白处弹出，不占详情页正文流 */
.ch-mask { position: fixed; inset: 0; z-index: 9000; background: rgba(31, 22, 48, .45);
  display: none; align-items: flex-end; justify-content: center; }
.ch-mask.open { display: flex; }
.ch-catalog { width: 100%; max-width: 480px; max-height: 78vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 18px 18px 0 0; overflow: hidden; box-shadow: 0 -8px 30px rgba(60,40,100,.22);
  animation: chSlideUp .22s ease-out; }
@keyframes chSlideUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.ch-cat-head { flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.ch-cat-head .ch-cat-title { flex: 1; font-size: 15px; font-weight: 800; color: var(--ink); }
.ch-cat-head .ch-cat-title small { font-size: 12px; font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.ch-cat-close { flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--purple-light); color: var(--purple-deep); font-size: 17px; line-height: 1; cursor: pointer; }
.ch-cat-list { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ch-row { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 11px 16px;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.ch-row:last-child { border-bottom: 0; }
.ch-row:active { background: #F3EEFA; }
.ch-row .ch-name { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row .ch-time { flex: 0 0 auto; font-size: 11px; color: var(--ink-soft); }
.ch-row .ch-go { flex: 0 0 auto; font-size: 17px; color: var(--purple-deep); line-height: 1; }
.ch-cat-empty { padding: 28px 16px; text-align: center; color: var(--ink-soft); font-size: 13px; }

.act-cols { display: flex; gap: 10px; padding: 0 14px; }
.act-col { flex: 1; min-width: 0; }
.act-col .btn { width: 100%; }
.btn.stack { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 6px; line-height: 1.2; }
.btn.stack .b1 { font-size: 14px; font-weight: 600; }
.btn.stack .b2 { font-size: 9px; font-weight: 400; line-height: 1.25; margin-top: 2px; }
.btn.ghost.stack .b2 { color: rgba(126,87,194,.5); }
.btn.ghost.stack .b2 .bnum { color: var(--purple-deep); font-weight: 600; }

.btn.pink.stack .b2, .btn.primary.stack .b2 { color: rgba(255,255,255,.68); }
.btn.pink.stack .b2 .bnum, .btn.primary.stack .b2 .bnum { color: #fff; font-weight: 600; }

/* 读者评分 */
.rb-row { display: flex; align-items: center; margin-bottom: 12px; }
.rb-row:last-of-type { margin-bottom: 8px; }
.rb-label { width: 84px; flex-shrink: 0; font-size: 13px; color: var(--ink); }
.rb-track { flex: 1; height: 8px; margin: 0 10px; background: var(--purple-light); border-radius: 4px; overflow: hidden; }
.rb-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #D9C7F5, #A57FE0, #6A3FA0); transition: width .35s ease; }
.rb-num { width: 52px; flex-shrink: 0; text-align: right; font-size: 15px; font-weight: 700; color: var(--purple-deep); }
.rb-unit { font-size: 10px; font-weight: 400; color: var(--ink-soft); margin-left: 1px; }
.rate-count { font-size: 11px; color: var(--ink-soft); text-align: right; margin-top: 2px; }
.rate-lock { font-size: 12px; color: var(--ink-soft); text-align: center; padding: 10px 0; line-height: 1.6; }
.rate-gate { margin-top: 11px; padding: 11px 10px; background: var(--purple-light); border-radius: 6px; color: var(--purple-deep); font-weight: 500; }

/* 参与评分面板（滑块） */
.rate-form-title { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.rate-slider-row { display: flex; align-items: center; margin-bottom: 12px; }
.rs-label { width: 68px; flex-shrink: 0; font-size: 13px; color: var(--ink); }
.rate-range {
  flex: 1; margin: 0 12px 0 4px;
  -webkit-appearance: none; appearance: none;
  height: 8px; border-radius: 4px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, #D9C7F5, #A57FE0, #6A3FA0) 0 0 / 0% 100% no-repeat, var(--purple-light);
}
.rate-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--purple-deep);
  box-shadow: 0 1px 4px rgba(106, 63, 160, .35); cursor: pointer;
}
.rate-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--purple-deep);
  box-shadow: 0 1px 4px rgba(106, 63, 160, .35); cursor: pointer;
}
.rate-range::-moz-range-track { height: 8px; border-radius: 4px; background: var(--purple-light); }
.rate-range::-moz-range-progress { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #D9C7F5, #A57FE0, #6A3FA0); }
.rs-val { width: 34px; flex-shrink: 0; text-align: right; font-size: 14px; font-weight: 700; color: var(--purple-deep); }
.rate-mine { font-size: 12px; color: var(--purple-deep); background: var(--purple-light); border-radius: 6px; padding: 8px 10px; margin: 4px 0 12px; line-height: 1.5; }
/* 评分次数提示（共 3 次机会，用完后滑杆置灰、只可发表书评） */
.rate-uses { font-size: 11.5px; color: var(--muted); margin: -6px 0 10px; line-height: 1.5; }
.rate-uses.over { color: #B0653A; }
.rate-range:disabled { opacity: 0.45; }

/* 评分条下方：书写书评（在「提交书评」按钮之上，与按钮同宽、白底、随输入自动增高） */
.rate-comment-wrap { margin: 0 0 14px; }
.rate-comment {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 20px;
  background: #fff; color: var(--ink);
  font-family: inherit; font-size: 14px; line-height: 1.6;
  outline: none; resize: none; overflow: hidden;
}
.rate-comment:focus { border-color: var(--purple); }
.rate-comment-hint { font-size: 11px; color: var(--ink-soft); margin-top: 6px; padding-left: 4px; line-height: 1.5; }

/* 主角区 */
.lead-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lead-item:last-child { border-bottom: none; }
.lead-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; flex-shrink: 0; }
.lead-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.lead-gender { font-size: 12px; color: var(--purple-deep); background: var(--purple-soft); border-radius: 10px; padding: 2px 10px; }
.lead-role { margin-left: auto; font-size: 12px; color: var(--ink-soft); max-width: 46%; text-align: right; }
.cats-line { font-size: 12px; color: var(--ink-soft); margin: 8px 0; line-height: 1.5; }

/* ---------- 审核台 ---------- */
.filter-tabs { display: flex; gap: 8px; padding: 12px 14px 4px; flex-wrap: wrap; }
.filter-tabs .ft { font-size: 13px; padding: 6px 16px; border-radius: 14px; background: #fff; color: var(--ink-soft); box-shadow: var(--shadow); cursor: pointer; }
.filter-tabs .ft.on { background: var(--purple); color: #fff; }
.sub-card { background: #fff; margin: 8px 14px; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.sc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.sc-main { flex: 1; min-width: 0; }
.sc-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.sc-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.sc-status { font-size: 11px; padding: 3px 9px; border-radius: 10px; flex-shrink: 0; }
.st-pending { background: #FFF3E0; color: #EF8A3A; }
.st-approved { background: #E8F5E9; color: var(--good); }
.st-rejected { background: #FFEBEE; color: #E0625C; }
.sc-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.sc-row { display: flex; gap: 8px; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.sc-k { color: var(--ink-soft); flex-shrink: 0; width: 40px; }
.sc-v { flex: 1; color: var(--ink); word-break: break-all; }
.sc-content { font-size: 13px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; margin-top: 8px; max-height: 240px; overflow-y: auto; background: var(--bg); border-radius: 8px; padding: 10px; }
.sc-note { font-size: 12px; color: #E0625C; margin-top: 7px; line-height: 1.6; }
.sc-acts { display: flex; gap: 10px; margin-top: 12px; }
.sc-acts .btn { flex: 1; text-align: center; }
.sc-done { font-size: 12px; color: var(--ink-soft); text-align: center; margin-top: 12px; }

/* 非管理员/未登录提示 */
.noauth { text-align: center; padding: 28px 20px; }
.na-ico { font-size: 36px; }
.na-title { font-size: 16px; font-weight: 800; color: var(--ink); margin: 8px 0 6px; }
.na-sub { font-size: 12px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 10px; }
.na-openid { font-size: 13px; font-weight: 700; color: var(--purple-deep); background: var(--purple-soft); border-radius: 8px; padding: 10px; word-break: break-all; line-height: 1.5; }
.na-hint { font-size: 11px; color: var(--ink-soft); margin-top: 10px; line-height: 1.6; }

/* 投稿群提示条 */
.group-tip { display: flex; align-items: center; gap: 8px; margin: 14px 14px 0; background: var(--purple-soft); border-radius: 10px; padding: 10px 12px; }
.gt-label { font-size: 13px; color: var(--ink-soft); }
.gt-num { font-size: 14px; font-weight: 700; color: var(--ink); flex: 1; word-break: break-all; }
.gt-copy { font-size: 12px; color: #fff; background: var(--purple-deep); border-radius: 12px; padding: 4px 14px; cursor: pointer; flex-shrink: 0; }

/* 提交成功态 */
.done-card { text-align: center; padding: 28px 20px; }
.done-ico { width: 55px; height: 55px; border-radius: 50%; background: var(--good); color: #fff; font-size: 30px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; box-shadow: 0 4px 16px rgba(102,187,106,.3); }
.done-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.done-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 8px 0 20px; }

/* ---------- 屏蔽弹窗 ---------- */
.modal-mask2 { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.modal-box2 { width: 100%; max-width: 480px; background: #fff; border-radius: 16px 16px 0 0; padding: 18px 18px 22px; box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
.modal-title2 { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.modal-text2 { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.modal-input2 { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; background: #fff; }
.rp-field { display: block; font-size: 13px; color: var(--ink); margin: 10px 0; }
.rp-field select, .rp-field textarea { margin-top: 6px; }
.rp-hint { font-size: 12px; color: #8a82a0; line-height: 1.7; margin: -4px 0 10px; }
.report-row { padding: 4px 14px 0; }
.report-link { display: inline-block; font-size: 12px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.report-link:active { opacity: .6; }
.btn.bad { background: #e35; color: #fff; border-color: #e35; }
.btn.bad:active { opacity: .85; }

/* ---------- 书架长按拖拽 ---------- */
.drag-grip { color: #c9c9d2; font-size: 15px; align-self: center; padding: 0 3px 0 2px; cursor: grab; user-select: none; }
.drag-hint { font-size: 12px; color: var(--ink-soft); padding: 4px 14px 8px; }
.drag-ghost { position: fixed; z-index: 210; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 10px 12px; font-size: 14px; max-width: 240px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dragOverlay { position: fixed; inset: 0; z-index: 200; display: none; background: rgba(0,0,0,.4); pointer-events: none; }
#dragOverlay.show { display: block; }
#dragOverlay .drag-info { position: absolute; top: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }
.drag-targets { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 86%; max-width: 420px; max-height: 70vh; overflow: auto; background: #fff; border-radius: 14px; padding: 8px; pointer-events: auto; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.drag-target { padding: 12px; border-radius: 10px; font-size: 14px; color: var(--ink); border: 1px solid transparent; margin: 4px 0; }
.drag-target .dt-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.drag-target.over { background: #f3e9ff; border-color: #a55cff; }
.block-scroll { max-height: 58vh; overflow-y: auto; }
.block-sec { margin-bottom: 12px; }
.block-sec-label { font-size: 10px; color: #b3a8c6; margin-bottom: 6px; letter-spacing: 0.5px; }
.block-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.block-chip { flex: 0 0 calc(33.33% - 5px); text-align: center; font-size: 12px; padding: 9px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.block-chip.on { border-color: var(--purple); background: var(--purple-light); color: var(--purple-deep); }

/* ---------- 阅读页 ---------- */
.reader { position: fixed; inset: 0; max-width: 480px; margin: 0 auto; background: #FDFBF7; display: flex; flex-direction: column; z-index: 40; overflow: hidden; }
.reader-top { display: flex; align-items: center; padding: 10px 14px; }
.reader-top .back { font-size: 22px; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.reader-top .rt-title { font-size: 14px; font-weight: 600; margin-left: 10px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-top .rt-gear { font-size: 13px; font-weight: 600; padding: 5px 10px; border: 1px solid var(--line); border-radius: 14px; color: var(--purple-deep); background: #fff; cursor: pointer; flex-shrink: 0; }
.reader-mark { padding: 7px 14px; font-size: 12px; color: var(--purple-deep); background: #F3EEFB; border-bottom: 1px solid #ECE3F7; }
.reader-mark--new { color: var(--ink-soft); background: #FAFAFA; }
.reader-body { flex: 1; overflow-y: auto; padding: 20px 22px; line-height: 2; font-size: 17px; color: #3a3320; }
.reader-body p { margin: 0 0 14px; text-indent: 2em; }
.reader-foot { padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-soft); border-top: 1px solid #eee; flex-wrap: wrap; gap: 5px; }
.reader-foot .rf-btn { cursor: pointer; display: inline-flex; align-items: center; padding: 0 3px; }
.rf-progress { font-size: 11px; color: var(--ink-soft); }

/* 分页模式 */
.reader-stage { position: relative; flex: 1; overflow: hidden; perspective: 700px; }
.page-layer { position: absolute; left: 0; right: 0; top: 0; bottom: 0; padding: 16px 18px; box-sizing: border-box; overflow: hidden; backface-visibility: hidden; }
.page-cur { z-index: 1; }
.page-next { z-index: 2; }
.p-para { margin: 0 0 15px; text-indent: 2em; }
.page-ind { position: absolute; right: 11px; bottom: 7px; z-index: 3; font-size: 11px; color: var(--ink-soft); opacity: .55; }
.in-slide { animation: rInSlide .32s ease forwards; }
@keyframes rInSlide { from { transform: translateX(32px); opacity: .3; } to { transform: translateX(0); opacity: 1; } }
.in-slide-rev { animation: rInSlideRev .32s ease forwards; }
@keyframes rInSlideRev { from { transform: translateX(-32px); opacity: .3; } to { transform: translateX(0); opacity: 1; } }
.in-tap, .in-tap-rev { animation: rFade .26s ease forwards; }
@keyframes rFade { from { opacity: 0; } to { opacity: 1; } }
.in-vol { animation: rInVol .3s ease-out forwards; }
@keyframes rInVol { from { transform: translateY(18px) scale(.985); opacity: .25; } to { transform: translateY(0) scale(1); opacity: 1; } }
.in-vol-rev { animation: rInVolRev .3s ease-out forwards; }
@keyframes rInVolRev { from { transform: translateY(-18px) scale(.985); opacity: .25; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* 滚动模式 */
.ch-block { position: relative; }
.ch-body { box-sizing: border-box; padding-bottom: 40px; }
.ch-head { margin: 18px 22px 4px; padding-top: 14px; border-top: 1px solid rgba(150, 130, 190, .18); font-size: 12px; color: var(--ink-soft); letter-spacing: 0.5px; }
.ch-block:first-child .ch-head { border-top: none; padding-top: 6px; margin-top: 6px; }
.stream-end { margin: 20px 0 45px; text-align: center; font-size: 11px; color: var(--ink-soft); opacity: .7; }
.author-note { margin: 22px 0 8px; padding: 12px 14px; border-radius: 12px; background: var(--purple-soft); border: 1px dashed var(--purple-light); }
.author-note .an-head { font-size: 12px; font-weight: 700; color: var(--purple-deep); margin-bottom: 6px; }
.author-note .an-body { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.author-note .an-sign { font-size: 11px; color: #b3a8c6; text-align: right; margin-top: 6px; }

/* 阅读设置 / 目录抽屉：锚定在阅读容器(.reader)内部，宽屏下也不会"露在左侧挡着" */
.drawer-mask, .rs-mask { position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 60; }
.chapter-drawer, .rs-drawer { position: absolute; z-index: 61; background: #fff; }
/* 目录：左侧滑出抽屉，默认完全移出容器左侧（配合 .reader 的 overflow:hidden 裁掉） */
.chapter-drawer { top: 0; bottom: 0; left: 0; width: 76%; max-width: 360px; transform: translateX(-100%); transition: transform .28s ease; overflow-y: auto; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
.chapter-drawer.show { transform: translateX(0); }
/* 设置：底部弹出面板 */
.rs-drawer { left: 0; right: 0; bottom: 0; width: auto; border-radius: 16px 16px 0 0; padding: 18px 18px 24px; box-shadow: 0 -6px 24px rgba(0,0,0,.16); }
.chapter-drawer .cd-head { padding: 16px; font-weight: 700; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.chapter-item { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.chapter-item.on { color: var(--purple-deep); font-weight: 700; }
.chapter-item.read:not(.on) { color: var(--ink-soft); }
.chapter-item .read-dot { width: 5px; height: 5px; border-radius: 50%; background: #C6BAD6; display: inline-flex; flex-shrink: 0; margin-right: 5px; }
.chapter-item .ci-title { flex: 1; }
.chapter-item .ci-time { flex: 0 0 auto; font-size: 11px; color: var(--ink-soft); font-weight: 400; margin-left: 8px; }
.rs-head { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.rs-row2 { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f1ebf8; }
.rs-row2 > :first-child { font-size: 13px; color: var(--ink-soft); }
.rs-ctrl { display: flex; align-items: center; }
.rs-btn { border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 3px 12px; margin: 0 3px; font-size: 13px; color: var(--ink); cursor: pointer; }
.rs-val { min-width: 26px; display: inline-block; text-align: center; font-weight: 500; color: var(--ink); font-size: 13px; }
.rs-chip { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 4px 12px; margin-left: 6px; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
.rs-chip.on { border-color: var(--purple-deep); color: var(--purple-deep); background: var(--purple-soft); font-weight: 700; }
.rs-swatch { width: 26px; height: 26px; border-radius: 50%; display: inline-block; margin-left: 8px; border: 2px solid #eee; cursor: pointer; vertical-align: middle; }
.rs-swatch.on { border-color: var(--purple-deep); }
/* 护眼模式开关：柔和绿，关闭态淡紫灰 */
.rs-switch { width: 44px; height: 24px; border-radius: 99px; background: #E5DEEE; position: relative; display: inline-block; cursor: pointer; flex: 0 0 auto; transition: background .2s; }
.rs-switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: left .2s; }
.rs-switch.on { background: #7FB069; }
.rs-switch.on i { left: 22px; }
.rs-tip { font-size: 11px; line-height: 1.6; color: var(--ink-soft); background: #F7F3FD; border-radius: 6px; padding: 7px 9px; margin-top: 2px; }

/* 空态 */
.empty { text-align: center; color: var(--ink-soft); padding: 40px 0; font-size: 13px; }
.empty.sm { padding: 14px 0; font-size: 12px; }
/* 无作品时的底纹水印一句话（首页随机推荐 / 筛选结果页） */
.empty-watermark {
  text-align: center; padding: 64px 16px;
  font-size: 15px; font-weight: 600; letter-spacing: 3px;
  color: #DDD3EC; user-select: none;
}

/* ---------- 读者书评（UGC） ---------- */
.review-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.review-item { background: var(--purple-soft); border-radius: 12px; padding: 10px 12px; }
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.review-name { font-size: 13px; font-weight: 700; color: var(--purple-deep); }
.review-time { font-size: 11px; color: var(--ink-soft); }
.review-content { font-size: 13px; color: var(--ink); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.review-form { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 14px; }
.rv-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; background: #fff; color: var(--ink); outline: none; margin-bottom: 10px; }
.rv-text { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; color: var(--ink); outline: none; min-height: 76px; resize: vertical; line-height: 1.6; font-family: inherit; }
.rv-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.rv-count { font-size: 11px; color: var(--ink-soft); }

/* 评论工具栏：计数 + 排序 */
.review-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.review-count { font-size: 12px; color: var(--ink-soft); }
.sort-tabs { display: flex; gap: 6px; }
.sort-tab { font-size: 12px; color: var(--ink-soft); padding: 3px 10px; border-radius: 12px; background: var(--purple-soft); cursor: pointer; }
.sort-tab.active { color: #fff; background: var(--purple-deep); font-weight: 700; }

/* 评论项 */
.review-item { background: var(--purple-soft); border-radius: 12px; padding: 10px 12px; }
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.rh-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.review-ava { width: 22px; height: 22px; border-radius: 50%; background: var(--purple-deep); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.review-name { font-size: 13px; font-weight: 700; color: var(--purple-deep); }
.review-time { font-size: 11px; color: var(--ink-soft); flex-shrink: 0; margin-left: 8px; }
.rh-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.review-dots { font-size: 18px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0 2px; user-select: none; }
.review-dots:active { color: var(--purple-deep); }
.dot-menu { position: fixed; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(126,87,194,.18); overflow: hidden; min-width: 140px; }
.dot-menu-item { padding: 11px 14px; font-size: 13px; color: var(--ink); cursor: pointer; }
.dot-menu-item:active { background: var(--purple-light); color: var(--purple-deep); }
.review-content { font-size: 13px; color: var(--ink); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.review-rate { display: inline-block; margin: 6px 0 0; padding: 4px 9px; background: var(--purple-light); color: var(--purple-deep); font-size: 12px; border-radius: 6px; }
.review-actions { display: flex; align-items: center; gap: 16px; margin-top: 7px; }
.like-btn { font-size: 12px; color: var(--ink-soft); cursor: pointer; user-select: none; }
.like-btn.liked { color: var(--purple-deep); font-weight: 700; }
.reply-btn { font-size: 12px; color: var(--purple-deep); cursor: pointer; }

/* 楼中楼回复 */
.reply-list { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.reply-item { display: flex; gap: 7px; }
.reply-ava { width: 18px; height: 18px; border-radius: 50%; background: #C9B8E0; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reply-body { flex: 1; min-width: 0; }
.reply-meta { display: flex; align-items: center; gap: 8px; }
.reply-name { font-size: 12px; font-weight: 700; color: var(--purple-deep); }
.reply-time { font-size: 10px; color: var(--ink-soft); }
.reply-content { font-size: 12px; color: var(--ink); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* 回复提示条 */
.reply-bar { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); background: var(--purple-soft); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.reply-bar b { color: var(--purple-deep); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-cancel { margin-left: auto; color: var(--ink-soft); cursor: pointer; }

/* ---------- 轻提示 toast ---------- */
.washu-toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(58, 46, 77, .92); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; z-index: 999; max-width: 80%; text-align: center; line-height: 1.5;
  animation: toastIn .18s ease; opacity: 1; transition: opacity .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ---------- 底部导航栏（首页/书架/我的）---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto;
  height: 54px; background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 50; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--ink-soft); font-size: 11px; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.tabbar a.on { color: var(--purple-deep); font-weight: 600; }
.tabbar a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a .tdot { position: absolute; }

/* ============ 书架页（对齐小程序 app.wxss） ============ */
.shelf-bar { display: flex; justify-content: flex-end; padding: 10px 14px 2px; }
.new-shelf { font-size: 13px; color: #fff; background: var(--purple-deep); border-radius: 16px; padding: 6px 16px; font-weight: 600; cursor: pointer; }
.shelf-summary { margin: 10px 14px; padding: 14px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.shelf-summary .ss-num { margin-left: auto; font-size: 12px; color: var(--ink-soft); }

.shelf-preview { background: #fff; margin: 10px 14px; border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.shelf-head { display: flex; align-items: center; justify-content: space-between; }
.shelf-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.shelf-enter { font-size: 13px; color: #fff; background: var(--purple-deep); border-radius: 14px; padding: 4px 14px; cursor: pointer; flex-shrink: 0; }
.shelf-mini { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mini-book { width: 52px; cursor: pointer; }
.mini-cover { width: 52px; height: 72px; border-radius: 6px; box-shadow: var(--shadow); font-size: 11px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; text-align: center; padding: 3px; }
.mini-title { font-size: 10px; color: var(--ink-soft); margin-top: 4px; text-align: center; line-height: 1.3; max-height: 26px; overflow: hidden; }
.shelf-empty { font-size: 12px; color: #b3a8c6; padding: 6px 2px 2px; }
.shelf-ops { display: flex; gap: 18px; padding: 14px 4px 4px; font-size: 13px; }
.shelf-ops .op-add { color: var(--purple-deep); font-weight: 600; cursor: pointer; }
.shelf-ops .op-del { color: #d98; cursor: pointer; }
.shelf-ops2 { display: flex; gap: 18px; padding: 16px 18px 6px; font-size: 14px; }
.shelf-ops2 .op-add { color: var(--purple-deep); font-weight: 600; cursor: pointer; }
.drop-zone { padding: 4px 14px; }
.shelf-head-btn.del { color: #d98; font-size: 13px; }

/* ---------- 收藏到书架 底部面板 ---------- */
.shelf-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.shelf-panel { width: 100%; max-width: 520px; margin: 0 auto; background: var(--card); border-radius: 16px 16px 0 0; max-height: 72vh; overflow-y: auto; padding: 16px 16px 8px; box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
.shelf-panel .sp-title { font-size: 15px; font-weight: 800; color: var(--ink); text-align: center; padding-bottom: 10px; }
.sheet-item { display: flex; align-items: center; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sheet-item.child { padding-left: 16px; }
.sheet-item .si-name { flex: 1; font-size: 14px; color: var(--ink); }
.sheet-item.child .si-name { color: var(--ink-soft); }
.sheet-item .si-sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.sheet-item .si-check { font-size: 18px; color: var(--purple-deep); width: 22px; text-align: center; font-weight: 800; }
.sheet-new { display: flex; gap: 8px; padding: 14px 4px 6px; }
.sheet-new input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; background: #fff; color: var(--ink); outline: none; }
.sheet-new input:focus { border-color: var(--purple); }
.sheet-new .btn { flex-shrink: 0; }
.sheet-cancel { text-align: center; padding: 14px; color: var(--ink-soft); font-size: 14px; cursor: pointer; }

/* ---------- 书架子书架 ---------- */
.shelf-child { margin: 4px 0 2px; padding: 8px 0 4px; border-top: 1px dashed var(--line); }
.shelf-name2 { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--purple-deep); font-weight: 700; padding: 4px 2px; }
.op-del-child { font-size: 12px; color: #d98; cursor: pointer; font-weight: 400; }

/* ============ 我的页（对齐小程序 app.wxss） ============ */
.mine-head { display: flex; align-items: center; gap: 14px; padding: 18px 14px; background: linear-gradient(135deg, var(--purple), #B39DDB); color: #fff; margin: 0 0 4px; }
.mine-head .avatar { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 28px; flex-shrink: 0; }
.mine-head .mh-name { font-size: 18px; font-weight: 800; }
.mine-head .mh-sub { font-size: 12px; opacity: .9; margin-top: 3px; }

.stat-row { display: flex; text-align: center; background: #fff; margin: 12px 14px; border-radius: 14px; box-shadow: var(--shadow); }
.stat-row .stat { flex: 1; padding: 12px 0; cursor: pointer; }
.stat-row .stat .sv { font-size: 16px; font-weight: 800; color: var(--purple-deep); }
.stat-row .stat .sl { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.stat-row .stat:active { opacity: .6; }

/* 通用分组菜单（对齐小程序 app.wxss .menu-item） */
.menu { background: var(--card); margin: 12px 14px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.menu-item:first-child { border-radius: 14px 14px 0 0; }
.menu-item:last-child { border-radius: 0 0 14px 14px; border-bottom: none; }
.menu-item:active { background: var(--purple-light); }
.menu-item .mi-ic { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.menu-item .mi-tx { flex: 1; font-size: 14px; color: var(--ink); }
.menu-item .mi-ar { color: var(--ink-soft); font-size: 18px; flex-shrink: 0; }
.menu-item.review { background: linear-gradient(135deg, #F3EEFB, #fff); }
.menu-item.review .mi-ic { background: var(--purple-deep); color: #fff; border-radius: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.menu-item.contrib { background: linear-gradient(135deg, var(--purple-soft), #fff); }
.menu-item.contrib .mi-ic { background: var(--purple); color: #fff; border-radius: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }

/* ---------- 投稿链接弹层（点击「我要投稿」展示链接 + 复制） ---------- */
.contrib-box { display: flex; align-items: center; gap: 8px; background: var(--purple-soft); border-radius: 10px; padding: 10px 12px; }
.contrib-label { font-size: 12px; color: var(--ink-soft); flex-shrink: 0; }
.contrib-num { font-size: 12px; font-weight: 700; color: var(--ink); flex: 1; word-break: break-all; min-width: 0; }
.contrib-copy { font-size: 12px; color: #fff; background: var(--purple-deep); border-radius: 12px; padding: 4px 14px; cursor: pointer; flex-shrink: 0; }
.contrib-copy:active { opacity: .8; }

/* ---------- 自定义弹层（替代原生 prompt/confirm） ---------- */
.ui-mask { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.ui-modal { width: 84%; max-width: 360px; background: #fff; border-radius: 16px; padding: 20px 18px 16px; box-shadow: 0 12px 40px rgba(126,87,194,.22); }
.ui-modal .ui-title { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.ui-modal .ui-msg { font-size: 14px; color: var(--ink); line-height: 1.6; margin-bottom: 18px; }
.ui-modal .ui-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px; background: #fff; color: var(--ink); outline: none; }
.ui-modal .ui-input:focus { border-color: var(--purple); }
.ui-btns { display: flex; gap: 10px; margin-top: 14px; }
.ui-btn { flex: 1; border: none; border-radius: 20px; padding: 10px 0; font-size: 14px; font-weight: 600; background: var(--purple-light); color: var(--purple-deep); cursor: pointer; }
.ui-btn.primary { background: var(--purple); color: #fff; }
.ui-btn:active { transform: scale(.97); }

/* ---------- 我的：消息未读角标 ---------- */
.mi-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: #e05a5d; border-radius: 12px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; }
.menu-item .mi-badge + .mi-ar { margin-left: 8px; }

/* ============ 我的消息页（4 tab：娲书/书籍/作者/互动） ============ */
.msg-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.msg-head .mtitle { font-size: 17px; font-weight: 800; }
.msg-head .markall { font-size: 12px; color: var(--purple-deep); background: var(--purple-light); border-radius: 14px; padding: 5px 14px; cursor: pointer; }
.msg-tabs { display: flex; gap: 8px; padding: 4px 14px 10px; overflow-x: auto; }
.msg-tab { font-size: 13px; padding: 6px 14px; border-radius: 14px; background: #fff; color: var(--ink-soft); box-shadow: var(--shadow); cursor: pointer; white-space: nowrap; flex-shrink: 0; display: flex; align-items: center; gap: 5px; }
.msg-tab.on { background: var(--purple); color: #fff; }
.msg-tab .tb { font-size: 10px; font-weight: 700; color: #fff; background: #e05a5d; border-radius: 10px; padding: 0 6px; line-height: 16px; min-width: 16px; text-align: center; }
.msg-tab.on .tb { background: rgba(255,255,255,.3); }
.msg-list { background: var(--card); margin: 0 14px 16px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.msg-item { position: relative; display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.msg-item:last-child { border-bottom: none; }
.msg-item.unread { border-left: 4px solid var(--purple-deep); padding-left: 10px; }
.msg-dot { position: absolute; left: 3px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--purple-deep); }
.msg-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--purple-light); color: var(--purple-deep); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.msg-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.msg-time { font-size: 11px; color: var(--ink-soft); flex-shrink: 0; }
.msg-text { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 4px; white-space: pre-wrap; word-break: break-all; }
.msg-text.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.msg-more { font-size: 12px; color: var(--purple-deep); margin-top: 6px; }

/* 简单列表页（关注 / 看过的） */
.simple-list { background: var(--card); margin: 0 14px 16px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.simple-sec { padding: 12px 14px 4px; font-size: 13px; font-weight: 800; color: var(--ink); }
.simple-empty { padding: 14px; font-size: 12px; color: var(--ink-soft); }
.cnt-pill { font-size: 12px; color: var(--ink-soft); margin-left: 4px; }
/* r9：期待/喜欢页、关注作者页的排序说明与加入时间 */
.simple-note { padding: 2px 16px 10px; font-size: 11px; color: var(--ink-soft); line-height: 1.6; }
.add-time { font-size: 10px; color: #a99cb8; margin-top: 5px; }
.unfollow-btn { flex-shrink: 0; align-self: center; font-size: 11px; color: var(--purple-deep);
  border: 1px solid var(--purple); border-radius: 12px; padding: 4px 9px; cursor: pointer; }
.unfollow-btn:active { opacity: .6; }

/* ===== 娲书启动页（沿用小程序 pages/splash 设计） ===== */
.ws-splash{position:fixed;inset:0;z-index:99999;padding:24px;box-sizing:border-box;background:linear-gradient(160deg,#EDE7F6,#C9B6E4);}
.ws-splash.ws-hide{opacity:0;pointer-events:none;transition:opacity .55s ease;}
.ws-splash-in{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;width:100%;height:100%;box-sizing:border-box;}
.ws-splash-logo{width:140px;height:140px;display:flex;align-items:center;justify-content:center;}
.ws-splash-logo picture{display:flex;align-items:center;justify-content:center;}
.ws-splash-logo img{width:120px;height:120px;border-radius:28px;box-shadow:0 12px 34px rgba(126,87,194,.22);animation:wsSplashFloat 2.4s ease-in-out infinite;}
.ws-splash-title{display:flex;align-items:baseline;justify-content:center;color:#4A3B6B;text-shadow:0 4px 20px rgba(126,87,194,.15);}
.ws-splash-title .ws-main{font-size:44px;font-weight:900;letter-spacing:6px;}
.ws-splash-title .ws-suffix{font-size:44px;font-weight:900;letter-spacing:6px;margin-left:2px;}
.ws-splash-slogan{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:16px;font-size:18px;color:#5e5177;text-align:center;line-height:1.7;font-weight:500;}
.ws-splash-slogan .ss-line{opacity:0;transform:translateY(12px);animation:wsSplashFadeUp .8s ease forwards;}
.ws-splash-slogan .ss-2{animation-delay:.5s;}
.ws-splash-skip{position:absolute;left:0;right:0;bottom:48px;text-align:center;font-size:12px;color:#6b5e85;letter-spacing:2px;opacity:.8;}
@keyframes wsSplashFloat{0%,100%{transform:translateY(0);}50%{transform:translateY(-8px);}}
@keyframes wsSplashFadeUp{to{opacity:1;transform:translateY(0);}}

/* ===== 筛选结果独立页 / 黑名单页 通用子页头 ===== */
.sub-head { display: flex; align-items: center; padding: 14px; position: sticky; top: 0; background: var(--card); z-index: 5; box-shadow: var(--shadow); }
.sub-head .back { font-size: 26px; color: var(--purple-deep); width: 32px; cursor: pointer; line-height: 1; }
.sub-head .sub-title { flex: 1; text-align: center; font-size: 17px; font-weight: 800; }
.sub-head .sub-act { font-size: 13px; color: var(--purple-deep); cursor: pointer; min-width: 56px; text-align: right; }
.book-list { padding: 0 14px 16px; }
.filter-summary { padding: 12px 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.filter-summary .fs-chip { display: inline-block; background: var(--purple-light); color: var(--purple-deep); border-radius: 12px; padding: 3px 10px; margin: 0 6px 6px 0; font-weight: 600; }
.filter-summary .fs-empty { color: var(--ink-soft); }

/* ===== 黑名单页（阅读端） ===== */
.bl-tip { margin: 12px 14px; padding: 12px 14px; background: var(--purple-light); border-radius: 12px; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.bl-section { margin: 0 14px 16px; }
.bl-sec-title { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.bl-sec-title .bl-count { font-size: 12px; color: var(--purple-deep); margin-left: 4px; }
.bl-list { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.bl-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.bl-item:last-child { border-bottom: none; }
.bl-info { flex: 1; min-width: 0; cursor: pointer; }
.bl-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.bl-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.bl-empty { padding: 16px; font-size: 12px; color: var(--ink-soft); text-align: center; }

/* ---------- 下拉刷新提示（手机端） ---------- */
.pull-ind {
  position: fixed; top: 8px; left: 50%; transform: translate(-50%, 0);
  z-index: 9999; pointer-events: none; opacity: 0;
  background: rgba(94, 53, 177, .94); color: #fff; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(94, 53, 177, .28);
  transition: opacity .18s ease, transform .18s ease;
}
