:root {
  /* 品牌色（与原 book-vue 导航绿一致） */
  --brand: #799747;
  --brand-dark: #66813a;
  --brand-light: #93a772;
  --brand-soft: #f3f7ec;
  /* 移动端主色（对齐 Vant 默认蓝） */
  --m: #1989fa;
  --m-dark: #0f7ae5;
  --m-soft: #eaf4ff;
  /* 文本与背景层级 */
  --text: #303133;
  --text-2: #606266;
  --muted: #909399;
  --line: #ebeef5;
  --bg: #f5f6f8;
  --card: #fff;
  /* 圆角与阴影 */
  --radius: 12px;
  --radius-sm: 8px;
  --pill: 999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .1);
  /* 兼容旧变量 */
  --pc: var(--brand);
  --pc-dark: var(--brand-dark);
  --pc-nav: var(--brand-light);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--text-2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; border: 0; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; outline: none; }
:focus-visible { outline: 2px solid rgba(121, 151, 71, .35); outline-offset: 2px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== 卡片 ===== */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(235, 238, 245, .8);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 16px;
}
.panel-title { font-size: 17px; font-weight: 600; position: relative; padding-left: 12px; letter-spacing: .3px; }
.panel-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 17px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
}
.more { font-size: 12px; color: var(--muted); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px; border: 1px solid var(--line); border-radius: var(--pill);
  background: #fff; color: var(--text-2); font-size: 14px;
  transition: all .2s ease; box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--brand-light); color: var(--brand); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #8cb25a, #6f9440);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(121, 151, 71, .28);
}
.btn-primary:hover { color: #fff; box-shadow: 0 8px 20px rgba(121, 151, 71, .35); }
.btn-ghost { background: transparent; box-shadow: none; }
.link-btn { padding: 0; color: var(--text-2); box-shadow: none; }

/* ===== 封面 ===== */
.cover-fallback {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 60px;
  padding: 10px 8px;
  box-sizing: border-box;
  background: linear-gradient(150deg, #b6cb8e 0%, #7f9f4a 55%, #5e7d35 100%);
  color: rgba(255, 255, 255, .95);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 -14px 30px rgba(0, 0, 0, .12);
  overflow: hidden;
  word-break: break-all;
  overflow-wrap: break-word;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
/* 顶部高光装饰条 */
.cover-fallback::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,.5), rgba(255,255,255,0));
}
/* 底部装饰小标识 */
.cover-fallback::after {
  content: "书";
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 10px;
  font-weight: 400;
  opacity: .4;
  letter-spacing: 0;
}

/* ===== 标签（分类 / 连载状态 / 字数） ===== */
.tag {
  display: inline-block; font-style: normal; font-size: 11px; line-height: 18px;
  padding: 0 8px; border-radius: var(--pill); border: 1px solid transparent;
  white-space: nowrap;
}
.tag-cat { background: #fdf5e6; color: #c08a1e; border-color: #f8e6bf; }
.tag-words { background: #eef4fe; color: #3b7bd6; border-color: #dbe8fb; }
.tag-ing { background: #fef0f0; color: #e05e5e; border-color: #fbdcdc; }
.tag-done { background: #f0f9eb; color: #52a435; border-color: #ddf0d4; }
.tag-chip { background: #f5f0fd; color: #7c4dff; border-color: #e6dbfb; margin: 0 6px 4px 0; }
a.tag:hover { opacity: .82; }

/* 书籍详情页标签云 */
.book-tags, .m-book-tags { margin: 6px 0 10px; font-size: 12px; line-height: 22px; }
.book-tags .tags-label, .m-book-tags .m-tags-label { color: #999; margin-right: 4px; }

/* ===== 轮播 ===== */
.carousel { position: relative; overflow: hidden; background: #f2f3f5; height: 300px; }
.carousel-track { display: flex; height: 100%; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.carousel-slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; display: block; }
.carousel-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.carousel-slide .cover-fallback {
  width: 100%; height: 100%; min-height: 0; border-radius: 0;
  font-size: 32px; letter-spacing: 3px; padding: 20px 30px;
}
.carousel-slide .cover-fallback::after { font-size: 14px; bottom: 12px; right: 16px; }
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; gap: 4px; padding: 52px 18px 46px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #fff;
}
.carousel-caption strong { font-size: 20px; font-weight: 600; }
.carousel-caption em { font-style: normal; font-size: 12px; opacity: .82; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; padding: 0;
  background: rgba(0, 0, 0, .35); color: #fff; font-size: 22px; line-height: 1;
  opacity: 0; transition: opacity .2s, background .2s;
}
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(0, 0, 0, .55); }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; }
.carousel-dots button {
  flex: 1; min-width: 0; height: 34px; padding: 0 8px; border-right: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .42); color: rgba(255, 255, 255, .85); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .2s;
}
.carousel-dots button:last-child { border-right: 0; }
.carousel-dots button.active { background: linear-gradient(90deg, var(--brand-light), var(--brand)); color: #fff; }

.breadcrumb { font-size: 13px; color: var(--muted); margin: 16px 0; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { margin: 0 6px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 24px 0 4px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; line-height: 32px; text-align: center;
  padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--text-2); font-size: 13px; box-shadow: var(--shadow-sm);
  transition: all .2s;
}
.pagination a:hover { border-color: var(--brand-light); color: var(--brand); }
.pagination .current {
  background: linear-gradient(135deg, #8cb25a, #6f9440);
  color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(121, 151, 71, .25);
}
.page-total { color: var(--muted); border: 0 !important; box-shadow: none; background: none; }

/* ===== 筛选 ===== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--card); padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid rgba(235, 238, 245, .8);
}
.filter-bar select, .filter-bar input {
  padding: 8px 12px; border: 1px solid #e4e7ed; border-radius: var(--radius-sm);
  background: #fafbfc; min-width: 120px; transition: border-color .2s, box-shadow .2s;
}
.filter-bar select:focus, .filter-bar input:focus {
  border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(121, 151, 71, .12);
}
.filter-bar button {
  padding: 8px 22px; border-radius: var(--pill); color: #fff;
  background: linear-gradient(135deg, #8cb25a, #6f9440);
  box-shadow: 0 4px 12px rgba(121, 151, 71, .25);
}
.filter-bar button:hover { box-shadow: 0 8px 18px rgba(121, 151, 71, .32); }

.hot-words { font-size: 12px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.hot-words a {
  padding: 3px 12px; border-radius: var(--pill); background: #fff;
  color: var(--text-2); box-shadow: var(--shadow-sm);
}
.hot-words a:hover { color: var(--brand); background: var(--brand-soft); }

/* ===== 表单 ===== */
.form-error, .form-ok {
  padding: 10px 14px; border-radius: var(--radius-sm); margin: 10px 0; font-size: 13px;
}
.form-error { color: #f56c6c; background: #fef0f0; border: 1px solid #fde2e2; }
.form-ok { color: #67c23a; background: #f0f9eb; border: 1px solid #e1f3d8; }

/* 全站消息提醒（服务端 messages）顶部悬浮 toast */
.msg-toast-wrap {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 9999; width: min(92vw, 420px); pointer-events: none;
}
.msg-toast {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 8px;
  font-size: 14px; line-height: 1.5; text-align: center;
  background: #fff; border: 1px solid rgba(0,0,0,.06); border-left: 4px solid #909399;
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
  opacity: 0; transform: translateY(-14px); transition: opacity .3s, transform .3s;
  pointer-events: auto; cursor: pointer;
}
.msg-toast.show { opacity: 1; transform: translateY(0); }
.msg-toast-success { border-left-color: #67c23a; background: #f0f9eb; color: #3d7a1e; }
.msg-toast-error { border-left-color: #f56c6c; background: #fef0f0; color: #c45656; }
.msg-toast-info, .msg-toast-warning { border-left-color: #409eff; background: #ecf5ff; color: #2b6cb0; }

.auth-page { max-width: 460px; margin: 48px auto; }
.auth-card {
  background: var(--card); padding: 32px; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(235, 238, 245, .8);
}
.auth-card h1 { font-size: 22px; font-weight: 600; margin-bottom: 20px; text-align: center; }
.auth-form label { display: block; margin-bottom: 16px; font-size: 13px; color: var(--text-2); }
.auth-form input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 14px;
  border: 1px solid #e4e7ed; border-radius: var(--radius-sm); background: #fafbfc;
  transition: border-color .2s, box-shadow .2s;
}
.auth-form input:focus { border-color: var(--brand-light); background: #fff; box-shadow: 0 0 0 3px rgba(121, 151, 71, .12); }
.auth-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 14px;
  border: 1px solid #e4e7ed; border-radius: var(--radius-sm); background: #fafbfc;
  font: inherit; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.auth-form textarea:focus { border-color: var(--brand-light); background: #fff; box-shadow: 0 0 0 3px rgba(121, 151, 71, .12); }
.auth-form button { width: 100%; margin-top: 8px; padding: 10px 0; }
.remember-me {
  display: flex !important; align-items: center; gap: 8px;
  margin: -4px 0 12px !important; font-size: 13px; color: var(--text-2);
  cursor: pointer; user-select: none;
}
.auth-form .remember-me input[type="checkbox"] {
  display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0;
  border: 0; background: none; box-shadow: none;
  border-radius: 3px; accent-color: var(--brand); cursor: pointer;
}
.m-body .auth-form .remember-me input[type="checkbox"] { accent-color: var(--m); }
.auth-alt { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-alt a { color: var(--brand); }
.remember-row { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 12px; }
.remember-row .remember-me { margin: 0 !important; }
.forgot-link { font-size: 13px; color: var(--brand); text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
.captcha-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.captcha-row input { flex: 1; margin-top: 0; }
.captcha-row img { height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line); cursor: pointer; }
.auth-form .captcha-row .btn-code {
  width: auto; flex: 0 0 auto; margin-top: 0; padding: 0 14px; height: 44px;
  font-size: 13px; white-space: nowrap;
}
.auth-form .captcha-row .btn-code[disabled] { opacity: .6; cursor: not-allowed; }
.auth-form .form-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--text-2); }

.not-found { text-align: center; padding: 70px 0; }
.not-found h1 {
  font-size: 72px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, #a9c07f, #799747);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.not-found-tip { margin: 16px auto 22px; max-width: 560px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.not-found-search { display: flex; max-width: 460px; margin: 0 auto 22px; }
.not-found-search input {
  flex: 1; height: 42px; padding: 0 14px; border: 1px solid var(--line);
  border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); outline: none;
}
.not-found-search input:focus { border-color: var(--brand-light); }
.not-found-search button {
  flex: none; height: 42px; padding: 0 20px; border: 0; cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: linear-gradient(135deg, var(--brand-light), var(--brand)); color: #fff;
}
.not-found-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 18px; }
.not-found-cats { font-size: 13px; color: var(--muted); line-height: 2; }
.not-found-cats a { margin: 0 8px; color: var(--brand); }

/* ===== 关站页 ===== */
.closed-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--brand-soft);
}
.closed-card {
  width: 100%; max-width: 520px; padding: 46px 32px; text-align: center;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.closed-badge {
  display: inline-block; padding: 4px 14px; margin-bottom: 18px; font-size: 12px;
  border-radius: var(--pill); color: var(--brand-dark); background: var(--brand-soft);
  border: 1px solid #dbe6c9;
}
.closed-card h1 { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.4; }
.closed-tips { margin: 14px 0 24px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.closed-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.closed-contact { margin-top: 22px; font-size: 12px; color: var(--muted); }

/* ===== 免责声明 ===== */
.disclaimer { padding: 30px 34px; }
.disclaimer h1 { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.disclaimer h2 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; padding-left: 10px; border-left: 3px solid var(--brand-light); }
.disclaimer p { font-size: 13.5px; line-height: 2; color: var(--text-2); margin-bottom: 10px; }
.disclaimer-tip { font-size: 13px; color: var(--muted); background: var(--brand-soft); border-radius: var(--radius-sm); padding: 10px 14px; }
.disclaimer-links { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); }
.disclaimer-links a { display: inline-block; margin: 0 16px 6px 0; font-size: 13px; color: var(--text-2); }
.disclaimer-links a:hover { color: var(--brand); }
.disclaimer-contact { margin-top: 20px; font-size: 13px; color: var(--muted); }
.disclaimer-contact span { margin-right: 16px; }

/* ===== 提示 ===== */
.toast {
  position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, .82); color: #fff; padding: 11px 20px;
  border-radius: var(--radius-sm); z-index: 99; font-size: 14px;
  pointer-events: none; opacity: 0; transition: opacity .2s;
  box-shadow: var(--shadow-md); backdrop-filter: blur(4px);
}
.toast.show { opacity: 1; }

/* 点赞按钮 */
.btn-like { display: inline-flex; align-items: center; gap: 4px; }
.btn-like svg { flex: 0 0 auto; transition: transform .18s; }
.btn-like .like-num { font-style: normal; font-size: .92em; opacity: .85; }
.btn-like.is-liked { color: #f56c6c !important; border-color: #fbdcdc !important; background: #fef0f0 !important; }
.btn-like.is-liked svg { animation: like-pop .32s; }
button.link-btn.btn-like.is-liked { background: transparent !important; border-color: transparent !important; }
@keyframes like-pop { 50% { transform: scale(1.35); } }

/* 下载进度弹窗 */
.dl-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.dl-modal.show { opacity: 1; pointer-events: auto; }
.dl-modal-mask {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px);
}
.dl-modal-card {
  position: relative; z-index: 1; width: 320px; max-width: calc(100vw - 48px);
  background: #fff; border-radius: 10px; padding: 20px 22px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.dl-modal-title {
  font-size: 14px; font-weight: 600; color: #303133;
  margin-bottom: 14px; text-align: center;
}
.dl-modal-bar {
  height: 6px; border-radius: 3px; overflow: hidden;
  background: #e9eef5; position: relative;
}
.dl-modal-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #409eff, #66b1ff);
  border-radius: 3px; transition: width .18s linear;
}
.dl-modal-bar.indeterminate i {
  width: 30% !important; transition: none;
  animation: dl-slide 1.2s ease-in-out infinite;
}
.dl-modal-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 12px; color: #909399;
}
.dl-modal-info .dl-pct { color: #409eff; font-weight: 600; font-variant-numeric: tabular-nums; }
.dl-modal-info .dl-status {
  max-width: 200px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.dl-modal-actions { margin-top: 14px; text-align: center; }
.dl-cancel {
  border: 1px solid #dcdfe6; background: #fff; color: #606266;
  border-radius: 4px; padding: 5px 16px; font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.dl-cancel:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
@keyframes dl-slide {
  0% { margin-left: -30%; }
  100% { margin-left: 100%; }
}
.disabled { color: #c0c4cc; cursor: not-allowed; }
.badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  padding: 0 5px; margin-left: 4px; border-radius: var(--pill);
  background: linear-gradient(135deg, #ff7a7a, #f56c6c); color: #fff;
  font-size: 11px; font-style: normal; text-align: center;
}

/* ===== 用户中心 ===== */
.user-page { display: flex; gap: 18px; align-items: flex-start; }
.user-side { width: 224px; flex: 0 0 224px; position: sticky; top: 16px; }
.user-main { flex: 1; min-width: 0; }
.user-side-head { text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.user-side-head strong { display: block; margin-top: 10px; font-size: 15px; }
.user-side-head em { display: block; font-style: normal; font-size: 12px; color: var(--muted); word-break: break-all; }
.user-avatar {
  width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.user-avatar-fallback {
  background: linear-gradient(135deg, #aec486, #799747);
  color: #fff; font-size: 24px; font-weight: 700;
}
.user-nav { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.user-nav a {
  display: flex; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-2); transition: all .2s;
}
.user-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.user-nav a.active {
  background: linear-gradient(135deg, #8cb25a, #6f9440); color: #fff;
  box-shadow: 0 4px 12px rgba(121, 151, 71, .25);
}
.user-nav a.active .badge { background: rgba(255, 255, 255, .25); }
.user-logout { margin-top: 12px; text-align: center; border-top: 1px solid var(--line); padding-top: 12px; }
.user-form { max-width: 480px; }
.user-meta { margin-top: 16px; font-size: 12px; color: var(--muted); }
/* 个人中心概览 */
.user-overview { display: flex; gap: 20px; align-items: center; }
.user-avatar-lg { width: 72px; height: 72px; font-size: 30px; }
.user-overview-info { flex: 1; min-width: 0; }
.user-overview-info h2 { font-size: 20px; font-weight: 600; }
.user-overview-info > p { margin-top: 6px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 14px; }
.user-stats li { display: flex; flex-direction: column; gap: 2px; }
.user-stats em { font-style: normal; font-size: 12px; color: var(--muted); }
.user-stats strong { font-size: 15px; color: var(--text); }
.user-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .user-cols { grid-template-columns: minmax(0, 1fr); } }
/* 头像上传：点击头像弹操作菜单（查看大图 / 更换头像） */
.avatar-upload-form { position: relative; display: inline-block; flex: none; text-align: center; }
.avatar-trigger { cursor: pointer; display: inline-block; }
.avatar-tip { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.avatar-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  z-index: 40; margin-top: 6px; white-space: nowrap; text-align: left;
  background: var(--panel-bg, #fff); border: 1px solid var(--line, rgba(128, 128, 128, .2));
  border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}
.avatar-menu button {
  display: block; width: 100%; padding: 10px 18px; border: 0;
  background: none; font-size: 14px; color: inherit; text-align: left;
}
.avatar-menu button:hover { background: rgba(128, 128, 128, .1); }
.avatar-lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .8);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.avatar-lightbox[hidden] { display: none; }
.avatar-lightbox img { max-width: 88vw; max-height: 88vh; border-radius: 8px; }
.m-feedback li { padding: 12px 0; border-bottom: 1px solid #f5f6f8; }
.m-feedback li:last-child { border-bottom: 0; }
/* 反馈类型芯片 */
.fb-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fb-type { cursor: pointer; }
.fb-type input { position: absolute; opacity: 0; pointer-events: none; }
.fb-type span {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px;
  background: #f2f3f5; color: #646566; transition: all .15s;
}
.fb-type input:checked + span {
  background: var(--brand-soft, #ecf5ff); color: var(--brand, #409eff);
  box-shadow: inset 0 0 0 1px var(--brand, #409eff);
}

/* ===== 书架 ===== */
.shelf-item {
  display: flex; gap: 16px; padding: 16px 8px; border-bottom: 1px solid #f5f6f8;
  align-items: center; border-radius: var(--radius-sm); transition: background .2s;
}
.shelf-item:hover { background: #fafbfc; }
.shelf-item:last-child { border-bottom: 0; }
.shelf-cover { width: 84px; flex: 0 0 84px; }
.shelf-cover img { border-radius: var(--radius-sm); box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.shelf-cover .cover-fallback { height: 112px; font-size: 13px; padding: 8px 6px; }
.shelf-info { flex: 1; min-width: 0; }
.shelf-info h3 { font-size: 16px; margin-bottom: 6px; }
.shelf-progress { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.shelf-progress a { color: var(--brand); }
.row-meta { font-size: 12px; color: var(--muted); }
.row-meta span + span::before { content: " · "; }
.shelf-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.shelf-actions .btn { padding: 6px 14px; font-size: 13px; }

/* ===== 消息 ===== */
.msg-item {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 10px; background: #fff; transition: box-shadow .2s;
}
.msg-item:hover { box-shadow: var(--shadow-sm); }
.msg-unread { border-color: #d6e5bd; background: linear-gradient(180deg, #fbfdf8, #fff); }
.msg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-head strong { flex: 1; min-width: 120px; font-size: 15px; }
.msg-title { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.msg-title:hover { color: var(--brand); }
.msg-arrow {
  font-style: normal; font-size: 12px; color: var(--muted); font-weight: 400;
  transition: transform .2s;
}
.msg-title.open .msg-arrow { color: var(--brand); }
.msg-sender { font-size: 12px; color: var(--muted); }
.msg-head time { font-size: 12px; color: var(--muted); }
.msg-tag {
  font-size: 11px; padding: 2px 8px; border-radius: var(--pill);
  background: var(--brand-soft); color: var(--brand-dark);
}
.msg-body {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  color: var(--text-2); font-size: 13px;
}
.msg-body p { margin: 0 0 6px; }

.feedback-list li { padding: 14px 4px; border-bottom: 1px solid #f5f6f8; }
.feedback-list li:last-child { border-bottom: 0; }
.feedback-list li p:first-child { margin-bottom: 6px; }

/* ===== 书评 ===== */
.comment-form textarea {
  display: block; width: 100%; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid #e4e7ed; border-radius: var(--radius-sm); font: inherit;
  resize: vertical; background: #fafbfc; transition: border-color .2s, box-shadow .2s;
}
.comment-form textarea:focus { border-color: var(--brand-light); background: #fff; box-shadow: 0 0 0 3px rgba(121, 151, 71, .12); }
.comment-login { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.comment-login a { color: var(--brand); }
.comment-list .comment-item { padding: 14px 0; border-bottom: 1px solid #f5f6f8; }
.comment-list .comment-item:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.comment-head strong { font-size: 14px; }
.comment-head time { font-size: 12px; color: var(--muted); }
.comment-item > p { font-size: 14px; color: #444; word-break: break-word; }
.comment-replies {
  margin-top: 10px; padding: 10px 14px; background: #f7f8f5;
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2);
}
.comment-replies li + li { margin-top: 4px; }

.avatar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-row input[type="file"] { font-size: 13px; color: var(--muted); }
.beian span { margin: 0 8px; }
.beian a { margin: 0 8px; color: #9aa0a6; }
.beian a:hover { color: var(--brand-light); }

/* ===== 移动端用户中心 / 列表 ===== */
.m-body .m-profile {
  display: flex; gap: 14px; align-items: center;
  background: linear-gradient(135deg, #f0f7ff, #fff 65%);
}
.m-profile-info { min-width: 0; }
.m-profile-info strong { font-size: 17px; }
.m-profile-info p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.m-user-menu li { border-bottom: 1px solid #f5f6f8; }
.m-user-menu li:last-child { border-bottom: 0; }
.m-user-menu a { display: flex; align-items: center; gap: 8px; padding: 13px 2px; font-size: 15px; }
.menu-arrow { margin-left: auto; color: #c0c4cc; font-style: normal; }
.m-logout { margin: 18px 0 24px; text-align: center; }
.m-logout button {
  width: 100%; padding: 12px 0; border-radius: var(--pill);
  background: #fff; color: #f56c6c; border: 1px solid #fde2e2;
}
.m-page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-page-head > span { font-size: 12px; color: var(--muted); }
.m-shelf-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f5f6f8; align-items: center; }
.m-shelf-item:last-child { border-bottom: 0; }
.m-shelf-cover { width: 66px; flex: 0 0 66px; }
.m-shelf-cover img { border-radius: var(--radius-sm); box-shadow: 0 4px 10px rgba(0, 0, 0, .12); }
.m-shelf-cover .cover-fallback { height: 88px; font-size: 11px; padding: 6px 4px; }
.m-shelf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m-shelf-name { font-size: 15px; font-weight: 600; color: var(--text); }
.m-shelf-chapter { font-size: 12px; color: var(--m); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-shelf-meta { font-size: 11px; color: var(--muted); }
.m-shelf-del {
  font-size: 12px; color: var(--muted); padding: 5px 10px;
  border: 1px solid var(--line); border-radius: var(--pill); background: #fff;
}
.m-msg-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.m-msg-head strong { font-size: 15px; }
.m-msg-head time { font-size: 11px; color: var(--muted); flex: 0 0 auto; }
.m-msg-body { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.m-msg-unread { border-left: 3px solid var(--m); }
.m-msg-read { margin-top: 10px; }
.m-msg-read button, .m-page-head .link-btn { font-size: 12px; color: var(--m); }
.m-feedback p:first-child { font-size: 14px; margin-bottom: 6px; }
.m-feedback-meta { font-size: 11px; color: var(--muted); }
.m-feedback-meta span + span::before { content: " · "; }
.tab-dot {
  display: inline-block; width: 6px; height: 6px; margin-left: 3px;
  border-radius: 50%; background: #f56c6c; vertical-align: middle;
}
.m-footer {
  padding: 16px 12px 76px; text-align: center; font-size: 11px;
  color: #a8abb2; line-height: 2;
}
.m-footer a { color: #909399; margin: 0 6px; }
.m-body .comment-form textarea { border-radius: var(--radius-sm); background: #f7f8fa; }
.m-body .comment-form textarea:focus { border-color: var(--m); box-shadow: 0 0 0 3px rgba(25, 137, 250, .12); }
.m-body .comment-login a { color: var(--m); }
.m-body .auth-form input, .m-body .auth-form textarea { background: #f7f8fa; border-color: transparent; border-radius: var(--radius-sm); }
.m-body .auth-form input:focus, .m-body .auth-form textarea:focus { border-color: var(--m); box-shadow: 0 0 0 3px rgba(25, 137, 250, .12); }
.m-body .btn-primary {
  background: linear-gradient(135deg, #4aa9ff, #1989fa);
  box-shadow: 0 6px 16px rgba(25, 137, 250, .26);
}
.m-body .form-ok { color: #07c160; background: #eaf9f0; border-color: #c8f0da; }
.m-body .badge { background: linear-gradient(135deg, #ff7a7a, #f56c6c); }

/* ===== 阅读设置 ===== */
body { --read-font: 18px; --read-line: 1.9; --read-width: 900px; }
body.read-theme-light { --read-bg: #fdfcf9; --read-color: #333; }
body.read-theme-sepia { --read-bg: #FAF9DE; --read-color: #3d3a2e; }
body.read-theme-blue { --read-bg: #e9faff; --read-color: #2c3e44; }
body.read-theme-green { --read-bg: #C7EDCC; --read-color: #33402c; }
body.read-theme-tan { --read-bg: #d2b48c; --read-color: #4a3a26; }
body.read-theme-dark { --read-bg: #1b1b1b; --read-color: #a8a8a8; }
body.read-theme-light, body.read-theme-sepia, body.read-theme-blue, body.read-theme-green, body.read-theme-tan, body.read-theme-dark { background-color: var(--read-bg); }
/* 移动端 body.m-body 默认灰色背景特异性相同，需提高优先级保证主题全框覆盖 */
body.m-body.read-theme-light, body.m-body.read-theme-sepia, body.m-body.read-theme-blue, body.m-body.read-theme-green, body.m-body.read-theme-tan, body.m-body.read-theme-dark { background-color: var(--read-bg); }

.rs-themes { display: flex; gap: 8px; }
.rs-swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #e5e6eb;
  background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.rs-swatch[data-theme="light"] { background: #ffffff; }
.rs-swatch[data-theme="sepia"] { background: #FAF9DE; }
.rs-swatch[data-theme="blue"] { background: #e9faff; }
.rs-swatch[data-theme="green"] { background: #C7EDCC; }
.rs-swatch[data-theme="tan"] { background: #d2b48c; }
.rs-swatch[data-theme="dark"] { background: #1b1b1b; }
.rs-swatch.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

/* ===== 试读功能：锁定章节灰态 + 提示条 ===== */

/* PC 端目录锁定章节 */
.chapter-list a.locked {
  color: #bbb !important;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
}
.chapter-list a.locked em {
  font-style: normal;
  margin-left: 2px;
  font-size: 12px;
}

/* PC 端目录顶部提示条 */
.trial-tip-bar {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #795548;
  line-height: 1.6;
}
.trial-tip-bar a {
  color: #f57c00;
  font-weight: 600;
  text-decoration: underline;
}

/* PC 端章节阅读页锁定卡片 */
.trial-locked-card {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--brand-soft), #e8f0d8);
  border-radius: var(--radius);
  margin: 24px 0;
  border: 1px solid #d4dfb8;
}
.trial-locked-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--brand-dark);
}
.trial-locked-card p {
  color: var(--text-2);
  margin-bottom: 8px;
}
.trial-locked-card .trial-locked-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0 12px;
}
.trial-locked-card .trial-tip {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}

/* 移动端目录弹层 & 目录列表锁定 */
.m-chapter-list a.locked,
.catalog-list a.locked {
  color: #bbb !important;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
}
.m-chapter-list a.locked em {
  font-style: normal;
  margin-left: 2px;
  font-size: 12px;
}

/* 移动端目录提示条 */
.m-trial-tip-bar {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #795548;
  line-height: 1.6;
}
.m-trial-tip-bar a {
  color: #f57c00;
  font-weight: 600;
  text-decoration: underline;
}

/* 移动端章节阅读页锁定卡片 */
.m-trial-locked {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(135deg, #eaf4ff, #d4e9ff);
  border-radius: 12px;
  margin: 16px 0;
  border: 1px solid #b3d4ff;
}
.m-trial-locked h3 {
  font-size: 17px;
  margin-bottom: 10px;
  color: #0f7ae5;
}
.m-trial-locked p {
  color: #555;
  font-size: 13px;
  margin-bottom: 6px;
  line-height: 1.6;
}
.m-trial-locked .m-btn {
  display: inline-block;
  margin: 10px 6px 4px;
  padding: 8px 20px;
  font-size: 14px;
}
.m-trial-locked .m-trial-tip {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
  margin-bottom: 0;
}

