/* =========================================================
   biblpipl — библиотека для людей. Тема «Ночная библиотека»
   Фоны: замените файлы в assets/img/bg/ или переменные ниже.
   ========================================================= */
:root {
  --bg: #080c18;
  --bg-2: #0d1426;
  --panel: rgba(14, 21, 40, .78);
  --panel-solid: #111a31;
  --line: rgba(227, 181, 106, .18);
  --line-2: rgba(227, 181, 106, .34);
  --gold: #e3b56a;
  --gold-2: #f3d9a4;
  --gold-3: #b98a42;
  --text: #ece5d6;
  --muted: #9fa6ba;
  --muted-2: #6f7790;
  --paper: #f3e9d4;
  --paper-ink: #2b2118;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --f-display: "Cormorant Garamond", "Lora", Georgia, serif;
  --f-ui: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-read: "Lora", Georgia, serif;
  --wrap: 1240px;
  --header-h: 76px;

}

/* ---------- Фоновые изображения: замените файлы в assets/img/bg/ ---------- */
.bg-hero   { background-image: url("../img/bg/hero.svg"); }
.bg-skazki { background-image: url("../img/bg/bg-skazki.svg"); }
.bg-storys { background-image: url("../img/bg/bg-storys.svg"); }
.bg-roman  { background-image: url("../img/bg/bg-roman.svg"); }
.bg-gazeta { background-image: url("../img/bg/bg-gazeta.svg"); }
.bg-poetry { background-image: url("../img/bg/bg-poetry.svg"); }
.bg-book   { background-image: url("../img/bg/bg-book.svg"); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.65 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(80, 90, 160, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(227, 181, 106, .06), transparent 60%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, .display { font-family: var(--f-display); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
h3 { font-size: 22px; }
.eyebrow { font: 600 11px/1 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--muted); }

/* ---------- Логотип ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo__mark { width: 44px; height: 44px; flex: none; color: var(--gold); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__word { font: 500 30px/1 var(--f-display); letter-spacing: .01em; }
.logo__word i { color: var(--gold-2); font-weight: 600; }
.logo__word b { font-weight: 400; color: var(--text); }
.logo__tag { font: 500 9.5px/1 var(--f-ui); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

/* ---------- Шапка ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.is-solid, .header--solid {
  background: rgba(8, 12, 24, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}
.header__in { display: flex; align-items: center; gap: 28px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  position: relative; padding: 10px 14px; font-size: 14px; color: #d6d2c8; border-radius: 8px; transition: color .2s;
}
.nav a:hover { color: var(--gold-2); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--gold-2); transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: rgba(227, 181, 106, .1); border-color: var(--line-2); }
.icon-btn svg { width: 19px; height: 19px; }
.burger { display: none; }

/* мобильное меню */
.drawer {
  position: fixed; inset: 0; z-index: 80; background: rgba(4, 6, 14, .6); opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 86vw); padding: 24px;
  background: var(--panel-solid); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .3s; display: flex; flex-direction: column; gap: 6px;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__panel a { padding: 14px 6px; border-bottom: 1px solid var(--line); font: 500 22px var(--f-display); }
.drawer__panel a[aria-current="page"] { color: var(--gold); }
.drawer__close { align-self: flex-end; margin-bottom: 10px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 26px; border-radius: 999px;
  font: 600 14px var(--f-ui); letter-spacing: .02em; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn--gold {
  color: #2a1a06; background: linear-gradient(180deg, #f6d9a0, #d8a453);
  box-shadow: 0 8px 24px rgba(216, 164, 83, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn--gold:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(216, 164, 83, .4), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--gold-2); }
.btn--ghost:hover { background: rgba(227, 181, 106, .08); }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); font: 600 12px var(--f-ui); letter-spacing: .08em; color: var(--gold-2);
  transition: background .2s;
}
.chip:hover, .chip.is-active { background: rgba(227, 181, 106, .12); }
.link-more { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-size: 14px; }
.link-more svg { width: 16px; height: 16px; transition: transform .2s; }
.link-more:hover svg { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100vh, 860px); display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 120px; overflow: hidden; isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; background-repeat: no-repeat;
  transform: scale(1.04); animation: slowzoom 30s ease-in-out infinite alternate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 9, 20, .92) 0%, rgba(6, 9, 20, .55) 45%, rgba(6, 9, 20, .1) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
@keyframes slowzoom { to { transform: scale(1.1) translateY(-1%); } }
.hero__content { max-width: 620px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 86px); font-weight: 400; line-height: 1.02; color: var(--text); }
.hero h1 em { display: block; font-style: italic; color: var(--gold-2); font-weight: 500; font-size: 1.08em;
  background: linear-gradient(180deg, #fbe7bd, #d8a453); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; color: #cfcbbf; max-width: 470px; margin: 26px 0 36px; }
.hero__sign {
  position: absolute; right: max(20px, calc((100vw - var(--wrap)) / 2)); bottom: 110px;
  font: italic 500 clamp(34px, 4vw, 54px) var(--f-display); color: var(--gold); transform: rotate(-6deg);
  text-shadow: 0 0 30px rgba(227, 181, 106, .35);
}
.hero__sign small { display: block; font: 500 10px var(--f-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); transform: rotate(6deg); text-align: right; }
.scroll-hint { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.scroll-hint span { width: 1px; height: 36px; background: linear-gradient(var(--gold), transparent); animation: drip 2s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Секции ---------- */
.section { padding: 80px 0; position: relative; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section__head p { margin: 8px 0 0; color: var(--muted); }
.ornament { display: flex; align-items: center; gap: 12px; color: var(--gold); margin-bottom: 14px; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 46px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { transform: scaleX(-1); }
.ornament svg { width: 14px; height: 14px; }

/* ---------- Карусель ---------- */
.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 28px) / 4); gap: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 18px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__btn {
  position: absolute; top: 38%; z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(10, 15, 30, .85); border: 1px solid var(--line-2); color: var(--gold-2);
  transition: opacity .2s, background .2s;
}
.carousel__btn:hover { background: rgba(227, 181, 106, .15); }
.carousel__btn[disabled] { opacity: 0; pointer-events: none; }
.carousel__btn--prev { left: -22px; }
.carousel__btn--next { right: -22px; }
.carousel__btn svg { width: 20px; height: 20px; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.carousel__dots i { width: 18px; height: 3px; border-radius: 3px; background: var(--line-2); transition: background .2s, width .2s; }
.carousel__dots i.is-active { width: 34px; background: var(--gold); }

/* ---------- Карточка книги ---------- */
.book { display: flex; flex-direction: column; gap: 14px; }
.book__cover {
  position: relative; aspect-ratio: 2 / 3; border-radius: 6px 10px 10px 6px; overflow: hidden;
  box-shadow: 0 2px 0 rgba(255,255,255,.04), 0 16px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(227, 181, 106, .15);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  background: var(--bg-2);
}
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book__cover::before { /* корешок */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 10px; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.12) 40%, rgba(0,0,0,.15));
}
.book__cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 236, 200, .14) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform .8s;
}
.book:hover .book__cover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 26px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(227, 181, 106, .35); }
.book:hover .book__cover::after { transform: translateX(100%); }
.book__title { font: 600 17px/1.3 var(--f-ui); color: var(--text); }
.book__title a:hover { color: var(--gold-2); }
.book__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.book__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.book__desc { font-size: 13.5px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.book__desc--empty { font-style: italic; color: var(--muted-2); }
.badge {
  position: absolute; top: 10px; right: 10px; z-index: 2; padding: 4px 9px; border-radius: 6px;
  font: 700 10px var(--f-ui); letter-spacing: .14em; text-transform: uppercase;
  background: rgba(8, 12, 24, .82); color: var(--gold-2); border: 1px solid var(--line-2);
}

/* ---------- Разделы ---------- */
.sections-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.tile {
  position: relative; grid-column: span 2; min-height: 230px; border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 26px; isolation: isolate;
  border: 1px solid var(--line); transition: border-color .3s, transform .3s;
}
.tile:nth-child(1), .tile:nth-child(2) { grid-column: span 3; min-height: 280px; }
.tile__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform .8s; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 8, 18, .95) 10%, rgba(5, 8, 18, .2) 75%); }
.tile:hover { border-color: var(--line-2); transform: translateY(-3px); }
.tile:hover .tile__bg { transform: scale(1.06); }
.tile h3 { font-size: 32px; }
.tile p { margin: 6px 0 0; padding-right: 52px; color: #c9c5ba; font-size: 14px; }
.tile__count { position: absolute; top: 20px; right: 22px; font: italic 500 18px var(--f-display); color: var(--gold-2); }
.tile__arrow { position: absolute; right: 22px; bottom: 26px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--gold-2); transition: background .2s; }
.tile:hover .tile__arrow { background: rgba(227, 181, 106, .18); }
.tile__arrow svg { width: 18px; height: 18px; }

/* ---------- От автора ---------- */
.author {
  display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center;
  padding: 48px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(20, 28, 54, .9), rgba(12, 17, 33, .9));
  position: relative; overflow: hidden;
}
.author::after { content: "“"; position: absolute; right: 30px; top: -40px; font: 260px/1 var(--f-display); color: rgba(227, 181, 106, .07); }
.author__photo {
  aspect-ratio: 4/5; border-radius: 14px; border: 1px solid var(--line-2);
  background: radial-gradient(circle at 50% 35%, #2a3560, #0d1328 70%); display: grid; place-items: center; position: relative; overflow: hidden;
}
.author__photo svg { width: 46%; color: var(--gold); opacity: .7; }
.author__photo small { position: absolute; bottom: 12px; font-size: 11px; color: var(--muted-2); letter-spacing: .1em; }
.author blockquote { margin: 18px 0 22px; font: italic 400 clamp(20px, 2vw, 26px)/1.45 var(--f-display); color: #e9e1cf; }
.author__sign { font: italic 500 30px var(--f-display); color: var(--gold); }
.author__sign small { font: 500 12px var(--f-ui); color: var(--muted); margin-left: 10px; letter-spacing: .1em; }

/* ---------- Новое: список ---------- */
.feed { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; }
.feature {
  display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 28px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
}
.feature h3 { font-size: 34px; margin: 10px 0 12px; }
.feature p { color: var(--muted); margin: 0 0 22px; }
.list { display: flex; flex-direction: column; }
.list a { display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line); transition: background .2s; border-radius: 8px; }
.list a:hover { background: rgba(227, 181, 106, .05); }
.list img { width: 54px; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px 5px 5px 3px; box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.list b { font-weight: 600; display: block; font-size: 15px; }
.list span { font-size: 13px; color: var(--muted); }
.list svg { width: 18px; color: var(--gold); }

/* ---------- Цикл ---------- */
.cycle {
  position: relative; border-radius: 20px; overflow: hidden; padding: 54px 48px; border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(6, 9, 20, .95) 35%, rgba(6, 9, 20, .55)), url("../img/bg/bg-roman.svg") center/cover;
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center;
}
.cycle h2 { margin: 12px 0 14px; }
.cycle p { color: #c9c5ba; margin: 0 0 26px; }
.cycle__books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cycle__books .book__title { font-size: 14px; }

/* ---------- Подвал ---------- */
.footer { margin-top: 60px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 15, 30, .4), #05070f); padding: 60px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { margin: 0 0 16px; font: 600 11px var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li a { color: var(--muted); font-size: 14px; transition: color .2s; }
.footer li a:hover { color: var(--gold-2); }
.footer__about { color: var(--muted); font-size: 14px; max-width: 320px; margin: 18px 0 0; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted-2); }

/* ---------- Страница раздела ---------- */
.page-hero {
  position: relative; padding: calc(var(--header-h) + 64px) 0 70px; isolation: isolate; overflow: hidden;
}
.page-hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 9, 20, .9) 20%, rgba(6, 9, 20, .35)), linear-gradient(0deg, var(--bg), transparent 55%); }
.page-hero h1 { font-size: clamp(40px, 5.4vw, 68px); font-weight: 400; }
.page-hero p { margin: 12px 0 0; font-size: 17px; color: #cfcbbf; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--gold-2); }
.crumbs span[aria-current] { color: var(--gold); }
.crumbs i { font-style: normal; color: var(--muted-2); }

.layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h4 { margin: 0 0 16px; font: 500 22px var(--f-display); color: var(--gold-2); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.toolbar__count { color: var(--muted); font-size: 14px; }
.toolbar__right { display: flex; gap: 10px; align-items: center; }
.select { height: 38px; padding: 0 34px 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3b56a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center/16px no-repeat; color: var(--text); font: 500 13px var(--f-ui); appearance: none; }
.grid-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 28px; }
.grid-books.is-list { grid-template-columns: 1fr; gap: 16px; }
.grid-books.is-list .book { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 14px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); }
.grid-books.is-list .book__cover { grid-row: span 3; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: #d4d0c6; transition: color .2s; }
.side-links a:hover, .side-links a[aria-current] { color: var(--gold-2); }
.side-links span { color: var(--muted-2); }
.mini { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 8px 0; }
.mini img { width: 46px; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px 4px 4px 2px; }
.mini b { font-size: 14px; font-weight: 600; display: block; line-height: 1.3; }
.mini span { font-size: 12px; color: var(--muted); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pagination a:hover { border-color: var(--line-2); color: var(--gold-2); }
.pagination a[aria-current] { background: linear-gradient(180deg, #f6d9a0, #d8a453); color: #2a1a06; border-color: transparent; font-weight: 700; }

/* газета */
.issue { display: grid; grid-template-columns: 240px 1fr; gap: 30px; padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.issue + .issue { margin-top: 20px; }
.newspaper { aspect-ratio: 3/4; border-radius: 4px; background: var(--paper); color: var(--paper-ink); padding: 16px; font-family: var(--f-display); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; transform: rotate(-2deg); }
.newspaper b { font-size: 28px; text-align: center; border-bottom: 3px double var(--paper-ink); padding-bottom: 4px; }
.newspaper small { font: 600 9px var(--f-ui); letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.newspaper i { display: block; height: 6px; background: rgba(43, 33, 24, .18); border-radius: 2px; }
.newspaper i:nth-child(odd) { width: 86%; }
.newspaper .ph { flex: 1; background: rgba(43, 33, 24, .14); border-radius: 2px; margin: 6px 0; }

/* ---------- Страница книги ---------- */
.book-hero { position: relative; padding: calc(var(--header-h) + 40px) 0 60px; isolation: isolate; overflow: hidden; }
.book-hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; filter: blur(2px) saturate(1.1); transform: scale(1.05); }
.book-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6,9,20,.96) 30%, rgba(6,9,20,.7)), linear-gradient(0deg, var(--bg), transparent 40%); }
.book-head { display: grid; grid-template-columns: 330px 1fr; gap: 60px; align-items: start; }
.book-3d { perspective: 1400px; }
.book-3d__in { position: relative; transform: rotateY(-14deg); transform-style: preserve-3d; transition: transform .6s; }
.book-3d:hover .book-3d__in { transform: rotateY(-4deg); }
.book-3d img { border-radius: 4px 10px 10px 4px; box-shadow: 30px 30px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(227,181,106,.2); }
.book-3d__in::after { content: ""; position: absolute; top: 4px; bottom: 4px; right: -16px; width: 16px; transform: rotateY(90deg); transform-origin: left; background: repeating-linear-gradient(90deg, #efe4cc, #efe4cc 1px, #d8ccb0 2px); }
.book-info h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 500; margin: 14px 0 10px; }
.book-info__cycle { font: italic 500 20px var(--f-display); color: var(--gold-2); }
.facts { display: flex; flex-wrap: wrap; gap: 22px; margin: 22px 0; color: #d4d0c6; font-size: 14px; }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { width: 17px; height: 17px; color: var(--gold); }
.book-info__lead { font: 400 19px/1.6 var(--f-display); color: #ddd6c6; max-width: 620px; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.formats { display: flex; gap: 8px; margin-left: 6px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; font-size: 13px; color: var(--muted); }
.share > svg { width: 17px; height: 17px; color: var(--gold); }
.book-body { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.prose { font: 400 17px/1.8 var(--f-read); color: #ddd7c9; }
.prose p { margin: 0 0 1.1em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--gold); font: italic 21px/1.5 var(--f-display); color: var(--gold-2); }
.about-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); padding: 34px; background: linear-gradient(180deg, rgba(10,15,30,.75), rgba(10,15,30,.95)), url("../img/bg/bg-book.svg") center/cover; }
.toc { list-style: none; counter-reset: ch; margin: 0; padding: 0; }
.toc li { counter-increment: ch; }
.toc a { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: #d4d0c6; transition: color .2s; }
.toc a::before { content: counter(ch) "."; color: var(--gold); font-weight: 600; }
.toc a:hover { color: var(--gold-2); }
.toc small { color: var(--muted-2); }
.download-box img { width: 120px; margin: 0 auto 16px; border-radius: 3px 6px 6px 3px; box-shadow: 0 12px 26px rgba(0,0,0,.5); }
.download-box .formats { margin: 0 0 14px; justify-content: center; }
.download-box .btn { width: 100%; justify-content: center; }

/* ---------- Поиск ---------- */
.search { position: fixed; inset: 0; z-index: 90; background: rgba(4, 6, 14, .82); backdrop-filter: blur(10px); display: none; padding: 12vh 20px 20px; }
.search.is-open { display: block; }
.search__box { width: min(720px, 100%); margin: 0 auto; }
.search__field { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-2); padding-bottom: 12px; }
.search__field svg { width: 24px; color: var(--gold); flex: none; }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: 400 clamp(26px, 4vw, 40px) var(--f-display); }
.search input::placeholder { color: var(--muted-2); }
.search__results { margin-top: 20px; max-height: 60vh; overflow: auto; display: grid; gap: 4px; }
.search__results a { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 10px; }
.search__results a:hover, .search__results a.is-hl { background: rgba(227, 181, 106, .08); }
.search__results img { width: 40px; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px 4px 4px 2px; }
.search__results b { display: block; font-weight: 600; }
.search__results span { font-size: 13px; color: var(--muted); }
.search__empty { color: var(--muted); padding: 20px 10px; }
.search__close { position: absolute; top: 22px; right: 22px; }

/* ---------- Нижняя навигация (мобильная) ---------- */
.tabbar { display: none; }

/* ---------- Появление ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s, transform .8s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .nav a { padding: 10px 9px; font-size: 13px; }
  .carousel__track { grid-auto-columns: calc((100% - 2 * 24px) / 3); gap: 24px; }
  .layout, .book-body { grid-template-columns: 1fr; }
  .layout aside, .book-body aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
  .layout aside .panel + .panel, .book-body aside .panel + .panel { margin-top: 0; }
  .feed { grid-template-columns: 1fr; }
  .cycle { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav, .header .js-search-open { display: none; }
  .burger { display: grid; margin-left: auto; }
  .logo__mark { width: 38px; height: 38px; }
  .logo__word { font-size: 26px; }
  .hero__sign { display: none; }
  .sections-grid { grid-template-columns: 1fr 1fr; }
  .tile, .tile:nth-child(1), .tile:nth-child(2) { grid-column: span 1; min-height: 200px; }
  .tile:nth-child(1) { grid-column: span 2; }
  .author { grid-template-columns: 1fr; padding: 30px; gap: 28px; }
  .author__photo { max-width: 220px; }
  .book-head { grid-template-columns: 1fr; gap: 34px; }
  .book-3d { max-width: 240px; margin: 0 auto; }
  .book-info { text-align: center; }
  .book-info .facts, .book-info .actions, .book-info .share { justify-content: center; }
  .book-info__lead { margin-inline: auto; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid-books { grid-template-columns: repeat(2, 1fr); gap: 28px 18px; }
  .feature { grid-template-columns: 140px 1fr; padding: 20px; gap: 20px; }
  .issue { grid-template-columns: 1fr; }
  .newspaper { max-width: 220px; }
  body { padding-bottom: 72px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px;
    height: 62px; border-radius: 18px; background: rgba(12, 18, 36, .92); backdrop-filter: blur(14px); border: 1px solid var(--line-2);
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10.5px; color: var(--muted); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar [aria-current] { color: var(--gold); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .section { padding: 56px 0; }
  .hero { min-height: auto; padding: calc(var(--header-h) + 50px) 0 90px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 2%, rgba(6, 9, 20, .55) 50%, rgba(6, 9, 20, .75)); }
  .hero p { font-size: 15.5px; }
  .carousel__track { grid-auto-columns: 46%; gap: 16px; }
  .carousel__btn { display: none; }
  .section__head { flex-direction: column; align-items: start; }
  .sections-grid { grid-template-columns: 1fr; }
  .tile:nth-child(1) { grid-column: span 1; }
  .feature { grid-template-columns: 1fr; }
  .feature .book__cover { width: 170px; }
  .cycle { padding: 30px 22px; }
  .cycle__books { gap: 12px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .book__title { font-size: 15px; }
  .book__desc { display: none; }
  .grid-books.is-list .book__desc { display: -webkit-box; }
  .formats { margin-left: 0; }
  .book-body aside, .layout aside { grid-template-columns: 1fr; }
}
