/* Same glass fill, stroke, shadow and blur as .nav-app / sound control. */
/* Clear the 76px footer plus a 24px visual gap; keep the navbar's right alignment. */
.back-to-top { position:fixed; right:4.444444vw; bottom:calc(100px + env(safe-area-inset-bottom,0px)); z-index:70; display:flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0; border-radius:50%; color:var(--gold); opacity:0; visibility:hidden; pointer-events:none; transform:translateY(8px); transition:opacity .22s,transform .28s,background-color .2s,visibility .22s; }
.back-to-top[hidden] { display:none; }
.back-to-top[data-visible="true"] { opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0); }
.back-to-top svg { display:block; flex:none; pointer-events:none; }
.back-to-top:hover { background:#ffffff55; }
.back-to-top:active { transform:scale(.97); }
.back-to-top:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
/* Local editor launchers stay accessible underneath the visitor control. */
body:has(.product-editor-link) .back-to-top { bottom:calc(80px + env(safe-area-inset-bottom,0px)); }
body:has(.layout-editor-entry) .back-to-top { bottom:calc(148px + env(safe-area-inset-bottom,0px)); }
.layout-editing .back-to-top { display:none; }
/* Match the navbar's right safe margin, including its existing breakpoints. */
@media(max-width:700px) { .back-to-top { right:16px; } }
@media(max-width:359px) { .back-to-top { right:12px; } }
/* Phones omit the floating control; iPad retains the desktop back-to-top. */
@media(max-width:767px) { .back-to-top { display:none; } }
