.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-accent, #fff);
  background: var(--color-primary, #ff6b00);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--color-primary, #ff6b00) 42%, transparent);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.back-to-top svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

@media (max-width: 720px) {
  .back-to-top {
    right: 0.85rem;
    bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px));
    width: 2.7rem;
    height: 2.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
