html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.card {
  position: relative;
  width: 200px;
  height: 140px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.thumb {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 158, 187, 0.18), rgba(185, 160, 255, 0.1));
}

.ribbon-mount {
  position: absolute;
  top: 0;
  right: 16px;
  width: 56px;
  overflow: visible;
}

.ribbon {
  display: block;
  padding: 8px 0 12px;
  background: #ddbebb;
  color: #fff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: scaleY(0) rotate(0deg);
  transform-origin: top center;
}

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

@keyframes unfurl {
  0%, 8% {
    transform: scaleY(0) rotate(0deg);
  }
  30% {
    transform: scaleY(1.06) rotate(-2deg);
  }
  42%, 78% {
    transform: scaleY(1) rotate(0deg);
  }
  92%, 100% {
    transform: scaleY(0) rotate(0deg);
  }
}
.ribbon-mount {
  position: absolute;
}

.ribbon-mount::after {
  content: "";
  position: absolute;
  inset: -2px -2px 6px;
  border-radius: 4px 4px 0 0;
  border: 2px solid rgba(221, 190, 187, 0);
  transform: scale(0.92);
  opacity: 0;
  pointer-events: none;
}

.stage.is-demo .ribbon {
  animation: unfurl 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite, ribbon-settle 2s ease-out infinite;
}

.stage.is-demo .ribbon-mount::after {
  animation: unfurl-ring 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes ribbon-settle {
  0%, 8% {
    background-color: #ddbebb;
  }
  42% {
    background-color: rgb(90.6666666667%, 82.1568627451%, 81.3333333333%);
  }
  62%, 100% {
    background-color: #ddbebb;
  }
}
@keyframes unfurl-ring {
  0%, 30% {
    transform: scale(0.92);
    opacity: 0;
    border-color: rgba(221, 190, 187, 0);
  }
  40% {
    transform: scale(1);
    opacity: 0.75;
    border-color: rgba(92%, 80.3137254902%, 76.7843137255%, 0.85);
  }
  66%, 100% {
    transform: scale(1.18);
    opacity: 0;
    border-color: rgba(221, 190, 187, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .ribbon {
    animation: none;
    transform: scaleY(1);
  }
  .stage.is-demo .ribbon-mount::after {
    animation: none;
    opacity: 0;
  }
}
