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);
}

.pt {
  --h: clamp(148px, 58vh, 176px);
  width: min(340px, 92vw);
}

.pt__scroller {
  height: var(--h);
  overflow-y: auto;
  scrollbar-width: none;
}
.pt__scroller::-webkit-scrollbar {
  display: none;
}

.pt__pad {
  height: calc(var(--h) * 2.2);
}

.pt__pin {
  position: sticky;
  top: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  height: var(--h);
}

.pt__book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 240px;
  height: 112px;
  border-radius: 16px;
  background: #f2eff5;
  perspective: 900px;
}

.pt__half {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  color: rgba(23, 20, 26, 0.72);
}

.pt__half--left {
  border-right: 1px dashed rgba(23, 20, 26, 0.2);
}

.pt__no {
  color: #0a4fe8;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.pt__title {
  color: #17141a;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
}

.pt__small {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.pt__page {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 112px;
  transform-origin: left center;
  transform-style: preserve-3d;
  animation-name: pt-turn;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(nearest block);
}

@keyframes pt-turn {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(-180deg);
  }
}
.pt__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border-radius: 0 16px 16px 0;
  backface-visibility: hidden;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.pt__face--front {
  background: #fff7e6;
}

.pt__face--back {
  background: repeating-linear-gradient(135deg, #e3ddef 0 8px, #d6cee6 8px 16px);
  transform: rotateY(180deg);
}

.pt__rail {
  width: 240px;
  height: 4px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.12);
}

.pt__fill {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #2f6df6;
  transform: scaleX(0);
  transform-origin: left center;
  animation-name: pt-read;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(nearest block);
}

@keyframes pt-read {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.pt.is-demo .pt__page {
  animation-name: pt-cut;
  animation-duration: 1s;
  animation-timing-function: steps(1, end);
  animation-direction: alternate;
  animation-iteration-count: infinite;
  animation-timeline: auto;
}

.pt.is-demo .pt__fill {
  animation-duration: 1s;
  animation-direction: alternate;
  animation-iteration-count: infinite;
  animation-timeline: auto;
}

@keyframes pt-cut {
  0%, 49% {
    transform: rotateY(0deg);
  }
  50%, 100% {
    transform: rotateY(-180deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pt__page {
    animation: none !important;
    transform: rotateY(0deg);
  }
  .pt__fill {
    animation: none !important;
    transform: scaleX(0.5);
  }
}
