/* Sonora Audiobooks — plain CSS, no build step required */
:root{
  --ink:#141414; --pink:#ff90e8; --yellow:#ffcf33; --teal:#23a094;
  --navy:#101c2a; --line:#141414;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:#fff;line-height:1.5}
h1,h2,h3,h4{font-family:Georgia,"Times New Roman",serif;margin:0;font-weight:700}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button,input,select,textarea{font-family:inherit;font-size:1rem}
.wrap{max-width:1480px;margin:0 auto;padding:0 16px}
@media(min-width:640px){.wrap{padding:0 24px}}
@media(min-width:1024px){.wrap{padding:0 40px}}

/* ---------- header / nav ---------- */
.site-header{position:sticky;top:0;z-index:40;border-bottom:2px solid var(--line);background:#fff}
.site-header .row{display:flex;align-items:center;gap:16px;height:72px;max-width:1480px;margin:0 auto;padding:0 16px}
@media(min-width:640px){.site-header .row{padding:0 24px}}
.brand{display:flex;align-items:center;gap:10px;font-family:Georgia,serif;font-size:1.5rem;font-weight:700}
.brand .logo{display:grid;place-items:center;width:40px;height:40px;border-radius:999px;border:2px solid var(--line);background:var(--yellow)}
.search-box{margin-left:auto;display:none;align-items:center;gap:8px;height:44px;max-width:420px;width:100%;border:2px solid var(--line);background:#fff;padding:0 16px;box-shadow:3px 3px 0 var(--line)}
@media(min-width:640px){.search-box{display:flex}}
.search-box input{border:0;outline:0;background:transparent;width:100%}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:2px solid var(--line);padding:10px 18px;font-weight:800;cursor:pointer;background:#fff}
.btn-black{background:var(--ink);color:#fff;box-shadow:3px 3px 0 var(--pink)}
.btn-black:hover{background:var(--pink);color:var(--ink)}
.btn-yellow{background:var(--yellow)}
.btn-yellow:hover{background:var(--pink)}
.btn-block{width:100%;height:56px;font-size:1.05rem}
.bag-btn{position:relative;height:44px}
.bag-count{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:999px;background:#fff;color:var(--ink);font-size:.75rem;font-weight:800}

/* ---------- hero ---------- */
.hero{border-bottom:2px solid var(--line);background:var(--pink)}
.hero-grid{display:grid;max-width:1480px;margin:0 auto}
@media(min-width:1024px){.hero-grid{grid-template-columns:1.2fr .8fr}}
.hero-left{padding:40px 16px}
@media(min-width:640px){.hero-left{padding:56px 24px}}
@media(min-width:1024px){.hero-left{padding:64px 40px;border-right:2px solid var(--line)}}
.eyebrow{font-size:.85rem;font-weight:900;text-transform:uppercase;letter-spacing:.14em;margin:0 0 12px}
.hero-left h1{font-size:2.6rem;line-height:.95;letter-spacing:-.03em}
@media(min-width:640px){.hero-left h1{font-size:4rem}}
@media(min-width:1024px){.hero-left h1{font-size:4.6rem}}
.hero-left p{max-width:620px;font-size:1.1rem;color:rgba(20,20,20,.7);margin-top:16px}
.hero-badges{display:flex;flex-wrap:wrap;gap:16px 28px;margin-top:24px;font-weight:700;font-size:.9rem}
.hero-right{display:flex;align-items:center;background:var(--yellow);padding:24px}
.featured-card{display:grid;grid-template-columns:120px 1fr;gap:20px;width:100%;border:2px solid var(--line);background:#fff;padding:16px;box-shadow:7px 7px 0 var(--line)}
.featured-cover{position:relative;aspect-ratio:4/5;overflow:hidden;border:2px solid var(--line);background:var(--navy);color:#fff}
.featured-cover img{width:100%;height:100%;object-fit:contain}
.featured-cover .fallback{padding:16px}
.featured-cover .fallback span{font-size:.7rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.7)}
.featured-cover .fallback strong{display:block;margin-top:20px;font-family:Georgia,serif;font-size:1.3rem;line-height:1}

/* ---------- catalogue ---------- */
.discover{border-bottom:2px solid var(--line)}
.discover-top{display:flex;flex-direction:column;gap:16px;border-bottom:2px solid var(--line);padding:32px 0 28px}
@media(min-width:1024px){.discover-top{flex-direction:row;align-items:flex-end;justify-content:space-between}}
.discover-top h2{font-size:2.4rem;margin-top:8px}
.discover-desc{max-width:420px;color:rgba(20,20,20,.65)}
.genre-row{display:flex;gap:8px;overflow-x:auto;padding:24px 0}
.genre-pill{white-space:nowrap;border:2px solid var(--line);padding:10px 16px;font-weight:700;background:#fff;cursor:pointer}
.genre-pill.active{background:var(--ink);color:#fff;box-shadow:3px 3px 0 var(--pink)}
.genre-pill:hover{background:var(--yellow)}
.grid-books{display:grid;gap:24px 24px;padding-bottom:64px}
@media(min-width:640px){.grid-books{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.grid-books{grid-template-columns:repeat(3,1fr)}}
@media(min-width:1280px){.grid-books{grid-template-columns:repeat(4,1fr)}}
.book-cover{position:relative;aspect-ratio:4/5;overflow:hidden;border:2px solid var(--line);background:var(--navy);color:#fff;box-shadow:6px 6px 0 var(--line);transition:.15s}
.book-cover:hover{transform:translateY(-4px);box-shadow:9px 9px 0 var(--pink)}
.book-cover img{width:100%;height:100%;object-fit:contain}
.book-cover .fallback{position:relative;height:100%;display:flex;flex-direction:column;padding:20px}
.book-cover .fallback .tag{font-size:.7rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.7)}
.book-cover .fallback h3{margin-top:18px;font-size:1.5rem;line-height:1}
.book-cover .fallback .author{margin-top:10px;font-size:.85rem;color:rgba(255,255,255,.75)}
.book-cover .fallback .narrator{margin-top:auto;font-size:.75rem;color:rgba(255,255,255,.65)}
.book-cover .num{position:absolute;right:14px;top:14px;font-size:.7rem;font-weight:900;color:rgba(255,255,255,.55)}
.book-meta{margin-top:18px;display:flex;justify-content:space-between;gap:12px}
.book-meta h3{font-size:1.2rem;line-height:1.2}
.book-meta .sub{margin-top:4px;font-size:.85rem;color:rgba(20,20,20,.55)}
.price-tag{flex-shrink:0;border:2px solid var(--line);background:var(--yellow);padding:6px 10px;font-weight:800;font-size:.9rem}
.book-actions{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:8px}

.trust{border-bottom:2px solid var(--line);background:var(--teal);color:var(--ink)}
.trust-grid{display:grid;max-width:1480px;margin:0 auto}
@media(min-width:768px){.trust-grid{grid-template-columns:repeat(3,1fr)}}
.trust-item{display:flex;gap:16px;padding:24px 24px}
@media(min-width:768px){.trust-item{border-right:2px solid var(--line);padding:32px}.trust-item:last-child{border-right:0}}
.trust-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:999px;border:2px solid var(--line);background:#fff;flex-shrink:0}
.trust-item h3{font-size:1.4rem}
.trust-item p{margin-top:8px;color:rgba(20,20,20,.65);max-width:280px}

.site-footer{max-width:1480px;margin:0 auto;padding:36px 16px;display:flex;flex-direction:column;gap:16px;font-weight:600;font-size:.9rem}
@media(min-width:768px){.site-footer{flex-direction:row;align-items:center;padding:36px 24px}}
.site-footer .brand{font-size:1.5rem}
.site-footer .links{display:flex;gap:20px}
@media(min-width:768px){.site-footer .links{margin-left:auto}}
.site-footer .links a:hover{text-decoration:underline}

/* ---------- no results ---------- */
.empty-state{border:2px dashed var(--line);padding:64px 16px;text-align:center;margin-bottom:64px}
.empty-state p{font-family:Georgia,serif;font-size:1.5rem;font-weight:700}
.empty-state button{margin-top:12px;font-weight:700;text-decoration:underline;background:none;border:0;cursor:pointer}

/* ---------- product page ---------- */
.product-main{min-height:100vh;background:#ededed;padding-bottom:80px}
.product-shell{max-width:1180px;margin:0 auto;background:#fff}
@media(min-width:1024px){.product-shell{border-left:2px solid var(--line);border-right:2px solid var(--line)}}
.product-hero{position:relative;aspect-ratio:4/3;overflow:hidden;border-bottom:2px solid var(--line);background:var(--navy)}
@media(min-width:640px){.product-hero{aspect-ratio:16/8}}
.product-hero img{width:100%;height:100%;object-fit:cover}
.product-hero-overlay{position:absolute;inset:0;display:flex;align-items:center;padding:28px;color:#fff;background:linear-gradient(90deg,rgba(7,20,33,.95),rgba(7,20,33,.45) 60%,transparent)}
@media(min-width:640px){.product-hero-overlay{padding:48px}}
.product-hero-overlay .eyebrow{color:var(--yellow)}
.product-hero-overlay h1{font-size:2.2rem;margin-top:16px}
@media(min-width:640px){.product-hero-overlay h1{font-size:4.2rem}}
.product-hero-overlay p{margin-top:20px;color:rgba(255,255,255,.75)}

.product-cols{display:grid}
@media(min-width:1024px){.product-cols{grid-template-columns:minmax(0,1fr) 360px}}
.product-article{min-width:0}
@media(min-width:1024px){.product-article{border-right:2px solid var(--line)}}
.p-section{border-bottom:2px solid var(--line);padding:20px}
@media(min-width:640px){.p-section{padding:32px}}
.p-section h2{display:flex;align-items:center;gap:8px;font-size:1.9rem}
.p-section .content{margin-top:20px;display:flex;flex-direction:column;gap:20px;line-height:1.7;color:rgba(20,20,20,.75)}
.pill{display:inline-flex;border:2px solid var(--line);background:var(--pink);padding:6px 14px;font-size:.85rem;font-weight:900;text-transform:uppercase}
.price-pill{border:2px solid var(--line);background:var(--pink);padding:8px 16px;font-weight:800}
.top-row{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px}
.chip-row{margin-top:24px;display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:.9rem;font-weight:700}
.chip{display:flex;align-items:center;gap:8px;border:2px solid var(--line);padding:8px 12px}
.chip.gold{background:var(--yellow)}
.chip.teal{background:var(--teal)}
.already-bought{display:flex;flex-direction:column;gap:16px;border:2px solid var(--line);background:#f7f7f7;padding:16px}
@media(min-width:640px){.already-bought{flex-direction:row;align-items:center;justify-content:space-between}}
.quote{border-left:4px solid var(--pink);background:#f7f7f7;padding:16px;font-family:Georgia,serif;font-size:1.2rem;font-style:italic;line-height:1.6}
.feature-list{display:flex;flex-direction:column;gap:10px;list-style:none;padding:0;margin:0}
.feature-list li{display:flex;gap:12px}
.ol-steps{display:flex;flex-direction:column;gap:12px;list-style:none;padding:0;margin:0}
.ol-steps li{display:flex;gap:12px}
.ol-steps .num{flex-shrink:0;display:grid;place-items:center;width:28px;height:28px;border:2px solid var(--line);background:var(--yellow);font-size:.85rem;font-weight:900}

.product-aside{background:#fff}
.price-form label.title{font-size:.9rem;font-weight:900}
.price-form .help{margin-top:4px;font-size:.85rem;color:rgba(20,20,20,.55)}
.price-input-row{position:relative;margin-top:12px}
.price-input-row .dollar{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-family:Georgia,serif;font-size:1.4rem;font-weight:700}
.price-input-row input{height:64px;width:100%;border:2px solid var(--line);padding:0 16px 0 40px;font-family:Georgia,serif;font-size:1.4rem;font-weight:700;outline:0}
.price-input-row input:focus{box-shadow:0 0 0 3px var(--pink)}
.price-help{min-height:20px;margin-top:8px;font-size:.85rem;color:rgba(20,20,20,.55)}
.price-help.error{font-weight:700;color:#b91c1c}
.buy-btn{margin-top:8px;display:flex;height:56px;width:100%;align-items:center;justify-content:center;border:2px solid var(--line);background:var(--pink);font-weight:900;box-shadow:4px 4px 0 var(--line);cursor:pointer}
.buy-btn:hover{background:var(--yellow);transform:translateY(-2px)}
.tip-hint{margin-top:12px;text-align:center;font-size:.85rem;color:rgba(20,20,20,.55)}
.highlight-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px;font-size:.9rem;font-weight:600}
.highlight-list li{display:flex;gap:12px}
.share-btn{display:flex;height:44px;width:100%;align-items:center;justify-content:center;gap:8px;border:2px solid var(--line);background:#fff;font-weight:900;cursor:pointer}
.share-btn:hover{background:var(--yellow)}
.stars{color:var(--ink)}
.rating-row{display:grid;grid-template-columns:46px 1fr 32px;align-items:center;gap:8px;font-size:.75rem;font-weight:700;margin-top:10px}
.rating-bar{height:10px;border:1px solid var(--line);background:#fff}
.rating-bar i{display:block;height:100%;background:var(--pink)}
.review{border-bottom:2px solid var(--line);padding:20px}
.review p{margin-top:12px;font-size:.9rem;color:rgba(20,20,20,.7)}
.review .who{margin-top:12px;display:flex;align-items:center;gap:6px;font-size:.85rem;font-weight:900}

/* ---------- checkout ---------- */
.checkout-main{min-height:100vh;background:#f3f3f3}
.checkout-top-link{display:inline-flex;align-items:center;gap:8px;font-weight:700;margin:24px 0}
.checkout-top-link:hover{text-decoration:underline}
.checkout-grid{display:grid;gap:32px;align-items:start;padding-bottom:48px}
@media(min-width:1024px){.checkout-grid{grid-template-columns:minmax(0,1fr) minmax(380px,480px)}}
.order-box{border:2px solid var(--line);background:#fff}
.order-box-head{border-bottom:2px solid var(--line);background:var(--yellow);padding:20px}
.order-item{display:flex;gap:16px;padding:20px;border-top:2px solid rgba(0,0,0,.12)}
.order-item:first-child{border-top:0}
.order-item .cover{flex-shrink:0;width:96px;height:128px;overflow:hidden;border:2px solid var(--line);background:var(--navy);color:#fff}
.order-item .cover img{width:100%;height:100%;object-fit:contain}
.order-item .cover span{display:block;padding:10px;font-family:Georgia,serif;font-size:.85rem;font-weight:700;line-height:1.2}
.order-item .info{flex:1;min-width:0}
.order-item .info .tiny{font-size:.75rem;font-weight:900;text-transform:uppercase;letter-spacing:.1em;color:rgba(20,20,20,.45)}
.order-item .price{flex-shrink:0;text-align:right}
.order-subtotal{display:flex;align-items:center;justify-content:space-between;border-top:2px solid var(--line);background:#f7f7f7;padding:20px}
.pay-box{border:2px solid var(--line);background:#fff;padding:24px;box-shadow:8px 8px 0 var(--pink)}
.form-field{margin-bottom:16px}
.form-field label{display:block;margin-bottom:6px;font-weight:700;font-size:.9rem}
.form-field input{height:48px;width:100%;border:2px solid var(--line);padding:0 16px}
.form-hint{margin-top:6px;font-size:.75rem;color:rgba(20,20,20,.5)}
.tip-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}
.tip-opt{display:flex;align-items:center;justify-content:center;border:2px solid var(--line);padding:12px 6px;font-weight:700;font-size:.9rem;cursor:pointer;background:#fff}
.tip-opt.active{background:var(--pink)}
.tip-opt:hover{background:var(--yellow)}
.total-row{display:flex;align-items:center;justify-content:space-between;margin:20px 0}
.total-row strong{font-family:Georgia,serif;font-size:1.9rem}
.trust-mini{display:grid;gap:12px;margin-top:32px;font-size:.85rem;color:rgba(20,20,20,.6)}
@media(min-width:640px){.trust-mini{grid-template-columns:repeat(3,1fr)}}
.trust-mini span{display:flex;align-items:center;gap:8px}
.success-box{border:2px solid var(--line);background:#d7f7e8;padding:24px}
.success-box .check{display:grid;place-items:center;width:44px;height:44px;border-radius:999px;border:2px solid var(--line);background:var(--teal)}
.success-box h3{margin-top:20px;font-size:1.8rem}
.paypal-box{min-height:48px;margin-top:12px}
.error-banner{margin-top:12px;padding:12px;border:2px solid #b91c1c;background:#fee2e2;color:#7f1d1d;font-weight:600;font-size:.9rem;border-radius:4px}

/* ---------- dark pages: library / download ---------- */
.dark-main{min-height:100vh;background:#071421;color:#f8f4ea;padding:40px 20px}
@media(min-width:768px){.dark-main{padding:40px}}
.dark-inner{max-width:1100px;margin:0 auto}
.dark-header{display:flex;align-items:center;justify-content:space-between}
.dark-header a{color:rgba(255,255,255,.6);display:flex;align-items:center;gap:8px}
.dark-header a:hover{color:#fff}
.dark-eyebrow{margin-top:64px;font-size:.85rem;font-weight:700;text-transform:uppercase;letter-spacing:.14em;color:#ffb258}
.dark-title{margin-top:12px;font-size:2.6rem}
@media(min-width:640px){.dark-title{font-size:3rem}}
.dark-sub{margin-top:16px;color:rgba(255,255,255,.55)}
.notice{margin-top:48px;border-radius:16px;border:1px solid rgba(255,178,88,.25);background:rgba(255,178,88,.1);padding:20px;color:#ffd49f}
.shelf{margin-top:48px;display:flex;flex-direction:column;gap:20px}
.shelf-card{display:flex;flex-direction:column;gap:20px;border-radius:24px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);padding:20px}
@media(min-width:640px){.shelf-card{flex-direction:row;align-items:center}}
.shelf-cover{flex-shrink:0;width:112px;height:128px;border-radius:16px;padding:16px;display:flex;align-items:flex-end}
.shelf-cover span{font-family:Georgia,serif;font-size:1.05rem;line-height:1.2}
.shelf-info{flex:1}
.shelf-info h2{font-size:1.5rem}
.shelf-info p{margin-top:4px;font-size:.9rem;color:rgba(255,255,255,.5)}
.progress-track{margin-top:20px;height:6px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden}
.progress-fill{height:100%;width:3%;border-radius:999px;background:#ffb258}
.progress-label{margin-top:8px;font-size:.75rem;color:rgba(255,255,255,.4)}
.dl-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 20px;border-radius:999px;background:#ffb258;color:#071421;font-weight:700}
.dl-btn:hover{background:#ffc778}
.empty-shelf{margin-top:48px;border-radius:24px;border:1px dashed rgba(255,255,255,.15);padding:80px 20px;text-align:center}
.empty-shelf h2{margin-top:20px;font-size:1.9rem}
.empty-shelf p{margin:12px auto 0;max-width:420px;color:rgba(255,255,255,.5)}
.empty-shelf .btn{margin-top:28px;display:inline-flex;border-radius:999px;background:#ffb258;color:#071421;padding:12px 24px;font-weight:700;border:0}
.lookup-card{margin-top:32px;max-width:480px;border-radius:24px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);padding:28px}
.lookup-card label{display:block;margin-bottom:8px;font-size:.9rem;color:rgba(255,255,255,.65)}
.lookup-card input{height:48px;width:100%;border-radius:10px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.05);color:#fff;padding:0 16px}
.lookup-card button{margin-top:16px;height:48px;width:100%;border-radius:999px;background:#ffb258;color:#071421;font-weight:700;border:0;cursor:pointer}
.dl-card{margin-top:36px;border-radius:2rem;border:1px solid rgba(255,255,255,.1);background:#0d2233;padding:28px}
@media(min-width:768px){.dl-card{padding:40px}}
.dl-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:999px;background:#ffb258;color:#071421}
.dl-list{margin-top:36px;display:flex;flex-direction:column;gap:16px}
.dl-item{display:flex;flex-direction:column;gap:20px;border-radius:16px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);padding:20px}
@media(min-width:640px){.dl-item{flex-direction:row;align-items:center}}
.dl-note{margin-top:32px;font-size:.9rem;line-height:1.6;color:rgba(255,255,255,.4)}
.lock-tag{display:flex;align-items:center;gap:8px;font-size:.9rem;color:rgba(255,255,255,.5)}

/* ---------- 404 / generic notice pages ---------- */
.center-card-page{display:grid;min-height:100vh;place-items:center;background:#f3f3f3;padding:20px;color:var(--ink)}
.center-card{max-width:520px;border:2px solid var(--line);background:#fff;padding:32px;text-align:center;box-shadow:8px 8px 0 var(--pink)}
.center-card h1{margin-top:20px;font-size:1.9rem}
.center-card p{margin-top:12px;color:rgba(20,20,20,.6)}
.center-card .btn{margin-top:24px}

/* ---------- admin ---------- */
.admin-body{background:#f5f5f7;min-height:100vh}
.admin-header{background:#fff;border-bottom:2px solid var(--line);padding:16px 0}
.admin-header .row{display:flex;align-items:center;gap:16px;max-width:1280px;margin:0 auto;padding:0 20px}
.admin-nav{max-width:1280px;margin:0 auto;padding:16px 20px;display:flex;gap:8px;flex-wrap:wrap}
.admin-nav a{padding:10px 16px;border:2px solid var(--line);font-weight:700;background:#fff}
.admin-nav a.active{background:var(--ink);color:#fff}
.admin-wrap{max-width:1280px;margin:0 auto;padding:0 20px 60px}
.stat-grid{display:grid;gap:16px;grid-template-columns:repeat(2,1fr);margin:24px 0}
@media(min-width:768px){.stat-grid{grid-template-columns:repeat(4,1fr)}}
.stat-card{border:2px solid var(--line);background:#fff;padding:18px}
.stat-card .label{font-size:.8rem;font-weight:700;color:rgba(20,20,20,.55);text-transform:uppercase;letter-spacing:.06em}
.stat-card .value{margin-top:8px;font-family:Georgia,serif;font-size:1.9rem}
.panel{border:2px solid var(--line);background:#fff;margin-bottom:28px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:2px solid var(--line);padding:16px 20px;background:#fafafa}
.panel-head h2{font-size:1.4rem}
.panel-body{padding:20px}
table.admin-table{width:100%;border-collapse:collapse;font-size:.9rem}
table.admin-table th,table.admin-table td{text-align:left;padding:10px 12px;border-bottom:1px solid #e5e5e5;vertical-align:middle}
table.admin-table th{background:#fafafa;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:rgba(20,20,20,.55)}
.badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:.75rem;font-weight:700}
.badge.paid{background:#d7f7e8;color:#0a6b46}
.badge.pending{background:#fff4cc;color:#8a6700}
.badge.refunded{background:#fee2e2;color:#991b1b}
.badge.inactive{background:#e5e5e5;color:#555}
.row-actions{display:flex;gap:8px}
.row-actions a,.row-actions button{font-size:.8rem;padding:6px 10px;border:2px solid var(--line);background:#fff;cursor:pointer;font-weight:700}
.row-actions .danger:hover{background:#fee2e2}
.row-actions a:hover,.row-actions button:hover{background:var(--yellow)}
.admin-form .field{margin-bottom:16px}
.admin-form label{display:block;font-weight:700;font-size:.85rem;margin-bottom:6px}
.admin-form input[type=text],.admin-form input[type=number],.admin-form input[type=email],.admin-form input[type=password],
.admin-form input[type=file],.admin-form select,.admin-form textarea{
  width:100%;border:2px solid var(--line);padding:10px 12px;background:#fff;
}
.admin-form textarea{min-height:90px;resize:vertical;font-family:inherit}
.admin-form .grid-2{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:768px){.admin-form .grid-2{grid-template-columns:1fr 1fr}}
.admin-form .grid-3{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:768px){.admin-form .grid-3{grid-template-columns:1fr 1fr 1fr}}
.admin-form .hint{font-size:.75rem;color:rgba(20,20,20,.5);margin-top:4px}
.admin-form fieldset{border:1px dashed #ccc;padding:16px;margin:0 0 20px}
.admin-form legend{font-weight:800;padding:0 6px}
.flash{padding:14px 18px;border-radius:6px;margin-bottom:20px;font-weight:600;font-size:.9rem}
.flash.success{background:#d7f7e8;color:#0a6b46}
.flash.error{background:#fee2e2;color:#991b1b}
.login-shell{min-height:100vh;display:grid;place-items:center;background:#101c2a;padding:20px}
.login-card{width:100%;max-width:380px;background:#fff;border:2px solid var(--line);padding:32px;box-shadow:8px 8px 0 var(--pink)}
.login-card h1{font-size:1.7rem;margin-bottom:6px}
.login-card p{color:rgba(20,20,20,.55);font-size:.9rem;margin-bottom:20px}
.cover-preview{width:80px;height:104px;object-fit:cover;border:1px solid #ddd}
.book-thumb{display:flex;align-items:center;gap:10px}
.muted{color:rgba(20,20,20,.5)}

/* ============================================================================
 * Admin form helpers (added with the optional-fields update)
 * ==========================================================================*/
.form-intro{margin:0 0 20px;padding:14px 16px;border:2px dashed var(--line);background:#fffdf2;font-size:.9rem;line-height:1.6}
.req{display:inline-block;margin-left:6px;padding:2px 8px;border:1px solid var(--line);border-radius:999px;background:var(--yellow);font-size:.65rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;vertical-align:middle}
.error-text{color:#b91c1c;font-weight:700}
.admin-details{border:2px solid var(--line);background:#fff;margin:0 0 20px}
.admin-details>summary{cursor:pointer;padding:14px 16px;font-weight:800;background:#fafafa;list-style:none;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.admin-details>summary::-webkit-details-marker{display:none}
.admin-details>summary::before{content:'▸';font-size:.9rem;transition:transform .15s}
.admin-details[open]>summary::before{transform:rotate(90deg)}
.admin-details>summary:hover{background:var(--yellow)}
.admin-details>summary .muted{font-weight:600;font-size:.85rem}
.admin-details fieldset{border:0;border-top:2px solid var(--line);margin:0;padding:16px}
.form-actions{padding:4px 0 8px}
.form-actions .hint{text-align:center;margin-top:10px}
/* On a phone the save button follows you down the form, with a matching
   spacer underneath so it never sits on top of the last field. */
@media(max-width:767px){
  .form-actions{position:sticky;bottom:0;z-index:5;margin:0 -12px;
    padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px));
    background:#fff;border-top:2px solid var(--line);box-shadow:0 -6px 14px rgba(0,0,0,.08)}
  .admin-form{padding-bottom:4px}
}
.table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

/* ============================================================================
 * Phone-friendly layout pass
 * ==========================================================================*/
html{-webkit-text-size-adjust:100%}
body{overflow-x:hidden}
img,video{max-width:100%;height:auto}

@media(max-width:767px){
  /* 16px inputs stop iOS Safari from zooming in whenever a field is focused. */
  input,select,textarea{font-size:16px}

  /* --- storefront header --- */
  .site-header .row{height:auto;min-height:64px;padding:10px 14px;gap:10px;flex-wrap:wrap}
  .brand{font-size:1.25rem}
  .brand .logo{width:34px;height:34px}
  .site-header .btn{padding:8px 12px;font-size:.85rem}
  .bag-btn{height:40px}

  /* --- hero --- */
  .hero-left{padding:32px 16px}
  .hero-left h1{font-size:2.2rem}
  .hero-left p{font-size:1rem}
  .hero-badges{gap:10px 18px;font-size:.82rem}
  .hero-right{padding:16px}
  .featured-card{grid-template-columns:96px 1fr;gap:14px;padding:12px;box-shadow:4px 4px 0 var(--line)}

  /* --- catalogue --- */
  .discover-top{padding:24px 0 20px}
  .discover-top h2{font-size:1.9rem}
  .genre-row{padding:16px 0;margin:0 -16px;padding-left:16px;padding-right:16px;scroll-snap-type:x proximity}
  .genre-pill{scroll-snap-align:start;padding:9px 14px;font-size:.88rem}
  .grid-books{gap:28px 16px;padding-bottom:40px}
  .book-cover{box-shadow:4px 4px 0 var(--line)}
  .book-meta{margin-top:14px}
  .book-meta h3{font-size:1.1rem}
  .book-actions .btn{padding:10px 8px;font-size:.85rem}
  .trust-item{padding:20px 16px}

  /* --- product page --- */
  .product-main{padding-bottom:40px}
  .product-hero{aspect-ratio:4/3}
  .product-hero-overlay{padding:20px;background:linear-gradient(180deg,rgba(7,20,33,.35),rgba(7,20,33,.92))}
  .product-hero-overlay h1{font-size:1.9rem;margin-top:10px}
  .product-hero-overlay p{margin-top:12px;font-size:.9rem}
  .p-section{padding:18px 16px}
  .p-section h2{font-size:1.45rem;align-items:flex-start}
  .top-row{gap:12px}
  .top-row h1{font-size:1.6rem}
  .price-pill{padding:6px 12px;font-size:.9rem}
  .chip-row{margin-top:18px;gap:8px;font-size:.82rem}
  .chip{padding:6px 10px}
  .quote{font-size:1.05rem;padding:14px}
  .review{padding:16px}
  /* Buy box first on a phone — no scrolling past the whole article to pay. */
  .product-cols{display:flex;flex-direction:column}
  .product-aside{order:-1;border-bottom:2px solid var(--line)}
  .product-aside .p-section:first-child{background:#fffdf2}
  .price-input-row input{height:56px;font-size:1.25rem}
  .buy-btn{height:54px}

  /* --- checkout --- */
  .checkout-grid{gap:20px;padding-bottom:32px}
  .order-item{flex-direction:column;padding:16px}
  .order-item .cover{width:80px;height:106px}
  .order-item .price{text-align:left}
  .pay-box{padding:18px;box-shadow:4px 4px 0 var(--pink)}
  .tip-grid{grid-template-columns:repeat(2,1fr)}
  .tip-opt{padding:14px 6px}
  .total-row strong{font-size:1.6rem}
  .form-field input{height:50px}

  /* --- library / download --- */
  .dark-main{padding:24px 16px calc(32px + env(safe-area-inset-bottom,0px))}
  .dark-eyebrow{margin-top:36px}
  .dark-title{font-size:2rem}
  .shelf-card,.dl-item{padding:16px}
  .dl-btn{width:100%}

  /* --- admin --- */
  .admin-header{padding:12px 0}
  .admin-header .row{padding:0 14px;gap:10px;flex-wrap:wrap}
  .admin-nav{padding:12px 14px;gap:6px;overflow-x:auto;flex-wrap:nowrap}
  .admin-nav a{white-space:nowrap;padding:9px 13px;font-size:.85rem}
  .admin-wrap{padding:0 14px calc(40px + env(safe-area-inset-bottom,0px))}
  .stat-grid{gap:10px;margin:16px 0}
  .stat-card{padding:14px}
  .stat-card .value{font-size:1.5rem}
  .panel-head{padding:14px}
  .panel-head h2{font-size:1.2rem}
  .panel-body{padding:14px}
  .admin-form fieldset{padding:14px 12px}
  .admin-details fieldset{padding:14px 12px}
  .login-card{padding:24px;box-shadow:5px 5px 0 var(--pink)}

  /* Turn the admin tables into stacked cards so nothing is cut off. */
  .admin-table.stacked thead{display:none}
  .admin-table.stacked,.admin-table.stacked tbody,.admin-table.stacked tr,.admin-table.stacked td{display:block;width:100%}
  .admin-table.stacked tr{border:2px solid var(--line);margin:0 0 12px;padding:6px 0;background:#fff}
  .admin-table.stacked td{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;
    border-bottom:1px solid #eee;padding:9px 12px;text-align:right}
  .admin-table.stacked td:last-child{border-bottom:0}
  .admin-table.stacked td::before{content:attr(data-label);flex-shrink:0;font-size:.7rem;font-weight:800;
    letter-spacing:.06em;text-transform:uppercase;color:rgba(20,20,20,.5);text-align:left;padding-top:2px}
  .admin-table.stacked td[data-label="Book"]{text-align:left;flex-direction:column;gap:6px}
  .admin-table.stacked td[data-label="Email"]{word-break:break-all}
  .row-actions{flex-wrap:wrap;justify-content:flex-end}
  .row-actions a,.row-actions button{padding:8px 12px}
}

/* Very small phones */
@media(max-width:380px){
  .hero-left h1{font-size:1.9rem}
  .featured-card{grid-template-columns:1fr}
  .book-actions{grid-template-columns:1fr}
  .admin-form .grid-2,.admin-form .grid-3{gap:12px}
}

/* Tablets: keep the product buy box beside the article but tighten the gutters */
@media(min-width:768px) and (max-width:1023px){
  .p-section{padding:24px}
  .product-hero-overlay h1{font-size:3rem}
}

/* ---- Sonora layout fix ----------------------------------------------------
 * Bug: .book-cover and .featured-cover are <a> elements, which default to
 * display:inline. On an inline box, aspect-ratio, overflow:hidden and the
 * child's height:100% are all ignored, so the cover's real height never
 * counts toward the card. The grid row comes out ~120px too short and the
 * title / price / buttons spill out over the teal .trust section below.
 *
 * Proper fix: add `display:block` to the .book-cover and .featured-cover
 * rules in style.css. If you'd rather not touch those rules, paste this
 * block at the END of style.css instead.
 * ------------------------------------------------------------------------ */

.book-cover,
.featured-cover { display: block; }

/* Bonus: keeps "Buy now / Add to bag" on one line across the row even when a
 * card has no author or duration (e.g. the "luiig" card). */
.book-card { display: flex; flex-direction: column; }
.book-actions { margin-top: auto; }
.book-meta{align-items:flex-start}