.links-back-to-top {
  position: fixed;
  z-index: 18;
  right: calc(24px + env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom) + var(--back-top-lift, 0px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  min-width: 48px;
  padding: 0 16px;
  border: 1px solid #8ad7eb;
  border-radius: 999px;
  color: #e1f8ff;
  background: #102c3d;
  box-shadow: 0 4px 18px #0008, 0 0 0 4px #050c17b3;
  font: 600 12px/1.2 Inter,"Segoe UI",system-ui,sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease-out,background-color 120ms ease-out,transform 100ms ease-out;
}
.links-back-to-top[hidden] { display: none; }
.links-back-to-top.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }
.links-back-to-top svg { flex: none; }
.links-back-to-top:focus-visible { outline: 3px solid #f4d393; outline-offset: 5px; }
.links-back-to-top:active { background: #285970; transform: scale(.96); }
@media (hover:hover) and (pointer:fine) {
  .links-back-to-top:hover { border-color: #ccf5ff; background: #1d4559; }
}
@media (max-width:700px) {
  .links-back-to-top { width: 50px; height: 50px; padding: 0; right: calc(16px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom) + var(--back-top-lift, 0px)); }
  .links-back-to-top span { display: none; }
}
@media (prefers-reduced-motion:reduce) {
  .links-back-to-top { transition: none; }
  .links-back-to-top:active { transform: none; }
}
@media print { .links-back-to-top { display: none; } }
