html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #15131a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.ex {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: clamp(288px, 88vw, 400px);
  padding: 24px 16px;
  border-radius: 16px;
  background: #26232e;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.ex__bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ex__toggle {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #c8dce4;
  color: #15131a;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ex__toggle:hover {
  transform: translateY(-2px);
}

.ex__toggle:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.ex__ic {
  display: grid;
  place-items: center;
}

.ex__ic svg {
  display: block;
}

.ex__toggleLabel {
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
}

.ex__list {
  display: flex;
  gap: 8px;
}

.ex__item {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #15131a;
  color: #bdb7c6;
  text-decoration: none;
  transform: translateX(-16px);
  clip-path: inset(0 100% 0 0 round 50%);
  transition: clip-path 300ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ex__item svg {
  display: block;
}

.ex__item:hover, .ex__item:focus-visible {
  color: #c8dce4;
}

.ex__item:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.ex.is-open .ex__item {
  transform: translateX(0);
  clip-path: inset(0 0 0 0 round 50%);
}

.ex.is-open .ex__item:nth-child(1) {
  transition-delay: 0ms;
}

.ex.is-open .ex__item:nth-child(2) {
  transition-delay: 60ms;
}

.ex.is-open .ex__item:nth-child(3) {
  transition-delay: 120ms;
}

.ex.is-open .ex__item:nth-child(4) {
  transition-delay: 180ms;
}

.ex__hint {
  margin: 0;
  color: #bdb7c6;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  font-family: inherit;
}

.is-demo .ex__item {
  animation-name: exFan;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.is-demo .ex__item:nth-child(1) {
  animation-delay: 0s;
}

.is-demo .ex__item:nth-child(2) {
  animation-delay: 0.1s;
}

.is-demo .ex__item:nth-child(3) {
  animation-delay: 0.2s;
}

.is-demo .ex__item:nth-child(4) {
  animation-delay: 0.3s;
}

.is-demo .ex__toggle {
  animation-name: exPress;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes exFan {
  0% {
    clip-path: inset(0 100% 0 0 round 50%);
    transform: translateX(-16px);
    color: #bdb7c6;
  }
  12%, 62% {
    clip-path: inset(0 0 0 0 round 50%);
    transform: translateX(0);
    color: #c8dce4;
  }
  84%, 100% {
    clip-path: inset(0 100% 0 0 round 50%);
    transform: translateX(-16px);
    color: #bdb7c6;
  }
}
@keyframes exPress {
  0%, 2% {
    transform: scale(1);
  }
  6% {
    transform: scale(0.92);
  }
  12%, 100% {
    transform: scale(1);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .ex {
    gap: 8px;
    padding: 12px;
  }
  .ex__toggle {
    height: 40px;
    padding: 0 12px;
  }
  .ex__toggleLabel {
    font-size: 12px;
  }
  .ex__item {
    width: 40px;
    height: 40px;
  }
  .ex__ic svg, .ex__item svg {
    width: 18px;
    height: 18px;
  }
  .ex__hint {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .ex__item, .is-demo .ex__toggle {
    animation: none !important;
  }
  .ex__item, .ex__toggle {
    transition: none !important;
  }
  .ex.is-open .ex__item {
    clip-path: inset(0 0 0 0 round 50%);
    transform: translateX(0);
  }
}
