.hksc-root { position: fixed; right: 18px; bottom: 18px; z-index: 99999; font-family: Segoe UI, Arial, sans-serif; }
.hksc-root[dir="rtl"] { right: auto; left: 18px; }
.hksc-fab {
  border: 0; border-radius: 24px; padding: 10px 18px; cursor: pointer;
  background: #0b5cab; color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.hksc-panel {
  position: absolute; right: 0; bottom: 52px; width: 380px; max-width: calc(100vw - 24px);
  height: 520px; max-height: calc(100vh - 80px); background: #fff; border: 1px solid #c5d4e2;
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.22); flex-direction: column; overflow: hidden;
}
.hksc-root[dir="rtl"] .hksc-panel { right: auto; left: 0; }
.hksc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: #0b5cab; color: #fff; font-weight: 600;
}
.hksc-close { background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.hksc-log { flex: 1; overflow: auto; padding: 10px; background: #f5f8fb; min-height: 120px; }
.hksc-msg { margin-bottom: 10px; }
.hksc-user { text-align: right; }
.hksc-root[dir="rtl"] .hksc-user { text-align: left; }
.hksc-bot, .hksc-system { text-align: left; }
.hksc-root[dir="rtl"] .hksc-bot, .hksc-root[dir="rtl"] .hksc-system { text-align: right; }
.hksc-bubble {
  display: inline-block; max-width: 90%; padding: 8px 10px; border-radius: 8px;
  background: #fff; border: 1px solid #d7e2ec; white-space: pre-wrap; word-break: break-word; font-size: 13px;
}
.hksc-user .hksc-bubble { background: #dceeff; border-color: #b7d4ef; }
.hksc-system .hksc-bubble { background: #fff8e8; border-color: #f0dfb0; color: #665522; }
.hksc-thumb { display: block; max-width: 160px; max-height: 120px; margin-top: 6px; border-radius: 4px; }
.hksc-input {
  width: 100%; box-sizing: border-box; border: 0; border-top: 1px solid #dde6ee;
  padding: 8px 10px; resize: none; font-size: 13px; outline: none;
}
.hksc-tools {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px;
  border-top: 1px solid #e6eef5; background: #fff;
}
.hksc-tools button, .hksc-handoff-box button {
  border: 1px solid #8aa8c0; background: linear-gradient(#fff, #e8f0f6); color: #1a2a3a;
  border-radius: 3px; height: 28px; padding: 0 10px; font-size: 12px; cursor: pointer;
}
.hksc-handoff-box {
  padding: 10px 12px 12px; border-top: 2px solid #0b5cab;
  background: #eef5fc;
}
.hksc-contact-hint {
  font-size: 12px; color: #1a2a3a; font-weight: 600; margin-bottom: 8px;
}
.hksc-lab {
  display: block !important; width: 100% !important; box-sizing: border-box !important;
  font-size: 12px; color: #334455; margin: 4px 0 2px; font-weight: 600;
  text-align: left;
}
/* 压过官网全局 input 窄宽：至少约 20 个英文字符，并拉满联系区 */
.hksc-root input.hksc-field,
.hksc-handoff-box input.hksc-field,
.hksc-field {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 20ch !important;
  box-sizing: border-box !important;
  margin-bottom: 8px !important;
  height: 36px !important;
  padding: 0 10px !important;
  border: 1px solid #8aa8c0 !important;
  border-radius: 4px !important;
  font-size: 13px !important;
  background: #fff !important;
}
.hksc-submit {
  display: block !important;
  width: 100% !important;
  min-width: 20ch !important;
  margin-top: 4px; height: 34px !important; font-weight: 600;
  background: linear-gradient(#fff, #c8d8e8) !important;
}
