/* TGCP AI 客服挂件 — 与站点配色一致（深海青 / 湖水青 / 暖珊瑚） */
#tgc-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 9000;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ink, #0F4C5C); color: #fff;
  box-shadow: 0 6px 22px rgba(15, 76, 92, .32);
  display: grid; place-items: center; transition: transform .18s, background .18s;
}
#tgc-fab:hover { transform: translateY(-2px); background: #0B3B48; }
#tgc-fab svg { width: 24px; height: 24px; }
#tgc-fab .tgc-dot {
  position: absolute; top: 6px; right: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: #14A0A8; box-shadow: 0 0 0 2px #fff;
}

#tgc-panel {
  position: fixed; right: 22px; bottom: 88px; z-index: 9001;
  width: min(370px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 130px));
  background: #fff; border: 1px solid var(--line, #DCE7EA);
  border-radius: 16px; box-shadow: 0 18px 50px rgba(15, 76, 92, .18);
  display: none; flex-direction: column; overflow: hidden;
}
#tgc-panel.open { display: flex; }

#tgc-head {
  background: var(--ink, #0F4C5C); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
#tgc-head strong { font-size: 14.5px; font-weight: 600; letter-spacing: .01em; }
#tgc-head small { display: block; font-size: 11.5px; opacity: .72; margin-top: 2px; }
#tgc-close {
  margin-left: auto; background: transparent; border: none; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; opacity: .8; padding: 0 2px;
}
#tgc-close:hover { opacity: 1; }

#tgc-log {
  flex: 1; overflow-y: auto; padding: 16px; background: #F7FBFC;
  display: flex; flex-direction: column; gap: 10px;
}
.tgc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.6; }
.tgc-msg.bot { background: #fff; border: 1px solid var(--line, #DCE7EA); color: var(--text, #1B3B45); align-self: flex-start; border-bottom-left-radius: 4px; }
.tgc-msg.me { background: var(--ink, #0F4C5C); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.tgc-msg.err { background: #FCEDE8; border-color: #E0765A; }

#tgc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line, #DCE7EA); background: #fff; }
#tgc-input {
  flex: 1; border: 1px solid var(--line, #DCE7EA); border-radius: 10px;
  padding: 10px 12px; font-family: inherit; font-size: 14px; resize: none;
  max-height: 90px; line-height: 1.5; color: var(--text, #1B3B45);
}
#tgc-input:focus { outline: 2px solid #14A0A8; outline-offset: -1px; }
#tgc-send {
  border: none; border-radius: 10px; padding: 0 16px; cursor: pointer;
  background: #0B6E76; color: #fff; font-family: inherit; font-size: 14px; font-weight: 500;
}
#tgc-send:disabled { opacity: .5; cursor: default; }
#tgc-note { padding: 0 12px 10px; font-size: 11px; color: var(--muted, #5C7A85); line-height: 1.5; }

@media (max-width: 520px) {
  #tgc-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  #tgc-panel { right: 8px; left: 8px; bottom: 78px; width: auto; }
}
@media print { #tgc-fab, #tgc-panel { display: none !important; } }
