/* 古典小说站 · 轻亮主题 (mobile-first) · 站点配色由 :root 变量注入 */
:root{--accent:#2563eb;--accent-dark:#1d4ed8;--accent-soft:#e5efff;}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f5f8; color: #1a1a2e; font-size: 15px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 14px; }

/* 顶栏 */
.site-header { background: #fff; border-bottom: 1px solid #ececf2; position: sticky; top: 0; z-index: 9; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { font-size: 20px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.topnav a { margin-left: 18px; font-size: 15px; color: #444; }
.topnav a:hover { color: var(--accent); }

/* 分类条 */
.catnav { background: #fff; border-bottom: 1px solid #ececf2; overflow-x: auto; }
.catnav .wrap { display: flex; gap: 8px; padding-top: 8px; padding-bottom: 8px; white-space: nowrap; }
.catnav a { padding: 4px 14px; background: #f4f4f8; border-radius: 14px; font-size: 13.5px; color: #555; }
.catnav a:hover { background: var(--accent-soft); color: var(--accent); }

main { padding-top: 14px; padding-bottom: 26px; }

/* 首页 hero */
.hero { text-align: center; padding: 18px 0 6px; }
.hero h1 { font-size: 24px; color: #1a1a2e; letter-spacing: 2px; }
.hero p { color: #888; font-size: 13.5px; margin-top: 6px; }

.blk { margin-top: 20px; }
.blk-t { font-size: 17px; font-weight: 700; margin-bottom: 12px; padding-left: 10px; border-left: 4px solid var(--accent); line-height: 1.2; }

/* 最近更新 */
.updates { list-style: none; background: #fff; border-radius: 12px; padding: 6px 14px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.updates li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #f0f0f5; font-size: 14px; flex-wrap: wrap; }
.updates li:last-child { border-bottom: none; }
.u-book { font-weight: 700; color: #1a1a2e; }
.u-meta { color: #aaa; font-size: 12.5px; }
.u-last { margin-left: auto; color: var(--accent); font-size: 13px; }

/* 书籍卡片 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.book-card { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 1px 4px rgba(26,26,46,.05); align-items: center; }
.book-card:hover b { color: var(--accent); }
.cover { width: 52px; height: 68px; border-radius: 8px; color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-align: center; flex: none; padding: 4px; }
.cover.big { width: 84px; height: 110px; font-size: 20px; border-radius: 10px; }
.bc-info { min-width: 0; }
.bc-info b { display: block; font-size: 14.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bc-info i { display: block; font-style: normal; color: #999; font-size: 12px; margin-top: 4px; }

/* 面包屑 */
.crumb { font-size: 13px; color: #999; margin: 4px 0 12px; }
.crumb a { color: #777; }
.crumb a:hover { color: var(--accent); }

/* 书籍详情 */
.book-info { display: flex; gap: 14px; background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.bi-r h1 { font-size: 20px; margin-bottom: 8px; }
.bi-r .meta { color: #888; font-size: 13px; margin-bottom: 12px; }
.btn { display: inline-block; background: var(--accent); color: #fff !important; padding: 8px 26px; border-radius: 20px; font-size: 14px; font-weight: 600; }
.btn:hover { background: var(--accent-dark); }
.intro { background: #fff; border-radius: 12px; padding: 14px 16px; color: #444; font-size: 14.5px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }

/* 目录 */
.toc { list-style: none; background: #fff; border-radius: 12px; padding: 6px 0; box-shadow: 0 1px 4px rgba(26,26,46,.05); columns: 1; }
@media (min-width: 560px) { .toc { columns: 2; } }
.toc li { padding: 0; border-bottom: 1px solid #f6f6fa; break-inside: avoid; }
.toc li a { display: block; padding: 10px 16px; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.toc li a:hover { color: var(--accent); background: #fff7f9; }

/* 阅读页 */
.reader { background: #fff; border-radius: 14px; padding: 20px 18px 26px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.ch-title { font-size: 19px; text-align: center; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #f1f1f6; }
.reader p { font-size: 17px; line-height: 1.95; margin-bottom: 14px; color: #2b2b3c; text-align: justify; }
.ch-nav { display: flex; gap: 10px; margin: 14px 0; }
.ch-nav a, .ch-nav .off { flex: 1; text-align: center; padding: 10px 0; background: #fff; border-radius: 10px; font-size: 14.5px; color: #444; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.ch-nav a:hover { color: var(--accent); }
.ch-nav .off { color: #ccc; }
.empty { color: #aaa; text-align: center; padding: 40px 0; }

/* 页脚 */
.site-footer { border-top: 1px solid #ececf2; background: #fff; padding: 18px 0 26px; text-align: center; }
.site-footer .f-title { font-size: 14px; color: #666; }
.site-footer .f-title a { color: var(--accent); font-weight: 700; }
.site-footer .muted { color: #b5b5c0; font-size: 12px; margin-top: 6px; }

/* ===== v3 新增（Q1 锚文本墙 / Q2 首页五模块 / Q3 阅读记录·书架 / Q7 信息页 / Q8 分类页 / Q9 日期列） ===== */
.topnav { white-space: nowrap; }
.topnav a { margin-left: 12px; font-size: 14px; }

.subtitle { background: #fff; border-radius: 12px; padding: 12px 16px; color: #666; font-size: 13.5px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }

/* Q2① 热门推荐（CSS 色块封面 + 角标） */
.hot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .hot-grid { grid-template-columns: repeat(4, 1fr); } }
.hc { display: block; background: #fff; border-radius: 12px; padding: 10px; text-align: center; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.hc:hover b { color: var(--accent); }
.hc-cover { position: relative; display: flex; align-items: center; justify-content: center; height: 118px; border-radius: 8px; color: #fff; font-size: 30px; font-weight: 800; }
.hc .badge { position: absolute; left: 6px; top: 6px; font-style: normal; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 9px; background: rgba(26,26,46,.42); color: #fff; }
.hc .badge.lian { background: var(--accent); }
.hc b { display: block; margin-top: 8px; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hc i { display: block; font-style: normal; color: #999; font-size: 12px; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Q2② 人气榜 */
.rank { list-style: none; background: #fff; border-radius: 12px; padding: 4px 14px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.rank li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #f0f0f5; font-size: 14px; }
.rank li:last-child { border-bottom: none; }
.rank .rk { flex: none; width: 22px; height: 22px; border-radius: 6px; background: #f0f0f5; color: #999; font-size: 12px; font-style: normal; line-height: 22px; text-align: center; }
.rank li.top .rk { background: var(--accent); color: #fff; }
.rank time { margin-left: auto; color: #b5b5c0; font-size: 12.5px; }

/* Q8/Q9 行式列表（分类页/书库/首页模块）：书名+作者+最新章节+MM-DD */
.rows { list-style: none; background: #fff; border-radius: 12px; padding: 4px 14px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.rows li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #f0f0f5; font-size: 14px; }
.rows li:last-child { border-bottom: none; }
.r-t { font-weight: 700; flex: none; }
.r-t:hover { color: var(--accent); }
.r-cat { flex: none; font-size: 11.5px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 1px 7px; }
.r-a { color: #999; font-size: 12.5px; flex: none; }
.r-c { margin-left: auto; color: var(--accent); font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 46%; }
.rows time { flex: none; color: #b5b5c0; font-size: 12.5px; }
.updates .u-last { max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.u-date { color: #b5b5c0; font-size: 12.5px; flex: none; margin-left: 10px; }

/* Q2③ 分类块 */
.catblk { margin-top: 14px; }
.catblk-t { font-size: 15px; font-weight: 700; margin-bottom: 8px; padding-left: 8px; border-left: 3px solid var(--accent); }
.catblk-t a:hover { color: var(--accent); }

/* Q1 锚文本墙 / 词条互链 */
.tagwall { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.tagwall a { font-size: 13px; color: #666; background: #fff; border: 1px solid #ececf2; border-radius: 14px; padding: 4px 12px; }
.tagwall a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Q7 最新章节预览 */
.latest { list-style: none; background: #fff; border-radius: 12px; padding: 4px 14px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.latest li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #f0f0f5; font-size: 14px; }
.latest li:last-child { border-bottom: none; }
.latest li a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.latest li a:hover { color: var(--accent); }
.latest time { margin-left: auto; flex: none; color: #b5b5c0; font-size: 12.5px; }

/* Q7 按钮组 */
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn.ghost { background: #fff; color: var(--accent) !important; border: 1px solid var(--accent); padding: 7px 18px; cursor: pointer; font-family: inherit; }
.btn.ghost:hover { background: var(--accent-soft); }

/* Q3 阅读记录 / 书架 */
.hint { color: #999; font-size: 13px; margin-bottom: 12px; }
.rlist { list-style: none; background: #fff; border-radius: 12px; padding: 4px 14px; box-shadow: 0 1px 4px rgba(26,26,46,.05); }
.rlist li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #f0f0f5; font-size: 14px; }
.rlist li:last-child { border-bottom: none; }
.rlist .empty { color: #aaa; font-size: 13.5px; justify-content: center; }
.rlist .empty a { color: var(--accent); }
.rl-t { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rl-t:hover { color: var(--accent); }
.rl-b { color: #999; font-size: 12.5px; flex: none; }
.rl-b a:hover { color: var(--accent); }
.rlist time { color: #b5b5c0; font-size: 12.5px; flex: none; }
.btn-del { background: none; border: none; color: #bbb; font-size: 12.5px; cursor: pointer; padding: 0; font-family: inherit; }
.btn-del:hover { color: var(--accent); }
.more { margin-top: 16px; text-align: center; }
