/* ============ Роман Рак — вариант 1, «Окно в дождь» ============ */

:root {
  --night: #080d15;
  --night-2: #0d1622;
  --text: #ece6d9;
  --soft: #c9cdd3;
  --muted: #8f9cab;
  --gold: #dcb57a;
  --gold-2: #f3dfb6;
  --line: rgba(220, 181, 122, .42);
  --hair: rgba(160, 180, 200, .16);
  --cream: #f6eddb;
  --ink: #111a30;
  --fog: rgba(170, 195, 220, .06);
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --pad: 26px;
  --gap: 132px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
#book-main { scroll-margin-top: 104px; }   /* переход по кнопке: блок встаёт сразу под шапкой */
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before { /* глубина ночи */
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 55% at 50% -8%, #17273b 0%, transparent 62%),
    radial-gradient(70% 50% at 100% 100%, rgba(120, 78, 36, .16) 0%, transparent 70%),
    linear-gradient(180deg, var(--night-2), var(--night) 45%, #070b12);
}
body::after { /* лёгкое зерно, как на бумаге */
  content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.loading main, body.loading .foot, body.loading .top { opacity: 0; }
main, .foot { transition: opacity 1.6s var(--ease); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .5s var(--ease), border-color .5s var(--ease); }
a:hover { color: var(--gold-2); }
p { margin: 0 0 .85em; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .012em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 9.4vw, 4.6rem); }
h2 { font-size: clamp(2.25rem, 8vw, 3.5rem); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; }
.narrow { max-width: 660px; }
.center { text-align: center; }
section { position: relative; padding: var(--gap) 0; overflow: hidden; }

.label, .kicker {
  font: 500 .68rem/1.4 var(--sans); letter-spacing: .38em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.9em;
}
.sub { font-style: italic; font-weight: 400; font-size: 1.22rem; color: var(--muted); margin-bottom: 1.8em; }
.prose p { margin-bottom: .8em; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Кнопки: тонкая золотая линия, как на обложке ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 16px 34px;
  border: 1px solid var(--line); border-radius: 2px;
  background: transparent; color: var(--gold-2);
  font: 500 .72rem/1.3 var(--sans); letter-spacing: .26em; text-transform: uppercase; text-align: center;
  cursor: pointer; isolation: isolate;
  transition: color .7s var(--ease), border-color .7s var(--ease), box-shadow .9s var(--ease);
}
.btn::before { /* мягкий свет изнутри */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(120% 160% at 50% 120%, rgba(232, 190, 124, .34), rgba(232, 190, 124, .04) 60%, transparent);
  transition: opacity .9s var(--ease);
}
.btn:hover, .btn:focus-visible { color: #fff6e2; border-color: var(--gold); box-shadow: 0 0 44px -10px rgba(232, 190, 124, .6); }
.btn:hover::before, .btn:focus-visible::before { opacity: 1; }
/* все основные кнопки одного вида и веса: .primary, .ghost, .dark выглядят одинаково */
.btn.dark, .btn.dark-ghost { color: var(--ink); border-color: rgba(17, 26, 48, .5); }
.btn.dark::before, .btn.dark-ghost::before { background: radial-gradient(120% 160% at 50% 120%, rgba(190, 140, 60, .3), transparent 70%); }
.btn.dark:hover, .btn.dark-ghost:hover { color: #000a24; border-color: var(--ink); box-shadow: 0 0 40px -12px rgba(170, 120, 40, .7); }
.actions { display: flex; flex-direction: column; gap: 14px; }
.actions.center { align-items: center; }
.actions.center .btn { width: 100%; max-width: 340px; }

/* ---------- Шапка ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad); padding-top: max(14px, env(safe-area-inset-top));
  transition: background 1s var(--ease), opacity 1.6s var(--ease);
}
.top::before { content: ""; position: absolute; inset: 0 0 -24px 0; z-index: -1; opacity: 0; transition: opacity 1s var(--ease);
  background: linear-gradient(180deg, rgba(8, 13, 21, .92), rgba(8, 13, 21, .6) 60%, transparent); }
.top.solid::before { opacity: 1; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font: 400 1.02rem var(--serif); letter-spacing: .3em; text-transform: uppercase; }
.brand img { width: 32px; height: 32px; }
.lang { display: flex; align-items: center; gap: 2px; color: var(--muted); font: 500 .68rem var(--sans); letter-spacing: .24em; }
.lang button { background: none; border: 0; color: var(--muted); font: inherit; letter-spacing: inherit; padding: 12px 6px; cursor: pointer; transition: color .6s var(--ease); }
.lang button.on { color: var(--gold-2); }

/* ---------- 1. Первый экран ---------- */
.hero { min-height: 100svh; padding: 110px 0 80px; display: flex; align-items: center; }
.glass { position: absolute; inset: 0; pointer-events: none; }
.glass::before { /* следы дождя на стекле */
  content: ""; position: absolute; inset: 0; opacity: .7;
  background:
    repeating-linear-gradient(93deg, transparent 0 58px, rgba(160, 185, 210, .028) 58px 59px, transparent 59px 141px),
    repeating-linear-gradient(88deg, transparent 0 83px, rgba(160, 185, 210, .022) 83px 84px, transparent 84px 197px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%);
}
.bokeh { position: absolute; border-radius: 50%; filter: blur(30px); animation: drift 28s ease-in-out infinite alternate; }
.b1 { width: 150px; height: 150px; left: -4%; top: 64%; background: #e2a055; opacity: .2; }
.b2 { width: 110px; height: 110px; left: 80%; top: 74%; background: #efc581; opacity: .2; animation-duration: 36s; }
.b3 { width: 200px; height: 200px; left: 62%; top: 4%;  background: #56789c; opacity: .16; animation-duration: 44s; }
.b4, .b5 { display: none; }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(18px, -30px, 0); } }

.hero-grid { display: grid; gap: 54px; justify-items: center; text-align: center; }
.hero-cover { position: relative; width: min(60vw, 290px); }
.halo {
  position: absolute; inset: -46% -62%; z-index: 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 200, 130, .85), rgba(236, 170, 98, .5) 48%, rgba(217, 143, 69, .2) 70%, transparent 94%);
  animation: breathe 11s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
.cover { position: relative; z-index: 1; border-radius: 3px; box-shadow: 0 50px 90px -34px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .05); will-change: transform; }
.hero-text { max-width: 560px; }
.hero .kicker { letter-spacing: .5em; margin-bottom: 1.6em; }
.hero h1 { margin-bottom: .55em; }
.phrase { font-style: italic; font-weight: 400; font-size: clamp(1.4rem, 5vw, 1.75rem); line-height: 1.35; color: var(--gold-2); margin-bottom: 2.2em; }
.hero .sub { display: none; }

/* ---------- 2. Обращение ---------- */
.address { padding: 40px 0 var(--gap); }
.lead { font-weight: 400; font-size: clamp(1.6rem, 5.8vw, 2.15rem); line-height: 1.32; margin-bottom: 1.6em; text-wrap: balance; }

/* ---------- Разделители-цитаты ---------- */
.divider { position: relative; z-index: 1; padding: 30px var(--pad); text-align: center; }
.divider q {
  display: block; max-width: 600px; margin: 0 auto; quotes: none; text-wrap: balance;
  font-style: italic; font-weight: 400; font-size: clamp(1.55rem, 5.8vw, 2.2rem); line-height: 1.32; color: var(--gold-2);
  opacity: 0; transform: translateY(16px); transition: opacity 2.4s var(--ease), transform 2.4s var(--ease);
}
.divider::before, .divider::after { content: ""; display: block; width: 1px; height: 72px; margin: 0 auto 34px; background: linear-gradient(180deg, transparent, var(--line)); }
.divider::after { margin: 34px auto 0; background: linear-gradient(180deg, var(--line), transparent); }
.divider.in q { opacity: 1; transform: none; }
.divider:empty { display: none; }

/* ---------- Фоновые цитаты: крупно и полупрозрачно ----------
   Цитата стоит в собственной свободной полосе над содержимым блока,
   поэтому не ложится под текст и фото и всегда помещается в ширину экрана. */
.fog {
  position: relative; z-index: 0; margin: 0 auto 72px; padding: 0;
  width: 86vw; max-width: 1100px; text-align: center; text-wrap: balance; overflow-wrap: break-word;
  font-style: italic; font-weight: 400; font-size: clamp(2.1rem, 8.4vw, 6.2rem); line-height: 1.06; letter-spacing: -.008em;
  color: var(--fog); filter: blur(.5px);
  pointer-events: none; user-select: none;
  opacity: 0; transition: opacity 3.6s var(--ease);
}
.fog.in { opacity: 1; }
.fog:empty { display: none; }
/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 2s var(--ease), transform 2s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 3. Книга, 5. Автор ---------- */
.two { display: grid; gap: 64px; align-items: center; }
.two .pic { width: min(64vw, 300px); margin: 0 auto; }
.buy { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin: 2.4em 0 1.1em; }
.price { margin: 0; font-weight: 400; font-size: 2.6rem; line-height: 1; display: flex; flex-direction: column; gap: 10px; }
.price small { font: 500 .62rem var(--sans); color: var(--muted); letter-spacing: .3em; text-transform: uppercase; }
.price span:empty { display: none; }
.buy .btn { flex: 1 1 190px; }
.alt { font-size: 1.02rem; font-style: italic; margin-bottom: .6em; }
.alt a { color: var(--muted); border-bottom: 1px solid rgba(143, 156, 171, .3); padding-bottom: 2px; }
.alt a:hover { color: var(--gold-2); border-color: var(--gold); }
.soon { font: 500 .64rem var(--sans); color: var(--muted); letter-spacing: .3em; text-transform: uppercase; margin: 2.6em 0 0; }
.soon::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin-right: 14px; vertical-align: middle; box-shadow: 0 0 12px 2px rgba(220, 181, 122, .7); }
.author .pic { width: min(62vw, 290px); position: relative; }
.author .pic::before { content: ""; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(closest-side, rgba(226, 160, 85, .28), transparent 72%); }
.photo { position: relative; border-radius: 50%; box-shadow: 0 0 0 1px rgba(220, 181, 122, .35), 0 0 0 9px rgba(220, 181, 122, .05); }

/* ---------- 4. Трактат: остров света ---------- */
.island {
  position: relative; display: grid; gap: 44px; align-items: center;
  padding: 56px 28px 60px; border-radius: 3px;
  background: radial-gradient(130% 90% at 28% 0%, #fffaf0, var(--cream) 46%, #ecdcbc);
  color: var(--ink);
  box-shadow: 0 0 160px -30px rgba(240, 200, 130, .5), 0 0 60px -30px rgba(240, 200, 130, .5);
}
.island::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(168, 120, 44, .28); pointer-events: none; }
.island .pic { width: min(56vw, 250px); margin: 0 auto; }
.island .cover { box-shadow: 0 34px 60px -30px rgba(60, 40, 10, .6), 0 0 0 1px rgba(17, 26, 48, .08); }
.island .label { color: #9a6d27; }
.island h2 { color: var(--ink); }
.island .actions { margin: 2.2em 0 1.4em; }
.island .alt a { color: #5c6680; border-color: rgba(17, 26, 48, .22); }
.island .alt a:hover { color: var(--ink); border-color: var(--ink); }
.license { font: 400 .74rem/1.6 var(--sans); color: #6d7488; letter-spacing: .04em; margin: 1.6em 0 0; }

/* ---------- 6. Отзывы ---------- */
.reviews-list { display: grid; gap: 56px; }
.review { margin: 0; text-align: center; }
.review p { font-style: italic; font-size: 1.5rem; line-height: 1.4; }
.review cite { font: 500 .66rem var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* ---------- 7. Вопросы ---------- */
.faq h2, .support h2 { margin-bottom: 1.2em; }
.faq-list details { border-bottom: 1px solid var(--hair); }
.faq-list details:first-child { border-top: 1px solid var(--hair); }
.faq-list summary { list-style: none; cursor: pointer; position: relative; padding: 26px 44px 26px 0; font-size: 1.42rem; font-weight: 400; line-height: 1.3; transition: color .6s var(--ease); }
.faq-list summary:hover { color: var(--gold-2); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 15px; height: 1px; background: var(--gold); transition: transform .8s var(--ease), opacity .8s var(--ease); }
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0); opacity: 0; }
.faq-list details p { color: var(--soft); padding: 0 34px 28px 0; margin: 0; animation: fadein 1.1s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 8. Поддержать ---------- */
.support .actions { margin: 2.6em 0 4em; }
.wallets .label { margin-bottom: 1.2em; }
.wallet { padding: 24px 0; border-top: 1px solid var(--hair); }
.wallet:last-child { border-bottom: 1px solid var(--hair); }
.wallet b { display: block; font: 500 .64rem var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.wallet code { display: block; font: .8rem/1.6 ui-monospace, Consolas, monospace; color: var(--text); word-break: break-all; margin-bottom: 14px; }
.wallet button { background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--gold-2); padding: 6px 0; font: 500 .64rem var(--sans); letter-spacing: .28em; text-transform: uppercase; cursor: pointer; min-height: 36px; transition: color .6s var(--ease), border-color .6s var(--ease); }
.wallet button:hover { color: #fff; border-color: var(--gold-2); }
.wallet button.ok { color: #bfe3c6; border-color: #8fc79b; }

/* ---------- 9. Финал: ангел ---------- */
.angel { padding: 0; height: 285vh; overflow: visible; }
.angel-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5svh;
  padding: 76px var(--pad) 34px;
}
.angel-sky { position: absolute; inset: 0; opacity: 0; display: none; pointer-events: none; will-change: opacity; }
.angel-glow {
  position: absolute; left: 50%; top: 40%; width: 160vmin; height: 160vmin; margin: -80vmin 0 0 -80vmin;
  opacity: 0; will-change: opacity, transform; pointer-events: none;
  background: radial-gradient(closest-side, rgba(246, 204, 136, .46), rgba(217, 143, 69, .15) 44%, transparent 72%);
}
.angel-stage { position: relative; width: min(76vw, 46svh, 450px); aspect-ratio: 1; flex: none; }
.layer { position: absolute; height: auto; max-width: none; opacity: 0; will-change: transform, opacity; transition: filter 1.6s var(--ease); }
.l1 { left: 16.21%; top: 75%;    width: 33.79%; }
.l2 { left: 36.43%; top: 42.87%; width: 52.05%; }
.l3 { left: 12.7%;  top: .88%;   width: 58.89%; }
.angel-words { position: relative; width: 100%; max-width: 620px; min-height: 8.4em; text-align: center; flex: none; }
.angel-words p { position: absolute; left: 0; right: 0; top: 0; margin: 0; opacity: 0; will-change: opacity, transform; text-wrap: balance; transition: color 1.6s var(--ease); }
.step { font-style: italic; font-weight: 400; font-size: clamp(1.4rem, 5.2vw, 1.85rem); line-height: 1.36; }
.wish { font-weight: 400; font-size: clamp(1.55rem, 5.8vw, 2.35rem); line-height: 1.3; color: var(--gold-2); }

/* без анимаций: готовый логотип и пожелание */
.still .angel { height: auto; }
.still .angel-pin { position: relative; height: auto; padding: 120px var(--pad); }
.still .layer, .still .angel-glow, .still .angel-sky { opacity: 1; transform: none; }
.still .step { display: none; }
.still .angel-words { min-height: 0; }
.still .angel-words .wish { position: static; opacity: 1; }

/* ---------- 10. Подвал ---------- */
.foot { position: relative; padding: 110px 0 44px; border-top: 1px solid var(--hair); overflow: hidden; }
.foot .fog { margin-bottom: 90px; }
.foot-grid { display: grid; gap: 54px; }
.foot .label { margin-bottom: 1.3em; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 2px; }
.foot a { color: var(--soft); display: inline-block; padding: 5px 0; font-size: 1.12rem; }
.foot a:hover { color: var(--gold-2); }
.copy { text-align: center; color: var(--muted); font: 500 .62rem var(--sans); letter-spacing: .3em; text-transform: uppercase; margin: 80px 0 0; position: relative; z-index: 1; }

/* ---------- Окна ---------- */
.dlg {
  width: min(92vw, 620px); max-height: 88svh; padding: 48px 28px 36px;
  border: 1px solid var(--line); border-radius: 3px;
  background: linear-gradient(180deg, #121d2b, #0b131e); color: var(--text);
  box-shadow: 0 0 180px -30px rgba(240, 190, 120, .4), 0 50px 120px -40px #000;
  overscroll-behavior: contain;
}
.dlg.small { width: min(92vw, 460px); text-align: center; }
.dlg::backdrop { background: rgba(4, 7, 12, .8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: veil 1s var(--ease); }
.dlg[open] { animation: rise 1.1s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes veil { from { opacity: 0; } to { opacity: 1; } }
.dlg h2 { font-size: 2.1rem; margin-bottom: .9em; padding-right: 40px; }
.dlg.small h2 { padding: 0; }
.dlg .x { position: absolute; right: 8px; top: 6px; width: 52px; height: 52px; background: none; border: 0; color: var(--muted); font: 300 1.7rem/1 var(--sans); cursor: pointer; transition: color .6s var(--ease); }
.dlg .x:hover { color: var(--gold-2); }
.video { aspect-ratio: 16 / 9; display: grid; place-items: center; margin-bottom: 34px; border: 1px solid var(--hair); background: radial-gradient(closest-side, rgba(232, 190, 124, .07), transparent); color: var(--muted); font: 500 .64rem var(--sans); letter-spacing: .26em; text-transform: uppercase; overflow: hidden; }
.video p { margin: 0; padding: 0 20px; text-align: center; line-height: 1.8; }
.video video { width: 100%; height: 100%; object-fit: cover; }
.video.has { border: 0; background: #000; }
.letter { font-size: 1.36rem; line-height: 1.5; }
.sign { font-style: italic; font-weight: 400; font-size: 1.6rem; color: var(--gold-2); margin: 1.2em 0 1.6em; }
.dlg .prose { margin-bottom: 2em; }

/* ---------- Страницы документов ---------- */
.doc { max-width: 680px; margin: 0 auto; padding: 150px var(--pad) 110px; }
.doc h1 { font-size: clamp(2.2rem, 7.4vw, 3.2rem); }
.doc .back { display: inline-block; margin-top: 2.4em; font: 500 .68rem var(--sans); letter-spacing: .26em; text-transform: uppercase; }

/* ---------- Широкие экраны ---------- */
@media (min-width: 820px) {
  :root { --pad: 48px; --gap: 190px; }
  body { font-size: 1.36rem; }
  .actions { flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .actions.center { justify-content: center; }
  .actions.center .btn { width: auto; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; text-align: left; justify-items: start; gap: 80px; align-items: center; }
  .hero-cover { order: 2; width: min(30vw, 370px); justify-self: center; }
  .two { grid-template-columns: .78fr 1.22fr; gap: 100px; }
  .two.flip { grid-template-columns: 1.22fr .78fr; }
  .two.flip .pic { order: 2; }
  .two .pic { width: 100%; max-width: 360px; }
  .author .pic { max-width: 320px; }
  .island { grid-template-columns: .68fr 1.32fr; gap: 76px; padding: 90px 84px; }
  .island::after { inset: 16px; }
  .island .pic { width: 100%; max-width: 290px; }
  .divider { padding: 40px var(--pad); }
  .divider::before, .divider::after { height: 110px; }
  .foot-grid { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
  .fog { text-align: left; margin-bottom: 110px; }
  .fog.right { text-align: right; }
  .dlg { padding: 64px 64px 48px; }
  .wallet { display: grid; grid-template-columns: 1fr auto; column-gap: 28px; align-items: center; }
  .wallet b { grid-column: 1 / -1; }
  .wallet code { margin: 0; font-size: .86rem; }
}

/* ---------- Если в системе выключены анимации ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .fog, .divider q { opacity: 1; transform: none; }
}

/* ---------- Что получает покупатель, согласие, продавец, cookies ---------- */
.get { font-size: 1.06rem; line-height: 1.5; color: var(--soft); margin: 0 0 .7em; }
.consent { font: 400 .74rem/1.65 var(--sans); letter-spacing: .02em; color: var(--muted); margin: 0 0 1.4em; }
.consent a { color: inherit; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.consent a:hover { color: var(--gold-2); }
.seller p { margin: 0 0 4px; font-size: 1.12rem; }
.seller-contacts { margin-top: 14px; }
.cookie {
  position: fixed; z-index: 30; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0 auto; max-width: 620px;
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(11, 17, 28, .93); color: #ece6d9; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 90px -30px rgba(240, 190, 120, .5), 0 30px 70px -30px rgba(0, 0, 0, .8);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.cookie.wait { opacity: 0; transform: translateY(14px); pointer-events: none; }
.cookie[hidden] { display: none; }
.cookie.bye { opacity: 0; transform: translateY(14px); }
.cookie p { margin: 0; font: 400 .76rem/1.55 var(--sans); }
.cookie a { border-bottom: 1px solid var(--line); }
.cookie .btn { min-height: 40px; padding: 8px 22px; align-self: flex-start; }
@media (min-width: 820px) { .cookie { flex-direction: row; align-items: center; } .cookie .btn { align-self: center; flex: none; } }
/* ---------- Обложка как настоящая книга: лёгкий наклон, корешок, блик, срез страниц, мягкая тень ---------- */
.bk { position: relative; z-index: 1; perspective: 1500px; will-change: transform; }
.bk::after { content: ""; position: absolute; z-index: -1; left: 6%; right: -4%; bottom: -8%; height: 14%; background: radial-gradient(closest-side, rgba(3, 6, 16, .6), rgba(3, 6, 16, .22) 55%, transparent); filter: blur(12px); pointer-events: none; }
.bk-in {
  position: relative; transform: rotateY(-9deg) rotateX(1.2deg); transform-style: preserve-3d; border-radius: 2px 4px 4px 2px;
  transition: transform 1.5s var(--ease), box-shadow 1.5s var(--ease);
  box-shadow: 0 1px 2px rgba(4, 8, 20, .3), 0 8px 14px -4px rgba(4, 8, 20, .3), 0 26px 40px -14px rgba(4, 8, 20, .45), 14px 54px 80px -30px rgba(4, 8, 20, .62);
}
.bk-in picture { display: block; border-radius: inherit; overflow: hidden; }
html .bk .bk-in .cover { display: block; width: 100%; height: auto; border-radius: 0; box-shadow: none; will-change: auto; }
/* корешок, сгиб и тонкий блик */
.bk-in::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .32) 0, rgba(255, 255, 255, .18) 1.1%, rgba(0, 0, 0, .13) 2.6%, rgba(255, 255, 255, .09) 4.3%, transparent 7.5%),
    linear-gradient(104deg, transparent 36%, rgba(255, 255, 255, .1) 46%, rgba(255, 255, 255, .03) 54%, transparent 63%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .14);
}
/* срез страниц справа */
.bk-in::after {
  content: ""; position: absolute; top: .7%; bottom: .7%; right: 0; width: 15px; transform-origin: 100% 50%; transform: rotateY(-90deg);
  background: repeating-linear-gradient(90deg, #f4ecdb 0 1px, #d8cdb6 1px 2px); box-shadow: inset 0 0 6px rgba(60, 40, 10, .35);
}
@media (hover: hover) and (pointer: fine) {
  .bk:hover .bk-in { transform: rotateY(-4deg) rotateX(0deg) translateY(-10px) translateZ(18px); box-shadow: 0 1px 2px rgba(4, 8, 20, .3), 0 12px 20px -6px rgba(4, 8, 20, .3), 0 38px 54px -18px rgba(4, 8, 20, .45), 18px 76px 100px -34px rgba(4, 8, 20, .6); }
}
@media (max-width: 899px) { .bk-in { transform: rotateY(-6deg) rotateX(1deg); } .bk-in::after { width: 11px; } }
@media (prefers-reduced-motion: reduce) { .bk-in { transition: none; } }
.price-more { margin: -.2em 0 1.3em; font: 500 .74rem var(--sans); letter-spacing: .14em; color: var(--muted); }
.price-more:empty { display: none; }

/* ---------- Кнопки: одна рамка у всех ---------- */
.btn, .v2 .btn.dark, .v2 .btn.dark-ghost { border-color: rgba(226, 187, 122, .6); }
/* ---------- Карточки «где купить» ---------- */
/* окно «Где купить книгу» */
.dlg.sheet { width: min(92vw, 540px); padding: 52px 26px 30px; }
.dlg.sheet h2 { margin-bottom: .8em; }
.opts { list-style: none; margin: 0 0 1.5em; padding: 0; border-top: 1px solid var(--hair); }
.opt { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 72px; padding: 14px 8px; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background .5s var(--ease); }
.opt:hover, .opt:focus-visible { background: rgba(232, 190, 124, .08); }
.opt:focus-visible { outline: 1px solid var(--gold); outline-offset: -1px; }
.opt-ic { flex: none; width: 26px; height: 26px; background: var(--gold); -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.opt-ic.letter { display: grid; place-items: center; background: none; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: 500 .8rem/1 var(--sans); }
.opt-tx { flex: 1; min-width: 0; display: grid; gap: 4px; }
.opt-tx b { font-weight: 500; font-size: 1.3rem; line-height: 1.2; }
.opt-tx small { font: 400 .78rem/1.5 var(--sans); color: var(--soft); }
.opt-soon { margin-left: 12px; font: 500 .56rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.opt-ar { flex: none; color: var(--gold); font: 400 1rem/1 var(--sans); transition: transform .5s var(--ease); }
.opt:hover .opt-ar, .opt:focus-visible .opt-ar { transform: translateX(4px); }
.dlg.sheet .gift { margin: 0; }
@media (min-width: 820px) { .dlg.sheet { padding: 56px 44px 38px; } }
@media (max-width: 640px) {
  /* на телефоне окно выезжает снизу на весь экран */
  .dlg.sheet { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: 68px 20px 32px; }
  .dlg.sheet[open] { animation: sheet .7s var(--ease); }
  .dlg.sheet .x { top: 10px; right: 6px; }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
.gift { margin: 0 0 1.4em; font: 400 .8rem/1.65 var(--sans); color: var(--soft); }
.gift:empty { display: none; }
