#toTop{
  position: fixed;
  right: 2em;
  bottom: 2em;
  z-index: 1100;

  display: grid;               /* zentriert den Pfeil */
  place-items: center;

  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.55); /* auf hellen wie dunklen Hintergründen lesbar */
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);

  /* sanftes Ein-/Ausblenden, wenn aria-hidden umschaltet */
  opacity: 1;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease;
}

/* Verbergen, wenn aria-hidden="true" gesetzt ist (wird vom JS gesteuert) */
#toTop[aria-hidden="true"]{
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
}

#toTop:hover{
  background: rgba(0,0,0,.7);
}

#toTop:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Etwas mehr Abstand auf sehr kleinen Screens */
@media (max-width: 480px){
  #toTop{ right: 12px; bottom: 12px; width: 44px; height: 44px; }
}
