.g-back-to-top {
  position: fixed;
  right: clamp(16px, 2vw, 28px);
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 900;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151, 190, 238, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(34, 69, 111, 0.16), inset 0 -2px 0 rgba(151, 190, 238, 0.22);
  color: #18365d;
  cursor: pointer;
  font: 800 22px/1 "Barlow",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.g-back-to-top:hover,
.g-back-to-top:focus-visible {
  border-color: rgba(88, 146, 218, 0.92);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(34, 69, 111, 0.20), inset 0 -2px 0 rgba(151, 190, 238, 0.28);
}

.g-back-to-top:focus-visible {
  outline: 3px solid rgba(151, 190, 238, 0.45);
  outline-offset: 3px;
}

.g-back-to-top__icon {
  display: block;
  transform: translateY(-1px);
}

@media (max-width: 767.98px) {
  .g-back-to-top {
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

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