.back-to-top {
  align-items: center;
  background: #173f3b;
  border: 1px solid #f2c26e;
  border-radius: 999px;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  box-shadow: 0 12px 32px rgb(15 48 45 / 24%);
  color: #fffaf0;
  cursor: pointer;
  display: inline-flex;
  font: 800 0.78rem/1 Manrope, Arial, sans-serif;
  justify-content: center;
  min-height: 2.75rem;
  opacity: 0;
  padding: 0.8rem 1.05rem;
  pointer-events: none;
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  transform: translateY(0.75rem);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
  z-index: 40;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.back-to-top:hover {
  background: #0f302d;
}

.back-to-top:focus-visible {
  outline: 3px solid rgb(227 111 61 / 45%);
  outline-offset: 3px;
}

.back-to-top-label-short {
  display: none;
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: max(0.9rem, env(safe-area-inset-bottom));
    min-height: 2.65rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    right: max(0.9rem, env(safe-area-inset-right));
  }

  .back-to-top-label-long {
    display: none;
  }

  .back-to-top-label-short {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
