/* ============================================================
 * Candy Theme — 图书馆列表页（对齐 library-list-preview.html）
 * 作用域 .lib-* / .lb-*：避开 museum.css 的 .lib-section 同名冲突（禁四）
 * 全 Token，零裸 hex（§18.20）；零内联（§18.1）
 * ============================================================ */

/* ---------- 分类筛选药丸 ---------- */
.lib-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 18px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}
.lib-pill {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    text-decoration: none;
}
.lib-pill:hover { border-color: var(--gold); color: var(--gold); }
.lib-pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- 分类分组 ---------- */
.lib-wrap { padding-bottom: 40px; }
.lib-list-sec { margin-bottom: 34px; }
.lib-list-sec:last-child { margin-bottom: 0; }
.sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.sec-head h2 {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sec-head h2 .sn {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--faint);
    font-weight: 400;
    margin-left: 2px;
}
.sec-head .more { font-size: 13px; color: var(--faint); cursor: pointer; transition: var(--transition); text-decoration: none; }
.sec-head .more:hover { color: var(--gold); }

/* ---------- 书目列表 ---------- */
.lb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
.lb-book {
    display: flex;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.lb-book:hover { box-shadow: var(--shadow-hover); border-color: var(--gold-soft); }
.lb-cover {
    width: 56px;
    height: 76px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-deeper);
}
.lb-cover img { width: 100%; height: 100%; object-fit: cover; }
.lb-fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    font-family: var(--serif); font-size: 18px; color: var(--muted);
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-deeper));
}
.lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-title {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
    line-height: 1.4;
}
.lb-author { font-size: 12.5px; color: var(--faint); margin-bottom: 4px; }
.lb-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.lb-cat {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
}
.lb-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lb-book .feat-card-acts {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    gap: 12px;
}

/* ---------- 对齐设计稿：图书馆列表无「视图切换」，隐藏通用切换器避免死开关（禁五） ---------- */
.page-library-list .ft-view { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
    .lb-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .lb-book { flex-direction: column; }
    .lb-cover { width: 100%; height: auto; aspect-ratio: 3 / 4; max-height: 160px; }
}
