.floating-back-to-top {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: var(--ink, #151512);
  color: #fff;
  font: 400 27px/1 Arial, Helvetica, sans-serif;
  box-shadow: 0 8px 24px rgba(21, 21, 18, .2);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.floating-back-to-top:hover {
  transform: translateY(-3px);
  background: #34342f;
  box-shadow: 0 11px 28px rgba(21, 21, 18, .28);
}

.floating-back-to-top:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .floating-back-to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
}

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