/* Estante editorial: coleções independentes, sem largura fixa para a quantidade de livros. */
.wl-library-shell{width:min(1540px,calc(100% - 28px))}
.wl-library-shelves{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:clamp(18px,2.6vw,38px)}
.wl-shelf.is-wide{grid-column:1 / -1}
.wl-shelf{min-width:0;max-width:100%;overflow:hidden;border:1px solid var(--wl-border-soft);border-radius:20px;padding:clamp(14px,2vw,25px) 0 10px;background:linear-gradient(145deg,color-mix(in srgb,var(--wl-surface) 88%,#211715),color-mix(in srgb,var(--wl-bg) 91%,#2c1b17));box-shadow:var(--wl-shadow)}
.wl-shelf-heading{position:relative;min-width:0;min-height:92px;margin:0 clamp(16px,2vw,26px) 8px;padding-inline:48px;align-items:center;justify-content:center;text-align:center}
.wl-shelf-heading>div{min-width:0;width:100%;text-align:center}.wl-shelf-heading h2{font-size:clamp(1rem,1.7vw,1.9rem);overflow-wrap:normal;word-break:normal;text-wrap:balance}.wl-shelf-heading p{max-width:none;font-size:.82rem;line-height:1.4}
.wl-shelf-symbol{position:absolute;right:0;top:50%;width:45px;height:45px;transform:translateY(-50%);font-size:1rem}
.wl-shelf-frame{padding:8px 33px 32px;isolation:isolate}
.wl-shelf-frame::after{z-index:1;left:13px;right:13px;bottom:11px;height:29px;background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(0,0,0,.08) 4px 5px),linear-gradient(180deg,color-mix(in srgb,var(--shelf) 68%,#b18a62) 0%,var(--shelf) 46%,color-mix(in srgb,var(--shelf) 55%,#20100b) 100%);box-shadow:0 10px 16px rgba(0,0,0,.28),inset 0 2px rgba(255,255,255,.2)}
.wl-shelf-viewport{position:relative;z-index:2;max-width:100%;touch-action:auto;-webkit-overflow-scrolling:touch;scroll-padding-inline:18px}
.wl-shelf-sequence{gap:clamp(7px,1.2vw,14px);padding:24px 16px 6px}
.wl-shelf-arrow{top:49%;width:29px;height:44px;border-radius:8px;background:color-mix(in srgb,var(--wl-bg) 90%,transparent)}
.wl-shelf-arrow[data-dir="prev"]{left:2px}.wl-shelf-arrow[data-dir="next"]{right:2px}
.wl-book-spine{max-width:none;box-sizing:border-box;scroll-snap-align:start;background:radial-gradient(circle at 55% 24%,rgba(255,255,255,.09),transparent 36%),repeating-linear-gradient(90deg,transparent 0 5px,rgba(0,0,0,.025) 6px 7px),linear-gradient(90deg,rgba(255,255,255,.14),transparent 18%,rgba(0,0,0,.15) 90%),var(--book-texture,none),var(--book-color);box-shadow:5px 7px 10px rgba(0,0,0,.32),inset -4px 0 rgba(0,0,0,.19),inset 2px 0 rgba(255,255,255,.09)}
.wl-book-spine.is-complete{min-width:0}
.wl-book-spine .wl-book-title{text-align:center;justify-self:center}
.wl-book-spine:not(.is-horizontal)::before{top:32px}
.wl-book-spine:not(.is-horizontal) .wl-book-mark{justify-self:stretch;position:relative;z-index:1;text-align:center;line-height:1.2}
.wl-book-spine:not(.is-horizontal)::after{bottom:34px}
.wl-book-spine:not(.is-horizontal) .wl-book-meta{align-self:end;position:relative;z-index:1;line-height:1;white-space:nowrap}
.wl-book-stack{display:flex;flex:0 0 224px;flex-direction:column-reverse;align-items:center;justify-content:flex-start;gap:4px;height:315px;scroll-snap-align:start}
.wl-book-spine.is-horizontal{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;align-items:center;gap:1px 4px;width:var(--book-width);height:var(--book-height);padding:5px 13px;border-radius:3px 7px 7px 3px;transform-origin:center bottom;box-shadow:3px 4px 7px rgba(0,0,0,.33),inset 0 -4px rgba(0,0,0,.18)}
.wl-book-spine.is-horizontal::before{top:4px;bottom:4px;left:7px;right:auto;width:2px;height:auto}.wl-book-spine.is-horizontal::after{top:4px;bottom:4px;left:auto;right:7px;width:2px;height:auto}
.wl-book-spine.is-horizontal .wl-book-mark{grid-column:1;grid-row:1;font-size:.48rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wl-book-spine.is-horizontal .wl-book-title{grid-column:1 / -1;grid-row:2;min-width:0;width:100%;max-height:none;align-self:center;writing-mode:horizontal-tb;transform:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-size:.78rem}
.wl-book-spine.is-horizontal .wl-book-meta{grid-column:2;grid-row:1;font-size:.44rem;white-space:nowrap}
.wl-book-spine.is-horizontal:hover,.wl-book-spine.is-horizontal:focus-visible{transform:translateY(-7px) rotate(-1deg)}
.wl-shelf[hidden],.wl-book-spine[hidden],.wl-book-stack[hidden]{display:none!important}
@media(max-width:760px){.wl-library-shell{width:min(100% - 14px,720px)}.wl-shelf{border-radius:15px}.wl-shelf-heading{min-height:76px;margin-inline:12px;padding-inline:36px}.wl-shelf-heading h2{font-size:1rem}.wl-shelf-symbol{width:32px;height:32px;font-size:.78rem}.wl-shelf-frame{padding-inline:27px}.wl-shelf-sequence{padding-inline:8px}.wl-shelf-arrow{width:26px}.wl-book-stack{flex-basis:224px}}
@media(max-width:640px){.wl-library-shelves{grid-template-columns:minmax(0,1fr)}}
@media(max-width:520px){.wl-shelf-heading{min-height:82px}.wl-shelf-heading h2{font-size:clamp(1.1rem,5vw,1.45rem)}}

/* Cada coleção ocupa apenas a largura necessária; coleções vizinhas se rearranjam. */
.wl-library-shelves{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:clamp(18px,2.6vw,38px)}
.wl-shelf,.wl-shelf.is-wide{flex:0 1 var(--shelf-width,100%);width:min(100%,var(--shelf-width,100%));max-width:100%;grid-column:auto}
.wl-shelf-viewport{touch-action:pan-x pan-y}
