/* =====================================================================
   LIBRA · P04 馆藏检索 / P05 馆藏详情 / P06 馆藏发现 / P07 我的书房
   页面专属样式；基础组件（.card/.btn/.badge/.cover/.timeline/.table）复用 libra.css
   ===================================================================== */

/* ------------------------------------------------------------------ 封面标识
   74×104 封面内宽约 56px，需缩小字号并允许 "LIBRA COLLECTION" 折成两行 */
.cover:not(.large) span {
  display: block;
  max-width: 100%;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.cover.sm span {
  font-size: 6.5px;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ P04 检索条 */
.cat-search {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px 13px 20px;
  background: linear-gradient(180deg, var(--card-b), var(--card-b));
}
.cat-search-ico {
  color: var(--faint);
  display: grid;
  place-items: center;
  flex: none;
  margin-left: 2px;
}
.cat-search-ico svg { width: 18px; height: 18px; }
.cat-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}
.cat-input::placeholder { color: var(--line-hover); }
.cat-ai-btn { height: 40px; padding: 0 24px; flex: none; }
.cat-ai-btn:disabled { opacity: 0.7; }

/* ------------------------------------------------------------------ P04 布局 / 筛选 */
.cat-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}
.cat-filter {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  padding: 18px;
  z-index: 6;
}
.cat-fgroups { display: flex; flex-direction: column; gap: 10px; }
.cat-fg { position: relative; }
.cat-chip {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  transition: 0.16s;
}
.cat-chip:hover { border-color: var(--line-hover); color: var(--line-hover); }
.cat-chip > span { color: var(--faint); }
.cat-chip b {
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--line-hover);
  font-weight: 600;
}
.cat-fg.is-on .cat-chip { border-color: var(--line-hover); background: var(--nav-active); }
.cat-fg.is-on .cat-chip > span { color: var(--line-hover); }
.cat-chip-arrow {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transform: rotate(90deg);
  transition: 0.16s;
  flex: none;
  margin-left: 2px;
}
.cat-fg.open .cat-chip-arrow { transform: rotate(-90deg); opacity: 1; }
.cat-pop {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  z-index: 40;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border-radius: 12px;
  background: var(--card-b);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.cat-fg.open .cat-pop { display: flex; }
.cat-pop .chip {
  height: 29px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: var(--row);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}
.cat-pop .chip em {
  font-style: normal;
  font-size: 9.5px;
  color: var(--line-hover);
  margin-left: 3px;
}
.cat-pop .chip.active {
  background: var(--line-strong);
  border-color: var(--line-hover);
  color: var(--text);
}
.cat-pop .chip.active em { color: var(--line-hover); }

/* ------------------------------------------------------------------ P04 结果头 */
.cat-results { min-width: 0; transition: opacity 0.15s; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.cat-results.cat-loading { opacity: 0.5; pointer-events: none; }
.cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 38px;
  margin-bottom: 14px;
}
.cat-count { font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.cat-count b {
  font-size: 19px;
  color: var(--text);
  font-weight: 650;
  margin: 0 2px;
  letter-spacing: -0.01em;
}
.cat-q {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  margin-left: 5px;
  color: var(--faint);
  font-size: 11.5px;
}
.cat-tabs { margin-left: auto; }
.cat-tabs button { height: 30px; }
.cat-view {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-left: 8px;
  border-radius: 10px;
  background: var(--input);
  border: 1px solid var(--track);
}
.cat-view button {
  width: auto;
  min-width: 60px;
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  transition: 0.15s;
}
.cat-view button:hover { color: var(--text-2); }
.cat-view button.active { background: var(--chip-bg); color: var(--text); }
.cat-view svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ P04 图书卡 */
.cat-books.is-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.cat-books.is-list { display: flex; flex-direction: column; gap: 10px; }
.cat-book {
  padding: 15px;
  cursor: pointer;
  transition: 0.18s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  outline: none;
}
.cat-book:hover,
.cat-book:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-hover);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}
.cat-book .book-main { gap: 13px; }
.cat-book .cover { width: 78px; height: 110px; }
.cat-book-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cat-book .book-title {
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-book .book-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-avail {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  vertical-align: middle;
}
.cat-avail svg { width: 11px; height: 11px; flex: none; }
.cat-book .book-foot { margin-top: auto; gap: 8px; }
.cat-hit {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover.sm {
  width: 52px;
  height: 74px;
  border-radius: 6px;
  padding: 7px;
}
.cover.sm span { font-size: 7px; letter-spacing: 0.07em; }

.cat-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 16px;
  cursor: pointer;
  transition: 0.16s;
  outline: none;
}
.cat-row:hover,
.cat-row:focus-visible { border-color: var(--line-hover); background: var(--card-b); }
.cat-row-main { flex: 1; min-width: 0; }
.cat-row-main .book-title { font-size: 14.5px; margin-bottom: 3px; }
.cat-row-main .book-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cat-row-tags .badge { padding: 1px 8px; font-size: 10px; }
.cat-row-side {
  flex: none;
  max-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.cat-row-side .cat-hit { max-width: 190px; font-size: 10.5px; color: var(--faint); }

/* ------------------------------------------------------------------ P04 AI 解析 */
.cat-ai {
  margin-bottom: 14px;
  padding: 15px 18px;
  border-color: #3b2f60;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.13), rgba(15, 21, 30, 0.88));
}
.cat-ai-top { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.cat-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.38);
  color: #c9b6ff;
  font-size: 10.5px;
  font-weight: 600;
}
.cat-ai-badge svg { width: 13px; height: 13px; }
.cat-ai-text { font-size: 13px; line-height: 1.7; color: #ded4ff; }
.cat-ai-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.cat-ai-row .chip { height: 26px; padding: 0 10px; font-size: 10.5px; }
.cat-ai-more { margin-top: 9px; font-size: 10.5px; color: #8f84b5; }

/* ------------------------------------------------------------------ P04 分页 */
.cat-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}
.cat-page {
  height: 32px;
  min-width: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--row);
  color: var(--muted);
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: 0.15s;
}
.cat-page:hover:not(:disabled) { border-color: var(--line-hover); color: var(--line-hover); }
.cat-page:disabled { opacity: 0.35; cursor: not-allowed; }
.cat-page.num { padding: 0 10px; }
.cat-page.active {
  background: #4a6cf4;
  border-color: #6788ff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 108, 244, 0.3);
}
.cat-page svg { width: 13px; height: 13px; }
.cat-page-dots { color: var(--faint); padding: 0 2px; font-size: 11px; }

/* ------------------------------------------------------------------ P05 详情 */
.bd-card {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 36px;
  padding: 26px;
  align-items: start;
}
.bd-cover-wrap {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: radial-gradient(circle at 50% 16%, var(--chip-bg), var(--bg-deep) 72%);
}
.bd-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 0.72;
  min-height: 420px;
  padding: 24px;
  gap: 8px;
  border-radius: 10px;
}
.bd-cover b {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 650;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  letter-spacing: 0.01em;
}
.bd-cover span { font-size: 9.5px; letter-spacing: 0.16em; opacity: 0.85; }
.bd-body { min-width: 0; padding-top: 4px; }
.bd-title {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.bd-meta { color: var(--muted); font-size: 13px; }
.bd-badges { margin-top: 14px; gap: 8px; }
.bd-sec { margin-top: 24px; }
.bd-sec > h3 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; }
.bd-sec > p {
  margin: 0;
  max-width: 660px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.95;
}

.bd-shelf-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}
.bd-shelf-col { min-width: 0; }
.bd-map {
  padding: 15px 17px;
  border-radius: 12px;
  border: 1px solid var(--chip-bg);
  background: linear-gradient(180deg, var(--card-b), var(--bg-deep));
}
.bd-map-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--text-2);
  font-size: 11.5px;
}
.bd-map-head b { font-weight: 600; }
.bd-map-head .small { margin-left: auto; }
.bd-map-pin { color: #b79bff; display: grid; place-items: center; }
.bd-map-pin svg { width: 13px; height: 13px; }
.bd-shelves { display: flex; flex-direction: column; gap: 10px; }
.bd-shelf-line { display: flex; align-items: center; gap: 4px; height: 9px; }
.bd-shelf-line i {
  flex: 1;
  height: 5px;
  border-radius: 2px;
  background: var(--chip-bg);
  transition: 0.2s;
}
.bd-shelf-line.is-layer i { background: var(--nav-active); }
.bd-shelf-line i.hit {
  flex: 0 0 34px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #b79bff, #7c5cf0);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.28), 0 0 16px rgba(139, 92, 246, 0.5);
}
.bd-map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  color: var(--faint);
  font-size: 10.5px;
}
.bd-map.flash { animation: bdFlash 1.4s ease; }
@keyframes bdFlash {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5), 0 0 30px rgba(139, 92, 246, 0.3); }
}
.bd-loc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--text-2);
  font-size: 12px;
}
.bd-loc i { font-style: normal; color: var(--line-hover); }
.bd-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.bd-btn { height: 44px; padding: 0 12px; font-size: 12.5px; }
.bd-btn svg { width: 15px; height: 15px; flex: none; }
.bd-avail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 1px 2px;
  min-height: 44px;
}
.bd-avail b { font-size: 22px; font-weight: 650; line-height: 1.15; letter-spacing: -0.01em; }
.bd-avail b small { font-size: 11.5px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.bd-avail b.is-free { color: #4fe0b4; }
.bd-avail b.is-none { color: var(--muted); }
.bd-notice { margin-top: 18px; }

.bd-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bd-rel {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px;
  border-radius: 11px;
  border: 1px solid var(--chip-bg);
  background: var(--input);
  transition: 0.16s;
}
.bd-rel:hover { border-color: var(--line-hover); background: var(--row); transform: translateY(-1px); }
.bd-rel .cover.sm { width: 42px; height: 60px; flex: none; }
.bd-rel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bd-rel-main b {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bd-rel-main span {
  font-size: 10.5px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bd-rel > svg { width: 13px; height: 13px; color: var(--faint); flex: none; }

/* ------------------------------------------------------------------ P06 发现 */
.dc-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 32px 36px;
  border-color: var(--line-strong);
  background:
    radial-gradient(900px 420px at 16% 0%, rgba(91, 124, 250, 0.17), transparent 62%),
    linear-gradient(135deg, var(--row), var(--bg-deep) 66%);
}
.dc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(480px 240px at 90% 22%, rgba(139, 92, 246, 0.17), transparent 66%);
}
.dc-hero-main { position: relative; z-index: 1; min-width: 0; }
.dc-eyebrow {
  color: #9db1ff;
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 600;
  text-transform: uppercase;
}
.dc-eyebrow i { font-style: normal; color: var(--line-hover); margin: 0 3px; }
.dc-slogan {
  margin: 14px 0 12px;
  max-width: 700px;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dc-desc {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}
.dc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.dc-tabs .chip { height: 34px; cursor: pointer; }
.dc-hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 26px;
}
.dc-shuffle { background: rgba(18, 26, 38, 0.82); }
.dc-spines { display: flex; align-items: flex-end; gap: 9px; }
.dc-spine {
  display: block;
  flex: none;
  position: relative;
  width: 42px;
  height: 138px;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 15px 28px rgba(0, 0, 0, 0.42);
  transition: 0.2s;
  animation: dcSpineIn 0.55s ease backwards;
}
.dc-spine::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(255, 255, 255, 0.2);
}
.dc-spine span {
  position: absolute;
  inset: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 6.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
}
.dc-spine::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
}
.dc-spine:hover { transform: translateY(-8px); box-shadow: 0 22px 36px rgba(0, 0, 0, 0.5); }
.dc-spine.blue { background: linear-gradient(160deg, #4d6fd8, var(--line-hover)); }
.dc-spine.purple { background: linear-gradient(160deg, #8a5cf0, #5c3aa8); }
.dc-spine.green { background: linear-gradient(160deg, #2fa885, #1c6d58); }
.dc-spine.orange { background: linear-gradient(160deg, #c07a44, #8a5127); }
@keyframes dcSpineIn {
  from { opacity: 0; transform: translateY(18px) scaleY(0.7); }
  to { opacity: 1; transform: none; }
}
.dc-wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 14px;
}
.dc-wall-head h3 { margin: 0; font-size: 20px; font-weight: 650; }
.dc-wall-head .link { display: inline-flex; align-items: center; gap: 4px; }
.dc-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.dc-book {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  cursor: pointer;
  transition: 0.18s;
  animation: fade 0.35s ease backwards;
  outline: none;
}
.dc-book:hover,
.dc-book:focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-hover);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}
.dc-stage {
  height: 132px;
  display: grid;
  place-items: center;
  perspective: 700px;
  margin-bottom: 2px;
}
.dc-cover {
  width: 84px;
  height: 120px;
  transform-style: preserve-3d;
  transition: transform 0.18s ease;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.45);
}
.dc-book-title {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-book-tag { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.dc-book-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}
.dc-tip { margin-top: auto; padding-top: 6px; font-size: 10px; color: var(--faint); }
.dc-book .btn { height: 34px; margin-top: 2px; }
.dc-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: #a98cff;
  font-size: 11.5px;
}
.dc-note .cat {
  width: 30px;
  height: 30px;
  font-size: 8.5px;
  border-width: 1px;
  box-shadow: none;
  flex: none;
}

/* ------------------------------------------------------------------ P07 我的书房 */
.lib-stats { margin-bottom: 0; }
.lib-timeline-card .card-head { margin-bottom: 0; }
.lib-timeline { padding: 26px 6px 8px; overflow-x: auto; overflow-y: hidden; }
.lib-timeline::before { left: 4%; right: 4%; top: 67px; }
.lib-timeline .timeline-row { padding: 0 6px; }
.lib-timeline .tl-item {
  min-width: 140px;
  padding: 0 6px;
  border-radius: 10px;
  transition: 0.15s;
  color: inherit;
}
.lib-timeline .date {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
a.tl-item { border-radius: 10px; }
a.tl-item:hover { background: var(--tint-1); }
.lib-timeline .date { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.lib-timeline .date.is-red { color: #ff9ba6; font-weight: 600; }
.lib-timeline .tl-tag {
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(242, 112, 127, 0.3);
  background: var(--red-soft);
  color: #ff9ba6;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.55;
  white-space: nowrap;
}
.lib-timeline .dot { margin-top: 14px; }
.lib-timeline .dot.red { background: var(--red); box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(242, 112, 127, 0.5); }
.lib-timeline .dot.amber { background: var(--amber); box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(240, 182, 75, 0.4); }
.lib-timeline .dot.green { background: var(--green); box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(53, 214, 164, 0.4); }
.lib-timeline .dot.blue { background: var(--blue); box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(91, 124, 250, 0.4); }
.lib-timeline .name {
  max-width: 150px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-table th { padding-top: 4px; }
.lib-table td { vertical-align: middle; }
.lib-table td b { font-size: 12.5px; }
.lib-table .actions { text-align: right; }
.lib-table .actions .btn { min-width: 78px; }
.lib-table .actions .faint { padding-right: 8px; }
.lib-red { color: #ff9ba6 !important; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1180px) {
  .cat-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .cat-books.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-card { grid-template-columns: 280px minmax(0, 1fr); gap: 26px; }
  .bd-cover { min-height: 360px; }
  .bd-shelf-row { grid-template-columns: 1fr; }
  .bd-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-hero { grid-template-columns: 1fr; gap: 22px; }
  .dc-hero-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
  }
  .dc-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .cat-search { padding: 10px 12px; gap: 9px; }
  .cat-ai-btn { padding: 0 14px; }
  .cat-ai-btn svg { display: none; }
  .cat-layout { grid-template-columns: 1fr; }
  .cat-filter { position: static; }
  .cat-fgroups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-books.is-grid { grid-template-columns: 1fr; }
  .cat-row { flex-wrap: wrap; gap: 12px; }
  .cat-row-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: none;
  }
  .cat-row-side .cat-hit { max-width: none; }
  .cat-tabs { order: 3; width: 100%; overflow-x: auto; }
  .cat-view { margin-left: auto; }
  .bd-card { grid-template-columns: 1fr; padding: 18px; gap: 22px; }
  .bd-cover-wrap { max-width: 340px; margin: 0 auto; width: 100%; }
  .bd-cover { min-height: 0; height: auto; aspect-ratio: 0.72; }
  .bd-title { font-size: 26px; }
  .bd-related { grid-template-columns: 1fr; }
  .dc-hero { padding: 24px; }
  .dc-slogan { font-size: 25px; }
  .dc-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-spine { width: 36px; height: 118px; }
}

@media (max-width: 560px) {
  .cat-fgroups { grid-template-columns: 1fr; }
  .cat-tabs { width: 100%; }
  .dc-wall { grid-template-columns: 1fr; }
  .dc-hero-side { align-items: flex-start; }
  .bd-actions { grid-template-columns: 1fr; }
  .bd-avail { min-height: 0; padding: 6px 2px; }
  .lib-timeline .tl-item { min-width: 120px; }
}

/* ------------------------------------------------------------------ 宽屏：筛选项更宽、结果区更密 */
@media (min-width: 1600px) {
  .cat-layout { grid-template-columns: 272px minmax(0, 1fr); gap: 22px; }
  .cat-filter { padding: 20px; }
  .cat-books.is-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1920px) {
  .cat-layout { grid-template-columns: 284px minmax(0, 1fr); gap: 24px; }
  .cat-book .book-title { font-size: 15px; }
}
@media (min-width: 2200px) {
  .cat-layout { grid-template-columns: 296px minmax(0, 1fr); }
  .cat-books.is-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* ------------------------------------------------------------------ 我的收藏 */
.lib-fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lib-fav {
  display: flex; gap: 12px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--line-soft); background: var(--row);
  text-decoration: none; color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.lib-fav:hover { border-color: var(--line-hover); transform: translateY(-1px); }
.lib-fav-cover {
  width: 46px; height: 62px; flex: none; border-radius: 8px;
  display: grid; place-items: center; text-align: center;
  font-size: 11px; font-weight: 650; line-height: 1.15; color: #fff;
  background: linear-gradient(160deg, #5b7cfa, #8b5cf6);
  box-shadow: 0 6px 14px rgba(91, 124, 250, 0.22);
}
.lib-fav-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lib-fav-info b { font-size: 13px; line-height: 1.35; }
