.back-to-top {
  position: fixed;
  z-index: 11;
  right: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-right));
  bottom: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-bottom));
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--copper);
  background: #15110eef;
  color: var(--heading);
  font-size: 1.3rem;
  line-height: 1;
  text-decoration: none;
}

.back-to-top:is(:hover, :focus-visible) {
  background: var(--copper);
  color: var(--bg);
}

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