.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #5a8f4e;
  color: #fff;
  box-shadow: 0 8px 28px rgba(45, 36, 22, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.25s ease;
  z-index: 1200;
  cursor: pointer;
}

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

.back-to-top:hover {
  background: #3d5a35;
  transform: translateY(-3px);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(232, 184, 75, 0.7);
  outline-offset: 4px;
}

.back-to-top svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

@media (max-width: 640px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}
