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

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

.mark {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 3vw, 12px);
  color: #17141a;
  font-weight: 800;
  font-size: clamp(16px, 5vw, 22px);
  line-height: 1;
  font-family: inherit;
  letter-spacing: 0.08em;
}

.mark svg {
  width: clamp(44px, 13vw, 56px);
  height: clamp(44px, 13vw, 56px);
}

.mark__fill {
  fill: #17141a;
  opacity: 0;
  animation: fill-in 600ms ease-out infinite;
}

.mark__line {
  fill: none;
  stroke: #17141a;
  stroke-width: 1.6;
  stroke-dasharray: 100;
  animation: line-draw 600ms ease-out infinite;
}

@keyframes line-draw {
  0% {
    stroke-dashoffset: 100;
    opacity: 1;
  }
  55% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  85% {
    opacity: 0;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes fill-in {
  0%, 55% {
    opacity: 0;
  }
  75%, 85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.mark__trail {
  fill: none;
  stroke: #17141a;
  stroke-width: 1.6;
  stroke-dasharray: 100;
  animation: trail-fade 600ms ease-out infinite;
}

@keyframes trail-fade {
  0% {
    stroke-dashoffset: 100;
    opacity: 0.4;
  }
  55% {
    stroke-dashoffset: 0;
    opacity: 0.4;
  }
  78% {
    stroke-dashoffset: 0;
    opacity: 0.4;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
.mark__spark {
  fill: #17141a;
  opacity: 0;
  transform: scale(1.5);
  transform-origin: center;
  transform-box: fill-box;
  filter: drop-shadow(0 0 1px #17141a);
}

.mark__bit {
  fill: #17141a;
  opacity: 0;
  animation: bit-fly 420ms ease-out forwards;
}

@keyframes bit-fly {
  0% {
    opacity: 0.9;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.3);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mark__line {
    animation: none;
    stroke-dashoffset: 0;
  }
  .mark__fill {
    animation: none;
    opacity: 1;
  }
  .mark__trail {
    display: none;
  }
  .mark__spark {
    display: none;
  }
  .mark__bit {
    display: none;
  }
}
