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

.ul-scene {
  position: relative;
  width: 172px;
  height: 112px;
  perspective: 900px;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.ul-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  background: #fff7e6;
  color: #2f6df6;
  font: 700 13px/1.35 -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
}

.ul-flap {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: #2f6df6;
  border-radius: 16px 16px 0 0;
  transform-style: preserve-3d;
}

.ul-flap--top {
  top: 0;
  transform-origin: top center;
}

.ul-flap--bottom {
  bottom: 0;
  border-radius: 0 0 16px 16px;
  transform-origin: bottom center;
}

@keyframes ul-open-top {
  0%, 25% {
    transform: rotateX(0);
  }
  60%, 100% {
    transform: rotateX(-172deg);
  }
}
@keyframes ul-open-bottom {
  0%, 40% {
    transform: rotateX(0);
  }
  75%, 100% {
    transform: rotateX(172deg);
  }
}
.ul-scene.is-demo .ul-flap--top {
  animation: ul-open-top 1560ms cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.ul-scene.is-demo .ul-flap--bottom {
  animation: ul-open-bottom 1560ms cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .ul-scene.is-demo .ul-flap--top,
  .ul-scene.is-demo .ul-flap--bottom {
    animation: none !important;
    transform: none !important;
  }
}
