button.Btn.scroll-progress-button {
  position: fixed;
  right: clamp(16px, 2.5vw, 36px);
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 99999;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 7, 24, 0.78);
  color: #ffffff;
  box-shadow: 0 10px 32px rgba(3, 1, 18, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.94);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

button.Btn.scroll-progress-button.visible {
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto !important;
  transform: translateY(0) scale(1);
}

button.Btn.scroll-progress-button:hover {
  background: rgba(25, 16, 55, 0.94);
  transform: translateY(-2px) scale(1.03);
}

button.Btn.scroll-progress-button:focus-visible {
  outline: 2px solid var(--primary, #a78bfa);
  outline-offset: 3px;
}

.scroll-progress-ring {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.scroll-progress-track,
.scroll-progress-value {
  fill: none;
  stroke-width: 2.4;
}

.scroll-progress-track {
  stroke: rgba(167, 139, 250, 0.24);
}

.scroll-progress-value {
  stroke: var(--primary, #a78bfa);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.72));
  transition: stroke-dashoffset 0.08s linear;
}

.scroll-progress-arrow {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 576px) {
  button.Btn.scroll-progress-button {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  button.Btn.scroll-progress-button,
  .scroll-progress-value {
    transition: none;
  }
}
