.psth-pdf-books-page #main.stwp-inner {
    width: min(100%, 1260px);
    max-width: 1260px;
    padding: clamp(12px, 3vw, 38px) clamp(10px, 3vw, 28px) 52px;
    margin-inline: auto;
}
.psth-pdf-books-page #main .stwp-entry {
    max-width: none;
    margin: 0;
}
.psth-pdf-books-page #main .stwp-entry > h1 { display: none; }
.psth-pdf-reader, .psth-pdf-shelf { min-width: 0; }
.psth-pdf-shelf-header {
    padding: clamp(20px, 4vw, 42px);
    border-radius: 20px;
    background: linear-gradient(115deg,#32131f,#731639);
}
.psth-pdf-shelf-header h1, .psth-pdf-reader h1 {
    margin: 0;
    font-size: clamp(25px, 3.7vw, 44px);
    line-height: 1.35;
}
.psth-pdf-shelf-header h1 { color: #fff; }
.psth-pdf-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0 10px;
}
.psth-pdf-categories a {
    flex: none;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e4d6dc;
    background: #fff;
    color: #5c1532;
    text-decoration: none;
}
.psth-pdf-categories a[aria-current=page] { background: #751c3a; color: #fff; }
.psth-pdf-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: clamp(10px,2vw,21px);
    margin-block: 16px 26px;
}
.psth-pdf-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 10px;
    border: 1px solid #e7dde1;
    border-radius: 15px;
    background: #fff;
    color: #3f1728;
    overflow-wrap: anywhere;
    text-decoration: none;
}
.psth-pdf-card:hover { border-color: #a54b69; }
.psth-pdf-cover {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 9px;
    background: #f4edf0;
}
.psth-pdf-cover img, .psth-pdf-cover canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.psth-pdf-cover > span { font: 700 1rem sans-serif; color: #67213b; }
.psth-pdf-card-copy {
    display: grid;
    gap: 5px;
    padding: 10px 3px 4px;
}
.psth-pdf-category-name, .psth-pdf-card small { color: #775265; font-size: .82rem; }
.psth-pdf-empty {
    padding: 18px;
    border: 1px dashed #d7c1cc;
    border-radius: 10px;
    margin-top: 12px;
}
.psth-pdf-reader { width: min(100%, 1050px); margin-inline: auto; }
.psth-pdf-back { display: inline-block; margin-bottom: 8px; color: #751c3a; }
.psth-pdf-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 9px;
    border: 1px solid #e6d7df;
    border-radius: 12px 12px 0 0;
    background: #fff;
}
.psth-pdf-controls > button, .psth-pdf-controls a, .psth-pdf-controls input {
    min-height: 40px;
    padding: 5px 9px;
    border: 1px solid #e2cad4;
    border-radius: 8px;
    background: #fff;
    color: #64223a;
    font: inherit;
}
.psth-pdf-controls input { width: 4em; }
.psth-pdf-controls button:disabled, .psth-pdf-controls input:disabled { opacity: .55; }
.psth-pdf-viewport {
    overflow: auto;
    background: #e9e3e6;
    border: 1px solid #e0d4d8;
    border-radius: 0 0 12px 12px;
    padding: 10px;
    height: clamp(280px, 73dvh, 1000px);
}
.psth-pdf-viewport:focus-visible { outline: 2px solid #751c3a; }
.psth-pdf-viewport [data-pdf-pages] { position: relative; }
.psth-pdf-sheet {
    box-sizing: border-box;
    width: var(--pdf-sheet-width, 100%);
    margin: 0 auto 12px;
    background: #fff;
    box-shadow: 0 1px 5px #21131d26;
}
.psth-pdf-sheet canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 820px) { .psth-pdf-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 560px) { .psth-pdf-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
