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

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

.tabs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: clamp(10px, 4vw, 16px);
  padding: clamp(10px, 4vw, 14px) clamp(12px, 5vw, 18px) 0;
  box-sizing: border-box;
}

.tab {
  font-weight: 700;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1;
  font-family: inherit;
  color: #17141a;
  opacity: 0.4;
  padding-bottom: 8px;
}

.tab--on {
  opacity: 1;
  color: #17141a;
  border-bottom: 2px solid #fff7e6;
}

.page {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 40px;
  box-sizing: border-box;
  padding: clamp(12px, 5vw, 18px);
  display: flex;
  align-items: center;
}

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

.page--a {
  animation: tab-a 2s ease-out infinite;
}

.page--b {
  animation: tab-b 2s ease-out infinite;
  opacity: 0;
  transform: translateY(8px);
}

@keyframes tab-a {
  0%, 5% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0;
    transform: translateY(-8px);
  }
  95%, 100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes tab-b {
  0%, 5% {
    opacity: 0;
    transform: translateY(8px);
  }
  50% {
    opacity: 1;
    transform: translateY(0);
  }
  95%, 100% {
    opacity: 0;
    transform: translateY(8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .page--a, .page--b {
    animation: none !important;
  }
  .page--a {
    opacity: 1;
    transform: translateY(0);
  }
  .page--b {
    opacity: 0;
    transform: translateY(0);
  }
}
