/* CE Chatbot（コーポレートカラー #00376d・キーカラー #00b8ac） */
.cecb {
  --cecb-navy: #00376d;
  --cecb-navy-hover: #004a8f;
  --cecb-key: #00b8ac;
  --cecb-key-hover: #00a69b;
  --cecb-line: #e2e8f0;
  --cecb-text: #334155;
  font-family: inherit;
  line-height: 1.6;
}
.cecb[hidden],
.cecb [hidden] { display: none !important; }
.cecb button { font-family: inherit; cursor: pointer; }

/* PC: 右端中央の縦タブ */
.cecb-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 9999;
  display: none; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 10px; border: 0; border-radius: 12px 0 0 12px;
  background: var(--cecb-navy); color: #fff;
  box-shadow: -4px 0 20px rgba(0, 55, 109, .3); transition: background-color .2s, transform .3s, opacity .3s;
}
.cecb-tab:hover { background: var(--cecb-navy-hover); }
.cecb-tab img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
.cecb-tab-main, .cecb-tab-sub { writing-mode: vertical-rl; letter-spacing: .1em; }
.cecb-tab-main { font-weight: 700; font-size: 14px; }
.cecb-tab-sub { font-size: 10px; opacity: .9; }
.cecb-tab-accent { font-weight: 700; color: #66cfc3; opacity: 1; }
.cecb-tab-line { width: 16px; height: 1px; margin: 6px 0; background: rgba(255, 255, 255, .4); }

/* スマホ: 右下の丸ボタン */
.cecb-fab {
  position: fixed; right: 16px; bottom: 80px; z-index: 9999;
  display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border: 0; border-radius: 9999px;
  background: var(--cecb-navy); color: #fff; font-size: 12px; font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 55, 109, .4); transition: background-color .2s, transform .3s, opacity .3s;
}
.cecb-fab:hover { background: var(--cecb-navy-hover); }
.cecb-fab img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
@media (min-width: 1024px) {
  .cecb-tab { display: flex; }
  .cecb-fab { display: none; }
}
.cecb.is-open .cecb-tab, .cecb.is-open .cecb-fab { opacity: 0; pointer-events: none; }

/* チャット画面 */
.cecb-overlay { position: fixed; inset: 0; z-index: 9997; background: rgba(0, 0, 0, .3); }
@media (min-width: 1024px) { .cecb-overlay { display: none !important; } }
.cecb-panel {
  position: fixed; z-index: 9998; display: flex; flex-direction: column; overflow: hidden;
  left: 12px; right: 12px; top: 50%; transform: translateY(-50%); height: 72vh; max-height: 640px;
  background: #fff; border: 1px solid var(--cecb-line); border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
  color: var(--cecb-text); font-size: 14px;
}
@media (min-width: 1024px) {
  .cecb-panel { left: auto; right: 16px; width: 400px; height: 600px; }
}
.cecb-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--cecb-navy); color: #fff; }
.cecb-head img { width: 32px; height: 32px; border-radius: 50%; background: #fff; object-fit: cover; }
.cecb-title { margin: 0; font-weight: 700; font-size: 14px; }
.cecb-subtitle { margin: 0; font-size: 11px; opacity: .8; }
.cecb-close { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 18px; line-height: 1; }
.cecb-close:hover { background: rgba(255, 255, 255, .3); }
.cecb-log { flex: 1; overflow-y: auto; padding: 16px 14px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.cecb-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; animation: cecb-in .25s ease-out; }
.cecb-msg p { margin: 0; font-size: 14px; }
.cecb-bot { align-self: flex-start; background: #fff; border: 1px solid var(--cecb-line); border-top-left-radius: 4px; }
.cecb-user { align-self: flex-end; background: var(--cecb-navy); color: #fff; border-top-right-radius: 4px; }
.cecb-typing { align-self: flex-start; padding: 10px 14px; color: #94a3b8; font-size: 12px; }
.cecb-choices { display: flex; flex-direction: column; gap: 8px; animation: cecb-in .25s ease-out; }
.cecb-choice {
  text-align: left; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff;
  color: var(--cecb-navy); font-size: 14px; font-weight: 500; transition: border-color .2s, background-color .2s;
}
.cecb-choice:hover, .cecb-choice:focus-visible { border-color: var(--cecb-key); background: #e6f7f5; outline: none; }
.cecb-action {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px; border-radius: 9999px;
  border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background-color .2s, box-shadow .2s, transform .2s;
}
.cecb-action:hover { color: var(--cecb-navy); border-color: rgba(0, 55, 109, .3); }
.cecb-action-primary { background: var(--cecb-key); border-color: var(--cecb-key); color: #fff; }
.cecb-action-primary:hover { background: var(--cecb-key-hover); color: #fff; box-shadow: 0 8px 20px rgba(0, 184, 172, .35); transform: translateY(-1px); }
.cecb-foot { padding: 8px 14px; border-top: 1px solid var(--cecb-line); background: #fff; text-align: center; }
.cecb-reset { border: 0; background: none; color: #64748b; font-size: 12px; text-decoration: underline; }
@keyframes cecb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cecb-msg, .cecb-choices { animation: none; }
}
