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

.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 {
  position: relative;
  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__mag {
  display: inline-flex;
  color: rgba(23, 20, 26, 0.42);
}

.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.is-demo .pal__input::placeholder {
  color: transparent;
}

.pal__ghost {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #17141a;
  opacity: 0;
  pointer-events: none;
}

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

.pal__list {
  position: relative;
}

.pal__opt {
  box-sizing: border-box;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  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);
}

.pal__ic {
  display: inline-flex;
  color: #2f6df6;
}

.pal__name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pal__act {
  flex: 0 0 auto;
}

.pal__q {
  overflow: hidden;
  font-weight: 800;
  color: #2f6df6;
  text-overflow: ellipsis;
}

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

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

.pal__note {
  margin: 0 0 4px;
  padding: 0 8px;
  height: 20px;
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.4);
}

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

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

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

.pal.is-demo .pal__opt--sug {
  animation: rise 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.pal.is-demo #s2 {
  animation-delay: 70ms;
}

@keyframes cut-in {
  0%, 17% {
    opacity: 0;
  }
  18%, 82% {
    opacity: 1;
  }
  83%, 100% {
    opacity: 0;
  }
}
@keyframes cut-out {
  0%, 17% {
    opacity: 1;
  }
  18%, 82% {
    opacity: 0;
  }
  83%, 100% {
    opacity: 1;
  }
}
@keyframes rise {
  0%, 18% {
    transform: translateY(20px);
  }
  40%, 62% {
    transform: translateY(0);
  }
  83%, 100% {
    transform: translateY(20px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pal.is-demo .pal__ghost,
  .pal.is-demo .pal__opt--out,
  .pal.is-demo .pal__empty,
  .pal.is-demo .pal__opt--sug {
    animation: none !important;
  }
  .pal.is-demo .pal__empty[hidden] {
    display: none;
  }
  .pal__ghost {
    opacity: 0;
  }
}
