.back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 11;
    width: 2.85rem;
    height: 2.85rem;
    display: grid;
    place-items: center;
    border: 1px solid white;
    border-radius: 50%;
    background: #176343;
    color: white;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .22);
    cursor: pointer;
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: #104c33; }
.back-to-top:focus-visible { outline: 3px solid #ffcc52; outline-offset: 3px; }
.back-to-top svg {
    width: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 1088px) {
    .back-to-top { bottom: calc(var(--mobile-contact-height, 0px) + max(1rem, env(safe-area-inset-bottom))); }
}
@media (min-width: 1051px) and (max-height: 22rem) {
    body:has(.social-dock) > .back-to-top { right: 13rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
@media print {
    .back-to-top { display: none; }
}
