/* Self-contained bookshelf: all selectors are scoped to this component. */
.discover-books{--gold:#d9ba83;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 24%,#50402b 0, #25201c 35%,#151515 75%);color:#f6eddf;margin:35px auto 70px;padding:56px 24px 26px;text-align:center;isolation:isolate}
.discover-books *{box-sizing:border-box}
.discover-books .discover-heading h2{font:normal clamp(36px,5vw,58px)/1.15 Georgia,serif;color:#f6eddf;margin:12px 0}
.discover-books p{color:#c5baab;font:14px/1.7 'Open Sans',Arial,sans-serif;margin:0}
.discover-books .discover-eyebrow{font-size:10px;letter-spacing:3px;color:var(--gold)}
.discover-stage{position:relative;height:360px;max-width:1080px;margin:28px auto 0;touch-action:pan-y;outline-offset:-4px}
.discover-covers{position:absolute;inset:0 50% 30px;perspective:1100px}
.discover-books .discover-cover{position:absolute;bottom:0;left:0;width:190px;height:285px;padding:0;border:0;border-radius:2px;background:#302820;transform:translateX(calc(-50% + var(--offset)*235px)) scale(var(--scale));transform-origin:50% 100%;opacity:var(--opacity);z-index:var(--layer);transition:transform .55s cubic-bezier(.22,.7,.2,1),opacity .45s,filter .4s;box-shadow:12px 12px 22px #0009;cursor:pointer;overflow:hidden}
.discover-cover img{display:block;width:100%;height:100%;object-fit:contain;background:#201c18;pointer-events:none}
.discover-cover::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0005,transparent 5%,#fff2 7%,transparent 10%);pointer-events:none;border:1px solid #ffffff15}
.discover-books .discover-cover[aria-pressed="true"]{box-shadow:0 0 45px #e4b97421,15px 18px 30px #000b}
.discover-cover:hover{filter:brightness(1.12)}
.discover-shelf{position:absolute;bottom:13px;left:-10%;width:120%;height:17px;background:linear-gradient(#957046,#60442c 23%,#33251c 28%,#38291e);box-shadow:0 16px 22px #000b;border-top:1px solid #c5a06a66;z-index:-1}
.discover-shelf::before{content:'';position:absolute;bottom:17px;left:0;width:100%;height:45px;background:linear-gradient(#49382966,#80603b);clip-path:polygon(5% 0,95% 0,100% 100%,0 100%)}
.discover-books .discover-arrow{position:absolute;top:42%;z-index:10;width:46px;height:46px;padding:0;border-radius:50%;border:1px solid #bfa77d66;background:#1d1b18e6;color:#f2d5a3;font:22px/1 Arial;transition:background .2s;cursor:pointer}
.discover-prev{left:0}.discover-next{right:0}.discover-arrow:hover{background:#655037!important}
.discover-books :is(button,a,[tabindex]):focus-visible{outline:2px solid #f4d293;outline-offset:5px}
.discover-info{max-width:730px;min-height:300px;margin:25px auto 0}
.discover-books .discover-category{color:var(--gold);font-size:10px;text-transform:uppercase;letter-spacing:2px}
.discover-books .discover-info h3{color:#fff4e5;font:normal clamp(22px,3vw,31px)/1.25 Georgia,serif;margin:12px 0;text-transform:none}
.discover-books .discover-author{color:#deceb5;font-size:13px;margin-bottom:12px}
.discover-books .discover-description{max-width:620px;margin:auto;font-size:13px}
.discover-books .discover-year{font-size:11px;margin:10px 0 18px;color:#ae9e88}
.discover-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
.discover-books .discover-actions a,.discover-books .discover-actions button{display:inline-flex;align-items:center;justify-content:center;gap:20px;min-height:44px;padding:12px 23px;border:1px solid #cdb18470;border-radius:24px;color:#ead4b2;background:transparent;font:600 12px/1.4 'Open Sans',Arial,sans-serif;text-transform:none;letter-spacing:0;text-decoration:none;cursor:pointer}
.discover-books .discover-actions .discover-buy{background:#dfc395;color:#241c12;border-color:#dfc395}
.discover-actions a:hover,.discover-actions button:hover{filter:brightness(1.15)}
.discover-buy:disabled{opacity:.5;cursor:not-allowed!important}
.discover-books .discover-status{min-height:28px;margin-top:10px;font-size:12px;color:#edd2a7}
.discover-bottom{max-width:800px;margin:16px auto 0;padding-top:20px;border-top:1px solid #e3c38d25;display:flex;gap:24px;align-items:center;justify-content:center}
.discover-count,.discover-swipe{color:#b5a48c;font:10px/1.4 Arial;letter-spacing:1px;white-space:nowrap}
.discover-thumbnails{display:flex;gap:12px;overflow:auto;padding:6px;scrollbar-width:thin;scrollbar-color:#846949 transparent}
.discover-books .discover-thumb{padding:3px;width:39px;min-width:39px;height:55px;background:transparent;border:1px solid transparent;border-radius:3px;opacity:.55;cursor:pointer}
.discover-thumb img{width:100%;height:100%;object-fit:contain;display:block}
.discover-books .discover-thumb[aria-pressed="true"]{border-color:var(--gold);opacity:1;background:#ffffff0c}
@media(max-width:760px){.discover-books{padding:38px 18px 24px;margin-bottom:40px}.discover-stage{height:310px;margin-top:20px}.discover-books .discover-cover{width:160px;height:240px;transform:translateX(calc(-50% + var(--offset)*180px)) scale(var(--scale))}.discover-books .discover-arrow{width:38px;height:38px;top:48%}.discover-info{min-height:345px}.discover-bottom{gap:12px}.discover-swipe{display:none}.discover-books .discover-eyebrow{letter-spacing:2px}.discover-books .discover-description{font-size:12px}.discover-books .discover-info h3{font-size:24px}}
@media(prefers-reduced-motion:reduce){.discover-books *{transition:none!important;scroll-behavior:auto!important}}

.discover-books .discover-heading h2{text-transform:none}

/* Theme palette follows the visitor's choice. */
.discover-books{--gold:#27629e;--discover-title:#173554;--discover-text:#4b6177;--discover-muted:#56708a;--discover-line:#bacde1;--discover-button:#2464a5;--discover-button-text:#fff;background:radial-gradient(ellipse at 50% 24%,#ffffff 0,#edf4fb 42%,#e2edf8 100%);color:var(--discover-title)}
html[data-theme="dark"] .discover-books{--gold:#a6c9f1;--discover-title:#eef5ff;--discover-text:#bdcde0;--discover-muted:#a0b7d0;--discover-line:#3b526d;--discover-button:#9cc9f8;--discover-button-text:#112b47;background:radial-gradient(ellipse at 50% 24%,#263e5a 0,#142337 42%,#0c1625 100%)}
.discover-books .discover-heading h2,.discover-books .discover-info h3{color:var(--discover-title)}
.discover-books p,.discover-books .discover-author{color:var(--discover-text)}
.discover-books .discover-eyebrow,.discover-books .discover-category,.discover-books .discover-status{color:var(--gold)}
.discover-books .discover-year,.discover-books .discover-count,.discover-books .discover-swipe{color:var(--discover-muted)}
.discover-books .discover-actions a{color:var(--gold);border-color:var(--discover-line)}
.discover-books .discover-actions .discover-buy{background:var(--discover-button);color:var(--discover-button-text);border-color:var(--discover-button)}
.discover-books .discover-arrow{background:var(--discover-title);color:var(--discover-button-text);border-color:var(--discover-line)}
html[data-theme="dark"] .discover-books .discover-arrow{background:#1e3856;color:#eaf4ff}
.discover-books .discover-arrow:hover{background:var(--discover-button)!important;color:var(--discover-button-text)}
.discover-books .discover-bottom{border-color:var(--discover-line)}
.discover-books .discover-thumbnails{min-width:0;position:relative;scrollbar-color:var(--discover-line) transparent}
.discover-books .discover-thumb[aria-pressed="true"]{background:#6296c51c}
.discover-books :is(button,a,[tabindex]):focus-visible{outline-color:var(--gold)}
.discover-books .discover-cover{box-shadow:10px 12px 24px #15375335}
.discover-books .discover-cover[aria-pressed="true"]{box-shadow:0 0 38px #74a8e52b,12px 18px 28px #122a4b55}
.discover-books .discover-shelf{background:linear-gradient(#b6cbe0,#7a99b8 23%,#5f7d9b 28%,#7592af);border-color:#d4e3f2;box-shadow:0 16px 22px #1c416838}
.discover-books .discover-shelf::before{background:linear-gradient(#c4d6e680,#abc3d9)}
html[data-theme="dark"] .discover-books .discover-shelf{background:linear-gradient(#6682a1,#354f6c 23%,#1b2d43 28%,#263b53);border-color:#6d88a6;box-shadow:0 16px 22px #0008}
html[data-theme="dark"] .discover-books .discover-shelf::before{background:linear-gradient(#2f476480,#4a6481)}
/* A single light sweep highlights each newly selected cover. No autoplay. */
.discover-cover::before{content:'';position:absolute;inset:-30% -90%;z-index:2;pointer-events:none;background:linear-gradient(110deg,transparent 42%,#ffffff55 50%,transparent 58%);opacity:0;transform:translateX(-60%)}
.discover-cover.discover-reveal::before{animation:discover-glint .85s ease-out}
@keyframes discover-glint{0%{opacity:0;transform:translateX(-60%)}25%{opacity:.7}100%{opacity:0;transform:translateX(60%)}}
@media(prefers-reduced-motion:reduce){.discover-books *,.discover-books *::before{animation:none!important;transition:none!important}}
