.soma-back-to-top {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 1rem));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--button-copper, #dfbd99);
  color: var(--brown, #524841);
  box-shadow: 0 3px 14px rgba(82, 72, 65, .14);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}
.soma-back-to-top[hidden] { display: none; }
.soma-back-to-top:hover {
  background: var(--button-copper-hover, #e8cbaa);
  transform: translateY(-3px);
}
.soma-back-to-top:focus-visible {
  outline: 3px solid var(--brown, #524841);
  outline-offset: 4px;
}
@media (max-width: 600px) {
  .soma-back-to-top {
    right: max(1rem, env(safe-area-inset-right));
    width: 48px;
    height: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .soma-back-to-top { transition: none; }
  .soma-back-to-top:hover { transform: none; }
}
