.back-to-top {
  position: fixed;
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #16cff8;
  border-radius: 12px;
  background: #102236;
  color: #16cff8;
  box-shadow: 0 4px 16px rgb(0 0 0 / 28%);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.back-to-top[hidden] { display: none !important; }
.back-to-top svg { display: block; pointer-events: none; }
@media (hover: hover) {
  .back-to-top:hover { background: #16cff8; color: #102236; transform: translateY(-2px); }
}
.back-to-top:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.back-to-top:active { transform: translateY(0); }
@media (max-width: 600px) {
  .back-to-top {
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}
