html {
  overflow-x: hidden;
}

.book-room {
  --book-ink: #15252d;
  --book-blue: #15577a;
  --book-blue-deep: #123e56;
  --book-cyan: #79c9cb;
  --book-cyan-light: #dff4f1;
  --book-buff: #e7d9b8;
  --book-cream: #fffdf6;
  --book-pink: #f6dce5;
  --book-green: #d9ebd2;
  --book-yellow: #f4e9ad;
  --book-rule: rgba(21, 37, 45, 0.24);
  overflow-x: hidden;
  background: var(--book-cream);
  color: var(--book-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.book-room :focus-visible {
  outline-color: var(--book-blue);
}

.book-room .museum-header {
  border-color: var(--book-rule);
  background: rgba(255, 253, 246, 0.92);
  backdrop-filter: blur(1rem);
}

.book-room .museum-nav a[aria-current="page"] {
  color: var(--book-blue);
}

.book-opening {
  position: relative;
  display: grid;
  grid-template-columns: minmax(18rem, 0.72fr) minmax(30rem, 1.28fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  width: min(calc(100% - 2rem), 90rem);
  min-height: calc(100svh - 5rem);
  margin-inline: auto;
  padding: clamp(4.5rem, 10vh, 8rem) 0 clamp(6rem, 12vh, 10rem);
}

.book-opening::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 10%;
  right: -18%;
  width: min(70vw, 66rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(121, 201, 203, 0.3), rgba(121, 201, 203, 0) 68%);
  filter: blur(0.2rem);
}

.book-opening__copy {
  position: relative;
  z-index: 3;
  align-self: center;
}

.book-kicker {
  margin: 0 0 1.25rem;
  color: var(--book-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.book-opening h1 {
  max-width: none;
  margin: 0;
  color: var(--book-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.8rem, 10.2vw, 10.8rem);
  font-weight: 400;
  letter-spacing: -0.09em;
  line-height: 0.72;
}

.book-lede {
  max-width: 31rem;
  margin: clamp(2.4rem, 5vw, 4.5rem) 0 0 clamp(0rem, 5vw, 4.5rem);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.42;
}

.book-opening__pages {
  position: relative;
  min-height: clamp(33rem, 59vw, 50rem);
  perspective: 100rem;
}

.loose-page {
  position: absolute;
  display: block;
  width: min(75%, 35rem);
  aspect-ratio: 0.73;
  overflow: hidden;
  border: 1px solid rgba(21, 37, 45, 0.2);
  box-shadow: 0 2.5rem 5rem rgba(21, 37, 45, 0.15);
}

.loose-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(21, 37, 45, 0.035) 1px, transparent 1px) 0 0 / 2.4rem 100%,
    linear-gradient(rgba(21, 37, 45, 0.03) 1px, transparent 1px) 0 0 / 100% 2.4rem;
  mix-blend-mode: multiply;
}

.loose-page--back {
  top: 5%;
  right: 2%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 8%;
  background: var(--book-buff);
  color: var(--book-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  transform: rotate(8deg) translateZ(-2rem);
  animation: book-page-back 10s ease-in-out infinite alternate;
}

.loose-page--middle {
  top: 3%;
  left: 14%;
  padding: 10%;
  background: var(--book-cyan);
  color: var(--book-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-style: italic;
  transform: rotate(-7deg) translateZ(-1rem);
  animation: book-page-middle 12s ease-in-out infinite alternate;
}

.loose-page--front {
  top: 12%;
  left: 24%;
  background: rgba(255, 253, 246, 0.97);
  transform: rotate(1.5deg) translateZ(0);
  animation: book-page-front 9s ease-in-out infinite alternate;
}

.loose-page__issue {
  position: absolute;
  top: -0.19em;
  left: -0.08em;
  color: rgba(21, 87, 122, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20rem, 35vw, 32rem);
  font-weight: 700;
  letter-spacing: -0.14em;
  line-height: 1;
}

.loose-page__line {
  position: absolute;
  right: 11%;
  bottom: 31%;
  left: 11%;
  height: 1px;
  background: var(--book-blue-deep);
}

.loose-page__word {
  position: absolute;
  right: 10%;
  bottom: 7%;
  color: var(--book-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: -0.07em;
}

.book-ribbon {
  position: absolute;
  z-index: 5;
  top: 10%;
  left: 49%;
  width: 0.8rem;
  height: 79%;
  border-radius: 0 0 50% 50%;
  background: #dc6b52;
  box-shadow: 0 0.2rem 0.5rem rgba(21, 37, 45, 0.2);
  transform: rotate(7deg);
  transform-origin: top center;
  animation: book-ribbon 8s ease-in-out infinite alternate;
}

.book-opening__aside {
  position: absolute;
  right: 0;
  bottom: 2rem;
  margin: 0;
  color: rgba(21, 37, 45, 0.65);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  line-height: 1.65;
  text-align: right;
  text-transform: uppercase;
}

.book-moods {
  width: 100%;
}

.book-mood {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  min-height: 100svh;
  padding: clamp(4.5rem, 9vw, 9rem) max(1rem, calc((100vw - 90rem) / 2));
  overflow: hidden;
  isolation: isolate;
}

.book-mood__copy {
  position: relative;
  z-index: 3;
  grid-column: 1 / span 5;
  max-width: 39rem;
}

.book-mood__copy h2 {
  margin: 0 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 8.8vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.84;
}

.book-mood__copy > p:last-child {
  max-width: 29rem;
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.book-mood__composition {
  position: relative;
  z-index: 2;
  grid-column: 7 / -1;
  width: 100%;
  aspect-ratio: 0.92;
  box-shadow: 0 2rem 5rem rgba(21, 37, 45, 0.15);
  transform: rotate(1.5deg);
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.book-mood:hover .book-mood__composition {
  transform: rotate(0deg) translateY(-0.5rem);
}

.book-mood--first {
  background: #e9dbba;
  color: var(--book-blue-deep);
}

.book-mood--first::before {
  content: "";
  position: absolute;
  top: -15vw;
  left: -12vw;
  width: 45vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(121, 201, 203, 0.38);
  filter: blur(0.3rem);
}

.composition-first {
  overflow: hidden;
  border: 1px solid var(--book-blue-deep);
  background: #f9f5e8;
}

.composition-first::before {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(18, 62, 86, 0.45);
}

.composition-first__title {
  position: absolute;
  z-index: 2;
  top: 5%;
  left: 9%;
  color: var(--book-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(8rem, 19vw, 18rem);
  font-weight: 700;
  letter-spacing: -0.1em;
  line-height: 0.8;
}

.composition-first__block {
  position: absolute;
  display: block;
}

.composition-first__block--one {
  right: 7%;
  bottom: 7%;
  width: 34%;
  height: 46%;
  background: var(--book-blue);
}

.composition-first__block--two {
  bottom: 7%;
  left: 7%;
  width: 43%;
  height: 25%;
  background: var(--book-cyan);
}

.composition-first__rule {
  position: absolute;
  top: 52%;
  right: 20%;
  left: 7%;
  height: 1px;
  background: var(--book-blue-deep);
}

.composition-first__note {
  position: absolute;
  z-index: 3;
  right: 10%;
  bottom: 11%;
  color: #fffdf6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  font-style: italic;
  line-height: 0.92;
  text-align: right;
}

.book-mood--second {
  background: var(--book-cyan-light);
  color: var(--book-blue-deep);
}

.book-mood--second .book-mood__copy {
  grid-column: 8 / -1;
  grid-row: 1;
}

.book-mood--second .book-mood__composition {
  grid-column: 1 / span 6;
  grid-row: 1;
  transform: rotate(-1.5deg);
}

.book-mood--second:hover .book-mood__composition {
  transform: rotate(0deg) translateY(-0.5rem);
}

.composition-second {
  overflow: hidden;
  border: 1px solid var(--book-blue-deep);
  background: #fffdf6;
}

.composition-second__spine {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  align-items: flex-end;
  width: 25%;
  padding: 0 0 2% 1%;
  overflow: hidden;
  background: var(--book-cyan);
  color: rgba(18, 62, 86, 0.33);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15rem, 30vw, 28rem);
  font-weight: 700;
  letter-spacing: -0.16em;
  line-height: 0.7;
  writing-mode: vertical-rl;
}

.composition-second__word {
  position: absolute;
  top: 12%;
  left: 32%;
  color: var(--book-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 10vw, 9rem);
  font-style: italic;
  letter-spacing: -0.08em;
}

.composition-second__rule {
  position: absolute;
  right: 8%;
  left: 33%;
  height: 1px;
  background: rgba(18, 62, 86, 0.48);
}

.composition-second__rule--one { top: 55%; }
.composition-second__rule--two { top: 63%; right: 27%; }
.composition-second__rule--three { top: 71%; left: 47%; }

.composition-second__circle {
  position: absolute;
  right: 8%;
  bottom: 9%;
  width: 20%;
  aspect-ratio: 1;
  border: 1px solid var(--book-blue);
  border-radius: 50%;
}

.book-mood--third {
  background: #fffaf3;
  color: var(--book-blue-deep);
}

.book-mood--third::before,
.book-mood--third::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(0.15rem);
}

.book-mood--third::before {
  top: -12rem;
  right: -10rem;
  width: 36rem;
  aspect-ratio: 1;
  background: rgba(246, 220, 229, 0.6);
}

.book-mood--third::after {
  bottom: -13rem;
  left: 28%;
  width: 34rem;
  aspect-ratio: 1;
  background: rgba(217, 235, 210, 0.62);
}

.composition-third {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.7rem;
  padding: 0.7rem;
  background: #fffdf6;
}

.composition-third span {
  display: flex;
  align-items: flex-end;
  padding: clamp(1.3rem, 3vw, 2.5rem);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3.6vw, 3.4rem);
  letter-spacing: -0.05em;
}

.composition-third span:nth-child(1) { background: #d9ecf3; }
.composition-third span:nth-child(2) { background: var(--book-pink); }
.composition-third span:nth-child(3) { background: var(--book-green); }
.composition-third span:nth-child(4) { background: var(--book-yellow); }

.composition-third strong {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--book-blue-deep);
  color: #fffdf6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 400;
  transform: translate(-50%, -50%);
}

.book-closing {
  position: relative;
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(3rem, 9vw, 9rem);
  align-items: center;
  width: min(calc(100% - 2rem), 90rem);
  min-height: 88svh;
  margin-inline: auto;
  padding-block: clamp(5rem, 10vw, 9rem);
}

.book-closing__mark {
  position: relative;
  width: min(100%, 34rem);
  aspect-ratio: 0.8;
  overflow: hidden;
  border: 1px solid var(--book-blue-deep);
  background: var(--book-blue-deep);
  box-shadow: 1.2rem 1.2rem 0 var(--book-cyan-light);
}

.book-closing__mark::before,
.book-closing__mark::after {
  content: "";
  position: absolute;
  background: var(--book-cyan);
}

.book-closing__mark::before {
  top: 9%;
  right: 8%;
  width: 27%;
  height: 1px;
}

.book-closing__mark::after {
  right: 8%;
  bottom: 9%;
  width: 1px;
  height: 32%;
}

.book-closing__mark span {
  position: absolute;
  right: -0.1em;
  bottom: -0.28em;
  color: rgba(255, 253, 246, 0.94);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20rem, 38vw, 36rem);
  font-weight: 700;
  letter-spacing: -0.14em;
  line-height: 1;
}

.book-closing__copy h2 {
  max-width: 10ch;
  margin: 0 0 2rem;
  color: var(--book-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 8vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.87;
}

.book-closing__copy > p:not(.book-kicker) {
  max-width: 32rem;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

.book-closing__copy a {
  display: inline-flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--book-blue);
  color: var(--book-blue);
  font-weight: 700;
  text-decoration: none;
}

.book-closing__copy a span {
  transition: transform 250ms ease;
}

.book-closing__copy a:hover span {
  transform: translateX(0.35rem);
}

.book-room .museum-footer {
  background: var(--book-blue-deep);
}

@keyframes book-page-back {
  from { transform: rotate(8deg) translate3d(0, 0, -2rem); }
  to { transform: rotate(6.5deg) translate3d(0.4rem, -0.6rem, -2rem); }
}

@keyframes book-page-middle {
  from { transform: rotate(-7deg) translate3d(0, 0, -1rem); }
  to { transform: rotate(-5.5deg) translate3d(-0.5rem, 0.5rem, -1rem); }
}

@keyframes book-page-front {
  from { transform: rotate(1.5deg) translateY(0); }
  to { transform: rotate(0.5deg) translateY(-0.65rem); }
}

@keyframes book-ribbon {
  from { transform: rotate(7deg); }
  to { transform: rotate(5deg) translateX(0.25rem); }
}

@media (max-width: 68rem) {
  .book-opening {
    grid-template-columns: minmax(16rem, 0.82fr) minmax(25rem, 1.18fr);
  }

  .book-mood__copy {
    grid-column: 1 / span 5;
  }

  .book-mood__composition {
    grid-column: 6 / -1;
  }

  .book-mood--second .book-mood__copy {
    grid-column: 8 / -1;
  }

  .book-mood--second .book-mood__composition {
    grid-column: 1 / span 6;
  }
}

@media (max-width: 52rem) {
  .book-opening {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: auto;
    padding-top: 4rem;
  }

  .book-opening__copy {
    max-width: 42rem;
  }

  .book-lede {
    margin-left: clamp(0rem, 8vw, 4rem);
  }

  .book-opening__pages {
    width: min(100%, 38rem);
    min-height: min(110vw, 45rem);
    margin: 1rem auto 0;
  }

  .book-opening__aside {
    display: none;
  }

  .book-mood {
    grid-template-columns: 1fr;
    gap: clamp(3rem, 9vw, 6rem);
    min-height: auto;
    padding-block: clamp(5rem, 15vw, 8rem);
  }

  .book-mood__copy,
  .book-mood--second .book-mood__copy {
    grid-column: 1;
    grid-row: auto;
  }

  .book-mood__composition,
  .book-mood--second .book-mood__composition {
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 42rem);
    justify-self: center;
  }

  .book-mood--second .book-mood__copy {
    order: 1;
  }

  .book-mood--second .book-mood__composition {
    order: 2;
  }

  .book-closing {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .book-closing__mark {
    width: min(78vw, 30rem);
  }
}

@media (max-width: 34rem) {
  .book-opening,
  .book-closing {
    width: min(calc(100% - 1.25rem), 90rem);
  }

  .book-opening h1 {
    font-size: clamp(4rem, 21vw, 6.2rem);
  }

  .book-lede {
    margin-top: 2rem;
    font-size: 1.2rem;
  }

  .book-opening__pages {
    min-height: 125vw;
  }

  .loose-page {
    width: 78%;
  }

  .loose-page--middle {
    left: 7%;
  }

  .loose-page--front {
    left: 18%;
  }

  .book-mood {
    padding-inline: 0.625rem;
  }

  .book-mood__copy h2,
  .book-closing__copy h2 {
    font-size: clamp(3.7rem, 18vw, 5.7rem);
  }

  .book-mood__composition {
    aspect-ratio: 0.82;
  }

  .composition-third {
    gap: 0.35rem;
    padding: 0.35rem;
  }

  .composition-third span {
    padding: 1rem;
    font-size: 1.35rem;
  }

  .book-closing__mark {
    box-shadow: 0.65rem 0.65rem 0 var(--book-cyan-light);
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-room *,
  .book-room *::before,
  .book-room *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Rich image-led opening: the editorial book world is the room, not a thumbnail. */
.book-opening__art {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  aspect-ratio: 1.58;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 62, 86, 0.22);
  border-radius: 42% 4% 38% 8%;
  background: var(--book-cyan-light);
  box-shadow:
    0 0 0 0.8rem rgba(255, 253, 246, 0.78),
    0 0 0 0.9rem rgba(18, 62, 86, 0.12),
    0 2.6rem 6rem rgba(18, 62, 86, 0.2);
  transform: rotate(0.6deg);
}

.book-opening__art::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(255, 253, 246, 0.12), transparent 42%),
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.35), transparent 23%);
  content: "";
  pointer-events: none;
}

.book-opening__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.book-opening__art:hover img {
  transform: scale(1.025);
}

.book-opening__pages {
  z-index: 5;
  grid-column: 2;
  grid-row: 1;
  width: min(40%, 20rem);
  min-height: clamp(20rem, 28vw, 28rem);
  align-self: end;
  justify-self: end;
  margin: 0 -2% -8% 0;
  transform: rotate(2deg);
}

@media (max-width: 52rem) {
  .book-opening__art {
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 46rem);
    margin: 2rem auto 0;
    border-radius: 28% 3% 24% 5%;
  }

  .book-opening__pages {
    position: absolute;
    right: 0;
    bottom: 2.5rem;
    width: min(38vw, 17rem);
    min-height: min(52vw, 23rem);
    margin: 0;
  }
}

@media (max-width: 34rem) {
  .book-opening__art {
    aspect-ratio: 0.94;
  }

  .book-opening__art img {
    object-position: 64% center;
  }

  .book-opening__pages {
    right: -0.4rem;
    bottom: 1.2rem;
    width: 42vw;
    min-height: 58vw;
  }
}

@media (prefers-contrast: more) {
  .book-room {
    --book-ink: #000;
    --book-blue: #004f78;
    --book-blue-deep: #002f48;
    --book-rule: #000;
  }

  .loose-page,
  .book-mood__composition,
  .book-closing__mark {
    border-width: 2px;
  }
}

@media print {
  .book-opening,
  .book-mood,
  .book-closing {
    min-height: auto;
    break-inside: avoid;
  }

  .loose-page,
  .book-mood__composition,
  .book-closing__mark {
    box-shadow: none;
  }
}

/* A small cabinet of reading delights: paper, bookmarks and lucky stars. */
.book-room {
  background:
    radial-gradient(circle at 12% 8%, rgba(246, 220, 229, 0.4), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(121, 201, 203, 0.24), transparent 27rem),
    var(--book-cream);
}

.book-room .museum-header {
  box-shadow: 0 0.7rem 2.6rem rgba(18, 62, 86, 0.06);
}

.book-room .museum-nav a[aria-current="page"] {
  position: relative;
  text-decoration: none;
}

.book-room .museum-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0.3rem;
  bottom: 0.45rem;
  left: 0.3rem;
  height: 0.3rem;
  border-radius: 70% 30% 65% 35%;
  background: var(--book-cyan);
  transform: rotate(-1.5deg);
}

.book-opening {
  isolation: isolate;
}

.book-opening::after {
  content: "";
  position: absolute;
  z-index: -2;
  right: 2%;
  bottom: 10%;
  width: min(43vw, 39rem);
  height: 19%;
  border-radius: 50%;
  background: rgba(18, 62, 86, 0.13);
  filter: blur(2rem);
  transform: rotate(5deg);
}

.book-opening__copy::before {
  content: "“";
  position: absolute;
  z-index: -1;
  top: -0.55em;
  left: -0.18em;
  color: rgba(121, 201, 203, 0.19);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(12rem, 22vw, 22rem);
  line-height: 1;
}

.book-opening h1 {
  text-shadow: 0.035em 0.045em 0 rgba(121, 201, 203, 0.22);
}

.book-opening__charms {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.book-charm {
  position: absolute;
  display: block;
}

.book-charm--spark {
  top: 16%;
  left: 44%;
  color: #dc6b52;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  animation: book-twinkle 4.6s ease-in-out infinite;
}

.book-charm--moon {
  top: 10%;
  right: -2%;
  width: clamp(4rem, 8vw, 7rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--book-yellow);
  box-shadow: inset -1.5rem -0.4rem 0 rgba(18, 62, 86, 0.08), 0.7rem 0.9rem 0 rgba(18, 62, 86, 0.06);
  transform: rotate(-12deg);
}

.book-charm--dot {
  bottom: 22%;
  left: 39%;
  width: 1.15rem;
  aspect-ratio: 1;
  border: 0.25rem solid var(--book-blue);
  border-radius: 50%;
  background: var(--book-cream);
}

.book-charm--line {
  bottom: 16%;
  left: 36%;
  width: 8rem;
  height: 3rem;
  border-top: 0.15rem solid #dc6b52;
  border-radius: 50%;
  transform: rotate(-19deg);
}

.loose-page {
  border-radius: 0.12rem 0.4rem 0.18rem 0.7rem;
  box-shadow:
    0.25rem 0.35rem 0 rgba(18, 62, 86, 0.08),
    0.8rem 1rem 0 rgba(121, 201, 203, 0.09),
    0 2.5rem 5rem rgba(21, 37, 45, 0.16);
}

.loose-page--back::before {
  content: "✦";
  position: absolute;
  top: 8%;
  left: 10%;
  color: rgba(18, 62, 86, 0.5);
  font-size: clamp(2rem, 4vw, 4rem);
}

.loose-page--middle::before {
  content: "";
  position: absolute;
  right: 9%;
  bottom: 8%;
  width: 26%;
  aspect-ratio: 1;
  border: 1px solid rgba(18, 62, 86, 0.5);
  border-radius: 50%;
  box-shadow: -2.7rem -1.9rem 0 -0.3rem rgba(246, 220, 229, 0.78);
}

.loose-page--front {
  background:
    radial-gradient(circle at 88% 12%, rgba(246, 220, 229, 0.7), transparent 18%),
    linear-gradient(90deg, rgba(21, 37, 45, 0.035) 1px, transparent 1px) 0 0 / 2.4rem 100%,
    linear-gradient(rgba(21, 37, 45, 0.03) 1px, transparent 1px) 0 0 / 100% 2.4rem,
    rgba(255, 253, 246, 0.98);
}

.loose-page__corner {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  border-color: rgba(21, 87, 122, 0.47);
  border-style: solid;
}

.loose-page__corner--top {
  top: 7%;
  right: 7%;
  border-width: 1px 1px 0 0;
}

.loose-page__corner--bottom {
  bottom: 7%;
  left: 7%;
  border-width: 0 0 1px 1px;
}

.book-ribbon--short {
  z-index: 4;
  top: 13%;
  left: 57%;
  width: 0.58rem;
  height: 45%;
  background: var(--book-yellow);
  transform: rotate(2deg);
  animation-delay: -2s;
}

.book-opening__shadow {
  position: absolute;
  right: 1%;
  bottom: 4%;
  left: 13%;
  height: 11%;
  border-radius: 50%;
  background: rgba(18, 62, 86, 0.19);
  filter: blur(1.7rem);
  transform: rotate(3deg);
}

.book-friend {
  position: absolute;
  z-index: 5;
  top: 1.7rem;
  right: 18%;
  width: 2.7rem;
  height: 4.4rem;
  border-radius: 0.2rem 0.2rem 45% 45%;
  background: #dc6b52;
  box-shadow: 0.2rem 0.25rem 0 rgba(18, 62, 86, 0.12);
  transform: rotate(4deg) translateY(-2.5rem);
  animation: book-friend-peek 6s ease-in-out infinite;
}

.book-friend::before {
  content: "··";
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  color: var(--book-blue-deep);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.3rem;
  line-height: 1;
}

.book-friend::after {
  content: "";
  position: absolute;
  top: 2.05rem;
  left: 0.86rem;
  width: 0.9rem;
  height: 0.42rem;
  border-bottom: 0.14rem solid var(--book-blue-deep);
  border-radius: 50%;
}

.book-friend i,
.book-friend i::before {
  position: absolute;
  bottom: -0.48rem;
  width: 1.55rem;
  height: 1rem;
  background: #dc6b52;
  content: "";
  transform: skewY(-28deg);
}

.book-friend i { left: 0; }
.book-friend i::before { left: 1.14rem; transform: skewY(28deg); }

.book-mood {
  border-top: 0.75rem solid rgba(255, 253, 246, 0.62);
}

.book-mood__ornaments {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.book-mood__ornaments span {
  position: absolute;
  display: block;
}

.book-mood--first .book-mood__ornaments span:nth-child(1) {
  top: 14%;
  left: 4%;
  width: 4rem;
  aspect-ratio: 1;
  border: 1px solid rgba(18, 62, 86, 0.26);
  border-radius: 50%;
  box-shadow: 1.25rem 1.25rem 0 rgba(220, 107, 82, 0.34);
}

.book-mood--first .book-mood__ornaments span:nth-child(2) {
  right: 45%;
  bottom: 6%;
  width: 7rem;
  height: 2.3rem;
  border-top: 0.16rem solid var(--book-blue);
  border-radius: 50%;
  transform: rotate(13deg);
}

.book-mood--first .book-mood__ornaments span:nth-child(3),
.book-mood--first .book-mood__ornaments span:nth-child(4) {
  top: 8%;
  right: 7%;
  width: 0.8rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #dc6b52;
}

.book-mood--first .book-mood__ornaments span:nth-child(4) {
  top: 12%;
  right: 11%;
  width: 0.42rem;
  background: var(--book-blue);
}

.composition-first,
.composition-second,
.composition-third {
  box-shadow:
    0.65rem 0.75rem 0 rgba(18, 62, 86, 0.08),
    1.4rem 1.6rem 0 rgba(255, 253, 246, 0.36),
    0 2.5rem 5rem rgba(21, 37, 45, 0.16);
}

.composition-first {
  background:
    radial-gradient(circle at 83% 17%, rgba(244, 233, 173, 0.9) 0 6%, transparent 6.2%),
    radial-gradient(circle at 1px 1px, rgba(18, 62, 86, 0.08) 1px, transparent 1.4px) 0 0 / 1.2rem 1.2rem,
    #f9f5e8;
}

.composition-first__stamp {
  position: absolute;
  z-index: 4;
  top: 30%;
  right: 10%;
  display: grid;
  width: 15%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--book-blue);
  border-radius: 50%;
  color: #dc6b52;
  font-size: clamp(1.7rem, 4vw, 3.6rem);
  transform: rotate(12deg);
}

.composition-first__tape {
  position: absolute;
  z-index: 5;
  top: -2%;
  right: 24%;
  width: 23%;
  height: 8%;
  background: rgba(244, 233, 173, 0.8);
  box-shadow: 0 0.15rem 0.4rem rgba(18, 62, 86, 0.1);
  clip-path: polygon(3% 6%, 97% 0, 100% 88%, 2% 100%);
  transform: rotate(2deg);
}

.book-mood--second {
  background:
    radial-gradient(circle at 90% 9%, rgba(244, 233, 173, 0.7) 0 5rem, transparent 5.1rem),
    radial-gradient(circle at 1px 1px, rgba(18, 62, 86, 0.055) 1px, transparent 1.4px) 0 0 / 2.2rem 2.2rem,
    var(--book-cyan-light);
}

.book-mood--second .book-mood__ornaments span:nth-child(1) {
  top: 12%;
  right: 3%;
  width: 9rem;
  height: 4rem;
  border-top: 0.15rem solid rgba(18, 62, 86, 0.45);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.book-mood--second .book-mood__ornaments span:nth-child(2),
.book-mood--second .book-mood__ornaments span:nth-child(3),
.book-mood--second .book-mood__ornaments span:nth-child(4) {
  right: 7%;
  bottom: 13%;
  width: 1.15rem;
  aspect-ratio: 1;
  border: 0.18rem solid var(--book-blue);
  border-radius: 50%;
}

.book-mood--second .book-mood__ornaments span:nth-child(3) { right: 11%; bottom: 9%; width: 0.65rem; }
.book-mood--second .book-mood__ornaments span:nth-child(4) { right: 14%; bottom: 14%; width: 0.4rem; background: #dc6b52; border: 0; }

.composition-second {
  background:
    linear-gradient(115deg, transparent 62%, rgba(246, 220, 229, 0.62) 62% 77%, transparent 77%),
    #fffdf6;
}

.composition-second__quote {
  position: absolute;
  right: 8%;
  bottom: -0.28em;
  color: rgba(121, 201, 203, 0.36);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(11rem, 24vw, 22rem);
  line-height: 1;
}

.composition-second__bookmark {
  position: absolute;
  top: -1%;
  right: 18%;
  width: 8%;
  height: 35%;
  background: #dc6b52;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  box-shadow: 0.2rem 0.25rem 0 rgba(18, 62, 86, 0.12);
}

.book-mood--third {
  background:
    radial-gradient(circle at 88% 11%, rgba(246, 220, 229, 0.65), transparent 22rem),
    radial-gradient(circle at 13% 88%, rgba(217, 235, 210, 0.76), transparent 22rem),
    repeating-linear-gradient(118deg, transparent 0 5rem, rgba(18, 62, 86, 0.025) 5rem 5.1rem),
    #fffaf3;
}

.book-mood--third .book-mood__ornaments span:nth-child(1) {
  top: 12%;
  right: 9%;
  width: 3.7rem;
  aspect-ratio: 1;
  border-radius: 50% 50% 50% 0;
  background: var(--book-yellow);
  transform: rotate(21deg);
}

.book-mood--third .book-mood__ornaments span:nth-child(2) {
  top: 19%;
  right: 13%;
  width: 0.15rem;
  height: 7rem;
  border-radius: 50%;
  background: var(--book-blue);
  transform: rotate(34deg);
}

.book-mood--third .book-mood__ornaments span:nth-child(3) {
  right: 43%;
  bottom: 7%;
  width: 6rem;
  aspect-ratio: 1;
  border: 1px solid rgba(18, 62, 86, 0.32);
  border-radius: 50%;
}

.book-mood--third .book-mood__ornaments span:nth-child(4) {
  right: 45%;
  bottom: 9%;
  width: 4.2rem;
  aspect-ratio: 1;
  border: 1px dashed rgba(18, 62, 86, 0.35);
  border-radius: 50%;
}

.composition-third {
  gap: 1rem;
  padding: 1rem;
  background:
    repeating-linear-gradient(90deg, rgba(18, 62, 86, 0.025) 0 1px, transparent 1px 1.5rem),
    #fffdf6;
}

.composition-third span {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(18, 62, 86, 0.13);
  box-shadow: 0.3rem 0.4rem 0 rgba(18, 62, 86, 0.05);
}

.composition-third span::before {
  content: "";
  position: absolute;
  top: 9%;
  right: 8%;
  width: 22%;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.24;
}

.composition-third span:nth-child(2)::before {
  border-radius: 50% 50% 50% 0;
  transform: rotate(20deg);
}

.composition-third span:nth-child(3)::before {
  border-radius: 0;
  transform: rotate(10deg);
}

.composition-third span:nth-child(4)::before {
  content: "✦";
  display: grid;
  place-items: center;
  border: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  opacity: 0.5;
}

.composition-third strong {
  box-shadow:
    0 0 0 0.45rem var(--book-cream),
    0 0 0 0.55rem rgba(18, 62, 86, 0.25),
    0.7rem 0.85rem 0 rgba(18, 62, 86, 0.09);
  animation: book-medallion 9s ease-in-out infinite;
}

.book-closing::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 17%;
  right: -12%;
  width: min(45vw, 37rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 42%, var(--book-pink) 0 2%, transparent 2.2%),
    radial-gradient(circle at 58% 28%, var(--book-cyan) 0 1.1%, transparent 1.3%),
    radial-gradient(circle at 63% 61%, var(--book-yellow) 0 2.4%, transparent 2.6%),
    rgba(217, 235, 210, 0.5);
}

.book-closing__mark {
  border-radius: 0.25rem 1.5rem 0.25rem 0.25rem;
  box-shadow:
    0.8rem 0.8rem 0 var(--book-cyan),
    1.6rem 1.6rem 0 var(--book-pink),
    2.4rem 2.4rem 0 var(--book-yellow),
    0 2.5rem 4.5rem rgba(18, 62, 86, 0.16);
  transform: rotate(-1.2deg);
}

.book-closing__star {
  position: absolute;
  z-index: 4;
  top: 9%;
  left: 10%;
  color: var(--book-yellow);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-style: normal;
  animation: book-twinkle 4.6s ease-in-out infinite -1.2s;
}

.book-closing__shelf {
  position: absolute;
  z-index: 4;
  right: 8%;
  bottom: 7%;
  left: 8%;
  height: 0.55rem;
  border-radius: 100%;
  background: var(--book-cyan);
  box-shadow: 0 0.6rem 0 rgba(255, 253, 246, 0.15);
}

.book-closing__peek {
  position: absolute;
  z-index: 5;
  right: 11%;
  bottom: 8%;
  width: 3.4rem;
  height: 5.5rem;
  border-radius: 0.25rem 0.25rem 48% 48%;
  background: #dc6b52;
  box-shadow: 0.25rem 0.3rem 0 rgba(0, 0, 0, 0.12);
  font-style: normal;
  transform: rotate(4deg);
}

.book-closing__peek::before {
  content: "··";
  position: absolute;
  top: 0.85rem;
  left: 0.72rem;
  color: var(--book-blue-deep);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.35rem;
}

.book-closing__peek::after {
  content: "";
  position: absolute;
  top: 2.55rem;
  left: 1.05rem;
  width: 1rem;
  height: 0.45rem;
  border-bottom: 0.14rem solid var(--book-blue-deep);
  border-radius: 50%;
}

.book-closing__peek b,
.book-closing__peek b::after {
  position: absolute;
  bottom: -0.45rem;
  width: 1.9rem;
  height: 1.2rem;
  background: #dc6b52;
  content: "";
}

.book-closing__peek b { left: 0; clip-path: polygon(0 0, 100% 0, 52% 100%); }
.book-closing__peek b::after { left: 1.45rem; clip-path: polygon(0 0, 100% 0, 48% 100%); }

@keyframes book-twinkle {
  0%, 100% { opacity: 0.58; transform: rotate(0deg) scale(0.9); }
  50% { opacity: 1; transform: rotate(12deg) scale(1.08); }
}

@keyframes book-friend-peek {
  0%, 12%, 100% { transform: rotate(4deg) translateY(-2.5rem); }
  22%, 72% { transform: rotate(2deg) translateY(-0.4rem); }
  82% { transform: rotate(7deg) translateY(-0.25rem); }
}

@keyframes book-medallion {
  0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); }
  50% { transform: translate(-50%, -50%) rotate(2deg); }
}

@media (max-width: 52rem) {
  .book-charm--spark { top: 24%; left: auto; right: 7%; }
  .book-charm--moon { top: 30%; right: 2%; }
  .book-charm--dot,
  .book-charm--line { display: none; }

  .book-mood__ornaments {
    opacity: 0.72;
  }

  .book-closing::before {
    top: auto;
    right: -20%;
    bottom: 4%;
    width: 28rem;
  }
}

@media (max-width: 34rem) {
  .book-opening__copy::before { font-size: 10rem; }
  .book-charm--spark { top: 25%; font-size: 2.1rem; }
  .book-charm--moon { top: 31%; width: 3.5rem; }
  .book-friend { right: 13%; transform: scale(0.8) rotate(4deg) translateY(-2.5rem); }

  .book-mood__ornaments span {
    opacity: 0.68;
  }

  .composition-third {
    gap: 0.45rem;
    padding: 0.45rem;
  }

  .book-closing__mark {
    box-shadow:
      0.45rem 0.45rem 0 var(--book-cyan),
      0.9rem 0.9rem 0 var(--book-pink),
      1.35rem 1.35rem 0 var(--book-yellow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-room *,
  .book-room *::before,
  .book-room *::after {
    animation: none !important;
    transition: none !important;
  }
}
