/* Back-to-top button (injected by initScrollTop in /assets/main.js).
   Colours: --shell #2b2922 (top bar/sidebar), --yellow #ffe260 (brand accent), --ink #1f1f1f. */
.scroll-top{
  position:fixed;right:20px;bottom:20px;z-index:55; /* above content + tabbar (50), below topbar (60) and drawer (65/70) */
  width:48px;height:48px;margin:0;padding:0;
  display:flex;align-items:center;justify-content:center;
  border:2px solid #ffe260;border-radius:50%;
  background:#2b2922;color:#fff;cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.45);
  opacity:0;visibility:hidden;transform:translateY(12px);
  transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s,background-color .15s ease,color .15s ease;
  -webkit-tap-highlight-color:transparent;
}
.scroll-top.is-visible{opacity:1;visibility:visible;transform:none;transition:opacity .2s ease,transform .2s ease,visibility 0s,background-color .15s ease,color .15s ease}
.scroll-top svg{width:22px;height:22px;display:block;pointer-events:none}
.scroll-top:hover,.scroll-top:focus-visible{background:#ffe260;color:#2b2922}
.scroll-top:focus-visible{outline:2px solid #ffe260;outline-offset:3px;border-color:#2b2922}
/* Fixed bottom tabbar appears at <=900px: sit above it */
@media (max-width:900px){
  .scroll-top{bottom:calc(78px + env(safe-area-inset-bottom,0px))}
}
@media (max-width:767px){
  .scroll-top{right:16px;width:44px;height:44px}
  .scroll-top svg{width:20px;height:20px}
}
@media (prefers-reduced-motion:reduce){
  .scroll-top,.scroll-top.is-visible{transition:none;transform:none}
}
