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

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

.sg {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: min(420px, 94vw);
}

@media (max-width: 340px), (max-height: 220px) {
  .sg {
    gap: 4px;
  }
  .sg__toggle {
    padding: 4px;
    gap: 4px;
  }
  .sg__avatar {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  .sg__role {
    display: none;
  }
}
.sg__card {
  background: #fff7e6;
  border-radius: 16px;
  overflow: hidden;
}

.sg__toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 8px;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.sg__avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #17141a;
  color: #fff7e6;
  font-weight: 700;
  font-size: 10px;
  line-height: 1;
  font-family: inherit;
}

.sg__name {
  font-weight: 700;
  font-size: clamp(11px, 3vw, 12px);
  line-height: 1.2;
  font-family: inherit;
  color: #17141a;
}

.sg__role {
  font-weight: 500;
  font-size: 9px;
  line-height: 1.3;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.72);
}

.sg__bio {
  margin: 0;
  padding: 0 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-weight: 500;
  font-size: 9px;
  line-height: 1.4;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.7);
  transition: max-height 600ms cubic-bezier(0.2, 1.4, 0.4, 1), opacity 600ms cubic-bezier(0.2, 1.4, 0.4, 1), padding-bottom 600ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.sg__card.is-open .sg__bio {
  max-height: 60px;
  opacity: 1;
  padding-bottom: 12px;
}

.sg.is-demo .sg__card {
  animation: sg-in 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

.sg.is-demo .sg__card:nth-child(1) {
  animation-delay: 0ms;
}

.sg.is-demo .sg__card:nth-child(2) {
  animation-delay: 90ms;
}

.sg.is-demo .sg__card:nth-child(3) {
  animation-delay: 180ms;
}

.sg.is-demo .sg__card:nth-child(4) {
  animation-delay: 270ms;
}

.sg.is-demo .sg__card:nth-child(5) {
  animation-delay: 360ms;
}

.sg.is-demo .sg__card:nth-child(6) {
  animation-delay: 450ms;
}

@keyframes sg-in {
  0% {
    opacity: 0.7;
    transform: translateY(6px) rotate(-1.5deg);
  }
  18% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  86% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0.7;
    transform: translateY(6px) rotate(-1.5deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sg__bio {
    transition: none;
  }
  .sg.is-demo .sg__card,
  .sg.is-demo .sg__card .sg__bio {
    animation: none !important;
  }
}
