.pa-book-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:18px;margin:20px 0}.pa-book-card{overflow:hidden}.pa-book-image{height:190px;position:relative;background:#e8efe5}.pa-book-image img{width:100%;height:100%;object-fit:cover}.pa-book-image>span{position:absolute;bottom:10px;right:10px;border-radius:30px;padding:7px 11px;background:#164b3d;color:white;font-weight:700}.pa-book-body{padding:18px}.pa-book-body h2{font-size:1.3rem;margin:0 0 12px}.pa-book-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pa-book-stats>div{background:#f2f7ee;border-radius:10px;padding:10px 6px;text-align:center}.pa-book-stats strong{display:block;font-size:1.1rem}.pa-book-stats small{display:block;font-size:.73rem}.pa-book-favorite{margin:14px 0}.pa-book-ledger{border-top:1px solid #d7e6d7;padding:12px 0}.pa-book-ledger summary{cursor:pointer;font-weight:700}.pa-book-ledger li{margin:12px 0}.pa-book-ledger li span{display:block;margin-top:3px}.pa-book-missing::before{content:'🧩';display:grid;place-items:center;height:100%;font-size:4rem}@media(max-width:650px){.pa-book-grid{grid-template-columns:1fr}.pa-book-image{height:170px}.pa-book-body{padding:14px}}

.pa-book-leave{margin-top:10px}.pa-book-leave button{font-size:.85rem}

/* Patch 028H: compact finished-picture thumbnails and accessible full-size popup */
.pa-book-card .pa-book-image {height:auto;min-height:0;display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:9px;background:#eff5ed}
.pa-book-image .pa-book-image-open {border:1px solid #b8d1bd;background:#fffef9;border-radius:10px;cursor:zoom-in;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;min-height:0;height:128px;padding:6px;overflow:hidden;color:#225548;font:inherit}
.pa-book-image .pa-book-image-open:hover {background:#f6fbf6;border-color:#4f8d69}
.pa-book-image .pa-book-image-open:focus-visible {outline:3px solid #477f66;outline-offset:2px}
.pa-book-image .pa-book-image-open img {width:100%;height:92px;max-height:92px;object-fit:contain}
.pa-book-image .pa-book-view-larger {font-size:.76rem;font-weight:700;white-space:nowrap}
.pa-book-image .pa-book-completion-count {position:static;border-radius:100px;padding:4px 9px;background:#164b3d;color:#fff;font-weight:700;font-size:.76rem;align-self:flex-end}
.pa-book-art-dialog {border:0;border-radius:16px;padding:0;width:min(92vw,900px);max-width:92vw;max-height:92dvh;box-shadow:0 22px 70px rgba(7,32,23,.32);background:#fffefa;color:#1a4034}
.pa-book-art-dialog::backdrop {background:rgba(11,28,24,.76)}
.pa-book-dialog-frame {padding:clamp(12px,2.4vw,20px);overflow:auto;max-height:90dvh}
.pa-book-dialog-head {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.pa-book-dialog-head h2 {font-size:clamp(1.1rem,2.4vw,1.5rem);margin:0;overflow-wrap:anywhere}
.pa-book-dialog-head .pa-btn {cursor:pointer}
.pa-book-art-dialog img {display:block;width:auto;max-width:100%;max-height:72dvh;object-fit:contain;margin:0 auto;border-radius:8px}
.pa-book-art-dialog p {text-align:center;margin:12px 0 0;font-size:.8rem}
@media(max-width:650px){.pa-book-image .pa-book-image-open {height:116px}.pa-book-image .pa-book-image-open img {height:82px;max-height:82px}.pa-book-art-dialog img {max-height:65dvh}}
