/* 书报合辑 分类页/书目录页 —— 微信读书式（封面书架 + 书籍详情Hero）。
   随阅读器主题(html[data-bk-theme] 变量 --bk-*)。配合 reader-toc.js v8。 */

/* ── 单本书页：书籍详情 Hero ── */
.bk-hero{ display:flex; gap:26px; padding:24px 20px 20px; max-width:840px; margin:0 auto; align-items:flex-start; }
.bk-hero-cover{ flex:0 0 132px; width:132px; height:180px; border-radius:8px; box-shadow:0 10px 26px rgba(0,0,0,.28);
  display:flex; align-items:center; justify-content:center; color:#fff; position:relative; overflow:hidden; }
.bk-hero-cover::before{ content:""; position:absolute; left:6px; top:0; bottom:0; width:1.5px; background:rgba(255,255,255,.28); }
.bk-hero-cover em{ font-style:normal; font-family:"Songti SC","Noto Serif SC",STSong,serif; font-size:19px; font-weight:700;
  line-height:1.4; text-align:center; padding:0 12px; text-shadow:0 1px 3px rgba(0,0,0,.32);
  display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.bk-hero-main{ flex:1; min-width:0; padding-top:8px; }
.bk-hero-t{ margin:0 0 8px; font-size:24px; font-weight:700; color:var(--bk-fg); font-family:"Songti SC","Noto Serif SC",serif; line-height:1.3; }
.bk-hero-sub{ font-size:13.5px; color:var(--bk-muted); margin-bottom:22px; }
.bk-hero-btns{ display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.bk-btn{ display:inline-flex; align-items:center; justify-content:center; height:42px; padding:0 30px; border-radius:22px;
  font-size:15.5px; font-weight:600; text-decoration:none; -webkit-tap-highlight-color:transparent; }
.bk-btn.primary{ background:var(--bk-gold); color:#fff; }
.bk-btn.primary:active{ filter:brightness(.94); }
.bk-btn.ghost{ background:var(--bk-fill); color:var(--bk-fg); }

/* 在读/读完 状态徽章 + 读完切换按钮(随主题) */
.bk-hero-status{ display:flex; align-items:center; gap:11px; flex-wrap:wrap; margin:-6px 0 18px; }
.bk-stbadge{ font-size:12.5px; font-weight:600; padding:3px 11px; border-radius:20px; line-height:1.55; white-space:nowrap; }
.bk-stbadge.ing{ background:var(--bk-fill); color:var(--bk-gold); }
.bk-stbadge.fin{ background:rgba(46,160,96,.15); color:#2ea060; }
.bk-stbadge.new{ background:var(--bk-fill); color:var(--bk-muted); }
.bk-stbtn{ background:transparent; border:1px solid var(--bk-line); color:var(--bk-muted); font:inherit; font-size:12.5px;
  padding:4px 13px; border-radius:20px; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bk-stbtn:active{ background:var(--bk-fill); }
.bk-shbtn.on{ border-color:var(--bk-gold); color:var(--bk-gold); }

/* 目录标题条 */
.bk-catbar{ display:flex; align-items:baseline; gap:10px; padding:2px 2px 10px; }
.bk-catttl{ font-size:17px; font-weight:700; color:var(--bk-fg); }
.bk-catn{ font-size:12.5px; color:var(--bk-muted); }

/* 目录列表（章节） */
.bk-chaplist{ max-width:840px; margin:0 auto; padding:0 12px 46px; }
.bk-chap{ display:flex; align-items:center; gap:14px; padding:14px 6px; border-bottom:1px solid var(--bk-line); text-decoration:none; }
.bk-chap:active{ background:var(--bk-fill); }
.bk-chap-n{ flex:0 0 26px; text-align:center; font-size:13px; color:var(--bk-muted); font-variant-numeric:tabular-nums; }
.bk-chap-t{ flex:1; min-width:0; font-size:16px; color:var(--bk-fg); line-height:1.42; }
.bk-chap.read .bk-chap-t{ color:var(--bk-muted); }
.bk-ch{ flex:0 0 8px; width:8px; height:14px; color:var(--bk-muted); opacity:.5; }
.bk-read-tag{ font-size:11px; color:var(--bk-gold); border:1px solid var(--bk-gold); border-radius:8px; padding:0 5px; margin-left:8px; opacity:.85; vertical-align:1px; white-space:nowrap; display:inline-block; }
.bk-sec-h{ font-size:13px; font-weight:700; color:var(--bk-gold); padding:16px 6px 6px; letter-spacing:.5px; }
/* 初信造就三册标题：提高层级与对比度，不改变其他书籍分组。 */
.bk-chuxin-volumes .bk-sec-h{ font-size:20px; line-height:1.5; color:#124e4a; padding:24px 6px 12px; }
html[data-bk-theme="night"] .bk-chuxin-volumes .bk-sec-h{ color:#8edbd1; }
@media(min-width:900px){ .bk-chuxin-volumes .bk-sec-h{ font-size:22px; } }

/* ── 分类页：封面书架网格 ── */
.bk-shelf{ display:grid; grid-template-columns:repeat(auto-fill,minmax(138px,1fr)); gap:26px 16px; max-width:980px; margin:0 auto; padding:10px 12px 48px; justify-items:center; box-sizing:border-box; }
.bk-category-tools{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; max-width:980px; margin:0 auto; }
.bk-view-toggle{ display:flex; gap:3px; padding:3px; border:1px solid var(--bk-line); border-radius:12px; background:var(--bk-fill); }
.bk-view-toggle button{ display:flex; min-width:54px; height:38px; align-items:center; justify-content:center; gap:4px; padding:0 8px; border:0; border-radius:9px; background:transparent; color:var(--bk-muted); font:600 12px/1 inherit; }
.bk-view-toggle button.on{ background:var(--bk-sheet); color:var(--bk-fg); box-shadow:0 2px 7px rgba(44,34,20,.09); }
.bk-view-toggle svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* 默认列表：书号 → 书名 → 作者，密度适合快速查找；封面视图仍可一键切回。 */
.bk-shelf.is-list{ display:block; width:100%; max-width:980px; padding:6px 12px 48px; justify-items:stretch; }
.bk-booklist{ display:grid; width:100%; grid-template-columns:72px minmax(0,1fr) 44px 20px; align-items:center; gap:8px; min-height:78px; border-bottom:1px solid color-mix(in srgb,var(--bk-line) 88%,var(--bk-fg)); }
.bk-list-no{ color:var(--bk-gold); font-size:13px; font-weight:750; font-variant-numeric:tabular-nums; text-align:left; }
.bk-list-main{ display:grid; min-width:0; gap:3px; padding:13px 0; text-decoration:none; }
.bk-list-title{ color:var(--bk-fg); font-size:16px; font-weight:700; line-height:1.4; }
.bk-list-author{ color:var(--bk-sub); font-size:13px; line-height:1.4; }
.bk-list-progress{ width:min(150px,70%); height:3px; margin-top:4px; overflow:hidden; border-radius:2px; background:var(--bk-line); }
.bk-list-progress i{ display:block; height:100%; background:var(--bk-gold); }
.bk-booklist>.bk-star{ display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:10px; background:transparent; color:var(--bk-muted); font-size:21px; -webkit-tap-highlight-color:transparent; }
.bk-booklist>.bk-star.on{ border:0; color:var(--bk-gold); background:transparent; }
.bk-booklist>.bk-star:focus-visible{ outline:2px solid var(--bk-gold); outline-offset:1px; }
.bk-booklist>.bk-ch{ width:10px; height:16px; color:var(--bk-muted); opacity:.62; }
.book-search-field{ position:relative; display:flex; flex:1; min-width:0; height:100%; align-items:center; overflow:hidden; }
.book-search-field input{ position:relative; z-index:1; width:100%; }
.book-search-field.has-visual-hint input::placeholder{ color:transparent !important; }
.book-search-hint{ position:absolute; z-index:0; inset:0; display:none; align-items:center; overflow:hidden; color:var(--bk-muted); pointer-events:none; white-space:nowrap; }
.book-search-field.has-visual-hint .book-search-hint{ display:flex; }
.bk-category-tools .book-search-hint{ font:400 14px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
.bk-category-tools input::placeholder{ font-size:14px; }
.book-search-hint__text{ display:block; max-width:none; white-space:nowrap; }
.book-search-field.is-overflowing .book-search-hint__text{ animation:bookSearchHint var(--book-search-duration,10s) 1.2s ease-in-out infinite alternate; }
@keyframes bookSearchHint{ 0%,12%{transform:translateX(0)} 88%,100%{transform:translateX(var(--book-search-travel,0))} }
@media(prefers-reduced-motion:reduce){ .book-search-field.is-overflowing .book-search-hint__text{ animation:none; overflow:hidden; text-overflow:ellipsis; } }
.bk-bcard{ display:flex; flex-direction:column; align-items:center; text-decoration:none; width:120px; }
.bk-bcw{ position:relative; width:110px; margin:0 auto 11px; }
.bk-bcover{ width:110px; height:150px; border-radius:7px; box-shadow:0 7px 18px rgba(0,0,0,.24);
  display:flex; align-items:center; justify-content:center; color:#fff; position:relative; overflow:hidden; }
.bk-bcover::before{ content:""; position:absolute; left:5px; top:0; bottom:0; width:1.5px; background:rgba(255,255,255,.26); }
.bk-bcover em{ font-style:normal; font-family:"Songti SC","Noto Serif SC",STSong,serif; font-size:14.5px; font-weight:700;
  line-height:1.35; text-align:center; padding:0 9px; text-shadow:0 1px 3px rgba(0,0,0,.3);
  display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.bk-bpct{ position:absolute; top:6px; left:6px; background:rgba(0,0,0,.5); color:#fff; font-size:10px; font-weight:600; padding:1px 6px; border-radius:8px; letter-spacing:.3px; }
.bk-bprog{ position:absolute; left:0; right:0; bottom:0; height:4px; background:rgba(0,0,0,.28); }
.bk-bprog i{ display:block; height:100%; background:var(--bk-gold); }
.bk-bcw .bk-star{ position:absolute; top:5px; right:5px; width:24px; height:24px; border:none; border-radius:50%;
  background:rgba(0,0,0,.4); color:#fff; font-size:13px; line-height:1; cursor:pointer; padding:0; -webkit-tap-highlight-color:transparent; }
.bk-bcw .bk-star.on{ color:#ffd257; }
.bk-btitle{ font-size:14px; color:var(--bk-fg); font-weight:600; text-align:center; line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.bk-bmeta{ font-size:12px; color:var(--bk-muted); text-align:center; margin-top:3px; font-variant-numeric:tabular-nums; }

/* ── 手机适配 ── */
@media(max-width:600px){
  html.bk-toc-ready body{ padding-left:8px !important; padding-right:8px !important; }
  .bk-toctools{ padding:10px 4px 12px; }
  .bk-hero{ gap:16px; padding:18px 16px 16px; }
  .bk-hero-cover{ flex-basis:104px; width:104px; height:142px; }
  .bk-hero-cover em{ font-size:16px; }
  .bk-hero-t{ font-size:20px; }
  .bk-hero-sub{ margin-bottom:16px; }
  .bk-btn{ height:40px; padding:0 22px; font-size:15px; }
  .bk-chaplist{ padding:0 14px 40px; }
  .bk-shelf{ grid-template-columns:repeat(3,1fr); gap:20px 10px; padding:8px 12px 40px; }
  .bk-bcard{ width:100%; }
  .bk-bcw,.bk-bcover{ width:92px; }
  .bk-bcover{ height:126px; }
  .bk-bcover em{ font-size:13px; }
  .bk-btitle{ font-size:13px; max-width:100px; }
  .bk-category-tools{ grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  .bk-view-toggle button{ min-width:40px; padding:0 7px; }
  .bk-view-toggle button span{ display:none; }
  .bk-shelf.is-list{ padding:4px 8px 40px; }
  .bk-booklist{ grid-template-columns:60px minmax(0,1fr) 44px 16px; gap:6px; min-height:76px; }
  .bk-list-title{ font-size:15.5px; }
}
@media(max-width:360px){
  .bk-shelf{ grid-template-columns:repeat(2,1fr); }
}

/* ── 电脑端(≥900px)：参微信读书 PC，充分利用整屏，别再像窄窄的手机版 ── */
@media(min-width:900px){
  /* 书籍详情 Hero：更大封面 + 更舒展的信息区 */
  .bk-hero{ max-width:1080px; gap:46px; padding:44px 40px 30px; align-items:center; }
  .bk-hero-cover{ flex-basis:190px; width:190px; height:258px; border-radius:9px; }
  .bk-hero-cover em{ font-size:25px; }
  .bk-hero-main{ padding-top:0; }
  .bk-hero-t{ font-size:34px; margin-bottom:14px; }
  .bk-hero-sub{ font-size:15px; margin-bottom:30px; }
  .bk-hero-btns{ gap:16px; }
  .bk-btn{ height:50px; padding:0 44px; font-size:16.5px; border-radius:25px; }

  /* 目录：两栏，充分利用宽度 */
  .bk-catbar{ max-width:1080px; margin:0 auto; padding:8px 40px 14px; }
  .bk-catttl{ font-size:19px; }
  .bk-chaplist{ max-width:1080px; padding:0 34px 64px; display:grid; grid-template-columns:1fr 1fr; column-gap:48px; align-content:start; }
  .bk-chaplist .bk-sec-h{ grid-column:1 / -1; }
  .bk-chap{ padding:15px 8px; }
  .bk-chap-t{ font-size:16.5px; }

  /* 分类书架：更多列 + 更大封面，铺满屏幕 */
  .bk-shelf{ max-width:1200px; grid-template-columns:repeat(auto-fill,minmax(152px,1fr)); gap:34px 22px; padding:18px 30px 60px; }
  .bk-bcard{ width:138px; }
  .bk-bcw{ width:130px; }
  .bk-bcover{ width:130px; height:178px; }
  .bk-bcover em{ font-size:16px; }
  .bk-btitle{ font-size:15px; }
  .bk-bmeta{ font-size:12.5px; }
}
/* 超宽屏(≥1400px)再放开一点 */
@media(min-width:1400px){
  .bk-hero, .bk-catbar, .bk-chaplist{ max-width:1200px; }
  .bk-shelf{ max-width:1320px; }
}
