* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f5f7; color: #222; line-height: 1.6; }
a { color: #1666c5; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 12px; }

/* 头部 */
.site-header { background: #fff; border-bottom: 1px solid #e3e6ea; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: #222; }
.logo img { height: 40px; width: auto; }
.search { margin-left: auto; display: flex; }
.search input { padding: 7px 10px; border: 1px solid #c9ced6; border-radius: 4px 0 0 4px; width: 210px; font-size: 14px; }
.search button { padding: 7px 14px; border: 1px solid #1666c5; background: #1666c5; color: #fff; border-radius: 0 4px 4px 0; cursor: pointer; }

/* 分类导航 */
.cat-nav { background: #2f3b4c; }
.cat-nav .wrap { display: flex; flex-wrap: wrap; gap: 2px 14px; padding-top: 8px; padding-bottom: 8px; }
.cat-nav a { color: #dbe4ef; font-size: 14px; }

/* 面板与卡片 */
.panel { background: #fff; border: 1px solid #e3e6ea; border-radius: 6px; padding: 16px; margin: 14px 0; }
.panel h2 { margin: 0 0 12px; font-size: 18px; border-left: 4px solid #1666c5; padding-left: 8px; }
.panel h1 { margin: 0 0 8px; font-size: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { display: flex; gap: 12px; border: 1px solid #eceef1; border-radius: 6px; padding: 10px; background: #fbfcfd; }
.card .cover img { width: 84px; height: 112px; object-fit: cover; border-radius: 3px; background: #d8dee9; }
.card-title { font-size: 16px; font-weight: 700; color: #222; }
.meta { color: #77808c; font-size: 13px; margin: 4px 0; }
.meta.small { font-size: 12px; }
.desc { font-size: 13px; color: #444; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 表格与排行 */
.upd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.upd-table th, .upd-table td { padding: 7px 8px; border-bottom: 1px solid #eef0f3; text-align: left; }
.upd-table th { color: #77808c; font-weight: 400; }
.rank { margin: 0; padding-left: 22px; columns: 2; }
.rank li { margin: 5px 0; break-inside: avoid; }
.rank .meta { margin-left: 8px; }

/* 分类页 */
.chips a, .sort-bar a { display: inline-block; padding: 3px 10px; margin: 0 4px 6px 0; border: 1px solid #d5d9df; border-radius: 20px; font-size: 13px; color: #333; background: #fff; }
.chips a.on, .sort-bar a.on { background: #1666c5; border-color: #1666c5; color: #fff; }
.sort-bar { font-size: 14px; }
.sort-bar .meta { margin-left: 10px; }

/* 分页 */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 16px 0 4px; }
.pager a, .pager span { padding: 5px 11px; border: 1px solid #d5d9df; border-radius: 4px; background: #fff; font-size: 14px; }
.pager .cur { background: #1666c5; color: #fff; border-color: #1666c5; }
.pager .gap { border: none; background: none; }

/* 详情页 */
.book-head { display: flex; gap: 18px; flex-wrap: wrap; }
.big-cover { width: 140px; height: 187px; object-fit: cover; border-radius: 4px; background: #d8dee9; }
.book-info { flex: 1; min-width: 240px; }
.btn { display: inline-block; background: #1666c5; color: #fff; padding: 8px 20px; border-radius: 4px; margin-right: 10px; }
.btn.ghost { background: #fff; color: #1666c5; border: 1px solid #1666c5; }
.intro { white-space: normal; font-size: 15px; }
.chap-list { list-style: none; margin: 0; padding: 0; columns: 2; }
.chap-list li { border-bottom: 1px dashed #e5e8ec; padding: 7px 4px; break-inside: avoid; }
.chap-list a { color: #333; font-size: 14px; }

/* 阅读页 */
.reader { background: #f7f1e3; border: 1px solid #e6dcc4; border-radius: 6px; padding: 22px 20px; margin: 14px 0; font-size: 18px; }
.reader.bg-eye { background: #dfeeda; border-color: #c4dcbc; }
.reader.bg-night { background: #1c1c1e; border-color: #333; color: #b9b9bd; }
.reader.bg-night a { color: #7aa7e0; }
.reader h1 { font-size: 1.35em; text-align: center; margin: 0 0 6px; }
.reader-meta { text-align: center; color: #77808c; font-size: 13px; margin: 0 0 10px; }
.reader-tools { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: #77808c; margin-bottom: 8px; }
.reader-tools button { border: 1px solid #c9ced6; background: #fff; border-radius: 4px; padding: 3px 9px; cursor: pointer; font-size: 13px; }
.reader-tools .bg1 { background: #dfeeda; }
.reader-tools .bg2 { background: #1c1c1e; color: #ccc; }
.chap-nav { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); padding: 9px 2px; margin: 12px 0; font-size: 15px; }
.chap-nav .disabled { color: #aab; }
.content p { text-indent: 2em; margin: 0 0 .9em; line-height: 1.9; }
.notice { background: #fff8e5; border: 1px solid #f0dfa8; border-radius: 6px; padding: 14px 16px; margin: 14px 0; }

.site-footer { color: #98a0ab; font-size: 13px; text-align: center; padding: 22px 0 30px; }

/* 正文补录相关（2026-11-16 止血包） */
.badge-pending { display: inline-block; background: #f3e2b3; color: #7a5b12; border: 1px solid #e3cd8a; border-radius: 10px; padding: 0 8px; font-size: 12px; line-height: 1.7; }
.avail-line { color: #5a6a7a; }
.btn.disabled { background: #c3c9d1; color: #fff; cursor: not-allowed; }
.chap-list li.missing a { color: #a8aeb8; }
.tag-missing { display: inline-block; background: #eef0f3; color: #98a0ab; border: 1px solid #dde1e7; border-radius: 8px; padding: 0 6px; font-size: 11px; line-height: 1.6; vertical-align: 1px; }
.missing-note p { text-indent: 0; margin: 0 0 .7em; line-height: 1.8; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .rank { columns: 1; }
  .chap-list { columns: 1; }
  .upd-table th:nth-child(1), .upd-table td:nth-child(1) { display: none; }
  .search { margin-left: 0; width: 100%; }
  .search input { flex: 1; width: auto; }
  .reader { padding: 16px 12px; }
}
