.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  width: 2.9rem;
  height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(.75rem);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .15s ease;
  box-shadow: 0 6px 20px rgba(25,61,54,.18);
}
.back-to-top:hover { background: var(--forest-hover); }
.back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.back-to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Keep the utility control above the online conversation's launcher. */
body.has-chat-launcher .back-to-top { bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.9rem); }
body.convo-open .back-to-top { visibility: hidden; opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .back-to-top { right: 1rem; width: 2.7rem; height: 2.7rem; } body.page-product.has-chat-launcher .back-to-top { bottom: calc(4.7rem + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }
