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;
  justify-items: start;
}

.mls {
  position: relative;
}

.mls__trigger {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: #fff7e6;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: #17141a;
  cursor: pointer;
}

.mls__trigger:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: -2px;
}

.mls:not(.is-demo) .mls__trigger[aria-expanded=true] {
  background-color: rgba(255, 210, 63, 0.45);
}

.mls__caret {
  display: block;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mls__trigger[aria-expanded=true] .mls__caret {
  transform: rotate(180deg);
}

.mls__l1,
.mls__l2,
.mls__l3 {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff7e6;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.mls__u {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mls__l1 {
  top: 42px;
  left: 0;
  width: min(160px, 50vw);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 220ms;
}

.mls:not(.is-demo).is-open .mls__l1 {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.mls__l2,
.mls__l3 {
  top: 0;
  left: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 220ms;
}

.mls__l2 {
  width: min(140px, 44vw);
}

.mls__l3 {
  width: min(120px, 38vw);
}

.mls__i {
  position: relative;
}

.mls__i--parent:hover > .mls__l2,
.mls__i--parent:focus-within > .mls__l2,
.mls__i--parent:hover > .mls__l3,
.mls__i--parent:focus-within > .mls__l3 {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.mls__a,
.mls__b {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: rgba(23, 20, 26, 0.72);
  text-decoration: none;
  cursor: pointer;
}

.mls__a:hover,
.mls__b:hover {
  background: rgba(255, 210, 63, 0.3);
  color: #17141a;
}

.mls__a:focus-visible,
.mls__b:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: -2px;
}

.mls__b {
  font-weight: 700;
  color: #17141a;
}

.mls__sub-caret {
  display: block;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mls__i--parent:hover > .mls__b .mls__sub-caret,
.mls__i--parent:focus-within > .mls__b .mls__sub-caret {
  transform: rotate(90deg);
}

.mls.is-demo .mls__l1,
.mls.is-demo .mls__l2,
.mls.is-demo .mls__l3 {
  visibility: visible;
}

.mls.is-demo .mls__l1 {
  animation-name: mls-l1;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.mls.is-demo .mls__caret {
  animation-name: mls-caret;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.mls.is-demo .mls__trigger {
  animation-name: mls-trig;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.mls.is-demo .mls__l2 {
  animation-name: mls-l2-slide, mls-l2-show;
  animation-duration: 2s, 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), steps(1, end);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

.mls.is-demo .mls__l3 {
  animation-name: mls-l3-slide, mls-l3-show;
  animation-duration: 2s, 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), steps(1, end);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

.mls.is-demo .mls__i--feat > .mls__b .mls__sub-caret {
  animation-name: mls-caret-feat;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.mls.is-demo .mls__i--share > .mls__b .mls__sub-caret {
  animation-name: mls-caret-share;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes mls-l1 {
  0%, 5% {
    opacity: 0;
    transform: translateY(-6px);
    clip-path: inset(0 0 100% 0);
  }
  6%, 82% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
  }
  90%, 100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(100% 0 0 0);
  }
}
@keyframes mls-caret {
  0%, 5% {
    transform: rotate(0deg);
  }
  6%, 88% {
    transform: rotate(180deg);
  }
  88.5%, 100% {
    transform: rotate(0deg);
  }
}
@keyframes mls-l2-slide {
  0%, 28% {
    transform: translateX(12px);
  }
  36%, 80% {
    transform: translateX(0);
  }
  86%, 100% {
    transform: translateX(12px);
  }
}
@keyframes mls-l2-show {
  0%, 29% {
    opacity: 0;
  }
  31%, 82% {
    opacity: 1;
  }
  82.1%, 100% {
    opacity: 0;
  }
}
@keyframes mls-caret-feat {
  0%, 30% {
    transform: rotate(0deg);
  }
  31%, 82% {
    transform: rotate(90deg);
  }
  83%, 100% {
    transform: rotate(0deg);
  }
}
@keyframes mls-l3-slide {
  0%, 50% {
    transform: translateX(12px);
  }
  58%, 77% {
    transform: translateX(0);
  }
  83%, 100% {
    transform: translateX(12px);
  }
}
@keyframes mls-l3-show {
  0%, 51% {
    opacity: 0;
  }
  53%, 76% {
    opacity: 1;
  }
  76.1%, 100% {
    opacity: 0;
  }
}
@keyframes mls-caret-share {
  0%, 52% {
    transform: rotate(0deg);
  }
  53%, 76% {
    transform: rotate(90deg);
  }
  77%, 100% {
    transform: rotate(0deg);
  }
}
@keyframes mls-trig {
  0%, 5.9% {
    background-color: transparent;
  }
  6%, 88% {
    background-color: rgba(255, 210, 63, 0.45);
  }
  88.5%, 100% {
    background-color: transparent;
  }
}
.mls.is-demo .mls__l1::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 210, 63, 0.3);
  pointer-events: none;
  animation-name: mls-sweep;
  animation-duration: 900ms;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes mls-sweep {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(90px);
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .mls__trigger {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
    line-height: 15px;
  }
  .mls__l1 {
    top: 34px;
    width: 108px;
  }
  .mls__l2 {
    width: 92px;
  }
  .mls__l3 {
    width: 80px;
  }
  .mls__a,
  .mls__b {
    height: 26px;
    padding: 0 4px;
    gap: 0;
    font-size: 10px;
    line-height: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mls.is-demo .mls__l1,
  .mls.is-demo .mls__l2,
  .mls.is-demo .mls__l3,
  .mls.is-demo .mls__caret,
  .mls.is-demo .mls__sub-caret {
    animation: none !important;
  }
  .mls.is-demo .mls__l1::after {
    animation: none !important;
    opacity: 0;
  }
  .mls.is-demo .mls__l1,
  .mls.is-demo .mls__l2,
  .mls.is-demo .mls__l3 {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .mls.is-demo .mls__caret {
    transform: rotate(180deg);
  }
  .mls.is-demo .mls__trigger {
    background-color: rgba(255, 210, 63, 0.45);
  }
  .mls.is-demo .mls__i--feat > .mls__b .mls__sub-caret,
  .mls.is-demo .mls__i--share > .mls__b .mls__sub-caret {
    transform: rotate(90deg);
  }
}
