.back-to-top-button {
  position: fixed;
  z-index: 950;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  display: grid;
  width: 52px;
  height: 52px;
  padding: 0;
  place-items: center;
  border: 1px solid #006a4e;
  border-radius: 50%;
  background: #006a4e;
  color: #fff;
  box-shadow: 0 5px 18px rgb(0 0 0 / 22%);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 160ms ease, transform 160ms ease;
}

.back-to-top-button[hidden] {
  display: none;
}

.back-to-top-button:hover {
  border-color: #004d39;
  background: #004d39;
  transform: translateY(-2px);
}

.back-to-top-button:focus-visible {
  outline: 3px solid #000066;
  outline-offset: 4px;
  box-shadow: 0 0 0 7px #fff, 0 5px 18px rgb(0 0 0 / 22%);
}

.back-to-top-button svg {
  display: block;
  width: 22px;
  height: 22px;
}

@media (max-width: 480px) {
  .back-to-top-button {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top-button {
    transition: none;
  }
}
