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

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffd23f;
  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: #17141a;
  color: #fff;
}

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

.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;
  opacity: 0.82;
}

.page--a {
  animation: slide-a 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.page--b {
  animation: slide-b 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  transform: translateX(100%);
}

@keyframes slide-a {
  0%, 5% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-100%);
  }
  95%, 100% {
    transform: translateX(0);
  }
}
@keyframes slide-b {
  0%, 5% {
    transform: translateX(100%);
  }
  50% {
    transform: translateX(0);
  }
  95%, 100% {
    transform: translateX(100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .page--a, .page--b {
    animation: none !important;
  }
  .page--a {
    transform: translateX(0);
  }
  .page--b {
    transform: translateX(100%);
  }
}
