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

.ng {
  width: min(100%, 400px);
  display: grid;
  gap: 8px;
  justify-items: center;
}

.ng__canvas {
  display: block;
  width: 100%;
  height: auto;
}

.ng__box {
  fill: #fff7e6;
}

.ng__box--run {
  stroke: #4cd4a6;
  stroke-width: 2;
}

.ng__ico {
  color: #17141a;
  opacity: 0.72;
}

.ng__label {
  font-weight: 700;
  font-size: 13px;
  fill: #17141a;
}

.ng__port {
  fill: #fff7e6;
  stroke: #17141a;
  stroke-width: 2;
}

.ng__port--run {
  fill: #4cd4a6;
}

.ng__wire {
  fill: none;
  stroke: rgba(255, 247, 230, 0.3);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.ng__wire--run {
  stroke: #4cd4a6;
  stroke-width: 3;
}

.ng__dot {
  offset-path: path("M122,85 C176,85 224,132 278,132");
  offset-distance: 0%;
  offset-rotate: 0deg;
  fill: #fff7e6;
  animation-name: ngFlow;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.ng__dot--2 {
  animation-delay: -0.6667s;
}

.ng__dot--3 {
  animation-delay: -1.3333s;
}

.ng__ring {
  fill: none;
  stroke: #4cd4a6;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation-name: ngArrive;
  animation-duration: 0.6667s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: 0.6667s;
  animation-fill-mode: backwards;
}

@keyframes ngFlow {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}
@keyframes ngArrive {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
.ng.is-paused .ng__dot,
.ng.is-paused .ng__ring {
  animation-name: none;
  opacity: 0;
}

.ng.is-paused .ng__wire--run {
  stroke: rgba(255, 247, 230, 0.3);
  stroke-width: 2.5;
}

.ng.is-paused .ng__box--run {
  stroke: none;
}

.ng.is-paused .ng__port--run {
  fill: #fff7e6;
}

.ng__bar {
  display: flex;
  justify-content: center;
}

.ng__toggle {
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 12px);
  line-height: 1.6;
  color: #17141a;
  background: #fff7e6;
  border: none;
  border-radius: 999px;
  padding: 4px 16px;
  cursor: pointer;
}

.ng__toggle:focus-visible {
  outline: 2px solid #4cd4a6;
  outline-offset: 2px;
}

@media (max-width: 340px), (max-height: 220px) {
  .ng__label {
    font-size: 14px;
  }
  .ng__toggle {
    padding: 0 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ng__dot,
  .ng__ring {
    animation: none !important;
  }
  .ng__dot--2 {
    offset-distance: 40% !important;
  }
  .ng__dot--3 {
    offset-distance: 75% !important;
  }
}
