/* Self-contained icon button, visible on both light and dark sections. */
#back-to-top { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 1030; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 12px; border: 2px solid #fff; border-radius: 12px; background: #285c46; color: #fff; font-size: 18px; line-height: 1; box-shadow: 0 4px 18px #0d211b40, 0 0 0 1px #285c4626; cursor: pointer; }
#back-to-top:hover { background: #1c4433; }
#back-to-top { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
#back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
#back-to-top[hidden] { display: none; }
.modal-open #back-to-top.is-visible { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px); transition-delay: 0s, 0s, .25s; }
#back-to-top:focus-visible { outline: 3px solid #c7e699 !important; outline-offset: 3px; }
@media(max-width:575px) { #back-to-top { right: max(16px, env(safe-area-inset-right)); } }
@media(prefers-reduced-motion:reduce) { #back-to-top { transition: none; transform: none; } }
