.back-to-top{
  position:fixed;right:22px;bottom:calc(22px + env(safe-area-inset-bottom,0px));z-index:60;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:84px;min-height:46px;padding:0 14px;
  border:1px solid var(--glass-edge);border-radius:10px;background:var(--glass-sheen),var(--glass-fill);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:var(--glass-shadow);
  color:var(--secondary);font:600 .8rem var(--font-body);cursor:pointer;
  transition:color .16s,border-color .16s,background .16s;
}
.back-to-top[hidden]{display:none}
.back-to-top svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.back-to-top:hover{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 55%,var(--glass-edge))}
.back-to-top:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
body:has(.toast.visible,.test-notice:not([hidden])) .back-to-top{bottom:calc(82px + env(safe-area-inset-bottom,0px))}
@media(max-width:700px){
  .back-to-top{right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));min-width:46px;width:46px;height:46px;padding:0}
  .back-to-top span{display:none}
}
@media(prefers-reduced-motion:reduce){.back-to-top{transition:none}}
