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

.ng {
  width: min(100%, 400px);
}

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

.ng__box {
  fill: #fff7e6;
}

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

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

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

.ng__wire {
  fill: none;
  stroke: #fff7e6;
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: none;
  stroke-dasharray: 83;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 300ms cubic-bezier(0.2, 0.8, 0.2, 1), stroke-width 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ng__hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
  cursor: pointer;
}

.ng__wirewrap:hover .ng__wire,
.ng__wirewrap:focus-within .ng__wire {
  stroke-width: 5;
}

.ng__wirewrap.is-cut .ng__wire {
  stroke-dashoffset: 83;
}

.ng__cut {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  cursor: pointer;
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ng__wirewrap:hover .ng__cut,
.ng__wirewrap:focus-within .ng__cut,
.ng__wirewrap.is-cut .ng__cut {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.ng__cutbg {
  fill: #17141a;
}

.ng__cutico {
  color: #fff7e6;
}

.ng__cut:focus {
  outline: none;
}

.ng__cut:focus-visible .ng__cutbg {
  stroke: #fff7e6;
  stroke-width: 3;
}

.ng.is-demo .ng__wirewrap--b .ng__wire {
  animation-name: ngCut;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.ng.is-demo .ng__wirewrap--b .ng__cut {
  animation-name: ngCutBtn;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

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

@keyframes ngCut {
  0%, 34% {
    stroke-dashoffset: 0;
  }
  56%, 68% {
    stroke-dashoffset: 83;
  }
  88%, 100% {
    stroke-dashoffset: 0;
  }
}
@keyframes ngCutBtn {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(-18deg);
  }
  14%, 30% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  34% {
    opacity: 1;
    transform: scale(0.82) rotate(-8deg);
  }
  40%, 60% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  68%, 100% {
    opacity: 0;
    transform: scale(0.6) rotate(-18deg);
  }
}
@keyframes ngPortOff {
  0%, 55.9% {
    fill: #fff7e6;
  }
  56%, 87.9% {
    fill: #ff4d1f;
  }
  88%, 100% {
    fill: #fff7e6;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .ng__label {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ng__wire,
  .ng__cut,
  .ng__port {
    animation: none !important;
    transition: none !important;
  }
}
