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

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

.pages {
  position: relative;
  width: min(300px, 88%);
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.page {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: clamp(12px, 5vw, 20px);
  text-align: left;
}

.page--a {
  background: #fff;
  color: #17141a;
}

.page--b {
  background: #0a4fe8;
  color: #fff7e6;
}

.page__tag {
  margin: 0;
  font-weight: 700;
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1;
  font-family: inherit;
  letter-spacing: 0.12em;
}

.page__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(14px, 4.2vw, 18px);
  line-height: 1.3;
  font-family: inherit;
}

.page__body {
  margin: 0;
  font-weight: 400;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1.5;
  font-family: inherit;
}

.dim {
  position: absolute;
  inset: 0;
  background: #17141a;
  opacity: 0;
  pointer-events: none;
}

.page--a {
  animation: push-back 2s ease-out infinite;
  transform-origin: left center;
}

.page--b {
  animation: push-front 2s ease-out infinite;
  transform: translateX(100%);
}

.dim {
  animation: push-dim 2s ease-out infinite;
}

@keyframes push-back {
  0%, 5% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.94);
  }
  95%, 100% {
    transform: scale(1);
  }
}
@keyframes push-front {
  0%, 5% {
    transform: translateX(100%);
  }
  50% {
    transform: translateX(0);
  }
  95%, 100% {
    transform: translateX(100%);
  }
}
@keyframes push-dim {
  0%, 5% {
    opacity: 0;
  }
  50% {
    opacity: 0.18;
  }
  95%, 100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page--a, .page--b, .dim {
    animation: none !important;
  }
  .page--b {
    transform: translateX(100%);
  }
  .dim {
    opacity: 0;
  }
}
