.back-to-top { position: fixed; z-index: 20; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; width: 38px; height: 38px; padding: 8px; border: 1px solid var(--line, #393d33); border-radius: 8px; background: var(--surface, var(--panel, #22241f)); color: var(--accent, #b9df91); box-shadow: 0 3px 12px #0002; cursor: pointer; }
.back-to-top[hidden] { display: none !important; }
.back-to-top:hover { border-color: var(--accent, #b9df91); }
.back-to-top:focus-visible { outline: 2px solid var(--accent, #b9df91); outline-offset: 3px; }
.back-to-top svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media(max-width:600px) { .has-mobile-portal-tabs .back-to-top { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); } }
@media(hover:none) and (pointer:coarse) { .back-to-top { width: 44px; height: 44px; } }
html:has(dialog[open]) .back-to-top { display: none; }
