/* The featured shelf is the visual reference. Keep app-injected cards unchanged. */
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid:not(.is-list) :is(.book-tags,.book-series,.book-custom,.file-size){display:none}
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid:not(.is-list) .book-formats a.action-link{display:inline;border:0;border-radius:0;background:transparent;padding:0;min-height:0;font-size:11px;font-weight:500;line-height:inherit}
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid:not(.is-list) .book-formats a.action-link i,
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid:not(.is-list) .book-formats a[aria-label^="Открыть"]{display:none}
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid:not(.is-list) .book-formats a:hover{text-decoration:underline}

/* List rows share the cover view's compact metadata and FB2 link. */
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid.is-list :is(.book-tags,.book-series){display:none}
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid.is-list .book-formats a.action-link[data-format="FB2" i]{display:inline;border:0;border-radius:0;background:transparent;color:var(--green);padding:0;min-height:0;font-size:11px;font-weight:500;line-height:inherit}
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid.is-list .book-formats a[data-format="FB2" i] i,
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid.is-list .book-formats a[data-format="FB2" i][aria-label^="Открыть"],
:root:not([data-aloa-library]):not([data-aloa-profile]) .catalog-entries.book-grid.is-list .book-formats .file-size[data-format="FB2" i]{display:none}

/* Standalone reading shelf uses the same card rules as “Знакомые истории”. */
.reading-grid.book-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:36px 28px}
.reading-grid .book-card{min-width:0;position:relative;align-self:start}
.reading-grid .book-cover-link{display:block}
.reading-grid .book-cover{--cover:#345747;--cover-ink:#f0e7cb;position:relative;aspect-ratio:.71;display:flex;flex-direction:column;justify-content:space-between;gap:12px;background:var(--cover);color:var(--cover-ink);border-radius:3px 8px 8px 3px;padding:24px 22px;overflow:hidden;box-shadow:inset 6px 0 0 rgba(0,0,0,.12),5px 9px 16px var(--shadow);min-width:0}
.reading-grid .book-cover::after{content:"";width:140px;height:140px;border:1px solid currentColor;opacity:.22;border-radius:50%;position:absolute;right:-56px;top:30%;pointer-events:none}
.reading-grid .book-cover.tone-1{--cover:#e0c7a2;--cover-ink:#433622}
.reading-grid .book-cover.tone-2{--cover:#733e42;--cover-ink:#f3dec9}
.reading-grid .book-cover.tone-3{--cover:#34566c;--cover-ink:#e9e9d7}
.reading-grid .cover-author{font-size:11px;letter-spacing:.9px;text-transform:uppercase;line-height:1.5;position:relative;z-index:1;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.reading-grid .cover-title{font:29px/1.12 Georgia,serif;letter-spacing:-.3px;position:relative;z-index:1;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.reading-grid .cover-imprint{font-size:10px;letter-spacing:1.8px;text-transform:uppercase;position:relative;z-index:1}
.reading-grid .book-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:var(--surface);z-index:2}
.reading-grid .book-info{padding-top:17px}
.reading-grid .book-info h2,.reading-grid .book-info h3{font-size:14px;font-weight:600;line-height:1.4;margin:0 0 6px}
.reading-grid .book-author{font-size:12px;color:var(--muted);line-height:1.5}
.reading-grid .book-formats{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:11px;margin-top:12px;text-transform:uppercase}
.reading-grid .book-formats a{color:var(--green);font-weight:500}
.reading-grid .book-formats a:hover{text-decoration:underline}
.reading-grid .save-book{position:absolute;top:10px;right:9px;z-index:3;width:31px;height:31px;border:0;border-radius:50%;background:var(--surface);color:var(--muted);align-items:center;justify-content:center;font-size:12px;box-shadow:0 1px 5px var(--shadow)}
.reading-grid .save-book:hover,.reading-grid .save-book[aria-pressed=true]{background:var(--green);color:var(--on-green)}
.reading-grid{margin-top:28px}.reading-grid .book-info h2{padding:0}.reading-grid .book-info p{margin:0}.reading-grid .save-book{display:none}.shelf-js .reading-grid .save-book{display:inline-flex}.reading-grid .reading-meter{margin-top:14px}.reading-grid .reading-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.reading-grid .reading-actions form{margin:0}.reading-grid .reading-actions .quiet{padding:6px 0;text-align:left;font-size:12px}.reading-grid .reading-actions a.action-link{font-size:12px;min-height:38px;padding:8px 10px}.reading-grid .book-formats a{background:none;border:0;padding:0;min-height:0;color:var(--green);text-decoration:none}.reading-grid .book-cover{box-sizing:border-box}.reading-grid .book-info h2{font-family:inherit}.reading-grid .book-cover-link{color:inherit;text-decoration:none}
@media(max-width:950px){.reading-grid .book-cover{padding:19px 17px}.reading-grid .cover-title{font-size:24px}}
@media(max-width:760px){.reading-grid.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 24px}.reading-grid .book-cover{padding:25px 23px}.reading-grid .cover-title{font-size:32px}}
@media(max-width:480px){.reading-grid.book-grid{gap:28px 18px}.reading-grid .book-cover{padding:18px 14px;gap:8px}.reading-grid .cover-title{font-size:24px}.reading-grid .cover-author{font-size:10px}.reading-grid .cover-imprint{font-size:9px;letter-spacing:1px}.reading-grid .book-info{padding-top:13px}.reading-grid .book-info h2{font-size:13px}.reading-grid .book-author{font-size:11px}.reading-grid .save-book{width:29px;height:29px;right:6px;top:7px}}
@media(pointer:coarse){.reading-grid .save-book{min-width:44px;min-height:44px}}
@media print{.reading-grid .save-book,.reading-grid .reading-actions{display:none!important}.reading-grid .book-card{break-inside:avoid}}

.reading-grid .save-book{padding:0}.reading-grid .book-info h2 a{color:inherit;text-decoration:none}.reading-grid .book-info h2 a:hover{color:var(--green)}

:root:not([data-aloa-library]):not([data-aloa-profile]) .library-page .reading-grid.book-grid button.save-book{color:var(--muted)}
:root:not([data-aloa-library]):not([data-aloa-profile]) .library-page .reading-grid.book-grid button.save-book:hover,
:root:not([data-aloa-library]):not([data-aloa-profile]) .library-page .reading-grid.book-grid button.save-book[aria-pressed=true]{color:var(--on-green)}
.reading-grid{font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;--shadow:rgba(30,52,38,.10)}
