/* ページ先頭へボタン */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;              /* menu-toggle(1100)やoverlay(900)より前面に */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 2px solid #000;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;       /* 非表示時はクリックできないように */
  transition: opacity .25s ease, transform .2s ease;
}
.back-to-top:focus { outline: 3px solid #4da3ff; outline-offset: 2px; }
.back-to-top:hover { transform: translateY(-2px); }

/* 表示時の状態 */
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* スマホで指が届きやすいように少し余白を増やす */
@media (max-width: 768px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

/* スムーススクロール（OSが reduced-motion 指定なら無効化） */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}