.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 11;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--accent);
  color: #fff;
  -webkit-box-shadow: var(--shadow);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-transform: translateY(8px);
  transform: translateY(8px);
  -webkit-transition: opacity 0.2s ease, visibility 0.2s ease, -webkit-transform 0.2s ease, bottom 0.2s ease;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, bottom 0.2s ease;
}

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

.back-to-top:hover,
.back-to-top:focus-visible {
  filter: brightness(1.08);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

@media (max-width: 1015px) {
  .back-to-top {
    right: 12px;
    bottom: 20px;
    width: 44px;
    height: 44px;
  }
}

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