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

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.pal {
  box-sizing: border-box;
  width: min(264px, 88vw);
  padding: 8px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.pal__bar {
  box-sizing: border-box;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(23, 20, 26, 0.05);
}

.pal__chip {
  flex: 0 0 auto;
  height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.14);
  font-size: 10px;
  font-weight: 800;
  color: #2f6df6;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-8px);
}

.pal__chipic {
  display: inline-flex;
}

.pal.is-deep .pal__chip {
  opacity: 1;
  transform: translateX(0);
}

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

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

.pal__live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.pal__box {
  position: relative;
  box-sizing: border-box;
  height: 96px;
  margin: 8px 0 0;
}

.pal__list {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}

.pal__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.82);
  white-space: nowrap;
  cursor: pointer;
}

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

.pal.is-demo .pal__list--b[hidden] {
  display: block;
}

.pal.is-demo .pal__chip {
  animation: chip-in 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

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

.pal.is-demo .pal__list--b {
  animation: cut-in 2s steps(1, end) infinite;
}

.pal.is-demo .pal__list--b .pal__opt {
  animation: slide-in 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.pal.is-demo #b2 {
  animation-delay: 50ms;
}

.pal.is-demo #b3 {
  animation-delay: 100ms;
}

.pal.is-demo #b4 {
  animation-delay: 150ms;
}

@keyframes chip-in {
  0%, 16% {
    opacity: 0;
    transform: translateX(-8px);
  }
  26%, 78% {
    opacity: 1;
    transform: translateX(0);
  }
  88%, 100% {
    opacity: 0;
    transform: translateX(-8px);
  }
}
@keyframes cut-out {
  0%, 17% {
    opacity: 1;
  }
  18%, 84% {
    opacity: 0;
  }
  85%, 100% {
    opacity: 1;
  }
}
@keyframes cut-in {
  0%, 17% {
    opacity: 0;
  }
  18%, 84% {
    opacity: 1;
  }
  85%, 100% {
    opacity: 0;
  }
}
@keyframes slide-in {
  0%, 18% {
    transform: translateX(16px);
  }
  32%, 84% {
    transform: translateX(0);
  }
  85%, 100% {
    transform: translateX(16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pal.is-demo .pal__chip,
  .pal.is-demo .pal__list--a,
  .pal.is-demo .pal__list--b,
  .pal.is-demo .pal__list--b .pal__opt {
    animation: none !important;
  }
  .pal.is-demo .pal__list--b[hidden] {
    display: none;
  }
  .pal.is-demo .pal__chip {
    opacity: 0;
  }
}
