/* The complete collection: covers first, quiet typography and tactile pages. */
#bookGrid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 48px 32px; }
#bookGrid .library-book-card { display:flex!important; gap:0; }
#bookGrid .library-book-card.search-excluded,#bookGrid .library-book-card[hidden],#bookGrid .library-book-card.v2-hidden { display:none!important; }
#bookGrid .mini-cover { width:180px; height:270px; margin:0 auto 24px; overflow:visible; transform:perspective(1000px) rotateY(-10deg); }
#bookGrid .mini-cover::after { content:''; position:absolute; top:3px; bottom:3px; right:-7px; width:7px; background:repeating-linear-gradient(to right,#e6dcc9 0 1px,#faf3e4 1px 2px); transform:skewY(12deg); z-index:-1; }
#bookGrid .mini-cover .catalog-cover-image { display:block; width:100%;height:100%;object-fit:cover;opacity:1!important;border-radius:2px 5px 5px 2px; }
#bookGrid .library-book-card:hover .mini-cover { transform:perspective(1000px) rotateY(-3deg) translateY(-5px); }
.details-cover { position:relative; }
.details-cover .details-cover-image { display:block!important;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:1!important; }
.book-tags { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 12px; }
.book-tags button { padding:5px 8px;border:1px solid #cbbdaa;color:#69513c;background:transparent;border-radius:20px;font:11px/1.3 Arial,sans-serif;cursor:pointer; }
.book-tags button:hover { background:#e6d8c5; }
.catalog-search { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.catalog-search select,.catalog-search>button { min-height:44px;padding:10px 14px;border:1px solid #c6b5a1;background:#fffaf0;color:#34281f;border-radius:5px;font:13px Arial,sans-serif; }
.catalog-search #catalogSearchStatus { flex-basis:100%; }
.tag-filter-label { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
.chapter-note-form { display:grid;gap:12px;margin:20px 0 26px;padding-bottom:24px;border-bottom:1px solid var(--reader-border); }
.chapter-note-form label { font:13px/1.5 Arial,sans-serif; }
.chapter-note-form textarea { width:100%;min-height:130px;resize:vertical;padding:14px;border:1px solid var(--reader-border);border-radius:6px;background:var(--reader-page);color:var(--reader-text);font:15px/1.6 Arial,sans-serif; }
.chapter-note-form button { min-height:42px;padding:10px 16px;border-radius:5px;border:1px solid var(--reader-border);background:var(--reader-page);color:var(--reader-text);cursor:pointer; }
.chapter-note-form #saveChapterNote { background:#a65322;color:#fff;border-color:#a65322; }
#chapterNoteStatus { font:12px/1.5 Arial,sans-serif;margin:0;color:var(--reader-muted); }
.reader-block-chapter-heading h1 { font-size:clamp(26px,2.4vw,38px);line-height:1.18;letter-spacing:-.025em; }
.reader-block-chapter-heading { margin-bottom:24px; }
.reader-view .reader-v2-drawer { box-shadow:-8px 0 30px #00000015; }
.reader-view[data-reading-mode='physical'] .flipbook-physical-page { box-shadow:inset 8px 0 18px #553a1410; }
.reader-view[data-reading-mode='physical'][data-theme='paper'] { background:#171310; }
.reader-view[data-reading-mode='physical'][data-theme='paper'] .reader-topbar,
.reader-view[data-reading-mode='physical'][data-theme='paper'] .reader-footer { background:#171310;color:#f3eadb;border-color:#45382c; }
.reader-view[data-reading-mode='physical'][data-theme='paper'] .reader-topbar button { color:#f3eadb; }
.reader-view[data-reading-mode='physical'] .flipbook-spread { filter:drop-shadow(0 16px 20px #0005); }
.reader-view[data-reading-mode='physical'] .flipbook-spread::before { display:block;content:'';position:absolute;inset:-5px -10px -8px;background:repeating-linear-gradient(0deg,#cdbfa6 0 1px,#eee3ce 1px 3px);border:4px solid #35291f;border-radius:12px;transform:translateZ(-2px);z-index:-1; }
.reader-view[data-reading-mode='physical'] .flipbook-left-page { border-radius:9px 22px 18px 9px;box-shadow:inset -12px 0 24px -10px #654b3a33; }
.reader-view[data-reading-mode='physical'] .flipbook-right-page { border-radius:22px 9px 9px 18px;box-shadow:inset 12px 0 24px -10px #654b3a33; }
.reader-view[data-reader-view='spread'].flipbook-enabled.notebook-split { --flipbook-width:min(1480px,calc(100vw - min(380px,36vw) - 110px)); }
.reader-view[data-reader-view='spread'].flipbook-spread-mode .measure-page,
.reader-view[data-reader-view='spread'].flipbook-spread-mode .flipbook-physical-page,
.reader-view[data-reader-view='spread'].flipbook-spread-mode .flipbook-leaf-face { box-sizing:border-box; padding:var(--flipbook-pad-y) var(--flipbook-pad-x) 44px; height:var(--flipbook-height); min-height:0; }
.reader-view[data-reader-view='spread'].flipbook-spread-mode .measure-page { width:calc(var(--flipbook-width) / 2); }
.reader-view.controls-hidden:not(.reading-focus) .reader-tools-dock { opacity:1;pointer-events:auto;transform:none; }
@media(min-width:761px) { .reader-view[data-reader-view='single'].notebook-split .measure-page { width:calc(100vw - min(380px,36vw)); } }
@media(max-width:760px) { .reader-view .reader-tools-dock button:nth-child(3) { display:inline-flex; } }
html[data-aasta-author='true'] .aasta-license-watermark { display:none; }
@media(max-width:1150px) { #bookGrid { grid-template-columns:repeat(3,minmax(0,1fr));gap:36px 26px; } }
@media(max-width:760px) { #bookGrid { grid-template-columns:repeat(2,minmax(0,1fr));gap:34px 22px; } #bookGrid .mini-cover { width:125px;height:188px;max-width:100%; } .catalog-search input { flex-basis:100%; } .catalog-search select { flex:1;min-width:0; } }
@media(max-width:390px) { #bookGrid .mini-cover { width:110px;height:165px; } }
@media(prefers-reduced-motion:reduce) { #bookGrid .mini-cover,#bookGrid .library-book-card:hover .mini-cover { transform:none;transition:none; } }
