/* ── Smooth wheel scrolling + "back to top" button ──
   Shared across index / faq / about-the-game.
   Button markup is injected by assets/js/smooth-scroll.js. */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.28));
  border-radius: 50%;
  color: #fff;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'VT323', monospace;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease,
              background .2s ease, color .2s ease;
}

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

.back-to-top:hover,
.back-to-top:focus-visible {
  color: #000;
  background: #fff;
  transform: translateY(-2px);
  outline: none;
}

@media (max-width: 640px) {
  .back-to-top { right: 14px; bottom: 18px; }
}

/* Respect users who asked their OS to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .2s ease, visibility .2s ease; }
}
