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

.flip {
  width: 128px;
  height: 46px;
  perspective: 600px;
}

.flip__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
}

.flip__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  backface-visibility: hidden;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.flip__face--front {
  background: linear-gradient(135deg, rgb(78.8235294118%, 73.2352941176%, 57.0588235294%), #b7a46d);
  color: #4a3400;
}

.flip__face--back {
  background: linear-gradient(135deg, rgb(34.7450980392%, 54.1960784314%, 97.1764705882%), #2f6df6);
  color: #fff;
  transform: rotateY(180deg);
}

.stage.is-demo .flip__inner {
  animation: flip 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes flip {
  0%, 40% {
    transform: rotateY(0deg);
  }
  55%, 85% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
.stage.is-demo .flip__face--front {
  animation: face-glow 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes face-glow {
  0%, 50% {
    box-shadow: 0 6px 12px rgba(183, 164, 109, 0.32);
  }
  62% {
    box-shadow: 0 6px 12px rgba(110, 200, 255, 0.38);
  }
  85%, 100% {
    box-shadow: 0 6px 12px rgba(183, 164, 109, 0.32);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .flip__inner {
    animation: none;
  }
  .stage.is-demo .flip__face--front {
    animation: none;
  }
}
