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

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

.gridm {
  box-sizing: border-box;
  display: flex;
  gap: 12px;
  width: clamp(268px, 86vw, 392px);
  padding-top: 12px;
}

.gridm__card {
  position: relative;
  flex: 1 1 0;
  box-sizing: border-box;
  padding: 48px 12px 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 3px solid #241f26;
  box-shadow: 0 6px 0 #241f26;
  overflow: hidden;
  animation: cardRise 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.gridm__card:nth-child(2) {
  animation-delay: -0.22s;
}

.gridm__card:nth-child(3) {
  animation-delay: -0.44s;
}

.gridm__band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 32px;
  border-bottom: 3px solid #241f26;
}

.gridm__band--dots {
  background-color: #cec29c;
  background-image: radial-gradient(circle at 11px 16px, #241f26 0 3px, transparent 3.5px);
  background-size: 22px 22px;
}

.gridm__band--cross {
  background-color: #82adc2;
  background-image: linear-gradient(to right, transparent 10px, #ffffff 10px 14px, transparent 14px), linear-gradient(to bottom, transparent 14px, #ffffff 14px 18px, transparent 18px);
  background-size: 24px 32px;
  background-repeat: repeat;
}

.gridm__band--zig {
  background-color: #d5aea9;
  background-image: conic-gradient(from 135deg at 50% 0%, #ffffff 0 90deg, transparent 90deg 360deg);
  background-size: 14px 9px;
  background-position: 0 100%;
  background-repeat: repeat-x;
}

.gridm__sticker {
  position: absolute;
  z-index: 1;
  top: 20px;
  right: 10px;
}

.gridm__sticker--circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ebd6db;
  border: 3px solid #241f26;
}

.gridm__sticker--half {
  width: 28px;
  height: 15px;
  border-radius: 999px 999px 0 0;
  background: #cec29c;
  border: 3px solid #241f26;
}

.gridm__sticker--tri {
  width: 28px;
  height: 25px;
  background: #71b9ab;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.gridm__title {
  margin: 8px 0 0;
  color: #241f26;
  font-weight: 800;
  font-size: clamp(13px, 3vw, 16px);
  line-height: 1.25;
  font-family: inherit;
}

.gridm__desc {
  margin: 4px 0 0;
  color: #5d5560;
  font-weight: 500;
  font-size: clamp(11px, 2.6vw, 12.5px);
  line-height: 1.45;
  font-family: inherit;
}

@keyframes cardRise {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    box-shadow: 0 6px 0 #241f26;
  }
  45% {
    transform: translateY(-12px) rotate(-1.5deg);
    box-shadow: 0 10px 0 #241f26;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .gridm {
    width: 240px;
    gap: 8px;
  }
  .gridm__card {
    padding: 40px 8px 8px;
  }
  .gridm__title {
    font-size: 12px;
  }
  .gridm__desc {
    font-size: 10.5px;
  }
  .gridm__band {
    height: 26px;
  }
  .gridm__sticker {
    top: 16px;
    right: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gridm__card {
    animation: none !important;
    transform: none;
    box-shadow: 0 6px 0 #241f26;
  }
}
