/* ULTRALUMEN Update 4E: shared sitewide Back to Top */
.ul-back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .76rem 1rem;
  border: 1px solid #efb834;
  border-radius: 999px;
  background: #08172b;
  color: #ffca48;
  font: 700 14px/1.2 system-ui, sans-serif;
  box-shadow: 0 7px 24px rgba(0,0,0,.45);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.ul-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.ul-back-to-top:hover, .ul-back-to-top:focus-visible { background: #17294a; color: #fff; }
.ul-back-to-top:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 600px) {
  .ul-back-to-top {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    padding: .68rem .82rem;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) { .ul-back-to-top { transition: none; } }

/* ULTRALUMEN 4E MOBILE EDGE SPACING V2 */
@media (max-width: 600px) {
  .ul-back-to-top {
    position: fixed;
    right: calc(18px + env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
    padding: 0.7rem 0.9rem;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }
}
