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

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

.cardcrayon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: clamp(220px, 80vw, 320px);
}

.cardcrayon__card {
  position: relative;
  box-sizing: border-box;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  animation: cardTilt 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.cardcrayon__card--1 {
  background: #efe6fb;
  animation-delay: 0ms;
}

.cardcrayon__card--2 {
  background: #fff3cc;
  animation-delay: 140ms;
}

.cardcrayon__card--3 {
  background: #dff0fc;
  animation-delay: 280ms;
}

.cardcrayon__card--4 {
  background: #e2f5e2;
  animation-delay: 420ms;
}

.cardcrayon__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: url(#rough3);
}

.cardcrayon__frame-rect {
  fill: none;
  stroke-width: 2.4;
}

.cardcrayon__frame-rect--a {
  stroke: #dbb6b7;
}

.cardcrayon__frame-rect--b {
  stroke: #9cb8ce;
  opacity: 0.8;
}

.cardcrayon__badge {
  position: absolute;
  top: -10px;
  right: 12px;
  border: 2px dashed #33261c;
  border-radius: 999px;
  background: #ffffff;
  color: #33261c;
  padding: 4px 8px;
  font-weight: 700;
  font-size: 9px;
  line-height: 1.4;
}

.cardcrayon__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%), #33261c;
}

.cardcrayon__label {
  margin: 0;
  color: #33261c;
  font-weight: 700;
  font-size: clamp(11px, 2.6vw, 13px);
  line-height: 1.3;
}

@keyframes cardTilt {
  0%, 100% {
    transform: rotate(0deg) translateY(0);
  }
  50% {
    transform: rotate(-2deg) translateY(-3px);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .cardcrayon {
    gap: 8px;
  }
  .cardcrayon__card {
    min-height: 68px;
    padding: 8px;
  }
  .cardcrayon__dot {
    width: 22px;
    height: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cardcrayon__card {
    animation: none !important;
    transform: none;
  }
}
