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

.cs {
  --row: 22px;
  box-sizing: border-box;
  width: min(400px, 88vw);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  padding-bottom: 56px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #fff7e6;
}

.cs__left {
  flex: 1 1 auto;
  min-width: 0;
}

.cs__plan {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.cs__priceline {
  position: relative;
  height: 40px;
  margin-top: 8px;
  transform-origin: left center;
}

.cs__face {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  opacity: 0;
}

.cs__sym,
.cs__amt {
  color: #4cd4a6;
  font-size: 30px;
  line-height: 40px;
  font-weight: 800;
}

.cs__unit {
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  opacity: 0.7;
}

.cs__note {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  opacity: 0.55;
}

.cs__pick {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
}

.cs__trig {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 4px 8px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff7e6;
  font-family: inherit;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  cursor: pointer;
}

.cs__trig:focus-visible {
  outline: 2px solid #4cd4a6;
  outline-offset: 2px;
}

.cs__tsym {
  color: #4cd4a6;
}

.cs__caret {
  margin-left: auto;
  display: inline-flex;
  opacity: 0.6;
}

.cs__caret svg {
  display: block;
}

.cs__pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  box-sizing: border-box;
  padding: 4px 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform-origin: top center;
  transform: scaleY(0.5) translateY(-8px);
  opacity: 0;
  visibility: hidden;
}

.cs__hl {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 4px;
  height: var(--row);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.cs__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--row);
  padding: 0 8px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  cursor: pointer;
}

.cs__opt:focus-visible {
  outline: 2px solid #4cd4a6;
  outline-offset: -2px;
}

.cs__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4cd4a6;
  opacity: 0;
}

.cs__os {
  margin-left: auto;
  color: #4cd4a6;
}

.cs__trig[aria-expanded=true] ~ .cs__pop {
  transform: none;
  opacity: 1;
  visibility: visible;
}

.cs__opt[aria-selected=true] .cs__dot {
  opacity: 1;
}

.cs:not(.is-demo)[data-cur=usd] .cs__face[data-cur=usd],
.cs:not(.is-demo)[data-cur=krw] .cs__face[data-cur=krw],
.cs:not(.is-demo)[data-cur=jpy] .cs__face[data-cur=jpy],
.cs:not(.is-demo)[data-cur=eur] .cs__face[data-cur=eur] {
  opacity: 1;
}

.cs:not(.is-demo)[data-cur=krw] .cs__hl {
  transform: translateY(var(--row));
}

.cs:not(.is-demo)[data-cur=jpy] .cs__hl {
  transform: translateY(calc(var(--row) * 2));
}

.cs:not(.is-demo)[data-cur=eur] .cs__hl {
  transform: translateY(calc(var(--row) * 3));
}

.cs:not(.is-demo) .cs__pop {
  transition-property: transform, opacity, visibility;
  transition-duration: 220ms;
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cs:not(.is-demo) .cs__hl {
  transition-property: transform;
  transition-duration: 220ms;
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cs.is-demo .cs__pop {
  visibility: visible;
  animation-name: cs-open;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes cs-open {
  0% {
    transform: scaleY(0.5) translateY(-8px);
    opacity: 0;
  }
  10% {
    transform: none;
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
.cs.is-demo .cs__hl {
  animation-name: cs-hl;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes cs-hl {
  0%, 10% {
    transform: translateY(0);
  }
  20%, 30% {
    transform: translateY(var(--row));
  }
  40%, 50% {
    transform: translateY(calc(var(--row) * 2));
  }
  60%, 70% {
    transform: translateY(calc(var(--row) * 3));
  }
  80%, 100% {
    transform: translateY(0);
  }
}
.cs.is-demo .cs__face,
.cs.is-demo .cs__dot {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.cs.is-demo .cs__face[data-cur=usd],
.cs.is-demo .cs__opt[data-cur=usd] .cs__dot {
  animation-name: cs-usd;
}

.cs.is-demo .cs__face[data-cur=krw],
.cs.is-demo .cs__opt[data-cur=krw] .cs__dot {
  animation-name: cs-krw;
}

.cs.is-demo .cs__face[data-cur=jpy],
.cs.is-demo .cs__opt[data-cur=jpy] .cs__dot {
  animation-name: cs-jpy;
}

.cs.is-demo .cs__face[data-cur=eur],
.cs.is-demo .cs__opt[data-cur=eur] .cs__dot {
  animation-name: cs-eur;
}

@keyframes cs-usd {
  0% {
    opacity: 1;
  }
  20% {
    opacity: 0;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes cs-krw {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cs-jpy {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  60% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cs-eur {
  0% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  80% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.cs.is-demo .cs__priceline {
  animation-name: cs-pop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes cs-pop {
  0%, 16% {
    transform: scale(1);
  }
  22% {
    transform: scale(1.06);
  }
  28%, 36% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.06);
  }
  48%, 56% {
    transform: scale(1);
  }
  62% {
    transform: scale(1.06);
  }
  68%, 76% {
    transform: scale(1);
  }
  82% {
    transform: scale(1.06);
  }
  88%, 100% {
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .cs {
    --row: 20px;
    gap: 8px;
    padding: 12px;
    padding-bottom: 56px;
  }
  .cs__plan {
    font-size: 11px;
    line-height: 16px;
  }
  .cs__priceline {
    height: 30px;
    margin-top: 4px;
  }
  .cs__sym,
  .cs__amt {
    font-size: 21px;
    line-height: 30px;
  }
  .cs__pick {
    width: 88px;
  }
  .cs__trig {
    padding: 4px;
    font-size: 11px;
    line-height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs.is-demo .cs__pop,
  .cs.is-demo .cs__hl,
  .cs.is-demo .cs__face,
  .cs.is-demo .cs__dot,
  .cs.is-demo .cs__priceline {
    animation: none !important;
  }
  .cs:not(.is-demo) .cs__pop,
  .cs:not(.is-demo) .cs__hl {
    transition: none !important;
  }
  .cs.is-demo .cs__pop {
    transform: none;
    opacity: 1;
  }
  .cs.is-demo .cs__face[data-cur=usd] {
    opacity: 1;
  }
  .cs.is-demo .cs__opt[data-cur=usd] .cs__dot {
    opacity: 1;
  }
}
