/**
 * 书生著作列表卡片 — 对齐图示样式
 * 页面：sszz.html（body.book-list-page）
 * 结构：封面 | 书名线 / 简介 / 虚线购书信息
 * Token: #ede7d9 / #f6f3ec / #4a2d0d / #5c4a38 / #81603f / #be8853 / #d4c4a8
 */

body.book-list-page {
    background: #ede7d9;
}

body.book-list-page .book-list-shell {
    background: #ede7d9 !important;
    padding: 8px 0 28px !important;
}

body.book-list-page .mbx {
    margin: 18px 0 24px !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid #d4c4a8 !important;
    color: #5c4a38 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

body.book-list-page .mbx a {
    color: #81603f !important;
    text-decoration: none !important;
}

body.book-list-page .mbx a:hover {
    color: #b36d41 !important;
}

/* ========== 卡片（图示：浅米色底 + 细边 + 轻阴影） ========== */
body.book-list-page .k-list-box {
    margin-bottom: 0 !important;
}

body.book-list-page .k-list-box .item {
    display: flex !important;
    align-items: flex-start;
    gap: 32px;
    overflow: hidden;
    margin: 0 0 22px !important;
    padding: 26px 28px !important;
    background: #f6f3ec !important;
    border: 1px solid #e0d2ba !important;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(96, 56, 17, 0.08);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body.book-list-page .k-list-box .item:hover {
    background: #faf7f0 !important;
    border-color: #d2c0a0 !important;
    box-shadow: 0 6px 20px rgba(96, 56, 17, 0.12);
}

/* ========== 封面 ========== */
body.book-list-page .k-list-box .item .book-cover {
    float: none !important;
    flex: 0 0 176px;
    width: 176px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.book-list-page .k-list-box .item .book-cover img,
body.book-list-page .k-list-box .item > img {
    float: none !important;
    display: block;
    width: 176px !important;
    max-width: 176px !important;
    height: auto !important;
    max-height: 280px;
    object-fit: contain;
    object-position: top center;
    border-radius: 3px;
    box-shadow: 0 8px 20px rgba(74, 45, 13, 0.16);
    background: transparent;
}

body.book-list-page .k-list-box .item > img {
    flex: 0 0 176px;
}

/* ========== 文案区：高度与封面对齐，超出隐藏 ========== */
body.book-list-page .k-list-box .k-info {
    float: none !important;
    width: auto !important;
    flex: 1;
    min-width: 0;
    max-height: 280px; /* 与封面 max-height 一致 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

/* 1) 书名 + 实线 */
body.book-list-page .k-list-box .k-info .name {
    flex: 0 0 auto;
    margin: 0 0 12px !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid #d8cbb4 !important;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    font-size: 22px !important;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.04em;
    color: #4a2d0d;
    text-wrap: balance;
}

body.book-list-page .k-list-box .k-info .name a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

body.book-list-page .k-list-box .k-info .name a:hover {
    color: #81603f !important;
}

/* 词曲块已移除，若残留 DOM 则隐藏 */
body.book-list-page .k-list-box .verse {
    display: none !important;
}

/* 2) 简介：按整行截断，避免半截字；底部淡出与卡片衔接 */
body.book-list-page .k-list-box .k-info .info {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 0 10px !important;
    padding: 0 !important;
    text-indent: 0 !important;
    font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
    font-size: 15px !important;
    line-height: 1.85 !important;
    color: #5c4a38 !important;
    text-align: justify;
    text-justify: inter-ideograph;
    word-break: normal;
    overflow-wrap: break-word;
    max-width: none;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 5 !important;
    line-clamp: 5;
    /* 不使用底部淡出，保证截断行文字对比度清晰 */
    -webkit-mask-image: none;
    mask-image: none;
    color: #5c4a38 !important;
}

/* 3) 购书信息：细实线分隔，始终完整可见 */
body.book-list-page .k-list-box .buy-meta {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid #e0d2ba !important;
}

body.book-list-page .k-list-box .buy-meta a,
body.book-list-page .k-list-box .k-info .info > a {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 28px;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    color: #5c4a38 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    line-height: 1.6;
    font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
    width: auto;
}

body.book-list-page .k-list-box .buy-meta a:hover,
body.book-list-page .k-list-box .k-info .info > a:hover {
    color: #81603f !important;
}

body.book-list-page .k-list-box .buy-meta .meta-item,
body.book-list-page .k-list-box .buy-meta a span {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

body.book-list-page .k-list-box .buy-meta em,
body.book-list-page .k-list-box .buy-meta .meta-label {
    font-style: normal;
    font-weight: 700;
    color: #4a2d0d;
    letter-spacing: 0.04em;
}

/* 兜底：旧结构 info 内嵌链接 */
body.book-list-page .k-list-box .k-info .info > a {
    display: none !important; /* 购书信息统一走 .buy-meta，避免裁切区残留杂乱链接 */
}

/* 分页：全站统一样式（当前页必须白字，避免深底看不清） */
body.book-list-page .k-page {
    margin-top: 24px;
    text-align: center;
}

body.book-list-page .k-page a {
    color: #5c4a38;
}

body.book-list-page .k-page a:hover,
body.book-list-page .k-page a.active {
    background: #5c4a38 !important;
    border-color: #5c4a38 !important;
    color: #ffffff !important;
}

body.book-list-page .k-page a.disabled,
body.book-list-page .k-page a.disabled:hover {
    background: #faf8f3 !important;
    border-color: #ebe6dc !important;
    color: #c4bbb0 !important;
}

/* ========== 响应式 ========== */
@media screen and (max-width: 900px) {
    body.book-list-page .k-list-box .item {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 22px 18px !important;
    }

    body.book-list-page .k-list-box .item .book-cover,
    body.book-list-page .k-list-box .item > img {
        flex-basis: auto;
        width: min(180px, 52vw) !important;
    }

    body.book-list-page .k-list-box .item .book-cover img {
        width: 100% !important;
        max-width: 180px !important;
    }

    body.book-list-page .k-list-box .k-info {
        width: 100% !important;
    }

    body.book-list-page .k-list-box .k-info .name {
        font-size: 20px !important;
        text-align: center;
    }

    body.book-list-page .k-list-box .k-info .info {
        font-size: 14px !important;
        line-height: 1.85 !important;
    }

    body.book-list-page .k-list-box .buy-meta a {
        justify-content: center;
        gap: 8px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.book-list-page .k-list-box .item,
    body.book-list-page .k-list-box .k-info .name a {
        transition: none;
    }
}
