.shelf-standing{gap:48px 0}
.shelf-standing .book-card .book-stage{box-shadow:none}
.shelf-standing .book-card .book-stage:after{box-shadow:0 12px 14px -8px #302a2355}
/* A lone final book needs both finished shelf ends, not a joined left edge. */
@media(min-width:801px){.shelf-standing .book-card:last-child:nth-child(4n+1) .book-stage:before{clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 100%,0 100%)}}
@media(max-width:800px){.shelf-standing .book-card:last-child:nth-child(2n+1) .book-stage:before{clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 100%,0 100%)}}
.shelf-standing .book-card{min-width:0;padding:0;border:0;box-shadow:none}
.shelf-standing .book-card>a{height:100%;display:flex;flex-direction:column}
.shelf-standing .book-card h2{font-size:15px;line-height:1.5;text-align:center;overflow-wrap:anywhere;margin:0;padding:0 20px 20px;flex:1}
.shelf-standing .book-stage{height:260px;display:flex;align-items:flex-end;justify-content:center;padding:15px 20px 0;position:relative;border-bottom:12px solid #b7aa95;background:linear-gradient(0deg,#ded9cf66,transparent 65%);box-shadow:0 12px 13px -9px #30352a55}
.shelf-standing .book-stage img{display:block;width:auto;max-width:100%;height:auto;max-height:233px;object-fit:contain;filter:drop-shadow(6px 0 5px #0003)}
.shelf-standing .book-stage{border-bottom:16px solid #aa9a83;padding-bottom:8px;perspective:1000px;background:linear-gradient(0deg,#bcb19d30,transparent 55%);box-shadow:0 18px 18px -12px #302a2355,inset 0 -1px #fff8}
.shelf-standing .book-stage:before{content:"";position:absolute;bottom:0;left:0;right:0;height:22px;background:linear-gradient(#ddd5c6,#c2b6a2);clip-path:polygon(2% 0,98% 0,100% 100%,0 100%);z-index:0}
.shelf-standing .book-stage:after{content:"";position:absolute;bottom:-16px;left:0;right:0;height:16px;background:linear-gradient(#c3b59d 0,#a6967e 35%,#96856d 100%);border-top:1px solid #eee5d5;box-shadow:0 2px 2px #46382820;pointer-events:none}
.shelf-standing .book-stage img{position:relative;z-index:1;transform-origin:left center;transform:rotateY(0deg);border-radius:1px 3px 3px 1px;box-shadow:3px 1px 0 #e5e1d8,5px 2px 0 #c9c5ba;transition:transform .65s cubic-bezier(.2,.7,.25,1),filter .65s,box-shadow .65s;backface-visibility:hidden}
@media(hover:hover){.shelf-standing .book-card:hover img{transform:rotateY(-18deg) rotateZ(-.6deg);filter:drop-shadow(13px 5px 7px #0003);box-shadow:5px 1px 0 #eeeae0,8px 2px 0 #c9c5ba}}
.shelf-standing .book-card>a:focus-visible{outline:2px solid #526757;outline-offset:5px}
.shelf-standing .book-stage:before{clip-path:none}
.shelf-standing .book-stage{height:278px;padding-bottom:19px;border-bottom-width:18px;isolation:isolate;background:none}
.shelf-standing .book-stage:before{height:38px;background:linear-gradient(#bcb8b0,#aaa59b)}
.shelf-standing .book-stage:after{bottom:-18px;height:18px;background:linear-gradient(#938e84,#79756c);border-top:1px solid #d9d5cb}
.shelf-standing .book-card:nth-child(4n+1) .book-stage:before{clip-path:polygon(14px 0,100% 0,100% 100%,0 100%)}
.shelf-standing .book-card:nth-child(4n) .book-stage:before,.shelf-standing .book-card:last-child .book-stage:before{clip-path:polygon(0 0,calc(100% - 14px) 0,100% 100%,0 100%)}
.book-volume{display:block;position:relative;max-width:100%;perspective:1100px;z-index:1;isolation:isolate;filter:drop-shadow(5px 8px 7px #0003)}
.book-volume:before{content:"";position:absolute;inset:2px -7px 0 3px;border-radius:1px 6px 6px 1px;background:repeating-linear-gradient(90deg,#eee 0,#eee 1px,#c9c7c0 1px,#fff 2px);border:1px solid #d0cec7;box-shadow:2px 0 0 #b7b4aa;z-index:-1}
.shelf-standing .book-stage .book-volume img{filter:none;box-shadow:1px 1px 2px #0001;transform-origin:left center;transform:rotateY(0deg);transition:transform 1.05s cubic-bezier(.42,0,.2,1),box-shadow 1.05s cubic-bezier(.42,0,.2,1)}
.shelf-standing .book-card:hover .book-volume img,.shelf-standing .book-card>a:focus-visible .book-volume img{transform:rotateY(-24deg);filter:none;box-shadow:6px 2px 10px #0002}
@media(prefers-reduced-motion:reduce){.shelf-standing .book-stage .book-volume img{transition:transform .35s ease-in-out,box-shadow .35s ease-in-out}.shelf-standing .book-card:hover .book-volume img,.shelf-standing .book-card>a:focus-visible .book-volume img{transform:rotateY(-16deg)}}
@media(max-width:800px){.shelf-standing .book-card:nth-child(n) .book-stage:before{clip-path:none}.shelf-standing .book-card:nth-child(2n+1) .book-stage:before{clip-path:polygon(14px 0,100% 0,100% 100%,0 100%)}.shelf-standing .book-card:nth-child(2n) .book-stage:before{clip-path:polygon(0 0,calc(100% - 14px) 0,100% 100%,0 100%)}}
.shelf-standing .book-card>a:focus-visible img{transform:rotateY(-18deg);filter:drop-shadow(13px 5px 7px #0003)}
@media(prefers-reduced-motion:reduce){.shelf-standing .book-stage img{transition:none}.shelf-standing .book-card:hover img,.shelf-standing .book-card>a:focus-visible img{transform:none}}
.book-placeholder{display:flex;align-items:center;justify-content:center;width:150px;height:220px;background:#40574b;color:#fff;border-left:8px solid #2c3d34;letter-spacing:3px;box-shadow:6px 0 6px #0003}
@media(max-width:460px){.shelf-standing{grid-template-columns:repeat(2,minmax(0,1fr))}.shelf-standing .book-stage{height:215px;padding:12px 12px 0}.shelf-standing .book-stage img{max-height:190px}.shelf-standing .book-card h2{padding:0 10px 15px;font-size:13px}.book-placeholder{height:180px}}

/* Overlap internal shelf joins by one CSS pixel to cover fractional grid rounding.
   Keep the outer ends unchanged, including incomplete and single-book rows. */
.shelf-standing .book-stage:before,
.shelf-standing .book-stage:after{right:-1px}
@media(min-width:801px){
 .shelf-standing .book-card:nth-child(4n) .book-stage:before,
 .shelf-standing .book-card:nth-child(4n) .book-stage:after{right:0}
}
@media(max-width:800px){
 .shelf-standing .book-card:nth-child(2n) .book-stage:before,
 .shelf-standing .book-card:nth-child(2n) .book-stage:after{right:0}
}
.shelf-standing .book-card:last-child .book-stage:before,
.shelf-standing .book-card:last-child .book-stage:after{right:0}

/* GAVIOTA uses square covers of mixed source resolutions; match the legacy shelf. */
.brand-shelf[data-brand="5"] .book-volume{width:174px;max-width:100%}
.brand-shelf[data-brand="5"] .shelf-standing .book-stage .book-volume img{width:100%;height:auto}

/* Keep each title attached to its cover while grid rows share a shelf baseline. */
.shelf-standing .book-stage{height:auto;min-height:0;flex:1}
.shelf-standing .book-display{display:flex;flex-direction:column;align-items:center;width:100%;min-width:0}
.shelf-standing .book-display h2{flex:none;width:100%;padding:0 0 20px}
