/* Fairydery — лендинг.
   Сумеречная библиотека на тёплом пергаменте: тёмное закатное небо живёт
   только в герое, весь контент — кремовая «бумага» с белыми карточками.
   Цвет — пастельная пунктуация (фиолетовый, розовый, мандариновый, бирюза),
   а не фирменная заливка. Серифы — только от 28px и выше, весом 400. */

:root {
  /* палитра */
  --ink: #1d1d1c;             /* основной текст и структурные обводки */
  --parchment: #f8f7f2;       /* канва страницы */
  --linen: #edeae4;           /* вторая ступень поверхности */
  --paper: #ffffff;           /* карточки и поля */
  --charcoal: #43423e;        /* вторичный текст */
  --ash: #99978f;             /* приглушённый текст */
  --slate: #7a7974;
  --sand: #d8d6ce;            /* волосяные обводки */
  --violet: #b26bf5;
  --violet-deep: #8200db;
  --violet-pale: #dab2ff;
  --lilac: #f3e8ff;
  --twilight: #190922;        /* основание закатного неба */
  --pink: #f788d2;
  --tangerine: #ff9147;
  --teal: #4ad5e8;
  --sky-blue: #51b1fb;
  --sun: #ffe747;
  --mint: #58df8c;
  --coral: #ee5968;
  --on-ink: #ffffff;           /* текст на тёмной кнопке */
  --ring: rgb(237, 234, 228);  /* волосяная обводка карточек */
  --parchment-0: rgba(248, 247, 242, 0);
  --parchment-55: rgba(248, 247, 242, 0.55);
  color-scheme: light;

  /* тени тёплые, слоистые — свет на бумаге, не серый смог */
  --shadow-card: rgb(237, 234, 228) 0px 0px 0px 1px,
    oklch(0.23 0.002 98 / 0.04) 0px 1px 1px -0.5px,
    oklch(0.23 0.002 98 / 0.04) 0px 3px 3px -1.5px,
    oklch(0.23 0.002 98 / 0.04) 0px 6px 6px -3px,
    oklch(0.23 0.002 98 / 0.02) 0px 12px 12px -6px;
  --shadow-hero-btn: oklch(0.876 0.011 98) 0px 0px 0px 1px,
    oklch(0.23 0.002 98 / 0.04) 0px 1px 1px -0.5px,
    oklch(0.23 0.002 98 / 0.04) 0px 3px 3px -1.5px,
    oklch(0.23 0.002 98 / 0.04) 0px 6px 6px -3px,
    oklch(0.23 0.002 98 / 0.02) 0px 12px 12px -6px,
    oklch(0.23 0.002 98 / 0.02) 0px 24px 24px -12px;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --maxw: 680px;
  --serif: "DM Serif Display", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Тёмная тема — по теме телефона: ночной индиго вместо пергамента. Небо героя
   одинаково в обеих темах; пастельные ярлыки и обложки остаются пастельными,
   текст на них — всегда тёмный. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2eefb;
    --on-ink: #16122a;
    --parchment: #0f0c1d;
    --linen: #17132b;
    --paper: #1d1834;
    --charcoal: #cbc4de;
    --ash: #8f88a6;
    --slate: #a39cb8;
    --sand: #352e52;
    --violet: #c79bff;
    --violet-deep: #b388ff;
    --violet-pale: #4d3877;
    --lilac: #261d42;
    --ring: #2a2447;
    --parchment-0: rgba(15, 12, 29, 0);
    --parchment-55: rgba(15, 12, 29, 0.55);
    --shadow-card: 0 0 0 1px #2a2447, 0 8px 22px -10px rgba(0, 0, 0, 0.55);
    --shadow-hero-btn: 0 0 0 1px #2a2447, 0 12px 28px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f2eefb;
  --on-ink: #16122a;
  --parchment: #0f0c1d;
  --linen: #17132b;
  --paper: #1d1834;
  --charcoal: #cbc4de;
  --ash: #8f88a6;
  --slate: #a39cb8;
  --sand: #352e52;
  --violet: #c79bff;
  --violet-deep: #b388ff;
  --violet-pale: #4d3877;
  --lilac: #261d42;
  --ring: #2a2447;
  --parchment-0: rgba(15, 12, 29, 0);
  --parchment-55: rgba(15, 12, 29, 0.55);
  --shadow-card: 0 0 0 1px #2a2447, 0 8px 22px -10px rgba(0, 0, 0, 0.55);
  --shadow-hero-btn: 0 0 0 1px #2a2447, 0 12px 28px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Полосы-подложки секций тянутся за края экрана — сам документ скроллиться
   вбок от этого не должен. clip, а не hidden: не ломает position: sticky. */
html, body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--sans);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

/* ── шапка ── */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 40px);
}
.brand {
  font: 400 22px/1 var(--serif);
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.005em;
}
.top-right { display: flex; align-items: center; gap: 14px; }
.signin {
  font: 700 13px/1 var(--sans);
  color: rgba(248, 247, 242, 0.8);
  text-decoration: none;
  padding: 8px 0;
}
.signin:hover { color: #fff; }

/* Компактный переключатель языков: одна пилюля, раскрывается списком. */
.lang-dd { position: relative; }
.lang-dd summary {
  list-style: none;
  cursor: pointer;
  font: 700 11.5px/1 var(--sans);
  letter-spacing: 0.1em;
  color: var(--twilight);
  background: var(--paper);
  border-radius: 999px;
  padding: 9px 12px;
  user-select: none;
}
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary::after { content: " ▾"; letter-spacing: 0; }
.lang-dd nav {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  min-width: 64px;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 6px;
  z-index: 10;
}
.lang-dd nav a {
  font: 700 11.5px/1 var(--sans);
  letter-spacing: 0.1em;
  color: var(--charcoal);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
}
.lang-dd nav a:hover { background: var(--lilac); color: var(--ink); }
a:focus-visible, .cta:focus-visible, summary:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

/* ── герой: закатное небо ── */
.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg,
    var(--twilight) 0%, #24093b 34%, #451456 56%,
    #7c2a68 74%, #b64f63 88%, #e08a63 100%);
  padding: 110px 20px 190px;
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene { position: absolute; inset: 0; pointer-events: none; }
.moon {
  position: absolute;
  top: 12%;
  right: 13%;
  width: clamp(44px, 6vw, 76px);
  filter: drop-shadow(0 0 30px rgba(240, 228, 250, 0.4));
}
/* дальние облака — тёмные силуэты с тёплой подсветкой */
.clouds-far {
  position: absolute;
  left: 0; right: 0; bottom: 74px;
  width: 100%;
  height: clamp(90px, 16vh, 150px);
  opacity: 0.9;
}
/* кремовый облачный берег: контент «выплывает» из неба на бумагу */
.clouds-near {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(90px, 15vh, 140px);
}
.mascot {
  position: absolute;
  bottom: clamp(24px, 5vh, 52px);
  right: clamp(4%, 8vw, 12%);
  width: clamp(84px, 11vw, 128px);
  transform: rotate(-6deg);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  text-align: center;
}
h1 {
  font: 400 clamp(38px, 6.4vw, 64px)/1.16 var(--serif);
  letter-spacing: -0.023em;
  color: #fff;
  margin: 0 0 18px;
  text-wrap: balance;
}
.sub {
  color: rgba(248, 247, 242, 0.82);
  font-size: clamp(16.5px, 2.2vw, 18.5px);
  max-width: 54ch;
  margin: 0 auto 30px;
  text-wrap: pretty;
}

/* Главная кнопка на небе — белая бумага с чернильным текстом. */
.cta {
  display: inline-block;
  font: 600 17px/1 var(--sans);
  letter-spacing: -0.011em;
  color: var(--ink);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 17px 30px;
  text-decoration: none;
  box-shadow: var(--shadow-hero-btn);
  transition: transform 0.14s ease, box-shadow 0.2s ease;
}
.cta:hover { transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.micro { color: rgba(248, 247, 242, 0.72); font-size: 14.5px; margin: 18px auto 0; max-width: 46ch; }
.footnote { color: rgba(248, 247, 242, 0.5); font-size: 13px; margin: 6px 0 0; }

/* В контенте главная кнопка — чернильная. */
.cta.second {
  margin-top: 26px;
  color: var(--on-ink);
  background: var(--ink);
  box-shadow: var(--shadow-card);
}

/* ── секции ── */
main { position: relative; z-index: 2; }
.block {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 80px) 22px;
}
/* Льняные полосы — настоящие блоки на всю ширину: псевдоэлемент в -100vw
   ломал растеризацию тайлов при глубокой прокрутке. */
.band { background: var(--linen); }
h2 {
  font: 400 clamp(28px, 4.2vw, 40px)/1.22 var(--serif);
  letter-spacing: -0.013em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.lead { color: var(--charcoal); margin: 0 0 26px; }
.block p { color: var(--charcoal); max-width: 62ch; }
.block p + p { margin-top: 14px; }

/* шаги — белые карточки с цветными номерами */
.steps {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px 18px 18px;
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  color: #1d1d1c;
  font: 700 15px/1 var(--sans);
  margin-bottom: 12px;
}
.step:nth-child(3n + 1) .step-n { background: #dab2ff; }
.step:nth-child(3n + 2) .step-n { background: var(--tangerine); }
.step:nth-child(3n + 3) .step-n { background: var(--teal); }
.step h3 { margin: 0 0 6px; font: 700 16.5px/1.35 var(--sans); color: var(--ink); }
.step p { margin: 0; color: var(--charcoal); font-size: 15px; }

/* библиотека — пастельные фишки-ярлыки */
.library { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.lib {
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #1d1d1c;
}
.lib b { font-weight: 800; margin-right: 5px; }
.lib:nth-child(4n + 1) { background: #f3e8ff; box-shadow: inset 0 0 0 1px #dab2ff; }
.lib:nth-child(4n + 2) { background: #ffe3f4; box-shadow: inset 0 0 0 1px #f9b8e2; }
.lib:nth-child(4n + 3) { background: #ffe9d8; box-shadow: inset 0 0 0 1px #ffc79a; }
.lib:nth-child(4n + 4) { background: #dcf7fb; box-shadow: inset 0 0 0 1px #a4e7f2; }

.note { color: var(--slate); font-size: 14.5px; }

/* faq — одна белая карточка со списком */
#faq .faq-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 6px 20px;
  margin-top: 22px;
}
#faq details { border-bottom: 1px solid var(--linen); }
#faq details:last-child { border-bottom: 0; }
#faq summary {
  cursor: pointer;
  font: 700 16px/1.4 var(--sans);
  color: var(--ink);
  padding: 15px 28px 15px 0;
  list-style: none;
  position: relative;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+";
  position: absolute;
  right: 2px; top: 50%;
  transform: translateY(-50%);
  color: var(--violet-deep);
  font: 400 22px/1 var(--serif);
  transition: transform 0.15s ease;
}
#faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
#faq details p { margin: 0 0 16px; }

/* ── подвал ── */
.foot {
  border-top: 1px solid var(--sand);
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 34px 22px 60px;
  color: var(--charcoal);
  font-size: 15px;
}
.foot .fine { color: var(--ash); font-size: 13.5px; margin-top: 10px; }
.foot a { color: var(--charcoal); }

/* ── полка обложек ── */
.shelf-block { max-width: 920px; }
.shelf {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (min-width: 560px) { .shelf { grid-template-columns: repeat(4, 1fr); } }
.shelf-card a { display: block; text-decoration: none; color: inherit; }
.shelf-cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; box-shadow: var(--shadow-card);
  transition: transform 0.18s ease;
}
.shelf-card a:hover .shelf-cover { transform: translateY(-3px); }
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shelf-letter { font: 400 54px/1 var(--serif); color: rgba(29, 29, 28, 0.8); }
.shelf-star { position: absolute; top: 10px; left: 12px; font-size: 12px; color: rgba(29, 29, 28, 0.35); }
.pal-0 { background: linear-gradient(160deg, #f3e8ff, #d3b4f8); }
.pal-1 { background: linear-gradient(160deg, #ffe3f4, #f6b1de); }
.pal-2 { background: linear-gradient(160deg, #ffe9d8, #ffc08e); }
.pal-3 { background: linear-gradient(160deg, #dcf7fb, #96e2ef); }
.pal-4 { background: linear-gradient(160deg, #e2f8e6, #a3e5b5); }
.pal-5 { background: linear-gradient(160deg, #fff3c4, #ffdf7e); }
.shelf-title { margin: 10px 4px 2px; font: 700 15px/1.3 var(--sans); color: var(--ink); }
.shelf-sub { margin: 0 4px; font-size: 12.5px; color: var(--ash); }

/* ══ v2: короче, крупнее, с картинками ══ */
.hero { min-height: 92svh; padding: 104px 20px 200px; }
.hero-inner { max-width: 760px; }
h1 { font-size: clamp(40px, 7vw, 68px); }
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta.ghost {
  background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
  cursor: pointer; font-family: var(--sans);
}
.cta.ghost:hover { background: rgba(255, 255, 255, 0.16); }
.micro { margin-top: 16px; }

/* Плавающие карточки продукта под заголовком: бумага на небе. */
.float {
  position: relative; height: 150px; max-width: 520px; margin: 34px auto 0;
}
.fcard {
  position: absolute; background: var(--paper); color: var(--ink); border-radius: 12px;
  box-shadow: var(--ring) 0 0 0 1px, 0 12px 30px -10px rgba(20, 5, 30, 0.55);
  font: 600 13px/1.3 var(--sans); letter-spacing: -0.01em;
}
.fc-play {
  left: 50%; top: 0; transform: translateX(-50%) rotate(-1.5deg);
  width: min(330px, 86vw); padding: 10px 12px; display: flex; align-items: center; gap: 12px;
}
.fc-cover { width: 44px; height: 58px; border-radius: 6px; overflow: hidden; flex: none; background: linear-gradient(160deg, #ffe9d8, #ffc08e); }
.fc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-meta { flex: 1; display: grid; gap: 8px; }
.fc-meta b { font-size: 14px; }
.fc-bar { display: block; height: 5px; border-radius: 999px; background: var(--linen); overflow: hidden; }
.fc-bar i { display: block; width: 38%; height: 100%; background: linear-gradient(90deg, var(--violet), #ffb27a); }
.fc-btn { width: 36px; height: 36px; border-radius: 999px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-size: 14px; flex: none; }
.fc-rec {
  left: max(0px, calc(50% - 250px)); top: 86px; transform: rotate(2.5deg);
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
}
.fc-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--coral); box-shadow: 0 0 0 4px rgba(238, 89, 104, 0.2); }
.fc-wave { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.fc-wave i { display: block; width: 3px; border-radius: 2px; background: var(--violet); height: 40%; animation: wave 1.1s ease-in-out infinite; }
.fc-wave i:nth-child(2n) { height: 90%; animation-delay: .15s; }
.fc-wave i:nth-child(3n) { height: 60%; animation-delay: .3s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .fc-wave i { animation: none; } }
.fc-toast {
  right: max(0px, calc(50% - 250px)); top: 96px; transform: rotate(-2deg);
  padding: 10px 14px; background: var(--lilac); box-shadow: var(--violet-pale) 0 0 0 1px, 0 12px 30px -10px rgba(20, 5, 30, 0.45);
  color: var(--violet-deep);
}
@media (max-width: 420px) { .fc-rec { left: 0; } .fc-toast { right: 0; } }
.mascot { width: clamp(96px, 13vw, 150px); }

/* Секции: короткие, широкие сетки */
.block.wide { max-width: 920px; }
.block.center { text-align: center; }
.block.center .lead { margin-left: auto; margin-right: auto; }

/* Отзывы купивших книгу: белые карточки на пергаменте, слова серифом. */
.quotes h2 { margin-bottom: 26px; }
.quotes-list { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); text-align: left; }
.quotes-list.n1 { max-width: 560px; }
.quotes-list.n2 { max-width: 760px; }
.quote { background: var(--paper); border-radius: 16px; padding: 24px 24px 20px; box-shadow: var(--shadow-card); }
.quote blockquote { margin: 0 0 14px; font: 400 21px/1.4 "DM Serif Display", Georgia, serif; color: var(--ink); }
.block .quote .quote-by { margin: 0; font-size: 14.5px; color: var(--slate); max-width: none; }
.quote-by b { color: var(--charcoal); font-weight: 700; }
.steps { grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 719px) { .steps { grid-template-columns: 1fr; } }
.step p { font-size: 14.5px; }

/* «Для кого» — иллюстрация + одна строка */
.who { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .who { grid-template-columns: repeat(3, 1fr); } }
.who-card { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden; }
.who-art { aspect-ratio: 4 / 3; overflow: hidden; }
.who-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.who-card h3 { margin: 14px 16px 4px; font: 700 16.5px/1.3 var(--sans); }
.who-card p { margin: 0 16px 16px; font-size: 14.5px; color: var(--charcoal); }

/* Доверие — плитки */
.tiles { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--paper); border-radius: 12px; box-shadow: var(--shadow-card); padding: 18px 18px 16px; }
.tile h3 { margin: 0 0 6px; font: 700 16px/1.3 var(--sans); }
.tile p { margin: 0; font-size: 14.5px; color: var(--charcoal); }
.made { margin-top: 18px; font-size: 13.5px; color: var(--ash); }

/* Полка без длительности — только название */
.shelf-title { margin-bottom: 0; }

/* ══ v3: эффектное небо, без облаков и маскота ══ */
.hero {
  min-height: 94svh; padding: 112px 20px 150px;
  background: linear-gradient(180deg, #0e0519 0%, #1b0830 26%, #37114f 50%, #6a2463 70%, #a4455f 86%, #cf7a5c 100%);
}
/* зерно плёнки: убирает «цифровую» гладкость градиента */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .16; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* небо растворяется в бумаге — без вырезанного облачного края */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 30%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, var(--parchment-0) 0%, var(--parchment-55) 55%, var(--parchment) 100%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.g1 { width: 62vw; height: 62vw; max-width: 760px; max-height: 760px; left: -18vw; top: -22vw; background: rgba(130, 60, 220, .38); }
.g2 { width: 48vw; height: 48vw; max-width: 620px; max-height: 620px; right: -14vw; top: 18%; background: rgba(230, 100, 160, .30); }
.g3 { width: 90vw; height: 34vw; max-height: 380px; left: 5vw; bottom: 6%; background: rgba(255, 150, 90, .32); }
.moon { top: 11%; right: 12%; width: clamp(48px, 6.4vw, 84px); filter: none; }
.moon-halo {
  position: absolute; top: 11%; right: 12%; width: clamp(48px, 6.4vw, 84px); aspect-ratio: 1; border-radius: 50%;
  transform: translate(8%, -6%) scale(3.4);
  background: radial-gradient(circle, rgba(246,239,255,.28) 0%, rgba(246,239,255,.08) 38%, rgba(246,239,255,0) 70%);
}
.hills { position: absolute; left: -2%; right: -2%; bottom: 0; width: 104%; height: clamp(150px, 30vh, 300px); }
.clouds-far, .clouds-near, .mascot { display: none; }
#stars { z-index: 0; }

/* ── шапка: «Мои сказки» — кнопка, язык — тихий ── */
.top { padding: 16px clamp(16px, 4vw, 40px); }
.top-right { gap: 8px; }
.signin {
  font: 700 14px/1 var(--sans); color: #fff; padding: 11px 16px; border-radius: 999px;
  background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
  backdrop-filter: blur(6px); transition: background .15s;
}
.signin:hover { background: rgba(255,255,255,.18); }
.lang-dd summary {
  color: rgba(255,255,255,.72); background: transparent; padding: 11px 10px; font-size: 12px;
  transition: color .15s;
}
.lang-dd summary:hover, .lang-dd[open] summary { color: #fff; }

/* ── плавающие карточки: веер настоящих обложек над плеером ── */
.float { height: 292px; max-width: 560px; margin-top: 30px; }
.deck { position: absolute; left: 50%; top: 0; width: 244px; height: 140px; transform: translateX(-50%); }
.deck img {
  position: absolute; top: 12px; width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 9px;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 18px 40px -14px rgba(10, 2, 20, .75), 0 2px 6px rgba(10,2,20,.35);
  animation: drift 7s ease-in-out infinite;
}
.deck img:nth-child(1) { left: 0; transform: rotate(-11deg); animation-delay: -1s; }
.deck img:nth-child(2) { left: 74px; top: 0; z-index: 2; transform: rotate(0deg); animation-delay: -3.5s; }
.deck img:nth-child(3) { right: 0; transform: rotate(11deg); animation-delay: -5.5s; }
.fcard { animation: drift 7s ease-in-out infinite; }
.fc-play { top: 150px; animation-delay: -2s; }
.fc-rec { top: 230px; animation-delay: -4s; }
.fc-toast { top: 240px; animation-delay: -6s; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { .deck img, .fcard { animation: none; } }
@media (max-width: 420px) {
  .deck { width: 204px; height: 122px; }
  .deck img { width: 80px; }
  .deck img:nth-child(2) { left: 62px; }
  .fc-play { top: 130px; }
  .fc-rec { top: 210px; }
  .fc-toast { top: 220px; }
  .float { height: 272px; }
}

/* на узких экранах луна — маленький акцент у шапки, вне заголовка */
@media (max-width: 640px) {
  .moon, .moon-halo { top: 76px; right: 18px; width: 34px; }
  .moon-halo { transform: translate(8%, -6%) scale(2.6); }
}

/* ══ v4: одна кнопка в герое, крупный веер обложек, лента отзывов ══ */
.hero .cta:not(.ghost) {
  background: linear-gradient(135deg, #ffb27a 0%, #f788d2 100%); color: #1d1d1c;
  font-size: 17px; padding: 16px 30px;
  box-shadow: 0 16px 38px -12px rgba(247, 136, 210, .75), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .15s, box-shadow .15s;
}
.hero .cta:not(.ghost):hover { transform: translateY(-1px); box-shadow: 0 20px 44px -12px rgba(247, 136, 210, .85), inset 0 1px 0 rgba(255,255,255,.6); }
.float { height: 262px; max-width: 620px; margin-top: 36px; }
.deck { width: 424px; height: 212px; }
.deck img { width: 132px; top: 22px; border-radius: 11px; }
.deck img:nth-child(1) { left: 0; transform: rotate(-14deg); animation-delay: -1s; }
.deck img:nth-child(2) { left: 98px; top: 4px; transform: rotate(-4.5deg); z-index: 2; animation-delay: -3.5s; }
.deck img:nth-child(3) { left: 194px; top: 4px; right: auto; transform: rotate(4.5deg); z-index: 2; animation-delay: -2s; }
.deck img:nth-child(4) { right: 0; transform: rotate(14deg); animation-delay: -5.5s; }
.fc-rec { left: max(0px, calc(50% - 300px)); top: 186px; }
.fc-toast { right: max(0px, calc(50% - 300px)); top: 200px; }
@media (max-width: 480px) {
  .float { height: 210px; margin-top: 30px; }
  .deck { width: 300px; height: 160px; }
  .deck img { width: 94px; top: 16px; border-radius: 8px; }
  .deck img:nth-child(2) { left: 69px; top: 2px; }
  .deck img:nth-child(3) { left: 137px; top: 2px; }
  .fc-rec { left: 0; top: 150px; }
  .fc-toast { right: 0; top: 162px; }
}

/* лента отзывов: два ряда, плывут навстречу, на hover замирают */
.reviews { padding: 60px 0 68px; background: var(--linen); overflow: hidden; }
.reviews h2 { text-align: center; margin: 0 20px 28px; }
.rv-rows { display: grid; gap: 14px; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.rv-track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; animation: rv 75s linear infinite; }
.rv-track.rev { animation-direction: reverse; animation-duration: 90s; }
.rv-rows:hover .rv-track { animation-play-state: paused; }
@keyframes rv { to { transform: translateX(-50%); } }
.rv { width: 310px; flex: none; margin-right: 14px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-card); padding: 16px 18px 14px; }
.rv p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--charcoal); }
.rv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rv-head > span:nth-child(2) { display: grid; line-height: 1.25; }
.rv-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--sans); color: #fff; flex: none; }
.rv-name { font: 700 14px/1.25 var(--sans); color: var(--ink); }
.rv-handle { font-size: 12.5px; color: var(--ash); }
.rv-net { margin-left: auto; width: 18px; height: 18px; color: var(--ash); flex: none; }
.rv-net svg { width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: reduce) {
  .rv-track { animation: none; width: auto; overflow-x: auto; padding-bottom: 6px; }
  .rv-rows { mask-image: none; -webkit-mask-image: none; }
}

/* ══ v5: фиксированный CTA и счётчик ══ */
.sticky-cta {
  position: fixed; z-index: 30; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom));
  display: block; text-align: center; text-decoration: none;
  background: linear-gradient(135deg, #ffb27a 0%, #f788d2 100%); color: #1d1d1c;
  font: 700 16px/1 var(--sans); padding: 18px 22px; border-radius: 14px;
  box-shadow: 0 16px 38px -12px rgba(247, 136, 210, .8), 0 2px 8px rgba(29, 29, 28, .18), inset 0 1px 0 rgba(255,255,255,.6);
  transform: translateY(160%); transition: transform .28s ease; pointer-events: none;
}
.sticky-cta.on { transform: none; pointer-events: auto; }
@media (min-width: 720px) {
  .sticky-cta { left: auto; right: 28px; bottom: 28px; padding: 16px 28px; border-radius: 999px; }
}
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }
.stat { margin: -6px 0 22px; text-align: center; font: 700 15px/1.4 var(--sans); color: var(--violet-deep); }

/* ══ v6: подвал с бейджами оплаты, строка «ещё сказки» ══ */
.foot .pay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pay-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pb {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 5px;
  border: 1px solid var(--sand); background: var(--paper); color: var(--slate);
  font: 700 10.5px/1 var(--sans); font-style: normal; letter-spacing: 0.01em; white-space: nowrap;
}
.pb-visa { font-style: italic; letter-spacing: 0.08em; }
.pb-mc b { width: 11px; height: 11px; border-radius: 50%; background: #d9776a; display: inline-block; }
.pb-mc b + b { margin-left: -5px; background: #e9b25a; opacity: 0.9; }
.shelf-more { margin: 18px 4px 0; text-align: center; font-size: 14px; color: var(--ash); }

/* обложки-видео: как картинки, без рамок и контролов */
.deck video, .shelf-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.deck video { position: absolute; top: 12px; width: 132px; aspect-ratio: 3 / 4; border-radius: 11px;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 18px 40px -14px rgba(10, 2, 20, .75), 0 2px 6px rgba(10,2,20,.35);
  animation: drift 7s ease-in-out infinite; height: auto; }
.deck video:nth-child(1) { left: 0; transform: rotate(-14deg); animation-delay: -1s; }
.deck video:nth-child(2) { left: 98px; top: 4px; transform: rotate(-4.5deg); z-index: 2; animation-delay: -3.5s; }
.deck video:nth-child(3) { left: 194px; top: 4px; transform: rotate(4.5deg); z-index: 2; animation-delay: -2s; }
.deck video:nth-child(4) { right: 0; transform: rotate(14deg); animation-delay: -5.5s; }
@media (max-width: 480px) {
  .deck video { width: 94px; top: 16px; border-radius: 8px; }
  .deck video:nth-child(2) { left: 69px; top: 2px; }
  .deck video:nth-child(3) { left: 137px; top: 2px; }
}
@media (prefers-reduced-motion: reduce) { .deck video { animation: none; } }
/* подпись под полкой — по центру всей полки, а не текстовой колонки */
.shelf-more { max-width: none; width: 100%; margin: 20px 0 0; }
.block .shelf-more, .shelf-block .shelf-more { max-width: none; width: auto; }

/* Страница 404 */
.top.top-plain { position: static; background: var(--twilight); }
.lost { padding-top: 96px; padding-bottom: 96px; }
.lost h1 { font: 400 40px/1.15 "DM Serif Display", Georgia, serif; margin: 0 0 12px; }
.lost-links { margin-top: 22px; font-size: 15px; }
.lost-links a { color: var(--charcoal); }

/* ── Три двери на главной — цвета только через переменные темы ─────────── */
.doors { padding-top: 10px; }
.doors-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.doors-list li a { display: block; height: 100%; padding: 22px 20px 18px; border-radius: 18px; background: var(--linen); color: var(--ink); text-decoration: none; border: 1px solid var(--sand); transition: transform .15s ease, box-shadow .15s ease; }
.doors-list li a:hover { transform: translateY(-2px); box-shadow: var(--shadow-card, 0 10px 30px rgba(25,9,34,.10)); }
.door-n { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: var(--on-ink, #fff); font: 700 13px/1 'Nunito Sans', system-ui, sans-serif; margin-bottom: 10px; }
.doors-list h3 { margin: 0 0 6px; font: 400 22px/1.2 'DM Serif Display', Georgia, serif; color: var(--ink); }
.doors-list p { margin: 0 0 10px; color: var(--charcoal); font-size: 15px; line-height: 1.5; }
.door-go { font-weight: 700; font-size: 14px; color: var(--violet-deep); }
.fine.links a { color: inherit; }

/* ── Библиотека /stories/ ────────────────────────────────────────────── */
.story-body { background: var(--parchment); color: var(--ink); }
.top-plain .top-right a { color: inherit; text-decoration: none; font-weight: 600; margin-left: 14px; }
.story-main { max-width: 760px; margin: 0 auto; padding: 18px 20px 60px; }
.story-main h1, .story-main h2, .story-main h3 { color: var(--ink); text-shadow: none; }
.story-main h1 { font: 400 clamp(30px, 5vw, 44px)/1.12 'DM Serif Display', Georgia, serif; margin: 6px 0 10px; }
.story-main .lead { color: var(--charcoal); font-size: 18px; }
.crumbs { font-size: 13px; color: var(--ash); margin: 6px 0 18px; }
.crumbs a { color: inherit; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--violet-deep); margin: 0; }
.byline { color: var(--ash); font-size: 14px; margin: 0 0 18px; }
.byline .reviewed { white-space: nowrap; }
.story-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 22px; }
.print-btn { background: none; border: 1px solid var(--sand); border-radius: 12px; padding: 12px 18px; font: 700 15px 'Nunito Sans', system-ui, sans-serif; cursor: pointer; color: var(--ink); }
.story-cover img, .spread figure img { width: 100%; height: auto; border-radius: 18px; display: block; }
.story-cover { margin: 0 0 26px; }
.spread { margin: 0 0 30px; }
.spread figure { margin: 0 0 16px; }
.story-article p { font-size: 19px; line-height: 1.65; margin: 0 0 16px; color: var(--ink); }
.the-end { text-align: center; color: var(--ash); font-style: italic; }
.print-only { display: none; }
.cta-block { text-align: center; background: var(--linen); border-radius: 22px; padding: 30px 22px; margin: 34px 0; border: 1px solid var(--sand); }
.cta-block h2 { margin-top: 0; color: var(--ink); }
.cta-block .lead, .cta-block .fine { color: var(--charcoal); }
.store-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0 0; }
.store-badge { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 9px 16px; border-radius: 10px; background: var(--ink); color: var(--on-ink, #fff); text-decoration: none; font: 700 15px/1.1 'Nunito Sans', system-ui, sans-serif; }
.store-badge span { display: block; font-size: 10px; font-weight: 600; opacity: .75; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.how-to-read p { font-size: 17px; line-height: 1.6; color: var(--ink); }
.how-to-read .fine, .story-main .fine { color: var(--ash); }
.story-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.story-cards li a { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border-radius: 16px; overflow: hidden; border: 1px solid var(--sand); height: 100%; }
.story-cards img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.sc-title { display: block; padding: 12px 14px 2px; font: 400 18px/1.25 'DM Serif Display', Georgia, serif; color: var(--ink); }
.sc-sub { display: block; padding: 0 14px 14px; font-size: 13px; color: var(--ash); }
.hub-group h2 { font-size: 24px; margin: 26px 0 12px; }
@media print {
  .top, .crumbs, .story-actions, .cta-block, .how-to-read, #faq, .related, .foot, .store-badges, .sticky-cta { display: none !important; }
  .story-body { background: #fff; color: #000; }
  .story-main { max-width: none; padding: 0; }
  .story-article p { font-size: 13pt; line-height: 1.5; color: #000; }
  .story-cover img, .spread figure img { max-width: 55%; margin: 0 auto; border-radius: 0; page-break-inside: avoid; }
  .print-only { display: block; margin-top: 18pt; }
}
/* Хаб: секции без отступов больших блоков лендинга, карточки плотной сеткой. */
.story-main .block { padding: 0; margin: 0 0 28px; max-width: none; }
.story-main .hub-group { margin: 0 0 34px; }
.story-main .hub-group h2 { margin: 0 0 14px; font-size: 22px; }
.story-main .story-cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.story-main .cta-block { padding: 30px 22px; margin: 10px 0 34px; }
.story-main .related { margin-top: 10px; }
