/* AIチャットボット「ご案内コンシェルジュ」 */
#tk-chatbot { position: fixed; right: 18px; bottom: 18px; z-index: 9999; font-family: var(--font-body, sans-serif); }

.tkcb-fab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 68px; height: 68px; border: none; border-radius: 50%;
  background: #fff; color: var(--primary, #d95c5c); cursor: pointer;
  border: 2.5px solid var(--primary-pale, #fbeaea);
  box-shadow: 0 6px 20px rgba(54, 42, 42, .25);
  transition: transform .25s, box-shadow .25s;
}
.tkcb-fab:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(54, 42, 42, .3); }
.tkcb-fab img { width: 40px; height: 40px; object-fit: contain; }
.tkcb-fab span { font-size: 10px; font-weight: 700; }

.tkcb-panel {
  position: absolute; right: 0; bottom: 76px;
  width: min(360px, calc(100vw - 36px));
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 14px 44px rgba(54, 42, 42, .25);
  display: flex; flex-direction: column;
}
.tkcb-panel[hidden] { display: none; }
.tkcb-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--primary, #d95c5c); color: #fff;
}
.tkcb-head > div { flex: 1; }
.tkcb-head-avatar {
  width: 42px; height: 42px; flex-shrink: 0;
  background: #fff; border-radius: 50%; padding: 4px; object-fit: contain;
}
.tkcb-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; margin: 0; }
.tkcb-sub { font-size: 11px; margin: 2px 0 0; opacity: .9; }
.tkcb-close {
  border: none; background: rgba(255, 255, 255, .18); color: #fff;
  width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer;
}

.tkcb-body {
  height: 320px; overflow-y: auto; padding: 16px 14px;
  background: var(--bg, #f4f1ef);
  display: flex; flex-direction: column; gap: 10px;
}
.tkcb-row { display: flex; align-items: flex-end; gap: 8px; }
.tkcb-avatar { width: 30px; height: 30px; flex-shrink: 0; object-fit: contain; }
.tkcb-msg { max-width: 85%; padding: 10px 14px; font-size: 13.5px; line-height: 1.8; border-radius: 16px; white-space: pre-wrap; }
.tkcb-row .tkcb-msg { max-width: calc(85% - 38px); }
.tkcb-msg.is-bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(54, 42, 42, .08); }
.tkcb-msg.is-user { align-self: flex-end; background: var(--primary-pale, #fbeaea); border-bottom-right-radius: 4px; }
.tkcb-msg.is-typing { color: var(--sub, #8a7d7d); letter-spacing: 3px; }

.tkcb-pages { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.tkcb-pages a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1.5px solid var(--primary-pale, #fbeaea);
  border-radius: 12px; padding: 10px 14px;
  font-size: 13px; font-weight: 700; color: var(--primary, #d95c5c);
  text-decoration: none; transition: background .2s, border-color .2s;
}
.tkcb-pages a:hover { background: var(--primary-pale, #fbeaea); border-color: var(--primary, #d95c5c); }
.tkcb-page-arrow { flex-shrink: 0; }
/* 予約などの主導線ボタン(外部リンク)は塗りのピンクで強調 */
.tkcb-pages a.is-cta {
  background: var(--primary, #d95c5c); border-color: var(--primary, #d95c5c); color: #fff;
  box-shadow: 0 4px 12px rgba(217, 92, 92, .3);
}
.tkcb-pages a.is-cta:hover { opacity: .9; background: var(--primary, #d95c5c); }

/* タップで相談できるチップ */
.tkcb-chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: stretch; padding-left: 38px; }
.tkcb-chips button {
  border: 1.5px solid var(--primary-pale, #fbeaea); background: #fff;
  color: var(--primary, #d95c5c); font-weight: 700; font-size: 12.5px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.tkcb-chips button:hover { background: var(--primary-pale, #fbeaea); border-color: var(--primary, #d95c5c); }

.tkcb-urgent {
  align-self: stretch; background: #fdf1f1; border: 1.5px solid var(--primary, #d95c5c);
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.8;
}
.tkcb-urgent a { font-weight: 700; color: var(--primary, #d95c5c); font-size: 16px; }

.tkcb-note { font-size: 10.5px; line-height: 1.7; color: var(--sub, #8a7d7d); margin: 0; padding: 8px 14px 0; background: #fff; }
/* honeypot: 人間には見えない(botだけが埋める)。display:noneは避け、画面外に飛ばす */
.tkcb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tkcb-form { display: flex; gap: 8px; padding: 10px 14px 14px; background: #fff; }
.tkcb-form input {
  flex: 1; border: 1.5px solid var(--line, #e3dfdd); border-radius: 999px;
  padding: 10px 16px; font-size: 13.5px; outline: none;
}
.tkcb-form input:focus { border-color: var(--primary, #d95c5c); }
.tkcb-form button {
  flex-shrink: 0; width: 42px; height: 42px; border: none; border-radius: 50%;
  background: var(--primary, #d95c5c); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.tkcb-form button svg { width: 18px; height: 18px; }

/* SP: 円形ボタンのまま右下に配置 */
@media (max-width: 840px) {
  #tk-chatbot { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .tkcb-fab { width: 72px; height: 72px; }
  .tkcb-fab img { width: 42px; height: 42px; }
  .tkcb-fab span { font-size: 11px; }
  .tkcb-panel { width: min(360px, calc(100vw - 28px)); }
  .tkcb-body { height: 45vh; }
  /* iOSは16px未満の入力欄にフォーカスすると画面を自動ズームするため16pxにする */
  .tkcb-form input { font-size: 16px; }
}
