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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cw {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border: 0;
  margin: 0;
  padding: 0;
}

.cw__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.cw__cell {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.cw__swatch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  display: block;
}

.cw__swatch--1 {
  background: #2f6df6;
}

.cw__swatch--2 {
  background: #ffd23f;
}

.cw__swatch--3 {
  background: #17141a;
}

.cw__swatch--4 {
  background: #c2361a;
}

.cw__swatch--5 {
  background: #fff7e6;
}

.cw__swatch--6 {
  background: #ff4d1f;
}

.cw__check {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #17141a;
  transform: scale(0);
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.cw__check-icon {
  position: absolute;
  inset: 3px;
  color: #fff7e6;
}

.cw__cell:has(.cw__input:checked) .cw__check {
  transform: scale(1);
  animation: cw-check-jelly 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes cw-check-jelly {
  0% {
    transform: scale(0) rotate(-15deg);
  }
  55% {
    transform: scale(1.25) rotate(4deg);
  }
  80% {
    transform: scale(0.9) rotate(-2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cw__check {
    transition: none;
  }
  .cw__cell:has(.cw__input:checked) .cw__check {
    animation: none !important;
  }
}
