/* ============================================================
 * 书库屋 · 统一设计系统 (design-system.css)
 * 配色：墨青 #2b6f7c 主 / 暖橙 #ff7a59 强调 / 米白纸张背景
 * 用法：在 index.css 之后加载；所有新组件用变量，便于后台换肤
 * ============================================================ */
:root {
  --primary: #2b6f7c;
  --primary-dark: #1e5560;
  --primary-light: #e8f3f4;
  --accent: #ff7a59;
  --accent-dark: #f4663c;
  --accent-soft: #fff1ec;
  --ink: #24333a;
  --ink-2: #4a5a61;
  --ink-3: #8a969c;
  --line: #e6ebed;
  --bg: #f7f9f9;
  --paper: #fffdf9;
  --radius: 12px;
  --radius-pill: 999px;
  --shadow: 0 4px 18px rgba(31,85,96,.10);
  --shadow-hover: 0 10px 30px rgba(31,85,96,.16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); }

/* ---------- SVG 图标 ---------- */
.sku-icon { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sku-icon.lg { width: 28px; height: 28px; }

/* ---------- 现代书卡（首页/分类/榜单通用） ---------- */
.sku-book-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .22s, box-shadow .22s, border-color .22s;
}
.sku-book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.sku-book-cover { position: relative; display: block; aspect-ratio: 3/4; overflow: hidden; background: var(--primary-light); }
.sku-book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.sku-book-card:hover .sku-book-cover img { transform: scale(1.04); }
.sku-book-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: var(--radius-pill);
}
.sku-book-body { padding: 11px 12px 13px; }
.sku-book-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.45; }
.sku-book-title a { color: var(--ink); }
.sku-book-title a:hover { color: var(--primary); }
.sku-book-desc { margin: 5px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

/* ---------- 章节目录 ---------- */
.chapter-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.chapter-list a {
  display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink-2); font-size: 13px; background: #fff; transition: .18s;
}
.chapter-list a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.chapter-list a.current { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- 阅读进度条 ---------- */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0; transition: width .1s linear;
}

/* ---------- 悬浮操作 ---------- */
.sku-float { position: fixed; right: 18px; bottom: 24px; z-index: 900; display: flex; flex-direction: column; gap: 8px; }
.sku-float button {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--primary); cursor: pointer; box-shadow: var(--shadow);
  display: grid; place-items: center; transition: .2s;
}
.sku-float button:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.sku-float button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Toast ---------- */
.sku-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: var(--radius-pill);
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 9999;
}
.sku-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 骨架屏（图片加载中） ---------- */
.sku-book-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #f0f4f4 25%, #e6ebed 37%, #f0f4f4 63%);
  background-size: 400% 100%; animation: sku-shimmer 1.4s ease infinite;
}
.sku-book-cover img { position: relative; z-index: 1; }
@keyframes sku-shimmer { 0%{background-position:100% 0} 100%{background-position:0 0} }

/* ---------- 章节底部导航 ---------- */
.chapter-bottom-nav { display: flex; gap: 10px; justify-content: center; margin: 26px auto; flex-wrap: wrap; }
.chapter-nav-btn {
  padding: 9px 22px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink-2); text-decoration: none; font-size: 13px; transition: .2s;
}
.chapter-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.chapter-nav-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.chapter-nav-btn.primary:hover { background: var(--primary-dark); color: #fff; }
.chapter-nav-btn.disabled { opacity: .45; pointer-events: none; }

/* ============ 覆盖旧主题：统一墨青配色 + 当前页下划线指示 ============ */
.HuabenNav { background: var(--primary) !important; border: 0 !important; box-shadow: 0 2px 10px rgba(31,85,96,.15); }
/* ⚠️ 必须同时清 a 与 span（含 hover）的图片底：index.css 的 a:hover{url(nav_b1.png)} 会残留旧悬浮图 */
.HuabenNav .navTab li a,
.HuabenNav .navTab li a:hover,
.HuabenNav .navTab li a span,
.HuabenNav .navTab li a:hover span { background: none !important; }
/* 普通项：flex 垂直居中（覆盖 index.css 的 line-height:54px + 不对称 padding 导致文字偏下） */
.HuabenNav .navTab li a span {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  height: 54px !important; line-height: 1 !important;
  padding: 0 26px !important; color: rgba(255,255,255,.82) !important;
  transition: color .2s; position: relative;
}
/* 下划线伪元素：普通项收起 */
.HuabenNav .navTab li a span::after {
  content: ''; position: absolute; left: 26px; right: 26px; bottom: 8px;
  height: 2px; border-radius: 2px; background: #fff;
  transform: scaleX(0); transform-origin: center; transition: transform .22s ease;
}
.HuabenNav .navTab li a:hover span { color: #fff !important; }
.HuabenNav .navTab li a:hover span::after { transform: scaleX(.5); background: rgba(255,255,255,.5); }
/* 当前页：白字加粗 + 白色下划线（用户确认保持白色，不引入强调色） */
.HuabenNav .navTab li.active a span,
.HuabenNav .navTab li .active span,
.HuabenNav .navTab li.active a:hover span,
.HuabenNav .navTab li .active:hover span {
  background: none !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: none !important;
}
.HuabenNav .navTab li.active a span::after,
.HuabenNav .navTab li .active span::after {
  transform: scaleX(1) !important;
  background: #fff !important;
  height: 2px;
}
/* 顶部搜索条：墨青按钮 */
.HuabenNavTop .searchForm { background: var(--primary) !important; }
.HuabenNavTop .searchForm button {
  background: var(--primary) !important; display: inline-grid; place-items: center;
}
.HuabenNavTop .searchForm button:hover { background: var(--primary-dark) !important; }
.HuabenNavTop .searchForm input { border-color: var(--line) !important; }
/* 清掉旧封面背景占位（xs-lists 用图片自己渲染） */
.bgcontainer { display: none !important; }

/* 首页栏目横栏：覆盖 indexpage.css 的 background:#eee 与深色文字（日间精致、夜间适配） */
.left-side h1, .right-side h1, .bottom-side h1 {
  background: #fff !important;
  color: var(--primary-dark) !important;
  font-size: 18px !important;
  padding: 12px 16px !important;
  margin: 0 0 16px !important;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
}
.left-side h1 small, .right-side h1 small, .bottom-side h1 small { color: var(--ink-3) !important; }
html.night-mode .left-side h1,
html.night-mode .right-side h1,
html.night-mode .bottom-side h1 {
  background: #1c252b !important;
  color: #e2e8ea !important;
  border-left-color: var(--primary);
}
html.night-mode .left-side h1 small,
html.night-mode .right-side h1 small,
html.night-mode .bottom-side h1 small { color: #8a969c !important; }

/* ---------- 首页新横幅 ---------- */
/* 覆盖主题 .slide_index 的 max-width:480px + inline-block（导致桌面右侧大空白） */
.slide_index { max-width: none !important; display: block !important; width: 100% !important; margin-right: 0 !important; height: 200px !important; }
.sku-hero-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 200px; padding: 30px 40px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--primary-dark), var(--primary) 55%, var(--accent));
  color: #fff !important; text-decoration: none; overflow: hidden; position: relative;
  transition: box-shadow .3s ease, transform .3s ease;
}
/* 悬浮：整块横幅保持白字（覆盖 indexpage.css 全局 a:hover 绿色），只加柔和阴影与上浮 */
.sku-hero-banner:hover, .sku-hero-banner:focus {
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(31,85,96,.28);
  transform: translateY(-2px);
}
.sku-hero-banner::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255,255,255,.08); transition: transform .5s ease, background .5s ease;
}
.sku-hero-banner:hover::after { transform: scale(1.25); background: rgba(255,255,255,.14); }
.sku-hero-banner > div { display: flex; flex-direction: column; gap: 8px; z-index: 1; }
/* 横幅内所有文字强制白色，彻底隔绝全局 a:hover 污染 */
.sku-hero-banner, .sku-hero-banner:hover *,
.sku-hero-banner:hover span, .sku-hero-banner:hover strong, .sku-hero-banner:hover small {
  color: #fff !important;
}
.sku-hero-kicker { font-size: 12px; letter-spacing: 2px; opacity: .85; }
.sku-hero-banner strong { font-size: 30px; letter-spacing: 1px; }
.sku-hero-banner small { font-size: 13px; opacity: .85; }
.sku-hero-cta {
  flex: none; z-index: 1; padding: 11px 24px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.5); font-size: 14px;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
/* CTA 单独反白为墨青底白字（比原来的白底墨青字更协调，不破坏整体色调） */
.sku-hero-banner:hover .sku-hero-cta,
.sku-hero-banner:focus .sku-hero-cta {
  background: var(--primary-dark); color: #fff !important; border-color: rgba(255,255,255,.8); transform: translateX(3px);
}
@media (max-width: 600px) {
  .sku-hero-banner { padding: 24px 20px; min-height: 150px; }
  .sku-hero-banner strong { font-size: 22px; }
  .sku-hero-banner small { font-size: 11px; }
  .sku-hero-cta { padding: 8px 14px; font-size: 12px; }
}

/* ---------- 首页快捷导航 ---------- */
.sku-quick-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 12px 0 22px; }
.sku-quick-nav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink-2); text-decoration: none; font-size: 13px; transition: .2s;
}
.sku-quick-nav a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ---------- 书籍详情页 ---------- */
.sku-book-hero { display: flex; gap: 24px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sku-book-cover-lg { width: 150px; flex: none; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(31,85,96,.18); }
.sku-book-cover-lg img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.sku-book-info { flex: 1; min-width: 0; }
.sku-book-info h1 { margin: 4px 0 10px; font-size: 24px; color: var(--primary-dark); }
.sku-book-meta { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 12px; font-size: 12px; color: var(--ink-3); }
.sku-book-summary { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin: 0 0 12px; }
.sku-book-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.sku-tag { font-size: 11px; color: var(--primary); background: var(--primary-light); padding: 3px 10px; border-radius: var(--radius-pill); text-decoration: none; }
.sku-tag:hover { background: var(--primary); color: #fff; }
.sku-book-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sku-section-title { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.sku-section-title h2 { margin: 0; font-size: 18px; color: var(--primary-dark); }
.sku-section-title span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 600px) {
  .sku-book-hero { flex-direction: column; gap: 16px; padding: 16px; }
  .sku-book-cover-lg { width: 120px; align-self: center; }
  .sku-book-info h1 { font-size: 20px; }
}

/* ---------- 最近阅读 / 继续阅读 / 书架 ---------- */
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.recent-item { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-decoration: none; transition: .2s; }
.recent-item:hover { border-color: var(--primary); background: var(--primary-light); }
.recent-item img { width: 34px; height: 45px; object-fit: cover; border-radius: 4px; flex: none; }
.recent-item span { font-size: 12px; color: var(--ink); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.recent-item small { display: block; color: var(--ink-3); font-size: 11px; }
.resume-reading { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--primary); color: #fff; border-radius: var(--radius-pill); text-decoration: none; font-size: 14px; box-shadow: 0 3px 12px rgba(43,111,124,.25); transition: .2s; }
.resume-reading:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }
.resume-reading small { opacity: .85; font-size: 12px; }
.btn-shelf { padding: 8px 20px; border: 1px solid var(--accent); border-radius: var(--radius-pill); background: #fff; color: var(--accent); font-size: 13px; cursor: pointer; transition: .2s; }
.btn-shelf:hover { background: var(--accent-soft); }
.btn-shelf.active { background: var(--accent); color: #fff; }

/* ---------- 多类别排行榜 ---------- */
.rank-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.rank-tab {
  padding: 8px 20px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink-2); font-size: 13px; cursor: pointer; transition: .2s;
}
.rank-tab:hover { border-color: var(--primary); color: var(--primary); }
.rank-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(43,111,124,.25); }
.rank-panel { display: none; }
.rank-panel.show { display: block; animation: sku-fade .25s ease; }
@keyframes sku-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rank-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: #fff; text-decoration: none; transition: .2s;
}
.rank-row:hover { background: var(--primary-light); }
.rank-num {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--ink-3); font-weight: 700; font-size: 14px;
}
.rank-num.top { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(255,122,89,.3); }
.rank-num.top:nth-child(1) { background: #f5b73d; }
.rank-cover { width: 52px; height: 68px; flex: none; border-radius: 6px; overflow: hidden; background: var(--primary-light); }
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-info strong { font-size: 15px; color: var(--ink); }
.rank-row:hover .rank-info strong { color: var(--primary); }
.rank-info small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-cta { flex: none; font-size: 12px; color: var(--accent); }
.rank-empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: 13px; }

/* ============ 手机端图标统一：SVG 线性图标 + 墨青配色 ============ */
/* 顶栏图标按钮（含夜间模式 button，需重置浏览器默认样式） */
.huabenheader .sku-top-icon {
  display: grid; place-items: center; width: 34px; height: 34px; color: var(--primary);
  padding: 0; margin: 0; background: none; border: 0; cursor: pointer;
}
.huabenheader .sku-top-icon .sku-icon { width: 23px; height: 23px; }
.theme-icon-moon, .theme-icon-sun { display: inline-flex; }
/* 桌面端夜间按钮：圆形描边 */
.sku-theme-desktop {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--primary); cursor: pointer; display: grid; place-items: center; transition: .2s;
}
.sku-theme-desktop:hover { background: var(--primary-light); border-color: var(--primary); }
/* 手机搜索页顶栏：整条改墨青，返回/搜索图标改白色（与桌面搜索按钮一致） */
.huabenheader .searchNavTop { background: var(--primary) !important; }
/* ⚠️ .pull-left/.pull-right 是 float 元素默认顶部对齐，导致返回/提交按钮和输入框不在一条中线；
   让两容器与顶栏等高(56px)并垂直居中，三者中心统一到 28 */
.huabenheader .searchNavTop .pull-left,
.huabenheader .searchNavTop .pull-right {
  height: 56px; display: flex; align-items: center;
}
.huabenheader .searchNavTop .pull-left a,
.huabenheader .searchNavTop button {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  margin: 0 !important; /* 覆盖 index.css 的 margin-top:16px（导致提交按钮偏下） */
  color: #fff; background: none !important; border: 0;
}
.huabenheader .searchNavTop .sku-top-svg { width: 22px; height: 22px; }
/* 下拉菜单 6 个图标：统一圆形浅墨青底 + 墨青线性图标 */
.TopButtons { border-bottom-color: var(--primary) !important; }
.TopButtons .sku-menu-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 5px;
  border-radius: 50%; background: var(--primary-light); color: var(--primary);
}
.TopButtons .sku-menu-icon .sku-icon { width: 23px; height: 23px; }
.TopButtons li a { color: var(--ink-2) !important; }
/* 手机快捷入口当前页：图标墨青实心 + 文字墨青加粗 + 顶部小圆点指示 */
.TopButtons li a.active { color: var(--primary) !important; font-weight: 700; }
.TopButtons li a.active .sku-menu-icon { background: var(--primary); color: #fff; position: relative; }
.TopButtons li a.active .sku-menu-icon::after {
  content: ''; position: absolute; top: -3px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.TopButtons li a:hover .sku-menu-icon, .TopButtons li a:active .sku-menu-icon { background: var(--primary); color: #fff; }
/* 桌面端搜索按钮图标恒为白色 */
.HuabenNavTop .searchForm button .sku-icon { stroke: #fff; }
/* 搜索页标题/提交按钮图标 */
.sku-search-title-icon { width: 26px !important; height: 26px !important; vertical-align: -5px !important; color: var(--primary); }
.search-page-form button { display: inline-grid; place-items: center; }
.search-page-form button .sku-icon { width: 20px; height: 20px; }

/* ---------- 搜索页 ---------- */
.search-page { padding: 30px 0 60px; }
/* 手机端：顶栏已有搜索框，隐藏页面内重复搜索框与标题，避免双框重叠 */
@media (max-width: 768px) {
  .search-page { padding: 18px 0 50px; }
  .search-desktop-title, .search-page-form { display: none !important; }
  .search-status { text-align: center; margin: 0 0 18px; }
}
.sku-hit { background: #ffe08a; color: inherit; padding: 0 2px; border-radius: 2px; }
.search-page-head { text-align: center; margin-bottom: 28px; }
.search-page-head h1 { font-size: 24px; color: var(--primary-dark); margin: 0 0 18px; }
.search-page-form { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.search-page-form input { flex: 1; min-width: 0; padding: 11px 16px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 14px; outline: none; }
.search-page-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.search-page-form button { flex: none; padding: 11px 26px; border: 0; border-radius: var(--radius-pill); background: var(--primary); color: #fff; font-size: 14px; cursor: pointer; }
.search-page-form button:hover { background: var(--primary-dark); }
.search-status { color: var(--ink-3); font-size: 13px; margin: 14px 0 0; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.search-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; transition: .2s; }
.search-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.search-card img { width: 64px; height: 86px; flex: none; object-fit: cover; border-radius: 6px; background: var(--primary-light); }
.search-card-body { min-width: 0; flex: 1; }
.search-card-body h4 { margin: 0 0 6px; font-size: 14px; color: var(--ink); }
.search-card:hover .search-card-body h4 { color: var(--primary); }
.search-card-body p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.search-card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.search-card-meta span { font-size: 10px; color: var(--primary); background: var(--primary-light); padding: 2px 7px; border-radius: var(--radius-pill); }
.search-card mark { background: #ffe08a; color: inherit; padding: 0 2px; }
.search-empty { text-align: center; padding: 50px 20px; color: var(--ink-3); }
.search-empty p { margin-bottom: 18px; }
@media (max-width: 600px) {
  .search-grid { grid-template-columns: 1fr; }
  .search-page-form button { padding: 11px 18px; }
}

/* ============ 全站交互动效（motion.js） ============ */
.sku-reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.sku-reveal.sku-in { opacity: 1; transform: none; }
.sku-ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 5;
  background: rgba(43,111,124,.22); transform: scale(0); animation: sku-ripple .6s ease-out forwards;
}
@keyframes sku-ripple { to { transform: scale(1.4); opacity: 0; } }
.cat-card, .search-card, .rank-row, .resume-reading, .cat-chip, .chapter-nav-btn { position: relative; overflow: hidden; }
/* 手机顶栏向下滚微收起、向上滚恢复 */
.huabenheader { transition: transform .25s ease; }
.huabenheader.sku-header-hide { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .sku-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .sku-ripple { display: none !important; }
  .huabenheader { transition: none !important; }
}

/* ============ 分类页 / 小说库页：统一现代卡片网格 ============ */
.cat-page { padding: 22px 0 60px; }
.cat-crumb { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; }
.cat-crumb a { color: var(--ink-3); text-decoration: none; }
.cat-crumb a:hover { color: var(--primary); }
.cat-crumb span { margin: 0 8px; color: var(--line); }
.cat-crumb strong { color: var(--primary); font-weight: 600; }
.cat-head { margin-bottom: 20px; }
.cat-head h1 { margin: 0 0 8px; font-size: 24px; color: var(--primary-dark); }
.cat-head p { margin: 0; font-size: 13px; color: var(--ink-3); }
.cat-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cat-filter-label { flex: none; font-size: 12px; color: var(--ink-3); margin-right: 4px; }
.cat-chip { display: inline-block; padding: 6px 16px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff; color: var(--ink-2); font-size: 13px; text-decoration: none; transition: .2s; }
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(43,111,124,.22); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.cat-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; transition: .22s; }
.cat-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(31,85,96,.13); transform: translateY(-3px); }
.cat-cover { width: 84px; height: 112px; flex: none; border-radius: 8px; overflow: hidden; background: var(--primary-light); }
.cat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cat-card-body h3 { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.4; }
.cat-card:hover .cat-card-body h3 { color: var(--primary); }
.cat-card-body p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card-cta { margin-top: auto; font-size: 12px; color: var(--accent); }
.cat-empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.cat-empty p { margin-bottom: 18px; }
@media (max-width: 768px) {
  .cat-page { padding: 16px 12px 50px; }
  .cat-head h1 { font-size: 20px; }
  .cat-chip { padding: 5px 13px; font-size: 12px; }
  .cat-grid { grid-template-columns: 1fr; gap: 12px; }
  .cat-cover { width: 72px; height: 96px; }
  .cat-card { padding: 11px; gap: 11px; }
}

/* ============ 全局清除旧主题绿色残留（catalog/cosplay/indexpage） ============ */
.catalogList .active, .booklist .active, .highlight,
.pageNav .pageNum.active, .catalogList li.active a { background: var(--primary) !important; color: #fff !important; }
a, .text-muted, .text-lightgrey { transition: color .2s; }

/* ============ 漫画阅读器：图片分镜流 ============ */
.comic-reader { max-width: 860px; margin: 0 auto; padding: 22px 16px 60px; }
.comic-reader-head { text-align: center; padding: 8px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.comic-reader-head h1 { margin: 10px 0 12px; font-size: 22px; color: var(--ink); }
.comic-reader-meta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.comic-pages { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.comic-panel { position: relative; width: 100%; margin: 0; line-height: 0; background: #eceff1; border-radius: 4px; overflow: hidden; }
.comic-panel img { width: 100%; height: auto; display: block; }
.comic-panel figcaption { position: absolute; right: 10px; bottom: 10px; line-height: 1; font-size: 11px; padding: 4px 9px; border-radius: var(--radius-pill); background: rgba(0,0,0,.62); color: #fff; }
.comic-no-pages { text-align: center; padding: 80px 20px; color: var(--ink-3); }
.comic-note { margin: 28px auto 0; max-width: 640px; font-size: 14px; line-height: 1.9; color: var(--ink-2); text-align: center; }
.comic-reader-nav { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
html.night-mode .comic-reader { background: #141a1e; }
html.night-mode .comic-reader-head h1 { color: #e2e8ea !important; }
html.night-mode .comic-panel { background: #1c252b; }
@media (max-width: 768px) {
  .comic-reader { padding: 14px 0 50px; }
  .comic-reader-head { padding: 8px 14px 16px; }
  .comic-reader-head h1 { font-size: 18px; }
  .comic-panel { border-radius: 0; }
  .comic-panel figcaption { font-size: 10px; right: 8px; bottom: 8px; }
  .comic-reader-nav { padding: 0 12px; }
  .comic-reader-nav .chapter-nav-btn { flex: 1; padding: 10px 6px; font-size: 12px; }
}

/* ============ 发现页：分类 + 标签云 + 最近更新 ============ */
.discover-page { padding: 26px 0 70px; }
.discover-hero { text-align: center; }
.discover-stat { color: var(--accent) !important; font-size: 12px; margin-top: 8px !important; }
.discover-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.discover-cat {
  display: flex; flex-direction: column; gap: 5px; padding: 18px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  text-decoration: none; transition: .2s;
}
.discover-cat:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.discover-cat strong { font-size: 15px; color: var(--primary-dark); }
.discover-cat small { font-size: 11px; color: var(--ink-3); }
.discover-tags { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.discover-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 15px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff;
  color: var(--primary); text-decoration: none; transition: .2s;
}
.discover-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.discover-tag small { color: var(--ink-3); font-size: 10px; }
.discover-tag:hover small { color: rgba(255,255,255,.8); }
.discover-tag.lv2 { font-size: 14px; font-weight: 600; }
.discover-tag.lv3 { font-size: 16px; font-weight: 700; border-color: var(--primary); }
@media (max-width: 768px) {
  .discover-cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .discover-cat { padding: 14px 12px; }
  .discover-tag { padding: 6px 12px; font-size: 12px; }
}
html.night-mode .discover-cat, html.night-mode .discover-tag { background: #1c252b !important; border-color: #33454e !important; }
html.night-mode .discover-tag { color: #7fc4d1 !important; }
html.night-mode .discover-cat strong { color: #e2e8ea !important; }

/* ============ 顶栏书架入口（手机图标 + 桌面文字钮，带数量角标） ============ */
.sku-shelf-link { position: relative; }
.sku-shelf-badge { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; font-style: normal; }
/* 与夜间按钮 34px 圆形对齐：固定高度 34px + flex 垂直居中，图标同为 18px */
/* ⚠️ 必须 !important：header 里 a 的旧规则把它压成 display:block，导致 align-items 失效、图标贴顶 */
.sku-shelf-desktop { position: relative; display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--radius-pill); color: var(--ink-2); font-size: 13px; line-height: 1; text-decoration: none; transition: .2s; }
.sku-shelf-desktop:hover { background: var(--primary-light); color: var(--primary); }
.sku-shelf-desktop .sku-icon { width: 18px; height: 18px; flex: none; align-self: center; vertical-align: middle; }
.sku-shelf-desktop .sku-shelf-badge { top: 1px; right: 1px; }

/* ============ 书架页：本地收藏，卡片网格 + 空状态 ============ */
.shelf-page { padding: 18px 0 60px; }
.shelf-hero { padding: 6px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.shelf-hero h1 { font-size: 28px; color: var(--primary-dark); margin: 0 0 8px; }
.shelf-hero p { font-size: 13px; color: var(--ink-3); margin: 0; }
.shelf-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 18px; }
.shelf-count { font-size: 13px; color: var(--ink-3); }
.shelf-clear { padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff; color: var(--ink-3); font-size: 12px; cursor: pointer; }
.shelf-clear:hover { border-color: var(--accent); color: var(--accent); }
.shelf-clear.confirming { border-color: var(--accent); background: var(--accent); color: #fff; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.shelf-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: .2s; }
.shelf-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.shelf-cover { flex: none; width: 90px; height: 120px; border-radius: 8px; overflow: hidden; background: var(--primary-light); }
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shelf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.shelf-info h2 { margin: 0; font-size: 15px; }
.shelf-info h2 a { color: var(--ink); text-decoration: none; }
.shelf-info h2 a:hover { color: var(--primary); }
.shelf-info p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-meta { font-size: 11px; color: var(--primary); }
.shelf-remove { align-self: flex-start; margin-top: auto; padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff; color: var(--ink-3); font-size: 11px; cursor: pointer; }
.shelf-remove:hover { border-color: var(--accent); color: var(--accent); }
.shelf-empty { text-align: center; padding: 70px 20px; }
.shelf-empty-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); font-size: 26px; font-weight: 700; }
.shelf-empty h2 { font-size: 19px; color: var(--ink); margin: 0 0 8px; }
.shelf-empty p { font-size: 13px; color: var(--ink-3); margin: 0 0 20px; }
.shelf-empty-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 768px) {
  .shelf-grid { grid-template-columns: 1fr; gap: 10px; }
  .shelf-hero h1 { font-size: 23px; }
  .sku-shelf-desktop { display: none; }
}
html.night-mode .shelf-card, html.night-mode .shelf-clear, html.night-mode .shelf-remove { background: #1c252b !important; border-color: #33454e !important; }
html.night-mode .shelf-hero h1, html.night-mode .shelf-info h2 a { color: #e2e8ea !important; }

/* ============ 广告位容器：响应式，避免溢出，尊重夜间模式 ============ */
.sku-ad-unit { margin: 26px 0; min-height: 90px; text-align: center; overflow: hidden; max-width: 100%; }
.sku-ad-unit ins { display: block; width: 100%; max-width: 100%; }
.sku-ad-unit[data-ad-label]::before {
  content: attr(data-ad-label); display: block; font-size: 10px; letter-spacing: 2px;
  color: var(--ink-3); opacity: .5; margin-bottom: 4px;
}
@media (max-width: 768px) { .sku-ad-unit { margin: 18px 0; min-height: 70px; } }

/* ============ 首页：统一栏目 + 漫画/文学精选 + 频道引导 ============ */
.home-section { margin: 28px 0; }
.home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.home-section-head h2 { margin: 0; font-size: 20px; color: var(--primary-dark); }
.home-section-head h2 small { font-size: 11px; letter-spacing: 2px; color: var(--accent); margin-left: 8px; font-weight: 600; }
.home-more { font-size: 12px; color: var(--primary); text-decoration: none; white-space: nowrap; }
.home-more:hover { color: var(--accent); }
.home-comic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.home-comic-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; transition: .22s; }
.home-comic-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.home-comic-cover { position: relative; width: 88px; height: 118px; flex: none; border-radius: 7px; overflow: hidden; background: var(--primary-light); }
.home-comic-cover img { width: 100%; height: 100%; object-fit: cover; }
.home-comic-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.home-comic-body h3 { margin: 0; font-size: 14px; color: var(--ink); }
.home-comic:hover .home-comic-body h3 { color: var(--primary); }
.home-comic-body p { margin: 0; font-size: 11px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-comic-body span { margin-top: auto; font-size: 10px; color: var(--primary); }
.home-lit-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.home-lit-item { display: flex; align-items: center; gap: 18px; min-width: 0; width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; transition: .2s; box-sizing: border-box; }
.home-lit-item:hover { border-color: var(--primary); background: var(--primary-light); }
.home-lit-item time { flex: none; font-size: 13px; color: var(--accent); font-weight: 700; min-width: 42px; }
.home-lit-item > div { flex: 1; min-width: 0; }
.home-lit-item h3 { margin: 0 0 4px; font-size: 14px; color: var(--ink); }
.home-lit-item p { margin: 0; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-lit-arrow { color: var(--primary); font-size: 17px; }
.home-channel-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 34px 0 20px; }
.home-channel-guide a { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #fff, var(--primary-light)); text-decoration: none; transition: .22s; }
.home-channel-guide a:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.home-channel-guide strong { font-size: 17px; color: var(--primary-dark); }
.home-channel-guide span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 768px) {
  .home-section { margin: 20px 0; }
  .home-section-head h2 { font-size: 17px; }
  .home-comic-grid { grid-template-columns: 1fr; gap: 10px; }
  .home-lit-item { padding: 12px; gap: 12px; }
  .home-lit-item p { font-size: 11px; }
  .home-channel-guide { grid-template-columns: 1fr; gap: 10px; }
  .home-channel-guide a { padding: 16px; flex-direction: row; align-items: center; justify-content: space-between; }
}
html.night-mode .home-comic-card, html.night-mode .home-lit-item { background: #1c252b !important; border-color: #33454e !important; }
html.night-mode .home-channel-guide a { background: #1c252b !important; border-color: #33454e !important; }
html.night-mode .home-section-head h2, html.night-mode .home-comic-body h3,
html.night-mode .home-lit-item h3, html.night-mode .home-channel-guide strong { color: #e2e8ea !important; }

/* ============ 漫画频道页 v3：清爽图文、无符号图标、层级清晰 ============ */
.comic-page { padding: 18px 0 50px; }
/* 紧凑头图（不溢出） */
.comic-intro { padding: 6px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.comic-intro h1 { font-size: 28px; color: var(--primary-dark); margin: 0 0 8px; }
.comic-intro h1 small { font-size: 11px; letter-spacing: 3px; color: var(--accent); font-weight: 700; margin-left: 12px; vertical-align: middle; }
.comic-intro-desc { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin: 0 0 8px; max-width: 700px; }
.comic-intro-stat { font-size: 12px; color: var(--ink-3); margin: 0; }
.dot-online, .dot-off { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 3px 0 10px; }
.dot-online { background: #2bb673; }
.dot-off { background: #9aa8ae; }

.comic-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 16px; padding-bottom: 9px; border-bottom: 2px solid var(--primary); }
.comic-sec-head h2 { margin: 0; font-size: 19px; color: var(--primary-dark); }
.comic-sec-head span { font-size: 11px; letter-spacing: 1.5px; color: var(--ink-3); }

/* 编辑精选：白底大卡，左侧封面 + 右侧文字（无模糊背景层） */
.comic-feature { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; transition: .25s; }
.comic-feature:hover { border-color: var(--primary); box-shadow: 0 10px 28px rgba(31,85,96,.14); transform: translateY(-3px); }
.comic-feature-cover { border-radius: 10px; overflow: hidden; background: var(--primary-light); aspect-ratio: 3/4; }
.comic-feature-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comic-feature-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* ⚠️ 全局有 line-height:0 继承，所有徽章必须显式 line-height + inline-flex，否则只剩 padding 高度文字挤成一团 */
.comic-pick-badge { align-self: flex-start; display: inline-flex; align-items: center; line-height: 1.4; font-size: 12px; font-weight: 700; padding: 6px 15px; border-radius: var(--radius-pill); background: var(--primary); color: #fff; }
.comic-feature-info h3 { margin: 0; font-size: 26px; color: var(--ink); }
.comic-feature:hover .comic-feature-info h3 { color: var(--primary); }
.comic-feature-info > p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.comic-info-line { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.comic-feature-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.comic-feature-tags span { display: inline-flex; align-items: center; line-height: 1.4; font-size: 12px; padding: 5px 13px; border-radius: var(--radius-pill); background: var(--primary-light); color: var(--primary-dark); }
.comic-read-btn { align-self: flex-start; margin-top: auto; display: inline-block; padding: 11px 28px; border-radius: var(--radius-pill); background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; }

/* 作品网格：大图 + 清晰文字 */
.comic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.comic-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; text-decoration: none; transition: .22s; }
.comic-card:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(31,85,96,.13); transform: translateY(-3px); }
.comic-cover { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--primary-light); }
.comic-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comic-status { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; line-height: 1.4; font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(43,182,115,.92); color: #fff; }
.comic-status.off { background: rgba(120,134,142,.92); }
.comic-card-info { padding: 15px 16px; }
.comic-card-info h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); }
.comic-card:hover .comic-card-info h3 { color: var(--primary); }
.comic-card-info p { margin: 0 0 12px; font-size: 13px; color: var(--ink-3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comic-card-foot { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); }
.comic-foot-cat { color: var(--primary); }

/* 底部两栏：最近更新 + 分类标签 */
.comic-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 10px; }
.comic-col { min-width: 0; }
.comic-update-list { display: grid; gap: 9px; }
.comic-update { display: flex; align-items: center; gap: 13px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; transition: .2s; }
.comic-update:hover { border-color: var(--primary); background: var(--primary-light); }
.comic-update img { width: 46px; height: 60px; object-fit: cover; border-radius: 6px; flex: none; }
.comic-update-txt { flex: 1; min-width: 0; }
.comic-update-txt strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.comic-update-txt span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comic-update-arrow { color: var(--primary); font-size: 22px; line-height: 1; }

.comic-browse-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.comic-browse-group + .comic-browse-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.comic-browse-group h4 { margin: 0 0 12px; font-size: 14px; color: var(--primary-dark); }
.comic-pills { display: flex; gap: 9px; flex-wrap: wrap; }
.comic-pills a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--primary); font-size: 13px; text-decoration: none; transition: .2s; }
.comic-pills a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.comic-pills i { font-style: normal; font-size: 10px; opacity: .6; }

@media (max-width: 900px) {
  .comic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comic-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .comic-intro h1 { font-size: 23px; }
  .comic-intro-desc { font-size: 13px; }
  .comic-feature { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .comic-feature-cover { max-width: 200px; }
  .comic-feature-info h3 { font-size: 21px; }
  .comic-feature-info > p { font-size: 13px; }
  .comic-grid { gap: 12px; }
  .comic-card-info { padding: 11px 12px; }
  .comic-card-info h3 { font-size: 15px; }
  .comic-card-info p { font-size: 12px; }
}
html.night-mode .comic-feature, html.night-mode .comic-card,
html.night-mode .comic-update, html.night-mode .comic-browse-card { background: #1c252b !important; border-color: #33454e !important; }
html.night-mode .comic-feature-info h3, html.night-mode .comic-card-info h3,
html.night-mode .comic-intro h1, html.night-mode .comic-sec-head h2,
html.night-mode .comic-browse-group h4, html.night-mode .comic-update-txt strong { color: #e2e8ea !important; }
html.night-mode .comic-pills a { color: #7fc4d1 !important; }
html.night-mode .comic-pills a:hover { background: var(--primary) !important; color: #fff !important; }
html.night-mode .comic-feature-tags span { background: #243038 !important; color: #9fb0b8 !important; }

/* ============ 文学频道页：焦点 + 热门 + 标签 + 网格 ============ */
.lit-page { padding: 30px 0 70px; }
.lit-hero { text-align: center; padding: 20px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.lit-kicker { font-size: 11px; letter-spacing: 3px; color: var(--accent); font-weight: 700; margin: 0 0 12px; }
.lit-hero h1 { font-size: 34px; color: var(--primary-dark); margin: 0 0 12px; letter-spacing: 2px; }
.lit-lead { font-size: 15px; color: var(--ink-2); margin: 0 0 10px; line-height: 1.8; max-width: 640px; margin-left: auto; margin-right: auto; }
.lit-stat { font-size: 12px; color: var(--ink-3); margin: 0; }
.lit-section-title { display: flex; align-items: baseline; gap: 12px; margin: 36px 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.lit-section-title h2 { font-size: 20px; margin: 0; color: var(--primary-dark); }
.lit-section-title span { font-size: 11px; letter-spacing: 2px; color: var(--ink-3); }
.lit-feature { display: flex; gap: 26px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; transition: .25s; }
.lit-feature:hover { border-color: var(--primary); box-shadow: 0 10px 28px rgba(31,85,96,.14); transform: translateY(-3px); }
.lit-feature-cover { width: 240px; height: 180px; flex: none; border-radius: 10px; overflow: hidden; background: var(--primary-light); }
.lit-feature-cover img { width: 100%; height: 100%; object-fit: cover; }
.lit-feature-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lit-badge { align-self: flex-start; font-size: 11px; padding: 3px 12px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lit-feature-body h3 { margin: 0; font-size: 24px; color: var(--ink); line-height: 1.4; }
.lit-feature:hover .lit-feature-body h3 { color: var(--primary); }
.lit-feature-body p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lit-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.lit-tag { color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: var(--radius-pill); }
.lit-read { color: var(--accent); font-size: 13px; font-weight: 600; margin-top: auto; }
.lit-hot-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.lit-hot-item { display: flex; align-items: center; gap: 18px; min-width: 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; transition: .2s; }
.lit-hot-item:hover { border-color: var(--primary); background: var(--primary-light); }
.lit-hot-no { font-size: 26px; font-weight: 800; color: var(--accent); opacity: .6; flex: none; line-height: 1; }
.lit-hot-body { flex: 1; min-width: 0; }
.lit-hot-body h4 { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.lit-hot-body p { margin: 0; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lit-hot-arrow { color: var(--primary); font-size: 18px; }
.lit-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.lit-tag-chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff; color: var(--primary); font-size: 13px; text-decoration: none; transition: .2s; }
.lit-tag-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.lit-tag-chip small { color: var(--ink-3); margin-left: 4px; }
.lit-tag-chip:hover small { color: rgba(255,255,255,.8); }
.lit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.lit-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; transition: .2s; }
.lit-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.lit-card-cover { width: 86px; height: 116px; flex: none; border-radius: 8px; overflow: hidden; background: var(--primary-light); }
.lit-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.lit-card-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lit-card-body time { font-size: 11px; color: var(--accent); }
.lit-card-body h3 { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.4; }
.lit-card:hover .lit-card-body h3 { color: var(--primary); }
.lit-card-body p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lit-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.lit-card-tags span { font-size: 10px; color: var(--primary); }
.lit-cross { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 50px; padding: 26px 30px; border-radius: var(--radius); background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; }
.lit-cross h2 { margin: 0 0 8px; font-size: 19px; }
.lit-cross p { margin: 0; font-size: 13px; opacity: .85; }
.lit-cross .resume-reading { background: #fff; color: var(--primary); padding: 10px 22px; border-radius: var(--radius-pill); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
@media (max-width: 768px) {
  .lit-page { padding: 16px 12px 50px; }
  .lit-hero h1 { font-size: 26px; }
  .lit-lead { font-size: 13px; }
  .lit-feature { flex-direction: column; gap: 16px; padding: 14px; }
  .lit-feature-cover { width: 100%; height: 180px; }
  .lit-feature-body h3 { font-size: 19px; }
  .lit-section-title { margin: 28px 0 14px; }
  .lit-section-title h2 { font-size: 17px; }
  .lit-grid { grid-template-columns: 1fr; }
  .lit-cross { padding: 20px; }
  .lit-cross h2 { font-size: 16px; }
}
html.night-mode .lit-feature, html.night-mode .lit-hot-item,
html.night-mode .lit-tag-chip, html.night-mode .lit-card { background: #1c252b !important; border-color: #33454e !important; }
html.night-mode .lit-hero h1, html.night-mode .lit-section-title h2,
html.night-mode .lit-feature-body h3, html.night-mode .lit-hot-body h4,
html.night-mode .lit-card-body h3 { color: #e2e8ea !important; }

/* ---------- 文学文章页 ---------- */
.article-hero-img { margin: 0 0 24px; text-align: center; }
.article-hero-img img { max-width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.article-more { display: grid; gap: 8px; }
.article-more a { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-2); text-decoration: none; font-size: 14px; transition: .2s; }
.article-more a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.article-more a span { color: var(--accent); }

/* ============================================================
 * 阅读页（文章内容页）体验：舒适排版 + 悬浮目录抽屉 + 工具栏
 * ============================================================ */
.reading-article { max-width: 860px; margin: 0 auto; padding: 26px 20px 60px; }
.reading-head { text-align: center; padding: 10px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.reading-book { color: var(--primary); font-size: 13px; text-decoration: none; }
.reading-book:hover { text-decoration: underline; }
.reading-head h1 { margin: 12px 0 14px; font-size: 26px; line-height: 1.4; color: var(--ink); }
.reading-meta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.reading-meta span { display: inline-flex; align-items: center; }
.reading-meta span + span::before { content: '·'; margin-right: 16px; color: var(--line); }
.reading-body { font-size: 18px; line-height: 2; color: var(--ink); letter-spacing: .3px; }
.reading-body p { margin: 0 0 1.2em; text-indent: 2em; }
.reading-body h2, .reading-body h3 { margin: 1.6em 0 .8em; color: var(--primary-dark); text-indent: 0; }
.reading-body img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 16px auto; }
.reading-next { margin: 40px 0 22px; padding: 24px; text-align: center; background: var(--primary-light); border-radius: var(--radius); }
.reading-next > span { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.reading-nav { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.reading-nav .chapter-nav-btn small { color: var(--ink-3); margin-left: 4px; font-size: 11px; }

/* 目录抽屉 */
.toc-mask { position: fixed; inset: 0; z-index: 1200; background: rgba(20,30,34,.5); opacity: 0; visibility: hidden; transition: .28s; }
.toc-mask.show { opacity: 1; visibility: visible; }
.toc-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1201;
  width: min(86vw, 380px); background: #fff; box-shadow: -6px 0 30px rgba(0,0,0,.16);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.toc-drawer.open { transform: translateX(0); }
.toc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 20px 14px; border-bottom: 1px solid var(--line); }
.toc-head h2 { margin: 0; font-size: 17px; color: var(--primary-dark); }
.toc-head p { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.toc-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink-2); font-size: 15px; cursor: pointer; }
.toc-close:hover { background: var(--accent-soft); color: var(--accent); }
.toc-progress { height: 3px; background: var(--bg); }
.toc-progress span { display: block; height: 100%; background: var(--grad, linear-gradient(90deg,var(--primary),var(--accent))); transition: width .3s; }
.toc-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.toc-list a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--ink-2); text-decoration: none; font-size: 14px; transition: .18s; }
.toc-list a:hover { background: var(--primary-light); color: var(--primary); }
.toc-list a.current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc-no { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--ink-3); font-size: 11px; }
.toc-list a.current .toc-no { background: var(--accent); color: #fff; }
.toc-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-reading { flex: none; font-size: 10px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent); color: #fff; }
.toc-foot { padding: 14px 20px; border-top: 1px solid var(--line); text-align: center; }
.toc-foot a { color: var(--primary); font-size: 13px; text-decoration: none; }

/* 右侧悬浮工具栏：⚙ 永远沉在最底，菜单从它上方弹出 */
.reading-tools {
  position: fixed; right: 18px; bottom: 26px; z-index: 900;
  display: flex; flex-direction: column-reverse; gap: 8px; align-items: center;
}
.reading-tools button {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: 0 3px 12px rgba(31,85,96,.14); transition: .2s; display: grid; place-items: center;
  line-height: 1; white-space: nowrap; position: relative;
}
.reading-tools button:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.reading-tools button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 主开关：桌面隐藏，手机显示 */
.reading-tools > .tools-toggle {
  display: none; background: var(--primary) !important; color: #fff !important;
  border-color: var(--primary) !important; box-shadow: 0 4px 16px rgba(43,111,124,.4) !important;
}
/* ⚙ 上的阅读进度环：常驻时一眼看到读到哪 */
.tools-toggle .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.tools-toggle .ring-bg { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 3; }
.tools-toggle .ring-fg {
  fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 131.95; stroke-dashoffset: 131.95; transition: stroke-dashoffset .2s linear;
}
.tools-toggle .tools-icon { position: relative; z-index: 1; }
.tools-panel { display: flex; flex-direction: column; gap: 8px; }
@keyframes sku-tool-in { from { opacity: 0; transform: translateY(10px) scale(.8); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) {
  .reading-tools { right: 14px; bottom: 20px; gap: 9px; }
  .reading-tools > .tools-toggle { display: grid !important; width: 52px !important; height: 52px !important; }
  .tools-panel {
    display: flex; flex-direction: column; gap: 6px; align-items: center;
    /* 默认收起，挂在 ⚙ 上方 */
    opacity: 0; visibility: hidden; transform: translateY(14px) scale(.85); transform-origin: bottom center;
    transition: opacity .2s, transform .26s cubic-bezier(.34,1.4,.64,1), visibility .2s; pointer-events: none;
  }
  .reading-tools.expanded .tools-panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  /* 展开时按钮自下而上依次浮现 */
  .reading-tools.expanded .tools-panel button { animation: sku-tool-in .26s both; }
  .reading-tools.expanded .tools-panel button:nth-child(1) { animation-delay: .01s; }
  .reading-tools.expanded .tools-panel button:nth-child(2) { animation-delay: .03s; }
  .reading-tools.expanded .tools-panel button:nth-child(3) { animation-delay: .05s; }
  .reading-tools.expanded .tools-panel button:nth-child(4) { animation-delay: .07s; }
  .reading-tools.expanded .tools-panel button:nth-child(5) { animation-delay: .09s; }
  .reading-tools.expanded .tools-panel button:nth-child(6) { animation-delay: .11s; }
  .reading-tools button { width: 44px; height: 44px; font-size: 15px; }
}

/* ============ 夜间模式：全站统一（html.night-mode，head 脚本提前设置防闪烁） ============ */
html.night-mode, html.night-mode body {
  background: #141a1e !important; color: #c8d0d4;
}
/* 顶栏/logo/搜索区 */
html.night-mode .huabenheader,
html.night-mode .HuabenNavTop,
html.night-mode .TopNav,
html.night-mode .TopButtons { background: #1c252b !important; border-bottom-color: #2b6f7c !important; }
html.night-mode .hlogo img { filter: brightness(0) invert(1) opacity(.88); }
html.night-mode .searchForm,
html.night-mode .searchNavTop { background: #1c252b !important; }
html.night-mode .searchForm input,
html.night-mode .searchNavTop input { background: #243038 !important; color: #e2e8ea !important; border-color: #33454e !important; }
html.night-mode .searchForm input::placeholder,
html.night-mode .searchNavTop input::placeholder { color: #6d7d85; }
html.night-mode .sku-top-icon,
html.night-mode .sku-theme-desktop { color: #b9c6cc !important; }
/* 导航条 */
html.night-mode .HuabenNav { background: #162026 !important; }
html.night-mode .HuabenNav .navTab li a span { color: #9fb0b8 !important; }
html.night-mode .HuabenNav .navTab li.active span,
html.night-mode .HuabenNav .navTab li a:hover span { color: #fff !important; }
/* 分类导航条 / 页脚 / 通用容器 */
html.night-mode .HuabenCatalogList { background: #1c252b !important; }
html.night-mode .HuabenCatalogList ul li a { color: #9fb0b8 !important; }
html.night-mode .HuabenCatalogList .huaben-btn { background: #243038 !important; color: #9fb0b8 !important; border-color: #33454e !important; }
html.night-mode footer, html.night-mode footer * { background: #141a1e !important; color: #84939b !important; }
html.night-mode .container,
html.night-mode main,
html.night-mode section { background: transparent !important; }
/* 横幅：夜间保留渐变但降亮度，文字仍白 */
html.night-mode .sku-hero-banner { filter: brightness(.82); }
/* 卡片 / 列表 / 网格 */
html.night-mode .cat-card, html.night-mode .search-card, html.night-mode .article-more a,
html.night-mode .chapter-list li, html.night-mode .recent-item, html.night-mode .rank-row,
html.night-mode .sku-book-hero, html.night-mode .sku-quick-nav a, html.night-mode .cat-chip,
html.night-mode .rank-tab, html.night-mode .chapter-nav-btn, html.night-mode .resume-reading,
html.night-mode .sku-float button, html.night-mode .reading-tools button {
  background: #1c252b !important; color: #c8d0d4 !important; border-color: #33454e !important;
}
html.night-mode .cat-chip.active, html.night-mode .rank-tab.active,
html.night-mode .chapter-nav-btn.primary, html.night-mode .resume-reading {
  background: #2b6f7c !important; color: #fff !important; border-color: #2b6f7c !important;
}
html.night-mode .cat-card-body h3, html.night-mode .search-card h4,
html.night-mode .rank-info strong, html.night-mode .sku-book-info h1,
html.night-mode .reading-head h1, html.night-mode .reading-body,
html.night-mode .sku-section-title h2 { color: #e2e8ea !important; }
html.night-mode .cat-card-body p, html.night-mode .search-card p,
html.night-mode .rank-info small, html.night-mode .sku-book-meta,
html.night-mode .sku-book-summary, html.night-mode .cat-head p,
html.night-mode .reading-meta, html.night-mode .cat-crumb { color: #8a969c !important; }
html.night-mode h1, html.night-mode h2, html.night-mode h3, html.night-mode h4 { color: #d8e0e4; }

/* ============ 夜间全局兜底：深底上原文的墨青/深灰文字统一提亮 ============ */
/* 链接与可点击元素：用亮青 #7fc4d1 替代墨青 var(--primary)（深底上清晰） */
html.night-mode main a,
html.night-mode aside a,
html.night-mode .lit-tag-chip,
html.night-mode .sku-tag,
html.night-mode .cat-card-cta,
html.night-mode .reading-book,
html.night-mode .toc-foot a,
html.night-mode .article-more a,
html.night-mode .search-card-meta span { color: #7fc4d1 !important; }
/* 兜底：任何还残留 var(--primary)/深灰的普通文字（标签、小字、图标字）提亮为浅灰蓝 */
html.night-mode .lit-tag,
html.night-mode .lit-card-tags span,
html.night-mode .rank-info small,
html.night-mode .sku-book-meta,
html.night-mode .cat-filter-label,
html.night-mode .cat-crumb strong,
html.night-mode .text-lightgrey,
html.night-mode .text-muted,
html.night-mode small,
html.night-mode time { color: #9fb0b8 !important; }
/* 首页/书籍页可能残留的纯黑/深灰行内文字 */
html.night-mode main div,
html.night-mode main span,
html.night-mode main p { color: #b9c6cc; }
/* 但上述兜底不能覆盖刻意设计的强调色：重新声明高优先级 */
html.night-mode .lit-kicker, html.night-mode .lit-card-body time,
html.night-mode .cat-card-cta, html.night-mode .rank-cta,
html.night-mode .sku-hit, html.night-mode mark { color: #ffb454 !important; }
html.night-mode .lit-badge, html.night-mode .badge { color: #ff9b7a !important; }

/* 排行榜夜间专属：标题（去掉内联色后用 class 控制）+ 名次圆圈降亮度 */
.rank-page-title { font-size: 26px; margin: 0 0 6px; color: var(--primary-dark); }
html.night-mode .rank-page-title { color: #e2e8ea !important; }
/* 数字 1-3：夜间用低饱和墨青底+暖色字，不再刺眼亮黄 */
html.night-mode .rank-num.top {
  background: #2a3d46 !important; color: #ffb454 !important;
  box-shadow: inset 0 0 0 1px rgba(255,180,84,.4) !important;
}
html.night-mode .rank-num.top:nth-child(1) { background: #3a3120 !important; color: #ffc86b !important; }
/* 数字 4+：深色底浅字，融入夜间界面 */
html.night-mode .rank-num:not(.top) { background: #243038 !important; color: #9fb0b8 !important; }
/* 榜单行边框夜间化 */
html.night-mode .rank-row { border-bottom-color: #2a363d !important; }
html.night-mode p, html.night-mode li, html.night-mode span, html.night-mode small { color: #b9c6cc; }
html.night-mode hr, html.night-mode .cat-filter, html.night-mode .reading-head { border-color: #33454e !important; }
/* 阅读区专用 */
html.night-mode .reading-article { background: #141a1e !important; color: #c8d0d4; }
html.night-mode .reading-body p { color: #c2cbcf; }
html.night-mode .reading-next { background: #1c252b !important; }
html.night-mode .reading-next > span { color: #8a969c; }
html.night-mode .sku-tag { background: #243038 !important; color: #7fc4d1 !important; }
/* 目录抽屉 / 工具栏 */
html.night-mode .toc-drawer, html.night-mode .toc-head, html.night-mode .toc-foot { background: #1c252b !important; border-color: #33454e !important; }
html.night-mode .toc-list a { color: #c8d0d4 !important; }
html.night-mode .toc-list a.current { background: #243038 !important; color: #ff9b7a !important; }
html.night-mode .toc-close { background: #243038 !important; color: #c8d0d4 !important; }
/* 夜间模式按钮：月亮/太阳图标切换 */
.theme-icon-sun { display: none; }
html.night-mode .theme-icon-moon { display: none; }
html.night-mode .theme-icon-sun { display: inline-flex; }
html.night-mode [data-theme-toggle].active { color: #ffb454 !important; }

@media (max-width: 768px) {
  .chapter-list { grid-template-columns: repeat(2, 1fr); }
  .sku-float { right: 12px; bottom: 16px; }
  .rank-tab { padding: 7px 14px; font-size: 12px; }
  .rank-cover { width: 44px; height: 58px; }
  .rank-cta { display: none; }
  .reading-article { padding: 18px 15px 50px; }
  .reading-head h1 { font-size: 21px; }
  .reading-meta { gap: 10px; font-size: 11px; }
  .reading-meta span + span::before { margin-right: 10px; }
  .reading-body { font-size: 17px; line-height: 1.9; }
  .reading-nav .chapter-nav-btn { flex: 1; padding: 10px 8px; font-size: 13px; }
  .toc-drawer { width: min(88vw, 360px); }
  .toc-list a { padding: 12px 16px; }
}
