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

.graph {
  position: relative;
  margin: 0;
  width: min(360px, 80vw);
}

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

.arc {
  fill: none;
}

.arc--base {
  stroke: rgba(23, 20, 26, 0.22);
  stroke-width: 2;
}

.arc--link {
  stroke: #2f6df6;
  stroke-width: 3;
}

.arc--broken {
  stroke: #c2361a;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.arc--pulse {
  stroke: #2f6df6;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 18 900;
  stroke-dashoffset: 0;
  opacity: 0;
}

.qmark {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  fill: #c2361a;
  text-anchor: middle;
  opacity: 0;
}

.node rect {
  fill: #17141a;
  rx: 16;
}

.node text {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
}

.graph__note {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  margin: 0;
  border-radius: 999px;
  background: #ffe0d8;
  color: #c2361a;
  font-size: clamp(10px, 2.4vw, 13px);
  font-weight: 800;
  padding: 4px 12px;
  opacity: 0;
}

.stage.is-demo .arc--pulse {
  animation: pulse-run 2s linear infinite;
}

.stage.is-demo .arc--broken {
  animation: broken-blink 2s ease-out infinite;
}

.stage.is-demo .qmark {
  animation: q-pop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

.stage.is-demo .graph__note {
  animation: note-pop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes pulse-run {
  0% {
    opacity: 1;
    stroke-dashoffset: 918;
  }
  88% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
  94%, 100% {
    opacity: 0;
    stroke-dashoffset: 0;
  }
}
@keyframes broken-blink {
  0%, 56% {
    opacity: 0.45;
  }
  64% {
    opacity: 1;
  }
  72% {
    opacity: 0.45;
  }
  80% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0.8;
  }
}
@keyframes q-pop {
  0%, 56% {
    opacity: 0;
    transform: scale(0.4);
    transform-origin: 200px 182px;
  }
  66% {
    opacity: 1;
    transform: scale(1.25);
    transform-origin: 200px 182px;
  }
  72%, 94% {
    opacity: 1;
    transform: scale(1);
    transform-origin: 200px 182px;
  }
  100% {
    opacity: 0;
    transform: scale(0.5);
    transform-origin: 200px 182px;
  }
}
@keyframes note-pop {
  0%, 60% {
    opacity: 0;
    transform: translate(-50%, -36%) scale(0.6);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  76%, 94% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -36%) scale(0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .arc--pulse,
  .stage.is-demo .arc--broken,
  .stage.is-demo .qmark,
  .stage.is-demo .graph__note {
    animation: none;
  }
  .arc--pulse {
    opacity: 0;
  }
  .arc--broken {
    opacity: 0.8;
  }
  .qmark {
    opacity: 1;
  }
  .graph__note {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
