@charset "utf-8";

/* ==========================================================================
   ファイル名: back-to-top.css - N-1 Minimal Luxury Edition (Final)
   - 修正内容：物理的な中央揃えの確定と不要テキストの完全消去
   - 配色：透過ホワイト × ゴールドライン（ホバー時に濃紺反転）
   ========================================================================== */

/* 1. スムーズスクロールの有効化 */
html {
  scroll-behavior: smooth;
}

/* 2. 配置・出現アニメーション */
.page-top-wrapper {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 90; 
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  pointer-events: none;
}

/* スクロール時にJSで付与されるクラス */
.page-top-wrapper.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* メニュー展開時の干渉防止 */
body.is-menu-open .page-top-wrapper,
.is-menu-open .page-top-wrapper {
  display: none !important;
}

/* 3. ボタン自体のデザイン (a.page-top-btn) */
.page-top-btn {
  width: 50px;
  height: 50px;
  display: flex !important; /* 中央揃えのためFlex採用 */
  align-items: center;      /* 垂直中央 */
  justify-content: center;   /* 水平中央 */
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(12, 55, 112, 0.2);
  border-radius: 0; /* シャープなスクエア形状 */
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;

  /* 【重要】HTML内の「∧」等の文字を完全に消去する設定 */
  text-indent: -9999px;
  font-size: 0;
  line-height: 0;
}

/* 矢印（極細のゴールドパーツ） */
.page-top-btn::before {
  content: "";
  display: block;
  /* 文字飛ばしの影響をリセット */
  text-indent: 0;
  width: 10px;
  height: 10px;
  border-top: 1px solid #d4a74a;
  border-left: 1px solid #d4a74a;
  /* 45度回転させて「く」の字にし、視覚的中央(少し下)へ微調整 */
  transform: translateY(2px) rotate(45deg);
  transition: all 0.3s ease;
  z-index: 2;
}

/* ホバー時の演出 */
.page-top-btn:hover {
  background: #0c3770; /* 濃紺へ反転 */
  border-color: #0c3770;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(12, 55, 112, 0.2);
}

/* ホバー時に矢印を白へ反転、かつ少し跳ねる演出 */
.page-top-btn:hover::before {
  border-color: #ffffff;
  transform: translateY(-1px) rotate(45deg);
}

/* 4. レスポンシブ (モバイル最適化) */
@media (max-width: 768px) {
  .page-top-wrapper {
    right: 20px;
    bottom: 20px;
  }
  
  .page-top-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
  }
}