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

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffd23f;
  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;
}

.todo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: clamp(14px, 4vw, 16px);
  line-height: 1.3;
  font-family: inherit;
  color: #17141a;
}

.todo__box {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid rgba(23, 20, 26, 0.5);
  display: grid;
  place-items: center;
  transition: background 300ms ease-out, border-color 300ms ease-out;
}

.sr-input:checked ~ .todo__box {
  background: #17141a;
  border-color: #17141a;
}

.sr-input:focus-visible ~ .todo__box {
  box-shadow: 0 0 0 3px rgba(23, 20, 26, 0.3);
}

.todo__svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #ffd23f;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 300ms ease-out;
}

.sr-input:checked ~ .todo__box .todo__svg {
  stroke-dashoffset: 0;
}

.todo__text {
  position: relative;
  display: inline-block;
}

.todo__label {
  transition: opacity 300ms ease-out;
}

.sr-input:checked ~ .todo__text .todo__label {
  opacity: 0.45;
}

.todo__strike {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease-out;
}

.sr-input:checked ~ .todo__text .todo__strike {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .todo__box, .todo__svg, .todo__label, .todo__strike {
    transition-duration: 1ms !important;
  }
}
