/* 右下の「ページの上へ」（assets/to-top.js が作る）。トップと同じ黒の丸に白い上向きの矢印 */
/* Astra の画面には Astra 自身の「上へ戻る」が同じ右下にあり、重なって押せなくなる。こちらにそろえる */
#ast-scroll-top { display: none !important; }
.bstudy-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: #16202c; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(22, 32, 44, .18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.bstudy-to-top.is-shown {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s;
}
.bstudy-to-top:hover { background: #2c3642; }
.bstudy-to-top:focus-visible { outline: 2px solid #16202c; outline-offset: 3px; }
.bstudy-to-top-arrow {
  width: 12px; height: 12px; margin-top: 5px;
  border-top: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg);
}
@media (max-width: 600px) {
  .bstudy-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .bstudy-to-top, .bstudy-to-top.is-shown { transition: none; transform: none; }
}
