/* BOKLY — Screenshot-led editorial bookstore redesign, November 2026.
   This stylesheet sits after styles.css so the existing cart, detail modals,
   catalog, legal pages, and preview interactions continue to function. */
:root {--sage:#8D9F5E;--yellow:#FEC868;--brown:#473C33;--ink:#44372F;--cream:#faf8f4;--muted:#837d75;--paper:#fff;--line:#eae7df;--font:'DM Sans',sans-serif;--display:'Outfit',sans-serif}
html {scroll-padding-top:20px}
body {background:#fafaf9;color:#45372e;font-family:var(--font);}
body:has(.sidebar.open) {overflow:hidden}
.layout-shell {display:grid;grid-template-columns:244px minmax(0,1fr);gap:28px;padding:8px 20px 0 8px;max-width:1950px;margin:0 auto;min-height:100vh}
.main-column {min-width:0}
.sidebar {height:calc(100vh - 16px);min-height:725px;position:sticky;top:8px;display:flex;flex-direction:column;background:#fff;border:1px solid #efeeeb;border-radius:24px;padding:22px 15px 14px;box-shadow:0 10px 32px #493a2b13,0 0 5px #3b2e2606;overflow-y:auto;scrollbar-width:thin;z-index:40}
.sidebar-brand {display:flex;align-items:center;justify-content:center;flex:0 0 88px;margin:0 8px 35px}
.sidebar-brand img {width:166px;max-width:none;height:auto;object-fit:contain}
.nav {display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;}
.nav-link {height:45px;display:flex;align-items:center;gap:16px;padding:0 17px;border-radius:11px;font-weight:700;font-size:14px;white-space:nowrap;color:#38302b;transition:background .18s,color .18s,transform .18s}
.nav-link:hover,.nav-link.active {background:linear-gradient(90deg,#edf3de,#f2f4e7);color:#342e27}
.nav-link:hover {transform:translateX(1px)}
.ui-icon {height:21px;width:21px;stroke:currentColor;stroke-width:1.75;fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.nav-link .ui-icon {width:20px;height:20px;color:#5f6e33}
.sidebar-spacer {display:none}
.sidebar-divider {height:1px;background:#e8e7e1;flex:none;margin:42px 10px 45px}
.sidebar-promo {height:268px;min-height:268px;border-radius:19px;overflow:hidden;position:relative;padding:28px 18px;background:radial-gradient(ellipse at 75% 55%,#f8f4ea 0%,#f4eee7 65%,#f8f6f1 100%);border:1px solid #f1ece5}
.sidebar-promo-copy {position:relative;z-index:2;height:100%}
.sidebar-promo h2 {font-family:var(--display);font-size:29px;line-height:1.04;letter-spacing:-.05em;font-weight:750;color:#47362d;margin:8px 0 0}
.sidebar-promo img {position:absolute;width:235px;max-width:none;right:-109px;bottom:32px;filter:drop-shadow(0 7px 6px #4435221b);pointer-events:none}
.promo-btn {position:absolute;bottom:1px;left:0;display:flex;align-items:center;justify-content:center;gap:9px;min-width:169px;background:#49382f;color:#fff;border-radius:40px;padding:11px 15px;font-size:11px;white-space:nowrap;font-weight:700;box-shadow:0 4px 10px #46372c18}
.promo-btn:hover,.btn-dark:hover{background:#64794a;color:#fff}
.promo-btn span {font-size:15px}
.side-note {font-size:10px;color:#aea599;text-align:center;line-height:1;margin:16px 0 0}
.side-note span {color:var(--sage)}
.header {position:relative;top:auto;border:0;background:transparent;box-shadow:none;backdrop-filter:none;z-index:20}
.header-inner {height:65px;width:100%;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 10px 0 17px}
.header-search {flex:0 1 558px;min-width:210px;height:43px;border-radius:40px;background:#f1eeee;display:flex;align-items:center;gap:14px;padding:0 17px;color:#52473e;transition:box-shadow .2s,background .2s}
.header-search:focus-within {box-shadow:0 0 0 2px #8d9f5e55;background:#fff}
.header-search .ui-icon {width:22px;height:22px;stroke-width:1.8}
.header-search input {border:0;background:transparent;min-width:0;flex:1;outline:none;color:var(--brown);font-size:14px;font-weight:400}
.header-search input::placeholder {color:#857f7e;opacity:1}
.header-search button {width:25px;height:27px;background:transparent;border:0;font-weight:700;color:#8b9874;font-size:18px}
.header-actions {display:flex;align-items:center;gap:17px}
.header-actions .icon-btn {border:0;border-radius:8px;background:transparent;width:44px;height:44px;display:grid;place-items:center;color:#372d26}
.header-actions .icon-btn:hover {background:#f0eee8}
.header-actions .icon-btn .ui-icon {width:25px;height:25px;stroke-width:1.8}
.header-actions .bubble {font-size:11px;width:auto;height:18px;min-width:18px;right:-2px;top:-2px;border-radius:50%;background:#FEC868;color:#443a31}
.signin-btn {border:0;display:flex;align-items:center;justify-content:center;gap:12px;background:#f0eeee;border-radius:40px;padding:11px 20px;min-height:43px;color:#342d28;font-size:12px;font-weight:700;white-space:nowrap;margin-left:8px}
.signin-btn:hover{background:#e4e9d7}
.signin-btn .ui-icon {width:20px;height:20px}
.mobile-menu{display:none!important}
#search-bar{display:none!important}
main {min-width:0}
/* Hero: left-aligned type plus supplied cut-out book illustration */
.hero-section {background:radial-gradient(ellipse 74% 110% at 74% 60%,#f1ebe7 0%,#f7f3f0 57%,#fcf8f5 100%);position:relative;border-radius:27px;margin:7px 0 14px;overflow:hidden;height:365px;box-shadow:none}
.hero {position:relative;display:flex;align-items:center;min-height:365px;height:365px;width:100%;margin:0;gap:0;padding:24px 45px 24px 58px;overflow:hidden}
.hero:after {content:'';position:absolute;right:-96px;bottom:-210px;width:365px;height:365px;border:1px solid #fff9;background:#ebe3dc4f;border-radius:50%;z-index:0;pointer-events:none}
.hero-copy {position:relative;z-index:4;flex:0 0 54%;padding:0;min-width:0}
.eyebrow {display:inline-flex;align-items:center;gap:0;background:#FCE8B9;border-radius:45px;padding:7px 21px;color:#40352e;font-size:12px;letter-spacing:0;font-weight:800;margin:0}
.hero h1 {font-family:var(--display);color:#483930;letter-spacing:-.056em;line-height:1.05;font-size:clamp(43px,3.8vw,58px);font-weight:800;margin:20px 0 15px}
.hero-description {font-size:15px;line-height:1.33;margin:0 0 22px;color:#4e4541;max-width:540px;font-weight:400}
.hero-search {display:flex;align-items:center;gap:12px;padding:5px 6px 5px 18px;max-width:520px;height:52px;border-radius:40px;border:1px solid #eeece8;background:#fff;box-shadow:0 5px 13px #48392d1b}
.hero-search .ui-icon {color:#524740;height:20px;width:20px}
.hero-search input {flex:1;min-width:0;font-size:13px;color:#453930;outline:0;border:0}
.hero-search input::placeholder {color:#aaa5a1}
.hero-search button {background:#86a251;box-shadow:0 1px 5px #50683933;border:none;border-radius:40px;padding:12px 24px;font-size:13px;font-weight:800;min-width:104px;white-space:nowrap;color:white}
.hero-search button:hover {background:#6f8844}
.hero-art {position:absolute;inset:0 0 0 48%;z-index:1;overflow:visible;height:auto;display:block}
.hero-photo {background:none;mask-image:none;mix-blend-mode:normal;position:absolute;right:17px;bottom:-145px;top:auto;left:auto;inset:auto;width:min(670px,100%);height:auto;max-width:none;object-fit:contain;filter:drop-shadow(9px 10px 15px #55493913);pointer-events:none}
.floating-token {z-index:3;position:absolute;width:66px;height:66px;display:grid;place-items:center;padding:0;border:0;transform:none;border-radius:22px;box-shadow:0 10px 21px #51453624;backdrop-filter:blur(2px)}
.floating-token svg {height:39px;width:39px;color:white;stroke-width:1.55}
.token-one {top:22px;left:14%;background:linear-gradient(135deg,#9ecb83,#b1d585);box-shadow:0 10px 24px #759b6350}
.token-two {bottom:92px;left:18%;background:linear-gradient(135deg,#ffba7e,#f6a46a)}
.token-three {right:9%;top:72px;background:linear-gradient(135deg,#adb1d6,#999bc1)}
/* Ten compact icon-led category shortcuts like the supplied design */
.categories-section {padding:0;margin:0 0 32px;background:transparent}
.category-grid {display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;width:100%}
.category-tile {height:79px;min-height:79px;min-width:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:7px 5px 8px;border:1px solid transparent;border-radius:12px;background:#f9f7f4;color:#574d3d;cursor:pointer;transition:background .17s,transform .17s,border-color .17s}
.category-tile:nth-child(3n) {background:#faf9f7}
.category-tile.selected {background:linear-gradient(125deg,#dce9c9,#eaf0dc);border-color:#dce7cf}
.category-tile:hover {background:#eaf0dc;border-color:#d3e1bd;transform:translateY(-2px)}
.category-tile svg {width:26px;height:26px;flex:none;stroke:#63582c;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.category-tile span {font-weight:700;font-size:10px;letter-spacing:-.025em;text-align:center;line-height:1.15;white-space:normal}
/* Books on shelves, separate from the full shop cards */
.featured-section {padding:0;margin:0 0 60px;background:transparent}
.shelf-and-aside {display:grid;grid-template-columns:minmax(0,1fr) minmax(258px,320px);gap:31px;align-items:start}
.shelf-column {min-width:0}
.bookshelf-group {margin:0 0 25px;padding:0;position:relative;border:0}
.bookshelf-group + .bookshelf-group {border:0;margin-top:17px;padding:0}
.shelf-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 3px 14px;padding:0}
.shelf-heading h2 {font-family:var(--display);font-size:23px;letter-spacing:-.035em;font-weight:800;color:#47372e;line-height:1.2;margin:0}
.shelf-heading a {font-size:11px;font-weight:700;color:#39312a;white-space:nowrap;transition:color .2s}
.shelf-heading a:hover{color:#7f9655}
.shelf-heading a span {font-size:16px;margin-left:7px}
.shelf-books {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:end;padding:0 19px 18px;position:relative;min-height:167px;overflow:visible}
.shelf-books:before {content:'';position:absolute;left:1px;right:1px;top:auto;bottom:13px;height:12px;border-radius:4px 4px 8px 8px;background:linear-gradient(180deg,#f4e4ca 0%,#e6c99f 48%,#d2ae7e 100%);box-shadow:0 7px 9px #4e3a2525;z-index:2;pointer-events:none}
.shelf-books:after {content:'';position:absolute;left:17px;right:10px;top:auto;bottom:5px;height:10px;border-radius:50%;background:#98826e1d;filter:blur(5px);z-index:0;pointer-events:none}
.shelf-book {position:relative;min-width:0;height:151px;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;z-index:1}
.shelf-book-cover {position:relative;display:flex;align-items:end;justify-content:center;height:147px;width:100%;min-width:0;z-index:1}
.shelf-book-cover img {height:128px;width:auto;max-width:93%;object-fit:contain;box-shadow:5px 5px 11px #4a392845;border-radius:2px 4px 2px 2px;transition:transform .24s,box-shadow .24s;display:block}
.shelf-book:hover .shelf-book-cover img {transform:translateY(-7px);box-shadow:8px 12px 18px #4a392845}
.shelf-view {position:absolute;inset:0;border:0;background:transparent;color:transparent;font-size:0;z-index:3;border-radius:7px}
.shelf-view:focus-visible {outline:2px solid #647e48;outline-offset:1px}
.shelf-book-caption {position:absolute;bottom:-25px;left:0;right:0;text-align:center;font-size:9px;line-height:1.1;opacity:0;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;background:#fff;padding:3px;border-radius:3px;transition:opacity .2s;z-index:4}
.shelf-book:hover .shelf-book-caption {opacity:1}
.feature-aside {position:relative;min-height:391px;margin-top:0;overflow:hidden;background:linear-gradient(130deg,#f8f4eb 0%,#f7f1e6 45%,#e6eccd 100%);border-radius:28px;padding:31px 27px;color:#48382e}
.feature-aside:before {content:'';position:absolute;right:-125px;top:-20px;width:215px;height:390px;background:#dfe5bc;border-radius:50%;transform:rotate(26deg)}
.feature-aside:after {content:'';position:absolute;left:-105px;bottom:-215px;width:370px;height:320px;border:1px solid #fff9;border-radius:50%;transform:rotate(25deg)}
.feature-copy {position:relative;z-index:2}
.feature-copy .overline {font-size:10px;font-weight:800;color:#81985f;letter-spacing:.06em;margin:0 0 10px}
.feature-copy h2 {font-family:var(--display);font-size:32px;line-height:1.06;letter-spacing:-.045em;font-weight:800;margin:0 0 15px}
.feature-copy p:not(.overline) {font-size:14px;line-height:1.43;color:#473b32;max-width:210px;margin-bottom:15px}
.feature-copy .btn-dark {display:inline-flex;align-items:center;gap:11px;padding:11px 22px;margin:0;background:#47382d;color:white;font-size:12px;font-weight:700;border-radius:50px}
.feature-aside img {position:absolute;z-index:1;left:-50px;right:0;bottom:-52px;width:410px;max-width:none;pointer-events:none;filter:drop-shadow(0 8px 14px #4a3c2816)}
/* Catalog browse and subsequent sections */
.section {padding:65px 30px}
.shop-section {padding:58px 34px 72px;background:#faf8f5;border-radius:26px;margin:26px 0 40px;scroll-margin-top:16px}
.shop-heading {margin-bottom:27px}
.section-heading h2{font-size:clamp(30px,3vw,46px);font-weight:750}
.overline {color:#81975e;font-size:10px;font-weight:800;letter-spacing:.14em}
.shop-heading .subtext {color:#877f78;font-size:12px}
.filters{gap:14px}
.filter-pills{gap:7px}
.filter-pill{font-weight:700}
.book-grid.shop-grid{grid-template-columns:repeat(6,minmax(0,1fr));column-gap:15px;row-gap:35px}
.shop-grid .cover-wrap{border-radius:11px;background:#f1eee7}
.shop-grid .book-info{padding-top:12px}
.newsletter-section {border-radius:24px;background:linear-gradient(100deg,#e7eddb,#f7edd6);padding:12px 42px;margin:0 0 40px}
.newsletter {min-height:220px;gap:20px}
.newsletter h2{font-size:32px}
.footer {margin:0 -20px 0 -28px;background:#44372f;border-radius:25px 25px 0 0;overflow:hidden}
.footer .container {width:calc(100% - 72px);max-width:1260px}
.footer-main {gap:25px;padding:50px 0}
.footer-brand img {width:165px}
.info-page{max-width:850px;padding:65px 30px 110px;margin:0 auto;min-height:60vh;line-height:1.8}
.info-page h1{font-size:44px;font-family:var(--display);letter-spacing:-.05em}
.info-page p{font-size:15px;color:#685d53}
.info-page a{font-weight:800;color:#68854b}
/* Product drawer, checkout and preview modals inherit the existing app CSS. */
@media(max-width:1370px){
 .layout-shell{grid-template-columns:220px minmax(0,1fr);gap:20px;padding-right:13px}
 .hero{padding-left:44px}
 .hero h1{font-size:clamp(41px,3.9vw,54px)}
 .hero-photo{width:min(620px,105%);right:-12px;bottom:-127px}
 .category-grid{gap:6px}
 .category-tile span{font-size:9.6px}
 .shelf-and-aside{grid-template-columns:minmax(0,1fr) 275px;gap:21px}
 .shelf-books{gap:7px;padding-left:10px;padding-right:10px}
 .feature-aside{padding:26px 24px}
 .sidebar-brand img{width:150px}
 .nav-link{gap:12px;padding-left:14px}
 .sidebar-promo h2{font-size:27px}
}
@media(max-width:1100px){
 .layout-shell{grid-template-columns:194px minmax(0,1fr);gap:16px;padding-right:10px}
 .sidebar{padding:17px 11px}
 .sidebar-brand{margin-bottom:16px;flex-basis:80px}
 .sidebar-brand img{width:144px}
 .nav-link{font-size:12px;height:41px;gap:10px;padding-left:12px}
 .sidebar-divider{margin-top:23px;margin-bottom:29px}
 .sidebar-promo{height:236px;min-height:236px;padding:17px 13px}
 .sidebar-promo h2{font-size:25px}
 .promo-btn{min-width:148px;font-size:10px}
 .hero-section,.hero{height:348px;min-height:348px}
 .hero{padding-left:35px}
 .hero-copy{flex-basis:60%}
 .hero h1{font-size:clamp(35px,4.1vw,44px)}
 .hero-description{font-size:12px}
 .hero-search{max-width:420px}
 .hero-art{left:47%}
 .hero-photo{width:490px;right:-48px;bottom:-93px}
 .floating-token{width:47px;height:47px;border-radius:15px}
 .floating-token svg{width:26px;height:26px}
 .header-actions{gap:7px}
 .header-search input{font-size:12px}
 .category-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
 .category-tile{height:70px;min-height:70px}
 .shelf-and-aside{grid-template-columns:minmax(0,1fr) 235px;gap:15px}
 .feature-aside{min-height:352px;padding:24px 18px}
 .feature-copy h2{font-size:27px}
 .feature-copy p:not(.overline){font-size:12px}
 .feature-aside img{width:340px;left:-50px;bottom:-44px}
 .shelf-books{min-height:152px}
 .shelf-book{height:138px}
 .shelf-book-cover{height:135px}
 .shelf-book-cover img{height:115px}
 .shelf-heading h2{font-size:21px}
 .book-grid.shop-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:800px){
 .layout-shell{display:block;padding:0 15px}
 .sidebar{position:fixed;left:0;top:0;bottom:0;width:260px;height:100dvh;min-height:0;transform:translateX(-110%);transition:transform .25s;z-index:85;border-radius:0 22px 22px 0;padding:20px}
 .sidebar.open{transform:translateX(0);box-shadow:10px 0 35px #2f281f46}
 .sidebar-brand{margin:10px auto 25px}
 .sidebar-spacer{display:block;min-height:14px}
 .sidebar-divider{margin:16px 10px 23px}
 .main-column{width:100%}
 .header-inner{height:65px;padding:0;gap:10px}
 .header-search{flex:1;min-width:120px}
 .header-search input{font-size:12px}
 .mobile-menu{display:grid!important;border:none;background:#f2f1ed;border-radius:50%;width:38px;height:38px;flex:0 0 38px;place-items:center;padding:0}
 .mobile-menu .ui-icon{width:20px;height:20px}
 .header-actions{gap:2px}
 .header-actions .icon-btn{width:36px;height:38px}
 .header-actions .icon-btn .ui-icon{width:21px;height:21px}
 .signin-btn{padding:10px;margin:0}
 .signin-btn span{display:none}
 .hero-section,.hero{height:auto;min-height:0}
 .hero{padding:35px 28px 230px}
 .hero-copy{flex:1;min-width:0}
 .hero h1{font-size:clamp(40px,6vw,56px)}
 .hero-art{left:0;right:0;top:210px;bottom:0;overflow:hidden}
 .hero-photo{right:-40px;bottom:-214px;width:510px;max-width:none}
 .token-one{left:auto;right:51%;top:10px}
 .token-two{left:15%;bottom:20px}
 .token-three{right:13%;top:28px}
 .categories-section{margin-top:12px}
 .category-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
 .shelf-and-aside{grid-template-columns:1fr}
 .feature-aside{min-height:240px;display:block}
 .feature-aside img{width:390px;left:auto;right:-90px;bottom:-90px}
 .featured-section{margin-bottom:25px}
 .footer{margin-left:-15px;margin-right:-15px}
 .newsletter-section{padding:25px}
}
@media(max-width:520px){
 .layout-shell{padding:0 10px}
 .header-inner{height:63px;gap:5px}
 .header-search{padding:0 10px;height:39px;gap:7px}
 .header-search .ui-icon{width:16px;height:16px}
 .header-search input{font-size:11px}
 .header-search button{display:none}
 .signin-btn{height:38px;width:37px}
 .hero-section{border-radius:18px;margin-top:2px}
 .hero{padding:26px 20px 195px}
 .eyebrow{padding:6px 14px;font-size:11px}
 .hero h1{font-size:39px;line-height:1.07;margin:17px 0 12px}
 .hero-description{font-size:12px;line-height:1.55;margin-bottom:17px}
 .hero-search{height:47px;padding-left:13px;gap:5px}
 .hero-search input{font-size:10px}
 .hero-search button{min-width:76px;font-size:11px;padding:11px 10px}
 .hero-art{top:260px}
 .hero-photo{width:395px;right:-48px;bottom:-158px}
 .floating-token{width:37px;height:37px;border-radius:12px}
 .floating-token svg{width:22px;height:22px}
 .token-one{left:13%;right:auto;top:8px}.token-two{left:22%;bottom:11px}.token-three{right:7%;top:27px}
 .category-grid{display:flex;overflow:auto;gap:7px;scroll-snap-type:x proximity;padding-bottom:5px;scrollbar-width:none}
 .category-tile{flex:0 0 94px;min-height:73px;height:73px;scroll-snap-align:start}
 .category-tile span{font-size:9px}
 .category-tile svg{width:24px;height:24px}
 .featured-section{margin-top:28px}
 .shelf-heading h2{font-size:21px}
 .shelf-heading a{font-size:10px}
 .shelf-books{display:flex;overflow-x:auto;scroll-snap-type:x proximity;gap:15px;min-height:165px;padding:0 12px 19px;scrollbar-width:thin}
 .shelf-book{flex:0 0 92px;scroll-snap-align:start;height:150px}
 .shelf-book-cover{height:147px}
 .shelf-book-cover img{height:127px}
 .shelf-books:before{bottom:14px;height:10px}
 .bookshelf-group{margin-bottom:32px}
 .feature-aside{min-height:250px;border-radius:19px}
 .feature-copy h2{font-size:27px}
 .feature-aside img{width:355px;bottom:-85px;right:-100px}
 .shop-section{padding:33px 14px;border-radius:18px}
 .section-heading{align-items:stretch}
 .shop-heading{flex-direction:column;align-items:stretch}
 .shop-search{width:100%}
 .book-grid.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:11px}
 .filters{flex-direction:column;gap:11px}
 .filters select{align-self:flex-start}
 .newsletter-section{margin-bottom:12px;padding:15px;border-radius:18px}
 .newsletter{grid-template-columns:1fr;gap:15px;padding:18px 5px}
 .newsletter h2{font-size:28px}
 .footer{margin-left:-10px;margin-right:-10px;border-radius:18px 18px 0 0}
 .footer .container{width:calc(100% - 34px)}
 .footer-main{gap:15px}
 .info-page{padding:35px 15px}
 .info-page h1{font-size:35px}
}
@media(prefers-reduced-motion:reduce){.sidebar,.category-tile,.shelf-book-cover img{transition:none!important}}

/* Final alignment of the supplied cut-out image with the reference hero. */
@media(min-width:1371px){.hero-photo{width:550px;right:64px;bottom:-80px}.token-one{left:0}.token-two{left:2%}.token-three{right:15%}}
@media(min-width:801px) and (max-width:1370px){.hero-photo{width:500px;right:10px;bottom:-75px}.token-one{left:2%}.token-two{left:5%}}
@media(max-width:520px){.hero{padding-bottom:270px}.hero-art{top:275px}.hero-photo{width:395px;right:-34px;bottom:-75px}}
/* Keep all breakpoints horizontally contained. */
.footer{margin-right:0}
@media(max-width:800px){.footer{margin-right:0}}
@media(max-width:520px){.footer{margin-right:0}}
body{overflow-x:clip}

/* Keep the reference layout while letting content determine its height. */
.sidebar {min-height:0; height:calc(100dvh - 16px); overscroll-behavior:contain}
.sidebar .nav {flex-shrink:0}
.mobile-brand, .menu-shade {display:none}
.header-search input, .hero-search input {width:0}
.shop-search input {min-width:0; flex:1}
.hero-search:focus-within, .shop-search:focus-within {outline:2px solid #8d9f5e}
:focus-visible {outline:2px solid #657343; outline-offset:3px}
.shop-heading > *, .shop-grid .book-card, .filter-pills, .newsletter > *, .footer-main > * {min-width:0}
.shop-heading .shop-search {flex-shrink:0; max-width:100%}
.book-title, .footer-column a, .cart-line h4 {overflow-wrap:anywhere}
@media (min-width:801px) and (max-width:1279px) {
  .book-grid.shop-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
}
.drawer, .modal {overscroll-behavior:contain}
.drawer:not(.open) {visibility:hidden}
.drawer-top .x-btn {flex:none}
.modal {max-height:90dvh}
.modal-buttons {flex-wrap:wrap}
.modal-cover img {max-width:100%; object-fit:contain}
.preview-open img {height:auto; width:auto; max-height:min(65dvh,620px); object-fit:contain}
.toast {width:max-content; max-width:calc(100% - 32px); pointer-events:none}
.footer-bottom {gap:12px}

@media (min-width:801px) and (max-width:1100px) {
  .hero-photo {width:min(490px,114%); right:-10px; bottom:-38px}
  .hero-copy {flex-basis:58%}
  .shelf-and-aside {grid-template-columns:minmax(0,1fr)}
  .feature-aside {min-height:240px}
  .feature-aside img {width:360px; left:auto; right:-55px; bottom:-70px}
  .footer .container {width:calc(100% - 48px)}
}

@media (max-width:800px) {
  .sidebar {height:100vh; height:100dvh; width:min(290px,calc(100% - 52px)); visibility:hidden}
  .sidebar.open {visibility:visible}
  .layout-shell:has(.sidebar.open) .menu-shade {display:block; position:fixed; inset:0; background:#211d1a80; z-index:84}
  .mobile-brand {display:flex; align-items:center; flex:0 1 114px; min-width:0; margin-right:5px}
  .mobile-brand img {width:100%; height:auto}
  .header-inner {justify-content:flex-start; gap:9px}
  .header-search {min-width:0}
  .header-actions {margin-left:auto; flex:none}
  .header-actions .icon-btn, .signin-btn, .mobile-menu {width:44px; height:44px; min-height:44px}
  .mobile-menu {flex-basis:44px}
  .hero {padding:30px; min-height:320px}
  .hero-copy {flex:0 0 59%}
  .hero h1 {font-size:clamp(33px,5.7vw,48px)}
  .hero-art {inset:0 0 0 49%}
  .hero-photo {width:min(440px,122%); right:-12px; bottom:-45px}
  .token-one {left:10%; right:auto; top:12%}
  .token-two {left:10%; bottom:15%}
  .token-three {right:8%; top:27%}
  .shop-section {padding:36px 22px}
  .shop-heading .shop-search {width:min(100%,260px)}
  .filters select {margin-top:0}
  .category-tile span {font-size:11px}
  .footer-main {row-gap:26px}
  .shelf-books {display:grid}
  .book-grid.shop-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (min-width:601px) and (max-width:680px) {
  .book-grid.shop-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:600px) {
  .layout-shell {padding-inline:12px}
  .header-inner {display:grid; grid-template-columns:44px minmax(0,1fr) auto; height:auto; gap:8px; padding:8px 0 12px}
  .mobile-brand {width:min(100%,116px)}
  .header-search {grid-area:2 / 1 / 3 / -1; min-height:44px; margin:0; padding-inline:14px}
  .header-search button {display:block}
  .header-search input, .hero-search input, .shop-search input, .newsletter input, .checkout-fields input, .checkout-fields textarea {font-size:16px}
  .header-search input::placeholder, .hero-search input::placeholder {letter-spacing:-.025em}
  .hero {display:block; min-height:0; padding:25px 17px 0}
  .hero h1 {font-size:clamp(30px,8.9vw,48px); line-height:1.07}
  .hero-description {font-size:14px}
  .hero-description br {display:none}
  .hero-search {height:50px; padding-left:10px; gap:6px}
  .hero-search button {min-width:64px; padding:10px 11px}
  .hero-art {position:relative; inset:auto; height:clamp(204px,59vw,300px); margin:12px -17px 0}
  .hero-photo {width:min(93%,420px); right:2%; bottom:clamp(-56px,-10vw,-30px)}
  .token-one {left:12%; top:11%}
  .token-two {left:16%; bottom:16%}
  .token-three {right:10%; top:14%}
  .floating-token {width:37px; height:37px; padding:0; border-radius:12px}
  .floating-token svg {width:22px; height:22px}
  .category-grid {display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; overflow:visible}
  .category-tile {padding-inline:2px; height:auto; min-height:70px; gap:6px}
  .category-tile span {font-size:clamp(9px,2.4vw,11px); overflow-wrap:anywhere}
  .shelf-heading a {padding-block:10px}
  .shelf-books {display:grid; grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:clamp(72px,24vw,105px); gap:9px; overflow-x:auto; scroll-snap-type:x proximity; padding:0 7px 16px; min-height:0; align-items:end}
  .shelf-books::before, .shelf-books::after {content:none}
  .shelf-book {height:auto; scroll-snap-align:start; padding:0 0 9px}
  .shelf-book::after {content:''; position:absolute; left:-5px; right:-5px; bottom:0; height:10px; pointer-events:none; background:linear-gradient(180deg,#f4e4ca,#e6c99f 48%,#d2ae7e); box-shadow:0 4px 6px #4e3a2525}
  .shelf-book:first-child::after {border-radius:4px 0 0 6px}
  .shelf-book:last-child::after {border-radius:0 4px 6px 0}
  .shelf-book-cover {height:auto; min-height:115px}
  .shelf-book-cover img {height:auto; width:auto; max-width:90%; max-height:128px}
  .feature-copy {max-width:58%}
  .feature-aside img {width:min(340px,84%); right:-18%; bottom:-17%}
  .shop-section {padding-inline:12px}
  .shop-heading {flex-direction:column; align-items:stretch}
  .shop-heading .shop-search {width:100%; margin-top:12px}
  .book-grid.shop-grid {grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 10px}
  .filters select {max-width:100%}
  .newsletter-section {padding:15px}
  .newsletter {padding:18px 4px; min-height:0}
  .newsletter input {min-width:min(100%,155px)}
  .footer {margin-inline:-12px}
  .footer-main {padding:40px 0 26px}
  .footer-bottom {gap:8px}
  .modal-content {padding:22px 16px}
  .modal-x {right:9px; top:9px}
  .checkout-modal {padding:30px 16px 20px}
  .drawer-top, .drawer-content, .drawer-bottom {padding-inline:16px}
  .qty button {width:34px; height:34px}
}

/* Keep the full menu in the drawer's scroll flow on every screen. */
.sidebar .nav {
  position:static;
  inset:auto;
  padding:0;
  background:transparent;
  box-shadow:none;
}
.sidebar .nav-link {flex:none}
.sidebar .nav-link.active::after {content:none}
.sidebar-brand img {display:block; max-width:100%}
.sidebar-close {display:none}

.checkout-summary {list-style:none; padding:0; margin:18px 0 12px}
.checkout-summary li {display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13px}
.checkout-summary strong {white-space:nowrap}
.checkout-options {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px}
.provider-option {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:67px;
  padding:10px 12px;
  border:1px solid var(--provider-border);
  background:var(--provider-background);
  color:var(--provider-text);
  border-radius:14px;
  text-align:left;
  font:inherit;
}
.provider-whop {--provider-background:#fbebdf; --provider-border:#e6bc9d; --provider-text:#683b26; --provider-mark:#a54720}
.provider-creem {--provider-background:#ecf1e3; --provider-border:#c5d1ae; --provider-text:#35472b; --provider-mark:#53683d}
.provider-option:disabled {cursor:default; opacity:1}
a.provider-option:hover {border-color:var(--provider-mark); color:var(--provider-text)}
.provider-mark {
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  flex:none;
  border-radius:10px;
  background:var(--provider-mark);
  color:white;
  font:800 18px var(--display);
}
.provider-option strong, .provider-option small {display:block}
.provider-option strong {font-size:14px; line-height:1.2}
.provider-option small {font-size:11px; margin-top:3px}
.provider-arrow {margin-left:auto}
.checkout-help {margin:10px 0 15px}
.checkout-inquiry {border-top:1px solid var(--line)}
.checkout-inquiry summary {padding:12px 0; font-size:13px; font-weight:700; cursor:pointer}
.checkout-inquiry .checkout-fields {margin-top:5px}
#checkout-title:focus {outline:none}

@media (max-width:800px) {
  .sidebar {padding-top:12px}
  .sidebar-close {display:grid; place-items:center; align-self:flex-end; flex:none; width:44px; height:44px}
  .sidebar-brand {flex:0 0 auto; width:min(164px,100%); margin:4px auto 22px}
  .sidebar-brand img {width:100%}
  .sidebar .nav-link {height:auto; min-height:44px; padding:7px 12px}
  .sidebar-divider {margin-block:13px}
}

@media (max-width:480px) {
  .checkout-options {grid-template-columns:1fr}
  .checkout-modal h2 {line-height:1.12}
}

/* Carry the cover's accent from the shelf through the detail and preview views. */
.book-lit {
  background:radial-gradient(ellipse at 50% 63%,rgb(var(--book-accent) / .35),rgb(var(--book-accent) / .12) 52%,transparent 76%);
}
.shop-grid .cover-wrap.book-lit {
  background:radial-gradient(ellipse at 50% 60%,rgb(var(--book-accent) / .44),rgb(var(--book-accent) / .12) 60%,#faf8f5 90%);
}
.book-lit img {box-shadow:0 7px 14px rgb(var(--book-accent) / .32),0 3px 8px #211b1b23}
.book-card-top {margin-bottom:7px}
.book-quick-actions {display:flex; flex-wrap:wrap; gap:4px}
.book-quick-actions button {
  flex:1 0 auto;
  min-height:36px;
  border:1px solid #e5dfd2;
  border-radius:9px;
  padding:4px 6px;
  background:#fffdf9;
  color:#46372d;
  font:800 11px var(--font);
}
.book-quick-actions button[data-action="buy"] {background:#4a3a30; border-color:#4a3a30; color:white}
.book-quick-actions button:hover {border-color:#667b47}
.book-quick-actions button[data-action="buy"]:hover {background:#667b47}
.shelf-book {display:grid; grid-template-rows:auto 1fr; align-items:stretch; height:auto}
.book-quick-actions-compact {justify-content:center; flex-wrap:nowrap; margin-bottom:4px}
.book-quick-actions-compact button {min-width:0; flex:0 1 40px; min-height:34px}
.book-quick-actions-compact .ui-icon {display:block; width:17px; height:17px; margin:auto}
.shelf-book-cover {height:auto; min-height:125px}
.category-tile {height:auto; min-height:79px}
.category-tile span {overflow-wrap:anywhere}
#book-modal {background:linear-gradient(135deg,rgb(var(--book-accent) / .18),rgb(var(--book-accent) / .07)),#fff}
#book-modal .modal-cover {padding-inline:clamp(14px,4vw,48px)}
#book-modal .modal-cover img {width:auto; height:auto; max-height:350px}
#book-modal .modal-price small {font:700 11px var(--font); vertical-align:middle}
#book-modal .modal-buttons button:last-child {color:#536738}
.preview-pages {display:flex; flex-wrap:wrap; gap:8px; margin-top:12px}
.preview-pages button {
  border:1px solid rgb(var(--book-accent) / .45);
  border-radius:8px;
  min-height:44px;
  padding:8px 15px;
  background:rgb(var(--book-accent) / .12);
  color:var(--brown);
  font-weight:700;
}
.preview-pages button:disabled {opacity:.75; cursor:default}
.preview-open {background:transparent; padding-top:44px}
.preview-open .preview-pages {justify-content:center}
.preview-paper {
  display:inline-block;
  max-width:100%;
  background:linear-gradient(rgb(var(--book-accent) / .12),rgb(var(--book-accent) / .12)),#fff;
  box-shadow:0 5px 22px rgb(var(--book-accent) / .26);
  isolation:isolate;
}
.preview-paper img {display:block; mix-blend-mode:multiply}
@media(max-width:760px) {
  #book-modal .modal-cover img {max-height:240px}
  .book-quick-actions button {min-height:44px}
}
@media(max-width:600px) {
  .shelf-books {grid-auto-columns:clamp(94px,25vw,110px)}
  .book-quick-actions-compact button {min-width:42px}
  .category-tile {min-height:72px}
}
