/* =============================================================
   ページトップへ戻るボタン（全ページ共通）
   PC: 60×60、SP: 40×40、黒半透明 円形、白の上向き矢印
   位置: 右下 20px / 20px、fixed
   ============================================================= */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  text-decoration: none;
  z-index: 50;
  /* 初期は非表示（少しスクロールしたら JS で .is-visible を付与）*/
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 300ms ease,
    visibility 300ms ease,
    transform 300ms ease,
    background 200ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: rgba(0, 0, 0, 0.75);
  opacity: 1;
}

/* 上向き矢印（chevron）— rotate(-135deg) で「↑」 */
.back-to-top__icon {
  display: block;
  width: 14px;
  height: 14px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  transform: translateY(3px) rotate(-45deg);
}

/* SP（≤ 768px）：サイズ縮小 */
@media (max-width: 768px) {
  .back-to-top {
    width: 40px;
    height: 40px;
  }

  .back-to-top__icon {
    width: 10px;
    height: 10px;
    transform: translateY(2px) rotate(-45deg);
  }
}
