.tk-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 12px 17px;
  background: #102452;
  color: #fff;
  box-shadow: 0 9px 28px rgba(10, 22, 40, .25);
  font: 700 14px 'PingFang SC', Arial, sans-serif;
  cursor: pointer;
}
.tk-chat-launcher:hover, .tk-chat-launcher:focus-visible { background: #1c3977; }
.tk-chat-launcher svg { width: 20px; height: 20px; fill: currentColor; }
.tk-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100dvh - 108px));
  overflow: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(10, 22, 40, .27);
  font-family: 'PingFang SC', Arial, sans-serif;
}
.tk-chat-panel[hidden] { display: none; }
.tk-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  background: #102452;
  color: #fff;
}
.tk-chat-head strong { display: block; font-size: 16px; }
.tk-chat-head span { display: block; margin-top: 2px; color: #cbd8ed; font-size: 12px; }
.tk-chat-close { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 6px; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.tk-chat-close:hover { background: rgba(255,255,255,.12); }
.tk-chat-messages { flex: 1; min-height: 80px; overflow-y: auto; padding: 17px 14px; background: #f5f7fb; }
.tk-chat-intro { margin: 0 0 15px; color: #60718a; font-size: 13px; line-height: 1.6; }
.tk-chat-row { display: flex; margin: 0 0 12px; }
.tk-chat-row.is-visitor { justify-content: flex-end; }
.tk-chat-bubble { max-width: 85%; padding: 9px 12px; border-radius: 12px 12px 12px 3px; background: #fff; color: #17243b; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 4px rgba(10,22,40,.08); }
.tk-chat-row.is-visitor .tk-chat-bubble { border-radius: 12px 12px 3px 12px; background: #2855a0; color: #fff; }
.tk-chat-status { min-height: 24px; padding: 2px 14px; color: #9a4b22; font-size: 12px; }
.tk-chat-status:empty { display: none; }
.tk-chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e5eaf2; background: #f8fafc; }
.tk-chat-input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #cfd9e7; border-radius: 9px; background: #fff; outline: none; font: 14px 'PingFang SC', Arial, sans-serif; }
.tk-chat-input:focus { border-color: #2855a0; }
.tk-chat-send { min-width: 54px; border: 0; border-radius: 8px; padding: 0 13px; background: #f5b041; color: #17243b; font-weight: 700; cursor: pointer; }
.tk-chat-send:hover { background: #f7c46c; }
.tk-chat-send:disabled { opacity: .5; cursor: wait; }
.tk-chat-answer-label { display: block; margin-bottom: 6px; color: #60718a; font-size: 11px; font-weight: 700; }
.tk-chat-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.tk-chat-quick button { min-height: 34px; padding: 5px 3px; border: 1px solid #d3dff0; border-radius: 7px; background: #f5f8fd; color: #244e91; font: 12px 'PingFang SC', Arial, sans-serif; cursor: pointer; }
.tk-chat-quick button:hover, .tk-chat-quick button:focus-visible { background: #e7effc; border-color: #2855a0; }
.tk-chat-quick button:disabled { opacity: .5; cursor: wait; }
.tk-chat-contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px 12px; border-top: 1px solid #e5eaf2; }
.tk-chat-contact-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 42px; padding: 4px 8px; border: 1px solid #2855a0; border-radius: 7px; font-family: 'PingFang SC', Arial, sans-serif; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.tk-chat-contact-action span { font-size: 13px; line-height: 1.4; font-weight: 700; }
.tk-chat-contact-action small { font-size: 10px; line-height: 1.4; font-weight: 400; letter-spacing: .15px; }
.tk-chat-show-qr { background: #2855a0; color: #fff; }
.tk-chat-show-qr small { color: #e0eafd; }
.tk-chat-show-qr:hover, .tk-chat-show-qr[aria-expanded="true"] { background: #1d4384; border-color: #1d4384; }
.tk-chat-call { background: #fff; color: #244e91; }
.tk-chat-call small { color: #60718a; }
.tk-chat-call:hover { background: #edf3fe; }
.tk-chat-panel button:focus-visible, .tk-chat-panel a:focus-visible { outline: 2px solid #f5b041; outline-offset: 2px; }
.tk-chat-contact-card { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 12px 10px; padding: 12px; border: 1px solid #e0e7f1; border-radius: 10px; background: #f5f7fb; }
.tk-chat-contact-card[hidden] { display: none; }
.tk-chat-qr-crop { position: relative; flex-shrink: 0; width: 148px; height: 148px; overflow: hidden; background: #fff; }
.tk-chat-qr-crop img { position: absolute; top: -34.065934%; left: -10.989011%; width: 121.978022%; max-width: none; height: auto; }
.tk-chat-contact-card strong { font-size: 14px; color: #17243b; }
.tk-chat-contact-card p { margin: 4px 0 6px; color: #60718a; font-size: 12px; line-height: 1.6; }
.tk-chat-hide-qr { border: 0; padding: 0; background: transparent; color: #244e91; font-size: 12px; cursor: pointer; }
.tk-chat-head, .tk-chat-status, .tk-chat-quick, .tk-chat-contact-card, .tk-chat-contacts, .tk-chat-form { flex-shrink: 0; }
@media (max-width: 520px) {
  .tk-chat-launcher { right: 12px; bottom: 14px; }
  .tk-chat-panel { right: 12px; bottom: 70px; height: min(520px, calc(100dvh - 86px)); }
}
@media (max-width: 340px) {
  .tk-chat-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-chat-contact-card { gap: 10px; padding: 10px; }
  .tk-chat-qr-crop { width: 128px; height: 128px; }
}
@media (max-height: 520px) {
  .tk-chat-contact-card { position: absolute; z-index: 2; right: 0; bottom: 122px; left: 0; box-shadow: 0 8px 24px rgba(10,22,40,.16); }
  .tk-chat-messages { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-chat-contact-action { transition: none; }
}
