#stacks-shop .shop-monitor{max-width:1400px}
#stacks-shop .shop-catalog{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;align-items:center;padding:56px 48px;border-right:0}
#stacks-shop .shop-products{display:block;width:min(100%,260px);min-width:0;margin:auto;justify-self:center}
.book-preview{width:calc(100% + 32px);margin-left:-16px;min-width:0;color:#33293e;font:14px/1.4 Arial,sans-serif}
.book-preview-stage{position:relative;perspective:1800px;aspect-ratio:1.31;background:#f5efdf;border:5px solid #302539;border-radius:4px;box-shadow:0 3px #bbb3a5,0 6px #e0d8c8,0 9px #302539,0 20px 28px #0003;touch-action:pan-y;user-select:none}
.preview-half{position:absolute;top:0;bottom:0;width:50%;background:#fffcf4;overflow:hidden}
.preview-left{left:0;border-radius:2px 0 0 2px}.preview-right{right:0;border-radius:0 2px 2px 0}
.book-preview-stage img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}
.preview-half:after,.leaf-front:after,.leaf-back:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#0002,transparent 12%,transparent 87%,#0003)}
.book-preview-stage:after{content:'';position:absolute;top:0;bottom:0;left:calc(50% - 8px);width:16px;background:linear-gradient(90deg,transparent,#0004,transparent);pointer-events:none}
.book-preview-leaf{position:absolute;left:50%;top:0;bottom:0;width:50%;transform-origin:left center;transform-style:preserve-3d;pointer-events:none;z-index:2}
.book-preview-leaf[hidden]{display:none}
.leaf-front,.leaf-back{position:absolute;inset:0;backface-visibility:hidden;background:#fffdf4}.leaf-back{transform:rotateY(180deg)}

.book-preview-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:28px}
.book-preview-controls button{border:0;border-radius:50%;background:#30223d;color:#fff;min-width:44px;min-height:44px;font:22px Arial;cursor:pointer}
.book-preview-controls button:disabled{opacity:.3;cursor:default}.book-preview-count{display:none}
html.hbc-cursor .book-preview,html.hbc-cursor .book-preview *{cursor:auto!important}html.hbc-cursor .book-preview button:not(:disabled){cursor:pointer!important}
@media(max-width:650px){#stacks-shop .shop-catalog{grid-template-columns:1fr;gap:48px;padding:30px 24px}.book-preview{width:100%;max-width:600px;margin:auto}#stacks-shop .shop-products{max-width:200px}}
#stacks-shop .book-section-header{grid-column:1/-1;padding:32px 48px 0;color:#342a43}
#stacks-shop .book-section-header .detail-kind{margin:0 0 10px;font:11px/1.4 Consolas,monospace;letter-spacing:.08em;text-transform:uppercase;color:#685777}
#stacks-shop .book-section-header h2{margin:0 0 10px;font:28px/1.2 Georgia,serif}
#stacks-shop .book-section-header .detail-description{margin:0;font:15px/1.5 Arial,sans-serif}
#stacks-shop .shop-catalog{align-items:start;padding-top:32px}
#stacks-shop .shop-products{width:var(--cover-width,260px);max-width:none;justify-self:center}
#stacks-shop .product-choice{display:block;width:100%;padding:0}
#stacks-shop .product-name{display:none}
#stacks-shop .book-cover.published-cover{height:var(--cover-height,auto);aspect-ratio:7744/11248}
@media(max-width:650px){#stacks-shop .book-section-header{padding:28px 24px 0}}
/* Magnify the same flipbook so the current spread and page animation are retained. */
.book-preview-open{position:absolute;inset:0;z-index:4;width:100%;height:100%;border:0;background:transparent;cursor:zoom-in!important}
.book-preview-open svg{position:absolute;right:12px;top:12px;width:38px;height:38px;box-sizing:border-box;padding:6px;border-radius:50%;background:#1c1029e8;color:#f3e9ff;fill:none;stroke:currentColor;stroke-width:2;filter:drop-shadow(0 2px 4px #0005)}
.book-preview-open:hover svg{background:#66358d;transform:scale(1.08)}
.book-preview-open:focus-visible{outline:3px solid #a7eaff;outline-offset:4px}
.book-preview-open[hidden]{display:none!important}
.book-reader{width:min(1400px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 24px);box-sizing:border-box;padding:16px 24px 22px;border:1px solid #8d679e;border-radius:12px;background:#160f20;color:#f0e5f8;overflow:hidden;box-shadow:0 24px 90px #000b}
.book-reader::backdrop{background:#07040de8;backdrop-filter:blur(3px)}
.book-reader-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.book-reader-header h2{margin:0;font-size:clamp(14px,2vw,22px);line-height:1.3;font-weight:400}
.book-reader-close{flex:0 0 44px;width:44px;height:44px;border:1px solid #9b6eb2;border-radius:50%;background:#291735;color:#f9efff;font:30px/1 Arial,sans-serif!important;cursor:pointer}
.book-reader-help{margin:0 0 14px;color:#cdbbd8;font-size:11px;line-height:1.5}
.book-reader-content{max-height:calc(100dvh - 160px);overflow:auto;overscroll-behavior:contain;padding:6px 8px 12px;box-sizing:border-box}
.book-reader .book-preview{width:min(100%,calc((100dvh - 255px)*1.31));margin:0 auto;color:#eddef5}
.book-reader .book-preview-stage{cursor:auto!important}
.book-reader .book-preview-controls{margin-top:22px}
.book-reader .book-preview-controls button{background:#66358d;color:#fff}
.book-reader .book-preview-count{display:block;color:#eddef5;font-size:12px}
.book-reader :is(button,.book-preview-stage):focus-visible{outline:2px solid #a7eaff;outline-offset:3px}
@media(max-width:700px){.book-reader{padding:12px;width:calc(100vw - 16px)}.book-reader-content{padding:5px 5px 12px}.book-reader .book-preview{width:760px;min-width:760px}.book-reader .book-preview-controls{position:sticky;left:0;width:calc(100vw - 52px);box-sizing:border-box;padding:6px;background:#160f20;border-radius:6px}.book-reader-help{font-size:10px}}
@media(prefers-reduced-motion:reduce){.book-preview-open svg{transition:none}}
.book-reader .book-preview-stage{touch-action:pan-x pan-y}
