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

.stage {
  align-items: flex-start;
}

.sd {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.sd__trigger {
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: #fff7e6;
  color: #17141a;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sd__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  list-style: none;
  margin: 0;
  padding: 4px;
  width: max-content;
  min-width: 100%;
  max-width: min(190px, 58vw);
  border-radius: 12px;
  background: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform: translate(-50%, -6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd.is-open .sd__menu {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
  transform-origin: top center;
  animation: sd-menu-jelly 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sd-menu-jelly {
  0% {
    transform: translate(-50%, 0) scaleY(0.9);
  }
  60% {
    transform: translate(-50%, 0) scaleY(1.04);
  }
  100% {
    transform: translate(-50%, 0) scaleY(1);
  }
}
.sd__item {
  position: relative;
  padding: 4px 12px 4px 32px;
  border-radius: 8px;
  font-size: 12px;
  color: #17141a;
  cursor: pointer;
}

.sd__check {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  color: #2f6df6;
  transform: scale(0);
  transition: transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd__item.is-checked .sd__check {
  transform: scale(1);
  animation: sd-check-spring 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sd-check-spring {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.3);
  }
  75% {
    transform: scale(0.85);
  }
  100% {
    transform: scale(1);
  }
}
.sd.is-demo .sd__menu {
  animation: sd-demo-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes sd-demo-loop {
  0%, 6% {
    transform: translate(-50%, -6px) scaleY(0.9);
    opacity: 0;
    pointer-events: none;
  }
  18% {
    transform: translate(-50%, 0) scaleY(1.04);
    opacity: 1;
    pointer-events: auto;
  }
  28%, 68% {
    transform: translate(-50%, 0) scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }
  80% {
    transform: translate(-50%, 0) scaleY(1.04);
    opacity: 1;
    pointer-events: auto;
  }
  92%, 100% {
    transform: translate(-50%, -6px) scaleY(0.9);
    opacity: 0;
    pointer-events: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sd__menu, .sd__check {
    transition: none;
  }
  .sd.is-open .sd__menu, .sd__item.is-checked .sd__check, .sd.is-demo .sd__menu {
    animation: none !important;
  }
}
