.back-to-top {
  width: 52px;
  min-height: 52px;
  position: fixed;
  right: max(20px, calc((100vw - 1380px) / 2));
  bottom: 34px;
  z-index: 30;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px 4px 6px;
  border: 0;
  border-radius: 8px;
  background: #3477ed;
  box-shadow: 0 12px 24px rgba(39, 103, 237, 0.28);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.22s, transform 0.22s, background-color 0.22s, box-shadow 0.22s;
}

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

.back-to-top:hover {
  background: #2567dd;
  box-shadow: 0 16px 30px rgba(39, 103, 237, 0.36);
  transform: translateY(-3px);
}

.back-to-top:focus-visible {
  outline: 3px solid #aacaff;
  outline-offset: 3px;
}

.back-to-top i {
  font-size: 17px;
  line-height: 1;
}

.back-to-top span {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.admin-body .back-to-top {
  right: 24px;
  bottom: 24px;
  background: #2d64c3;
}

.admin-body .back-to-top:hover {
  background: #2454a6;
  box-shadow: 0 16px 30px rgba(36, 84, 166, 0.32);
}

@media (max-width: 700px) {
  .back-to-top {
    width: 38px;
    min-height: 38px;
    right: 14px;
    bottom: 18px;
    padding: 0;
    border-radius: 8px;
  }

  .back-to-top i {
    font-size: 17px;
  }

  .back-to-top span {
    display: none;
  }

  .admin-body .back-to-top {
    right: 14px;
    bottom: 16px;
  }
}

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