.book-gallery-v40{width:100%;max-width:480px;min-width:0;justify-self:center}
.book-gallery-v50 .book-gallery-main-v40{touch-action:pan-y pinch-zoom;cursor:grab;user-select:none;-webkit-user-select:none}
.book-gallery-v50 .book-gallery-main-v40[data-gallery-dragging=true]{cursor:grabbing}
.book-gallery-v50 .book-gallery-main-v40>img{user-select:none;-webkit-user-select:none;-webkit-user-drag:none;object-fit:contain}
.book-gallery-v40 figure{margin:0}
.book-gallery-main-v40{display:grid;place-items:center;position:relative;width:100%;padding:22px 22px 54px;border:1px solid #d4badf88;border-radius:22px;background:radial-gradient(ellipse at 50% 15%,#78519c55,transparent 70%),#211331;cursor:zoom-in}
.book-gallery-main-v40>img{display:block;width:auto;max-width:100%;height:auto;max-height:470px;object-fit:contain;box-shadow:0 15px 35px #09041370}
.book-gallery-main-v40>span{position:absolute;left:15px;right:15px;bottom:15px;display:flex;align-items:center;justify-content:center;gap:8px;color:#f6e9ff;font:600 13px/1.4 Montserrat,Arial,sans-serif}
.book-gallery-main-v40>span>.icon{width:18px;height:18px}
.book-gallery-v40 figcaption{margin:13px 0 15px;color:#f3e7fb;text-align:center;font-size:14px;line-height:1.5}
.book-gallery-thumbs-v40{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.book-gallery-thumbs-v40.is-pages-only{grid-template-columns:repeat(3,minmax(0,1fr))}
.book-gallery-thumbs-v40 button{min-width:0;border:1px solid #ad87c380;border-radius:11px;padding:7px 4px 9px;background:#2d1b42;color:#f8edff;cursor:pointer;font:600 11px/1.4 Montserrat,Arial,sans-serif}
.book-gallery-thumbs-v40 button[aria-pressed=true]{border-color:#9de6ec;box-shadow:0 0 0 2px #9de6ec40;background:#402b57}
.book-gallery-thumbs-v40 img{display:block;width:100%;height:75px;object-fit:contain;margin-bottom:7px}
.book-gallery-thumbs-v40 span{display:block;overflow-wrap:anywhere}
.book-gallery-v40 button:focus-visible{outline:3px solid #f2d58e;outline-offset:3px}
.book-gallery-hint-v40{margin:15px auto 0;max-width:44ch;text-align:center;font-size:13px;line-height:1.65;color:#e1d3ed}
dialog.book-preview-lightbox-v40{position:fixed;inset:0;box-sizing:border-box;width:min(94vw,1100px);max-width:94vw;max-height:96dvh;margin:auto;padding:22px;border:1px solid #ac8dc8;border-radius:18px;background:#201333;color:#f9f0ff;overflow:auto;text-align:center}
.book-preview-lightbox-v40::backdrop{background:#090414dc}
.book-preview-lightbox-v40 h2{font-size:19px;line-height:1.4;max-width:70%;margin:0 auto 18px;color:#fff}
.book-preview-lightbox-v40>img{display:block;width:auto;max-width:100%;height:auto;max-height:78dvh;margin:auto;object-fit:contain;box-shadow:none}
.book-preview-lightbox-nav-v40{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:14px}
.book-preview-lightbox-nav-v40 p{min-width:130px;margin:0;font-size:13px;color:#e7d8f2}
.book-preview-lightbox-nav-v40 button{width:44px;height:44px;border:1px solid #bca2d2;border-radius:9px;background:#38204d;color:#fff;font-size:21px;cursor:pointer}
.book-preview-close-v40{position:sticky;top:0;float:right;display:flex;align-items:center;gap:6px;padding:9px 12px;border:1px solid #bca2d2;border-radius:9px;background:#38204d;color:#fff;cursor:pointer;font:600 12px Montserrat,Arial,sans-serif;z-index:1}
.book-preview-close-v40 .icon{width:16px;height:16px}
@media(max-width:760px){.book-gallery-v40{max-width:390px}.book-gallery-main-v40{padding:18px 18px 48px}.book-gallery-main-v40>img{max-height:380px}.book-gallery-thumbs-v40 img{height:62px}.book-gallery-thumbs-v40 button{font-size:10px}.book-preview-lightbox-v40 h2{max-width:100%;clear:both;padding-top:12px}dialog.book-preview-lightbox-v40{padding:14px}.book-preview-lightbox-v40>img{max-height:74dvh}}
@media(max-width:370px){.book-gallery-thumbs-v40{gap:5px}.book-gallery-thumbs-v40 button{padding:6px 2px;font-size:9px}.book-gallery-thumbs-v40 img{height:51px}}
