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

.cb {
  box-sizing: border-box;
  width: min(224px, 84vw);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.cb__label {
  display: block;
  font-size: 10px;
  line-height: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #17141a;
  margin: 0 0 4px;
}

.cb__field {
  position: relative;
  box-sizing: border-box;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.cb__mag {
  display: inline-flex;
  color: rgba(23, 20, 26, 0.4);
}

.cb__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #17141a;
}

.cb__input:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 4px;
  border-radius: 4px;
}

.cb__typed {
  position: absolute;
  left: 32px;
  right: 12px;
  top: 50%;
  display: flex;
  align-items: center;
  height: 18px;
  transform: translateY(-50%);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #17141a;
  opacity: 0;
  pointer-events: none;
}

.cb__box {
  position: relative;
  box-sizing: border-box;
  height: 104px;
  margin: 8px 0 0;
  padding: 4px;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.cb__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cb__opt {
  box-sizing: border-box;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(23, 20, 26, 0.78);
  cursor: pointer;
}

.cb__opt.is-at {
  background: rgba(47, 109, 246, 0.12);
  color: #2f6df6;
}

.cb__m {
  position: relative;
  z-index: 0;
  font-weight: 800;
}

.cb__m::before {
  content: "";
  position: absolute;
  inset: -2px -2px;
  z-index: -1;
  border-radius: 4px;
  background: rgba(255, 201, 77, 0.8);
  opacity: 0;
}

.cb__m.is-on::before {
  opacity: 1;
}

.cb__empty {
  margin: 0;
  padding: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(23, 20, 26, 0.4);
}

.cb.is-demo .cb__typed,
.cb.is-demo .cb__m::before {
  animation: cb-cut-in 2s steps(1, end) infinite;
}

.cb.is-demo .cb__opt--out {
  animation: cb-cut-out 2s steps(1, end) infinite;
}

.cb.is-demo .cb__opt--hit {
  animation: cb-rise 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes cb-cut-in {
  0%, 17% {
    opacity: 0;
  }
  18%, 83% {
    opacity: 1;
  }
  84%, 100% {
    opacity: 0;
  }
}
@keyframes cb-cut-out {
  0%, 17% {
    opacity: 1;
  }
  18%, 83% {
    opacity: 0;
  }
  84%, 100% {
    opacity: 1;
  }
}
@keyframes cb-rise {
  0%, 18% {
    transform: translateY(0);
  }
  40%, 62% {
    transform: translateY(-48px);
  }
  84%, 100% {
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cb.is-demo .cb__typed,
  .cb.is-demo .cb__opt--out,
  .cb.is-demo .cb__opt--hit,
  .cb.is-demo .cb__m::before {
    animation: none !important;
  }
  .cb__typed {
    opacity: 0;
  }
}
