.back-to-top {
  z-index: calc(var(--z-index-sticky) - 2);
  position: fixed;
  right: 30px;
  /* PUF-005: keep the copyright line readable — button bottom edge stays above it */
  bottom: calc(64px + env(safe-area-inset-bottom));
  width: 50px;
  height: 50px;
  color: var(--color-top-button-text-color);
  background-color: rgba(41, 41, 41, 0.4);
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 300ms cubic-bezier(0.455, 0.03, 0.515, 0.955), background-color 150ms ease;
}

.back-to-top:hover {
  background-color: rgba(41, 41, 41, 0.6);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.back-to-top[show] {
  transform: translateY(0);
}

@media (min-width: 960px) {
  .back-to-top {
    right: 20px;
    bottom: 120px;
    transform: translateY(200%);
  }
}
