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

.cbi {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 260px;
}

.cbi__row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.cbi__row--parent {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(23, 20, 26, 0.18);
}

.cbi__children {
  display: grid;
  gap: 8px;
  padding-left: 24px;
}

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

.cbi__box {
  --cbi-alpha: 0;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid rgba(23, 20, 26, 0.4);
  background: rgba(47, 109, 246, var(--cbi-alpha));
  color: #fff7e6;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  transition: border-color 220ms ease-out, background-color 220ms ease-out;
}

.cbi__row--parent .cbi__box {
  width: 24px;
  height: 24px;
}

.cbi__check, .cbi__dash {
  opacity: 0;
  transition: opacity 220ms ease-out;
}

.cbi__box--on {
  border-color: #2f6df6;
}
.cbi__box--on .cbi__check {
  opacity: 1;
}

.cbi__box--mixed {
  border-color: #2f6df6;
}
.cbi__box--mixed .cbi__dash {
  opacity: 1;
}

.cbi__input:focus-visible + .cbi__box {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.cbi__text {
  color: #17141a;
  font-size: 13px;
  font-weight: 600;
}

.cbi__row--parent .cbi__text {
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 340px) {
  .cbi__children {
    padding-left: 16px;
  }
  .cbi__text {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cbi__box, .cbi__check, .cbi__dash {
    transition: none;
  }
}
