html body .app-shell .gallery-group-body.has-workspace-chat-agent {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  align-content: flex-start !important;
  gap: 12px !important;
}

html body .app-shell .gallery-group-body.has-workspace-chat-agent > .gallery-card {
  flex: 0 0 210px !important;
  width: 210px !important;
  max-width: 210px !important;
}

html body .app-shell .gallery-group-body.has-workspace-chat-agent > .gallery-group-empty {
  display: none !important;
}

.workspace-chat-agent,
.workspace-chat-agent * {
  box-sizing: border-box;
}

.workspace-chat-agent {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(1480px, 100%);
  min-width: 520px;
  height: clamp(552px, calc(100vh - 220px), 796px);
  min-height: 552px;
  overflow: hidden;
  border: 1px solid #e3e5e8;
  border-radius: 18px;
  background: #ffffff;
  color: #202124;
  box-shadow: 0 18px 48px rgba(20, 26, 37, 0.11);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.workspace-chat-agent.has-archive-sidebar {
  grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  min-width: 680px;
}

.workspace-chat-agent[hidden],
.workspace-chat-agent-launcher[hidden] {
  display: none !important;
}

.workspace-chat-agent [hidden] {
  display: none !important;
}

.workspace-chat-agent.is-floating {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 10020;
  width: var(--workspace-chat-agent-floating-width, min(960px, calc(100vw - 32px)));
  max-width: none;
  height: var(--workspace-chat-agent-floating-height, min(720px, calc(100vh - 32px)));
  min-width: 0;
  min-height: 0;
  box-shadow: 0 30px 86px rgba(20, 26, 37, 0.24);
}

.workspace-chat-agent.is-maximized {
  position: fixed;
  inset: 0;
  z-index: 30000;
  width: auto;
  max-width: none;
  height: auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.workspace-chat-agent-maximized {
  overflow: hidden !important;
}

.workspace-chat-agent-head {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
  min-height: 124px;
  padding: 23px 28px 22px;
  border-bottom: 1px solid #e8e9ec;
  background: #ffffff;
  cursor: move;
  touch-action: none;
  user-select: none;
}

.workspace-chat-agent.is-maximized .workspace-chat-agent-head {
  min-height: 142px;
  padding: 31px clamp(24px, 4vw, 62px) 26px;
}

.workspace-chat-agent-hero-copy {
  min-width: 0;
}

.workspace-chat-agent-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #777b83;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

.workspace-chat-agent-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workspace-chat-agent-title > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-chat-agent-title strong,
.workspace-chat-agent-title span:not(.workspace-chat-agent-mark) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-chat-agent-title strong {
  color: #16171a;
  font-size: 27px;
  font-weight: 780;
  line-height: 1.05;
}

.workspace-chat-agent-title span:not(.workspace-chat-agent-mark) {
  color: #747982;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.workspace-chat-agent-mark,
.workspace-chat-agent-sidebar-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #151619;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.workspace-chat-agent-hero-copy > p {
  max-width: 660px;
  margin: 9px 0 0 48px;
  color: #72777f;
  font-size: 12px;
  line-height: 1.55;
}

.workspace-chat-agent-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 340px;
  padding-top: 1px;
}

.workspace-chat-agent-icon,
.workspace-chat-agent-header-command,
.workspace-chat-agent-send,
.workspace-chat-agent-launcher {
  display: inline-grid;
  place-items: center;
  margin: 0;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  background: #ffffff;
  color: #25272b;
  font-family: inherit;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  letter-spacing: 0;
}

.workspace-chat-agent-header-command {
  min-width: 42px;
  height: 31px;
  padding: 0 10px;
  font-size: 11px;
}

.workspace-chat-agent-header-command:hover,
.workspace-chat-agent-header-command.is-active {
  border-color: #bfc4ca;
  background: #f4f5f6;
}

.workspace-chat-agent-header-command:disabled,
.workspace-chat-agent-tool:disabled,
.workspace-chat-agent-send:disabled,
.workspace-chat-agent-new:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.workspace-chat-agent-archive {
  grid-column: 1;
  grid-row: 2 / 5;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 20px 16px 17px;
  border-right: 1px solid #e8e9ec;
  background: #fafafb;
}

.workspace-chat-agent-archive[hidden] {
  display: none !important;
}

.workspace-chat-agent-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 5px;
}

.workspace-chat-agent-sidebar-profile > div {
  min-width: 0;
}

.workspace-chat-agent-sidebar-profile strong,
.workspace-chat-agent-sidebar-profile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-chat-agent-sidebar-profile strong {
  color: #24262a;
  font-size: 13px;
  font-weight: 780;
}

.workspace-chat-agent-sidebar-profile span {
  margin-top: 3px;
  color: #8a8f97;
  font-size: 10px;
}

.workspace-chat-agent-sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 10px;
}

.workspace-chat-agent-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 39px;
  border: 0;
  border-radius: 10px;
  background: #1a1b1e;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.workspace-chat-agent-new > span {
  font-size: 19px;
  font-weight: 300;
  line-height: 0;
}

.workspace-chat-agent-new:hover:not(:disabled) {
  background: #34363b;
  transform: translateY(-1px);
}

.workspace-chat-agent-archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  padding: 0 4px;
}

.workspace-chat-agent-archive-head strong {
  color: #70757d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.workspace-chat-agent-archive-head button,
.workspace-chat-agent-archive-delete {
  display: grid;
  place-items: center;
  width: auto;
  height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #767c84;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.workspace-chat-agent-archive-head button:hover,
.workspace-chat-agent-archive-delete:hover {
  background: #ebedf0;
  color: #202226;
}

.workspace-chat-agent-current {
  width: 100%;
  min-height: 34px;
  margin: -8px 0 0;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #444951;
  font-family: inherit;
  font-size: 11px;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
}

.workspace-chat-agent-current:hover,
.workspace-chat-agent-current.is-active {
  border-color: #e3e5e8;
  background: #ffffff;
  color: #15171a;
}

.workspace-chat-agent-archive-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 1px 1px 3px;
  scrollbar-width: thin;
}

.workspace-chat-agent-archive-empty {
  padding: 15px 9px;
  border: 1px dashed #dfe1e5;
  border-radius: 9px;
  color: #8b9098;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.workspace-chat-agent-archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25px;
  align-items: center;
  gap: 2px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
}

.workspace-chat-agent-archive-item.is-active,
.workspace-chat-agent-archive-item:hover {
  border-color: #e4e6e9;
  background: #ffffff;
}

.workspace-chat-agent-archive-open {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 3px 8px 9px;
  border: 0;
  background: transparent;
  color: #33363b;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.workspace-chat-agent-archive-open strong,
.workspace-chat-agent-archive-open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-chat-agent-archive-open strong {
  font-size: 11px;
  font-weight: 700;
}

.workspace-chat-agent-archive-open span {
  color: #92979f;
  font-size: 9px;
}

.workspace-chat-agent-archive-delete {
  width: 25px;
  padding: 0;
  font-size: 16px;
}

.workspace-chat-agent.has-archive-sidebar .workspace-chat-agent-messages,
.workspace-chat-agent.has-archive-sidebar .workspace-chat-agent-attachments,
.workspace-chat-agent.has-archive-sidebar .workspace-chat-agent-compose {
  grid-column: 2;
}

.workspace-chat-agent-messages {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding: 24px clamp(20px, 3vw, 40px) 26px;
  background: #ffffff;
  scrollbar-gutter: stable;
}

.workspace-chat-agent-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 300px;
  max-width: 660px;
  margin: auto;
  text-align: center;
}

.workspace-chat-agent-empty h2 {
  margin: 0;
  color: #24262a;
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 760;
  line-height: 1.15;
}

.workspace-chat-agent-empty p {
  max-width: 570px;
  margin: 13px 0 20px;
  color: #858a92;
  font-size: 13px;
  line-height: 1.72;
}

.workspace-chat-agent-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.workspace-chat-agent-suggestions button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #e0e3e7;
  border-radius: 8px;
  background: #ffffff;
  color: #545a62;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.workspace-chat-agent-suggestions button:hover {
  border-color: #bfc4ca;
  background: #f7f8f9;
  color: #17191d;
}

.workspace-chat-agent-message {
  display: grid;
  gap: 6px;
  max-width: min(82%, 820px);
  margin: 0 0 18px;
}

.workspace-chat-agent-message.is-user {
  justify-self: end;
}

.workspace-chat-agent-message.is-assistant {
  justify-self: start;
}

.workspace-chat-agent-message-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #7b8189;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-chat-agent-message.is-user .workspace-chat-agent-message-label {
  justify-content: flex-end;
}

.workspace-chat-agent-message-body {
  padding: 11px 13px;
  border: 1px solid #e1e4e8;
  border-radius: 13px 13px 13px 4px;
  background: #ffffff;
  color: #282b30;
  font-size: 13px;
  line-height: 1.68;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.workspace-chat-agent-message.is-user .workspace-chat-agent-message-body {
  border-color: #ebedef;
  border-radius: 13px 13px 4px 13px;
  background: #f2f3f5;
}

.workspace-chat-agent-message.is-pending .workspace-chat-agent-message-body {
  color: #7a8088;
}

.workspace-chat-agent-message.is-failed .workspace-chat-agent-message-body {
  border-color: #e4c9c9;
  background: #fffafa;
  color: #7b3030;
}

.workspace-chat-agent-message-copy {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #666d76;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.workspace-chat-agent-message-copy:hover {
  color: #111318;
}

.workspace-chat-agent-message-retry {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9b2f2f;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.workspace-chat-agent-message-retry:hover {
  color: #5f1717;
}

.workspace-chat-agent-message-retry:disabled {
  color: #a7abb0;
  cursor: default;
}

.workspace-chat-agent-message-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.workspace-chat-agent-message-images img,
.workspace-chat-agent-attachment img {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid #dce0e4;
  border-radius: 8px;
  background: #f2f3f5;
  object-fit: cover;
}

.workspace-chat-agent-attachments {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 8px clamp(20px, 3vw, 40px) 0;
  overflow-x: auto;
  border-top: 1px solid #f0f1f3;
  background: #ffffff;
}

.workspace-chat-agent-attachment {
  position: relative;
  flex: 0 0 48px;
}

.workspace-chat-agent-attachment-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #d2d7dc;
  border-radius: 50%;
  background: #ffffff;
  color: #33373d;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.workspace-chat-agent-compose {
  position: relative;
  grid-column: 1;
  grid-row: 4;
  display: grid;
  gap: 8px;
  padding: 12px clamp(20px, 3vw, 40px) 22px;
  border-top: 1px solid #eceef1;
  background: #ffffff;
}

.workspace-chat-agent-compose.is-dragging {
  outline: 2px solid #1e2024;
  outline-offset: -4px;
  background: #f7f8f9;
}

.workspace-chat-agent-drop-hint {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 2px dashed #757b84;
  background: rgba(255, 255, 255, 0.95);
  color: #25272b;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}

.workspace-chat-agent-drop-hint[hidden] {
  display: none !important;
}

.workspace-chat-agent-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.workspace-chat-agent-tool {
  min-width: 0;
  height: 29px;
  padding: 0 10px;
  border: 1px solid #dfe2e6;
  border-radius: 8px;
  background: #ffffff;
  color: #4f555d;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.workspace-chat-agent-tool:hover {
  border-color: #bfc5cc;
  background: #f7f8f9;
  color: #1d1f23;
}

.workspace-chat-agent-status {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #777e87;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-chat-agent-status.is-error {
  color: #b42318;
}

.workspace-chat-agent-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 39px;
  align-items: end;
  gap: 8px;
  padding: 2px;
  border: 1px solid #dfe2e6;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(23, 29, 39, 0.06);
}

.workspace-chat-agent-input-row:focus-within {
  border-color: #aeb4bc;
  box-shadow: 0 0 0 3px rgba(31, 35, 41, 0.08), 0 6px 20px rgba(23, 29, 39, 0.06);
}

.workspace-chat-agent-input-row textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 64px;
  max-height: 128px;
  margin: 0;
  padding: 12px 11px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: #212327;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
}

.workspace-chat-agent-input-row textarea::placeholder {
  color: #a1a6ae;
}

.workspace-chat-agent-send {
  width: 35px;
  height: 35px;
  margin: 0 2px 2px 0;
  padding: 0;
  border-color: #1a1b1e;
  border-radius: 10px;
  background: #1a1b1e;
  color: #ffffff;
  font-size: 18px;
}

.workspace-chat-agent-send:hover {
  background: #383b40;
}

.workspace-chat-agent-send.is-busy {
  border-color: #5f656d;
  background: #5f656d;
  font-size: 12px;
}

.workspace-chat-agent-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10010;
  width: 48px;
  height: 48px;
  padding: 0;
  border-color: #1a1b1e;
  border-radius: 12px;
  background: #1a1b1e;
  color: #ffffff;
  font-size: 11px;
  box-shadow: 0 14px 32px rgba(20, 26, 37, 0.22);
  touch-action: none;
  user-select: none;
}

.workspace-chat-agent-launcher:hover {
  background: #383b40;
}

body.workspace-chat-agent-dragging {
  user-select: none !important;
}

@media (max-width: 900px) {
  html body .app-shell .gallery-group-body.has-workspace-chat-agent > .gallery-card {
    flex-basis: min(210px, 100%) !important;
  }

  .workspace-chat-agent {
    min-width: 100%;
  }

  .workspace-chat-agent.has-archive-sidebar {
    grid-template-columns: 220px minmax(0, 1fr);
    min-width: 100%;
  }

  .workspace-chat-agent.is-floating {
    width: var(--workspace-chat-agent-floating-width, calc(100vw - 16px));
    height: var(--workspace-chat-agent-floating-height, calc(100vh - 16px));
    min-width: 0;
    min-height: 0;
  }

  .workspace-chat-agent.is-maximized .workspace-chat-agent-head {
    padding: 24px;
  }

  .workspace-chat-agent-head {
    padding: 20px;
  }

  .workspace-chat-agent-title strong {
    font-size: 23px;
  }

  .workspace-chat-agent-hero-copy > p {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  html body .app-shell .gallery-group-body.has-workspace-chat-agent > .gallery-card {
    flex-basis: 100% !important;
    width: 100% !important;
    max-width: none !important;
  }

  .workspace-chat-agent,
  .workspace-chat-agent.has-archive-sidebar {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .workspace-chat-agent.is-maximized {
    inset: 0;
  }

  .workspace-chat-agent-head {
    min-height: 0;
    padding: 18px;
  }

  .workspace-chat-agent-eyebrow,
  .workspace-chat-agent-hero-copy > p {
    display: none;
  }

  .workspace-chat-agent-title strong {
    font-size: 20px;
  }

  .workspace-chat-agent-actions {
    gap: 4px;
    max-width: 220px;
  }

  .workspace-chat-agent-header-command {
    min-width: 38px;
    height: 28px;
    padding: 0 7px;
    font-size: 10px;
  }

  .workspace-chat-agent-archive {
    position: absolute;
    z-index: 5;
    top: 76px;
    bottom: 0;
    left: 0;
    width: min(276px, calc(100% - 42px));
    border-top: 1px solid #e8e9ec;
    border-right: 1px solid #e8e9ec;
    box-shadow: 14px 0 32px rgba(20, 26, 37, 0.12);
  }

  .workspace-chat-agent.has-archive-sidebar .workspace-chat-agent-messages,
  .workspace-chat-agent.has-archive-sidebar .workspace-chat-agent-attachments,
  .workspace-chat-agent.has-archive-sidebar .workspace-chat-agent-compose {
    grid-column: 1;
  }

  .workspace-chat-agent-messages {
    padding: 18px;
  }

  .workspace-chat-agent-message {
    max-width: 94%;
  }

  .workspace-chat-agent-empty {
    min-height: 270px;
  }

  .workspace-chat-agent-empty h2 {
    font-size: 23px;
  }

  .workspace-chat-agent-compose,
  .workspace-chat-agent-attachments {
    padding-right: 14px;
    padding-left: 14px;
  }

  .workspace-chat-agent-tools {
    flex-wrap: wrap;
  }

  .workspace-chat-agent-status {
    width: 100%;
    margin-left: 0;
  }
}
