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

.iconbtn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  width: clamp(52px, 14vw, 64px);
  height: clamp(52px, 14vw, 64px);
  display: grid;
  place-items: center;
  background: rgba(255, 247, 230, 0.1);
  color: #2f6df6;
  -webkit-tap-highlight-color: transparent;
}

.iconbtn:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 3px;
}

.refresh {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.iconbtn.is-spinning .refresh {
  animation: spin-once 600ms ease-out;
}

.iconbtn.is-demo .refresh {
  animation: spin-loop 2s ease-out infinite;
}

@keyframes spin-once {
  to {
    transform: rotate(360deg);
  }
}
@keyframes spin-loop {
  0%, 10% {
    transform: rotate(0);
  }
  55% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.refresh-ghost {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  opacity: 0;
  filter: blur(0.6px);
}

.iconbtn.is-spinning .refresh-ghost {
  animation: ghost-once 600ms ease-out;
}

.iconbtn.is-demo .refresh-ghost {
  animation: ghost-loop 2s ease-out infinite;
}

@keyframes ghost-once {
  0% {
    transform: rotate(0);
    opacity: 0;
  }
  60% {
    transform: rotate(260deg);
    opacity: 0.4;
  }
  100% {
    transform: rotate(360deg);
    opacity: 0;
  }
}
@keyframes ghost-loop {
  0%, 10% {
    transform: rotate(0);
    opacity: 0;
  }
  30% {
    transform: rotate(170deg);
    opacity: 0.4;
  }
  55% {
    transform: rotate(330deg);
    opacity: 0.3;
  }
  62%, 100% {
    transform: rotate(360deg);
    opacity: 0;
  }
}
.refresh-spark {
  fill: #2f6df6;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.5);
  transform-origin: center;
  transform-box: fill-box;
  filter: drop-shadow(0 0 1px #2f6df6);
}

.refresh-bit {
  fill: #2f6df6;
  opacity: 0;
  transform: translate(0, 0);
  pointer-events: none;
  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) {
  .iconbtn.is-spinning .refresh, .iconbtn.is-demo .refresh {
    animation: none;
  }
  .refresh-ghost {
    display: none;
  }
  .refresh-spark {
    display: none;
  }
  .refresh-bit {
    display: none;
  }
}
