/* === Floating Back-to-Top (viewport-fixed, robust) ================ */
:root{ --to-top-size: 46px; --to-top-pad: 20px; }

.to-top{
  position: fixed;
  right: var(--to-top-pad);
  bottom: max(var(--to-top-pad), env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  width: var(--to-top-size);
  height: var(--to-top-size);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.35);
  color: #f1f6ff;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  transition: transform .2s ease, opacity .2s ease, visibility .2s ease, border-color .2s ease;
}
.to-top:hover{ transform: translateY(8px); border-color: rgba(255,255,255,.65); }
.to-top.is-visible{ opacity: 1; visibility: visible; transform: translateY(0); }

/* Optional: hide the footer's built-in Back to top to avoid duplication */
.site-footer .back-to-top{ display:none; }
