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

.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;
  box-sizing: border-box;
  padding: clamp(12px, 5vw, 18px);
}

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

.rows {
  position: relative;
  height: 96px;
}

.row {
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  box-sizing: border-box;
  font-weight: 600;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1;
  font-family: inherit;
  color: #17141a;
}

.row__rank {
  color: #0a4fe8;
  font-weight: 700;
}

.row--1 {
  top: 0;
}

.row--2 {
  top: 34px;
}

.row--3 {
  top: 68px;
}

.row--1 {
  animation: swap-down 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.row--2 {
  animation: swap-up 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes swap-down {
  0%, 5% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(34px);
  }
  95%, 100% {
    transform: translateY(0);
  }
}
@keyframes swap-up {
  0%, 5% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-34px);
  }
  95%, 100% {
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .row--1, .row--2 {
    animation: none !important;
    transform: translateY(0);
  }
}
