/* ==== 無料相談チャットボット（デモ） ==== */
.ekb-chat-overlay{position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:199;display:none;}
.ekb-chat-overlay.is-open{display:block;}
.ekb-chat-panel{
  position:fixed;right:24px;bottom:24px;width:370px;height:540px;
  background:#fff;border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.28);
  display:none;flex-direction:column;overflow:hidden;z-index:200;
  font-family:-apple-system,"Hiragino Sans","Noto Sans JP",sans-serif;
}
.ekb-chat-panel.is-open{display:flex;}
.ekb-chat-header{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--blue-dark);color:#fff;flex:0 0 auto;}
.ekb-chat-avatar{width:38px;height:38px;border-radius:50%;overflow:hidden;flex:0 0 auto;background:#fff;}
.ekb-chat-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.ekb-chat-headtext{flex:1;min-width:0;}
.ekb-chat-title{font-size:13.5px;font-weight:700;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ekb-chat-status{font-size:11px;color:#BFD8F2;display:flex;align-items:center;gap:5px;margin-top:2px;}
.ekb-dot{width:7px;height:7px;border-radius:50%;background:#3FCB6B;display:inline-block;flex:0 0 auto;}
.ekb-chat-close{background:none;border:none;color:#fff;padding:6px;cursor:pointer;flex:0 0 auto;display:flex;align-items:center;justify-content:center;border-radius:8px;}
.ekb-chat-close:hover{background:rgba(255,255,255,.15);}
.ekb-chat-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:var(--bg);}
.ekb-msg{display:flex;gap:8px;max-width:100%;}
.ekb-msg-bot{align-items:flex-end;}
.ekb-msg-user{justify-content:flex-end;}
.ekb-avatar-sm{width:26px;height:26px;border-radius:50%;overflow:hidden;flex:0 0 auto;}
.ekb-avatar-sm img{width:100%;height:100%;object-fit:cover;display:block;}
.ekb-bubble{max-width:240px;padding:10px 14px;border-radius:14px;font-size:13.5px;line-height:1.7;word-break:break-word;}
.ekb-msg-bot .ekb-bubble{background:#fff;color:var(--text);border:1px solid var(--line);border-bottom-left-radius:4px;}
.ekb-msg-user .ekb-bubble{background:var(--blue);color:#fff;border-bottom-right-radius:4px;}
.ekb-typing{display:flex;align-items:center;gap:4px;padding:14px;}
.ekb-typing span{width:6px;height:6px;border-radius:50%;background:var(--text-light);display:inline-block;animation:ekbBlink 1s infinite ease-in-out;}
.ekb-typing span:nth-child(2){animation-delay:.15s;}
.ekb-typing span:nth-child(3){animation-delay:.3s;}
@keyframes ekbBlink{0%,80%,100%{opacity:.25;}40%{opacity:1;}}
.ekb-chat-footer{flex:0 0 auto;padding:10px 14px;border-top:1px solid var(--line);background:#fff;}
.ekb-chips{display:flex;flex-wrap:wrap;gap:8px;}
.ekb-chip{background:#fff;border:1.5px solid var(--blue);color:var(--blue);font-weight:700;font-size:13px;padding:8px 14px;border-radius:99px;cursor:pointer;font-family:inherit;}
.ekb-chip:hover{background:var(--blue);color:#fff;}
.ekb-input-row{display:flex;gap:8px;align-items:center;}
.ekb-text-input{flex:1;padding:11px 12px;border:1px solid var(--line);border-radius:10px;font-size:16px;font-family:inherit;color:var(--text);}
.ekb-text-input:focus{outline:none;border-color:var(--blue);}
.ekb-send-btn{flex:0 0 auto;width:40px;height:40px;border-radius:10px;background:var(--accent);color:#fff;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;}
.ekb-send-btn:hover{opacity:.9;}
.ekb-select-input{flex:1;padding:11px 12px;border:1px solid var(--line);border-radius:10px;font-size:16px;font-family:inherit;color:var(--text);background:#fff;}
.ekb-select-input:focus{outline:none;border-color:var(--blue);}
.ekb-decide-btn{flex:0 0 auto;height:40px;padding:0 18px;border-radius:10px;background:var(--accent);color:#fff;border:none;font-weight:700;font-size:14px;cursor:pointer;font-family:inherit;white-space:nowrap;}
.ekb-decide-btn:hover{opacity:.9;}
.ekb-decide-btn:disabled{opacity:.4;cursor:not-allowed;}
.ekb-skip-row{margin-top:8px;}
.ekb-form-card{display:flex;flex-direction:column;gap:12px;}
.ekb-form-field{display:flex;flex-direction:column;gap:5px;}
.ekb-form-field label{font-size:12px;font-weight:700;color:var(--text-light);}
.ekb-form-card select,.ekb-form-card input{width:100%;box-sizing:border-box;}
.ekb-form-card select:disabled{background:#F3F4F6;color:var(--text-light);cursor:not-allowed;}
.ekb-decide-full{width:100%;}

body.ekb-chat-open .mobile-cta-bar{display:none !important;}

@media (max-width:768px){
  .ekb-chat-panel{
    right:0;left:0;bottom:0;width:100%;height:75vh;border-radius:16px 16px 0 0;
    box-shadow:0 -8px 30px rgba(0,0,0,.25);
  }
  .ekb-bubble{max-width:78%;}
}
