/* Bookshelf showcase. Loaded only on /books/ after the shared Bear theme. */
.bookshelf-showcase .shelf-intro{align-items:flex-end;padding-bottom:32px}
.bookshelf-showcase .shelf-intro h1{font-size:clamp(44px,5.6vw,76px);line-height:1.05;letter-spacing:-.035em}
.bookshelf-showcase .shelf-intro p{max-width:30ch;line-height:1.5;color:var(--muted)}
.library-showcase{--cover-height:var(--showcase-cover-height,clamp(170px,15.5vw,224px));--caption-space:136px;--shelf-face:#242724;--shelf-top:#3b413a;--shelf-edge:#7d8778;margin-top:32px;background:#111416d9}
.library-showcase .library-current{--cover-height:inherit;margin-bottom:48px}
.library-showcase .library-toolbar{top:0}
.library-showcase .library-search{display:block;width:260px}
.library-showcase .library-search input{min-height:48px;padding:12px 4px;font-size:15px;color:var(--text);caret-color:var(--accent);border-color:var(--rule);transition:border-color 180ms ease}
.library-showcase .library-search input::placeholder{color:var(--muted);opacity:1}
.library-showcase .library-search input:focus-visible{outline:2px solid var(--accent);outline-offset:5px;border-color:var(--accent)}
.library-showcase .library-section-head{align-items:baseline;gap:16px;margin-bottom:28px;min-height:48px}
.library-showcase .library-section-head h2{font-size:clamp(26px,2.6vw,36px);line-height:1.2;font-weight:500;letter-spacing:-.025em}
.library-showcase .library-current .library-section-head{padding-right:292px}
.library-showcase .library-section-count{font-size:11px;line-height:20px;font-variant-numeric:tabular-nums}
.library-showcase .library-archive{padding-top:32px;border-top:1px solid var(--rule)}
.library-showcase .library-current-shelves{gap:32px}
.library-showcase .library-track{padding-top:0;scrollbar-width:none}
.library-showcase .library-page{grid-template-rows:repeat(var(--library-rows,1),calc(var(--cover-height) + var(--caption-space) + 24px));gap:32px;padding:0 12px}
.library-showcase .library-row{padding-top:24px;isolation:isolate}
.library-showcase .library-current-shelves .library-row{padding-inline:12px;padding-bottom:var(--caption-space)}
.library-showcase .library-row:before{content:"";position:absolute;left:0;right:0;top:0;height:calc(var(--cover-height) + 32px);pointer-events:none;z-index:-1;background:radial-gradient(ellipse at 50% 100%,#64705d24,transparent 72%),linear-gradient(transparent 35%,#1e252170);border-bottom:1px solid #68755d24}
.library-showcase .library-slots{height:calc(var(--cover-height) + 8px);gap:20px;padding-inline:16px}
.library-showcase .library-book{height:calc(var(--cover-height) + 8px);min-width:0;perspective:1000px;outline-offset:8px}
.library-showcase .library-book .library-volume.is-face{height:var(--cover-height);width:auto;aspect-ratio:var(--cover-ratio,.7);transform:rotateY(-10deg);transform-origin:50% 90%;transition:transform 380ms cubic-bezier(.16,1,.3,1)}
.library-showcase .library-front{box-shadow:inset 1px 0 #ffffff30,5px 10px 14px -4px #000a}
.library-showcase .library-front img{opacity:0;transition:opacity 180ms ease}
.library-showcase .is-cover-ready .library-front img{opacity:1}
.library-showcase .library-front:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at var(--light-x,20%) var(--light-y,10%),#fff6,transparent 65%),linear-gradient(90deg,#0003,transparent 7%,#fff1 11%,transparent 16%);opacity:.12;transition:opacity 240ms ease}
.library-showcase .library-book:after{width:88%;height:6px;max-width:180px;bottom:-1px;opacity:.8;background:#0009;filter:blur(4px);transition:opacity 240ms ease}
.library-showcase .library-book-title{display:flex;flex-direction:column;gap:7px;top:calc(100% + 32px);left:-3px;right:-3px;overflow:visible;text-align:center;font:500 14px/1.4 var(--body);color:var(--text);-webkit-line-clamp:unset}
.library-showcase .library-title-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-wrap:pretty}
.library-showcase .library-book-author{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font:400 12px/1.45 var(--body);color:var(--muted);text-wrap:pretty}
.library-showcase .library-result-status{margin:0;font:10px/1.5 var(--mono);color:var(--accent)}
.library-showcase .library-cover-type{padding:12px 9px;font-size:clamp(10px,calc(var(--cover-height)*.075),18px);line-height:1.25;overflow:hidden;word-break:normal;overflow-wrap:normal;background:linear-gradient(125deg,#fff1,transparent 55%),var(--book-ink)}
.library-showcase .library-cover-type>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden}
.library-showcase .library-cover-type small{font-size:clamp(7px,calc(var(--cover-height)*.045),11px);line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.library-showcase .library-ledge{height:12px;background:linear-gradient(var(--shelf-edge),var(--shelf-face) 2px,#171c19);border-bottom:1px solid #485046;box-shadow:0 12px 18px -8px #000d}
.library-showcase .library-ledge:before{height:14px;top:-14px;background:linear-gradient(#292f29,var(--shelf-top));border-bottom-color:#a7b39833}
.library-showcase .library-pagination{margin-top:8px;padding-top:16px}
.library-showcase .library-pagination button{padding:10px 8px;color:var(--text);transition:color 180ms ease,background 180ms ease}
.library-showcase .library-pagination button:disabled{opacity:1;color:var(--muted)}
.library-showcase .library-pagination button:not(:disabled):hover{color:var(--accent);background:var(--surface)}
.library-showcase .library-range{font-variant-numeric:tabular-nums}
.library-showcase .library-book:focus-visible{outline:2px solid var(--accent)}
.library-showcase .library-book:focus-visible .library-volume{transform:translateY(-9px) rotateY(-3deg)}
.library-showcase .library-book:focus-visible .library-title-text{color:var(--accent)}
@media(hover:hover) and (pointer:fine){
  .library-showcase .library-book:hover .library-volume{transform:translateY(-9px) rotateY(-3deg)}
  .library-showcase .library-book.is-inspecting .library-volume{transform:translateY(-9px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,-3deg)) scale(1.025)}
  .library-showcase .library-book.is-inspecting .library-front:after{opacity:.3}
  .library-showcase .library-book:hover:after{opacity:.35}
  .library-showcase .library-book:hover .library-title-text{color:var(--accent)}
}
.library-showcase .library-book:active .library-volume{transform:translateY(-3px) rotateY(-3deg);transition-duration:100ms}
.bookshelf-showcase .library-detail{background:#181e1b;border-color:#465347;gap:56px;padding:72px 56px}
.bookshelf-showcase .library-detail:before{background:radial-gradient(ellipse at 25% 55%,color-mix(in srgb,var(--detail-accent) 10%,transparent),transparent 65%)}
.bookshelf-showcase .library-detail-art{padding:24px 12px}
.bookshelf-showcase .library-dialog .library-detail-art .library-volume{width:min(300px,100%,calc(55dvh * var(--cover-ratio,.7)));transform:rotateY(-14deg)}
.bookshelf-showcase .library-detail-copy h2{font-size:clamp(28px,3.4vw,46px);font-weight:500;line-height:1.13}
.bookshelf-showcase .library-close{color:var(--text);background:#181e1b;padding-inline:12px}
.bookshelf-showcase .library-actions a{font-family:var(--body);font-size:15px;line-height:24px;text-underline-offset:5px}
@media(max-width:899px){
  .bookshelf-showcase .library-detail{padding:72px 28px 40px;gap:28px}
  .bookshelf-showcase .library-dialog .library-detail-art .library-volume{width:min(190px,100%,calc(260px * var(--cover-ratio,.7)))}
}
@media(max-width:699px){
  .bookshelf-showcase .shelf-intro{padding-bottom:24px}
  .bookshelf-showcase .shelf-intro p{max-width:none}
  .library-showcase{--caption-space:152px;margin-top:20px}
  .library-showcase .library-current{--cover-height:inherit;margin-bottom:32px}
  .library-showcase .library-toolbar{position:static;margin-bottom:28px}
  .library-showcase .library-search{width:100%}
  .library-showcase .library-current .library-section-head{padding-right:0}
  .library-showcase .library-section-head{gap:10px;margin-bottom:16px;min-height:36px}
  .library-showcase .library-section-head h2{font-size:26px}
  .library-showcase .library-section-count{font-size:10px}
  .library-showcase .library-current-shelves{gap:20px}
  .library-showcase .library-current-shelves .library-row{padding-inline:2px;padding-bottom:var(--caption-space)}
  .library-showcase .library-page{gap:20px;padding-inline:2px}
  .library-showcase .library-slots{gap:10px;padding-inline:6px}
  .library-showcase .library-book-title{top:calc(100% + 28px);font-size:12px;line-height:1.4;gap:6px;left:0;right:0}
  .library-showcase .library-title-text{-webkit-line-clamp:4}
  .library-showcase .library-book-author{font-size:11px;line-height:1.4}
  .library-showcase .library-book-title:has(.library-result-status){font-size:12px;line-height:1.4}
  .library-showcase .library-result-status{font-size:9px}
  .library-showcase .library-archive{padding-top:28px}
  .library-showcase .library-pagination{gap:8px}
}
@media(prefers-reduced-motion:reduce){
  .library-showcase .library-book .library-volume.is-face{transform:none!important}
  .library-showcase .library-front:after{background:linear-gradient(90deg,#0003,transparent 10%);opacity:.12}
}
