.back-to-top[hidden] { display: none; }
.back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: calc(max(1rem, env(safe-area-inset-bottom, 0px)) + var(--bn-floating-bottom-reserve, 0px));
    z-index: 90;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--control-border);
    border-radius: 50%;
    color: var(--gold);
    background: var(--panel);
    box-shadow: var(--shadow-header);
    cursor: pointer;
}
.back-to-top:hover { color: var(--bg); background: var(--gold); border-color: var(--gold); }
.back-to-top:focus-visible { outline: var(--focus-width) solid var(--gold); outline-offset: 4px; }
body:has(.mobile-navigation[open]) .back-to-top,
body:has(dialog[open]) .back-to-top { visibility: hidden; pointer-events: none; }
@media print { .back-to-top { display: none; } }
