.mg-back-to-top[hidden] { display: none; }
.mg-back-to-top::before { content: ''; position: absolute; inset: 3px; border-radius: inherit; background: var(--base); }


.mg-back-to-top:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
@media (hover: hover) { .mg-back-to-top:hover { transform: translateY(-2px); } }
@media (max-width: 46rem) { .mg-back-to-top { inline-size: 3.125rem; block-size: 3.125rem; inset-inline-end: max(1rem, env(safe-area-inset-right)); inset-block-end: max(1rem, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .mg-back-to-top { transition: none; } }
.mg-back-to-top__arrow { inline-size: 1.5rem; block-size: 1.5rem; background-color: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20V4m-6 6 6-6 6 6' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }