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

.fx-card {
  perspective: 700px;
  width: 132px;
  height: 132px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  display: block;
}

.fx-card:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 4px;
}

.fx-card__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fx-card.is-flipped .fx-card__inner {
  transform: rotateX(180deg);
}

.fx-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  backface-visibility: hidden;
  font: 700 34px/1 -apple-system, "Segoe UI", sans-serif;
  color: #fff7e6;
}

.fx-card__face--front {
  background: #17141a;
}

.fx-card__face--back {
  background: rgba(23, 20, 26, 0.8);
  transform: rotateX(180deg);
}

@keyframes fx-flip {
  0%, 40% {
    transform: rotateX(0);
  }
  60%, 100% {
    transform: rotateX(180deg);
  }
}
.fx-card.is-demo .fx-card__inner {
  animation: fx-flip 1200ms cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .fx-card.is-flipped .fx-card__inner,
  .fx-card.is-demo .fx-card__inner {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
