.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(227, 227, 227, 0.96);
  border-radius: 14px;
  background: rgba(242, 242, 242, 0.96);
  color: #0f0f0f;
  box-shadow: 0 12px 30px rgba(15, 15, 15, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

body.modal-open .back-to-top {
  z-index: 90;
  pointer-events: none;
}

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

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #ededed;
  border-color: rgba(221, 217, 210, 0.96);
  box-shadow: 0 14px 34px rgba(15, 15, 15, 0.1);
}

.back-to-top:active {
  transform: translateY(1px) scale(0.985);
}

.back-to-top:focus-visible {
  outline: 2px solid rgba(168, 106, 42, 0.3);
  outline-offset: 2px;
}

.back-to-top__icon {
  width: 20px;
  height: 20px;
  display: block;
}

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

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition:
      opacity 120ms linear,
      background-color 120ms linear,
      border-color 120ms linear,
      box-shadow 120ms linear;
    transform: none;
  }

  .back-to-top.is-visible,
  .back-to-top:active {
    transform: none;
  }
}
