.hn-back-to-top {
  position: fixed;
  z-index: 45;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom), var(--hn-top-dock-offset, 0px));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #344741;
  border-radius: 50%;
  background: linear-gradient(145deg, #1b2726, #101618 75%);
  color: #8ae8ce;
  box-shadow: 0 6px 20px #0005, inset 0 1px 0 #ffffff09;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, border-color 180ms ease,
    visibility 0s linear 200ms;
}
.hn-back-to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.hn-back-to-top__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hn-back-to-top__arrow {
  width: 21px;
  height: 21px;
  transition: transform 180ms ease;
}
.hn-back-to-top__label {
  position: absolute;
  right: calc(100% + 12px);
  padding: 7px 11px;
  border: 1px solid #a78bfa40;
  border-radius: 8px;
  background: #14151d;
  color: #e1e7e5;
  font: 500 12px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.hn-back-to-top:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 4px;
}
.hn-back-to-top:focus-visible .hn-back-to-top__label {
  opacity: 1;
  transform: translateX(0);
}
@media (hover: hover) and (pointer: fine) {
  .hn-back-to-top:hover {
    border-color: #a78bfa;
  }
  .hn-back-to-top:hover .hn-back-to-top__arrow {
    transform: translateY(-2px);
  }
  .hn-back-to-top:hover .hn-back-to-top__label {
    opacity: 1;
    transform: translateX(0);
  }
}
.hn-back-to-top:active {
  transform: scale(0.94);
  border-color: #a78bfa;
}
@media (max-width: 720px) {
  .hn-back-to-top {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom), var(--hn-top-dock-offset, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .hn-back-to-top,
  .hn-back-to-top__arrow,
  .hn-back-to-top__label {
    transition: none;
    transform: none;
  }
  .hn-back-to-top:active,
  .hn-back-to-top:hover .hn-back-to-top__arrow {
    transform: none;
  }
}
