.book-list-hero,
.book-reader-hero {
    background: linear-gradient(135deg, #eaf7ff 0%, #f8fcff 70%, #fff4e6 100%);
    border-bottom: 1px solid var(--npd-border);
}

.book-list-hero {
    padding: 58px 0 52px;
}

.book-list-hero h1 {
    margin: 12px 0 10px;
    color: #123a57;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
}

.book-list-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--npd-muted);
    font-size: 1.1rem;
}

.book-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #607487;
    font-size: 0.92rem;
}

.book-list-section {
    padding: 48px 0 64px;
    background: #f7fbfe;
}

.book-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.book-card {
    display: flex;
    overflow: hidden;
    min-width: 0;
    flex-direction: column;
    border: 1px solid #d6e8f5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(19, 68, 101, 0.08);
}

.book-card-cover {
    display: grid;
    height: 260px;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, #dff3ff, #fff1dd);
    color: #1c526f;
    font-weight: 800;
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.book-card-body h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
}

.book-card-author {
    margin-bottom: 12px;
    color: #d47719;
    font-weight: 700;
}

.book-card-body p {
    display: -webkit-box;
    margin-bottom: 20px;
    overflow: hidden;
    color: var(--npd-muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.book-reader-hero {
    padding: 16px 0;
}

.book-reader-section {
    padding: 28px 0 56px;
    background: #f3f8fc;
}

.book-reader-container {
    max-width: 1680px;
    padding-inline: 24px;
}

.book-reader-grid {
    display: grid;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(240px, 290px);
    gap: 24px;
    align-items: start;
}

.book-toc,
.book-info-sidebar,
.book-reading-pane {
    border: 1px solid #d6e5f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(24, 68, 96, 0.07);
}

.book-toc,
.book-info-sidebar {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 116px);
    overflow: auto;
}

.book-toc details > summary {
    padding: 18px 20px;
    color: #173f5b;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
}

.book-toc-inner {
    border-top: 1px solid #e3edf4;
    padding: 18px;
}

.book-toc-title {
    margin-bottom: 14px;
    color: #0b527d;
    font-size: 1.05rem;
    font-weight: 800;
}

.book-chapter-list,
.book-content-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.book-chapter-list .book-chapter-list {
    margin: 8px 0 0 12px;
    border-left: 2px solid #e3edf4;
    padding-left: 12px;
}

.book-chapter-list > li + li {
    margin-top: 12px;
}

.book-chapter-title {
    color: #284f68;
    font-size: 0.93rem;
    font-weight: 800;
}

.book-content-list {
    margin-top: 6px;
}

.book-content-list a {
    display: block;
    border-left: 3px solid transparent;
    border-radius: 6px;
    padding: 7px 9px;
    color: #526b7c;
    font-size: 0.91rem;
    line-height: 1.4;
}

.book-content-list a:hover,
.book-content-list a.is-active {
    border-left-color: #e68a2e;
    background: #eaf7ff;
    color: #075f98;
}

.book-content-list a.is-active {
    font-weight: 800;
}

.book-reading-pane {
    min-height: 620px;
    padding: clamp(24px, 4vw, 52px);
}

.book-reading-name,
.book-reading-chapter {
    color: #0b77bd;
    font-weight: 700;
}

.book-reading-chapter {
    margin-top: 4px;
    color: #d47719;
    font-size: 0.92rem;
}

.book-reading-pane h1 {
    margin: 12px 0 28px;
    color: #153f5a;
    font-size: clamp(1.9rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
}

.book-reading-body {
    color: #243746;
    font-size: 17px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.book-reading-body img,
.book-reading-body iframe,
.book-reading-body video {
    max-width: 100%;
}

.book-reading-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.book-info-sidebar {
    padding: 20px;
}

.book-info-cover {
    width: 100%;
    max-height: 300px;
    margin-bottom: 18px;
    border-radius: 10px;
    object-fit: cover;
}

.book-info-sidebar h2 {
    color: #153f5a;
    font-size: 1.2rem;
    font-weight: 800;
}

.book-info-sidebar p {
    color: #607487;
    font-size: 0.93rem;
}

.book-info-author {
    color: #d47719 !important;
    font-weight: 700;
}

.book-consult-actions {
    display: grid;
    gap: 9px;
    margin: 20px 0;
}

.book-pager {
    display: grid;
    gap: 10px;
    border-top: 1px solid #dfebf3;
    padding-top: 18px;
}

.book-pager a {
    display: block;
    border: 1px solid #d9e8f2;
    border-radius: 9px;
    padding: 11px;
    background: #f8fcff;
}

.book-pager span {
    display: block;
    margin-bottom: 3px;
    color: #d47719;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.book-pager strong {
    display: block;
    color: #234d68;
    font-size: 0.9rem;
    line-height: 1.35;
}

.book-empty-state {
    border: 1px solid #d7e7f2;
    border-radius: 14px;
    background: #fff;
    padding: 48px 24px;
    text-align: center;
}

.book-empty-state h1,
.book-empty-state h2 {
    color: #153f5a;
}

.book-toc-empty {
    margin: 0;
    color: #708494;
}

@media (max-width: 1199.98px) {
    .book-reader-grid {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .book-info-sidebar {
        position: static;
        grid-column: 1 / -1;
        max-height: none;
    }

    .book-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .book-list-hero {
        padding: 38px 0 34px;
    }

    .book-list-section,
    .book-reader-section {
        padding: 24px 0 40px;
    }

    .book-card-grid,
    .book-reader-grid {
        grid-template-columns: 1fr;
    }

    .book-reader-container {
        padding-inline: 12px;
    }

    .book-toc,
    .book-info-sidebar {
        position: static;
        max-height: none;
    }

    .book-toc {
        order: 1;
    }

    .book-reading-pane {
        order: 2;
        min-height: 0;
        padding: 24px 20px;
    }

    .book-info-sidebar {
        order: 3;
        grid-column: auto;
    }

    .book-toc details:not([open]) .book-toc-inner {
        display: none;
    }
}
