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

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

.ng {
  width: min(100%, 360px);
  display: grid;
  gap: 8px;
}

.ng__livewrap {
  display: grid;
  justify-items: center;
  margin: 0;
}

.ng__live, .ng__demolive {
  grid-area: 1/1;
}

.ng__live {
  font-weight: 700;
  font-size: clamp(10px, 3vw, 11px);
  line-height: 20px;
  color: rgba(23, 20, 26, 0.7);
  letter-spacing: 0.01em;
}

.ng__demolive {
  height: 20px;
  overflow: hidden;
  opacity: 0;
}

.ng__lstrip {
  display: grid;
}

.ng__lt {
  height: 20px;
  font-weight: 700;
  font-size: clamp(10px, 3vw, 11px);
  line-height: 20px;
  color: rgba(23, 20, 26, 0.7);
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: center;
}

.ng__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ng__card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  padding-left: 16px;
  border: 2px solid rgba(23, 20, 26, 0.18);
  border-radius: 12px;
  background: #ffffff;
}

.ng__title {
  font-weight: 700;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 20px;
  color: #17141a;
}

.ng__band {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(23, 20, 26, 0.28);
  transform: scaleY(0);
  transform-origin: 50% 0;
}

.ng__chips {
  display: block;
  height: 20px;
  overflow: hidden;
}

.ng__strip {
  display: grid;
}

.ng__chip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 20px;
  white-space: nowrap;
  font-weight: 700;
  font-size: clamp(10px, 3vw, 11px);
  line-height: 1;
}

.ng__ic {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.ng__chip--wait {
  color: rgba(23, 20, 26, 0.62);
}

.ng__chip--run {
  color: #7c90be;
}

.ng__chip--done {
  color: #479077;
}

.ng__chip--fail {
  color: #c2361a;
}

.ng__card[data-state=wait] .ng__strip {
  transform: translateY(0);
}

.ng__card[data-state=run] .ng__strip {
  transform: translateY(-20px);
}

.ng__card[data-state=done] .ng__strip {
  transform: translateY(-40px);
}

.ng__card[data-state=fail] .ng__strip {
  transform: translateY(-60px);
}

.ng__card[data-state=run] {
  border-color: #7c90be;
}

.ng__card[data-state=done] {
  border-color: #479077;
}

.ng__card[data-state=fail] {
  border-color: #c2361a;
}

.ng__card[data-state=run] .ng__band {
  background: #7c90be;
  transform-origin: 50% 0;
  animation-name: ngFill;
  animation-duration: 800ms;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.ng__card[data-state=done] .ng__band {
  background: #479077;
  transform: scaleY(1);
}

.ng__card[data-state=fail] .ng__band {
  background: #c2361a;
  transform: scaleY(1);
}

.ng__ic--spin {
  transform-origin: 50% 50%;
  animation-name: ngSpin;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.ng__run {
  justify-self: center;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(10px, 3vw, 11px);
  line-height: 1.8;
  color: #fff7e6;
  background: #7c90be;
  border: none;
  border-radius: 999px;
  padding: 4px 20px;
  cursor: pointer;
}

.ng__run:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.ng.is-demo .ng__live {
  opacity: 0;
}

.ng.is-demo .ng__demolive {
  opacity: 1;
}

.ng.is-demo .ng__lstrip {
  animation-name: ngLine;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.ng.is-demo .ng__card--1 {
  animation-name: ngEdge1;
}

.ng.is-demo .ng__card--2 {
  animation-name: ngEdge2;
}

.ng.is-demo .ng__card--3 {
  animation-name: ngEdge3;
}

.ng.is-demo .ng__card--1 .ng__strip {
  animation-name: ngStrip1;
}

.ng.is-demo .ng__card--2 .ng__strip {
  animation-name: ngStrip2;
}

.ng.is-demo .ng__card--3 .ng__strip {
  animation-name: ngStrip3;
}

.ng.is-demo .ng__card,
.ng.is-demo .ng__strip {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.ng.is-demo .ng__card--1 .ng__band {
  animation-name: ngBand1;
}

.ng.is-demo .ng__card--2 .ng__band {
  animation-name: ngBand2;
}

.ng.is-demo .ng__card--3 .ng__band {
  animation-name: ngBand3;
}

.ng.is-demo .ng__band {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes ngSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes ngFill {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes ngLine {
  0%, 11.9% {
    transform: translateY(0);
  }
  12%, 71.9% {
    transform: translateY(-20px);
  }
  72%, 87.9% {
    transform: translateY(-40px);
  }
  88%, 100% {
    transform: translateY(0);
  }
}
@keyframes ngStrip1 {
  0%, 11.9% {
    transform: translateY(0);
  }
  12%, 35.9% {
    transform: translateY(-20px);
  }
  36%, 79.9% {
    transform: translateY(-40px);
  }
  80%, 100% {
    transform: translateY(0);
  }
}
@keyframes ngEdge1 {
  0%, 11.9% {
    border-color: rgba(23, 20, 26, 0.18);
  }
  12%, 35.9% {
    border-color: #7c90be;
  }
  36%, 79.9% {
    border-color: #479077;
  }
  80%, 100% {
    border-color: rgba(23, 20, 26, 0.18);
  }
}
@keyframes ngBand1 {
  0% {
    transform: scaleY(0);
    background-color: rgba(23, 20, 26, 0.28);
    animation-timing-function: steps(1, end);
  }
  12% {
    transform: scaleY(0);
    background-color: #7c90be;
    animation-timing-function: linear;
  }
  35.9% {
    transform: scaleY(1);
    background-color: #7c90be;
    animation-timing-function: steps(1, end);
  }
  36%, 79.9% {
    transform: scaleY(1);
    background-color: #479077;
    animation-timing-function: steps(1, end);
  }
  80%, 100% {
    transform: scaleY(0);
    background-color: rgba(23, 20, 26, 0.28);
  }
}
@keyframes ngStrip2 {
  0%, 23.9% {
    transform: translateY(0);
  }
  24%, 55.9% {
    transform: translateY(-20px);
  }
  56%, 83.9% {
    transform: translateY(-40px);
  }
  84%, 100% {
    transform: translateY(0);
  }
}
@keyframes ngEdge2 {
  0%, 23.9% {
    border-color: rgba(23, 20, 26, 0.18);
  }
  24%, 55.9% {
    border-color: #7c90be;
  }
  56%, 83.9% {
    border-color: #479077;
  }
  84%, 100% {
    border-color: rgba(23, 20, 26, 0.18);
  }
}
@keyframes ngBand2 {
  0% {
    transform: scaleY(0);
    background-color: rgba(23, 20, 26, 0.28);
    animation-timing-function: steps(1, end);
  }
  24% {
    transform: scaleY(0);
    background-color: #7c90be;
    animation-timing-function: linear;
  }
  55.9% {
    transform: scaleY(1);
    background-color: #7c90be;
    animation-timing-function: steps(1, end);
  }
  56%, 83.9% {
    transform: scaleY(1);
    background-color: #479077;
    animation-timing-function: steps(1, end);
  }
  84%, 100% {
    transform: scaleY(0);
    background-color: rgba(23, 20, 26, 0.28);
  }
}
@keyframes ngStrip3 {
  0%, 35.9% {
    transform: translateY(0);
  }
  36%, 71.9% {
    transform: translateY(-20px);
  }
  72%, 87.9% {
    transform: translateY(-60px);
  }
  88%, 100% {
    transform: translateY(0);
  }
}
@keyframes ngEdge3 {
  0%, 35.9% {
    border-color: rgba(23, 20, 26, 0.18);
  }
  36%, 71.9% {
    border-color: #7c90be;
  }
  72%, 87.9% {
    border-color: #c2361a;
  }
  88%, 100% {
    border-color: rgba(23, 20, 26, 0.18);
  }
}
@keyframes ngBand3 {
  0% {
    transform: scaleY(0);
    background-color: rgba(23, 20, 26, 0.28);
    animation-timing-function: steps(1, end);
  }
  36% {
    transform: scaleY(0);
    background-color: #7c90be;
    animation-timing-function: linear;
  }
  71.9% {
    transform: scaleY(1);
    background-color: #7c90be;
    animation-timing-function: steps(1, end);
  }
  72%, 87.9% {
    transform: scaleY(1);
    background-color: #c2361a;
    animation-timing-function: steps(1, end);
  }
  88%, 100% {
    transform: scaleY(0);
    background-color: rgba(23, 20, 26, 0.28);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .ng {
    gap: 4px;
  }
  .ng__list {
    gap: 4px;
  }
  .ng__card {
    padding: 4px 8px;
    padding-left: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ng__ic--spin,
  .ng__band,
  .ng__card,
  .ng__strip,
  .ng__lstrip {
    animation: none !important;
  }
  .ng__card[data-state=run] .ng__band {
    transform: scaleY(1) !important;
  }
}
