.chatbot-section { padding-top: 0; }
.chatbot-wrap{
max-width: 980px;
margin: 0 auto;
background: #fff;
border: 1px solid rgba(0,0,0,.08);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.chatbot-head{
padding: 18px 18px 10px;
}
.chatbot-head .title{
margin: 0;
font-size: 22px;
line-height: 1.4;
font-weight: 700;
}
.chatbot-head .desc{
margin-top: 6px;
color: rgba(0,0,0,.65);
font-size: 14px;
}
.chatbot-frame{
width: 100%;
height: 720px;
border: 0;
display: block;
background: #fff;
}
@media (max-width: 768px){
.chatbot-frame{ height: 640px; }
}

/* =========================================================
変更点：ページ内埋め込み（#chatbot）を非表示（二重表示防止）
========================================================== */
#chatbot.chatbot-section { display: none; }

/* =========================================================
追加：右側固定 Floating Chatbot（PC/タブレット）
========================================================== */
.chatbot-float{
position: fixed;
right: 18px;
bottom: 110px; /* 既存のfloat_footerに被る場合は 140px 等に調整 */
z-index: 9999;
font-family: inherit;
}

/* 起動ボタン（PC/タブレット用） */
.chatbot-float__btn{
display: inline-flex;
align-items: center;
gap: 10px;
padding: 12px 14px;
border: 0;
border-radius: 999px;
cursor: pointer;
box-shadow: 0 12px 30px rgba(0,0,0,.18);
background: #1a5cff;
color: #fff;
font-weight: 700;
}
.chatbot-float__btn:focus{
outline: 3px solid rgba(26,92,255,.35);
outline-offset: 3px;
}
.chatbot-float__btnIcon{ font-size: 14px; line-height: 1; }
.chatbot-float__btnText{ font-size: 14px; }

/* パネル（デフォルトはPC用：絶対配置） */
.chatbot-float__panel{
position: absolute;
right: 0;
bottom: 56px;
width: min(380px, calc(100vw - 36px));
height: 640px;
background: #fff;
border-radius: 16px;
box-shadow: 0 18px 50px rgba(0,0,0,.22);
overflow: hidden;

opacity: 0;
transform: translateY(10px);
pointer-events: none;
transition: .18s ease;
border: 1px solid rgba(0,0,0,.08);
}

.chatbot-float.is-open .chatbot-float__panel{
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}

.chatbot-float__panelHead{
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 12px 10px;
border-bottom: 1px solid rgba(0,0,0,.06);
}
.chatbot-float__panelTitle{
font-size: 14px;
font-weight: 800;
}
.chatbot-float__close{
width: 34px;
height: 34px;
border: 0;
border-radius: 10px;
cursor: pointer;
background: rgba(0,0,0,.06);
font-size: 18px;
line-height: 1;
}
.chatbot-float__close:hover{ background: rgba(0,0,0,.1); }

.chatbot-float__panelBody{ height: calc(100% - 47px); }
.chatbot-float__iframeWrap{ height: 100%; }
.chatbot-float__iframeWrap iframe{
width: 100%;
height: 100%;
border: 0;
display: block;
background: #fff;
}

/* =========================================================
★追加：SP用（問い合わせ横）チャットボタン
========================================================== */
.ff_link_chat{
display: none; /* PCでは表示しない */
align-items: center;
justify-content: center;
text-align: center;
border-radius: 8px;
font-weight: 700;
text-decoration: none;
cursor: pointer;
border: 0;
background: #1a5cff;
color: #fff;
padding: 10px 12px;
box-shadow: 0 10px 22px rgba(0,0,0,.16);
white-space: nowrap;
}

/* =========================================================
★修正：SPでも「パネル本体」は表示できるようにする
- chatbot-float 自体を display:none にしない（パネルが消えるのが原因）
- 代わりに PC用の右固定起動ボタンだけ非表示
- SPではパネルを fixed にして確実に画面内に表示
========================================================== */
@media (max-width: 768px){
/* 右固定の“起動ボタン”だけ隠す（本体は残す） */
.chatbot-float__btn{ display: none; }

/* float_footer内ボタン（チャット）をSPだけ表示 */
.ff_link_chat{ display: inline-flex; }

/* 既存フッター内の横並びを安全側に */
.float_footer .ff_cont{
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.float_footer .ff_link_cnt,
.float_footer .ff_link_chat{
    flex: 1 1 0;
    min-width: 0;
}

/* SP：パネルは fixed で表示（確実に開く） */
.chatbot-float{
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none; /* 閉じている時の誤タップ防止 */
}
.chatbot-float.is-open{
    pointer-events: auto;
}
.chatbot-float__panel{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 92px; /* float_footer の高さ分だけ上げる */
    width: auto;
    height: 74vh;
}
}
