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

.panel {
  padding: 24px 20px;
  border-radius: 16px;
  background: #17141a;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.link {
  position: relative;
  padding-bottom: 4px;
  color: #ffffff;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: var(--tw, 0px);
  background: #fff7e6;
  transition: width 300ms ease-out;
}

.is-demo .link:nth-child(1)::after {
  animation: underline-1 2s steps(1, end) infinite;
}

.is-demo .link:nth-child(2)::after {
  animation: underline-2 2s steps(1, end) infinite;
}

.is-demo .link:nth-child(3)::after {
  animation: underline-3 2s steps(1, end) infinite;
}

.is-demo .link:nth-child(4)::after {
  animation: underline-4 2s steps(1, end) infinite;
}

@keyframes underline-1 {
  0%, 4% {
    width: 0;
  }
  12%, 22% {
    width: 34px;
  }
  30%, 100% {
    width: 0;
  }
}
@keyframes underline-2 {
  0%, 26% {
    width: 0;
  }
  34%, 44% {
    width: 52px;
  }
  52%, 100% {
    width: 0;
  }
}
@keyframes underline-3 {
  0%, 48% {
    width: 0;
  }
  56%, 66% {
    width: 76px;
  }
  74%, 100% {
    width: 0;
  }
}
@keyframes underline-4 {
  0%, 70% {
    width: 0;
  }
  78%, 88% {
    width: 40px;
  }
  96%, 100% {
    width: 0;
  }
}
@media (max-width: 340px) {
  .links {
    gap: 12px;
  }
  .link {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .link:nth-child(1)::after,
  .is-demo .link:nth-child(2)::after,
  .is-demo .link:nth-child(3)::after,
  .is-demo .link:nth-child(4)::after {
    animation: none;
    width: 0;
  }
}
