.bpj-library-shell {
    margin: 24px 0;
}

.bpj-library-filters {
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid rgba(20, 28, 38, 0.14);
    border-radius: 6px;
    background: #f8fafc;
}

.bpj-filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(100px, 0.55fr) auto auto;
    gap: 10px;
    align-items: end;
}

.bpj-filter-row label {
    display: grid;
    gap: 4px;
    margin: 0;
}

.bpj-filter-row span {
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.bpj-filter-row input,
.bpj-filter-row select {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(20, 28, 38, 0.22);
    border-radius: 4px;
    padding: 6px 9px;
    background: #fff;
}

.bpj-letter-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 12px 0 10px;
}

.bpj-letter-filter a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid rgba(20, 28, 38, 0.16);
    border-radius: 4px;
    background: #fff;
    color: #17324d;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.bpj-letter-filter a.is-active,
.bpj-letter-filter a:hover {
    background: #17324d;
    color: #fff;
}

.bpj-library-status {
    margin: 8px 0 14px;
    color: #667085;
    font-size: 14px;
}

.bpj-library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin: 0;
}

.bpj-book-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    min-height: 176px;
    border: 1px solid rgba(20, 28, 38, 0.16);
    border-radius: 6px;
    padding: 14px;
    background: #fff;
}

.bpj-book-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 142px;
    overflow: hidden;
    border-radius: 4px;
    background: #17324d;
    color: #fff;
    font-size: 34px;
    font-weight: 700;
}

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

.bpj-book-body h3 {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.25;
}

.bpj-book-body p {
    margin: 0 0 10px;
}

.bpj-book-meta {
    color: #667085;
    font-size: 13px;
}

.bpj-book-extra {
    color: #475467;
    font-size: 12px;
}

.bpj-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 0;
    padding: 0 12px;
    border-radius: 4px;
    background: #146c94;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.bpj-button:hover,
.bpj-button:focus {
    color: #fff;
    background: #0e5678;
}

.bpj-button-muted {
    background: #667085;
}

.bpj-button-large {
    min-height: 42px;
    padding: 0 18px;
    font-size: 15px;
}

.bpj-book-profile {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 28px;
    margin: 26px 0;
    padding: 22px;
    border: 1px solid rgba(20, 28, 38, 0.14);
    border-radius: 6px;
    background: #fff;
}

.bpj-profile-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    overflow: hidden;
    border-radius: 6px;
    background: #17324d;
    color: #fff;
    font-size: 56px;
    font-weight: 800;
}

.bpj-profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bpj-profile-topic {
    color: #146c94;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.bpj-profile-info h2 {
    margin: 8px 0 12px;
    font-size: 28px;
    line-height: 1.18;
}

.bpj-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.bpj-profile-meta span,
.bpj-profile-keywords {
    color: #475467;
    font-size: 14px;
}

.bpj-profile-meta span {
    padding: 5px 8px;
    border-radius: 4px;
    background: #eef4f8;
}

.bpj-profile-summary {
    font-size: 16px;
    line-height: 1.6;
}

.bpj-reader {
    margin: 28px 0;
    border: 1px solid rgba(20, 28, 38, 0.16);
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
}

.bpj-reader-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #17324d;
    color: #fff;
}

.bpj-reader-top p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.bpj-reader-top h2 {
    margin: 0;
    color: inherit;
    font-size: 18px;
    line-height: 1.3;
}

.bpj-reader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bpj-reader-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 4px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.bpj-reader-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(20, 28, 38, 0.12);
    background: #fff;
}

.bpj-reader-cover {
    width: 70px;
    overflow: hidden;
    border-radius: 4px;
}

.bpj-reader-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.bpj-reader-info p {
    margin: 8px 0 0;
}

.bpj-reader-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bpj-reader-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 4px;
    background: #eef4f8;
    color: #17324d;
    font-size: 12px;
    font-weight: 700;
}

.bpj-reader-frame {
    position: relative;
    height: min(82vh, 900px);
    min-height: 560px;
    overflow: auto;
    background: #111827;
}

.bpj-reader-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(20, 28, 38, 0.12);
    background: #f8fafc;
}

.bpj-reader-toolbar button,
.bpj-reader-toolbar input {
    min-height: 32px;
    border: 1px solid rgba(20, 28, 38, 0.2);
    border-radius: 4px;
    background: #fff;
}

.bpj-reader-toolbar button {
    padding: 0 10px;
    cursor: pointer;
}

.bpj-reader-toolbar input {
    width: 64px;
    padding: 0 6px;
}

.bpj-pdfjs-stage {
    position: relative;
    margin: 22px auto;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.bpj-reader-loading {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    padding: 7px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.88);
    color: #17324d;
    font-size: 13px;
    font-weight: 700;
}

.bpj-pdfjs-stage canvas {
    display: block;
}

.bpj-highlight-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.bpj-reader.is-highlighting .bpj-highlight-layer {
    cursor: crosshair;
}

.bpj-highlight-mark {
    position: absolute;
    background: rgba(255, 235, 59, 0.42);
    border: 1px solid rgba(245, 158, 11, 0.72);
}

.bpj-reader:fullscreen {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.bpj-reader:fullscreen .bpj-reader-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.bpj-reader-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.bpj-reader.bpj-pdfjs-ready .bpj-reader-fallback {
    display: none;
}

.bpj-reader:not(.bpj-pdfjs-ready) .bpj-pdfjs-stage,
.bpj-reader.bpj-native-pdf .bpj-pdfjs-stage {
    display: none;
}

.bpj-reader.bpj-pdfjs-ready .bpj-reader-loading {
    display: none;
}

.bpj-watermark {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    max-width: calc(100% - 36px);
    padding: 7px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.72);
    color: rgba(17, 24, 39, 0.78);
    font-size: 12px;
    pointer-events: none;
}

.bpj-reader-message {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid rgba(20, 28, 38, 0.16);
    border-radius: 6px;
    background: #fff;
}

.bpj-library-pagination {
    margin: 22px 0 0;
}

.bpj-library-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bpj-library-pagination a,
.bpj-library-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(20, 28, 38, 0.16);
    border-radius: 4px;
    text-decoration: none;
}

.bpj-library-pagination .current {
    background: #17324d;
    color: #fff;
}

@media (max-width: 920px) {
    .bpj-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .bpj-filter-row {
        grid-template-columns: 1fr;
    }

    .bpj-book-profile {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .bpj-profile-cover {
        min-height: 320px;
    }

    .bpj-profile-info h2 {
        font-size: 22px;
    }

    .bpj-book-card {
        grid-template-columns: 76px 1fr;
    }

    .bpj-book-cover {
        width: 76px;
        height: 112px;
    }

    .bpj-reader-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .bpj-reader-details {
        grid-template-columns: 1fr;
    }

    .bpj-reader-frame {
        height: 76vh;
        min-height: 420px;
    }
}
