/* -----------------------------
  フローティングボタン
----------------------------- */
/* フローティング共通 */
.mobile-br {
  display: none;
}

.floating-wrapper {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.floating-wrapper.show {
  opacity: 1;
  visibility: visible;
}
.floating-btn {
  position: fixed;        /* フローティングボタンとして固定 */
  right: 20px;            /* 右に20px空ける */
  font-weight: 700;       /* フォントウェイト700 */
  opacity: 0.8;          /* 85%で透過 */
  text-decoration: none;
  color: #ffffff; /* 白 */  /* ホバー時のアンダーラインなし */
  font-size: clamp(0.5rem, 5vw, 1.2rem); /* 最小0.5rem、最大1.2rem、画面幅に応じて可変 */
  background-color: #000; /* 背景グレー */
  padding: 10px 15px;     /* ボタン内の余白 */
  border-radius: 8px;     /* 角丸（任意） */
  z-index: 1000;
  transition: transform 0.2s ease, background-color 0.2s ease; /* 拡大と背景色のアニメーション */
}
.floating-btn:hover {
  text-decoration: none; /* アンダーラインを消す */
  opacity: 1;            /* ホバー時は少し透明度を戻す */
  cursor: pointer;       /* ホバー時カーソルをポインターに */
  transform: scale(1.2); /* 20%拡大 */
}


/* コミッションOpenボタン */
.commission-open-btn{
  bottom: 50%;
}


/* トップボタン */
.top-btn{
  bottom: 60px;
  display: flex;
  flex-direction: column; /* 縦方向に並べる */
  justify-content: center;
  align-items: center;

  background-color: rgba(255, 255, 255, 0.7); /* 70%の白背景 */
  color: #333333; /* 濃いめのグレー文字 */
  border: 2px solid #333333; /* 濃いめのグレー縁取り */
  font-weight: 700;
  text-decoration: none; /* ホバー時のアンダーラインを消す */
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1rem;
}
.top-btn:hover {
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.9); /* 少し明るくなる */
}


/* 無料見積もりボタン */
.free-estimate-btn{
  bottom: calc(50vh + 40px);
}

/* お問い合わせ */
.floating-contact-btn{
  bottom: calc(50vh - 40px);
}


@media (max-width: 600px) {
   .mobile-br{
    display: inline;
   }
    .floating-btn {
    width: 40px;
    height: 80px;
    padding: 6px 2px;
    display: flex;
    font-size: 0.7rem;
    line-height: 1.2rem;
    right: 0px;
    text-align: center;
    flex-direction: column;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow: hidden;
    writing-mode: vertical-rl; /* 縦書き */
    text-orientation: mixed;   /* 日本語を自然に */

    border-radius: 8px 0 0 8px; /* 左だけ丸める */
  }
  .commission-open-btn {
    line-height: 2.5rem;
  }
  .top-btn {
    width: 30px;
    height: 30px;
    writing-mode: horizontal-tb;
    border-radius: 8px;
    right: 5px;
  }
  .free-estimate-btn {
    top: calc(50% - 50px); /* 上側 */
    bottom: auto;
    line-height: 2.5rem;
  }
  .floating-contact-btn {
    top: calc(50% + 50px); /* 下側 */
    bottom: auto;
    line-height: 2.5rem;
  }
  

}