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

@property --p {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}
.totop {
  --p: 0;
  position: relative;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  cursor: pointer;
}

.totop.is-demo {
  animation: totop-fill 2s linear infinite;
}

@keyframes totop-fill {
  from {
    --p: 0;
  }
  to {
    --p: 100;
  }
}
.totop__ring {
  position: absolute;
  inset: 0;
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

.totop__track, .totop__fill {
  fill: none;
  stroke-width: 3.4;
}

.totop__track {
  stroke: rgba(23, 20, 26, 0.14);
}

.totop__fill {
  stroke: #17141a;
  stroke-linecap: round;
  stroke-dasharray: 150.8px;
  stroke-dashoffset: calc(150.8px * (1 - var(--p) / 100));
}

.totop__arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #17141a;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .totop.is-demo {
    animation: none;
    --p: 100;
  }
}
