/* Shared step-by-step scroll guide; the pink ring retains page progress. */
#toTop {
  display: none !important;
}

#scroll-progress {
  position: fixed;
  top: auto !important;
  left: auto;
  right: 32px;
  bottom: 32px;
  z-index: 900;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 60px;
  height: 60px;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #323232;
  box-shadow: 0 5px 22px rgba(31, 39, 50, 0.18);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-indent: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: visible;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.85);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  -webkit-tap-highlight-color: transparent;
}

#scroll-progress.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#scroll-progress.is-visible:hover {
  color: #ff497c;
}

#scroll-progress:focus-visible {
  outline: 3px solid #323232;
  outline-offset: 5px;
}

#scroll-progress .scroll-progress__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-width: 3;
  pointer-events: none;
}

#scroll-progress .scroll-progress__track {
  stroke: #e9edf1;
}

#scroll-progress .scroll-progress__arc {
  stroke: #ff497c;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  stroke-linecap: round;
}

#scroll-progress .scroll-progress__arrow {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  width: 25px;
  height: 25px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#scroll-progress[data-scroll-state="bottom"] .scroll-progress__arrow {
  transform: translate(-50%, -50%) rotate(0deg);
}

body.modal-open #scroll-progress {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 767px) {
  #scroll-progress {
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  #scroll-progress {
    transition: none;
  }

  #scroll-progress,
  #scroll-progress.is-visible,
  #scroll-progress.is-visible:hover {
    transform: none;
  }
}

#scroll-progress .scroll-progress__arrow {
  transition: transform 240ms ease;
}

#scroll-progress .scroll-progress__hint {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  padding: 9px 12px;
  border: 1px solid #ffffff26;
  border-radius: 9px;
  background: #1f2732;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 3px 15px #1018221a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

#scroll-progress[data-at-start="true"] .scroll-progress__hint,
#scroll-progress:hover .scroll-progress__hint,
#scroll-progress:focus-visible .scroll-progress__hint {
  opacity: 1;
  visibility: visible;
}

#scroll-progress[aria-disabled="true"] {
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  #scroll-progress .scroll-progress__arrow,
  #scroll-progress .scroll-progress__hint {
    transition: none;
  }
}
