/* ========== 基础与主题 ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
  min-height: 100vh;
  overflow-x: hidden;
}
:root {
  --radius: 16px;
  --shadow: 0 6px 24px rgba(80, 60, 30, .08);
  --maxw: 1080px;
}
[data-skin="paper"] {
  --bg: #f7f4ee; --bg2: #efe9dc; --card: #fffdf8; --card2: #f9f5ec;
  --ink: #2c2722; --muted: #8b8378; --line: #e9e2d6;
  --accent: #c25b3a; --accent2: #a8482c; --accent-soft: #f8e6de; --on-accent: #fff;
  --gold: #b8892e; --gold-soft: #f7efd9;
  --hero: linear-gradient(135deg, #fff6e9 0%, #fbe9dd 55%, #f6ddd2 100%);
  --tag: #efe7d8;
}
[data-skin="star"] {
  --bg: #0b1020; --bg2: #0e1428; --card: #141a30; --card2: #18203a;
  --ink: #e7e9f5; --muted: #9aa3c0; --line: #242c4a;
  --accent: #7c9cff; --accent2: #5f7ff0; --accent-soft: #1b2547; --on-accent: #0b1020;
  --gold: #f0c96a; --gold-soft: #2b2743;
  --hero: linear-gradient(135deg, #18214a 0%, #1b1740 55%, #241a4d 100%);
  --tag: #1e2744;
}
[data-skin="sakura"] {
  --bg: #fdf3f4; --bg2: #fae7ea; --card: #fffafb; --card2: #fdf1f3;
  --ink: #3a2a2e; --muted: #9b7f86; --line: #f0dfe3;
  --accent: #d96a8a; --accent2: #c25473; --accent-soft: #fbe3e9; --on-accent: #fff;
  --gold: #c08a4a; --gold-soft: #f9ead9;
  --hero: linear-gradient(135deg, #fff3f5 0%, #ffe4ea 55%, #ffd9e3 100%);
  --tag: #f8e3e8;
}
[data-skin="ink"] {
  --bg: #141413; --bg2: #191817; --card: #1e1d1b; --card2: #23221f;
  --ink: #e9e4da; --muted: #9b948a; --line: #2e2c28;
  --accent: #d6a15c; --accent2: #c08a45; --accent-soft: #302a20; --on-accent: #1a1712;
  --gold: #d6a15c; --gold-soft: #2e281f;
  --hero: linear-gradient(135deg, #28241d 0%, #221f1a 55%, #2b241a 100%);
  --tag: #2a2824;
}
[data-skin="cyber"] {
  --bg: #0a0f12; --bg2: #0d1519; --card: #10181d; --card2: #132026;
  --ink: #d8f6f0; --muted: #6f9a94; --line: #1d3037;
  --accent: #38e0c0; --accent2: #22c4a7; --accent-soft: #10312c; --on-accent: #04120f;
  --gold: #ffd166; --gold-soft: #2a2a1a;
  --hero: linear-gradient(135deg, #0e2026 0%, #102a2a 55%, #1a2440 100%);
  --tag: #16313a;
}
[data-skin="anime"] {
  --bg: #f2f7ff; --bg2: #e9f1ff; --card: #ffffff; --card2: #f4f8ff;
  --ink: #2a2f4a; --muted: #7c86a6; --line: #dbe6ff;
  --accent: #4f7cff; --accent2: #3a63e0; --accent-soft: #e3ecff; --on-accent: #ffffff;
  --gold: #ff86ad; --gold-soft: #ffe4ee;
  --hero: linear-gradient(135deg, #eaf2ff 0%, #e6f7ff 50%, #ffe9f3 100%);
  --tag: #e8efff;
}
[data-skin="naiva"] {
  --radius: 24px;
  --bg: #fffbea; --bg2: #fff3bf; --card: #fffef5; --card2: #fff9dc;
  --ink: #4a3a12; --muted: #9a8750; --line: #f2e3a0;
  --accent: #f2c200; --accent2: #d9a900; --accent-soft: #fff2b8; --on-accent: #3a2d00;
  --gold: #e08a00; --gold-soft: #fff0c2;
  --hero: linear-gradient(135deg, #fffbe0 0%, #fff0a8 55%, #e8f7c4 100%);
  --tag: #fdf3c4;
}
[data-skin="naiva"] .btn { border-radius: 16px; }
[data-skin="naiva"] .card { border-radius: 24px; }
[data-skin="naiva"] .hero::after { display: none; }
[data-skin="anime"] .hero::after { content: "✨"; }
[data-skin="sanguosha"] .hero::after { content: "🀄"; }
[data-skin="sanguosha"] {
  --bg: #f3e7cf; --bg2: #ecdcba; --card: #fbf1dc; --card2: #f6e9cd;
  --ink: #2e1f16; --muted: #7d6650; --line: #d9c39f;
  --accent: #9e2b25; --accent2: #7d1f1a; --accent-soft: #f0d9c4; --on-accent: #fff6e8;
  --gold: #b8862f; --gold-soft: #f4e4bd;
  --hero: linear-gradient(135deg, #f7ecd6 0%, #efdcb9 55%, #e8c9a8 100%);
  --tag: #e9d8b8;
}
[data-skin="sanguosha"] .card { border-color: #cdb184; }
[data-skin="sanguosha"] .hero h1,
[data-skin="sanguosha"] .reader-title { letter-spacing: 2px; }
[data-skin="sanguosha"] .brand { letter-spacing: 1px; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent); color: var(--on-accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }

/* ========== 布局 ========== */
.page-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; gap: 18px;
}
.brand { font-weight: 800; font-size: 17px; letter-spacing: .3px; white-space: nowrap; display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand .bird { font-size: 22px; flex: none; }
.brand > span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-inner { min-width: 0; }
.userbox { flex: none; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  padding: 7px 12px; border-radius: 10px; font-size: 14px; color: var(--muted);
  transition: .15s; white-space: nowrap;
}
.nav a:hover { background: var(--card2); color: var(--ink); }
.nav a.on { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.userbox { display: flex; align-items: center; gap: 8px; }
.avatar-sm {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card2); border: 1px solid var(--line); font-size: 18px;
  overflow: hidden; flex: none;
}
.userbox .uname { font-size: 13px; color: var(--muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { padding: 26px 0 80px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; padding: 22px 0 90px; text-align: center; }

/* 手机底部导航 */
.bottomnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a {
  flex: 1; text-align: center; font-size: 11px; color: var(--muted);
  display: flex; flex-direction: column; gap: 2px; align-items: center; padding: 4px 0; border-radius: 10px;
}
.bottomnav a .ic { font-size: 19px; line-height: 1; }
.bottomnav a.on { color: var(--accent); }
.bottomnav .dot { position: absolute; margin-left: 14px; margin-top: -2px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }

/* ========== 通用组件 ========== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap, .spread.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; }

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 10px; }
h1 { font-size: 26px; letter-spacing: .5px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.serif { font-family: Georgia, "Songti SC", "SimSun", serif; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 9px 16px; border-radius: 11px; cursor: pointer; font-size: 14px;
  transition: .15s; white-space: nowrap; user-select: none;
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover { background: var(--accent2); }
.btn.ghost { background: transparent; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2a2008; font-weight: 700; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 9px; }
.btn.xs { padding: 3px 9px; font-size: 12px; border-radius: 8px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.danger { color: #c0392b; border-color: color-mix(in srgb, #c0392b 35%, var(--line)); }
[data-skin="star"] .btn.danger, [data-skin="ink"] .btn.danger, [data-skin="cyber"] .btn.danger { color: #ff8a80; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  background: var(--tag); border-radius: 999px; font-size: 12px; color: var(--muted);
  white-space: nowrap;
}
.pill.accent { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.pill.gold { background: var(--gold-soft); color: var(--gold); font-weight: 700; }
.pill.hot { background: var(--accent-soft); color: var(--accent); }
.pill.live { background: color-mix(in srgb, #2e9e5b 18%, transparent); color: #2e9e5b; }
[data-skin="star"] .pill.live, [data-skin="ink"] .pill.live, [data-skin="cyber"] .pill.live { color: #66e0a3; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card2); color: var(--ink); outline: none; transition: .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
input[type=file] {
  width: 100%; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 11px;
  background: var(--card2); color: var(--muted); font-size: 13px; cursor: pointer;
}
input[type=file]::file-selector-button {
  border: 0; background: var(--accent); color: var(--on-accent); padding: 6px 12px;
  border-radius: 8px; margin-right: 10px; font-weight: 700; cursor: pointer;
}
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.error-text { color: #c0392b; font-size: 13px; }
[data-skin="star"] .error-text, [data-skin="ink"] .error-text, [data-skin="cyber"] .error-text { color: #ff8a80; }

.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--card2); border: 1px solid var(--line); flex: none; overflow: hidden; }
.avatar.lg { width: 76px; height: 76px; font-size: 40px; }
.avatar.xl { width: 96px; height: 96px; font-size: 52px; }
.avatar img, .avatar-sm img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-inline {
  width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 11px; background: var(--card2); border: 1px solid var(--line);
  vertical-align: -4px; overflow: hidden; flex: none;
}
.avatar-inline img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* ========== 首页 ========== */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.hero {
  position: relative; overflow: hidden; padding: 26px 26px 22px;
  background: var(--hero); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.hero::after {
  content: "🕊️"; position: absolute; right: -18px; bottom: -38px; font-size: 150px; opacity: .07;
  transform: rotate(-12deg); pointer-events: none;
}
.hero > *:not(.hero-mascot) { position: relative; z-index: 1; }
.hero-mascot {
  position: absolute; right: 18px; top: 14px; width: 118px; height: auto;
  pointer-events: none; opacity: .95;
  filter: drop-shadow(0 10px 16px rgba(90, 60, 0, .2));
}
.hero h1 { font-size: clamp(24px, 4vw, 34px); margin: 12px 0 6px; }
.hero .lede { color: var(--muted); max-width: 560px; font-size: 14.5px; }
.countdown { display: flex; gap: 10px; margin: 18px 0 6px; flex-wrap: wrap; }
.cd-unit {
  min-width: 74px; text-align: center; background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--line); border-radius: 14px; padding: 9px 8px 7px;
}
.cd-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; color: var(--accent); line-height: 1.1; }
.cd-label { font-size: 11px; color: var(--muted); }
.cd-text { font-size: 15px; font-weight: 700; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hero-actions .btn.ghost { background: color-mix(in srgb, var(--card) 60%, transparent); }
.urge-btn { font-size: 16px; padding: 12px 26px; border-radius: 13px; }
.hero-stat { font-size: 13px; color: var(--muted); margin-top: 12px; }
.hero-stat b { color: var(--accent); font-size: 15px; }

.download-card { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.download-card .dl-icon {
  width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft);
  display: grid; place-items: center; font-size: 26px; flex: none;
}
.download-card b { font-size: 15px; }
.download-card .btn { flex: none; }
@media (max-width: 760px) {
  .download-card { flex-wrap: wrap; }
  .download-card .grow { flex: 1 1 calc(100% - 64px); }
  .download-card .btn { width: 100%; }
}
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 14px; }
.section-title h2 { margin: 0; font-size: 18px; }
.work-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.workcard { display: flex; gap: 16px; padding: 16px; align-items: flex-start; transition: .18s; }
.workcard:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.workcard .cover {
  width: 76px; height: 100px; border-radius: 12px; flex: none; display: grid; place-items: center;
  font-size: 38px; background: var(--accent-soft); border: 1px solid var(--line);
}
.workcard h3 { margin: 2px 0 4px; font-size: 16.5px; }
.workcard .intro { font-size: 13px; color: var(--muted); margin: 4px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.wc-meta b { color: var(--ink); font-weight: 700; }

.side-card { padding: 18px; margin-bottom: 16px; }
.side-card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.rank-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; align-items: center; }
.rank-item:last-child { border-bottom: 0; }
.rank-no { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: var(--tag); color: var(--muted); flex: none; }
.rank-no.top1 { background: var(--accent); color: var(--on-accent); }
.rank-no.top2 { background: var(--gold); color: #2a2008; }
.rank-no.top3 { background: var(--accent-soft); color: var(--accent); }
.rank-item .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item .n { color: var(--accent); font-weight: 800; font-size: 12.5px; }
.mini-item { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.mini-item:last-child { border-bottom: 0; }
.mini-item .who { color: var(--muted); font-size: 12px; }

/* ========== 作品页 ========== */
.work-head { display: flex; gap: 22px; padding: 24px; flex-wrap: wrap; }
.work-head .cover {
  width: 140px; height: 184px; border-radius: 16px; display: grid; place-items: center; font-size: 68px;
  background: var(--accent-soft); border: 1px solid var(--line); flex: none;
}
.work-head .info { flex: 1; min-width: 240px; }
.work-head .row { flex-wrap: wrap; }
.work-head .row > * { flex: none; }
.work-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 4px; }
.work-stats .st b { display: block; font-size: 20px; line-height: 1.2; }
.work-stats .st span { font-size: 12px; color: var(--muted); }
.work-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.chapter-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: .15s; }
.chapter-item:last-child { border-bottom: 0; }
.chapter-item:hover { background: var(--card2); }
.chapter-item .idx { width: 30px; color: var(--muted); font-size: 13px; flex: none; text-align: right; }
.chapter-item .ct { flex: 1; font-size: 14.5px; }
.chapter-item .cmeta { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ========== 阅读页 ========== */
.reader { max-width: 760px; margin: 0 auto; }
.reader-head { padding: 26px 26px 8px; }
.reader-title { font-size: clamp(22px, 4vw, 30px); }
.article { padding: 8px 26px 30px; font-size: 17.5px; line-height: 2; }
[data-skin="paper"] .article, [data-skin="sakura"] .article { font-family: Georgia, "Songti SC", "STSong", "SimSun", serif; }
.article p { margin: 0 0 1.1em; text-indent: 2em; }
.article p.noindent { text-indent: 0; }
.sel-tip {
  position: absolute; z-index: 30; background: var(--ink); color: var(--bg);
  padding: 7px 13px; border-radius: 9px; font-size: 13px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  white-space: nowrap; transform: translate(-50%, -120%);
}
.sel-tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.sentence { background: color-mix(in srgb, var(--gold) 25%, transparent); border-radius: 4px; }
.chapter-nav { display: flex; justify-content: space-between; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.thanks-box { margin: 0 26px 24px; padding: 16px 18px; background: var(--gold-soft); border: 1px dashed var(--gold); border-radius: 14px; font-size: 13.5px; }
.thanks-box h4 { color: var(--gold); margin-bottom: 6px; }

/* ========== 评论区 ========== */
.comments { padding: 20px; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.comment:last-of-type { border-bottom: 0; }
.comment .body { flex: 1; min-width: 0; }
.comment .head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.comment .head b { font-size: 13.5px; }
.comment .quote {
  margin: 8px 0 4px; padding: 8px 12px; border-left: 3px solid var(--gold);
  background: var(--card2); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.comment .text { margin: 5px 0 4px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.comment-form { display: flex; gap: 10px; margin: 14px 0 6px; }
.comment-form textarea { min-height: 70px; }
.comment .actions { display: flex; align-items: center; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.c-act {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12.5px; padding: 3px 8px; border-radius: 7px; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.c-act:hover { background: var(--card2); color: var(--ink); }
.c-act.on { color: var(--accent); font-weight: 700; }
.comment.reply {
  margin-left: 40px; padding: 10px 0 8px 12px; border-bottom: 0;
  border-left: 2px solid var(--line);
}
.comment.reply .avatar { width: 32px; height: 32px; font-size: 16px; }
.replies { margin-top: 6px; }
.reply-to { color: var(--accent); font-size: 12.5px; }

/* ========== 表单 / 认证 ========== */
.auth-wrap { max-width: 430px; margin: 30px auto; }
.auth-card { padding: 30px 28px; }
.auth-tabs { display: flex; background: var(--card2); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 600; }
.auth-tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 6px rgba(0,0,0,.06); }

/* ========== 写作台 / 后台 ========== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { padding: 16px 18px; }
.stat-card .v { font-size: 24px; font-weight: 800; line-height: 1.2; }
.stat-card .l { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 18px; }
.tabs a, .tabs button {
  border: 1px solid var(--line); background: var(--card); padding: 8px 15px; border-radius: 999px;
  font-size: 13.5px; cursor: pointer; color: var(--muted); white-space: nowrap;
}
.tabs a.on, .tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td:first-child { min-width: 96px; }
.table td b, .table td .row { white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.list-row { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .cover-sm { width: 42px; height: 56px; border-radius: 9px; display: grid; place-items: center; font-size: 22px; background: var(--accent-soft); flex: none; }
.list-row .grow { min-width: 0; }
.list-row .title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== 商城 ========== */
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.author-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item-card { padding: 20px; text-align: center; }
.item-card .emoji { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.item-card h4 { margin: 4px 0 4px; font-size: 15px; }
.item-card .price { color: var(--gold); font-weight: 800; font-size: 15px; margin: 6px 0 10px; }
.item-card.owned { border-color: var(--accent); }
.skin-swatch { height: 64px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 10px; display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.naiwa-thumb { height: 58px; width: auto; display: block; }

/* ========== 灵感墙 / 留言墙 ========== */
.post-box { padding: 18px; margin-bottom: 18px; }
.post-card { padding: 18px; margin-bottom: 14px; }
.post-card .quote-mark { font-size: 30px; line-height: .6; color: var(--accent); opacity: .55; }
.post-card .content { font-size: 15px; margin: 6px 0 10px; white-space: pre-wrap; word-break: break-word; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.work-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.work-tag { font-size: 12px; background: var(--card2); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; color: var(--muted); }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card2); }
.check-item input { width: auto; margin: 0; }

/* ========== 消息 ========== */
.msg-item { display: flex; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.msg-item:last-child { border-bottom: 0; }
.msg-item.unread { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.msg-icon { font-size: 22px; flex: none; width: 30px; text-align: center; }
.msg-item .body { flex: 1; min-width: 0; }
.msg-item .body b { font-size: 14px; }
.msg-item .body p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); white-space: pre-wrap; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ========== 个人中心 ========== */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.avatar-choice { font-size: 22px; padding: 6px 0; border-radius: 9px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; text-align: center; }
.avatar-choice.on { border-color: var(--accent); background: var(--accent-soft); }
.skin-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.skin-row:last-child { border-bottom: 0; }
.skin-dot { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); flex: none; overflow: hidden; display: grid; place-items: center; }
.skin-dot img { width: 100%; height: 100%; object-fit: contain; }
[data-preview="paper"] { background: linear-gradient(135deg, #f7f4ee 0%, #e9dfc9 100%); }
[data-preview="star"] { background: linear-gradient(135deg, #18214a 0%, #2a2560 100%); }
[data-preview="sakura"] { background: linear-gradient(135deg, #fff0f3 0%, #ffc9d8 100%); }
[data-preview="ink"] { background: linear-gradient(135deg, #1e1d1b 0%, #3a342a 100%); }
[data-preview="cyber"] { background: linear-gradient(135deg, #0e2026 0%, #1a3a40 50%, #2a2450 100%); }
[data-preview="anime"] { background: linear-gradient(135deg, #eaf2ff 0%, #dff7ff 45%, #ffe4ef 100%); }
[data-preview="naiva"] { background: linear-gradient(135deg, #fffbe0 0%, #ffe45c 55%, #bfe89a 100%); }
[data-preview="sanguosha"] { background: linear-gradient(135deg, #f3e7cf 0%, #c9a35e 55%, #9e2b25 100%); }

/* ========== 弹窗 / Toast / 弹幕 ========== */
#modalRoot:empty { display: none; }
.mask { position: fixed; inset: 0; background: rgba(10, 8, 6, .48); z-index: 90; backdrop-filter: blur(2px); }
.modal {
  position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 820px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.3); padding: 24px;
}
.modal h3 { margin-bottom: 16px; }
.modal.wide { width: min(880px, calc(100vw - 32px)); }
.modal.wide textarea[name="content"] { min-height: 52vh; }
.modal-close { position: sticky; float: right; top: 0; border: 0; background: transparent; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }
body.locked { overflow: hidden; }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast-item {
  background: var(--ink); color: var(--bg); padding: 9px 18px; border-radius: 999px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toastIn .2s ease-out; max-width: 88vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ========== 防盗水印 ========== */
.watermark-layer {
  position: fixed; inset: 0; z-index: 35; pointer-events: none; overflow: hidden;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 140px; user-select: none;
}
.watermark-layer > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-24deg); color: var(--ink); font-size: 12.5px; white-space: nowrap; line-height: 1.9;
  opacity: .09;
}
.watermark-layer > span b { font-weight: 700; letter-spacing: .5px; }
.watermark-layer > span i { font-style: normal; opacity: .85; }
.wm-chip {
  position: absolute; left: 16px; bottom: 18px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  padding: 0; border: 0; background: none; color: var(--muted);
  font-size: 9.5px; line-height: 1.4; letter-spacing: .2px;
  opacity: .3; white-space: nowrap; max-width: calc(100vw - 80px);
  overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px var(--bg), 0 0 4px var(--bg);
}
.wm-chip b { color: var(--muted); font-weight: 500; font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; }
.wm-chip span { font-size: 9px; opacity: .9; }
@media (max-width: 760px) {
  .watermark-layer { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 100px; }
  .watermark-layer > span { font-size: 10.5px; opacity: .095; }
  .wm-chip { bottom: 88px; left: 12px; opacity: .26; max-width: calc(100vw - 70px); }
}
@media print { .watermark-layer > span, .wm-chip { opacity: .16; } }

#danmaku { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.danmaku-item {
  position: absolute; white-space: nowrap; font-size: 15px; font-weight: 700;
  color: var(--accent); background: color-mix(in srgb, var(--card) 75%, transparent);
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  animation: dmMove linear forwards;
}
[data-skin="star"] .danmaku-item, [data-skin="ink"] .danmaku-item, [data-skin="cyber"] .danmaku-item { color: var(--gold); }
@keyframes dmMove { from { transform: translateX(100vw); } to { transform: translateX(-120%); } }

.music-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.14); font-size: 20px; transition: .2s;
}
.music-btn .disc { display: block; line-height: 1; }
.music-btn.playing .disc { animation: spin 3.6s linear infinite; color: var(--accent); }
.music-btn.off { opacity: .65; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); font-size: 14px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 10px; }
.notice-bar { padding: 10px 16px; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); border-radius: 12px; font-size: 13px; margin-bottom: 16px; }

/* ========== 响应式 ========== */
@media (min-width: 900px) {
  .author-work-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; }
  .author-work-list > .list-row {
    border: 1px solid var(--line); border-bottom: 1px solid var(--line);
    border-radius: 14px; padding: 14px; flex-wrap: wrap; align-items: flex-start;
  }
  .author-work-list > .list-row > .row { flex: 1 1 100%; justify-content: flex-end; margin-top: 8px; }
  .author-work-list > .list-row .title { white-space: normal; }
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .item-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .userbox .uname { display: none; }
  .logout-top { display: none; }
  .top-inner { gap: 10px; }
  .brand { font-size: 15.5px; }
  .bottomnav { display: flex; }
  .main { padding-top: 16px; }
  .hero { padding: 20px 18px; border-radius: 16px; }
  .hero-mascot { display: none; }
  .countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .cd-unit { min-width: 0; flex: none; padding: 8px 2px 6px; }
  .cd-num { font-size: 22px; }
  .workcard { padding: 13px; gap: 12px; }
  .workcard .cover { width: 62px; height: 84px; font-size: 30px; }
  .work-head { padding: 18px; gap: 16px; }
  .work-head .cover { width: 92px; height: 124px; font-size: 44px; }
  .work-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .work-stats .st b { font-size: 18px; }
  .article { padding: 6px 20px 26px; font-size: 16.5px; line-height: 1.95; }
  .reader-head { padding: 20px 20px 6px; }
  .comments { padding: 16px; }
  .item-grid { grid-template-columns: 1fr 1fr; }
  .author-shop-grid { grid-template-columns: 1fr; }
  .skin-row { flex-wrap: wrap; }
  .skin-row .grow { flex: 1 1 150px; min-width: 0; }
  .modal { padding: 20px 18px; border-radius: 16px; }
  .music-btn { bottom: 78px; right: 14px; width: 44px; height: 44px; }
  .avatar-grid { grid-template-columns: repeat(8, 1fr); }
  .check-grid { grid-template-columns: 1fr; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 13px 14px; }
  .stat-card .v { font-size: 20px; }
  .top-inner { padding: 8px 14px; }
  .page-wrap { padding: 0 14px; }
  .table th, .table td { padding: 9px 8px; }
  .list-row { flex-wrap: wrap; align-items: flex-start; }
  .list-row .grow { flex: 1 1 150px; min-width: 0; }
  .list-row > .row { flex: 1 1 100%; justify-content: flex-end; margin-top: 8px; }
  .list-row .title { white-space: normal; }
  .spread.wrap { align-items: flex-start; }
  .spread.wrap > *:first-child { flex: 1 1 100%; }
  .spread.wrap > *:not(:first-child) { flex: 0 0 auto; }
  .comment.reply { margin-left: 18px; padding-left: 8px; }
  .comment.reply .avatar { display: none; }
}
@media (max-width: 420px) {
  .item-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .userbox .btn { padding: 6px 9px; font-size: 12px; }
  .brand { font-size: 14.5px; gap: 5px; }
  .brand .bird { font-size: 19px; }
  .top-inner { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ========== 2026 书城改版 ========== */
:root { --maxw: 1180px; }
body { display: flex; flex-direction: column; min-height: 100vh; }
#app { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.main { flex: 1; }
.top { background: color-mix(in srgb, var(--card) 92%, transparent); }
.top-inner { gap: 14px; padding: 10px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; font-size: 20px; flex: none;
}
.brand-stack { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-short { display: none; }
.brand-stack b { font-size: 16px; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-stack small { font-size: 10.5px; color: var(--muted); font-weight: 500; letter-spacing: 1px; }
.top-search {
  display: flex; align-items: center; gap: 6px; flex: 0 1 290px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 14px;
}
.top-search .search-ic { font-size: 13px; opacity: .6; }
.top-search input { border: 0; background: transparent; padding: 6px 0; width: 100%; outline: none; font-size: 13px; box-shadow: none; }
.top-search input:focus { box-shadow: none; }
.top-search button { border: 0; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; flex: none; }
.nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.icon-btn {
  position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; font-size: 14px; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { color: var(--ink); border-color: var(--accent); }
.logout-top { width: auto; padding: 0 10px; border-radius: 999px; font-size: 12px; }
.badge-dot {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10px;
  line-height: 16px; text-align: center; font-weight: 800;
}
.user-chip { display: flex; align-items: center; gap: 7px; padding: 3px 8px 3px 3px; border-radius: 999px; }
.user-chip:hover { background: var(--card2); }
.nav a { padding: 7px 9px; font-size: 13.5px; }

.footer { padding: 34px 18px 96px; text-align: left; background: var(--card); margin-top: 30px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand p { margin: 6px 0 0; font-size: 12.5px; }
.footer-logo { font-size: 15px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--maxw); margin: 22px auto 0; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.footer-copy { color: var(--muted); }
.footer-cloud { max-width: var(--maxw); margin: 8px auto 0; }

.notice-ticker {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 12px;
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  border-radius: 999px; font-size: 12.5px; overflow: hidden;
}
.notice-ticker span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-banner {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13px;
}
.nb-tag { background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700; flex: none; }
.notice-banner b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-banner .nb-time { color: var(--muted); font-size: 11.5px; flex: none; }
.notice-banner em { font-style: normal; color: var(--accent); font-size: 12px; flex: none; }

.download-strip {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.ds-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; font-size: 20px; flex: none; }
.ds-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.download-strip .btn { flex: none; }

.hero-book {
  position: relative; display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 28px; row-gap: 0;
  padding: 28px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--hero); box-shadow: var(--shadow); overflow: hidden;
}
.hero-book::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none;
}
.hero-cover { position: relative; z-index: 1; display: flex; align-items: center; grid-column: 1; grid-row: 1 / span 2; }
.hero-head { position: relative; z-index: 1; min-width: 0; grid-column: 2; grid-row: 1; align-self: end; }
.hero-info { position: relative; z-index: 1; min-width: 0; grid-column: 2; grid-row: 2; align-self: start; }
.hero-kicker { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.hero-head h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 8px; letter-spacing: .5px; }
.hero-byline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.hero-info .lede {
  color: var(--muted); font-size: 14px; margin: 12px 0 0; max-width: 640px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-timer { margin-top: 14px; }
.hero-timer-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.hero-book .countdown { margin: 0; }
.hero-book .cd-unit { background: color-mix(in srgb, var(--card) 72%, transparent); }
.hero-stat { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.hero-stat b { color: var(--accent); }

.book-cover {
  position: relative; flex: none; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; border-radius: 10px; padding: 14px 12px; color: #fff;
  box-shadow: 0 10px 22px rgba(30, 20, 10, .18); border: 1px solid rgba(255, 255, 255, .18);
}
.book-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: rgba(0, 0, 0, .2); }
.book-cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .24), transparent 42%);
}
.bc-emoji { position: relative; z-index: 1; font-size: 34px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }
.bc-title {
  position: relative; z-index: 1; font-family: Georgia, "Songti SC", "SimSun", serif;
  font-weight: 800; font-size: 15px; line-height: 1.3; letter-spacing: .5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .3); display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.bc-author { position: relative; z-index: 1; font-size: 10px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-xxs { width: 38px; height: 50px; padding: 5px 4px 4px 6px; border-radius: 4px; box-shadow: 0 3px 8px rgba(0, 0, 0, .16); }
.cover-xxs .bc-emoji { font-size: 14px; }
.cover-xxs .bc-title { font-size: 8px; -webkit-line-clamp: 1; }
.cover-xxs .bc-author { display: none; }
.cover-sm { width: 58px; height: 78px; padding: 7px 6px; border-radius: 6px; }
.cover-sm .bc-emoji { font-size: 18px; }
.cover-sm .bc-title { font-size: 10px; -webkit-line-clamp: 2; }
.cover-sm .bc-author { font-size: 8px; }
.cover-md { width: 100px; height: 134px; padding: 12px 9px; }
.cover-md .bc-emoji { font-size: 26px; }
.cover-md .bc-title { font-size: 13px; }
.cover-lg { width: 150px; height: 200px; }
.cover-xl { width: 190px; height: 253px; padding: 18px 14px; border-radius: 12px; }
.cover-xl .bc-emoji { font-size: 46px; }
.cover-xl .bc-title { font-size: 20px; }
.cover-fantasy { background: linear-gradient(155deg, #2d2a5e, #6b4b9a 55%, #c78a5c); }
.cover-city { background: linear-gradient(155deg, #1e3a5f, #3b6ea5 55%, #d6a15c); }
.cover-mystery { background: linear-gradient(155deg, #1b1b24, #4a3540 55%, #8b4a3f); }
.cover-scifi { background: linear-gradient(155deg, #0e2a3a, #166b7a 55%, #7fd3c0); }
.cover-ancient { background: linear-gradient(155deg, #4a1f24, #8b3a3a 55%, #d4a373); }
.cover-xianxia { background: linear-gradient(155deg, #1f3b35, #3f6b5a 55%, #c9b37e); }
.cover-game { background: linear-gradient(155deg, #2a1d4a, #5b3a8a 55%, #e07a9a); }
.cover-anime { background: linear-gradient(155deg, #3c4d8f, #6d7fd4 55%, #f0a6c0); }
.cover-romance { background: linear-gradient(155deg, #6b2f4a, #b85c7a 55%, #f0b6a0); }
.cover-default { background: linear-gradient(155deg, #3a3a4a, #6b5b7a 55%, #c9a27a); }

.catalog-bar { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; flex-wrap: wrap; }
.cat-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; flex: 1; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  border: 0; background: transparent; color: var(--muted); padding: 7px 14px;
  border-radius: 999px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.cat-chip:hover { background: var(--card2); color: var(--ink); }
.cat-chip.on { background: var(--ink); color: var(--bg); font-weight: 700; }
.mobile-search {
  display: none; width: 100%; align-items: center; gap: 6px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 12px;
}
.mobile-search input { flex: 1; border: 0; background: transparent; box-shadow: none; padding: 6px 0; min-width: 0; }
.mobile-search button { border: 0; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.filter-tip { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 24px 0 14px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.sort-tabs { display: flex; gap: 4px; background: var(--card2); border-radius: 999px; padding: 3px; }
.sort-tabs button {
  border: 0; background: transparent; color: var(--muted); font-size: 12.5px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.sort-tabs button.on { background: var(--card); color: var(--accent); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.section-more { font-size: 12.5px; color: var(--muted); }
.section-more:hover { color: var(--accent); }

.home-main, .home-side { min-width: 0; }
.home-side { position: sticky; top: 76px; align-self: start; }
.side-timer { padding: 16px; margin-bottom: 14px; }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-top > span { font-size: 12px; color: var(--muted); }
.st-top a { font-size: 12px; color: var(--accent); }
.side-timer .countdown.mini {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 10px 0;
}
.side-timer .cd-unit { min-width: 0; padding: 5px 3px; border-radius: 6px; }
.side-timer .cd-num { font-size: 17px; }
.side-timer .cd-label { font-size: 9px; }
.st-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.book-card {
  display: flex; gap: 14px; padding: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  transition: .18s; min-width: 0;
}
.book-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.book-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bk-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bk-head h3 { margin: 0; font-size: 16px; }
.bk-author { margin-top: 5px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bk-author span { opacity: .5; }
.bk-intro { margin: 7px 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-latest { font-size: 11.5px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-latest span { color: var(--muted); }
.bk-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: auto; padding-top: 7px; }
.bk-meta b { color: var(--ink); }
.book-empty { grid-column: 1 / -1; }

.update-list { overflow: hidden; }
.update-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.update-row:last-child { border-bottom: 0; }
.update-row:hover { background: var(--card2); }
.update-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.update-row-main b { font-size: 13.5px; }
.update-row-main small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-row-time { font-size: 11.5px; color: var(--muted); flex: none; }

.rank-card { padding: 16px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.side-head h3 { font-size: 15px; margin: 0; }
.side-head span, .side-head a { font-size: 11.5px; color: var(--muted); }
.rank-book { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rank-book:last-child { border-bottom: 0; }
.rank-book-no { width: 18px; font-size: 11px; font-weight: 800; color: var(--muted); flex: none; text-align: center; }
.rank-book-no.top1 { color: var(--accent); }
.rank-book-no.top2 { color: var(--gold); }
.rank-book-no.top3 { color: var(--accent2); }
.rank-book-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rank-book-main b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-book-main small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-book em { font-style: normal; font-size: 11px; color: var(--accent); font-weight: 700; flex: none; }
.today-update { display: flex; align-items: center; gap: 7px; padding: 7px 0; font-size: 12px; border-bottom: 1px dashed var(--line); }
.today-update:last-child { border-bottom: 0; }
.today-update b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-update em { font-style: normal; color: var(--muted); font-size: 10.5px; }

.crumbs { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.crumbs a:hover { color: var(--accent); }
.work-hero { display: flex; gap: 26px; padding: 26px; }
.work-cover { flex: none; }
.work-title { font-size: clamp(26px, 3.2vw, 36px); margin: 4px 0 8px; }
.work-byline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; margin-bottom: 8px; }
.work-intro { font-size: 14px; color: var(--muted); margin: 8px 0 12px; line-height: 1.75; }
.work-timer { margin: 14px 0 4px; }
.work-hero .countdown { display: flex; gap: 8px; }
.work-hero .cd-unit { min-width: 60px; padding: 7px 6px; }
.work-hero .cd-num { font-size: 20px; }
.latest-bar {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13px;
}
.latest-bar:hover { border-color: var(--accent); }
.latest-tag { background: var(--accent); color: var(--on-accent); border-radius: 5px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; }
.latest-bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-bar em { font-style: normal; color: var(--accent); font-size: 12px; flex: none; }

.account-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 6px; min-width: 0; }
.account-side { position: sticky; top: 76px; min-width: 0; }
.account-main { min-width: 0; }
.account-card { overflow: hidden; }
.account-card { padding: 22px; text-align: center; }
.account-avatar { display: flex; justify-content: center; margin-bottom: 10px; }
.account-card h2 { margin: 0; font-size: 20px; }
.account-role { margin-top: 4px; }
.account-email { margin-top: 4px; word-break: break-all; }
.account-stats { display: flex; justify-content: center; gap: 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.account-stats b { display: block; font-size: 19px; color: var(--gold); }
.account-stats span { font-size: 10.5px; color: var(--muted); }
.account-nav {
  margin-top: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.app-mini { display: flex; align-items: center; gap: 9px; padding: 11px 12px; margin-top: 12px; }
.app-mini .ds-icon { width: 32px; height: 32px; font-size: 17px; border-radius: 9px; }
.app-mini-main { flex: 1; min-width: 0; }
.app-mini-main b { font-size: 12.5px; }
.app-mini .btn { flex: none; }
.account-tab { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: 13.5px; color: var(--muted); }
.account-tab:hover { background: var(--card2); color: var(--ink); }
.account-tab.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.account-panel { padding: 24px; }
.panel-head { margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 20px; }
.panel-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.avatar-editor {
  display: flex; gap: 18px; align-items: center; padding: 16px; border: 1px dashed var(--line);
  border-radius: 14px; background: var(--card2); margin-bottom: 18px; transition: .15s;
}
.avatar-editor.dragging { border-color: var(--accent); background: var(--accent-soft); }
.avatar-btn { padding: 0; border: 2px solid var(--card); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); cursor: pointer; background: var(--card2); }
.avatar-btn:hover { border-color: var(--accent); }
.avatar-edit-actions { flex: 1; min-width: 0; }
.file-hidden { display: none; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notify-check { margin: 8px 0 12px; }
.danger-panel { border-color: color-mix(in srgb, #c0392b 30%, var(--line)); }

.reader { --reader-font: 18px; max-width: 820px; margin: 0 auto; }
.reader-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.reader-crumb { display: flex; gap: 7px; font-size: 12.5px; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.reader-tool {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.reader-tool:hover { color: var(--accent); border-color: var(--accent); }
.reader-settings { padding: 16px 18px; margin-bottom: 12px; background: var(--card); }
.reader-settings[hidden] { display: none; }
.rs-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.rs-label { width: 34px; font-size: 12.5px; color: var(--muted); flex: none; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; background: var(--card2); padding: 3px; border-radius: 999px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--accent); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.rs-tip { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.reader-card { overflow: hidden; }
.reader-kicker { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.reader-head { padding: 26px 26px 6px; }
.reader-title { font-size: clamp(24px, 4vw, 32px); margin: 4px 0 8px; }
.reader-wm {
  margin-top: 8px; font-size: 10px; line-height: 1.5; color: var(--muted);
  opacity: .42; letter-spacing: .2px; user-select: none;
}
.reader-wm span { margin-left: 7px; opacity: .9; }
.reader-wm.bottom {
  margin: 0 0 14px; padding: 8px 26px 0; text-align: center; opacity: .34;
}
.reader-notice { margin: 10px 26px 0; }
.article { font-size: var(--reader-font); line-height: 2; padding: 8px 26px 30px; }
.article-paged { overflow: hidden; position: relative; }
.article-measure { padding: 0 !important; }
.reader-pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 26px 20px; font-size: 12.5px; color: var(--muted); }
.reader-pager[hidden] { display: none; }
.reader-pager span { min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.page-anim-next { animation: readerInNext .28s ease; }
.page-anim-prev { animation: readerInPrev .28s ease; }
.page-anim-fade { animation: readerFade .24s ease; }
@keyframes readerInNext { from { opacity: .2; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes readerInPrev { from { opacity: .2; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes readerFade { from { opacity: .2; } to { opacity: 1; } }
.reader-theme-sepia { background: #f3e7cf; border-radius: 18px; padding: 14px; margin: -14px auto; }
.reader-theme-sepia .card { background: #fbf3e3; border-color: #e6d6b8; }
.reader-theme-sepia .article { color: #4a3b2a; }
.reader-theme-night { background: #111; border-radius: 18px; padding: 14px; margin: -14px auto; }
.reader-theme-night .card { background: #1b1b1b; border-color: #2b2b2b; box-shadow: none; }
.reader-theme-night .article, .reader-theme-night .reader-title, .reader-theme-night .small, .reader-theme-night .muted { color: #c9c9c9; }
.reader-theme-night .reader-head .muted, .reader-theme-night .reader-kicker { color: #9a9a9a; }
.reader-theme-night .reader-tool { background: #1b1b1b; border-color: #333; color: #bbb; }
.reader-theme-night .seg { background: #242424; }
.reader-theme-night .seg button.on { background: #333; color: #ffd166; }
.reader-theme-night .reader-settings { background: #1b1b1b; }

@media (max-width: 980px) {
  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-book { grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
  .cover-xl { width: 150px; height: 200px; }
  .top-search { flex-basis: 220px; }
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { position: static; }
}
@media (max-width: 520px) {
  .section-head { align-items: flex-start; flex-wrap: wrap; }
  .section-head > div:first-child { flex: 1 1 100%; }
  .sort-tabs { max-width: 100%; overflow-x: auto; }
}
@media (max-width: 860px) {
  .top-search { display: none; }
  .mobile-search { display: flex; }
  .catalog-bar { gap: 6px; }
  .account-shell { grid-template-columns: minmax(0, 1fr); }
  .account-side { position: static; }
  .account-nav { flex-direction: row; flex-wrap: wrap; overflow: visible; white-space: normal; max-width: 100%; }
  .account-tab { flex: 1 1 42%; justify-content: center; padding: 8px 6px; font-size: 12.5px; }
  .avatar-grid { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
}
@media (max-width: 760px) {
  .brand-stack small { display: none; }
  .brand-stack b { font-size: 14.5px; }
  .hero-book {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px; row-gap: 10px; padding: 16px;
  }
  .hero-cover { grid-column: 1; grid-row: 1; justify-content: flex-start; align-items: flex-start; }
  .hero-head { grid-column: 2; grid-row: 1; align-self: center; }
  .hero-info { grid-column: 1 / -1; grid-row: 2; }
  .hero-book .cover-xl { width: 96px; height: 128px; }
  .hero-book .cover-xl .bc-title { font-size: 12px; }
  .hero-head h1 { font-size: 21px; margin: 4px 0 6px; line-height: 1.25; }
  .hero-kicker { margin-bottom: 6px; gap: 5px; }
  .hero-kicker .pill { font-size: 10px; padding: 2px 7px; }
  .hero-byline { font-size: 11.5px; gap: 5px; }
  .hero-info .lede { font-size: 12.5px; margin: 0 0 10px; }
  .hero-timer { margin-top: 0; }
  .hero-timer-label { font-size: 10.5px; margin-bottom: 4px; }
  .hero-book .countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .hero-book .cd-unit { padding: 5px 4px; }
  .hero-book .cd-num { font-size: 18px; }
  .hero-book .cd-label { font-size: 9px; }
  .hero-actions { margin-top: 12px; gap: 8px; }
  .hero-stat { font-size: 11px; margin-top: 9px; line-height: 1.5; }
  .book-card { padding: 12px; gap: 11px; }
  .cover-md { width: 82px; height: 110px; }
  .bk-head h3 { font-size: 15px; }
  .work-hero { padding: 18px; gap: 16px; flex-direction: column; align-items: flex-start; }
  .work-head .info { min-width: 0; width: 100%; }
  .work-cover { width: 100%; }
  .work-cover .cover-xl { width: 100px; height: 134px; }
  .work-title { font-size: 24px; }
  .work-stats { grid-template-columns: repeat(3, 1fr); }
  .account-panel { padding: 18px; }
  .avatar-editor { flex-direction: column; align-items: flex-start; }
  .form-two { grid-template-columns: 1fr; }
  .reader-head { padding: 20px 20px 4px; }
  .reader-notice { margin: 10px 20px 0; }
  .article { padding: 6px 20px 24px; }
  .reader-pager { padding: 0 20px 18px; }
  .reader-theme-sepia, .reader-theme-night { padding: 8px; margin: -8px auto; }
  .footer { padding-bottom: 86px; }
}
@media (max-width: 760px) {
  .logout-top { display: none; }
}
@media (max-width: 640px) {
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .login-top { font-size: 12px; padding: 6px 10px; }
  .app-mini #dlInfo { display: none; }
}
@media (max-width: 420px) {
  .hero-book .hero-actions .btn { flex: 1; }
  .cover-md { width: 74px; height: 99px; }
  .book-card { gap: 9px; padding: 10px; }
  .sort-tabs button { padding: 5px 9px; font-size: 11.5px; }
  .section-head h2 { font-size: 18px; }
  .download-strip { padding: 8px 10px; gap: 8px; }
  .download-strip .ds-icon { width: 32px; height: 32px; font-size: 17px; }
  .download-strip #dlInfo { display: none; }
  .download-strip .btn { padding: 5px 10px; font-size: 12px; }
  .notice-banner { gap: 7px; padding: 9px 11px; }
  .notice-banner .nb-time { display: none; }
  .notice-banner em { font-size: 11px; }
}

/* ========== 简洁版：社区 / 设置二级目录 / 底部导航 ========== */
.community-head { margin-bottom: 10px; }
.community-head h1 { margin: 0; font-size: 24px; }
.community-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.community-tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.community-tabs::-webkit-scrollbar { display: none; }
.community-tabs a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--muted); font-size: 13px; white-space: nowrap;
}
.community-tabs a.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }

.profile-menu { padding: 6px; align-self: start; }
.profile-link {
  display: flex; align-items: center; gap: 12px; padding: 15px 14px;
  border-bottom: 1px solid var(--line); border-radius: 10px; transition: .15s;
}
.profile-link:last-child { border-bottom: 0; }
.profile-link:hover { background: var(--card2); }
.pl-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--card2);
  display: grid; place-items: center; font-size: 17px; flex: none;
}
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-main b { font-size: 14px; }
.pl-main small { font-size: 11.5px; color: var(--muted); }
.profile-link em { font-style: normal; color: var(--muted); font-size: 20px; line-height: 1; }

.settings-head { margin-bottom: 16px; }
.back-link { font-size: 12.5px; color: var(--muted); }
.back-link:hover { color: var(--accent); }
.settings-head h1 { margin: 6px 0 2px; font-size: 24px; }
.settings-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.settings-list { overflow: hidden; max-width: 620px; }
.settings-item {
  display: flex; align-items: center; gap: 13px; padding: 16px 18px;
  border-bottom: 1px solid var(--line); transition: .15s;
}
.settings-item:last-child { border-bottom: 0; }
.settings-item:hover { background: var(--card2); }
.si-icon {
  width: 38px; height: 38px; border-radius: 11px; background: var(--card2);
  display: grid; place-items: center; font-size: 18px; flex: none;
}
.si-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.si-main b { font-size: 14px; }
.si-main small { font-size: 11.5px; color: var(--muted); }
.settings-item em { font-style: normal; color: var(--muted); font-size: 20px; line-height: 1; }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-layout .account-nav { margin-top: 0; }

.bottomnav { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.bottomnav a { font-size: 10.5px; gap: 3px; padding: 3px 0; }
.bottomnav .ic { display: grid; place-items: center; width: 22px; height: 22px; }
.bottomnav .ic svg {
  width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.bottomnav a.on .ic svg { stroke: var(--accent); }

@media (max-width: 860px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .profile-menu { padding: 4px; }
  .profile-link { padding: 13px 11px; }
  .settings-item { padding: 14px; }
}

/* ========== 去卡通化：更接近成熟小说站的克制视觉 ========== */
[data-skin="paper"] {
  --bg: #f5f5f6; --bg2: #ededef; --card: #ffffff; --card2: #f7f7f8;
  --ink: #202327; --muted: #72767d; --line: #e4e5e8;
  --accent: #c24b36; --accent2: #a83e2c; --accent-soft: #f7e9e5; --on-accent: #fff;
  --gold: #96702a; --gold-soft: #f6efdf;
  --hero: linear-gradient(135deg, #ffffff 0%, #fbf8f5 60%, #f6f0eb 100%);
  --tag: #f0f1f2;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 20, 20, .045);
}
.card { border-radius: 10px; box-shadow: var(--shadow); }
.btn { border-radius: 8px; }
.btn.sm { border-radius: 6px; }
.pill { border-radius: 4px; padding: 2px 8px; font-size: 11px; }
.brand-mark {
  background: var(--ink); color: var(--bg); border-radius: 6px;
  font-family: Georgia, "Songti SC", "SimSun", serif; font-weight: 700; font-size: 18px;
}
.top-search { border-radius: 8px; }
.top-search button { border-radius: 6px; }
.nav a { border-radius: 0; padding: 8px 10px; }
.nav a:hover { background: transparent; color: var(--ink); }
.nav a.on {
  background: transparent; color: var(--accent); border-radius: 0;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.hero-book {
  border-radius: 12px; box-shadow: none; background: var(--card);
  border: 1px solid var(--line);
}
.hero-book::after { display: none; }
.hero-actions .btn { border-radius: 8px; }
.urge-btn { font-size: 15px; padding: 10px 22px; border-radius: 8px; }
.book-cover {
  border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  justify-content: center;
}
.bc-title { margin: 0; }
.bc-author { position: absolute; left: 10px; bottom: 9px; }
.cover-xl, .cover-lg, .cover-md { border-radius: 4px; }
.bc-genre {
  position: absolute; z-index: 1; top: 10px; left: 10px;
  font-size: 9px; letter-spacing: 1px; opacity: .8;
  border: 1px solid rgba(255, 255, 255, .35); padding: 1px 5px; border-radius: 2px;
}
.bc-title {
  margin-bottom: 6px; font-size: 16px; line-height: 1.28;
  -webkit-line-clamp: 4; letter-spacing: .3px;
}
.bc-author { font-size: 9.5px; opacity: .72; }
.cover-xxs { border-radius: 2px; padding: 5px 4px 4px 6px; }
.cover-xxs .bc-genre { display: none; }
.cover-xxs .bc-title { font-size: 8px; line-height: 1.2; -webkit-line-clamp: 2; }
.cover-xxs .bc-author { display: none; }
.cover-sm .bc-genre { display: none; }
.cover-sm .bc-title { font-size: 10px; -webkit-line-clamp: 3; }
.cover-md .bc-title { font-size: 14px; }
.cover-xl .bc-title { font-size: 20px; }
.cover-fantasy { background: linear-gradient(160deg, #2f3542, #4b5263 55%, #7d6b5d); }
.cover-city { background: linear-gradient(160deg, #263238, #37474f 55%, #6d5b4a); }
.cover-mystery { background: linear-gradient(160deg, #1c1c1e, #3a3030 55%, #5a3f3a); }
.cover-scifi { background: linear-gradient(160deg, #102a33, #1f4a53 55%, #4f7a78); }
.cover-ancient { background: linear-gradient(160deg, #3a2622, #5a3b32 55%, #8a6a4a); }
.cover-xianxia { background: linear-gradient(160deg, #24352e, #3f5a4a 55%, #7a7a5a); }
.cover-game { background: linear-gradient(160deg, #2a2438, #463a5a 55%, #6a4a6a); }
.cover-anime { background: linear-gradient(160deg, #3a3f5a, #5a6280 55%, #8a7a8a); }
.cover-romance { background: linear-gradient(160deg, #4a2f38, #6d4a55 55%, #8a6a6a); }
.cover-default { background: linear-gradient(160deg, #33363a, #4a4e54 55%, #6d6258); }
.book-card { border-radius: 8px; box-shadow: none; }
.book-card:hover { transform: none; border-color: #cfd1d5; }
.section-head h2 { position: relative; padding-left: 10px; font-size: 18px; }
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 2px; background: var(--accent);
}
.side-head h3 { position: relative; padding-left: 9px; }
.side-head h3::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 2px; background: var(--accent);
}
.sort-tabs { border-radius: 6px; }
.sort-tabs button { border-radius: 4px; }
.cat-chip { border-radius: 6px; }
.cat-chip.on { background: var(--ink); color: var(--bg); border-radius: 6px; }
.pl-icon, .si-icon {
  border-radius: 8px; color: var(--muted); font-weight: 700;
  font-size: 14px; font-family: Georgia, "Songti SC", "SimSun", serif;
}
.profile-link, .settings-item { border-radius: 6px; }
.community-tabs a { border-radius: 6px; }
.account-tab { border-radius: 6px; }
.account-card, .profile-menu, .settings-list { border-radius: 10px; }
.comment.author-comment {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding-left: 12px;
}
.comment.author-comment .head b { color: var(--accent); }
.notice-ticker {
  border-radius: 6px; background: var(--card2); border-color: var(--line);
  color: var(--muted); padding: 8px 12px;
}
.nt-tag {
  flex: none; font-size: 10px; font-weight: 700; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 3px; padding: 1px 6px; letter-spacing: 1px;
}
.footer-logo { font-family: Georgia, "Songti SC", "SimSun", serif; }
@media (max-width: 760px) {
  .hero-book { border-radius: 10px; }
  .book-cover { border-radius: 3px; }
}

/* ========== 商店 ========== */
.shop-page { max-width: 1040px; margin: 0 auto; }
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.shop-head h1 { margin: 0; font-size: 26px; }
.shop-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.balance-card {
  flex: none; min-width: 120px; padding: 10px 16px; text-align: right;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
.balance-card span { display: block; font-size: 11px; color: var(--muted); }
.balance-card b { display: block; font-size: 23px; color: var(--gold); line-height: 1.25; }
.balance-card .btn { margin-top: 5px; }
.shop-status { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin: -8px 0 18px; }
.shop-status b { color: var(--accent); }
.shop-section { margin-bottom: 28px; }
.shop-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.shop-section-head h2 { margin: 0; font-size: 18px; }
.shop-section-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-card {
  display: flex; flex-direction: column; padding: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; min-width: 0;
}
.shop-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--card2);
  display: grid; place-items: center; font-size: 22px; margin-bottom: 10px;
}
.shop-main h3 { margin: 0; font-size: 14.5px; }
.shop-main p { margin: 5px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; min-height: 36px; }
.shop-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.shop-buy b { font-size: 12.5px; color: var(--gold); }
.shop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.skin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skin-card {
  display: flex; gap: 12px; padding: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; min-width: 0;
}
.skin-card.active { border-color: var(--accent); }
.skin-preview {
  width: 74px; height: 96px; flex: none; border-radius: 6px;
  border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center;
}
.skin-preview img { width: 82%; height: 82%; object-fit: contain; }
.skin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.skin-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.skin-title h3 { margin: 0; font-size: 14px; }
.skin-main p { margin: 5px 0; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.skin-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.skin-foot b { font-size: 12px; color: var(--gold); }

@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skin-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .shop-head { align-items: flex-start; }
  .shop-head h1 { font-size: 23px; }
  .shop-grid { grid-template-columns: minmax(0, 1fr); }
  .shop-status { gap: 10px; }
  .shop-card {
    display: grid; grid-template-columns: 44px minmax(0, 1fr);
    gap: 4px 12px; padding: 12px;
  }
  .shop-icon { grid-row: 1 / span 2; grid-column: 1; margin: 0; }
  .shop-main { grid-column: 2; }
  .shop-main p { min-height: 0; }
  .shop-buy { grid-column: 2; padding-top: 6px; }
  .balance-card { min-width: 96px; padding: 8px 12px; }
  .balance-card b { font-size: 20px; }
}
@media (max-width: 420px) {
  .shop-head { flex-direction: column; align-items: stretch; }
  .balance-card { display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .balance-card span, .balance-card b { display: inline; }
}

/* ========== 每日催更弹窗 ========== */
.daily-urge .du-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.daily-urge .du-kicker { font-size: 11px; color: var(--accent); letter-spacing: 1px; }
.daily-urge .du-head h3 { margin: 5px 0 0; font-size: 20px; }
.du-main {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0 12px; margin: 12px 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.du-timer > span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.du-timer .countdown.mini { margin: 0; }
.du-count { text-align: right; flex: none; }
.du-count b { display: block; font-size: 26px; color: var(--accent); line-height: 1.1; }
.du-count span { font-size: 10.5px; color: var(--muted); }
.du-list { max-height: 40vh; overflow: auto; margin: 8px 0 4px; }
.du-work {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.du-work:last-child { border-bottom: 0; }
.du-work input { flex: none; accent-color: var(--accent); }
.du-work .book-cover { flex: none; }
.du-work-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.du-work-main b { font-size: 13px; }
.du-work-main small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.du-work em { flex: none; font-style: normal; font-size: 10.5px; color: var(--muted); }
.du-tip { font-size: 11px; color: var(--muted); margin: 4px 0 12px; }
.du-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.du-actions .btn { flex: 0 0 auto; }
@media (max-width: 520px) {
  .du-work em { display: none; }
  .du-actions .btn { flex: 1; }
}

/* ========== 阅读设置增强 ========== */
.watermark-layer { z-index: 20; }
.reader { --reader-line: 2; --reader-dim: 0; }
.reader-topline, .reader-settings { position: relative; z-index: 30; }
.reader-dim {
  position: fixed; inset: 0; background: #000; opacity: var(--reader-dim);
  pointer-events: none; z-index: 25; transition: opacity .2s;
}
.article { line-height: var(--reader-line, 2); }
.reader-font-serif .article { font-family: Georgia, "Songti SC", "STSong", "SimSun", serif; }
.reader-font-sans .article { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.font-stepper {
  display: flex; align-items: center; gap: 4px; background: var(--card2);
  border-radius: 999px; padding: 3px;
}
.font-stepper button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px;
}
.font-stepper button:hover { background: var(--card); color: var(--ink); }
.font-stepper span {
  min-width: 28px; text-align: center; font-weight: 700;
  font-size: 12.5px; color: var(--ink);
}
.reader-brightness {
  flex: 1; min-width: 76px; max-width: 180px; accent-color: var(--accent); padding: 0;
  background: transparent; border: 0; box-shadow: none;
}
.rs-value { font-size: 12px; color: var(--muted); min-width: 36px; flex: none; }
.rs-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.page-anim-cover { animation: readerCover .28s ease; }
@keyframes readerCover {
  from { opacity: .35; transform: translateX(18px) scale(.995); }
  to { opacity: 1; transform: none; }
}
.reader-theme-green { background: #e7f1e4; border-radius: 18px; padding: 14px; margin: -14px auto; }
.reader-theme-green .card { background: #f8fcf5; border-color: #d7e6d1; }
.reader-theme-green .article { color: #31402d; }
.reader-theme-night .reader-settings { background: #1b1b1b; }
@media (min-width: 760px) {
  .reader-settings { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
  .reader-settings .rs-foot { grid-column: 1 / -1; }
}

/* ========== 催更页 ========== */
.continue-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
.cb-label {
  flex: none; font-size: 10.5px; font-weight: 700; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 3px; padding: 2px 7px;
}
.cb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-main b { font-size: 13.5px; }
.cb-main small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-bar em { font-style: normal; font-size: 11.5px; color: var(--muted); flex: none; }
.urge-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.urge-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.urge-tabs a {
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--muted); font-size: 12.5px;
}
.urge-tabs a.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.urge-goal { max-width: 420px; margin: 12px 0 2px; }
.ug-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 11.5px; color: var(--muted); }
.ug-head b { color: var(--accent); font-weight: 600; }
.ug-bar { height: 5px; background: var(--card2); border-radius: 3px; overflow: hidden; }
.ug-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.reader-progress { height: 3px; background: var(--card2); overflow: hidden; }
.reader-progress i { display: block; height: 100%; background: var(--accent); }
.reader-catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.reader-catalog-head h3 { margin: 0; }
.reader-catalog-head span { font-size: 12px; color: var(--muted); }
.reader-catalog { max-height: 55vh; overflow: auto; border-top: 1px solid var(--line); }
.reader-catalog a { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.reader-catalog a span { width: 26px; flex: none; text-align: right; font-size: 11px; color: var(--muted); }
.reader-catalog a b { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-catalog a em { flex: none; font-style: normal; font-size: 11px; color: var(--muted); }
.reader-catalog a.on b { color: var(--accent); font-weight: 700; }
.urge-head h1 { margin: 0; font-size: 26px; }
.urge-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.urge-head-timer { flex: none; text-align: right; }
.urge-head-timer > span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.urge-head-timer .countdown.mini { justify-content: flex-end; }
.urge-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 16px 18px; margin-bottom: 16px; text-align: center;
}
.urge-summary b { display: block; font-size: 24px; color: var(--accent); line-height: 1.2; }
.urge-summary span { font-size: 11.5px; color: var(--muted); }
.urge-list { display: flex; flex-direction: column; gap: 12px; }
.urge-item { display: flex; align-items: center; gap: 16px; padding: 16px; }
.urge-main { flex: 1; min-width: 0; }
.urge-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.urge-title h2 { margin: 0; font-size: 17px; }
.urge-title h2 a:hover { color: var(--accent); }
.urge-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.urge-timer { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.urge-timer > span { font-size: 11.5px; color: var(--muted); flex: none; }
.countdown.mini { display: flex; gap: 5px; margin: 0; }
.countdown.mini .cd-unit { min-width: 42px; padding: 3px 5px; border-radius: 7px; }
.countdown.mini .cd-num { font-size: 15px; }
.countdown.mini .cd-label { font-size: 9px; }
.urge-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 7px; font-size: 11.5px; color: var(--muted); }
.urge-side { flex: none; }
.urge-big { min-width: 112px; padding: 11px 18px; font-size: 14px; }
.bottomnav { align-items: flex-end; padding-top: 16px; }
.bottomnav a[href="#/urge"] { position: relative; color: var(--accent); font-weight: 700; }
.bottomnav a[href="#/urge"] .ic {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--card);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
  margin-top: -22px; display: grid; place-items: center;
}
.bottomnav a[href="#/urge"] .ic svg { width: 24px; height: 24px; stroke: var(--on-accent); }
.bottomnav a[href="#/urge"] > span:last-child { color: var(--accent); font-weight: 700; }
.main { padding-bottom: 96px; }
@media (max-width: 640px) {
  .urge-item { flex-wrap: wrap; gap: 11px; padding: 14px; align-items: flex-start; }
  .urge-item .cover-sm { width: 48px; height: 65px; }
  .urge-main { flex: 1 1 calc(100% - 60px); }
  .urge-side { flex: 1 1 100%; width: 100%; }
  .urge-big { width: 100%; }
  .urge-summary { padding: 13px 8px; grid-template-columns: 1fr 1fr; }
  .urge-summary b { font-size: 20px; }
  .urge-head { flex-wrap: wrap; }
  .urge-head h1 { font-size: 23px; }
  .urge-head-timer { text-align: left; }
  .urge-head-timer .countdown.mini { justify-content: flex-start; }
  .reader-theme-green { padding: 8px; margin: -8px auto; }
}

/* ========== 沉浸式阅读器（番茄小说风格） ========== */
body.reader-active {
  background: var(--rd-bg, #f7f4ee);
  overscroll-behavior-y: contain;
}
body.reader-active[data-reader-theme="sepia"] { background: #f3e7cf; }
body.reader-active[data-reader-theme="green"] { background: #e7f1e4; }
body.reader-active[data-reader-theme="night"] { background: #121212; }
body.reader-active .top,
body.reader-active .footer,
body.reader-active .bottomnav,
body.reader-active .music-btn,
body.reader-active .watermark-layer { display: none !important; }
body.reader-active .main { max-width: none; padding: 0; }
body.reader-active .page-wrap { max-width: none; padding: 0; }
body.reader-active .reader {
  --rd-bg: #f7f4ee;
  --rd-bar: rgba(247, 244, 238, .96);
  --rd-ink: #2a2622;
  --rd-muted: #8b8378;
  --rd-line: #e6e0d4;
  position: relative;
  max-width: none;
  margin: 0;
  min-height: 100dvh;
  padding: 52px 0 58px;
  background: var(--rd-bg);
  color: var(--rd-ink);
}
body.reader-active .reader-theme-sepia {
  --rd-bg: #f3e7cf; --rd-bar: rgba(243, 231, 207, .96);
  --rd-ink: #4a3b2a; --rd-muted: #8d7a5f; --rd-line: #e2d2b4;
  background: var(--rd-bg);
}
body.reader-active .reader-theme-green {
  --rd-bg: #e7f1e4; --rd-bar: rgba(231, 241, 228, .96);
  --rd-ink: #31402d; --rd-muted: #708368; --rd-line: #d3e2cd;
  background: var(--rd-bg);
}
body.reader-active .reader-theme-night {
  --rd-bg: #121212; --rd-bar: rgba(24, 24, 24, .97);
  --rd-ink: #c9c9c9; --rd-muted: #8d8d8d; --rd-line: #2c2c2c;
  background: var(--rd-bg);
}
body.reader-active .reader-card {
  max-width: 760px;
  margin: 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
body.reader-active .reader-theme-night .reader-card { background: transparent; }
body.reader-active .reader-progress {
  max-width: 760px; margin: 0 auto 4px; height: 2px; background: transparent;
}
body.reader-active .reader-progress i { background: color-mix(in srgb, var(--accent) 70%, transparent); }
body.reader-active .reader-head { padding: 20px 24px 4px; }
body.reader-active .reader-title { color: var(--rd-ink); }
body.reader-active .reader-kicker { color: var(--rd-muted); }
body.reader-active .reader-notice {
  margin: 12px 24px 0; padding: 8px 10px; font-size: 11px;
  background: color-mix(in srgb, var(--rd-ink) 4%, transparent);
  border: 0; color: var(--rd-muted);
}
body.reader-active .article {
  max-width: 760px; margin: 0 auto; padding: 10px 24px 28px;
  color: var(--rd-ink);
}
body.reader-active .reader-pager { color: var(--rd-muted); }
body.reader-active .chapter-nav { padding-left: 24px; padding-right: 24px; }
body.reader-active .reader-comments { max-width: 760px; margin: 0 auto; padding: 0 16px; }
body.reader-active .reader-comments .section-title { margin-top: 22px; }
body.reader-active .reader-wm { color: var(--rd-muted); }

.reader-bar {
  position: fixed; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center;
  background: var(--rd-bar, rgba(247, 244, 238, .96));
  color: var(--rd-ink, #2a2622);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .24s ease, opacity .24s ease;
}
.reader-bar-top {
  top: 0; height: 52px; padding: 0 10px;
  border-bottom: 1px solid var(--rd-line, #e6e0d4);
}
.reader-bar-bottom {
  bottom: 0; min-height: 56px; padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rd-line, #e6e0d4);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.reader-back {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  font-size: 30px; line-height: 1; color: var(--rd-ink, #2a2622);
  border-radius: 10px; padding-bottom: 5px;
}
.reader-back:hover { background: color-mix(in srgb, var(--rd-ink) 7%, transparent); }
.reader-bar-title {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  padding: 0 4px; line-height: 1.3;
}
.reader-bar-title b {
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.reader-bar-title span {
  font-size: 10.5px; color: var(--rd-muted, #8b8378); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.reader-bar-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--rd-ink, #2a2622); font-size: 12.5px; font-family: inherit;
  padding: 9px 6px; border-radius: 9px; text-align: center; white-space: nowrap;
  display: flex; align-items: center; justify-content: center; min-width: 0;
}
.reader-bar-btn:hover { background: color-mix(in srgb, var(--rd-ink) 7%, transparent); }
.reader-bar-top .reader-bar-btn { flex: none; width: 54px; font-size: 12px; }
.reader-bar-btn.strong { color: var(--accent); font-weight: 700; }
.reader-bar-btn.disabled { opacity: .32; pointer-events: none; }

.reader-chrome-hidden .reader-bar-top { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.reader-chrome-hidden .reader-bar-bottom { transform: translateY(100%); opacity: 0; pointer-events: none; }
.reader-chrome-hidden { --reader-chrome-off: 1; }

.reader-sheet-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, .34);
  backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px);
  animation: readerMaskIn .18s ease;
}
.reader-sheet-mask[hidden] { display: none; }
@keyframes readerMaskIn { from { opacity: 0; } to { opacity: 1; } }

body.reader-active .reader-settings {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  z-index: 90; width: min(680px, 100%);
  max-height: 82dvh; overflow: auto; margin: 0;
  padding: 16px 20px calc(18px + env(safe-area-inset-bottom));
  background: var(--rd-bg, #f7f4ee);
  color: var(--rd-ink, #2a2622);
  border: 1px solid var(--rd-line, #e6e0d4);
  border-bottom: 0; border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 44px rgba(0, 0, 0, .18);
  animation: readerSheetUp .22s ease;
}
body.reader-active .reader-settings[hidden] { display: none; }
@keyframes readerSheetUp { from { transform: translate(-50%, 18px); opacity: .4; } to { transform: translate(-50%, 0); opacity: 1; } }
.rs-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--rd-line, #e6e0d4);
}
.rs-head b { font-size: 15px; }
.rs-close {
  border: 0; background: transparent; color: var(--accent);
  font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 4px;
}
body.reader-active .reader-settings .seg { background: color-mix(in srgb, var(--rd-ink) 6%, transparent); }
body.reader-active .reader-settings .seg button.on { background: var(--rd-bg, #fff); color: var(--accent); }
body.reader-active .reader-settings .font-stepper { background: color-mix(in srgb, var(--rd-ink) 6%, transparent); }
body.reader-active .reader-settings .font-stepper span { color: var(--rd-ink); }
body.reader-active .reader-settings .font-stepper button { color: var(--rd-muted); }
body.reader-active .reader-settings .font-stepper button:hover { background: var(--rd-bg); color: var(--rd-ink); }
body.reader-active .reader-settings .rs-label { color: var(--rd-muted); }

.reader-more-sheet {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.reader-more-sheet[hidden] { display: none; }
.reader-more-panel {
  pointer-events: auto; width: min(680px, 100%);
  max-height: 82dvh; overflow: auto;
  background: var(--rd-bg, #f7f4ee); color: var(--rd-ink, #2a2622);
  border: 1px solid var(--rd-line, #e6e0d4); border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 44px rgba(0, 0, 0, .18);
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  animation: readerSheetUp2 .22s ease;
}
@keyframes readerSheetUp2 { from { transform: translateY(18px); opacity: .4; } to { transform: none; opacity: 1; } }
.reader-more-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0 4px 10px; border-bottom: 1px solid var(--rd-line, #e6e0d4);
}
.reader-more-head b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-more-close {
  border: 0; background: transparent; color: var(--accent);
  font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 2px; flex: none;
}
.reader-more-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; padding-top: 12px;
}
.reader-more-item {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 3px; min-height: 48px;
  padding: 13px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--rd-line, #e6e0d4);
  background: color-mix(in srgb, var(--rd-ink) 3%, transparent);
  color: var(--rd-ink, #2a2622); font-family: inherit; text-align: left;
}
.reader-more-item:hover { border-color: var(--accent); }
.reader-more-item b { font-size: 13.5px; font-weight: 600; }
.reader-more-item span { font-size: 10.5px; color: var(--rd-muted, #8b8378); line-height: 1.4; }
.reader-more-item.danger b { color: #c0392b; }

@media (min-width: 760px) {
  body.reader-active .reader-settings { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  body.reader-active .reader-settings[hidden] { display: none; }
  body.reader-active .reader-settings .rs-head,
  body.reader-active .reader-settings .rs-foot { grid-column: 1 / -1; }
}
/* 手机首页：搜索前置、分类换行、去掉重复计时器 */
@media (max-width: 860px) {
  .catalog-bar .mobile-search { order: -1; }
  .cat-scroll { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
  .cat-chip { padding: 6px 12px; }
}
@media (max-width: 900px) {
  .home-side { margin-top: 18px; }
  .home-side .side-timer { display: none; }
}
@media (max-width: 640px) {
  .footer { padding: 20px 14px 92px; margin-top: 22px; }
  .footer-brand p { display: none; }
  .footer-bottom { font-size: 11px; line-height: 1.7; }
  .footer-cloud { margin-top: 6px; }
  .section-head { margin: 20px 0 12px; }
}

@media (max-width: 560px) {
  .reader-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.reader-active .reader-head { padding: 16px 18px 4px; }
  body.reader-active .article { padding: 8px 18px 24px; }
  body.reader-active .reader-notice { margin: 10px 18px 0; }
  body.reader-active .reader-comments { padding: 0 12px; }
  body.reader-active .chapter-nav { padding-left: 18px; padding-right: 18px; }
  .reader-bar-title b { font-size: 12.5px; }
  .reader-bar-title span { font-size: 10px; }
  .reader-bar-btn { font-size: 12px; }
}

/* ========== 番茄小说式阅读器 v2 ========== */
body.reader-active .reader {
  --rd-bg: #f3ecd9;
  --rd-bar: rgba(243, 236, 217, .97);
  --rd-panel: #f7f1e2;
  --rd-card: #f8f2e4;
  --rd-btn: #ece4d0;
  --rd-ink: #2e2920;
  --rd-muted: #8d826c;
  --rd-line: #e3d8bf;
  border-radius: 0;
  padding: 50px 0 12px;
  background: var(--rd-bg);
  color: var(--rd-ink);
}
body.reader-active .reader-theme-default {
  --rd-bg: #f3ecd9; --rd-bar: rgba(243, 236, 217, .97); --rd-panel: #f7f1e2;
  --rd-card: #f8f2e4; --rd-btn: #ece4d0;
  --rd-ink: #2e2920; --rd-muted: #8d826c; --rd-line: #e3d8bf;
  background: var(--rd-bg);
}
body.reader-active .reader-theme-sepia {
  --rd-bg: #efe3c6; --rd-bar: rgba(239, 227, 198, .97); --rd-panel: #f4ead2;
  --rd-card: #f6edd9; --rd-btn: #e8dcc1;
  --rd-ink: #493b29; --rd-muted: #8d7a5f; --rd-line: #e0d0ae;
  background: var(--rd-bg);
}
body.reader-active .reader-theme-green {
  --rd-bg: #e8f0e3; --rd-bar: rgba(232, 240, 227, .97); --rd-panel: #eff5eb;
  --rd-card: #f2f7ee; --rd-btn: #e4eee0;
  --rd-ink: #31402d; --rd-muted: #708368; --rd-line: #d3e2cd;
  background: var(--rd-bg);
}
body.reader-active .reader-theme-night {
  --rd-bg: #121212; --rd-bar: rgba(18, 18, 18, .97); --rd-panel: #1b1b1b;
  --rd-card: #1d1d1d; --rd-btn: #262626;
  --rd-ink: #c9c9c9; --rd-muted: #8d8d8d; --rd-line: #2c2c2c;
  background: var(--rd-bg);
}
body.reader-active .reader:not(.reader-chrome-hidden) { padding-bottom: 140px; }
.reader[data-reader-mode="page"]:not(.reader-at-end) .thanks-box,
.reader[data-reader-mode="page"]:not(.reader-at-end) .chapter-nav,
.reader[data-reader-mode="page"]:not(.reader-at-end) .reader-endcard,
.reader[data-reader-mode="page"]:not(.reader-at-end) .chapter-end,
.reader[data-reader-mode="page"]:not(.reader-at-end) .reader-comments,
.reader[data-reader-mode="page"]:not(.reader-at-end) .reader-wm.bottom { display: none; }

/* 章节标题只在第 1 页占位置，后续页面从顶部开始排正文 */
.reader[data-reader-mode="page"]:not(.reader-first-page) .reader-head { display: none; }

/* 翻到最后一页时取消固定页高，让章末卡片紧接正文出现 */
body.reader-active .reader.reader-at-end #articleBody { height: auto !important; overflow: visible; }

/* 沉浸态：只留章节标题与催更 */
.reader-mini-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 58;
  height: 46px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; background: var(--rd-bg); color: var(--rd-ink);
  transition: opacity .2s ease, visibility .2s ease;
}
.reader:not(.reader-chrome-hidden) .reader-mini-top { opacity: 0; visibility: hidden; pointer-events: none; }
.reader-mini-title {
  flex: 1; min-width: 0; font-size: 14px; color: var(--rd-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reader-coin {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 13px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); font-size: 12px; font-weight: 700; font-family: inherit;
  cursor: pointer; white-space: nowrap;
}
.reader-coin:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.reader-coin:disabled { opacity: .6; cursor: default; }
.reader-private-pill { cursor: default; opacity: .78; }
.reader-private-label {
  font-size: 12px; color: var(--rd-muted); padding: 0 8px; white-space: nowrap;
}

/* 完整顶栏 */
body.reader-active .reader-bar-top {
  height: 48px; padding: 0 6px;
  background: var(--rd-bar); border-bottom: 0;
}
.reader-top-actions {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 1px;
}
.reader-top-text {
  border: 0; background: transparent; color: var(--rd-ink);
  font-size: 14.5px; font-family: inherit; padding: 8px 9px; cursor: pointer;
  white-space: nowrap;
}
.reader-top-icon {
  position: relative; width: 38px; height: 38px; flex: none;
  border: 0; background: transparent; color: var(--rd-ink);
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
}
.reader-top-icon:hover, .reader-top-text:hover { background: color-mix(in srgb, var(--rd-ink) 7%, transparent); }
.reader-top-icon svg {
  width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.reader-top-icon svg.dots { fill: currentColor; stroke: none; }
.reader-icon-badge {
  position: absolute; top: 2px; right: 0; min-width: 15px; height: 15px;
  padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff;
  font-size: 8.5px; line-height: 15px; font-weight: 600; text-align: center;
}

/* 章节标题区 */
body.reader-active .reader-head { max-width: 760px; margin: 0 auto; padding: 10px 24px 0; }
body.reader-active .reader-title {
  font-size: 24px; font-weight: 700; line-height: 1.3;
  letter-spacing: .2px; margin: 0 0 5px; color: var(--rd-ink);
}
.reader-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--rd-muted);
}
.reader-meta .pill { font-size: 10px; padding: 2px 6px; }
body.reader-active .reader-wm { margin-top: 5px; opacity: .2; font-size: 9.5px; }

/* 正文 */
body.reader-active .article {
  max-width: 760px; margin: 0 auto; padding: 6px 24px 22px;
  color: var(--rd-ink);
}
body.reader-active .article p { margin: 0 0 1.18em; text-indent: 2em; }
body.reader-active .article p.p-cont { text-indent: 0; }
body.reader-active .article .para-cmt { text-indent: 0; }

/* 段末句评气泡 */
.para-cmt {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 24px; padding: 0 7px; margin-left: 5px;
  vertical-align: -4px; border: 0; background: transparent;
  color: var(--rd-muted); font-family: inherit; cursor: pointer;
}
.para-cmt svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .7;
}
.para-cmt b { position: relative; z-index: 1; font-size: 10.5px; line-height: 1; font-weight: 500; }
.para-cmt:hover { color: var(--accent); }
.para-cmt:hover svg { opacity: 1; }

/* 底部快捷按钮 */
.reader-quick-actions {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 59; width: min(760px, 100%);
  display: flex; gap: 8px; padding: 0 18px;
  transition: opacity .2s ease, transform .2s ease;
}
.reader-quick-actions button,
.reader-quick-actions a {
  flex: 1; min-width: 0; height: 38px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid color-mix(in srgb, var(--rd-ink) 9%, transparent);
  border-radius: 8px; background: var(--rd-panel);
  color: var(--rd-ink); font-size: 13.5px; font-family: inherit;
  cursor: pointer;
}
.reader-quick-actions i { font-style: normal; font-size: 15px; opacity: .8; }
.reader-quick-actions button:hover, .reader-quick-actions a:hover { border-color: var(--accent); }
.reader-quick-actions button:disabled { opacity: .55; cursor: default; border-color: color-mix(in srgb, var(--rd-ink) 9%, transparent); }
.reader-chrome-hidden .reader-quick-actions { display: none; }
/* 最后一页已经有章末卡片（含本章讨论 / 催更），不再悬浮快捷按钮，避免遮挡卡片 */
.reader.reader-at-end .reader-quick-actions { display: none; }

/* 底部控制面板 */
body.reader-active .reader-bar-bottom {
  display: block; min-height: 0;
  padding: 2px 14px calc(3px + env(safe-area-inset-bottom));
  background: var(--rd-panel); border-top: 1px solid var(--rd-line);
}
.reader-chapter-row { display: flex; align-items: center; gap: 12px; height: 34px; }
.reader-chapter-btn {
  flex: none; font-size: 14px; color: var(--rd-ink);
  padding: 6px 2px; white-space: nowrap; cursor: pointer;
}
.reader-chapter-btn.strong { color: var(--accent); font-weight: 600; }
.reader-chapter-btn.disabled { opacity: .3; pointer-events: none; }
.reader-chapter-track {
  position: relative; flex: 1; min-width: 0; height: 28px;
  border: 0; background: transparent; padding: 0; cursor: pointer;
}
.reader-chapter-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 8px; transform: translateY(-50%); border-radius: 999px;
  background: color-mix(in srgb, var(--rd-ink) 8%, transparent);
}
.reader-chapter-track i {
  position: absolute; left: 0; top: 50%; height: 8px;
  transform: translateY(-50%); border-radius: 999px;
  background: color-mix(in srgb, var(--rd-ink) 24%, transparent);
}
.reader-chapter-track i::after {
  content: ""; position: absolute; right: -9px; top: 50%;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--rd-panel); box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  transform: translateY(-50%);
}
.reader-tools-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px; padding-top: 0;
}
.reader-tools-row button,
.reader-tools-row a {
  border: 0; background: transparent; color: var(--rd-ink); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 3px 2px; font-size: 10.5px; font-family: inherit; cursor: pointer;
}
.reader-tools-row svg {
  width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.reader-tools-row button:hover, .reader-tools-row a:hover { color: var(--accent); }

/* 横版页码 */
.reader-page-mini {
  position: fixed; left: 16px; bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 57; font-size: 12px; color: var(--rd-muted);
  font-variant-numeric: tabular-nums; transition: opacity .2s;
}
.reader-page-mini[hidden] { display: none; }
.reader:not(.reader-chrome-hidden) .reader-page-mini { opacity: 0; pointer-events: none; }

/* 章末：作者感谢 + 本章讨论 + 下一章 / 打赏 */
.chapter-end { max-width: 760px; margin: 24px auto 0; padding: 0 24px; }
.ce-reward {
  background: var(--rd-card); border: 1px solid var(--rd-line);
  border-radius: 14px; padding: 14px 15px;
}
.ce-author { display: flex; align-items: center; gap: 9px; }
.ce-author .avatar-sm { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.ce-author-main { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ce-author-main b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-role {
  flex: none; font-size: 10px; color: var(--accent); border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 13%, transparent); padding: 2px 6px;
}
.ce-pill {
  margin-left: auto; flex: none; height: 32px; padding: 0 14px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent); font-family: inherit; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.ce-pill:disabled { opacity: .55; cursor: default; }
.ce-thanks-row { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.ce-thanks {
  flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.75;
  color: var(--rd-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ce-thanks.expanded { display: block; -webkit-line-clamp: unset; }
.ce-more {
  flex: none; border: 0; background: transparent; color: #5b8def;
  font-family: inherit; font-size: 12.5px; padding: 0 0 2px; cursor: pointer;
}
.ce-actions { display: flex; gap: 9px; margin-top: 12px; }
.ce-discuss {
  flex: 1; min-width: 0; height: 54px; border: 0; border-radius: 12px;
  background: var(--rd-btn); color: var(--rd-ink); cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 0 16px; font-family: inherit;
}
.ce-discuss b { font-size: 14.5px; white-space: nowrap; }
.ce-discuss em {
  font-style: normal; font-size: 11.5px; color: var(--rd-muted);
  margin-left: auto; white-space: nowrap;
}
.ce-discuss i { font-style: normal; font-size: 18px; color: var(--rd-muted); line-height: 1; }
.ce-square {
  flex: none; width: 54px; height: 54px; border: 0; border-radius: 12px;
  background: var(--rd-btn); color: var(--rd-ink);
  display: grid; place-items: center; cursor: pointer;
}
.ce-square svg {
  width: 23px; height: 23px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.ce-gift { color: #d68a2f; }
.ce-latest { margin-top: 12px; font-size: 11.5px; color: var(--rd-muted); }
.reader-comments.collapsed { display: none; }

/* 段落句评弹层 */
.para-sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.para-sheet-head h3 { margin: 0; }
.para-sheet-head span { font-size: 12px; color: var(--muted); }
.para-sheet-quote { margin: 0 0 14px; font-size: 13px; line-height: 1.7; }
.para-comment-list { max-height: 42vh; overflow: auto; padding-right: 2px; }
.para-comment-list .comment { padding: 10px 0; }

@media (max-width: 560px) {
  body.reader-active .reader-head { padding: 7px 20px 0; }
  body.reader-active .reader-title { font-size: 21px; }
  body.reader-active .article { padding: 5px 20px 18px; }
  .reader-top-text { font-size: 13px; padding: 6px 7px; }
  .reader-top-icon { width: 34px; height: 34px; }
  .reader-quick-actions { padding: 0 14px; gap: 8px; }
  .reader-quick-actions button, .reader-quick-actions a { height: 36px; font-size: 13px; }
  .chapter-end { margin-top: 20px; padding: 0 20px; }
  .ce-reward { padding: 13px; }
  .ce-square { width: 50px; height: 50px; }
  .ce-discuss { height: 50px; padding: 0 14px; }
  .ce-discuss b { font-size: 13.5px; }
  .ce-thanks { font-size: 12.5px; }
}
@media (max-width: 360px) {
  .ce-discuss em { display: none; }
  .ce-discuss { gap: 4px; }
  .ce-square { width: 46px; height: 46px; }
  .ce-author { gap: 7px; }
  .ce-author-main { gap: 5px; }
  .ce-author-main b { font-size: 13.5px; }
  .ce-role { font-size: 9px; padding: 1px 4px; }
  .ce-pill { height: 29px; padding: 0 10px; font-size: 11px; }
}
@media (min-width: 900px) {
  .reader-mini-top { padding-left: max(16px, calc((100vw - 900px) / 2)); padding-right: max(16px, calc((100vw - 900px) / 2)); }
  body.reader-active .reader-bar-top { padding-left: max(8px, calc((100vw - 900px) / 2)); padding-right: max(8px, calc((100vw - 900px) / 2)); }
  body.reader-active .reader-bar-bottom { padding-left: max(16px, calc((100vw - 900px) / 2)); padding-right: max(16px, calc((100vw - 900px) / 2)); }
  .reader-quick-actions { width: 900px; padding: 0 22px; }
}

/* ========== 我的书架 / 导入书籍 ========== */
.shelf-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
}
.shelf-head h1 { margin: 0; font-size: 26px; }
.shelf-grid { margin-top: 4px; }
.shelf-card .bk-head { flex-wrap: wrap; }
.shelf-empty {
  padding: 52px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.shelf-empty .big { font-size: 42px; }
.shelf-empty div { color: var(--muted); font-size: 13px; }
.shelf-foot { margin: 22px 0 8px; text-align: center; font-size: 12.5px; color: var(--muted); }
.shelf-foot a { color: var(--accent); }
@media (max-width: 760px) {
  .shelf-head h1 { font-size: 23px; }
  .shelf-head > .btn { width: 100%; }
}

/* ========== 书架：番茄式三列封面 ========== */
.bookshelf-page { max-width: 760px; margin: 0 auto; padding-bottom: 14px; }
.bs-top { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.bs-tabs { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 22px; }
.bs-tabs a { font-size: 17px; color: var(--muted); }
.bs-tabs a.on { font-size: 23px; font-weight: 700; color: var(--ink); }
.bs-tools { flex: none; display: flex; align-items: center; gap: 2px; }
.bs-icon {
  width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 22px; line-height: 1; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.bs-icon svg {
  width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.bs-icon:hover { background: var(--card2); }

.bs-banner {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; margin-bottom: 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
}
.bs-banner-cover { flex: none; }
.bs-banner-cover .book-cover { width: 54px; height: 72px; padding: 7px 6px; border-radius: 5px; }
.bs-banner-cover .bc-title { font-size: 9px; -webkit-line-clamp: 2; }
.bs-banner-cover .bc-emoji { font-size: 15px; }
.bs-banner-cover .bc-author, .bs-banner-cover .bc-genre { display: none; }
.bs-banner-icon {
  flex: none; width: 52px; height: 52px; border-radius: 11px;
  background: var(--card); display: grid; place-items: center; font-size: 24px;
}
.bs-banner-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bs-banner-main b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-banner-main small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-banner-btn {
  flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--card); color: var(--accent); font-family: inherit;
  font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06); cursor: pointer;
}
.bs-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bs-count {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--card2); color: var(--muted); font-size: 12px;
}
.bs-filter {
  border: 0; background: transparent; color: var(--muted);
  font-family: inherit; font-size: 12.5px; padding: 6px 2px; cursor: pointer;
}
.bs-filter span { font-size: 10px; }

.bs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 11px; }
.bs-item { min-width: 0; }
.bs-cover {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 4;
  border-radius: 8px; overflow: hidden; background: var(--card2);
}
.bs-cover .book-cover {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 10px 8px;
  border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .13);
}
.bs-cover .bc-title { font-size: 13px; -webkit-line-clamp: 3; }
.bs-cover .bc-emoji { font-size: 22px; }
.bs-cover .bc-author { display: none; }
.bs-cover .bc-genre { font-size: 8px; }
.bs-badge {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(255, 255, 255, .92); color: #3b3b3b;
  font-size: 9px; line-height: 1; padding: 3px 5px; border-radius: 3px; font-weight: 600;
}
.bs-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink);
}
.bs-sub { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.bs-sub > a {
  flex: 1; min-width: 0; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-item-more {
  flex: none; width: 24px; height: 24px; padding: 0; border: 0;
  background: transparent; color: var(--muted); font-size: 17px; line-height: 1;
  cursor: pointer;
}
.bs-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 54px 16px; color: var(--muted); text-align: center;
}
.bs-empty .big { font-size: 42px; }

.shelf-menu-list { display: flex; flex-direction: column; gap: 6px; }
.shelf-menu-item {
  display: flex; align-items: center; width: 100%; padding: 13px 12px;
  border: 0; border-radius: 10px; background: var(--card2); color: var(--ink);
  font-family: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.shelf-menu-item.danger { color: #c0392b; }

@media (max-width: 560px) {
  .bs-tabs a { font-size: 16px; }
  .bs-tabs a.on { font-size: 22px; }
  .bs-grid { gap: 14px 9px; }
  .bs-cover .bc-title { font-size: 12px; }
  .bs-title { font-size: 13px; }
}

/* 手机端作品页：贴近番茄的居中封面信息流 */
@media (max-width: 760px) {
  .work-hero {
    flex-direction: column; align-items: center; text-align: center;
    gap: 14px; padding: 6px 0 0;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
  }
  .work-cover { width: 100%; display: flex; justify-content: center; }
  .work-cover .cover-xl { width: 128px; height: 172px; }
  .work-head .info { width: 100%; }
  .work-head .hero-kicker { justify-content: center; }
  .work-title { text-align: center; font-size: 25px; }
  .work-byline { justify-content: center; }
  .work-stats {
    grid-template-columns: repeat(3, 1fr); gap: 10px 0;
    width: 100%; padding: 12px 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  }
  .work-stats .st { text-align: center; border-right: 1px solid var(--line); }
  .work-stats .st:nth-child(3n) { border-right: 0; }
  .work-intro { text-align: left; margin: 10px 0 12px; }
  .work-timer { width: 100%; }
  .work-timer .countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; justify-content: center; }
  .work-hero .cd-unit { min-width: 0; }
  .urge-goal { max-width: none; }
  .work-actions { justify-content: center; }
  .work-actions .btn { flex: 1 1 42%; }
}


/* ============================================================
   站内 AI · 鸽助手
   ============================================================ */
.ai-fab {
  position: fixed; right: 18px; bottom: 80px; z-index: 59;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--ink); box-shadow: 0 10px 26px rgba(0,0,0,.16);
  text-decoration: none; transition: .18s;
}
.ai-fab span { font-size: 21px; line-height: 1; }
.ai-fab b { font-size: 8.5px; letter-spacing: .8px; color: var(--accent); font-weight: 700; }
.ai-fab:hover { transform: translateY(-2px); border-color: var(--accent); }
/* 已经在 AI 页面时，右下角悬浮入口和音乐按钮会挡住输入框，直接隐藏 */
.ai-active .ai-fab,
.ai-active .music-btn { display: none; }
/* 聊天页不显示全站弹幕，避免盖住对话 */
.ai-active #danmaku { display: none; }

.ai-page { max-width: 860px; margin: 0 auto; }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ai-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ai-brand-icon {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center;
  border-radius: 13px; font-size: 23px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 16%, var(--card2)), var(--card2));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
}
.ai-brand h1 { margin: 0; font-size: 23px; letter-spacing: .3px; }
.ai-brand p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.ai-clear {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 9px; padding: 7px 11px; font-family: inherit; font-size: 11.5px; cursor: pointer;
}
.ai-clear:hover { color: var(--accent); border-color: var(--accent); }

.ai-personas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ai-persona {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 11px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-family: inherit; cursor: pointer; text-align: left;
  transition: .15s;
}
.ai-persona:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ai-persona.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.ai-persona > span { font-size: 17px; line-height: 1.2; }
.ai-persona b { font-size: 12.5px; }
.ai-persona small { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.ai-quota { padding: 12px 14px; margin-bottom: 10px; }
.ai-quota-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.ai-quota-top b { color: var(--accent); font-size: 15px; }
.ai-quota-bar { height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); margin: 9px 0 8px; overflow: hidden; }
.ai-quota-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .25s; }
.ai-quota-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-quota-actions > span { font-size: 11px; color: var(--muted); }
.ai-quota-actions > span b { color: var(--gold); }
.ai-buy-btn {
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card));
  color: var(--accent); border-radius: 8px; padding: 6px 11px; font-family: inherit;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.ai-buy-btn:hover { background: color-mix(in srgb, var(--accent) 18%, var(--card)); }

.ai-messages {
  min-height: 320px; max-height: 54vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); display: flex; flex-direction: column; gap: 14px;
}
.ai-welcome { text-align: center; margin: auto; max-width: 460px; padding: 20px 8px; }
.ai-welcome-avatar { font-size: 38px; }
.ai-welcome h2 { margin: 8px 0 6px; font-size: 19px; }
.ai-welcome p { margin: 0 0 14px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.ai-suggest button {
  border: 1px solid var(--line); background: var(--card2); color: var(--ink);
  border-radius: 999px; padding: 7px 12px; font-family: inherit; font-size: 11px; cursor: pointer;
}
.ai-suggest button:hover { border-color: var(--accent); color: var(--accent); }

.ai-msg { display: flex; gap: 8px; align-items: flex-start; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-avatar {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: color-mix(in srgb, var(--accent) 10%, var(--card2));
  font-size: 16px;
}
.ai-bubble {
  max-width: 78%; padding: 10px 13px; border-radius: 14px;
  background: var(--card2); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.8; color: var(--ink);
  word-break: break-word;
}
.ai-msg.user .ai-bubble {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff);
  border-bottom-right-radius: 4px;
}
.ai-msg.bot .ai-bubble { border-bottom-left-radius: 4px; }
.ai-msg.error .ai-bubble { border-color: color-mix(in srgb, #d9534f 35%, var(--line)); color: #b23b38; }
.ai-bubble pre {
  margin: 6px 0; padding: 8px 10px; border-radius: 8px; overflow-x: auto;
  background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 12px;
}
.ai-bubble code { font-size: 12px; background: color-mix(in srgb, var(--ink) 7%, transparent); padding: 1px 4px; border-radius: 4px; }
.ai-bubble strong { font-weight: 700; }
.ai-msg.typing .ai-bubble { display: flex; gap: 5px; align-items: center; height: 38px; }
.ai-msg.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: aiDot 1.1s infinite ease-in-out;
}
.ai-msg.typing i:nth-child(2) { animation-delay: .15s; }
.ai-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.ai-composer { display: flex; gap: 8px; align-items: stretch; margin-top: 10px; }
.ai-composer textarea {
  flex: 1; min-width: 0; resize: none; min-height: 56px; max-height: 140px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--ink); font-family: inherit; font-size: 13.5px; line-height: 1.6;
  padding: 10px 12px; outline: none;
}
.ai-composer textarea:focus { border-color: var(--accent); }
.ai-composer button {
  flex: none; width: 82px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: var(--on-accent, #fff); font-family: inherit;
  font-size: 13px; font-weight: 700;
}
.ai-composer button:disabled { opacity: .6; cursor: default; }
.ai-note { margin-top: 8px; text-align: center; font-size: 10.5px; color: var(--muted); }

.ai-buy h3, .ai-custom h3 { margin: 0 0 6px; font-size: 18px; }
.ai-buy p { margin: 4px 0 12px; font-size: 12px; }
.ai-pkg-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ai-pkg {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 8px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--card2);
  color: var(--ink); font-family: inherit; cursor: pointer;
}
.ai-pkg:hover { border-color: var(--accent); }
.ai-pkg b { font-size: 15px; }
.ai-pkg span { font-size: 11px; color: var(--gold); }
.ai-custom textarea {
  width: 100%; resize: none; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font-family: inherit; font-size: 13px;
  line-height: 1.6; padding: 10px 12px; outline: none;
}
.ai-custom textarea:focus { border-color: var(--accent); }

@media (max-width: 640px) {
  .ai-fab { right: 14px; bottom: 136px; width: 46px; height: 46px; }
  .ai-fab span { font-size: 19px; }
  .ai-fab b { font-size: 8px; }
  .ai-brand-icon { width: 40px; height: 40px; font-size: 20px; border-radius: 11px; }
  .ai-brand h1 { font-size: 20px; }
  .ai-brand p { font-size: 10px; }
  .ai-personas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ai-persona { padding: 8px 10px; flex-direction: row; align-items: center; gap: 6px; }
  .ai-persona > span { font-size: 16px; }
  .ai-persona b { font-size: 12px; }
  .ai-persona small { display: none; }
  .ai-messages { min-height: 46vh; max-height: 52vh; padding: 12px; }
  .ai-bubble { max-width: 84%; font-size: 13px; }
  .ai-composer button { width: 64px; }
  .ai-pkg-list { grid-template-columns: 1fr; }
}
/* AI 手机端：输入框固定在底部导航上方 */
@media (max-width: 760px) {
  .ai-page { padding-bottom: 96px; }
  .ai-composer {
    position: sticky; bottom: 68px; z-index: 6;
    background: var(--bg); padding: 8px 0 5px; margin-top: 8px;
  }
  .ai-composer textarea { background: var(--card); box-shadow: 0 -8px 20px rgba(0,0,0,.06); }
  .ai-note { margin-top: 3px; }
}

/* ---------------- 编辑锁 ---------------- */
.edit-lock-bar {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%);
  z-index: 1200; display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 24px);
  padding: 9px 12px 9px 14px;
  border-radius: 12px;
  background: #fff7e8; color: #7a4300;
  border: 1px solid #efc07a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  font-size: 12.5px; line-height: 1.5;
}
.edit-lock-bar span { min-width: 0; }
.edit-lock-bar button {
  flex: none; border: 0; border-radius: 8px; padding: 6px 10px;
  background: #d97706; color: #fff; font-family: inherit; font-size: 12px;
  cursor: pointer;
}
body.edit-locked [data-act="new-work"],
body.edit-locked [data-act="edit-work"],
body.edit-locked [data-act="new-chapter"],
body.edit-locked [data-act="edit-chapter"],
body.edit-locked [data-act="del-work"],
body.edit-locked [data-act="del-chapter"] {
  opacity: .45; pointer-events: none;
}
.edit-lock-modal p { margin: 4px 0; }