/* Начитано — общий CSS. Концепция A «Книжный журнал» (docs/design/DESIGN_SYSTEM.md).
   Тема намеренно светлая: старые авто-тёмные overrides не переносятся. */
:root {
  color-scheme: light;
  --bg: #f6f2e9;
  --paper: #fffdf8;
  --ink: #29251f;
  --muted: #5f574d;
  --accent: #8f302d;
  --accent-hover: #742521;
  --on-accent: #fffdf8;
  --line: #d9d1c3;
  --soft: #ebe1d5;
  --focus: #2467a0;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- База ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: inherit; text-underline-offset: 4px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; overflow-wrap: anywhere; }
h1, h2, h3, p { margin-top: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
main:focus { outline: none; }
.container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 24px; top: -120px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--bg); font-weight: 650; }
.skip:focus { top: 8px; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.logo { font: 700 34px/1 var(--serif); letter-spacing: -1.5px; text-decoration: none; }
.logo span { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 600; }
.header-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.header-nav a:hover { text-decoration: underline; }

/* ---------- Общие элементы ---------- */
.eyebrow { font: 600 12px/1.4 var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.pill { display: inline-block; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 13px 22px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: var(--on-accent); font: 650 14px/1.4 var(--sans); text-align: center; text-decoration: none; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: var(--soft); }
.arrow { font-size: 22px; line-height: 1; }
.text-link { font-size: 14px; font-weight: 650; color: var(--accent); }

/* ---------- Главная ---------- */
.home-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 70px; align-items: center; padding-block: 60px 72px; }
.hero-title { font-size: 80px; line-height: 1.08; letter-spacing: -3px; margin-bottom: 24px; max-width: 760px; }
.hero-title em { font-style: italic; color: var(--accent); }
.hero-text { max-width: 510px; font-size: 19px; line-height: 1.65; color: var(--muted); margin-bottom: 28px; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 440px; background: #e7cfc1; border-radius: 48% 48% 2px 2px; isolation: isolate; overflow: clip; }
.hero-art .cover { position: absolute; width: 150px; box-shadow: 0 18px 30px #0002; }
.hero-art .cover:nth-of-type(1) { transform: translate(-100px, 12px) rotate(-11deg); z-index: 1; }
.hero-art .cover:nth-of-type(2) { width: 165px; transform: translate(2px, -24px); z-index: 3; }
.hero-art .cover:nth-of-type(3) { transform: translate(100px, 32px) rotate(10deg); z-index: 2; }
.hero-index { position: absolute; top: 30px; left: 28px; font-size: 13px; color: var(--muted); }
.hero-caption { position: absolute; bottom: 22px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 0 24px; padding-top: 32px; border-top: 1px solid var(--line); }
.section-title h2 { font-size: 35px; line-height: 1.2; margin: 0; }
.section-title p { margin: 0; font-size: 14px; color: var(--muted); }

.selection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.selection-card { display: grid; grid-template-columns: 1fr 180px; gap: 24px; min-height: 300px; padding: 32px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s; }
.selection-card:nth-child(2) { background: #edeedf; }
.selection-card:hover { border-color: var(--accent); }
.selection-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; }
.selection-card h3 { font-size: 32px; line-height: 1.2; margin: 16px 0; }
.selection-card p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.mini-covers { position: relative; align-self: center; min-height: 210px; }
.mini-covers .cover { position: absolute; top: 20px; left: 12px; width: 110px; box-shadow: 0 12px 18px #0002; transform: rotate(-7deg); }
.mini-covers .cover:nth-child(2) { left: 65px; top: 40px; transform: rotate(6deg); }

.how-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px; margin: 0; padding: 0; list-style: none; }
.how-section .number { font: italic 28px var(--serif); color: var(--accent); }
.how-section h3 { font-size: 22px; line-height: 1.25; margin: 12px 0; }
.how-section p { font-size: 15px; color: var(--muted); margin: 0; }
.home-section { margin-top: 64px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 38px; }
.about-grid h2 { font-size: 29px; line-height: 1.2; margin-bottom: 12px; }
.about-grid p { font: 18px/1.7 var(--serif); max-width: 62ch; }

/* ---------- Раскрывающиеся блоки: состояние видно знаком, не только цветом ---------- */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; margin-left: 10px; font: 400 18px/1 var(--sans); color: var(--accent); }
details[open] > summary::after { content: "−"; }

/* ---------- Подборка ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-block: 28px 24px; font-size: 13px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 24px; text-decoration: none; }
.breadcrumb > span { display: inline-flex; align-items: center; min-height: 24px; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { overflow-wrap: anywhere; }

.collection-header { display: grid; grid-template-columns: 1fr 270px; gap: 64px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.collection-title { font-size: 56px; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 20px; max-width: 900px; }
.collection-intro { font-size: 18px; line-height: 1.65; max-width: 790px; color: var(--muted); margin-bottom: 20px; }
.collection-intro p { margin: 0 0 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 15px; margin: 0; font-size: 12px; color: var(--muted); }
.collection-aside { align-self: center; border-left: 1px solid var(--line); padding-left: 30px; }
.collection-aside .big-number { font: 76px/1 var(--serif); color: var(--accent); }
.collection-aside p { font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.about-list { margin-top: 16px; max-width: 790px; font-size: 16px; line-height: 1.65; }
.about-list summary { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 650; color: var(--accent); cursor: pointer; }
.about-list p { color: var(--muted); margin: 8px 0 0; }
.disclosure { font-size: 12px; line-height: 1.6; color: var(--muted); max-width: 790px; margin: 12px 0 0; }

.collection-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 44px; margin-top: 32px; }
.book-list { grid-column: 1; grid-row: 1; min-width: 0; }

.book-card { position: relative; margin-bottom: 24px; padding: 28px; background: var(--paper); border: 1px solid var(--line); scroll-margin-top: 115px; }
.book-card-head { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 28px; margin-bottom: 24px; }
.cover { width: 100%; height: auto; aspect-ratio: 415 / 622; object-fit: contain; object-position: center; align-self: start; background: var(--soft); border-radius: 2px; }
.cover-fallback { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 415 / 622; padding: 14px; text-align: center; background: var(--soft); border: 1px solid var(--line); border-radius: 2px; font: 17px/1.4 var(--serif); color: var(--muted); overflow-wrap: anywhere; }
.card-number { font-size: 12px; font-weight: 650; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.book-card h2 { font-size: 31px; line-height: 1.18; margin: 0 0 8px; }
.book-author { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 0 0 16px; padding: 0; }
.tag-list li { font-size: 12px; line-height: 1.5; color: var(--muted); background: var(--soft); border-radius: 2px; padding: 4px 8px; }
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin: 0; font-size: 12px; }
.score { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.score dt { color: var(--muted); }
.score dd { margin: 0; font-weight: 650; white-space: nowrap; }
.score dd b { color: var(--accent); }
.editorial-label { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.note-heading { font-size: 12px; font-weight: 650; letter-spacing: .9px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.book-note { font: 18px/1.7 var(--serif); max-width: 68ch; margin-bottom: 22px; overflow-wrap: anywhere; }
.flag { font-size: 14px; background: #fff4d6; border: 1px solid #8a6d1c; border-radius: 4px; padding: 8px 12px; margin-bottom: 22px; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.offer-note { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 12px 0 0; }
.offer-unavailable { flex: 1 1 100%; padding: 14px 16px; background: var(--soft); border-left: 3px solid var(--muted); font-size: 14px; line-height: 1.5; }
.offer-unavailable p { margin: 0; }
.offer-unavailable .offer-status { font-weight: 650; margin-bottom: 4px; }

.toc { grid-column: 2; grid-row: 1; position: static; top: 116px; align-self: start; border-top: 2px solid var(--accent); padding-top: 16px; }
.toc summary { display: flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 650; cursor: pointer; }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 10px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.toc li::before { content: counter(toc, decimal-leading-zero); min-width: 18px; padding-top: 12px; font-size: 11px; color: var(--muted); }
.toc a { display: block; flex: 1; padding-block: 10px; text-decoration: none; overflow-wrap: anywhere; }
.toc a:hover { text-decoration: underline; color: var(--accent); }
.legend { margin-top: 24px; font-size: 13px; line-height: 1.6; }
.legend summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.legend ul { padding-left: 18px; }

.related { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.related h2 { font-size: 30px; line-height: 1.2; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.related-list a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; font: 20px/1.35 var(--serif); color: var(--accent); }
.related-list .meta { display: block; }
.related-more { margin: 20px 0 0; }
.also-in { margin: 14px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.also-in a { color: var(--accent); }

/* ---------- Разделы: плитки на главной, страницы разделов, каталог ---------- */
.badge-18 { display: inline-block; vertical-align: middle; font: 700 12px/1 var(--sans); letter-spacing: .5px; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 4px; padding: 3px 5px; }
h1 .badge-18 { font-size: 16px; padding: 4px 7px; vertical-align: .35em; }
.section-title p a { color: var(--accent); }
.genre-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.genre-tile { padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); }
.genre-tile h3 { font-size: 23px; line-height: 1.25; margin: 0 0 4px; }
.genre-tile h3 a { color: var(--ink); text-decoration: none; }
.genre-tile h3 a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.genre-tile .meta { margin-bottom: 10px; }
.genre-samples { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.genre-samples a { color: var(--accent); }
.home-all { margin: 28px 0 0; }
.hub-header { max-width: 820px; margin-bottom: 32px; }
.hub-title { font-size: 46px; line-height: 1.12; letter-spacing: -1px; margin: 0 0 16px; }
.hub-intro p { font: 18px/1.7 var(--serif); margin: 0 0 12px; }
.adult-note { font-size: 14px; line-height: 1.55; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--paper); }
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.list-tile { display: flex; align-items: center; gap: 16px; height: 100%; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.list-tile:hover { border-color: var(--accent); }
.list-tile:hover .list-tile-title { text-decoration: underline; text-decoration-thickness: 1px; }
/* размеры обложек плитки фиксированы на всех ширинах: общие правила .mini-covers в медиазапросах их не трогают */
.list-tile .mini-covers { flex: 0 0 76px; min-height: 96px; }
.list-tile .mini-covers .cover:nth-child(n) { top: 4px; left: 0; width: 52px; box-shadow: 0 6px 10px #0002; }
.list-tile .mini-covers .cover:nth-child(2) { left: 24px; top: 12px; }
.list-tile .mini-covers:nth-child(n) { min-height: 96px; }
.list-tile-title { display: block; font: 19px/1.3 var(--serif); margin-bottom: 6px; }
.hub-other { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.hub-other h2 { font-size: 26px; line-height: 1.2; margin-bottom: 16px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip-list a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 14px; text-decoration: none; }
.chip-list a:hover { border-color: var(--accent); color: var(--accent); }
.chip-n { font-size: 12px; color: var(--muted); font-weight: 400; }
.catalog-section { padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.catalog-section h2 { font-size: 27px; line-height: 1.2; margin: 0 0 14px; }
.catalog-section h2 a { color: var(--ink); }
.catalog-lead { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.catalog-list { columns: 3; column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.catalog-list li { break-inside: avoid; padding: 5px 0; font: 17px/1.4 var(--serif); }
.catalog-list a { color: var(--accent); }
.prose-lead { font-size: 21px !important; }
.prose-cta { margin-top: 36px; }

/* ---------- Текстовые страницы ---------- */
.prose > * { max-width: 760px; }
.prose h1 { font-size: 46px; line-height: 1.12; letter-spacing: -1px; margin-bottom: 12px; }
.prose h2 { font-size: 25px; line-height: 1.25; margin: 36px 0 10px; }
.prose p, .prose li { font: 18px/1.7 var(--serif); }
.prose a { color: var(--accent); }
.prose .muted { color: var(--muted); font: 14px/1.55 var(--sans); }

/* ---------- Подвал ---------- */
.footer { margin-top: 64px; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.footer p { max-width: 690px; margin: 0 0 8px; }
.footer a { display: inline-block; padding-block: 4px; color: var(--ink); }
.footer-brand { font: 700 18px/1.3 var(--serif); color: var(--ink); }
.footer-brand span { color: var(--accent); }

/* ---------- Адаптив: включительные max-width 1100 / 800 / 600 ---------- */
@media (max-width: 1100px) {
  .container { width: calc(100% - 48px); }
  .hero-title { font-size: 66px; }
  .home-hero { gap: 40px; }
  .selection-card { grid-template-columns: 1fr 140px; gap: 16px; padding: 24px; }
  .selection-card h3 { font-size: 27px; }
  .mini-covers .cover { width: 90px; }
  .mini-covers .cover:nth-child(2) { left: 45px; }
  .collection-header { grid-template-columns: 1fr 200px; gap: 32px; }
  .collection-title { font-size: 48px; }
  .collection-layout { grid-template-columns: minmax(0, 1fr) 190px; gap: 30px; }
  .book-card-head { grid-template-columns: 120px minmax(0, 1fr); gap: 22px; }
  .book-card h2 { font-size: 28px; }
}
@media (max-width: 800px) {
  .header-nav { gap: 20px; }
  .logo { font-size: 29px; }
  .home-hero { grid-template-columns: 1fr 1fr; gap: 28px; padding-block: 44px 52px; }
  .hero-title { font-size: 50px; letter-spacing: -2px; }
  .hero-text { font-size: 17px; }
  .hero-art { min-height: 320px; }
  .hero-art .cover { width: 110px; }
  .hero-art .cover:nth-of-type(1) { transform: translate(-60px, 15px) rotate(-9deg); }
  .hero-art .cover:nth-of-type(2) { width: 125px; transform: translate(0, -22px); }
  .hero-art .cover:nth-of-type(3) { transform: translate(62px, 22px) rotate(9deg); }
  .hero-caption { font-size: 10px; }
  .hero-index { font-size: 11px; left: 20px; }
  .selection-grid { grid-template-columns: 1fr; }
  .selection-card { grid-template-columns: 1fr 190px; min-height: 260px; }
  .selection-card h3 { font-size: 31px; }
  .mini-covers .cover { width: 108px; }
  .mini-covers .cover:nth-child(2) { left: 66px; }
  .how-section, .about-grid { gap: 24px; }
  .how-section h3 { font-size: 21px; }
  .collection-header { grid-template-columns: 1fr; }
  .collection-aside { display: none; }
  .collection-title { font-size: 46px; }
  .collection-layout { display: flex; flex-direction: column; }
  .toc { position: static; width: 100%; border-top: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; }
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .legend { margin-top: 4px; }
  .book-card-head { grid-template-columns: 148px minmax(0, 1fr); }
  .book-card h2 { font-size: 32px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 90px; }
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 74px; gap: 8px; }
  .logo { font-size: 27px; letter-spacing: -1.2px; }
  .header-nav { gap: 16px; font-size: 12px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.2px; margin-bottom: 14px; }
  .home-hero { grid-template-columns: 1fr; gap: 32px; padding-block: 36px; }
  .hero-title { font-size: 48px; letter-spacing: -1.9px; max-width: 450px; margin-bottom: 18px; }
  .hero-text { font-size: 16px; line-height: 1.7; margin-bottom: 22px; }
  .hero-art { min-height: 300px; width: 100%; border-radius: 45% 45% 2px 2px; }
  .hero-art .cover { width: 112px; }
  .hero-art .cover:nth-of-type(1) { transform: translate(-76px, 6px) rotate(-11deg); }
  .hero-art .cover:nth-of-type(2) { width: 130px; transform: translate(0, -20px); }
  .hero-art .cover:nth-of-type(3) { transform: translate(80px, 17px) rotate(10deg); }
  .hero-index { font-size: 10px; top: 18px; left: 20px; }
  .hero-caption { bottom: 15px; }
  .section-title { display: block; padding-top: 24px; margin-bottom: 18px; }
  .section-title h2 { font-size: 29px; }
  .section-title p { font-size: 12px; margin-top: 10px; }
  .selection-card { grid-template-columns: 1fr 102px; gap: 14px; min-height: 240px; padding: 20px; }
  .selection-card h3 { font-size: 25px; }
  .selection-card p { font-size: 13px; line-height: 1.6; }
  .selection-card .pill { font-size: 10px; padding: 4px 8px; }
  .mini-covers { min-height: 170px; }
  .mini-covers .cover { width: 80px; left: 0; top: 6px; }
  .mini-covers .cover:nth-child(2) { width: 80px; left: 22px; top: 38px; }
  .text-link { font-size: 12px; }
  .home-section { margin-top: 36px; }
  .how-section, .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .how-section li { display: grid; grid-template-columns: 30px 1fr; column-gap: 18px; }
  .how-section .number { grid-row: 1 / 3; font-size: 24px; }
  .how-section h3 { margin: 0; }
  .how-section p { grid-column: 2; font-size: 14px; margin-top: 8px; }
  .about-grid h2 { font-size: 25px; }
  .about-grid p { font-size: 17px; }
  .footer { margin-top: 40px; padding-block: 24px; font-size: 11px; }
  .footer-inner { display: block; }
  .breadcrumb { font-size: 11px; padding-block: 20px; }
  .collection-header { padding-bottom: 22px; }
  .collection-title { font-size: 35px; line-height: 1.15; letter-spacing: -1px; }
  .collection-intro { font-size: 16px; margin-bottom: 16px; }
  .meta { font-size: 11px; gap: 4px 8px; }
  .about-list { font-size: 15px; }
  .disclosure { font-size: 11px; }
  .collection-layout { gap: 18px; margin-top: 18px; }
  .toc { padding-bottom: 8px; }
  .toc ol { grid-template-columns: 1fr; margin-top: 4px; }
  .book-card { padding: 20px; margin-bottom: 18px; scroll-margin-top: 90px; }
  .book-card-head { grid-template-columns: 92px minmax(0, 1fr); gap: 18px; margin-bottom: 20px; }
  .book-card h2 { font-size: 25px; line-height: 1.15; }
  .book-author { margin-bottom: 10px; }
  .card-number { font-size: 10px; }
  .tag-list { gap: 4px; margin-bottom: 10px; }
  .tag-list li { padding: 3px 6px; }
  .scores { grid-template-columns: 1fr; gap: 3px; }
  .score { gap: 6px; }
  .editorial-label { margin-top: 8px; }
  .note-heading { font-size: 10px; letter-spacing: .6px; }
  .book-note { font-size: 17px; margin-bottom: 20px; }
  .card-actions { gap: 8px; padding-top: 16px; }
  .card-actions .btn { flex: 1 1 auto; padding: 12px 14px; font-size: 12px; }
  .cover-fallback { font-size: 13px; padding: 8px; }
  .related h2 { font-size: 26px; }
  .related-list a { font-size: 17px; }
  .prose h1 { font-size: 35px; }
  .prose h2 { font-size: 22px; }
  .prose p, .prose li { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Необязательный подбор по настроению ---------- */
/* Явно сохраняем hidden: display:flex/grid у карточек и блоков не должен его отменять. */
[data-book-filters][hidden], [data-filter-card][hidden], [data-filter-empty][hidden],
[data-filter-navigation-status][hidden], [data-filter-toc-hint][hidden] { display: none !important; }
.book-filters { margin-bottom: 8px; }
/* Раскрытая панель вместе с TOC выше viewport: обычный document scroll сохраняет доступ ко всем контролам и ссылкам. */
/* Закрепляем только панель, которая помещается по высоте; без JS она прокручивается целиком. */
@media (min-width: 801px) {
  .toc.toc-sticky { position: sticky; }
}
.book-filters > summary { justify-content: space-between; gap: 8px; }
.book-filters > summary::after { flex: 0 0 auto; margin-left: 0; }
.book-filters-panel { padding-block: 8px 16px; font-size: 13px; line-height: 1.5; }
.romance-filter { min-width: 0; border: 0; padding: 0; margin: 0 0 8px; }
.romance-filter legend { padding: 0; font-weight: 650; margin-bottom: 4px; }
.romance-filter label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.romance-filter input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.theme-filter-label { display: block; font-weight: 650; margin: 16px 0 6px; }
[data-theme-filter] { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 8px; border: 1px solid var(--muted); border-radius: 4px; background: var(--paper); color: var(--ink); font: inherit; }
.book-filters input:focus-visible, .book-filters select:focus-visible,
.book-card[data-filter-card]:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.filter-help { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; }
.filter-review-warning { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 12px 0 0; padding-left: 10px; border-left: 3px solid var(--muted); }
.filter-count { font-weight: 650; margin: 16px 0 8px; }
.filter-reset { min-height: 44px; padding: 10px 12px; font-size: 13px; cursor: pointer; }
.book-filters .filter-reset { width: 100%; }
.filter-navigation-status { font-size: 12px; line-height: 1.6; padding: 10px; margin: 8px 0 12px; background: var(--soft); border-left: 3px solid var(--muted); }
.filter-empty { padding: 28px; margin-bottom: 24px; background: var(--paper); border: 1px solid var(--line); }
.filter-empty h2 { font-size: 28px; line-height: 1.2; margin-bottom: 12px; }
.filter-empty p { font-size: 15px; line-height: 1.6; color: var(--muted); margin-bottom: 18px; }
@media (max-width: 800px) {
  .book-filters-panel { max-width: 420px; }
}
@media (max-width: 600px) {
  .filter-empty { padding: 20px; margin-bottom: 18px; }
  .filter-empty h2 { font-size: 25px; }
}

/* ---------- Вторая волна: «Хочу прочитать», установка, офлайн (DESIGN_SYSTEM.md) ---------- */
[data-save][hidden], [data-save-count][hidden], [data-install-card][hidden], [data-install-accept][hidden],
[data-install-howto][hidden], [data-offline-banner][hidden], [data-saved-empty][hidden], [data-offline-empty][hidden], .toast[hidden] { display: none !important; }
.save-count { display: inline-flex; justify-content: center; align-items: center; min-width: 22px; min-height: 22px; margin-left: 6px; padding: 0 5px; border: 1px solid var(--muted); border-radius: 99px; font-size: 11px; font-weight: 650; }
.save-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--muted); border-radius: 4px; background: transparent; color: var(--ink); font: 650 13px/1.4 var(--sans); cursor: pointer; }
.save-button:hover { border-color: var(--accent); }
.save-button:active { transform: translateY(1px); }
.save-button[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.save-button [data-save-icon] { font-size: 16px; line-height: 1; }
.card-actions .offer-unavailable + .save-button { margin-top: 2px; }
.plain-button { min-height: 44px; padding: 10px 4px; border: 0; background: transparent; color: var(--ink); font: 600 14px/1.4 var(--sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.offline-banner { margin-top: 12px; margin-bottom: 0; padding: 12px 16px; background: var(--soft); border-left: 3px solid var(--muted); font-size: 14px; line-height: 1.5; }

.install-card { margin-top: 64px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.install-card h2 { font-size: 23px; line-height: 1.25; margin-bottom: 8px; }
.install-card p:not(.eyebrow) { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 68ch; }
.install-card .eyebrow { margin-bottom: 8px; }
.install-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.install-card + .footer, .container:has(> .install-card:not([hidden])) + .footer { margin-top: 32px; }

.saved-header { grid-template-columns: 1fr; }
.saved-list { margin-top: 32px; max-width: 900px; }
.saved-card .book-card-head { margin-bottom: 20px; }
.saved-in { font-size: 14px; margin-bottom: 8px; }
.saved-in a { color: var(--accent); }
.saved-date { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.offline-badge { display: inline-block; margin: 0; padding: 4px 10px; border: 1px solid var(--muted); border-radius: 99px; font-size: 12px; color: var(--muted); background: var(--paper); }
.offline-badge.is-offline-ready { border-color: var(--soft); background: var(--soft); color: var(--ink); }
.saved-card .offer-unavailable { flex: 0 1 auto; padding: 10px 14px; }
.saved-empty { margin-top: 32px; max-width: 900px; padding: 28px; background: var(--soft); }
.saved-empty h2 { font-size: 28px; line-height: 1.2; margin-bottom: 10px; }
.saved-empty h2:focus { outline: none; }
.saved-empty h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.notice { margin-top: 24px; padding: 14px 16px; background: var(--soft); font-size: 15px; }
.offline-page .related-list { margin-bottom: 16px; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 40; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 4px; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.5; box-shadow: 0 8px 24px #0002; }

.header-nav a { white-space: nowrap; }
.prose .eyebrow { font: 600 12px/1.4 var(--sans); }
@media (max-width: 400px) {
  .header-nav .nav-collections { display: none; } /* как nav-home в прототипе: путь к подборкам — логотип и крошки */
}
@media (max-width: 600px) {
  .prose .eyebrow { font-size: 10px; }
  .header-nav .nav-method { display: none; }
  .save-count { min-width: 19px; min-height: 19px; font-size: 10px; margin-left: 4px; }
  .card-actions .save-button { flex: 1 1 auto; font-size: 12px; padding: 11px 12px; }
  .install-card { margin-top: 40px; padding: 20px; }
  .install-card h2 { font-size: 21px; }
  .install-actions .btn { flex: 1 1 auto; }
  .saved-list, .saved-empty { margin-top: 20px; }
  .saved-empty { padding: 20px; }
  .saved-empty h2 { font-size: 25px; }
  .toast { bottom: 16px; font-size: 12px; }
}

/* ---------- Без обложек (основание использования не подтверждено): текстовые карточки и типографский hero ---------- */
.book-card--text .book-card-head { grid-template-columns: minmax(0, 1fr); }
.book-card--text h2 { max-width: 30ch; }
.selection-card.selection-card--text { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.hero-art--type { flex-direction: column; text-align: center; }
.hero-figure { display: flex; flex-direction: column; align-items: center; gap: 28px; margin: 0; }
.hero-number { font: 400 190px/0.85 var(--serif); letter-spacing: -6px; color: var(--accent); }
.hero-number-label { font: 400 19px/1.45 var(--serif); color: var(--ink); max-width: 22ch; }
@media (max-width: 800px) {
  .hero-number { font-size: 130px; letter-spacing: -4px; }
  .hero-number-label { font-size: 16px; }
}
@media (max-width: 600px) {
  .hero-number { font-size: 120px; }
  .hero-art--type { min-height: 280px; padding-top: 24px; }
}

/* ---------- Третья волна: «Где прочитать», полка, подбор, поиск (DESIGN_SYSTEM.md) ---------- */
[data-shelf-control][hidden], [data-shelf-tabs][hidden], [data-shelf-empty][hidden], [data-quiz-form][hidden],
[data-quiz-results][hidden], [data-search-empty][hidden], .search-item[hidden] { display: none !important; }
.where { padding-top: 20px; border-top: 1px solid var(--line); }
.where-title { font: 650 12px/1.4 var(--sans); letter-spacing: .9px; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.where-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.where-btn { flex-direction: column; align-items: flex-start; gap: 0; min-width: 190px; padding: 9px 18px; line-height: 1.3; text-align: left; }
.where-format { font-size: 14px; font-weight: 650; }
.where-retailer { font-size: 12px; font-weight: 400; opacity: .92; }
.ad-marking { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 6px 0 0; }
.where .offer-unavailable { flex: none; }
.card-shelf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.shelf-control { display: inline-flex; align-items: center; gap: 10px; }
.shelf-control-label { font-size: 13px; font-weight: 650; color: var(--muted); }
.shelf-control select { min-height: 48px; padding: 10px 36px 10px 14px; border: 1px solid var(--muted); border-radius: 4px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2329251f' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--ink); font: 650 13px/1.4 var(--sans); appearance: none; cursor: pointer; }
.shelf-control select:hover { border-color: var(--accent); }
.shelf-control select:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.shelf-control select.is-on-shelf { background-color: var(--soft); border-color: var(--accent); color: var(--accent); }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.filter-tab { min-height: 44px; padding: 8px 14px; border: 1px solid var(--muted); border-radius: 99px; background: var(--paper); color: var(--ink); font: 600 13px/1.3 var(--sans); cursor: pointer; }
.filter-tab:hover { border-color: var(--accent); }
.filter-tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
[data-shelf-status]:focus { outline: none; }

.quiz-form { max-width: 760px; margin-top: 28px; }
.quiz-q { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.quiz-q legend { padding: 0; margin-bottom: 8px; font: 400 23px/1.25 var(--serif); }
.quiz-options { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-options label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--muted); border-radius: 99px; background: var(--paper); font-size: 14px; cursor: pointer; }
.quiz-options label:has(input:checked) { border-color: var(--accent); background: var(--soft); color: var(--accent); font-weight: 650; }
.quiz-options input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.quiz-options input:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.quiz-form .filter-review-warning { margin-bottom: 18px; }
.quiz-results { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.quiz-results > h2 { font-size: 35px; line-height: 1.2; }
.quiz-results > h2:focus { outline: none; }
.quiz-title { font-size: 28px; line-height: 1.2; margin: 0 0 6px; }
.quiz-reasons, .quiz-cautions { margin: 0 0 12px; padding-left: 0; list-style: none; font-size: 15px; }
.quiz-reasons li::before { content: "✓ "; color: var(--accent); font-weight: 650; }
.quiz-cautions li { color: var(--muted); }
.quiz-cautions li::before { content: "• "; }
.quiz-actions { margin-top: 8px; }

.search-form { max-width: 760px; margin: 8px 0 12px; }
.search-label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.search-row { display: flex; gap: 10px; }
.search-field { flex: 1; min-width: 0; min-height: 50px; padding: 13px 16px; border: 1px solid var(--muted); border-radius: 4px; background: var(--paper); color: var(--ink); font: 16px/1.4 var(--sans); }
.search-field::placeholder { color: var(--muted); opacity: 1; }
.search-field:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.search-results { list-style: none; margin: 20px 0 0; padding: 0; max-width: 900px; display: grid; gap: 10px; }
.search-item { display: grid; gap: 2px; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); }
.search-title { font: 400 21px/1.3 var(--serif); color: var(--accent); text-underline-offset: 4px; }
.search-item .book-author { margin: 0; }
.home-search { max-width: 510px; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 800px) {
  .header-nav .nav-collections { display: none; }
}
@media (max-width: 600px) {
  .header-nav .nav-quiz { display: none; }
  .where-list li { flex: 1 1 100%; }
  .where-btn { width: 100%; min-width: 0; }
  .card-shelf .shelf-control { flex: 1 1 100%; }
  .card-shelf .shelf-control select { flex: 1; }
  .quiz-q legend { font-size: 20px; }
  .quiz-results > h2 { font-size: 29px; }
  .quiz-title { font-size: 24px; }
  .search-row { flex-wrap: wrap; }
  .search-row .btn { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* Возрастная маркировка карточки магазина (не редакционная рекомендация) */
.age-mark { display: inline-block; margin: -6px 0 14px; padding: 2px 8px; border: 1px solid var(--muted); border-radius: 2px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* ---------- Разделы и каталог: адаптив ---------- */
@media (max-width: 1100px) {
  .genre-grid, .tile-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .catalog-list { columns: 2; }
  .hub-title { font-size: 38px; }
}
@media (max-width: 600px) {
  .genre-grid, .tile-grid { grid-template-columns: 1fr; gap: 12px; }
  .genre-tile { padding: 18px; }
  .genre-tile h3 { font-size: 21px; }
  .catalog-list { columns: 1; }
  .hub-title { font-size: 31px; letter-spacing: -.5px; }
  .hub-intro p { font-size: 17px; }
  .list-tile-title { font-size: 18px; }
  .catalog-section h2 { font-size: 23px; }
}
