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

.hc-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: #17141a;
  color: #fff7e6;
  font: 700 14px/1 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  cursor: pointer;
}

.hc-check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hc-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #fff7e6;
  box-sizing: border-box;
  transition: background 220ms, border-color 220ms;
}

.hc-wrap:has(.hc-check:checked) .hc-box {
  background: #2f6df6;
  border-color: #2f6df6;
}

.hc-piece {
  position: absolute;
  top: 50%;
  left: 24px;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
}

.hc-piece:nth-child(4) {
  background: #2f6df6;
  --angle: 45deg;
}

.hc-piece:nth-child(5) {
  background: #ff4d1f;
  --angle: 90deg;
}

.hc-piece:nth-child(6) {
  background: #ffd23f;
  --angle: 135deg;
}

.hc-piece:nth-child(7) {
  background: #2f6df6;
  --angle: 180deg;
}

.hc-piece:nth-child(8) {
  background: #ff4d1f;
  --angle: 225deg;
}

.hc-piece:nth-child(9) {
  background: #ffd23f;
  --angle: 270deg;
}

.hc-piece:nth-child(10) {
  background: #2f6df6;
  --angle: 315deg;
}

.hc-piece:nth-child(11) {
  background: #ff4d1f;
  --angle: 360deg;
}

@keyframes hc-fly {
  0% {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(0.4);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-58px) scale(1);
    opacity: 0;
  }
}
.hc-wrap:has(.hc-check:checked) .hc-piece,
.hc-wrap.is-demo .hc-piece {
  animation: hc-fly 800ms cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hc-wrap:has(.hc-check:checked) .hc-piece,
  .hc-wrap.is-demo .hc-piece {
    animation: none !important;
    opacity: 0 !important;
  }
}
