/* Aurum Viride — светлый, «воздушный» дизайн: белый фон, крупные заголовки, обложки в центре внимания. */

/* EB Garamond — только для чтения отрывков и предисловий (как страница книги). */
@font-face { font-family: "EB Garamond"; src: url(fonts/EBGaramond-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(fonts/EBGaramond-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(fonts/EBGaramond-SemiBold.woff2) format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(fonts/EBGaramond-SemiBoldItalic.woff2) format("woff2"); font-weight: 500 700; font-style: italic; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --warm: #f8f4ee;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #163d2e;      /* цвет ссылок и надзаголовков — зелёный обложек */
  --green: #163d2e;       /* верхний блок главной, как фон обложек */
  --green-deep: #0e3427;
  --gold: #c9a24a;
  --gold-gradient: linear-gradient(170deg, #fbefc0 0%, #e7c46c 28%, #b8892f 52%, #f0d385 74%, #c0923a 100%);
  --on-green: #f2e2b6;
  --on-green-soft: #cdbb8a;
  --paper: #fbf8f1;
  --ink: #1a1a1a;
  --rubric: #8a5a2b;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --cover-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 12px 28px -10px rgba(0, 0, 0, .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--sans); /* 17px */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 .4em; overflow-wrap: break-word; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 .6rem; }
.eyebrow a { color: inherit; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--text); color: #fff; padding: .5rem 1rem; }
.skip:focus { left: 1rem; }

/* ---------- Кнопки ---------- */
.btn, .store {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .6rem 1.4rem;
  border-radius: 980px; border: 1px solid transparent;
  font: 500 1rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover, .store:hover { text-decoration: none; }
.btn--primary, .store--primary { background: var(--text); color: #fff; }
.btn--primary:hover, .store--primary:hover { background: #3a3a3c; color: #fff; }
.btn--outline, .store { border-color: var(--text); color: var(--text); background: transparent; }
.btn--outline:hover, .store:hover { background: var(--text); color: #fff; }
.store--primary { border-color: var(--text); }
.btn--link { padding-left: .5rem; padding-right: .5rem; color: var(--accent); }
.btn--link:hover { text-decoration: underline; }
.store--soon, .store--soon:hover { background: var(--bg-alt); border-color: var(--bg-alt); color: var(--muted); cursor: default; }
.stores { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 56px; }
.brand { font: 600 1.25rem/1 var(--display); letter-spacing: -.01em; color: var(--text); margin-right: auto; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 1.75rem; }
.nav a { font-size: .9rem; color: var(--text); opacity: .8; }
.nav a:hover { opacity: 1; text-decoration: none; }
.nav a[aria-current="page"] { opacity: 1; font-weight: 600; }
.langs { display: flex; gap: .25rem; }
.langs a { font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); padding: .3rem .5rem; border-radius: 980px; }
.langs a:hover { color: var(--text); text-decoration: none; }
.langs a[aria-current="true"] { background: var(--text); color: #fff; }
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 0 1rem; padding-top: .4rem; }
  .nav { order: 3; flex-basis: 100%; gap: 1.5rem; padding: .35rem 0 .55rem; }
}

/* ---------- Главная: заголовок и веер обложек ---------- */
/* Ровный зелёный, как на обложках, с мягким затемнением к краям; обложки «веера» наполовину выходят на белое. */
.hero {
  text-align: center; padding-top: clamp(1.5rem, 4vw, 2.5rem); overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .30) 100%), var(--green);
  color: var(--on-green);
}
.hero-kicker { font: 600 .8rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.hero-title {
  font-size: clamp(1.7rem, 3.6vw, 2.75rem); max-width: 24ch; margin: 0 auto .4em; letter-spacing: -.02em; line-height: 1.1;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.hero-lead { font-size: clamp(.98rem, 1.6vw, 1.1rem); line-height: 1.45; color: var(--on-green-soft); max-width: 46ch; margin: 0 auto 1.1rem; }
.hero .btn--primary { background: var(--gold); border-color: var(--gold); color: var(--green-deep); }
.hero .btn--primary:hover { background: #e7c46c; border-color: #e7c46c; color: var(--green-deep); }
.hero .btn--link { color: var(--on-green); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: center; align-items: center; margin: 0; }
.hero-fan {
  display: flex; justify-content: center; align-items: flex-start; gap: clamp(.75rem, 2vw, 1.5rem);
  margin-top: clamp(1.25rem, 3vw, 2rem); padding: 0 var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(transparent 42%, var(--bg) 42%);
}
.fan-item { flex: none; width: clamp(120px, 14vw, 190px); transition: transform .35s ease; }
.fan-item img { display: block; width: 100%; aspect-ratio: 5 / 8; object-fit: cover; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25), 0 24px 40px -18px rgba(0, 0, 0, .6); }
.fan-d2 { margin-top: 2.5rem; }
.fan-d1 { margin-top: 1.2rem; }
.fan-extra { display: none; }
.fan-item:hover { transform: translateY(-6px); }
/* На телефоне — лента обложек, листается пальцем влево-вправо */
@media (max-width: 760px) {
  .hero-fan {
    justify-content: flex-start; align-items: flex-start; gap: .85rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding: .25rem 29vw 3.5rem;
    background: linear-gradient(transparent 50%, var(--bg) 50%);
  }
  .hero-fan::-webkit-scrollbar { display: none; }
  /* полукруг: книга в центре экрана выше всех, соседние ниже — сдвиг задаёт site.js при прокрутке */
  .fan-item, .fan-extra { display: block; width: 42vw; margin-top: 0; scroll-snap-align: center; transform: translateY(var(--arc, 0px)); transition: transform .12s linear; will-change: transform; }
  .fan-item:hover { transform: translateY(var(--arc, 0px)); }
}
}

/* ---------- Полки серий ---------- */
.shelf { padding: clamp(3rem, 7vw, 5rem) 0; }
.shelf + .shelf { border-top: 1px solid rgba(0, 0, 0, .06); }
.shelf-head { text-align: center; max-width: 44rem; margin: 0 auto 2.25rem; }
.shelf-head h2 a { color: var(--text); }
.shelf-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.more { text-align: center; margin: 1.5rem 0 0; }
.more a { font-size: 1.05rem; }

/* ряд обложек: прокручивается вбок, если не помещается */
.grid.row {
  display: flex; gap: clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  width: max-content; max-width: 100%; margin: 0 auto;
  padding: .75rem var(--gutter) 1.25rem;
}
.grid.row::-webkit-scrollbar { display: none; }
.grid.row .card { flex: none; width: clamp(150px, 18vw, 200px); scroll-snap-align: start; }

/* ---------- Сетка и карточки ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2.25rem clamp(1rem, 3vw, 2rem); }
@media (max-width: 600px) { .grid:not(.row) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; } }
.card a { display: block; color: inherit; }
.card a:hover { text-decoration: none; }
.card-cover { display: block; transition: transform .3s ease; }
.card-cover img { display: block; width: 100%; aspect-ratio: 5 / 8; object-fit: cover; border-radius: 4px; box-shadow: var(--cover-shadow); }
.card a:hover .card-cover { transform: translateY(-5px); }
.card-title { display: block; margin-top: .9rem; font-size: 1rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.card a:hover .card-title { color: var(--accent); }
.card-meta { display: block; margin-top: .3rem; font-size: .85rem; color: var(--muted); line-height: 1.4; }
.lang-badge {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .05em; line-height: 1;
  padding: .3em .45em; border-radius: 4px; background: var(--bg-alt); color: var(--text); margin-right: .3rem; vertical-align: .1em;
}

/* ---------- Блок «Рекомендуем» ---------- */
.featured { background: var(--warm); padding: clamp(3rem, 7vw, 5rem) 0; }
.featured-inner { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.featured-cover img { display: block; width: 100%; aspect-ratio: 5 / 8; object-fit: cover; border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 30px 50px -22px rgba(0, 0, 0, .45); transition: transform .3s ease; }
.featured-cover:hover img { transform: translateY(-6px); }
.featured-text h2 { font-size: clamp(2rem, 4vw, 3rem); }
.featured-sub { font-size: 1.2rem; color: var(--muted); }
.featured-blurb { font-size: 1.1rem; line-height: 1.6; max-width: 36rem; }
.featured .hero-actions { justify-content: flex-start; margin-top: 1.5rem; }
@media (max-width: 760px) {
  .featured-inner { grid-template-columns: 1fr; }
  .featured-cover { max-width: 240px; margin: 0 auto; }
}

/* ---------- О проекте (коротко) ---------- */
.about-short { background: var(--bg-alt); padding: clamp(3rem, 7vw, 5rem) 0; text-align: center; }
.about-short p { max-width: 42rem; margin: 0 auto 1.5rem; font-size: 1.15rem; line-height: 1.6; color: #3a3a3c; }

/* ---------- Страницы ---------- */
.page { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.page-head { text-align: center; max-width: 44rem; margin: 0 auto 2.5rem; }
.lead { font-size: 1.2rem; color: var(--muted); }

.filters { display: flex; flex-direction: column; gap: .75rem; align-items: center; margin-bottom: 3rem; }
.filter { display: inline-flex; flex-wrap: wrap; gap: .25rem; align-items: center; justify-content: center; background: var(--bg-alt); padding: .25rem; border-radius: 980px; }
.filter-label { font-size: .8rem; color: var(--muted); padding: 0 .6rem 0 .75rem; }
.chip { font: 500 .9rem/1 var(--sans); cursor: pointer; padding: .55rem .95rem; border: 0; border-radius: 980px; background: transparent; color: var(--text); }
.chip:hover { background: rgba(0, 0, 0, .05); }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; }
@media (max-width: 600px) { .filter { border-radius: 18px; } }
.empty { text-align: center; color: var(--muted); }

.series-intro { display: grid; grid-template-columns: 1fr; gap: 2.5rem; max-width: 64rem; }
.series-intro:has(.photo) { grid-template-columns: 1fr 1fr; text-align: left; align-items: center; }
@media (max-width: 760px) { .series-intro:has(.photo) { grid-template-columns: 1fr; text-align: center; } }
.photo { margin: 0; }
.photo img { display: block; width: 100%; border-radius: 12px; }

.section { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(.5rem, 2vw, 1rem); }
.section-title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.75rem; }
.section-note { text-align: center; color: var(--muted); margin-top: -1rem; margin-bottom: 1.75rem; }
.related .section-title { margin-top: 2.5rem; }
.related .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 190px)); justify-content: center; }
@media (max-width: 600px) { .related .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Страница книги ---------- */
.book { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: 1rem; align-items: start; }
@media (max-width: 760px) { .book { grid-template-columns: 1fr; } .book-cover { max-width: 280px; margin: 0 auto; } }
.cover-link { display: block; position: relative; }
.big-cover { display: block; width: 100%; aspect-ratio: 5 / 8; object-fit: cover; border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 34px 60px -26px rgba(0, 0, 0, .5); transition: transform .3s ease; }
.cover-link:hover .big-cover { transform: translateY(-4px); }
.cover-hint { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--text); font-size: 1rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.book-title { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: .25em; }
.book-volume { font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.book-subtitle { font-size: 1.25rem; line-height: 1.4; color: #3a3a3c; margin-bottom: .6rem; }
.book-credit { color: var(--muted); }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, auto)); margin: 1.75rem 0; border-top: 1px solid var(--line); }
.specs div { padding: .8rem 1.25rem .8rem 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.specs dd { margin: 0; font-weight: 500; }
.blurb { margin: 1.75rem 0; }
.also-in { margin-top: 1.25rem; color: var(--muted); }
.blurb p { line-height: 1.6; }
.blurb .back-title { font: 700 1.3rem/1.3 var(--display); letter-spacing: -.01em; }

.previews { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 2.5vw, 2rem); max-width: 920px; }
.previews a { display: block; transition: transform .3s ease; }
.previews a:hover { transform: translateY(-5px); }
.previews img { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), var(--cover-shadow); }

.toc { max-width: 34rem; margin: 0 auto; padding-left: 1.5rem; }
.toc li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.toc li::marker { color: var(--muted); }

/* ---------- Чтение: предисловие и отрывок (книжный набор) ---------- */
.paper {
  background: var(--paper);
  color: var(--ink);
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 6vw, 4.5rem) clamp(1.25rem, 6vw, 4.5rem);
  border-radius: 18px;
  font: 400 1.1875rem/1.6 var(--serif);
  font-variant-numeric: oldstyle-nums;
}
.paper h1, .paper h2, .paper h3 { font-family: var(--serif); letter-spacing: 0; color: var(--ink); }
.paper > h2 { text-align: center; font-size: 1.9rem; font-weight: 500; margin-bottom: 1.25em; }
.paper p { margin: 0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-indent: 1.2em; }
.paper p.first, .paper > h2 + p, .paper h3 + p, .paper .editor p, .paper p.log, .paper figure + p { text-indent: 0; }
.paper a { color: var(--rubric); }
.paper .opener { text-align: center; margin-bottom: 2rem; }
.paper .num { color: var(--rubric); letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; margin-bottom: .75rem; }
.paper .opener h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 500; line-height: 1.15; margin-bottom: .5rem; }
.paper .sub { font-style: italic; color: #4a4036; }
.paper .editor { font-size: 1.02rem; color: #3b342c; border-top: 1px solid rgba(138, 90, 43, .3); border-bottom: 1px solid rgba(138, 90, 43, .3); padding: 1rem 0; margin: 0 0 2rem; }
.paper .editor p + p { margin-top: .6em; }
.paper .byline { text-align: center; font-style: italic; color: var(--rubric); margin: 0 0 1.5rem; }
.paper h3, .paper h2.part { text-align: center; color: var(--rubric); font-size: 1.2rem; font-weight: 600; margin: 2rem 0 1rem; }
.paper h2.part { font-size: 1.45rem; }
.paper p.log { margin-top: .6em; }
.paper figure { margin: 1.5rem 0; text-align: center; }
.paper figure img { display: inline-block; height: auto; }
.paper figcaption { font-size: .95rem; font-style: italic; color: #3b342c; margin-top: .5rem; text-align: center; }
@media (max-width: 600px) { .paper figure img { width: 100% !important; } }
.paper-end { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(138, 90, 43, .3); font-family: var(--sans); }
.paper-end .stores { justify-content: center; margin-top: 0; }

/* ---------- About, юридические страницы ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; max-width: 64rem; margin: 0 auto; }
.about-text p { font-size: 1.25rem; line-height: 1.6; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); max-width: 64rem; margin: clamp(2rem, 5vw, 3.5rem) auto; }
@media (max-width: 760px) { .about-grid, .about-photos { grid-template-columns: 1fr; } }

.legal { max-width: 42rem; margin: 0 auto; }
.legal h1 { font-size: clamp(1.8rem, 6vw, 2.75rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.notfound { text-align: center; }
.notfound h1 { font-size: 6rem; }

/* ---------- Подвал ---------- */
.site-footer { background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .25) 100%), var(--green); font-size: .85rem; color: var(--on-green-soft); }
.footer-inner { padding-top: 2.25rem; padding-bottom: 2.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; }
.footer-name { font-weight: 600; color: var(--gold); margin: 0; letter-spacing: .02em; }
.footer-motto { margin: 0; flex: 1; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-links a, .site-footer .consent-open { color: var(--on-green); }
.footer-links a:hover, .site-footer .consent-open:hover { color: #fbefc0; }
@media (max-width: 640px) { .footer-inner { flex-direction: column; } }

/* ---------- Баннер согласия на аналитику ---------- */
.consent {
  position: fixed; z-index: 50; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  background: #fff; color: var(--text);
  border-radius: 18px; padding: 1.25rem 1.4rem 1.3rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 20px 50px -12px rgba(0, 0, 0, .35);
  border-top: 4px solid var(--green);
}
.consent-title { font: 700 1.05rem/1.3 var(--display); letter-spacing: -.01em; margin: 0 0 .4rem; }
.consent-text { font-size: .9rem; line-height: 1.5; color: #3a3a3c; margin: 0 0 1rem; }
.consent-actions { display: flex; gap: .6rem; }
/* обе кнопки одинаковые: отказ так же заметен, как согласие */
.consent-btn { flex: 1; background: var(--green); border-color: var(--green); color: #fff; min-height: 44px; }
.consent-btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.consent-open { font: inherit; color: #424245; background: none; border: 0; padding: 0; cursor: pointer; }
.consent-open:hover { text-decoration: underline; }

/* ---------- Просмотр картинок ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; border-radius: 6px; background: #fff; }
.lb-btn { position: fixed; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--text); font: 400 1.6rem/1 var(--sans); cursor: pointer; }
.lb-btn:hover { background: #fff; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
