:root{font-family:"Segoe UI",Arial,sans-serif;color:#eef2f7;background:#0b1020;color-scheme:dark;--panel:#172238;--border:#334155;--muted:#9fb0c7;--accent:#2563eb}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:linear-gradient(180deg,#111827,#080d18)}body{min-height:100vh}button,input{font:inherit}button{cursor:pointer}.shell{min-height:100vh;padding:16px}.topbar{display:flex;align-items:center;gap:10px;min-height:46px;margin-bottom:14px;position:sticky;top:0;z-index:10;background:rgba(11,16,32,.92);backdrop-filter:blur(12px)}.brand{font-size:20px;font-weight:800;flex:1}.card{background:rgba(23,34,56,.96);border:1px solid var(--border);border-radius:15px;padding:16px;box-shadow:0 12px 32px rgba(0,0,0,.2)}.muted{color:var(--muted)}.error,.notice{padding:10px 13px;border-radius:9px;margin:10px 0}.error{background:#7f1d1d}.notice{background:#164e63}.primary,.secondary,.guest,.window-btn,.google,.facebook{border:0;border-radius:9px;padding:10px 14px;color:#fff}.primary{background:#2563eb}.secondary,.window-btn{background:#334155}.guest{background:#075985;border:1px solid #38bdf8}.wide{width:100%;margin-top:9px}.field{display:grid;gap:6px;margin:11px 0}.field input,.search input{padding:11px 12px;border:1px solid #475569;border-radius:9px;background:#0f172a;color:#fff}.auth-shell{min-height:100vh;display:grid;place-items:center;position:relative;overflow:hidden;padding:20px}.login-media{position:absolute;inset:0;width:100%;height:100%;border:0;pointer-events:none}.auth-shade{position:absolute;inset:0;background:rgba(4,9,18,.42);backdrop-filter:blur(2px)}.auth-card{position:relative;z-index:2;width:min(490px,95vw);background:rgba(18,29,48,.89);backdrop-filter:blur(18px)}.app-identity{font-size:13px;font-weight:800;letter-spacing:.05em;opacity:.8}.auth-divider{display:flex;gap:10px;align-items:center;color:#94a3b8;font-size:12px;margin:12px 0}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#475569;flex:1}.google{background:#fff;color:#111827;border:1px solid #cbd5e1;font-weight:700}.facebook{background:#0866ff;font-weight:700}.google-g,.facebook-f{font-weight:900;margin-right:8px}.small{font-size:12px;line-height:1.5}.hero{display:flex;align-items:center;justify-content:space-between;gap:20px}.hero h1{margin:0}.search{display:flex;gap:8px;min-width:min(500px,50vw)}.search input{flex:1}.tabs{display:flex;gap:8px;margin:14px 0}.tab{background:#1e293b;color:#dbeafe;border:1px solid #334155;border-radius:999px;padding:8px 13px}.tab.active{background:#2563eb;border-color:#2563eb}.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.book-card{display:grid;grid-template-columns:110px 1fr;gap:13px;background:#172238;border:1px solid #334155;border-radius:14px;padding:12px}.cover{background:#0f172a;border-radius:10px;overflow:hidden;aspect-ratio:2/3;display:grid;place-items:center}.cover img{width:100%;height:100%;object-fit:cover}.cover-fallback{font-size:22px;font-weight:900;letter-spacing:.08em;color:#64748b}.book-info h3{margin:2px 0 8px}.book-info p{font-size:13px;color:#aebbd0;line-height:1.45;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.chips{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.chips span{background:#273449;border-radius:999px;padding:4px 8px;font-size:11px}.book-head{display:grid;grid-template-columns:180px 1fr;gap:22px}.cover.large{width:180px}.description{line-height:1.55;max-height:250px;overflow:auto}.chapter-list{margin-top:14px}.chapter-row,.track,.side-chapter{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;background:#0f172a;color:#fff;border:1px solid #334155;border-radius:9px;padding:11px;margin:6px 0}.chapter-row small{display:block;color:#94a3b8;margin-top:3px}.reader-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:14px}.chapter-sidebar{position:sticky;top:76px;max-height:calc(100vh - 95px);overflow:auto}.side-chapter.active{border-color:#60a5fa;background:#1e3a5f}.reader{max-width:900px;width:100%;margin:0 auto}.reader-toolbar{display:flex;gap:8px;justify-content:flex-end}.reader-content{font-family:Georgia,serif;font-size:18px;line-height:1.75;color:#f3f4f6}.reader-content img{max-width:100%;height:auto}.reader-nav{display:flex;justify-content:space-between;gap:10px;margin-top:25px}.locked{padding:30px;background:#0f172a;border-radius:12px}.playlist-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin-top:14px}.listener{display:grid;grid-template-columns:minmax(220px,330px) 1fr;gap:28px;align-items:center;max-width:1000px;margin:5vh auto}.listener-cover{aspect-ratio:2/3;background:#0f172a;border-radius:16px;overflow:hidden;display:grid;place-items:center}.listener-cover img{width:100%;height:100%;object-fit:cover}.listener-info audio{width:100%;margin:18px 0}.wp-account{display:flex;align-items:center;gap:8px;max-width:300px;padding:5px 9px;border:1px solid rgba(255,255,255,.14);border-radius:10px;background:rgba(15,23,42,.72)}.wp-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover}.wp-avatar.fallback{display:grid;place-items:center;background:#334155;font-weight:800}.wp-account-text{min-width:0;display:flex;flex-direction:column;line-height:1.15}.wp-account-text strong,.wp-account-text span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-account-text strong{font-size:13px}.wp-account-text span{font-size:11px;color:#aebbd0;margin-top:2px}@media(max-width:800px){.hero,.book-head,.listener{grid-template-columns:1fr;display:grid}.search{min-width:0;width:100%}.reader-layout{grid-template-columns:1fr}.chapter-sidebar{position:static;max-height:220px}.cover.large{width:150px}.topbar{flex-wrap:wrap}.brand{width:100%;flex-basis:100%}}

.product-price{font-weight:800;font-size:1.05rem;margin:.45rem 0}.large-price{font-size:1.25rem}.book-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.65rem}

/* Product-first storefront v0.1.2 */
.storefront-hero{border-color:#4b5f80}.product-source{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:#93c5fd;margin-bottom:5px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}.product-card{background:#172238;border:1px solid #334155;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;min-height:100%;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.product-card:hover{transform:translateY(-2px);border-color:#60a5fa;box-shadow:0 16px 38px rgba(0,0,0,.28)}.product-cover{width:100%;aspect-ratio:4/3;background:#0f172a;display:grid;place-items:center;overflow:hidden}.product-cover img{width:100%;height:100%;object-fit:contain;background:#fff}.product-card-body{padding:16px;display:flex;flex-direction:column;flex:1}.product-card h2{font-size:20px;line-height:1.2;margin:3px 0 7px}.card-price{font-size:18px;margin:3px 0 8px}.product-description{color:#b7c3d7;line-height:1.5;min-height:4.5em;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.product-meta,.product-status{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}.product-meta span,.status{font-size:11px;border-radius:999px;padding:5px 8px;background:#273449}.status.in{background:#14532d;color:#dcfce7}.status.out{background:#7f1d1d;color:#fee2e2}.status.buy{background:#1e3a8a;color:#dbeafe}.book-actions{margin-top:auto}.product-detail{display:grid;grid-template-columns:minmax(220px,340px) minmax(0,1fr);gap:28px;align-items:start}.product-detail-cover{aspect-ratio:2/3;background:#fff;border-radius:14px;overflow:hidden;display:grid;place-items:center}.product-detail-cover img{width:100%;height:100%;object-fit:contain}.product-detail-info h1{font-size:34px;line-height:1.1;margin:5px 0 8px}.sku{font-size:12px;color:#94a3b8;margin:8px 0}.product-long-description{max-height:none;overflow:visible;color:#d7e0ee}.detail-actions{margin:16px 0}.content-summary{border-top:1px solid #334155;padding-top:14px;margin-top:12px}.section-heading h2{margin:2px 0 10px}@media(max-width:760px){.product-detail{grid-template-columns:1fr}.product-detail-cover{max-width:300px}.product-grid{grid-template-columns:1fr}}

/* Storefront actions */
.buyProduct { border:0; border-radius:10px; padding:10px 16px; font-weight:700; cursor:pointer; background:#111; color:#fff; }
.buyProduct:hover { filter:brightness(1.1); }
.detail-buy { min-width:120px; }

.category-catalog{display:flex;flex-direction:column;gap:28px;margin-top:18px}
.category-section{display:flex;flex-direction:column;gap:12px}
.category-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;border-bottom:1px solid #334155;padding:0 2px 10px}
.category-heading h2{font-size:26px;margin:2px 0 0}
.category-count{font-size:12px;color:#94a3b8;background:#1e293b;border:1px solid #334155;border-radius:999px;padding:6px 10px;white-space:nowrap}

.category-heading.category-toggle{width:100%;background:transparent;color:inherit;border:0;cursor:pointer;text-align:left;padding:0 2px 10px}
.category-heading-right{display:flex;align-items:center;gap:10px}
.category-chevron{font-size:22px;line-height:1;transition:transform .18s ease}
.category-section.expanded .category-chevron{transform:rotate(180deg)}
.category-section.collapsed .category-products{display:none}
.category-products{display:block}

.listener-book{display:grid;grid-template-columns:minmax(150px,220px) 1fr;gap:24px;align-items:center}
.listener-book-cover img{width:100%;max-height:300px;object-fit:contain;border-radius:12px}
.listener-player audio{width:100%;margin-top:12px}
.audio-book-row.playing{outline:2px solid currentColor}
.audio-book-row.locked-track{opacity:.78}
.audio-book-row.continue-track strong::after{content:" · Continue";font-weight:600}
@media(max-width:720px){.listener-book{grid-template-columns:1fr}.listener-book-cover{max-width:220px;margin:auto}}
/* WordPress app-window integration */
html,body,#app{width:100%;min-height:100%;}
body.rvrh-book-viewer-app{margin:0!important;padding:0!important;overflow-x:hidden;}
body.rvrh-book-viewer-app #wpadminbar{display:none!important;}
.rvrh-books-pwa-launcher{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border-radius:12px;border:1px solid rgba(127,127,127,.35);background:#111;color:#fff;font:inherit;font-weight:700;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.rvrh-books-pwa-launcher:hover{filter:brightness(1.08);transform:translateY(-1px)}
