.back-to-top {
  position: fixed;
  right: calc(22px + env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom) + var(--analytics-banner-height, 0px));
  z-index: 95;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid #eeeaff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 28px #241a5433;
  color: #5845d6;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 12px 32px #241a5440; }
.back-to-top:focus-visible { outline: 3px solid #a99cff; outline-offset: 3px; }
@media (max-width: 600px) {
  .back-to-top {
    right: calc(16px + env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom) + var(--analytics-banner-height, 0px));
    width: 48px;
    height: 48px;
  }
  .back-to-top svg { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}
