body:has(.storybook-start-page) {
  background-color: var(--night);
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.58) 0%, rgba(29, 18, 46, 0.22) 38%, rgba(29, 18, 46, 0.72) 100%),
    radial-gradient(circle at 12% 12%, rgba(255, 229, 119, 0.18), transparent 19rem),
    radial-gradient(circle at 86% 18%, rgba(113, 218, 203, 0.16), transparent 22rem),
    radial-gradient(circle at 50% 84%, rgba(193, 68, 122, 0.15), transparent 24rem),
    url('/images/lina-first-path.webp?v=2026-05-24-start-bg-01'),
    radial-gradient(circle, rgba(255, 248, 232, 0.08) 1px, transparent 1px);
  background-position:
    center top,
    center top,
    center top,
    center bottom,
    center top,
    center top;
  background-repeat:
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    repeat;
  background-size:
    cover,
    auto,
    auto,
    auto,
    cover,
    28px 28px;
  background-attachment: fixed, scroll, scroll, scroll, fixed, scroll;
}

.storybook-start-page {
  display: grid;
  gap: 1rem;
}

.storybook-start-page .page-section {
  background: rgba(250, 245, 236, 0.68);
  border: 1px solid rgba(255, 248, 232, 0.54);
  border-radius: 1.35rem;
  box-shadow: 0 1rem 2.6rem rgba(9, 5, 18, 0.18);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.storybook-chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.3rem;
}

.storybook-chapter-card {
  display: grid;
  grid-template-rows: minmax(8.2rem, auto) 1fr;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(255, 250, 242, 0.82);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid rgba(31, 23, 48, 0.12);
  box-shadow: 0 0.7rem 1.8rem rgba(9, 5, 18, 0.12);
}

.storybook-chapter-card:hover,
.storybook-chapter-card:focus-visible {
  transform: translateY(-0.08rem);
  box-shadow: 0 1rem 2.4rem rgba(9, 5, 18, 0.22);
}

.storybook-chapter-card:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

.storybook-chapter-card__image {
  min-height: 8.2rem;
  display: block;
  overflow: hidden;
  background-color: #1f1730;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.storybook-chapter-card__image::before,
.storybook-chapter-card__image::after,
.storybook-chapter-card__mark {
  display: none;
}

.storybook-chapter-card__copy {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
}

.storybook-chapter-card__number {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6d3b91;
}

.storybook-chapter-card strong {
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.25;
}

.storybook-chapter-card--1 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.16)),
    url('/images/storybook/chapters/chapter-01-the-first-walk.webp?v=2026-05-24-upload-01');
}

.storybook-chapter-card--2 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.12)),
    url('/images/storybook/chapters/chapter-02-nearside.webp?v=2026-05-24-upload-01');
}

.storybook-chapter-card--3 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.12)),
    url('/images/storybook/chapters/chapter-03-the-forest.webp?v=2026-05-24-upload-01');
}

.storybook-chapter-card--4 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.14)),
    url('/images/storybook/chapters/chapter-04-the-rim-and-the-rimaeri.webp?v=2026-05-24-upload-01');
}

.storybook-chapter-card--5 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.14)),
    url('/images/storybook/chapters/chapter-05-the-central-river.webp?v=2026-05-24-upload-01');
}

.storybook-chapter-card--6 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.14)),
    url('/images/storybook/chapters/chapter-06-farside.webp?v=2026-05-24-upload-01');
}

.storybook-chapter-card--7 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.14)),
    url('/images/storybook/chapters/chapter-07-the-cliff-caves.webp?v=2026-05-24-upload-01');
}

.storybook-chapter-card--8 .storybook-chapter-card__image {
  background-image:
    linear-gradient(180deg, rgba(29, 18, 46, 0.02), rgba(29, 18, 46, 0.14)),
    url('/images/storybook/chapters/chapter-08-the-end-of-the-world.webp?v=2026-05-24-upload-01');
}

@media (max-width: 1000px) {
  .storybook-chapter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body:has(.storybook-start-page) {
    background-attachment: scroll;
    background-size:
      cover,
      auto,
      auto,
      auto,
      auto 100%,
      28px 28px;
  }

  .storybook-start-page .page-section {
    border-radius: 1rem;
  }

  .storybook-chapter-grid {
    grid-template-columns: 1fr;
  }
}
