#backToTop {
  position: fixed;
  right: 40px;
  bottom: 40px;
  width: 80px;
  height: 80px;
  border: none;
  border-radius: 50%;
  background-color: rgb(138, 112, 76);
  cursor: pointer;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;
  z-index: 9; /* less than 10 */

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Arrow icon */
#backToTop::before {
  content: "";
  width: 40px;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 14l5-5 5 5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

/* Visible state */
#backToTop.show {
  opacity: 0.5;
  pointer-events: auto;
}

/* Hover only when visible */
#backToTop.show:hover {
  opacity: 1;
}

/* 📱 Mobile adjustments */
@media (max-width: 768px) {
  #backToTop {
    width: 60px;
    height: 60px;
    right: 20px;
  }

  #backToTop::before {
    width: 28px;
    height: 28px;
  }
}