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

.sd {
  box-sizing: border-box;
  width: 208px;
  max-width: 78vw;
  height: 268px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: 16px 12px;
  background: rgba(255, 247, 230, 0.04);
  border: 1px solid rgba(255, 247, 230, 0.12);
  overflow: hidden;
  transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd.is-collapsed {
  width: 76px;
}

.sd__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.sd__mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #2f6df6;
}

.sd__brand-text {
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  color: #fff7e6;
  white-space: nowrap;
  transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd.is-collapsed .sd__brand-text {
  opacity: 0;
}

.sd__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sd__item {
  position: relative;
  border-radius: 12px;
}

.sd__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255, 247, 230, 0.62);
  overflow: hidden;
  transition: background 300ms cubic-bezier(0.2, 0.8, 0.2, 1), color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd__item.is-active .sd__link {
  background: rgba(255, 247, 230, 0.1);
  color: #fff7e6;
}

.sd__item.is-active .sd__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 4px;
  background: #2f6df6;
}

.sd__ic {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.sd__ic svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sd__label {
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd.is-collapsed .sd__label {
  opacity: 0;
}

.sd__toggle {
  flex: 0 0 auto;
  align-self: flex-end;
  width: 24px;
  height: 24px;
  margin-top: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 230, 0.2);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.sd__toggle-ic {
  width: 14px;
  height: 14px;
  color: #fff7e6;
  transform: rotate(0deg);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd__toggle-ic svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sd.is-collapsed ~ .sd__toggle .sd__toggle-ic,
.sd.is-collapsed .sd__toggle-ic {
  transform: rotate(180deg);
}

.sd.is-demo {
  animation: sd-breathe 2s ease-in-out infinite;
}

.sd.is-demo .sd__brand-text,
.sd.is-demo .sd__label {
  animation: sd-fade 2s ease-in-out infinite;
}

.sd.is-demo .sd__toggle-ic {
  animation: sd-rotate 2s ease-in-out infinite;
}

@keyframes sd-breathe {
  0%, 20%, 100% {
    width: 208px;
  }
  50%, 70% {
    width: 76px;
  }
}
@keyframes sd-fade {
  0%, 20%, 100% {
    opacity: 1;
  }
  50%, 70% {
    opacity: 0;
  }
}
@keyframes sd-rotate {
  0%, 20%, 100% {
    transform: rotate(0deg);
  }
  50%, 70% {
    transform: rotate(180deg);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .sd {
    width: 168px;
    padding: 12px 8px;
  }
  .sd__brand {
    margin-bottom: 12px;
  }
  .sd.is-demo {
    animation-duration: 2s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sd.is-demo,
  .sd.is-demo .sd__brand-text,
  .sd.is-demo .sd__label,
  .sd.is-demo .sd__toggle-ic {
    animation: none !important;
  }
  .sd, .sd__brand-text, .sd__label, .sd__toggle-ic {
    transition: none;
  }
}
