#toTop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: none;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    background: var(--button-bg);
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-weight:600;
    z-index: 9999;
    animation: skybtFloat 2s ease-in-out infinite;
}

#toTop span{
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #fff;;
}

@keyframes skybtFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* responsive for #toTop span */

/* small phones / very narrow (<=360px) */
@media (max-width: 360px) {
  #toTop span {
    font-size: 25px;
    line-height: 25px;
    width: 25px;
    height: 25px;
  }
}

/* typical phones (361px - 480px) */
@media (min-width: 361px) and (max-width: 480px) {
  #toTop span {
    font-size: 30px;
    line-height: 30px;
    width: 30px;
    height: 30px;
  }
}

/* small tablets / large phones (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  #toTop span {
    font-size: 40px;   /* approx scaling on small tablets */
    line-height: 40px;
    width: 40px;
    height: 40px;
  }
}