/* BookBuch after dark: warm paper, forest shadows, and the original cover art. */
:root{color-scheme:light}
body{background:#fff}
.header{background:#fff}
:root[data-theme="dark"]{color-scheme:dark;--pine:#b6d5bc;--pine2:#a0c9ac;--orange:#e79a70;--ink:#eeeede;--muted:#a8b5a9;--line:#35483b;--cream:#1b2a21;--sage:#24382b;--white:#1a2820;--night-bg:#101b15;--night-panel:#19271e;--night-raised:#223329;--night-soft:#2b3d30;--night-accent:#dfc18a;--night-dark-ink:#14261a}
.cover-wrap{perspective:900px}
.book-cover,.bestseller-art img{transform-origin:50% 65%;transition:transform .4s cubic-bezier(.2,.7,.3,1),box-shadow .4s ease;backface-visibility:hidden}
.cover-wrap:hover .book-cover{transform:none}
@media(hover:hover) and (pointer:fine){
  .cover-wrap:hover .book-cover,.cover-wrap:focus-visible .book-cover{transform:translateY(-6px) rotateY(-10deg) rotateZ(-1.5deg);box-shadow:10px 15px 20px #101b1538}
  .bestseller-art{perspective:700px}
  .bestseller-card:hover .bestseller-art img,.bestseller-card:focus-visible .bestseller-art img{transform:translateY(-4px) rotateY(-10deg) rotateZ(-1.5deg);box-shadow:9px 12px 18px #101b1538}
}
html[data-theme="dark"] body,html[data-theme="dark"] body:has(.community-shell),html[data-theme="dark"] body:has(.messages-page){background:radial-gradient(ellipse at 18% 0,#b9a16d0a,transparent 50%),var(--night-bg);color:var(--ink)}
html[data-theme="dark"] .header{background:#101b15f5;border-color:var(--line);backdrop-filter:blur(14px)}
html[data-theme="dark"] .announcement{background:#192d20;color:#d1decf}
html[data-theme="dark"] .announcement button{color:#d1decf}
html[data-theme="dark"] .header nav a{color:#a5b5a6}
html[data-theme="dark"] .header nav a.active{color:var(--ink)}
html[data-theme="dark"] .avatar{background:var(--sage);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] footer{background:#132017;border-color:var(--line)}
html[data-theme="dark"] :is(.footer-inner>span,.footer-inner button,.footer-bottom,.footer-bottom button,.back-link){color:var(--muted)}
/* Surfaces and inputs are shared by buying, selling, community, and reading. */
html[data-theme="dark"] :is(.btn,.panel,.stat,.price-summary,.cart-item,.order-card,.seller-listing-row,.upload-progress,.rail-profile,.share-prompt,.post-card,.feed-refresh,.feed-search,.social-empty,.profile-main,.messenger,.chat-header,.message-compose,.emoji-tray,.older-messages,.reader-notes,.club-card,.review-purchase){background:var(--night-panel);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(.btn-primary,.segmented button.active,.market-status-tabs button.active,.lounge-links>a.active,.message-send,.unread-pill,.rail-unread,.count-dot){background:var(--pine);border-color:var(--pine);color:var(--night-dark-ink)}
html[data-theme="dark"] .btn-primary:hover{background:#c8e5cc}
html[data-theme="dark"] .btn-orange{background:var(--orange);border-color:var(--orange);color:#291b12}
html[data-theme="dark"] .btn-orange:hover{background:#f2b28d}
html[data-theme="dark"] .btn-ghost{background:transparent;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.field input,.field textarea,.field select,.sort,.cart-quantity input,.qty button,.discovery-kind select,.challenge-month input,.challenge-goal-row input,.reader-toolbar input){background:#142219;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#8b9d8d;opacity:1}
html[data-theme="dark"] :is(input,textarea,select){accent-color:var(--pine)}
html[data-theme="dark"] :is(.search,.segmented,.side-nav,.order-header,.modal-close,.readonly-value,.reader-save-line,th){background:var(--night-raised);color:var(--muted);border-color:var(--line)}
html[data-theme="dark"] .segmented button{color:#bec9b5}
html[data-theme="dark"] .segmented button.active{color:var(--night-dark-ink)}
html[data-theme="dark"] :is(.search input,.inbox-search input,.feed-search input,.caption-input,.message-input-row textarea){color:var(--ink)}
html[data-theme="dark"] :is(.option:has(input:checked),.receive-options label:has(input:checked),.side-nav button.active){background:var(--sage);border-color:#7d9c7a;color:var(--ink)}
html[data-theme="dark"] :is(.summary-row,.tabs button,.steps-head,.checkbox-line,.modal-content p,.book-info .author,.book-info .category,.rating,.book-info .delivery-note,.delivery-note){color:var(--muted)}
html[data-theme="dark"] :is(.summary-row strong,.summary-row.total,.steps-head .active){color:var(--ink)}
html[data-theme="dark"] :is(.notice,.success-icon,.uploaded-pdf){background:#243a29;border-color:#3a563b;color:#c3d4bc}
html[data-theme="dark"] .notice.soft{background:#382e1e;border-color:#605035;color:#e1c590}
html[data-theme="dark"] :is(.form-error,.inline-error){background:#3c2720;border-color:#775040;color:#ffc7ac}
html[data-theme="dark"] :is(.status-pill,.status-pill.blue){background:#2c4430;color:#cae3bc}
html[data-theme="dark"] .status-pill.orange{background:#48351e;color:#efce92}
html[data-theme="dark"] .status-pill.grey{background:#303c32;color:#c0cbbb}
html[data-theme="dark"] :is(.steps-head .active b,.order-timeline .done span,.step.done:before){background:var(--pine);color:var(--night-dark-ink)}
html[data-theme="dark"] :is(.market-photo-upload,.pdf-upload,.upload,.social-image-upload){background:#15251b;border-color:#4c6751;color:var(--muted)}
html[data-theme="dark"] dialog{background:var(--night-panel);color:var(--ink);border-color:#52644c;box-shadow:0 24px 100px #0009}
html[data-theme="dark"] dialog::backdrop{background:#061009b8;backdrop-filter:blur(5px)}
html[data-theme="dark"] #toast{background:#cee0c5;color:#192c1c;box-shadow:0 10px 35px #0006}
/* The bookshop. */
html[data-theme="dark"] :is(.hero,.market-shop-hero){background:linear-gradient(125deg,#233b29,#1c2d22);border:1px solid #354e36}
html[data-theme="dark"] .market-shop-hero h1 em{color:#e4d4b2}
html[data-theme="dark"] :is(.market-shop-hero p,.hero-copy p,.hero h1 em,.art-caption){color:#b5c4af}
html[data-theme="dark"] .market-format-links a{background:#17281c;border-color:#3c523b}
html[data-theme="dark"] .market-format-links a:hover{background:#293e2b;border-color:#9ab28d}
html[data-theme="dark"] .book-card .cover-wrap{background:radial-gradient(ellipse at 40% 30%,#344a35,#202e24)}
html[data-theme="dark"] .book-card:nth-child(4n+2) .cover-wrap{background:radial-gradient(ellipse at 40% 30%,#3b4130,#272e24)}
html[data-theme="dark"] .book-card:nth-child(4n+3) .cover-wrap{background:radial-gradient(ellipse at 40% 30%,#423b2e,#2d2a22)}
html[data-theme="dark"] .book-card:nth-child(4n+4) .cover-wrap{background:radial-gradient(ellipse at 40% 30%,#35433f,#232e2a)}
html[data-theme="dark"] .book-cover{box-shadow:6px 10px 18px #0008}
html[data-theme="dark"] :is(.format-badge,.favorite){background:#16291ded;color:#dae5d0;border:1px solid #435a3e}
html[data-theme="dark"] .condition-badge{background:#0c1912eb;color:#d8e4cf}
html[data-theme="dark"] .favorite.selected{background:#75543c;color:#ffe0b4}
html[data-theme="dark"] .book-card .quick-add{background:#283d2b;border-color:#466046;color:#dbe8d4}
html[data-theme="dark"] :is(.chip,.chip.active){color:#c0cfb6}
html[data-theme="dark"] .chip.active{background:var(--sage);border-color:var(--line)}
html[data-theme="dark"] .book-genre-tags span{background:#2d3c2d;color:#d0dbbf}
html[data-theme="dark"] .weekly-bestsellers{background:linear-gradient(120deg,#24321f,#19291d);border-color:#455338}
html[data-theme="dark"] .bestseller-heading h2{color:#f1ecd9}
html[data-theme="dark"] .bestseller-heading h2 em{color:var(--night-accent)}
html[data-theme="dark"] :is(.bestseller-heading p,.bestseller-footnote,.bestseller-copy small){color:#b6c4a8}
html[data-theme="dark"] .bestseller-card{background:#17251a;border-color:#3d4d32}
html[data-theme="dark"] .bestseller-card:hover{box-shadow:0 8px 20px #0005;border-color:#64734d}
html[data-theme="dark"] .bestseller-kicker{color:#ddbc83}
html[data-theme="dark"] .bestseller-copy strong{color:#e9ddbc}
html[data-theme="dark"] .bestseller-rank{background:#c5d4aa;border-color:#17251a;color:#1c2b1a}
html[data-theme="dark"] .bestseller-rank.is-pick{background:#d0a56d;color:#261c10}
html[data-theme="dark"] .bestseller-toggle{background:#263821;border-color:#4d5d3d;color:#e4e4c8}
html[data-theme="dark"] .bestseller-toggle:hover{background:#33472a}
html[data-theme="dark"] :is(.sell-option,.sell-digital,.sell-physical){background:var(--night-panel);border-color:var(--line)}
html[data-theme="dark"] .sell-digital{background:#2b2b20}
html[data-theme="dark"] .sell-digital .sell-symbol{color:var(--orange)}
html[data-theme="dark"] :is(.sell-symbol,.sell-manage>span){background:var(--night-raised);border-color:var(--line)}
html[data-theme="dark"] :is(.sell-option>p,.sell-option ul,.sell-manage,.uploaded-pdf span){color:var(--muted)}
html[data-theme="dark"] :is(.hero-pill,.hero-disk,.detail-cover,.listing-preview,.market-gallery>img,.editor-summary-cover,.market-fulfillment,.order-address,.listing-type-card){background:var(--night-raised);border-color:var(--line)}
html[data-theme="dark"] .seller-banner{background:#223e29;color:var(--ink)}
html[data-theme="dark"] .seller-banner .btn{background:var(--pine);color:var(--night-dark-ink);border-color:var(--pine)}
/* Community and messages. */
html[data-theme="dark"] :is(.rail-note,.reading-pick,.profile-cover,.profile-grid-item,.text-post,.attached-book,.inbox-panel,.chat-panel,.chat-privacy,.message-input-row,.conversation-row.selected,.conversation-row:hover,.chat-empty-icon){background:var(--night-raised);border-color:var(--line)}
html[data-theme="dark"] :is(.profile-cover:before,.profile-cover:after){border-color:#466143}
html[data-theme="dark"] :is(.reader-avatar.large,.reader-avatar.hero-avatar){border-color:var(--night-panel)}
html[data-theme="dark"] :is(.post-image,.message-history){background:#132219}
html[data-theme="dark"] :is(.post-caption,.comment-row p,.profile-bio,.profile-stats b,.profile-tabs .active,.attached-book strong,.social-empty h2,.chat-empty h2,.conversation-begin h2,.caption-input){color:#d0d9c4}
html[data-theme="dark"] :is(.rail-nav button,.rail-nav a,.post-actions>button,.post-category,.hashtag,.composer-links button,.composer-links button:first-child,.follow-btn,.reading-pick>a,.menu-action,.comment-input-row button){color:#b4c9a4}
html[data-theme="dark"] :is(.follow-btn,.follow-btn.is-following,.comment-input-row button,.new-chat,.inbox-filters button.active,.chat-empty-icon,.inbox-empty>.btn){background:#293f2c;border-color:#4a6545;color:#d5e4c9}
html[data-theme="dark"] .message-bubble{background:#2e4c33;border-color:#466844;color:#e0ecd4}
html[data-theme="dark"] .incoming .message-bubble{background:#223427;border-color:#3d533b;color:#d8e1cd}
html[data-theme="dark"] .message-date:before,html[data-theme="dark"] .message-date:after{background:var(--line)}
html[data-theme="dark"] :is(.chat-privacy.demo-chat,.chat-connection){background:#342f20;border-color:#504934;color:#dac79d}
html[data-theme="dark"] .menu-action.danger{color:#e5aa90}
/* Clubs, progress, and PDF controls. PDF pages retain their printed colors. */
html[data-theme="dark"] :is(.mood-card,.club-art,.club-cover,.challenge-dial>strong){background:var(--night-raised);color:var(--ink)}
html[data-theme="dark"] :is(.mood-fear,.club-night .club-art,.club-cover.club-night){background:#293a35}
html[data-theme="dark"] :is(.mood-romance,.club-peach .club-art,.club-cover.club-peach){background:#3b3028}
html[data-theme="dark"] .mood-inspire{background:#3a3624}
html[data-theme="dark"] :is(.mood-card>span,.club-cover p,.club-art small,.club-art>span,.club-cover-symbol){color:#c2d0b4}
html[data-theme="dark"] .challenge-dial{background:conic-gradient(var(--pine) var(--progress),#344735 0)}
html[data-theme="dark"] :is(.challenge-badge.earned>b,.review-star-picker label:has(input:checked) span){background:#483e25;color:#f0ce84;border-color:#8c7642}
html[data-theme="dark"] :is(.verified-rating,.review-stars,.review-summary>span,.trust-stars,.review-star-picker span){color:#e6c77f}
html[data-theme="dark"] .reader-toolbar{background:#263c2b;color:#e3e9d6}
html[data-theme="dark"] .reader-toolbar .btn{background:#ffffff0b;color:#e3e9d6;border-color:#64745a}
html[data-theme="dark"] .reader-toolbar .btn.selected{background:#ddc994;color:#1b2b1d}
html[data-theme="dark"] .reader-stage{background:#0d1611;border-color:#344736}
html[data-theme="dark"] .reader-paper{background:white;color:black}
html[data-theme="dark"] :is(.reader-note blockquote,.note-quote,.reader-selection){background:#383521;border-color:#756637;color:#e2d09d}
html[data-theme="dark"] .reader-selection .btn{background:#4c432a;border-color:#8e7a41;color:#f1d89b}
html[data-theme="dark"] .reader-loading{background:#14231aed}
html[data-theme="dark"] .reader{background:var(--night-raised);color:var(--ink)}
html[data-theme="dark"] :is(.cancel-btn,.remove-comment){color:#e5b7a0}
@media(max-width:1100px) and (min-width:821px){.header-inner{gap:15px}.header-actions{gap:5px}.header nav{gap:17px}}
@media(max-width:600px){.header-actions{gap:2px}.header-actions .icon-button{width:32px;height:34px;padding:7px}.header-actions>[data-action="favorites"]{display:none}.header-actions>.btn{width:32px;height:34px;font-size:0;padding:7px;gap:0}.header-actions>.btn svg{display:block;width:18px;height:18px}.header .brand{font-size:21px}}
@media(prefers-reduced-motion:reduce){.cover-wrap .book-cover,.cover-wrap:hover .book-cover,.cover-wrap:focus-visible .book-cover,.bestseller-card .bestseller-art img,.bestseller-card:hover .bestseller-art img,.bestseller-card:focus-visible .bestseller-art img{transform:none!important;transition:none!important}}
