.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  width: 52px;
  height: 52px;
  padding: 5px 0 4px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 16px;
  color: #fff;
  background: rgba(37, 99, 235, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top[hidden] {
  display: flex;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
}

.back-to-top > span {
  font-size: 23px;
  line-height: 23px;
  font-weight: 700;
}

.back-to-top > small {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.04em;
}

.back-to-top:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .back-to-top > span {
    font-size: 21px;
    line-height: 20px;
  }

  .back-to-top > small {
    font-size: 10px;
  }
}

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