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-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.swatches {
  display: flex;
  gap: clamp(8px, 2.6vw, 14px);
  border: 0;
  margin: 0;
  padding: 0;
}

.swatch {
  position: relative;
  display: inline-flex;
  padding: 5px;
  border-radius: 50%;
  cursor: pointer;
}

.swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #fff7e6;
  transform: scale(0);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1), opacity 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.swatch:has(.sr-input:checked)::after {
  transform: scale(1);
  opacity: 1;
}

.sr-input:focus-visible ~ .swatch__chip {
  box-shadow: 0 0 0 3px rgba(255, 247, 230, 0.5);
}

.swatch__chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

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

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

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

.swatch__chip--4 {
  background: #fff7e6;
}

@media (prefers-reduced-motion: reduce) {
  .swatch::after {
    transition-duration: 1ms !important;
  }
}
