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

.multi {
  box-sizing: border-box;
  position: relative;
  width: min(300px, 88vw);
  background: #fff7e6;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}
.multi__label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  color: #17141a;
}
.multi__trigger {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
  font-family: inherit;
  font-size: clamp(14px, 4vw, 16px);
  color: #17141a;
  text-align: left;
  cursor: pointer;
  transition: border-color 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.multi__trigger:focus-visible {
  outline: none;
  border-color: #ff9ebb;
}
.multi__trigger[aria-expanded=true] {
  border-color: #ff9ebb;
}
.multi__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 20px;
}
.multi__placeholder {
  color: rgba(23, 20, 26, 0.72);
  font-weight: 500;
}
.multi__chip {
  display: inline-flex;
  align-items: center;
  background: #ff9ebb;
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  animation: chip-pop 220ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.multi__chevron {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.multi__trigger[aria-expanded=true] .multi__chevron {
  transform: rotate(180deg);
}
.multi__listbox {
  position: absolute;
  top: calc(100% + 4px);
  left: 20px;
  right: 20px;
  max-height: 200px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  z-index: 10;
  transform-origin: top;
  opacity: 0;
  transform: scaleY(0.92) translateY(-4px);
  pointer-events: none;
}
.multi__listbox.is-open {
  opacity: 1;
  transform: scaleY(1) translateY(0);
  pointer-events: auto;
  transition: opacity 220ms cubic-bezier(0.2, 1.4, 0.4, 1), transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.multi__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #17141a;
  cursor: pointer;
}
.multi__option--active {
  background: rgba(255, 158, 187, 0.18);
}
.multi__check {
  box-sizing: border-box;
  flex: 0 0 auto;
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid rgba(23, 20, 26, 0.3);
  background: #fff;
  transition: background 220ms cubic-bezier(0.2, 1.4, 0.4, 1), border-color 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.multi__option[aria-selected=true] .multi__check {
  background: #ff9ebb;
  border-color: #ff9ebb;
}
.multi__option[aria-selected=true] .multi__check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -1px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(40deg);
}
.multi__hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.72);
}

@keyframes chip-pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .multi__listbox {
    transition: none !important;
  }
  .multi__trigger, .multi__chevron, .multi__check {
    transition: none;
  }
  .multi__chip {
    animation: none;
  }
}
