html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.book {
  position: relative;
  width: 170px;
  height: 130px;
  perspective: 800px;
}

.book__page {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  font-family: inherit;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.book__cover {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  animation: open 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.book__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  font-family: inherit;
  color: #fff7e6;
  backface-visibility: hidden;
}

.book__face--front {
  background: #0a4fe8;
}

.book__face--back {
  background: rgb(2.7645438341%, 21.8398962891%, 64.1374169503%);
  transform: rotateY(180deg);
}

@keyframes open {
  0%, 15% {
    transform: rotateY(0deg);
  }
  55% {
    transform: rotateY(-150deg);
  }
  85%, 100% {
    transform: rotateY(0deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .book__cover {
    animation: none;
    transform: rotateY(-150deg);
  }
}
