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

.flipwrap {
  display: grid;
  justify-items: center;
  row-gap: 12px;
  perspective: 640px;
}

.flip {
  position: relative;
  width: min(250px, 84vw);
  height: clamp(84px, 30vw, 118px);
  transform-style: preserve-3d;
}

.face {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  display: grid;
  place-items: center;
  align-content: center;
  row-gap: 4px;
  backface-visibility: hidden;
}

.face__tag {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(9px, 2.2vw, 11.5px);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #17141a;
}

.face__date {
  font-size: clamp(19px, 5.2vw, 31px);
  font-weight: 800;
  color: #17141a;
  white-space: nowrap;
}

.langs {
  display: flex;
  column-gap: 8px;
  margin: 0;
}

.langs__item {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(10px, 2.4vw, 13px);
  font-weight: 700;
  color: rgba(255, 247, 230, 0.72);
  border-radius: 999px;
  padding: 0 8px;
}

.stage.is-demo .face--ko {
  animation: flap 2s ease-out infinite;
}

.stage.is-demo .face--en {
  animation: flap 2s ease-out infinite;
  animation-delay: -0.6666666667s;
}

.stage.is-demo .face--ja {
  animation: flap 2s ease-out infinite;
  animation-delay: -1.3333333333s;
}

.stage.is-demo .langs__item {
  animation: lang-on 2s linear infinite;
  animation-delay: calc(var(--i) * 0.6666666667s);
}

@keyframes flap {
  0% {
    transform: rotateX(-92deg);
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  12% {
    transform: rotateX(0deg);
  }
  27% {
    transform: rotateX(0deg);
    opacity: 1;
  }
  34% {
    transform: rotateX(92deg);
    opacity: 0;
  }
  100% {
    transform: rotateX(92deg);
    opacity: 0;
  }
}
@keyframes lang-on {
  0%, 4% {
    color: rgba(255, 247, 230, 0.72);
    transform: scale(1);
  }
  10% {
    color: #fff7e6;
    transform: scale(1.12);
  }
  16% {
    color: #fff7e6;
    transform: scale(1);
  }
  30% {
    color: #fff7e6;
  }
  36%, 100% {
    color: rgba(255, 247, 230, 0.72);
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .face--ko,
  .stage.is-demo .face--en,
  .stage.is-demo .face--ja,
  .stage.is-demo .langs__item {
    animation: none;
  }
  .face--en, .face--ja {
    opacity: 0;
  }
  .face--ko {
    transform: rotateX(0deg);
  }
}
