@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root{color-scheme:light;--paper:#f7eedf;--paper-raised:#fff9ef;--ink:#261d19;--muted:#6f5b4d;--green:#164b3b;--line:#ded0bc}
*{box-sizing:border-box}
html{min-height:100%;background:var(--paper)}
body{min-height:100vh;margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',Arial,sans-serif}
a{color:inherit}
.library-main{width:min(1480px,calc(100% - 9vw));margin:0 auto;padding:34px 0 68px}
.library-heading{margin:0 0 48px}
.library-wordmark{display:inline-block;margin-bottom:28px;color:var(--green);font-size:12px;font-weight:700;letter-spacing:.19em;text-decoration:none;text-transform:uppercase}
.library-wordmark:hover{text-decoration:underline;text-underline-offset:5px}
.library-heading h1{margin:0;font-family:'Libre Baskerville',Georgia,serif;font-size:clamp(46px,5vw,66px);font-weight:700;letter-spacing:-.045em;line-height:1.1;white-space:nowrap}
.library-intro{margin:14px 0 0;color:var(--muted);font-family:'Libre Baskerville',Georgia,serif;font-size:clamp(17px,1.6vw,22px);line-height:1.5}
.shelf-section{--shelf-height:56px;--shelf-stage-height:clamp(430px,35vw,480px);--shelf-arrow-top:240px;margin:0 0 44px;padding:0 0 30px;border-bottom:1px solid var(--line)}
.shelf-heading{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin:0 0 16px}
.shelf-heading h2{margin:0;font-family:'Libre Baskerville',Georgia,serif;font-size:clamp(22px,2.25vw,32px);font-weight:700;letter-spacing:-.035em;line-height:1.25;white-space:nowrap}
.shelf-carousel{position:relative}
.shelf-scroll{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:rgba(38,29,25,.24) transparent;scroll-behavior:smooth}
.shelf-scroll:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.shelf-scroll::-webkit-scrollbar{height:8px}
.shelf-scroll::-webkit-scrollbar-thumb{border-radius:99px;background:rgba(38,29,25,.24)}
.shelf-canvas{width:100%;--card-count:1;--card-width:25%}
.shelf-stage{position:relative;width:100%;height:var(--shelf-stage-height);overflow:hidden;background:transparent}
.shelf-photo{position:absolute;right:0;bottom:0;left:0;display:block;width:100%;height:var(--shelf-height);object-fit:fill;object-position:center}
.shelf-items{position:absolute;inset:0 0 var(--shelf-height);display:grid;grid-template-columns:repeat(var(--card-count,1),var(--card-width,25%));align-items:end;pointer-events:none}
.shelf-item{position:relative;grid-row:1;align-self:end;justify-self:center;display:block;width:min(220px,82%);aspect-ratio:992 / 1586;pointer-events:auto;text-decoration:none}
.shelf-item:focus-visible{outline:3px solid var(--green);outline-offset:-5px}
.book-mockup-image{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 9px 12px rgba(43,31,19,.22));transition:transform .2s ease,filter .2s ease}
.shelf-item:hover .book-mockup-image{transform:translateY(-4px);filter:drop-shadow(0 13px 15px rgba(43,31,19,.24))}
.shelf-captions{display:grid;grid-template-columns:repeat(var(--card-count,1),var(--card-width,25%));gap:0;padding:15px 2% 19px;background:var(--paper-raised)}
.book-details{display:grid;min-width:0;width:100%;padding:0 8px;justify-items:center;gap:5px;text-align:center}
.book-title{max-width:100%;color:var(--ink);font-family:'Libre Baskerville',Georgia,serif;font-size:clamp(15px,1.4vw,20px);font-weight:700;line-height:1.4;text-decoration:none}
.book-title:hover{text-decoration:underline;text-decoration-color:var(--green);text-underline-offset:4px}
.book-details>span{color:#4e3c30;font-size:14px;line-height:1.45}
.book-details .book-type{color:var(--green);font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.shelf-arrow{position:absolute;z-index:2;top:var(--shelf-arrow-top);display:grid;width:46px;height:46px;place-items:center;transform:translateY(-50%);border:1px solid rgba(22,75,59,.22);border-radius:50%;background:rgba(255,249,239,.94);box-shadow:0 3px 12px rgba(38,29,25,.16);color:var(--green);font:400 32px/1 'DM Sans',Arial,sans-serif;cursor:pointer}
.shelf-arrow:hover{background:#fff;color:#0e382c}
.shelf-arrow:focus-visible{outline:3px solid var(--green);outline-offset:3px}
.shelf-arrow--previous{left:12px}
.shelf-arrow--next{right:12px}
.shelf-arrow[hidden]{display:none}
.empty-shelf{overflow:hidden;background:var(--paper-raised)}
.empty-shelf .shelf-stage{height:var(--shelf-height)}
.empty-shelf .shelf-photo{height:100%}
.shelf-empty-note{margin:0;padding:17px 6% 20px;color:var(--muted);font-family:'Libre Baskerville',Georgia,serif;font-size:16px;font-style:italic;line-height:1.5;text-align:center}
.library-footer{display:flex;justify-content:space-between;gap:18px;padding:21px max(4.5vw,20px);border-top:1px solid var(--line);color:var(--muted);font-size:12px}
.library-footer a{text-decoration-color:var(--green);text-underline-offset:3px}
@media(min-width:601px) and (max-width:1100px){
  .library-main{width:calc(100% - 64px);padding-top:30px}
  .library-heading{margin-bottom:38px}
  .library-heading h1{font-size:clamp(38px,5vw,50px)}
  .shelf-section{--shelf-height:50px;--shelf-stage-height:clamp(360px,42vw,420px);--shelf-arrow-top:clamp(180px,21vw,210px)}
  .shelf-item{width:min(190px,82%)}
}
@media(max-width:600px){
  .library-main{width:calc(100% - 36px);padding-top:27px}
  .library-heading{margin-bottom:34px}
  .library-wordmark{margin-bottom:22px;font-size:11px}
  .library-heading h1{font-size:clamp(16px,5.4vw,31px);letter-spacing:-.055em}
  .library-intro{display:block;width:100%;max-width:100%;font-size:clamp(14px,4.1vw,17px);white-space:normal;overflow-wrap:anywhere}
  .shelf-section{margin-bottom:31px;padding-bottom:22px}
  .shelf-heading{margin-bottom:10px}
  .shelf-heading h2{font-size:22px}
  .shelf-section{--shelf-height:46px;--shelf-stage-height:clamp(270px,78vw,310px);--shelf-arrow-top:clamp(135px,39vw,152px)}
  .shelf-item{width:min(150px,86%)}
  .shelf-captions{padding:12px 1% 16px}
  .book-title{font-size:clamp(12px,3.6vw,15px)}
  .book-details>span{font-size:12px}
  .shelf-arrow{width:40px;height:40px;font-size:28px}
  .shelf-arrow--previous{left:8px}
  .shelf-arrow--next{right:8px}
  .shelf-empty-note{font-size:14px}
  .library-footer{flex-wrap:wrap}
}
@media(max-width:370px){
  .library-main{width:calc(100% - 28px)}
  .library-heading h1{font-size:clamp(16px,5.2vw,19px)}
  .library-intro{font-size:14px}
  .shelf-heading h2{font-size:19px}
  .shelf-item{width:min(135px,86%)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
