.back-to-top {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--teal, #60d9cc);
  border-radius: 50%;
  background: #0c1716;
  color: var(--teal, #60d9cc);
  box-shadow: 0 4px 18px #0008;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
@media (hover: hover) {
  .back-to-top:hover { background: var(--teal, #60d9cc); color: #080b0c; }
}
@media (max-width: 767px) {
  .back-to-top {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .back-to-top { transition: none; }
}
