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

.ac {
  position: relative;
  box-sizing: border-box;
  width: min(320px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding-bottom: 0;
}

.ac__map {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
  aspect-ratio: 12/5;
  background: repeating-linear-gradient(90deg, #fffdf7 0 7px, transparent 7px 32px), repeating-linear-gradient(0deg, #fffdf7 0 6px, transparent 6px 24px), radial-gradient(circle at 82% 78%, #c9e0bd 0 26px, transparent 26px), linear-gradient(-72deg, transparent 0 74%, #bcd9ea 74% 86%, transparent 86%), #efe9dc;
}

.ac__map::before,
.ac__map::after {
  content: "";
  position: absolute;
  z-index: 0;
  background: #e2dac9;
}

.ac__map::before {
  left: 12%;
  top: 16%;
  width: 14%;
  height: 32%;
}

.ac__map::after {
  left: 46%;
  top: 62%;
  width: 17%;
  height: 26%;
}

.ac__pin {
  position: absolute;
  z-index: 2;
  left: 82%;
  top: 38%;
  display: block;
  color: #2f6df6;
  transform: translate(-50%, -100%);
  transition: left 300ms cubic-bezier(0.2, 1.4, 0.4, 1), top 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ac__list {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 34%;
  bottom: 36px;
  box-sizing: border-box;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff7e6;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform-origin: bottom center;
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1), opacity 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ac.is-open .ac__list {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ac__opt {
  position: relative;
  box-sizing: border-box;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  color: #17141a;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ac__opt > svg {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  color: #2f6df6;
}

.ac__opt > span {
  position: relative;
  z-index: 1;
}

.ac__opt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(47, 109, 246, 0.14);
  opacity: 0;
}

.ac__opt.is-active::before {
  opacity: 1;
}

.ac__field {
  position: relative;
  height: 28px;
  flex: 0 0 auto;
}

.ac__ico {
  position: absolute;
  left: 11px;
  top: 50%;
  display: inline-flex;
  color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%);
  pointer-events: none;
}

.ac__input {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0 12px 0 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff7e6;
  font-family: inherit;
  font-size: 12px;
  line-height: 26px;
  font-weight: 600;
}

.ac__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.ac__input:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.ac.is-open .ac__input {
  border-color: #2f6df6;
}

.ac.is-demo .ac__input::placeholder {
  color: transparent;
}

.ac__ghost {
  position: absolute;
  left: 33px;
  top: 0;
  color: #fff7e6;
  font-size: 12px;
  line-height: 28px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.ac.is-demo .ac__ghost {
  opacity: 1;
  animation-name: ac-type;
  animation-duration: 2s;
  animation-timing-function: steps(4, end);
  animation-iteration-count: infinite;
}

.ac.is-demo .ac__list {
  transition: none;
  animation-name: ac-list;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

.ac.is-demo .ac__opt::before {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.ac.is-demo .ac__opt:nth-child(1)::before {
  animation-name: ac-hl-0;
}

.ac.is-demo .ac__opt:nth-child(2)::before {
  animation-name: ac-hl-1;
}

.ac.is-demo .ac__opt:nth-child(3)::before {
  animation-name: ac-hl-2;
}

.ac.is-demo .ac__pin {
  transition: none;
  animation-name: ac-pin;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes ac-type {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  30% {
    clip-path: inset(0 0 0 0);
  }
  80% {
    clip-path: inset(0 0 0 0);
  }
  90% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes ac-list {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  32% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  40% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  82% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  90% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  100% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}
@keyframes ac-hl-0 {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ac-hl-1 {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  58% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ac-hl-2 {
  0% {
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  90% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ac-pin {
  0% {
    left: 82%;
    top: 38%;
  }
  66% {
    left: 82%;
    top: 38%;
  }
  74% {
    left: 78%;
    top: 72%;
  }
  84% {
    left: 78%;
    top: 72%;
  }
  90% {
    left: 82%;
    top: 38%;
  }
  100% {
    left: 82%;
    top: 38%;
  }
}
@media (max-width: 360px) {
  .ac {
    gap: 4px;
  }
  .ac__list {
    bottom: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ac.is-demo .ac__ghost,
  .ac.is-demo .ac__list,
  .ac.is-demo .ac__opt::before,
  .ac.is-demo .ac__pin {
    animation: none !important;
  }
  .ac.is-demo .ac__ghost {
    opacity: 0;
  }
  .ac__list, .ac__pin, .ac__input {
    transition: none;
  }
}
