.storybook-shelf {margin:0 auto 42px;color:#102956;max-width:1100px}
.storybook-shelf [hidden] {display:none!important}
.bookshelf-heading {text-align:center;padding:12px 12px 4px}
.bookshelf-heading h2 {font-size:clamp(2.8rem,6vw,5rem);font-weight:500;line-height:1.08;margin:12px 0}
.bookshelf-heading>p:last-child {font:italic clamp(1.2rem,2.8vw,1.9rem)/1.4 Georgia,serif;margin:0 0 8px}
.bookshelf-scene {position:relative;aspect-ratio:2/1;background:url('assets/bookshelf-watercolor.png') center/100% 100% no-repeat}
.book-spines {position:absolute;display:flex;align-items:flex-end;gap:1%;left:14%;right:15%;top:27%;bottom:20.5%}
.book-spine {position:relative;flex:1;min-width:0;height:96%;border:1px solid #926329;border-radius:12% 12% 7% 7% / 3% 3% 2% 2%;padding:23px 5px 31px;background-color:var(--binding);background-image:linear-gradient(90deg,#0008 0%,#fff1 13%,transparent 24%,#ffffff0a 55%,#0005 96%),repeating-radial-gradient(ellipse at 35% 25%,transparent 0 10px,#edc47710 11px 12px,transparent 13px 18px);color:#ffedb8;box-shadow:4px 3px 5px #21150580,inset 0 0 8px #0005;cursor:pointer;transition:transform .18s,box-shadow .18s}
.book-color-0 {--binding:#9b6a2f}.book-color-1{--binding:#752b30}.book-color-2{--binding:#374c30}.book-color-3{--binding:#234e72}
.book-spine:nth-child(4){--binding:#752b30}.book-spine:nth-child(5){--binding:#9b6a2f}.book-spine:nth-child(6){--binding:#234e72}.book-spine:nth-child(7){--binding:#374c30}.book-spine:nth-child(8){--binding:#234e72}
.book-spine::before,.book-spine::after {content:'';position:absolute;left:4%;right:4%;height:6px;border-top:2px solid #e4ba59;border-bottom:1px solid #e4ba59;top:8%}
.book-spine::after {top:auto;bottom:8%}
.book-spine span {display:block;writing-mode:vertical-rl;transform:rotate(180deg);font:clamp(14px,1.9vw,23px)/1.13 Georgia,serif;max-height:100%;margin:auto;text-wrap:balance;text-shadow:0 1px 1px #0009}
.book-spine:hover,.book-spine[aria-expanded=true] {transform:translateY(-9px);box-shadow:0 0 0 2px #e7b758,0 0 12px #ffe2a5,4px 5px 7px #0007}
.storybook-shelf button:focus-visible,.storybook-shelf a:focus-visible{outline:3px solid #ab702b;outline-offset:5px}
.bookshelf-tools {display:flex;justify-content:space-between;align-items:center;gap:20px;padding:0 18px 20px}
.bookshelf-tools p {font:italic 1.2rem Georgia,serif;margin:0}
.bookshelf-tools button,#shelfPreviewClose {background:transparent;border:0;border-bottom:1px solid #b88942;color:#102956;min-height:44px;padding:8px 12px;font:1.05rem Georgia,serif;cursor:pointer}
.shelf-preview {display:grid;grid-template-columns:minmax(160px,32%) 1fr;gap:clamp(20px,4vw,48px);align-items:center;background:#fffdf5;border:1px solid #bb8c46;outline:5px solid #fff8e9;border-radius:16px;padding:32px;margin:6px 16px 28px;box-shadow:0 4px 20px #775a2220}
.shelf-preview>img {width:100%;max-height:390px;object-fit:contain;filter:drop-shadow(0 4px 6px #57381840)}
.shelf-preview h3 {font-size:clamp(1.7rem,3.6vw,3rem);line-height:1.16;margin:12px 0;color:#102956}.shelf-preview-copy>p:not(.kicker) {font:1.15rem/1.55 Georgia,serif}.shelf-preview .btn {display:block;text-align:center;margin-top:24px;background:#102956;color:#fff8e9;border:2px solid #bf914b;border-radius:10px;padding:16px}.shelf-preview #shelfPreviewClose{display:block;margin:8px auto 0}
.shelf-book-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 16px 30px}.shelf-list-book {display:flex;align-items:center;gap:18px;text-align:left;background:#fffdf5;border:1px solid #cfb68c;border-radius:8px;color:#102956;padding:14px;font:1.15rem/1.35 Georgia,serif;cursor:pointer}.shelf-list-book img{width:64px;height:85px;object-fit:contain}.shelf-list-book[aria-expanded=true]{outline:2px solid #b88942}
@media(max-width:650px){.bookshelf-scene{aspect-ratio:auto;height:430px;background-size:860px 430px}.book-spines{left:9%;right:9%;top:27%;bottom:20.5%;overflow-x:auto;gap:8px;padding:12px 5px 5px;align-items:stretch}.book-spine{flex:0 0 59px;height:96%;min-height:190px}.book-spine span{font-size:17px}.bookshelf-tools{flex-wrap:wrap;gap:4px;padding-top:8px}.bookshelf-tools p{font-size:1rem}.shelf-preview{grid-template-columns:1fr;padding:22px;margin:6px 7px 28px}.shelf-preview>img{max-height:260px}.shelf-book-list{grid-template-columns:1fr;margin-inline:4px}.bookshelf-heading h2{font-size:2.8rem}}
@media(prefers-reduced-motion:reduce){.book-spine{transition:none}.book-spine:hover,.book-spine[aria-expanded=true]{transform:none}}

.bookshelf-heading h2,.shelf-preview h3{font-family:Georgia,serif}.bookshelf-heading{color:#102956;background:transparent;position:static}
