.avril-back-to-top {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 28px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(77, 68, 62, 0.2);
  border-radius: 50%;
  background: rgba(254, 253, 249, 0.94);
  color: var(--avril-ink);
  cursor: pointer;
  font: 400 20px/1 var(--avril-serif);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1), transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

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

.avril-back-to-top:hover {
  background: var(--avril-ink);
  color: var(--avril-white);
}

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

@media (max-width: 850px) {
  .avril-back-to-top {
    right: 18px;
    bottom: 20px;
    width: 39px;
    height: 39px;
  }
}

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