.zkcs-root {
  --zkcs-blue: #1265f2;
  --zkcs-blue-dark: #0750d3;
  --zkcs-text: #172033;
  --zkcs-muted: #6d7688;
  --zkcs-line: #dfe6f1;
  --zkcs-soft: #f6f9fd;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: var(--zkcs-text);
}

.zkcs-open {
  overflow: hidden;
}

.zkcs-float {
  position: fixed;
  right: 18px;
  top: 190px;
  z-index: 99997;
  width: 74px;
  min-height: 88px;
  padding: 8px 6px 9px;
  border: 1px solid rgba(18, 101, 242, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 44, 85, 0.18);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

@media (max-width: 767px) {
  .zkcs-root {
    display: none;
  }
}

.zkcs-float img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
}

.zkcs-float span {
  font-size: 13px;
  line-height: 1.2;
  color: #0f3f98;
  font-weight: 700;
}

.zkcs-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(17, 27, 46, 0.2);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.zkcs-overlay.is-open {
  display: flex;
}

.zkcs-shell {
  width: min(1260px, calc(100% - 56px));
  height: min(760px, calc(100vh - 56px));
  background: #fff;
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(22, 38, 67, 0.2);
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.zkcs-sidebar {
  border-right: 1px solid #e3e9f3;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  padding: 32px 22px 26px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
}

.zkcs-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.zkcs-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--zkcs-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
}

.zkcs-brand strong,
.zkcs-brand em {
  display: block;
}

.zkcs-brand strong {
  font-size: 22px;
  line-height: 1.25;
}

.zkcs-brand em {
  margin-top: 3px;
  font-size: 14px;
  color: var(--zkcs-muted);
  font-style: normal;
}

.zkcs-nav {
  display: grid;
  gap: 12px;
}

.zkcs-nav button {
  height: 60px;
  border: 1px solid #dfe7f2;
  border-radius: 10px;
  background: #fff;
  color: #303b51;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.zkcs-nav button.is-active {
  color: #fff;
  border-color: var(--zkcs-blue);
  background: var(--zkcs-blue);
  box-shadow: 0 10px 22px rgba(18, 101, 242, 0.24);
}

.zkcs-nav span {
  width: 22px;
  text-align: center;
  font-size: 17px;
}

.zkcs-sidebar-note {
  align-self: end;
  color: #78839a;
  font-size: 12px;
  line-height: 1.7;
}

.zkcs-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
}

.zkcs-head {
  min-height: 116px;
  padding: 32px 36px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}

.zkcs-bot-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #eaf2ff;
  color: var(--zkcs-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.zkcs-bot-avatar {
  padding: 0;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #dce7f7;
  box-shadow: 0 8px 22px rgba(18, 101, 242, 0.16);
}

.zkcs-head h3 {
  margin: 0;
  font-size: 29px;
  line-height: 1.22;
}

.zkcs-head p {
  margin: 8px 0 0;
  color: var(--zkcs-muted);
  font-size: 16px;
}

.zkcs-close {
  position: absolute;
  right: 26px;
  top: 22px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f2f5fa;
  color: #647085;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.zkcs-content {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0 28px 18px 36px;
}

.zkcs-chat-panel {
  min-height: 0;
}

.zkcs-messages {
  height: 100%;
  min-height: 260px;
  max-height: 470px;
  overflow: auto;
  padding: 4px 4px 6px;
}

.zkcs-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
}

.zkcs-msg--user {
  justify-content: flex-end;
}

.zkcs-msg-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dce7f7;
  box-shadow: 0 6px 16px rgba(18, 101, 242, 0.12);
}

.zkcs-msg-bubble {
  max-width: min(680px, 88%);
  border: 1px solid #dfe7f2;
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.75;
  box-shadow: 0 8px 22px rgba(24, 44, 79, 0.05);
}

.zkcs-msg--user .zkcs-msg-bubble {
  color: #fff;
  background: var(--zkcs-blue);
  border-color: var(--zkcs-blue);
}

.zkcs-note {
  margin: 18px 0 0;
  color: #778399;
  font-size: 13px;
}

.zkcs-input-wrap {
  min-height: 88px;
  padding: 14px 36px 24px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 78px;
  gap: 12px;
  align-items: end;
}

.zkcs-file-input {
  display: none;
}

.zkcs-upload,
.zkcs-send {
  border: 0;
  cursor: pointer;
}

.zkcs-upload {
  height: 46px;
  border-radius: 50%;
  background: #f0f5fb;
  color: #56647a;
  font-size: 30px;
  line-height: 1;
}

.zkcs-input-box {
  min-width: 0;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  padding: 10px 14px;
  display: grid;
  gap: 8px;
}

.zkcs-input-box textarea {
  width: 100%;
  min-height: 26px;
  max-height: 84px;
  resize: none;
  border: 0;
  outline: 0;
  color: #1d2738;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
}

.zkcs-send {
  height: 52px;
  border-radius: 13px;
  background: var(--zkcs-blue);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.zkcs-send:disabled,
.zkcs-upload:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.zkcs-pending {
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
}

.zkcs-pending-head {
  color: #617086;
  font-size: 12px;
  margin-bottom: 6px;
}

.zkcs-pending-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zkcs-pending-file {
  max-width: 240px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 8px;
  background: #f4f7fb;
  color: #344258;
  font-size: 12px;
}

.zkcs-pending-file em {
  color: #8390a2;
  font-style: normal;
}

.zkcs-pending-file button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #dfe7f2;
  color: #607187;
  cursor: pointer;
  line-height: 1;
}

.zkcs-journals {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.zkcs-journals-title {
  color: #3d4f6f;
  font-size: 14px;
  font-weight: 700;
}

.zkcs-journal-card {
  width: 100%;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #fbfdff;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}

.zkcs-journal-name,
.zkcs-journal-meta,
.zkcs-journal-scope,
.zkcs-journal-link {
  display: block;
}

.zkcs-journal-name {
  font-size: 15px;
  font-weight: 700;
  color: #22324d;
}

.zkcs-journal-meta,
.zkcs-journal-scope {
  margin-top: 6px;
  color: #5e6a7f;
  font-size: 12px;
  line-height: 1.55;
}

.zkcs-journal-link {
  margin-top: 8px;
  color: var(--zkcs-blue);
  font-size: 12px;
  font-weight: 700;
}

.zkcs-paper-samples {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.zkcs-paper-sample {
  border: 1px solid #e6edf6;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.zkcs-paper-sample strong,
.zkcs-paper-sample span {
  display: block;
}

.zkcs-paper-sample strong {
  font-size: 13px;
}

.zkcs-paper-sample span {
  margin-top: 4px;
  color: #637085;
  font-size: 12px;
  line-height: 1.6;
}

.zkcs-paper-samples-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #264f93;
}

.zkcs-handoff {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed #cfd8e6;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fbff;
}

.zkcs-handoff button {
  border: 0;
  border-radius: 10px;
  background: var(--zkcs-blue);
  color: #fff;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .zkcs-shell {
    width: min(1080px, calc(100% - 32px));
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .zkcs-sidebar {
    padding: 28px 18px 22px;
  }
}
