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

.cf {
  position: relative;
  box-sizing: border-box;
  width: min(232px, 84vw);
  padding-bottom: 116px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.cf__label {
  display: block;
  font-size: 10px;
  line-height: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(23, 20, 26, 0.72);
  margin: 0 0 4px;
}

.cf__btn {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(23, 20, 26, 0.16);
  background: #fff;
  border-radius: 12px;
  color: #17141a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cf__swap, .cf__name, .cf__cur {
  display: inline-grid;
}

.cf__slot {
  grid-area: 1/1;
}

.cf__slot--b {
  opacity: 0;
}

.cf__cur {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.5);
}

.cf__flag {
  display: inline-flex;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(23, 20, 26, 0.14);
}

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

.cf__list {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cf.is-open .cf__list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cf__mark {
  position: absolute;
  z-index: 1;
  top: 56px;
  left: 4px;
  right: 4px;
  height: 26px;
  border-radius: 8px;
  background: rgba(47, 109, 246, 0.14);
  opacity: 0;
  pointer-events: none;
}

.cf__opt {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cf__opt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 8px;
  background: rgba(47, 109, 246, 0.14);
  opacity: 0;
}

.cf__opt[aria-selected=true]::after {
  opacity: 1;
}

.cf__opt.is-at::after {
  opacity: 0.6;
}

.cf__code {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.72);
}

.cf.is-demo .cf__opt::after {
  opacity: 0;
}

.cf.is-demo .cf__mark {
  opacity: 1;
  animation: cf-mark 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.cf.is-demo .cf__slot--a {
  animation: cf-swap-a 2s steps(1, end) infinite;
}

.cf.is-demo .cf__slot--b {
  animation: cf-swap-b 2s steps(1, end) infinite;
}

@keyframes cf-mark {
  0%, 10% {
    transform: translateY(0);
  }
  35%, 65% {
    transform: translateY(26px);
  }
  90%, 100% {
    transform: translateY(0);
  }
}
@keyframes cf-swap-a {
  0%, 33% {
    opacity: 1;
  }
  34%, 65% {
    opacity: 0;
  }
  66%, 100% {
    opacity: 1;
  }
}
@keyframes cf-swap-b {
  0%, 33% {
    opacity: 0;
  }
  34%, 65% {
    opacity: 1;
  }
  66%, 100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cf.is-demo .cf__slot--a, .cf.is-demo .cf__slot--b,
  .cf.is-demo .cf__mark {
    animation: none !important;
  }
  .cf__slot--b {
    opacity: 0;
  }
  .cf__list {
    transition: none;
  }
}
