/* The trial chapter uses a lighter glass panel so the monster remains part of the scene. */
.chapter .chapter-card {
  width: min(405px, 32vw);
  padding: 28px 29px 25px;
  color: #fff8df;
  background: linear-gradient(135deg, rgba(27, 23, 53, .66), rgba(52, 37, 65, .4));
  border: 1px solid rgba(255, 225, 143, .62);
  border-radius: 18px 4px 18px 4px;
  box-shadow: 0 24px 70px rgba(3, 3, 17, .36), inset 0 0 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(7px) saturate(1.15);
  -webkit-backdrop-filter: blur(7px) saturate(1.15);
}

/* Keep the opening journey compact: the next world enters before the cover and copy leave the viewport. */
.hero {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* The supplied bureau artwork is the first-viewport identity; copy sits in a readable lower panel. */
.hero-sky {
  background: #f7efe5 url("assets/brand/start-cover.jpg?v=20260916") center / cover no-repeat;
}

.hero-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 18, 42, .72), rgba(30, 18, 42, .1) 53%, transparent 75%),
              linear-gradient(0deg, rgba(17, 10, 34, .6), transparent 42%);
}

.hero-sky .stars,
.hero-sky .moon { display: none; }

.hero-copy {
  top: auto;
  bottom: 12%;
  width: min(610px, 48vw);
  padding: 25px 29px 23px;
  border: 1px solid rgba(255, 229, 163, .7);
  border-radius: 4px 22px 4px 22px;
  background: linear-gradient(135deg, rgba(30, 17, 47, .82), rgba(50, 28, 55, .46));
  box-shadow: 0 22px 50px rgba(15, 8, 30, .3);
  backdrop-filter: blur(6px);
  transform: none;
}

.hero-copy .hero-lead { color: #fff7ea; }

.hero-brand-mark {
  top: auto;
  right: 7vw;
  bottom: 10%;
  width: clamp(145px, 15vw, 220px);
  border-radius: 12px;
  transform: rotate(3deg);
}

.cover-wrap {
  right: 5vw;
  top: auto;
  bottom: 7%;
  width: min(170px, 14vw);
  transform: rotate(-7deg);
}

/* The real cover opens on its spine and reveals an illustrated page. */
.hero-book {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  perspective: 1500px;
}

.hero-book-inside,
.hero-book-front {
  position: absolute;
  inset: 0;
  border-radius: 5px 9px 9px 5px;
}

.hero-book-inside {
  overflow: hidden;
  padding: 12px 11px 28px 17px;
  background: linear-gradient(90deg, #caa975, #fff4d5 5%, #fff9e8 96%, #d8b77b);
  box-shadow: inset 13px 0 18px rgba(91, 52, 35, .26), 15px 24px 38px rgba(9, 5, 37, .4);
}

.cover-wrap .hero-book-inside img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  border: 1px solid rgba(143, 91, 47, .28);
  border-radius: 2px;
}

.hero-book-inside > span {
  position: absolute;
  left: 22px;
  right: 18px;
  bottom: 8px;
  color: #70455d;
  text-align: center;
  font: italic 10px var(--serif);
  letter-spacing: .05em;
}

.hero-book-front {
  z-index: 3;
  transform-origin: 1.5% 50%;
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.2,.75,.18,1);
  will-change: transform;
}

.cover-wrap .hero-book-front > img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px 9px 9px 5px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(1px);
  opacity: 1;
  transition: opacity .01s linear .42s;
}

.hero-book-lining {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 5px 9px 9px 5px;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 215, 106, .34), transparent 21%),
    linear-gradient(90deg, #a77b48, #f4dfb5 8%, #fff5d8 94%, #cba66c);
  transform: rotateY(180deg) translateZ(2px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset -17px 0 24px rgba(103, 62, 39, .24), inset 0 0 0 1px rgba(117, 76, 42, .22);
}

.hero-book-lining span {
  color: rgba(159, 101, 72, .55);
  font: 34px var(--serif);
}

.cover-wrap:hover .hero-book-front,
.cover-wrap:focus .hero-book-front,
.cover-wrap:focus-within .hero-book-front {
  transform: rotateY(-120deg);
}

/* After the cover passes its edge, show its paper lining rather than a mirrored front. */
.cover-wrap:hover .hero-book-front > img,
.cover-wrap:focus .hero-book-front > img,
.cover-wrap:focus-within .hero-book-front > img,
.cover-wrap:hover .hero-book-front > .cover-label,
.cover-wrap:focus .hero-book-front > .cover-label,
.cover-wrap:focus-within .hero-book-front > .cover-label {
  opacity: 0;
  transition: opacity .01s linear .42s;
}

.book-hover-hint {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: -43px;
  translate: -50% 0;
  width: max-content;
  padding: 9px 14px;
  border: 1px solid rgba(255, 231, 151, .48);
  border-radius: 999px;
  background: rgba(28, 22, 71, .76);
  color: #fff4ca;
  font: 800 8px var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  transition: opacity .3s ease, transform .3s ease;
}

.book-hover-hint i { color: #ffd76a; font-style: normal; margin-left: 5px; }
.cover-wrap:hover .book-hover-hint,
.cover-wrap:focus .book-hover-hint { opacity: .35; transform: translateY(5px); }

.chapter .chapter-card::before,
.chapter .chapter-card::after {
  color: #ffd76a;
  text-shadow: 0 0 12px rgba(255, 215, 106, .75);
}

.chapter .chapter-card .chapter-no {
  color: #e9b7a4;
}

.chapter .chapter-card h2 {
  color: #fff7df;
  font-size: clamp(33px, 3.15vw, 48px);
  line-height: 1;
  margin-bottom: 18px;
}

.chapter .chapter-card > p:not(.chapter-no) {
  color: rgba(255, 248, 231, .83);
  font-size: 13px;
  line-height: 1.65;
}

.chapter .chapter-card .story-tag {
  color: #fff2cc;
  border-color: rgba(255, 215, 106, .62);
  background: rgba(255, 215, 106, .08);
}

.chapter-monster .scene-image img {
  object-position: 50% top;
  transform: scale(.92);
  transform-origin: center top;
}

.chapter-monster .scene-image::after {
  background:
    linear-gradient(90deg, rgba(8, 8, 31, .72) 0%, rgba(8, 8, 31, .12) 43%, transparent 68%),
    linear-gradient(0deg, rgba(6, 7, 23, .7), transparent 55%);
}

.chapter-monster .chapter-card {
  top: 54%;
  left: 5vw;
  width: min(420px, 34vw);
  padding: 30px 31px 28px;
  color: #fff8df;
  background:
    linear-gradient(135deg, rgba(27, 23, 53, .68), rgba(52, 37, 65, .42));
  border: 1px solid rgba(255, 225, 143, .62);
  border-radius: 18px 4px 18px 4px;
  box-shadow:
    0 24px 70px rgba(3, 3, 17, .38),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(7px) saturate(1.15);
  -webkit-backdrop-filter: blur(7px) saturate(1.15);
}

/* Rescue: the main characters are in the middle and on the right, so copy sits low on the left. */
.chapter-rescue .scene-image img {
  object-position: 46% var(--image-y, 51%);
}

.chapter-rescue .chapter-card {
  left: 5vw;
  right: auto;
  top: 60%;
}

.chapter-rescue .rescue-image::after {
  background:
    linear-gradient(90deg, rgba(15, 9, 43, .62), transparent 44%),
    linear-gradient(0deg, rgba(15, 8, 37, .62), transparent 52%);
}

/* Fairy: keep both faces and the reaching hands unobstructed. */
.chapter-fairy .scene-image img {
  object-position: 55% var(--image-y, 48%);
}

.chapter-fairy .chapter-card {
  left: 4vw;
  top: 38%;
  width: min(385px, 30vw);
}

.chapter-fairy .scene-image::after {
  background:
    linear-gradient(90deg, rgba(20, 14, 59, .65), transparent 43%),
    linear-gradient(0deg, rgba(14, 10, 40, .48), transparent 50%);
}

/* A separate animated pair sits over the illustrated fairy, so the wings visibly flap while the page is held. */
.fairy-wing-overlay {
  position: absolute;
  z-index: 11;
  left: 62%;
  top: 36%;
  width: min(105px, 10vw);
  height: min(125px, 12vw);
  pointer-events: none;
  opacity: var(--fairy-wings, .5);
  filter: blur(7px) drop-shadow(0 0 12px rgba(215, 246, 255, .9));
  mix-blend-mode: screen;
  animation: fairyWingGlow 1.8s ease-in-out infinite alternate;
  display: none;
}

.fairy-wing-overlay i,
.fairy-wing-overlay b {
  position: absolute;
  left: 12%;
  width: 72%;
  height: 28%;
  display: block;
  border: 0;
  background: radial-gradient(ellipse at 20% 58%, rgba(255,255,255,.5), rgba(211,235,255,.32) 42%, transparent 74%);
  border-radius: 50%;
  transform-origin: 8% 68%;
  animation: fairyWingLeft 1.05s ease-in-out infinite alternate;
}

.fairy-wing-overlay i {
  top: 14%;
  transform: rotate(-17deg);
}

.fairy-wing-overlay b {
  top: 49%;
  transform: rotate(12deg) scale(.9);
  animation-name: fairyWingRight;
  animation-delay: -.22s;
}

.fairy-wing-overlay i::after,
.fairy-wing-overlay b::after {
  display: none;
}

.fairy-wing-overlay span {
  position: absolute;
  left: 48%;
  top: 46%;
  color: #fff4a9;
  font-size: 18px;
  text-shadow: 0 0 14px white, 0 0 25px #d8a7ff;
  animation: fairyWingSpark 1.6s ease-in-out infinite;
}

@keyframes fairyWingLeft {
  from { transform: rotate(-27deg) scaleY(.82); opacity: .35; }
  to { transform: rotate(-13deg) scaleY(1.04); opacity: .8; }
}

@keyframes fairyWingRight {
  from { transform: rotate(22deg) scale(.9,.8); opacity: .32; }
  to { transform: rotate(10deg) scale(.96,1.06); opacity: .78; }
}

@keyframes fairyWingSpark {
  50% { opacity: .45; transform: translate(8px, -10px) scale(1.35); }
}

/* Brand mark and audience shortcuts keep the broader offer visible on the first screen. */
.hero-brand-mark {
  position: absolute;
  z-index: 3;
  right: 4vw;
  top: 11%;
  width: clamp(150px, 16vw, 245px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid rgba(255, 231, 157, .8);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 231, 157, .12), 0 18px 42px rgba(8, 3, 35, .42), 0 0 38px rgba(255, 214, 112, .28);
  transform: rotate(4deg);
}

.hero-brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hero-audiences {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-audiences a {
  padding: 8px 11px;
  border: 1px solid rgba(255, 225, 144, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff1bb;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(5px);
  transition: background .2s ease, transform .2s ease;
}

.hero-audiences a:hover { background: rgba(255, 215, 106, .2); transform: translateY(-2px); }

@media (max-width: 600px) {
  .hero-sky { background-position: 50% 18%; }
  .hero-sky::after { background: linear-gradient(0deg, rgba(22, 12, 38, .8), rgba(22, 12, 38, .12) 56%, transparent); }
  .hero-copy { left: 15px; right: 15px; bottom: 13%; width: auto; padding: 19px 18px 17px; }
  .hero-brand-mark { right: 17px; bottom: 3%; top: auto; width: 92px; }
  .cover-wrap { right: 18px; top: auto; bottom: 4%; width: 105px; transform: rotate(-5deg); }
  .hero-audiences { gap: 6px; margin-top: 16px; }
  .hero-audiences a { padding: 7px 9px; font-size: 9px; }
}

/* Взрослые иллюстрации содержат важные надписи в верхней части кадра. */
.chapter .scene-image img {
  object-position: 50% top !important;
  transform: scale(.92) !important;
  transform-origin: center top !important;
}

.chapter .chapter-card {
  top: 54% !important;
}

.chapter-rescue .chapter-card,
.chapter-fairy .chapter-card,
.chapter-elves .chapter-card {
  top: 54% !important;
}

@media (max-width: 600px) {
  .chapter .scene-image img {
    transform: scale(.96) !important;
  }

  .chapter .chapter-card,
  .chapter-rescue .chapter-card,
  .chapter-fairy .chapter-card,
  .chapter-elves .chapter-card {
    top: auto !important;
    bottom: 16px !important;
  }
}

/* История: текст слева, книга справа */
.story-intro {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .72fr);
  gap: clamp(30px, 6vw, 100px);
  align-items: center;
  min-height: 94vh;
  padding: clamp(92px, 10vh, 130px) clamp(24px, 8vw, 120px) clamp(72px, 9vh, 110px);
  text-align: left !important;
  overflow: hidden;
}

.story-intro-copy {
  position: relative;
  z-index: 2;
  width: min(700px, 100%);
}

.story-intro .story-intro-lead {
  margin-left: 0;
  margin-right: 0;
  max-width: 620px;
}

.story-intro .story-benefits {
  justify-content: flex-start;
}

.story-intro-cta {
  margin-top: 28px;
}

.story-intro-book {
  display: grid !important;
  z-index: 5;
  pointer-events: auto;
}

.story-intro-book {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
  outline: none;
}

.story-book-glow {
  position: absolute;
  width: 75%;
  height: 48%;
  border-radius: 50%;
  background: rgba(255, 224, 129, .62);
  filter: blur(56px);
}

.story-book {
  position: relative;
  z-index: 1;
  width: clamp(220px, 25vw, 340px);
  aspect-ratio: 2 / 3;
  transform: perspective(1200px) rotateY(-18deg) rotateZ(-3deg);
  transform-style: preserve-3d;
  filter: drop-shadow(20px 28px 22px rgba(38, 18, 55, .4));
  transition: transform .45s ease, filter .45s ease;
  pointer-events: none;
}

.story-book-inside {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 12px 11px 28px 17px;
  border-radius: 5px 9px 9px 5px;
  background: linear-gradient(90deg, #caa975, #fff4d5 5%, #fff9e8 96%, #d8b77b);
  box-shadow: inset 13px 0 18px rgba(91, 52, 35, .26), 15px 24px 38px rgba(9, 5, 37, .34);
}

.story-book-inside img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  border: 1px solid rgba(143, 91, 47, .28);
  border-radius: 2px;
}

.story-book-inside span {
  position: absolute;
  left: 22px;
  right: 18px;
  bottom: 8px;
  color: #70455d;
  text-align: center;
  font: italic 10px var(--serif);
}

.story-book-cover {
  z-index: 2;
  transform-origin: 1.5% 50%;
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.2,.75,.18,1);
  will-change: transform;
  pointer-events: none;
}

.story-intro-book:hover .story-book,
.story-intro-book:focus .story-book,
.story-intro-book:focus-within .story-book {
  transform: perspective(1200px) rotateY(-7deg) rotateZ(-1deg) translateY(-9px) scale(1.04);
  filter: drop-shadow(22px 35px 28px rgba(38, 18, 55, .46));
}

.story-book-pages {
  position: absolute;
  z-index: -1;
  inset: 6px -18px 6px 8px;
  border-radius: 2px 10px 10px 2px;
  background: repeating-linear-gradient(90deg, #fff9e7 0 2px, #e4d1ad 2.5px 4px);
  box-shadow: 5px 4px 0 #d0b486, 10px 8px 0 #b99368;
  transform: translateZ(-3px);
}

.story-book-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 4px solid #f7e6b9;
  border-radius: 4px 9px 9px 4px;
  background: #413064;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), inset 10px 0 18px rgba(26, 14, 38, .25);
  transform: translateZ(8px);
}

.story-book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 8px solid rgba(27, 14, 43, .28);
  pointer-events: none;
}

.story-book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: opacity .01s linear .42s;
}

.story-book-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-left: 8px solid rgba(27, 14, 43, .28);
  pointer-events: none;
}

.story-intro-book:hover .story-book-cover,
.story-intro-book:focus .story-book-cover,
.story-intro-book:focus-within .story-book-cover,
.story-intro-book.is-open .story-book-cover {
  transform: rotateY(-120deg);
}

.story-intro-book:hover .story-book-cover img,
.story-intro-book:focus .story-book-cover img,
.story-intro-book:focus-within .story-book-cover img,
.story-intro-book.is-open .story-book-cover img {
  opacity: 0;
}

.story-book-hint {
  position: absolute;
  z-index: 2;
  bottom: 20px;
  color: #fff8df;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(30, 12, 45, .55);
}

.story-book-hint i {
  color: #ffe17f;
  font-style: normal;
  margin-left: 6px;
}

.story-intro-book:hover .story-book-hint,
.story-intro-book:focus .story-book-hint,
.story-intro-book:focus-within .story-book-hint {
  opacity: .35;
  transform: translateY(5px);
}

@media (max-width: 700px) {
  .story-intro {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
    padding: 92px 22px 70px;
  }

  .story-intro-copy {
    max-width: 100%;
  }

  .story-intro h2 {
    font-size: clamp(43px, 12vw, 62px);
  }

  .story-intro .story-intro-lead {
    font-size: 14px;
    line-height: 1.6;
  }

  .story-intro-book {
    min-height: 340px;
    margin-top: 2px;
  }

  .story-book {
    width: min(62vw, 260px);
  }

  .story-book-hint {
    bottom: 3px;
    font-size: 8px;
  }
}

@keyframes fairyWingGlow {
  from { transform: translate(-4px, 5px) scale(.88); opacity: .28; }
  to { transform: translate(4px, -4px) scale(1.12); opacity: .58; }
}

/* Clear, visual four-step journey. */
/* `hidden` turns the page into an extra scroll container and breaks the sticky
   illustrated chapters, leaving a full blank screen between them. */
html,
body {
  overflow-x: clip;
  overflow-y: visible;
}

/* Pages fly out of the cover and carry the night sky into the first story world. */
.page-flight-transition {
  position: relative;
  z-index: 8;
  height: 210px;
  overflow: hidden;
  margin: -1px 0;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(255, 221, 145, .2), transparent 36%),
    linear-gradient(180deg, #171248 0%, #453579 34%, #9960aa 69%, #f2a5be 100%);
}

.page-flight-transition::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 27%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 25% 58%, #ffe994 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 39% 22%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 61% 71%, #ffe994 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 28%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 91% 61%, #ffe994 0 1.5px, transparent 2.5px);
  opacity: .65;
}

.flying-page {
  position: absolute;
  z-index: 2;
  width: 92px;
  height: 66px;
  border: 1px solid rgba(255, 239, 192, .85);
  border-radius: 5px 15px 5px 5px;
  background: linear-gradient(135deg, #fff8dc, #e9cfa6);
  box-shadow: 0 15px 25px rgba(24, 12, 54, .25), 0 0 18px rgba(255, 227, 145, .24);
  transform-origin: 50% 100%;
  animation: flyingPage 4.6s ease-in-out infinite alternate;
}

.flying-page::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 22px;
  height: 22px;
  background: linear-gradient(225deg, rgba(117, 77, 120, .23) 0 48%, #fff4d3 52%);
  border-radius: 0 13px 0 5px;
}

.flying-page i,
.flying-page b {
  position: absolute;
  left: 14px;
  right: 17px;
  height: 1px;
  background: rgba(121, 76, 103, .34);
  box-shadow: 0 10px rgba(121, 76, 103, .26), 0 20px rgba(121, 76, 103, .2);
}

.flying-page i { top: 17px; }
.flying-page b { top: 23px; right: 35px; }
.fp-one { left: 20%; top: 81px; transform: rotate(-12deg); animation-delay: -1.2s; }
.fp-two { left: 47%; top: 36px; width: 112px; height: 77px; transform: rotate(6deg); animation-delay: -3.4s; }
.fp-three { right: 19%; top: 101px; width: 82px; height: 59px; transform: rotate(14deg); animation-delay: -2.1s; }

.page-flight-stars i {
  position: absolute;
  z-index: 3;
  color: #fff0a4;
  font: normal 17px var(--serif);
  text-shadow: 0 0 7px white, 0 0 18px #ffd457;
  animation: pageStar 2.2s ease-in-out infinite;
}

.page-flight-stars i:nth-child(1) { left: 12%; top: 98px; animation-delay: -.3s; }
.page-flight-stars i:nth-child(2) { left: 29%; top: 38px; animation-delay: -1.5s; }
.page-flight-stars i:nth-child(3) { left: 40%; top: 145px; animation-delay: -.8s; }
.page-flight-stars i:nth-child(4) { left: 58%; top: 128px; animation-delay: -1.9s; }
.page-flight-stars i:nth-child(5) { left: 69%; top: 45px; animation-delay: -.5s; }
.page-flight-stars i:nth-child(6) { left: 82%; top: 151px; animation-delay: -1.2s; }
.page-flight-stars i:nth-child(7) { left: 92%; top: 72px; animation-delay: -2s; }

@keyframes flyingPage {
  from { translate: 0 10px; rotate: -3deg; }
  to { translate: 12px -13px; rotate: 4deg; }
}

@keyframes pageStar {
  0%, 100% { opacity: .25; transform: translateY(7px) scale(.65); }
  48% { opacity: 1; transform: translateY(-7px) scale(1.18); }
}

/* The opening statement now explains the offer and leads directly to an order. */
.story-intro {
  min-height: 94vh;
  padding: 115px 20px 85px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 195, 219, .3), transparent 30%),
    linear-gradient(165deg, #f2a5be, #9d63b0 55%, #3d377f);
}

.story-intro .story-kicker {
  margin: 0 0 22px;
  color: #fff0ad;
  font: 800 10px/1.2 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.story-intro h2 { font-size: clamp(50px, 6.4vw, 91px); }

.story-intro .story-intro-lead {
  max-width: 700px;
  margin: 27px auto 0;
  color: rgba(255,255,255,.88);
  font: 15px/1.7 var(--sans);
}

/* The portfolio label must stay readable on the pale paper background. */
.book-showcase .showcase-kicker,
.book-showcase .showcase-head > .overline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 22px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 231, 145, .75);
  border-radius: 999px;
  background: #3a2a58;
  color: #fff1ae;
  box-shadow: 0 8px 22px rgba(67, 41, 58, .16);
  letter-spacing: .16em;
  line-height: 1;
}

.book-showcase .showcase-kicker span,
.book-showcase .showcase-head > .overline span {
  color: #ffd76a;
  font-size: 13px;
  letter-spacing: 0;
  text-shadow: 0 0 9px rgba(255, 215, 106, .8);
}

.book-showcase .showcase-head > p:last-child {
  max-width: 650px;
  color: #50334b;
  font: 600 16px/1.65 var(--sans);
}

/* A tangible book mockup makes the printed result obvious at a glance. */
.book-preview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .86fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  max-width: 1020px;
  margin: 0 auto 78px;
  padding: 30px clamp(25px, 5vw, 64px) 30px 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.75), transparent 22%),
    linear-gradient(135deg, #fff3d2, #f1d2a9);
  box-shadow: 0 24px 50px rgba(90, 58, 54, .17);
}

.book-preview::before,
.book-preview::after {
  content: "✦";
  position: absolute;
  color: #bc7c35;
  text-shadow: 0 0 8px rgba(255, 208, 104, .75);
  animation: formatStarGlow 2.8s ease-in-out infinite;
}

.book-preview::before { left: 22px; top: 22px; font-size: 18px; }
.book-preview::after { right: 28px; bottom: 20px; font-size: 14px; animation-delay: -.9s; }

.book-stage {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
}

.book-stage::before {
  content: "";
  position: absolute;
  width: 66%;
  height: 13%;
  bottom: 13%;
  border-radius: 50%;
  background: rgba(92, 52, 44, .28);
  filter: blur(17px);
  transform: rotate(-5deg);
}

.book-object {
  position: relative;
  z-index: 1;
  width: clamp(205px, 22vw, 285px);
  aspect-ratio: 2 / 3;
  transform: perspective(1100px) rotateY(-19deg) rotateZ(-4deg);
  transform-style: preserve-3d;
  filter: drop-shadow(18px 25px 18px rgba(42, 21, 35, .35));
  transition: transform .45s ease, filter .45s ease;
}

.book-preview:hover .book-object {
  transform: perspective(1100px) rotateY(-9deg) rotateZ(-2deg) translateY(-8px) scale(1.02);
  filter: drop-shadow(20px 31px 24px rgba(42, 21, 35, .4));
}

.book-pages {
  position: absolute;
  z-index: -1;
  inset: 5px -15px 5px 7px;
  border-radius: 2px 9px 9px 2px;
  background: repeating-linear-gradient(90deg, #fff9e7 0 2px, #ead9b8 2.5px 4px);
  box-shadow: 5px 4px 0 #d4b98d, 9px 8px 0 #c4a375;
  transform: translateZ(-2px) skewY(-1deg);
}

.book-pages::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 8%;
  width: 4px;
  height: 84%;
  border-radius: 0 5px 5px 0;
  background: #b18a61;
  opacity: .6;
}

.book-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 4px solid #f7e6b9;
  border-radius: 4px 9px 9px 4px;
  background: #413064;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), inset 9px 0 18px rgba(26, 14, 38, .25);
  transform: translateZ(8px);
}

.book-cover::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(90deg, rgba(27, 14, 43, .5), transparent);
  pointer-events: none;
}

.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-preview-copy {
  position: relative;
  z-index: 2;
  max-width: 430px;
}

.book-preview-copy .overline {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(117, 71, 91, .25);
  border-radius: 999px;
  background: rgba(255, 248, 225, .72);
  color: #71394f;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: .11em;
}

.book-preview-copy h3 {
  margin: 0;
  color: #342441;
  font: 400 clamp(38px, 4.4vw, 63px)/.98 var(--serif);
  letter-spacing: -.045em;
}

.book-preview-copy > p:not(.overline) {
  margin: 22px 0 0;
  color: #5d3d50;
  font-size: 15px;
  line-height: 1.7;
}

.book-spec {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(149, 94, 88, .45);
  border-radius: 999px;
  color: #75475b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.story-benefits {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 25px;
}

.story-benefits span {
  padding: 9px 13px;
  border: 1px solid rgba(255, 238, 181, .58);
  border-radius: 24px;
  background: rgba(35, 27, 79, .17);
  color: #fff9df;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.story-intro-cta,
.chapter-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #2c2351;
  background: #ffd76a;
  border-radius: 28px;
  text-decoration: none;
  font: 800 10px var(--sans);
  letter-spacing: .04em;
  transition: transform .25s ease, box-shadow .25s ease;
}

.story-intro-cta {
  margin-top: 27px;
  padding: 15px 20px;
  box-shadow: 0 14px 30px rgba(39, 25, 74, .25);
}

.story-intro-cta:hover,
.chapter-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(4, 2, 22, .32), 0 0 20px rgba(255, 215, 106, .25);
}

.chapter-cta {
  margin-top: 15px;
  padding: 12px 16px;
}

.wish-examples,
.bloom-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.wish-examples span,
.bloom-examples span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 215, 106, .48);
  border-radius: 18px;
  background: rgba(255, 215, 106, .08);
  color: #fff5d2;
  font: 700 8px var(--sans);
  letter-spacing: .04em;
}

.bloom-examples span {
  background: rgba(255, 231, 142, .12);
  border-color: rgba(255, 232, 151, .58);
}

.how-title > p:last-child {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,.86);
}

.how .steps {
  gap: 18px;
  align-items: stretch;
}

.how .steps li {
  min-height: 430px;
  padding: 10px 10px 25px;
  border-radius: 42px 42px 16px 16px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.how .steps li:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 4;
  right: -26px;
  top: 35%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #74406f;
  color: #fff5d1;
  font: 700 18px var(--serif);
  box-shadow: 0 6px 18px rgba(83,38,61,.3);
}

.how .steps li > span {
  z-index: 3;
  right: 22px;
  top: 22px;
  padding: 7px 9px;
  border-radius: 18px;
  background: rgba(40,31,70,.78);
  color: #fff4d0;
}

.how .steps figure {
  position: relative;
  height: 235px;
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: 34px 34px 9px 9px;
  background: #c89768;
}

.how .steps figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(40,27,47,.24), transparent 50%);
}

.how .steps figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.how .steps li:nth-child(1) figure img { object-position: 50% 27%; }
.how .steps li:nth-child(2) figure img { object-position: 52% 42%; }
.how .steps li:nth-child(3) figure img { object-position: 65% 35%; }
.how .steps li:nth-child(4) figure img { object-position: 50% 15%; }
.how .steps li:hover figure img { transform: scale(1.08); }
.how .steps li > div { padding: 0 15px; }
.how .steps h3 { margin: 0 0 10px; font-size: 22px; }
.how .steps p { margin: 0; }
.how .time-note b { color: #fff7d8; }
.how .time-note span { margin: 0 9px; opacity: .55; }

/* Prices and a living constellation around the offer cards. */
.formats { overflow: hidden; }

.format-stars {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.format-stars i {
  position: absolute;
  color: #fff1a6;
  font: normal clamp(15px, 1.8vw, 27px) var(--serif);
  opacity: .28;
  filter: drop-shadow(0 0 5px #fff6c2) drop-shadow(0 0 14px #ffd45f);
  animation: formatStarGlow 2.6s ease-in-out infinite;
}

.format-stars i:nth-child(1)  { left: 6%;  top: 12%; animation-delay: -.2s; }
.format-stars i:nth-child(2)  { left: 17%; top: 29%; animation-delay: -1.7s; }
.format-stars i:nth-child(3)  { left: 31%; top: 11%; animation-delay: -.9s; }
.format-stars i:nth-child(4)  { left: 43%; top: 34%; animation-delay: -2.1s; }
.format-stars i:nth-child(5)  { left: 57%; top: 16%; animation-delay: -1.2s; }
.format-stars i:nth-child(6)  { left: 72%; top: 31%; animation-delay: -.4s; }
.format-stars i:nth-child(7)  { left: 88%; top: 13%; animation-delay: -2.3s; }
.format-stars i:nth-child(8)  { left: 95%; top: 43%; animation-delay: -1.5s; }
.format-stars i:nth-child(9)  { left: 3%;  top: 63%; animation-delay: -2s; }
.format-stars i:nth-child(10) { left: 14%; top: 83%; animation-delay: -.7s; }
.format-stars i:nth-child(11) { left: 28%; top: 70%; animation-delay: -1.4s; }
.format-stars i:nth-child(12) { left: 41%; top: 91%; animation-delay: -.1s; }
.format-stars i:nth-child(13) { left: 61%; top: 76%; animation-delay: -2.4s; }
.format-stars i:nth-child(14) { left: 75%; top: 89%; animation-delay: -1s; }
.format-stars i:nth-child(15) { left: 87%; top: 69%; animation-delay: -1.9s; }
.format-stars i:nth-child(16) { left: 96%; top: 87%; animation-delay: -.5s; }

.format-cards article {
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 45px rgba(57, 32, 83, .28), 0 0 0 rgba(255, 226, 119, 0);
  transition: transform .35s ease, box-shadow .35s ease;
}

.format-cards article:hover {
  transform: translateY(-9px);
  box-shadow: 0 26px 58px rgba(49, 24, 66, .38), 0 0 34px rgba(255, 226, 119, .28);
}

.format-cards article.featured:hover { transform: translateY(-27px); }
.format-cards h3 { margin-bottom: 8px; }

.format-cards .format-price {
  position: relative;
  min-height: 0;
  margin: 0 0 17px;
  color: #8e426d;
  font: 700 clamp(25px, 2.4vw, 34px)/1 var(--serif);
  letter-spacing: -.035em;
}

.format-cards .format-price::after {
  content: "✦";
  display: inline-block;
  margin-left: 8px;
  color: #fff2a2;
  font-size: 15px;
  filter: drop-shadow(0 0 7px #ffd45f);
  animation: formatStarGlow 1.8s ease-in-out infinite;
}

.format-cards .format-price small {
  font: 800 9px var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.format-cards .format-description { margin-bottom: 0; }
.format-cards a { margin-top: auto; align-self: flex-start; }

/* A misty interlude dissolves the painted world into the final night scene. */
.portal-transition {
  display: none !important;
}

.portal-transition::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  top: 31px;
  height: 76px;
  border-top: 2px solid rgba(255, 236, 169, .65);
  border-radius: 50%;
  box-shadow: 0 -10px 35px rgba(255, 220, 117, .22), inset 0 9px 22px rgba(255, 240, 190, .12);
  filter: drop-shadow(0 0 9px rgba(255, 223, 117, .45));
}

.portal-transition::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 8px;
  height: 40px;
  border-radius: 50%;
  background: rgba(143, 108, 178, .16);
  filter: blur(18px);
  box-shadow: 0 0 55px 16px rgba(255, 207, 103, .12);
}

.portal-sparks i {
  position: absolute;
  z-index: 2;
  color: #ffe89f;
  font: normal 17px var(--serif);
  text-shadow: 0 0 7px #fff9ce, 0 0 18px #ffc95b;
  animation: portalSparkle 2.7s ease-in-out infinite;
}

.portal-sparks i:nth-child(1) { left: 13%; top: 52px; animation-delay: -.3s; }
.portal-sparks i:nth-child(2) { left: 31%; top: 74px; animation-delay: -1.7s; }
.portal-sparks i:nth-child(3) { left: 50%; top: 46px; animation-delay: -.9s; }
.portal-sparks i:nth-child(4) { left: 69%; top: 77px; animation-delay: -2.2s; }
.portal-sparks i:nth-child(5) { left: 87%; top: 49px; animation-delay: -1.2s; }

.order {
  position: relative;
  z-index: 1;
  margin-top: 0;
  clip-path: ellipse(105% 100% at 50% 100%);
}

/* A clear gallery of occasions turns the service into an easy-to-choose gift. */
.variants {
  position: relative;
  padding: 130px 6vw 120px;
  overflow: hidden;
  color: #342441;
  background: linear-gradient(145deg, #ffe7ba 0%, #f5b9a5 48%, #cf91ba 100%);
}
.variants::before { content: "✦"; position: absolute; right: 7%; top: 65px; color: #fff4a8; font: 42px var(--serif); text-shadow: 0 0 18px #fff; }
.variants-head { max-width: 760px; margin: 0 auto 58px; text-align: center; }
.variants-head .overline { color: #88486b; }
.variants-head h2, .reviews-head h2 { margin: 0; font: 400 clamp(44px, 5.7vw, 78px)/.96 var(--serif); letter-spacing: -.045em; }
.variants-head h2 em, .reviews-head h2 em { color: #a74476; font-style: normal; }
.variants-head > p:last-child { max-width: 650px; margin: 23px auto 0; color: #68465e; font-size: 16px; line-height: 1.7; }
.variant-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1240px; margin: 0 auto; }
.variant-card { display: flex; flex-direction: column; overflow: hidden; min-height: 520px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: #fff5df; box-shadow: 0 22px 46px rgba(81,38,73,.2); transition: transform .35s ease, box-shadow .35s ease; }
.variant-card:hover { transform: translateY(-10px) rotate(-.5deg); box-shadow: 0 32px 58px rgba(81,38,73,.3); }
.variant-card img { width: 100%; height: 245px; object-fit: cover; }
.variant-child img { object-position: 50% 42%; }.variant-family img { object-position: 50% 35%; }.variant-team img { object-position: 50% 40%; }.variant-creator img { object-position: 50% 45%; }
.variant-card > div { display: flex; flex: 1; flex-direction: column; padding: 25px 23px 23px; }
.variant-label { color: #a54f76; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.variant-card h3 { margin: 13px 0 10px; font: 400 27px/1.05 var(--serif); }
.variant-card p { margin: 0; color: #6e5264; font-size: 13px; line-height: 1.6; }
.variant-card a { margin-top: auto; padding-top: 21px; color: #733b61; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.variants-note { margin: 42px auto 0; color: #683d59; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.reviews { padding: 130px 6vw 140px; color: #fff7dc; background: radial-gradient(circle at 70% 0%, #6e58a3, transparent 45%), #28205d; }
.reviews-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }.reviews-head .overline { color: #ffd76a; }.reviews-head h2 em { color: #ff9ac3; }
.reviews-disclaimer { margin: 22px auto 0; color: #c7bce0; font-size: 11px; font-style: italic; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1120px; margin: 0 auto; }
.review-grid blockquote { position: relative; margin: 0; padding: 31px 28px 26px; border: 1px solid rgba(255,246,208,.35); border-radius: 18px; background: rgba(255,245,218,.1); box-shadow: 0 20px 40px rgba(9,4,35,.2); }
.review-grid blockquote::before { content: "“"; position: absolute; right: 21px; top: 7px; color: #ffd76a; font: 64px/1 var(--serif); opacity: .8; }
.review-stars { color: #ffd76a; letter-spacing: .18em; font-size: 13px; }.review-grid blockquote p { margin: 18px 0 26px; color: #fff7df; font: italic 16px/1.6 var(--serif); }
.review-grid footer { display: flex; flex-direction: column; gap: 5px; border-top: 1px solid rgba(255,246,208,.2); padding-top: 16px; }.review-grid strong { font-size: 12px; }.review-grid footer span { color: #cfc3e3; font-size: 10px; }

@media (max-width: 900px) { .variant-grid { grid-template-columns: repeat(2, 1fr); } .review-grid { grid-template-columns: 1fr; max-width: 620px; } }
@media (max-width: 600px) { .variants { padding: 95px 18px 90px; } .variants-head h2, .reviews-head h2 { font-size: 43px; } .variants-head > p:last-child { font-size: 14px; } .variant-grid { grid-template-columns: 1fr; gap: 14px; } .variant-card { min-height: 0; } .variant-card img { height: 205px; } .variant-card h3 { font-size: 25px; } .reviews { padding: 95px 18px 105px; } .review-grid blockquote { padding: 25px 22px 22px; } }

@keyframes portalSparkle {
  0%, 100% { opacity: .25; transform: translateY(8px) scale(.68) rotate(0deg); }
  45% { opacity: 1; transform: translateY(-8px) scale(1.18) rotate(14deg); }
}

@keyframes formatStarGlow {
  0%, 100% { opacity: .25; transform: scale(.68) rotate(0deg); }
  45% { opacity: 1; transform: scale(1.18) rotate(13deg); }
  65% { opacity: .62; transform: scale(.9) rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .format-stars i,
  .format-cards .format-price::after,
  .portal-sparks i,
  .flying-page,
  .page-flight-stars i { animation: none; opacity: .72; }
}

/* The finished-book promise is a key selling point: keep it readable at a glance. */
.how .time-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: min(100%, 980px);
  margin: 34px auto 0;
  padding: 15px 24px;
  border: 1px solid rgba(255, 247, 216, .58);
  border-radius: 999px;
  background: rgba(111, 48, 57, .24);
  color: #fff8df;
  font-size: clamp(13px, 1.35vw, 19px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(93, 34, 35, .16), inset 0 0 0 1px rgba(255,255,255,.06);
}

.how .time-note b { color: #fff8df; }
.how .time-note span { color: #ffe27d; opacity: 1; }

@media (max-width: 600px) {
  .how .time-note {
    display: block;
    max-width: 100%;
    margin-top: 27px;
    padding: 13px 15px;
    font-size: 12px;
    letter-spacing: .06em;
  }
}

/* Elves: the card floats above the lower group instead of covering the game. */
.chapter-elves .chapter-card {
  right: 4vw;
  top: 40%;
  width: min(390px, 30vw);
  background: linear-gradient(135deg, rgba(53, 35, 61, .68), rgba(80, 48, 70, .42));
}

.chapter-elves .scene-image img {
  object-position: 50% var(--image-y, 48%);
}

.chapter-elves .elves-one img {
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(var(--image-scale, 1.02));
}

.chapter-elves .elves-two { display: none; }

/* Small translucent wing overlays make the tiny illustrated elves feel alive without changing the artwork. */
.elf-wing-swarm {
  position: absolute;
  z-index: 12;
  inset: 0;
  pointer-events: none;
  opacity: .72;
  filter: drop-shadow(0 0 8px rgba(214, 250, 255, .9));
  mix-blend-mode: screen;
  transform: scale(var(--image-scale, 1.02));
  transform-origin: 50% 50%;
}

.elf-wing-swarm i {
  position: absolute;
  width: clamp(72px, 8vw, 140px);
  height: clamp(50px, 5.8vw, 100px);
  display: block;
  transform: translate(-50%, -50%) scale(var(--wing-scale, 1)) rotate(var(--wing-rotate, 0deg));
}

.elf-wing-swarm i::before,
.elf-wing-swarm i::after {
  content: "";
  position: absolute;
  top: 2%;
  width: 48%;
  height: 90%;
  border: 1px solid rgba(244, 255, 255, .78);
  background: radial-gradient(ellipse at 55% 55%, rgba(255,255,255,.05), rgba(208,244,255,.22) 52%, rgba(221,187,255,.06));
  box-shadow: inset 0 0 8px rgba(255,255,255,.22);
}

.elf-wing-swarm i::before {
  right: 50%;
  border-radius: 92% 18% 82% 26%;
  transform-origin: 100% 65%;
  animation: elfWingLeft .72s ease-in-out infinite alternate;
}

.elf-wing-swarm i::after {
  left: 50%;
  border-radius: 18% 92% 26% 82%;
  transform-origin: 0 65%;
  animation: elfWingRight .72s ease-in-out infinite alternate;
}

.elf-wing-swarm i:nth-child(2)::before,.elf-wing-swarm i:nth-child(2)::after{animation-delay:-.18s}
.elf-wing-swarm i:nth-child(3)::before,.elf-wing-swarm i:nth-child(3)::after{animation-delay:-.42s}
.elf-wing-swarm i:nth-child(4)::before,.elf-wing-swarm i:nth-child(4)::after{animation-delay:-.61s}
.elf-wing-swarm i:nth-child(5)::before,.elf-wing-swarm i:nth-child(5)::after{animation-delay:-.29s}
.elf-wing-swarm i:nth-child(6)::before,.elf-wing-swarm i:nth-child(6)::after{animation-delay:-.53s}
.elf-wing-swarm i:nth-child(7)::before,.elf-wing-swarm i:nth-child(7)::after{animation-delay:-.09s}
.elf-wing-swarm i:nth-child(8)::before,.elf-wing-swarm i:nth-child(8)::after{animation-delay:-.7s}

.ew1 { left: 26.2%; top: 27.5%; --wing-rotate:-12deg; --wing-scale:.88; }
.ew2 { left: 12.5%; top: 45.5%; --wing-rotate:10deg; --wing-scale:.86; }
.ew3 { left: 23.2%; top: 54.2%; --wing-rotate:-8deg; --wing-scale:.76; }
.ew4 { left: 35.1%; top: 54.2%; --wing-rotate:7deg; --wing-scale:.72; }
.ew5 { left: 67.6%; top: 28.6%; --wing-rotate:-8deg; --wing-scale:.8; }
.ew6 { left: 66.7%; top: 82.4%; --wing-rotate:8deg; --wing-scale:.77; }
.ew7 { left: 72.6%; top: 55%; --wing-rotate:-7deg; --wing-scale:.82; }
.ew8 { left: 13.7%; top: 72.6%; --wing-rotate:12deg; --wing-scale:.72; }

@keyframes elfWingLeft {
  from { transform: rotate(-17deg) scaleX(.48); opacity: .38; }
  to { transform: rotate(9deg) scaleX(1); opacity: .86; }
}

@keyframes elfWingRight {
  from { transform: rotate(17deg) scaleX(.48); opacity: .38; }
  to { transform: rotate(-9deg) scaleX(1); opacity: .86; }
}

.chapter-elves .scene-image::after {
  background:
    linear-gradient(270deg, rgba(45, 27, 52, .55), transparent 43%),
    linear-gradient(0deg, rgba(39, 24, 35, .38), transparent 48%);
}

.chapter-monster .chapter-card::before,
.chapter-monster .chapter-card::after {
  color: #ffd76a;
  text-shadow: 0 0 12px rgba(255, 215, 106, .8);
}

.chapter-monster .chapter-no {
  color: #e9b7a4;
}

.chapter-monster .chapter-card h2 {
  color: #fff7df;
  font-size: clamp(34px, 3.3vw, 50px);
  line-height: 1;
}

.chapter-monster .chapter-card > p:not(.chapter-no) {
  color: rgba(255, 248, 231, .82);
  font-size: 14px;
}

.chapter-monster .story-tag {
  color: #fff2cc;
  border-color: rgba(255, 215, 106, .62);
  background: rgba(255, 215, 106, .08);
}

@media (max-width: 900px) {
  .chapter .chapter-card {
    width: min(385px, 40vw);
  }

  .chapter-monster .chapter-card {
    width: min(390px, 43vw);
  }

  .how .steps li:not(:last-child)::after { display: none; }
}

@media (max-width: 600px) {
  .book-preview {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 58px;
    padding: 25px 17px 30px;
    text-align: center;
  }

  .book-stage { min-height: 365px; }

  .book-object { width: 218px; }

  .book-preview-copy {
    max-width: 330px;
    margin: 0 auto;
  }

  .book-preview-copy .overline {
    margin-top: 5px;
    font-size: 11px;
    letter-spacing: .08em;
  }

  .book-preview-copy h3 { font-size: 41px; }

  .book-preview-copy > p:not(.overline) {
    margin-top: 17px;
    font-size: 13px;
    line-height: 1.6;
  }

  .book-spec {
    line-height: 1.5;
    letter-spacing: .08em;
  }

  .chapter .chapter-card,
  .chapter-rescue .chapter-card,
  .chapter-fairy .chapter-card,
  .chapter-elves .chapter-card {
    left: 13px;
    right: 13px;
    top: auto;
    bottom: 16px;
    width: auto;
    padding: 21px 21px 19px;
    background: linear-gradient(135deg, rgba(24, 20, 50, .78), rgba(46, 32, 58, .58));
  }

  .how { padding: 90px 16px 95px; }
  .page-flight-transition { height: 180px; }
  .flying-page { transform: scale(.72); }
  .fp-one { left: 3%; top: 78px; }
  .fp-two { left: 35%; top: 31px; }
  .fp-three { right: 1%; top: 91px; }
  .how-title > p:last-child { font-size: 13px; }
  .how .steps {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 42px;
  }
  .how .steps li {
    min-height: 0;
    padding: 8px;
    display: grid;
    grid-template-columns: 126px 1fr;
    align-items: center;
    border-radius: 30px 14px 14px 30px;
    text-align: left;
  }
  .how .steps li > span {
    left: 101px;
    right: auto;
    top: 15px;
  }
  .how .steps figure {
    height: 150px;
    margin: 0;
    border-radius: 24px 8px 8px 24px;
  }
  .how .steps li > div { padding: 0 13px 0 17px; }
  .how .steps h3 { font-size: 19px; line-height: 1.05; }
  .how .steps p { font-size: 12px; line-height: 1.5; }
  .how .time-note { line-height: 1.7; }
  .how .time-note span { display: block; height: 0; visibility: hidden; }

  .chapter .chapter-card h2 {
    font-size: 31px;
    margin-bottom: 13px;
  }

  .fairy-wing-overlay {
    top: 37%;
    left: 60%;
    width: 18vw;
    height: 22vw;
  }

.elf-wing-swarm i { width: 45px; height: 28px; }

  .chapter .chapter-card > p:not(.chapter-no) {
    font-size: 12px;
    line-height: 1.55;
  }

  .chapter-monster .scene-image img {
    object-position: 58% center;
  }

  .chapter-monster .chapter-card {
    left: 14px;
    right: 14px;
    bottom: 18px;
    top: auto;
    width: auto;
    padding: 22px 22px 20px;
    background: linear-gradient(135deg, rgba(24, 20, 50, .76), rgba(46, 32, 58, .55));
  }

  .chapter-monster .chapter-card h2 {
    font-size: 33px;
    margin-bottom: 15px;
  }

  .fairy-wing-overlay {
    top: 34%;
    left: 57%;
    width: 24vw;
    height: 28vw;
    opacity: .46;
  }

  .fairy-wing-overlay i,
  .fairy-wing-overlay b {
    border-width: 1px;
  }

  .elf-wing-swarm i { width: 34px; height: 22px; }
}

/* The source illustrations already contain their own wings. Do not draw misaligned overlays. */
.fairy-wing-overlay,
.elf-wing-swarm {
  display: none !important;
}

/* Финальная композиция стартового экрана */
.hero-sky::after {
  background: linear-gradient(0deg, rgba(22, 12, 38, .62), transparent 34%) !important;
}
.hero-brand-mark { display: none !important; }
.hero-copy {
  left: 5vw !important;
  top: auto !important;
  bottom: 6% !important;
  width: auto !important;
  max-width: 340px;
  padding: 12px 16px !important;
  border: 1px solid rgba(255, 225, 144, .62);
  border-radius: 4px 15px 4px 15px;
  background: rgba(27, 18, 44, .72) !important;
  box-shadow: 0 16px 35px rgba(9, 4, 25, .3);
  backdrop-filter: blur(6px);
  transform: none !important;
}
.hero-copy .overline,
.hero-copy h1,
.hero-copy .hero-lead,
.hero-copy .hero-audiences { display: none !important; }
.hero-copy .primary-button { margin-top: 0 !important; }
.hero-copy small { margin-top: 8px !important; }
#home .hero-copy {
  display: none !important;
}
.cover-wrap {
  right: 5vw !important;
  top: auto !important;
  bottom: 5% !important;
  width: min(300px, 24vw) !important;
  transform: rotate(-5deg) !important;
  z-index: 5 !important;
}
.topbar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 12px 26px 0 !important;
  height: 54px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(35, 24, 63, .9) !important;
  z-index: 20 !important;
}

/* На стартовом экране оставляем фирменную иллюстрацию свободной от макета книги. */
#home .cover-wrap {
  display: none !important;
}

/* Музыка появляется со второго экрана, где начинается путешествие по истории. */
.sound {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
}

body.story-sound-visible .sound {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.story-action-panel {
  width: min(600px, 100%);
  margin: 34px 0 0;
  padding: 18px 22px 16px;
  border: 1px solid rgba(255, 225, 144, .62);
  border-radius: 4px 18px 4px 18px;
  background: rgba(27, 18, 44, .72);
  box-shadow: 0 16px 35px rgba(9, 4, 25, .25);
  backdrop-filter: blur(6px);
}

.story-action-panel .primary-button {
  margin-top: 0;
  width: 100%;
  justify-content: center;
}

.story-action-panel small {
  display: block;
  margin-top: 12px;
  color: #d4cce9;
  font-size: 12px;
}

@media (max-width: 700px) {
  .story-action-panel {
    margin-top: 26px;
    padding: 14px 15px 13px;
  }

  .story-action-panel small {
    font-size: 10px;
  }
}
.hero-sky { min-height: calc(100vh - 78px) !important; }
.hero-sky {
  background-position: center top !important;
}
.topbar {
  width: calc(100% - 52px) !important;
  max-width: 1500px;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .topbar { width: calc(100% - 20px) !important; margin: 8px auto 0 !important; height: 50px !important; }
  .hero-sky { min-height: calc(100vh - 66px) !important; }
  .hero-copy { left: 14px !important; right: 14px !important; bottom: 12% !important; padding: 10px 12px !important; max-width: none; }
  .hero-copy .primary-button { width: 100%; justify-content: center; }
  .cover-wrap { right: 16px !important; bottom: 3% !important; width: 145px !important; }
}

/* Мобильная обложка целиком и удобные поля без увеличения экрана при вводе. */
@media (max-width: 600px) {
  #home.hero {
    height: 100vw !important;
    min-height: 0 !important;
  }
  #home .hero-sky {
    height: 100% !important;
    min-height: 0 !important;
    background-size: contain !important;
    background-position: center top !important;
  }
  #home .hero-sticky { height: 100% !important; min-height: 0 !important; }
  .topbar { padding: 0 8px !important; gap: 8px; height: 58px !important; }
  .topbar .logo { font-size: clamp(10px, 3.1vw, 13px); }
  .top-cta { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; padding: 10px 12px; }
  #order-form input, #order-form textarea { font-size: 16px; min-height: 48px; }
  #order-form textarea { min-height: 100px; }
  #order-form button { min-height: 48px; }
}

.language-switch {
  position: absolute; top: 80px; right: 20px; z-index: 30;
  display: flex; gap: 2px; padding: 3px; border-radius: 28px;
  background: #211841; box-shadow: 0 3px 14px #17124833;
}
.language-switch button {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 24px;
  background: transparent; color: #fff; font: 700 12px Arial,sans-serif; cursor: pointer;
}
.language-switch button[aria-pressed="true"] { background: #ffd76a; color: #251c4e; }
.language-switch button:focus-visible { outline: 2px solid white; outline-offset: 2px; }
@media (max-width: 600px) {
  .language-switch { top: 76px; right: 10px; }
}
html[lang="en"] .hero-sky {
  background-image: url("assets/brand/start-cover-en.png") !important;
}

/* Спокойная прокрутка: блоки движутся вместе со страницей. */
.chapter { height: auto !important; min-height: 0 !important; }
.chapter-sticky {
  position: relative !important; top: auto !important;
  height: auto !important; min-height: 760px;
  display: flex; align-items: center; padding: 90px 4vw;
}
.chapter .chapter-card {
  position: relative !important; top: auto !important; bottom: auto !important;
  left: auto !important; right: auto !important;
  width: min(520px, 45%) !important; transform: none !important;
}
.chapter .right-card { margin-left: auto; }
.scene-image img, .elf-wing-swarm { transform: none !important; transition: none !important; }
.flying-page, .page-flight-stars i { animation: none !important; }
.variant-card:hover, .format-cards article:hover,
.format-cards article.featured:hover, .book-object:hover { transform: none !important; }
.story-intro-book:hover .story-book, .story-intro-book:focus .story-book,
.story-intro-book:focus-within .story-book { transform: perspective(1200px) rotateY(-18deg) rotateZ(-3deg); }
@media (max-width: 600px) {
  .chapter-sticky { min-height: 0; padding: 0; flex-direction: column; }
  .chapter .scene-image { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 1; }
  .chapter .chapter-card { width: calc(100% - 28px) !important; margin: -35px 14px 28px; }
}

/* Подсказка занимает отдельную строку под книгой. */
.story-intro-book {
  grid-template-rows: auto auto;
  align-content: center;
  row-gap: 36px;
  padding: 18px 0;
}
.story-book-hint {
  position: relative;
  bottom: auto;
  display: block;
  max-width: 100%;
  text-align: center;
  line-height: 1.6;
}
.story-intro-book:hover .story-book-hint,
.story-intro-book:focus .story-book-hint,
.story-intro-book:focus-within .story-book-hint {
  opacity: 1;
  transform: none;
}
@media (max-width: 700px) {
  .story-book-hint { bottom: auto; font-size: 10px; }
}

/* Кнопки обсуждения приводят к полям заявки. */
#order-form { scroll-margin-top: 84px; }

/* Полные иллюстрации с читаемыми надписями на телефоне. */
@media (max-width: 600px) {
  .variant-card img { display: block; height: auto; object-fit: contain; flex-shrink: 0; }
}

.back-to-top {
  position: fixed; z-index: 220; left: 20px; bottom: calc(22px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,225,144,.65); background: #171248e6;
  color: #ffd76a; font: 28px/1 Arial,sans-serif; text-decoration: none;
  box-shadow: 0 5px 18px #09062944;
}
.back-to-top[hidden] { display: none; }
.back-to-top:focus-visible { outline: 2px solid #ffd76a; outline-offset: 4px; }
@media(max-width:600px) { .back-to-top { left: 14px; } }

.book-reader { width:100%; min-width:0; position:relative; z-index:2; padding:24px 0; }
.reader-page { width:100%; aspect-ratio:1; background:#fff5df; border-radius:4px 12px 12px 4px; overflow:hidden; box-shadow:0 14px 30px #30204433; touch-action:pan-y; }
.reader-page img { display:block; width:100%; height:100%; object-fit:contain; }
.reader-controls { display:flex; align-items:center; justify-content:center; gap:24px; margin-top:20px; color:#342441; }
.reader-controls button { width:48px; height:48px; border:1px solid #bf9257; border-radius:50%; background:#ffd76a; color:#342441; font-size:24px; cursor:pointer; }
.reader-controls button:disabled { opacity:.35; cursor:default; }
.reader-hint { text-align:center; font-size:12px; line-height:1.5; color:#6e5264; }
.reader-page:focus-visible,.reader-controls button:focus-visible { outline:2px solid #733b61; outline-offset:4px; }
@media(max-width:600px){ .book-reader { padding:8px 0; } }

/* На телефоне показываем весь рисунок, текст располагается ниже. */
@media (max-width: 600px) {
  .chapter .chapter-sticky { overflow: visible; }
  .chapter .scene-image { height: auto !important; aspect-ratio: auto; flex-shrink: 0; }
  .chapter .scene-image img { display:block; width:100%; height:auto !important; object-fit:contain !important; transform:none !important; filter:none; }
  .chapter .scene-image::after, .chapter .darkness { display:none; }
  .chapter .chapter-card { margin:18px 14px 28px !important; flex-shrink:0; overflow-wrap:break-word; }
  .chapter .story-tag { max-width:100%; white-space:normal; line-height:1.6; }
}

.inline-sound { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; margin-top:12px; padding:10px 18px; border:1px solid #ffe190aa; border-radius:24px; background:#171248b3; color:#fff3cf; font:700 12px Arial,sans-serif; cursor:pointer; }
.inline-sound[aria-pressed="true"] { background:#ffd76a; color:#29204f; }
.inline-sound:focus-visible { outline:2px solid #ffd76a; outline-offset:4px; }

.real-book { position:relative; overflow:visible; perspective:1500px; border-radius:3px 12px 12px 3px; box-shadow:3px 3px 0 #d5c29e,6px 6px 0 #efe2c7,9px 9px 0 #bb9d72,0 18px 32px #30204444; }
.book-leaf { position:absolute; inset:0; overflow:hidden; border-radius:inherit; background:#fff5df; }
.book-leaf[hidden] { display:none; }
.book-leaf::after { content:''; position:absolute; inset:0; pointer-events:none; background:linear-gradient(90deg,#593f332b,transparent 8%,transparent 94%,#b4915b22); }
.text-leaf { padding:8% 9%; color:#49334d; font:clamp(13px,1.25vw,17px)/1.7 Georgia,serif; }
.text-leaf h4 { margin:12px 0 18px; font:400 clamp(23px,2.1vw,32px)/1.1 Georgia,serif; }
.text-leaf p { margin:0 0 14px; }
.text-kicker { font:9px/1.4 Arial,sans-serif; color:#99694e; letter-spacing:.08em; }
.leaf-number { position:absolute; bottom:4%; left:50%; font-size:11px; }
.page-edge { position:absolute; z-index:5; bottom:0; width:22%; height:24%; border:0; background:transparent; cursor:grab; padding:0; }
.edge-next { right:0; background:linear-gradient(135deg,transparent 72%,#d0b583 73%,#fff7e5 88%); border-radius:0 0 12px 0; }
.edge-prev { left:0; }
.page-edge:disabled { pointer-events:none; background:none; }
.page-edge:focus-visible { outline:2px solid #733b61; outline-offset:-3px; }
.turning-sheet { position:absolute; inset:0; z-index:6; transform-style:preserve-3d; transform-origin:left center; pointer-events:none; }
.turning-sheet .book-leaf { backface-visibility:hidden; }
.sheet-back { transform:rotateY(180deg); }
@media(max-width:600px) { .real-book { aspect-ratio: .78; } .text-leaf { font-size:clamp(13px,3.5vw,16px); line-height:1.6; } .text-leaf h4 { font-size:26px; } }

@media(max-width:360px) { .real-book { aspect-ratio:.65; } .text-leaf { font-size:13px; } .text-leaf h4 { font-size:23px; } }

/* Сказочная типографика текстовых страниц. */
.text-leaf {
  background:radial-gradient(ellipse at 50% 40%,#fff9e9 25%,#f1dfb8 100%);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-style:italic; color:#634532; text-align:left;
  border:1px solid #d2b478;
}
.text-leaf::before { content:"✦  ❦  ✦"; display:block; text-align:center; color:#b48b43; font-style:normal; font-size:18px; letter-spacing:.22em; margin-bottom:8px; }
.text-leaf h4 { font-family:"Baskerville", "Palatino Linotype", Palatino, Georgia,serif; font-style:italic; text-align:center; color:#805324; letter-spacing:-.02em; margin:10px 0 18px; }
.text-leaf p { text-align:left; }
.text-leaf h4 + p::first-letter { float:left; font-size:3.3em; line-height:.9; padding:4px 7px 0 0; color:#ac7d31; font-style:italic; }
.text-kicker { display:block; text-align:center; font-size:8px; opacity:.8; }
.leaf-number { color:#aa813e; }
@media(max-width:600px) { .real-book { aspect-ratio:.69; } .text-leaf { padding:7% 8%; line-height:1.65; } }
@media(max-width:360px) { .real-book { aspect-ratio:.60; } .text-leaf h4 { font-size:23px; } }

/* Две оригинальные страницы, без обрезки. */
.book-reader .real-book { aspect-ratio: 3 / 4; }
