.back-to-top {
  width: 72px;
  height: 72px;
  padding: 8px;
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 50%;
  color: #102F1F;
  background: #B1E76E;
  box-shadow: 0 0 0 6px rgba(177, 231, 110, .12), 0 18px 42px rgba(16, 47, 31, .68), 0 0 32px rgba(177, 231, 110, .24);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(.92);
  transition: opacity .22s ease, visibility .22s ease, transform .22s ease, box-shadow .18s ease;
}

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

.back-to-top svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.back-to-top span {
  font: 800 16px/1 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.back-to-top:hover {
  box-shadow: 0 0 0 7px rgba(177, 231, 110, .16), 0 20px 46px rgba(16, 47, 31, .76), 0 0 38px rgba(177, 231, 110, .3);
  transform: translateY(-3px);
}

.back-to-top:active { transform: translateY(0); }

@media (max-width: 700px) {
  .back-to-top {
    width: 64px;
    height: 64px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

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