/* Match the Scholars guide's floating arrow with a larger touch target. */
.guide-to-top {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(0, 180, 216, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #0891b2;
  box-shadow: 0 6px 20px rgba(13, 16, 23, 0.16);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.guide-to-top[hidden] { display: none; }
.guide-to-top:hover { background: #fff; box-shadow: 0 10px 26px rgba(8, 145, 178, 0.28); }
.guide-to-top:focus-visible { outline: 3px solid #0891b2; outline-offset: 4px; }
.guide-to-top svg { width: 21px; height: 21px; }
#guide-top:focus { outline: none; }
#guide-top:focus-visible { outline: 2px solid #0891b2; outline-offset: 6px; }

/* Keep the footer's final contact link clear of the floating control. */
.mosaic-public .mosaic-footer-bottom { padding-bottom: max(64px, env(safe-area-inset-bottom)); }

@media (max-width: 600px) {
  .guide-to-top {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) { .guide-to-top { transition: none; } }
@media print { .guide-to-top { display: none !important; } }
