.group-chat-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 14;
}
.group-chat-layer > * {
  pointer-events: auto;
}
body.command-view-open .group-chat-layer {
  visibility: hidden;
  pointer-events: none;
}
.team-group {
  position: absolute;
  left: 50%;
  bottom: var(--group-bottom, 116px);
  transform: translateX(-50%);
  width: 344px;
  max-width: calc(100% - 32px);
  height: 344px;
  max-height: calc(100% - 155px);
  display: flex;
  flex-direction: column;
  color: #dedfe9;
  background: linear-gradient(145deg, #22222bef, #191b24f5);
  border: 1px solid #77768255;
  border-radius: 13px;
  box-shadow:
    0 12px 42px #0006,
    0 0 0 1px #0003;
  backdrop-filter: blur(14px);
  overflow: hidden;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #ffffff08;
}
.group-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.group-heading > div {
  min-width: 0;
}
.group-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.group-heading p {
  margin: 4px 0 0;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #888795;
  font-size: 9px;
  line-height: 1.35;
}
.group-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.group-header-actions > button {
  border: 0;
  background: transparent;
  color: #92909f;
  padding: 0;
  cursor: pointer;
}
#group-hide {
  font-size: 19px;
  line-height: 1;
  width: 16px;
}
.group-avatar {
  --member-color: #a7b5ce;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--member-color);
  border: 1px solid #ffffff12;
  box-shadow: 0 2px 5px #0003;
}
.group-avatar:before {
  content: "";
  position: absolute;
  top: -3px;
  left: 10px;
  width: 1px;
  height: 3px;
  background: var(--member-color);
}
.group-avatar i {
  display: block;
  position: relative;
  width: 15px;
  height: 10px;
  border-radius: 4px;
  background: #14232a;
}
.group-avatar i:before,
.group-avatar i:after {
  content: "";
  position: absolute;
  top: 3px;
  width: 2px;
  height: 3px;
  border-radius: 1px;
  background: #e0fff9;
}
.group-avatar i:before {
  left: 3px;
}
.group-avatar i:after {
  right: 3px;
}
.group-avatar-stack {
  position: relative;
  display: block;
  flex: none;
  width: 32px;
  height: 30px;
}
.group-avatar-stack .group-avatar {
  position: absolute;
  left: 0;
  top: 0;
  transform: scale(0.85);
  transform-origin: top left;
}
.group-avatar-stack .group-avatar:nth-child(2) {
  left: 12px;
  top: 11px;
}
.group-avatar-stack .group-avatar:nth-child(3) {
  left: 15px;
  top: 0;
  transform: scale(0.65);
}
.group-member-stack {
  display: flex;
  align-items: center;
  padding: 3px 0 !important;
}
.group-member-stack .group-avatar {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  margin-left: -4px;
  border: 1px solid #21222c;
  box-shadow: none;
}
.group-member-stack .group-avatar:first-child {
  margin-left: 0;
}
.group-member-stack .group-avatar i {
  width: 11px;
  height: 8px;
  border-radius: 3px;
}
.group-member-stack .group-avatar i:before,
.group-member-stack .group-avatar i:after {
  top: 3px;
  width: 2px;
  height: 2px;
}
.group-member-stack .group-avatar i:before {
  left: 2px;
}
.group-member-stack .group-avatar i:after {
  right: 2px;
}
.group-member-stack .group-avatar:before {
  left: 7px;
  top: -2px;
  height: 2px;
}
.group-feed {
  flex: 1;
  min-height: 50px;
  padding: 13px 12px 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #474450 transparent;
  outline: none;
}
.group-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 13px;
}
.group-message > .group-avatar {
  margin-top: 2px;
}
.group-message-content {
  min-width: 0;
  max-width: calc(100% - 30px);
}
.group-message-content > header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
  line-height: 1.25;
}
.group-message-content > header strong {
  font-size: 10px;
  font-weight: 500;
  color: #b2afbe;
}
.group-message-content > header span {
  padding: 2px 4px;
  border-radius: 3px;
  background: #a997d914;
  color: #9c92b4;
  font-size: 8px;
}
.group-message-content > header time {
  color: #676576;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.group-bubble {
  display: inline-block;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 0 7px 7px 7px;
  color: #c9c9d6;
  background: #252735;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.group-message.own {
  justify-content: flex-end;
}
.group-message.own .group-message-content {
  max-width: 89%;
}
.group-message.own header {
  justify-content: flex-end;
}
.group-message.own .group-bubble {
  background: #8070c6;
  color: #f1edff;
  border-radius: 7px 7px 0 7px;
}
.group-text-mention {
  padding: 1px 2px;
  border-radius: 3px;
  background: #9f89d71b;
  color: #c8b5ef;
}
.own .group-text-mention {
  background: #ffffff12;
  color: #f2eaff;
}
.group-quote {
  display: block;
  border-left: 2px solid #9d8cbb66;
  padding-left: 7px;
  color: #aaa5bd;
}
.group-legacy-note {
  display: block;
  color: #7c718f;
  font-size: 9px;
  line-height: 1.5;
  margin-top: 4px;
}
.group-message-highlight .group-bubble {
  box-shadow: 0 0 0 1px #ad9cff66;
}
.group-welcome {
  padding: 15px 6px;
  text-align: center;
  color: #7f7c90;
}
.group-welcome > .group-avatar-stack {
  display: none;
}
.group-welcome h3 {
  font-size: 12px;
  font-weight: 500;
  color: #aaa5bb;
  margin: 10px 0;
}
.group-welcome p {
  font-size: 11px;
  line-height: 1.7;
  margin: 6px 0;
}
.group-typing {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 20px;
  color: #7d758f;
  font-size: 10px;
}
.group-typing i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a995cf;
  animation: group-thinking 0.8s alternate infinite;
}
.group-typing i:nth-child(2) {
  animation-delay: 0.2s;
}
.group-typing i:nth-child(3) {
  animation-delay: 0.4s;
}
.group-typing span {
  margin-left: 5px;
}
.group-compose-area {
  position: relative;
  flex: none;
  padding: 8px 10px 8px;
  border-top: 1px solid #ffffff06;
  background: #1a1b24b3;
}
.group-composer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 1px 7px;
}
.group-shortcuts {
  display: flex;
  align-items: center;
  gap: 12px;
}
.group-shortcuts button {
  border: 0;
  background: transparent;
  color: #8d859c;
  font-size: 10px;
  line-height: 1.3;
  padding: 0;
  cursor: pointer;
}
.group-shortcuts #group-mention {
  font-size: 13px;
}
.group-shortcuts #group-refresh {
  font-size: 13px;
}
.group-composer-top > span {
  color: #777087;
  font-size: 9px;
}
.group-compose {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}
.group-compose textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  max-height: 70px;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  padding: 7px 9px;
  resize: vertical;
  background: #10151f;
  border: 1px solid #74688c85;
  border-radius: 8px;
  color: #dad5e6;
  outline: none;
}
.group-compose textarea:focus {
  border-color: #a28bc9;
  box-shadow: 0 0 0 1px #b29bdc11;
}
.group-compose textarea::placeholder {
  color: #696376;
  font-size: 11px;
}
.group-compose > button {
  height: 34px;
  flex: none;
  border: 1px solid #b9a3ed22;
  border-radius: 7px;
  padding: 0 12px;
  background: #8b77cf;
  color: #f5efff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.group-key-hint {
  margin: 5px 1px 0;
  color: #5f576c;
  font-size: 8px;
  line-height: 1.2;
}
.group-mentions {
  position: absolute;
  bottom: 100%;
  left: 10px;
  right: 10px;
  z-index: 3;
  padding: 4px;
  background: #25232fef;
  border: 1px solid #81738e55;
  border-radius: 8px;
  box-shadow: 0 -8px 24px #0005;
}
.group-mentions > button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #beb6cf;
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}
.group-mentions > button[aria-selected="true"] {
  background: #b29bdc14;
  color: #e0d3f3;
}
.group-mentions .group-avatar {
  transform: scale(0.85);
}
.group-error {
  flex: none;
  margin: 0 10px 7px;
  padding: 6px 8px;
  border: 1px solid #bf857530;
  border-radius: 5px;
  background: #69443a1a;
  color: #c69e92;
  font-size: 10px;
  line-height: 1.6;
}
.group-error button {
  border: 0;
  background: transparent;
  padding: 0 0 0 4px;
  color: #b6a0d4;
  font: inherit;
  font-size: 10px;
  text-decoration: underline;
  cursor: pointer;
}
.group-reopen {
  position: absolute;
  left: 50%;
  bottom: var(--group-bottom, 116px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #79708055;
  border-radius: 9px;
  padding: 8px 11px;
  color: #b0a7bf;
  background: #211f2cef;
  box-shadow: 0 6px 20px #0004;
  font-size: 11px;
  cursor: pointer;
}
.group-reopen > .group-avatar {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}
.group-reopen > .group-avatar i {
  transform: scale(0.8);
}
.group-reopen > b {
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: #8d75c5;
  color: #fff;
  font-size: 8px;
  font-weight: 500;
}
.group-new-messages {
  align-self: center;
  margin: -4px 0 6px;
  padding: 4px 9px;
  border: 1px solid #ae94d12b;
  border-radius: 13px;
  background: #292437;
  color: #beaad8;
  font-size: 9px;
  cursor: pointer;
}
.group-delivery-state {
  display: block;
  text-align: right;
  margin-top: 4px;
  font-size: 9px;
  color: #81758e;
}
.group-delivery-retry {
  display: block;
  margin: 5px 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c4a09a;
  font: inherit;
  font-size: 9px;
  text-decoration: underline;
  cursor: pointer;
}
.team-group button:disabled {
  opacity: 0.4;
  cursor: wait;
}
@keyframes group-thinking {
  to {
    opacity: 0.25;
    transform: translateY(-2px);
  }
}
@media (max-width: 760px) {
  .office-panel.group-open {
    min-height: 650px;
  }
  .team-group {
    width: min(320px, 82vw);
    height: 320px;
    max-height: calc(100% - 155px);
    bottom: var(--group-bottom, 96px);
  }
  .group-header {
    padding: 11px 10px 9px;
  }
  .group-heading {
    gap: 7px;
  }
  .group-heading h2 {
    font-size: 12px;
  }
  .group-heading p {
    font-size: 9px;
    max-width: 137px;
  }
  .group-header-actions {
    gap: 8px;
  }
  .group-feed {
    padding: 11px 10px 4px;
  }
  .group-message {
    gap: 7px;
    margin-bottom: 12px;
  }
  .group-message-content {
    max-width: calc(100% - 29px);
  }
  .group-bubble {
    font-size: 12px;
    line-height: 1.65;
    padding: 7px 9px;
  }
  .group-message-content > header {
    gap: 5px;
  }
  .group-compose-area {
    padding: 7px 9px 7px;
  }
  .group-compose textarea {
    font-size: 12px;
  }
  .group-reopen {
    bottom: var(--group-bottom, 96px);
  }
}
@media (max-height: 650px) and (min-width: 761px) {
  .team-group {
    height: 310px;
    max-height: calc(100% - 115px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .group-typing i {
    animation: none;
  }
}
/* Actor-anchored previews are temporary. Manual reading keeps the ordinary group layout. */
.team-group.automatic { max-width: none; border-radius: 10px; background: #1e2029f3; }
.team-group.automatic .group-header { padding: 8px 9px 7px; }
.team-group.automatic .group-heading h2 { font-size: 12px; }
.team-group.automatic .group-heading p { max-width: 160px; font-size: 9px; }
.team-group.automatic .group-avatar-stack { width: 26px; height: 25px; transform: scale(.85); transform-origin: left center; margin-right: -3px; }
.team-group.automatic .group-header-actions { gap: 5px; }
.team-group.automatic .group-feed { padding: 9px 9px 3px; }
.team-group.automatic .group-message { margin-bottom: 10px; gap: 6px; }
.team-group.automatic .group-message > .group-avatar { width: 20px; height: 20px; border-radius: 7px; }
.team-group.automatic .group-message-content { max-width: calc(100% - 26px); }
.team-group.automatic .group-message-content > header { gap: 5px; margin-bottom: 4px; }
.team-group.automatic .group-bubble { padding: 6px 8px; font-size: 11px; line-height: 1.65; }
.team-group.automatic .group-key-hint { display: none; }
.team-group.automatic .group-compose-area { padding: 5px 8px 7px; }
.team-group.automatic .group-composer-top { margin-bottom: 4px; }
.team-group.automatic .group-compose textarea { min-height: 31px; font-size: 11px; padding: 6px 8px; }
.team-group.automatic .group-compose > button { height: 31px; font-size: 10px; padding: 0 10px; }
.group-full-history { flex: none; align-self: flex-end; border: 0; background: transparent; color: #9d91b7; font-size: 9px; margin: -1px 10px 5px; padding: 0; cursor: pointer; }
.group-message.is-speaking > .group-avatar { box-shadow: 0 0 0 1px #c0a1e388,0 0 12px #ae8ac21a; }
.group-message.is-speaking .group-message-content > header strong { color: #d6c3e7; }
@media(max-width:760px) {
  .office-panel.conversation-active { min-height: 650px; }
  .team-group.automatic .group-heading p { max-width: 133px; }
}
.group-status { display:flex;align-items:center;gap:5px;margin:0 0 9px;padding:2px 0;color:#7b798b;font-size:9px;line-height:1.5; }
.group-status>strong { color:#a39cab;font-weight:500;white-space:nowrap; }
.group-status>span { font-size:8px;white-space:nowrap;color:#84849b; }
.group-status>p { flex:1;min-width:0;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.group-status>time { color:#5f5c6e;font-size:8px;white-space:nowrap; }
.group-status[data-category="需要你"]>span { color:#c4a27a; }
.group-status[data-category="卡住"]>span { color:#ca908c; }
/* Readable conversation layout shared by automatic previews and the manual group. */
.team-group { width:430px;height:480px;max-width:calc(100% - 28px);max-height:calc(100% - 96px); }
.group-header { padding:13px 14px 11px; }
.group-heading h2 { font-size:14px; }
.group-heading p { font-size:11px;max-width:218px; }
.group-feed { padding:15px 14px 8px;min-height:110px;scroll-padding-top:12px; }
.group-message { gap:9px;margin-bottom:17px; }
.group-message-content { max-width:calc(100% - 32px); }
.group-message-content>header strong { font-size:12px; }
.group-message-content>header span,.group-message-content>header time { font-size:10px; }
.group-bubble { font-size:14px;line-height:1.75;padding:10px 12px;overflow:visible;max-height:none; }
.group-compose-area { padding:10px 12px 11px; }
.group-composer-top { margin-bottom:8px; }
.group-shortcuts button { font-size:11px; }
.group-compose textarea { min-height:38px;max-height:100px;font-size:13px;padding:9px 10px; }
.group-compose textarea::placeholder { font-size:12px; }
.group-compose>button { height:38px;font-size:12px;padding:0 15px; }
.group-key-hint { font-size:9px; }
.team-group.automatic { border-radius:12px; }
.team-group.automatic .group-header { padding:11px 12px 9px; }
.team-group.automatic .group-heading h2 { font-size:13px; }
.team-group.automatic .group-heading p { font-size:10px;max-width:200px; }
.team-group.automatic .group-avatar-stack { width:32px;height:30px;transform:none;margin:0; }
.team-group.automatic .group-feed { padding:12px 12px 5px;min-height:95px; }
.team-group.automatic .group-message { gap:8px;margin-bottom:15px; }
.team-group.automatic .group-message>.group-avatar { width:22px;height:22px;border-radius:8px; }
.team-group.automatic .group-message-content { max-width:calc(100% - 30px); }
.team-group.automatic .group-message-content>header { margin-bottom:6px;gap:6px; }
.team-group.automatic .group-bubble { padding:9px 10px;font-size:13px;line-height:1.75;max-height:none;overflow:visible; }
.team-group.automatic .group-compose-area { padding:8px 10px 10px; }
.team-group.automatic .group-composer-top { margin-bottom:7px; }
.team-group.automatic .group-compose textarea { min-height:36px;height:36px;max-height:100px;padding:8px 9px;font-size:12px;resize:vertical; }
.team-group.automatic .group-compose>button { height:36px;font-size:11px;padding:0 12px; }
.group-full-history { margin:3px 12px 7px;font-size:10px; }
@media(max-width:760px) {
 .team-group { width:min(350px,calc(100% - 24px));height:400px;max-height:calc(100% - 100px); }
 .group-heading p { max-width:160px; }
 .group-header { padding:12px; }
 .group-feed { padding:13px 12px 6px;min-height:95px; }
 .group-bubble { font-size:13px;line-height:1.75;padding:9px 10px; }
 .group-compose textarea { font-size:13px;min-height:38px; }
 .team-group.automatic .group-header { padding:9px 10px 8px; }
 .team-group.automatic .group-feed { padding:10px 10px 4px;min-height:90px; }
 .team-group.automatic .group-heading p { max-width:157px; }
 .team-group.automatic .group-bubble { font-size:12px;line-height:1.7;padding:8px 9px; }
 .team-group.automatic .group-message { margin-bottom:13px;gap:7px; }
 .team-group.automatic .group-message-content { max-width:calc(100% - 29px); }
}
.group-feed { min-height:80px; }
.group-compose textarea { max-height:80px; }
.team-group.automatic .group-compose textarea { height:36px;max-height:36px;resize:none; }
@media(max-width:760px) {
  body:has(.office-panel.conversation-active) #hud-left,
  body:has(.office-panel.conversation-active) .control-panel,
  body:has(.office-panel.conversation-active) .scene-activity,
  body:has(.office-panel.group-open) #hud-left,
  body:has(.office-panel.group-open) .control-panel,
  body:has(.office-panel.group-open) .scene-activity { visibility:hidden;pointer-events:none; }
}
@media(max-width:760px) {
 body:has(.office-panel.conversation-active) #team-panel,
 body:has(.office-panel.conversation-active) .task-identity,
 body:has(.office-panel.conversation-active) .zoom-tools,
 body:has(.office-panel.group-open) #team-panel,
 body:has(.office-panel.group-open) .task-identity,
 body:has(.office-panel.group-open) .zoom-tools { visibility:hidden;pointer-events:none; }
}
.group-chat-layer,.group-chat-layer * { box-sizing:border-box; }
.group-chat-layer [hidden] { display:none!important; }
/* Plain conversation window: small message avatars and text, with unobtrusive controls. */
.team-group .group-header,.team-group.automatic .group-header { height:0;min-height:0;padding:0;border:0; }
.team-group .group-heading { display:none; }
.team-group .group-header-actions { position:absolute;right:10px;top:9px;z-index:3;gap:8px; }
.team-group .group-feed { padding-top:35px; }
.team-group.automatic .group-header-actions .group-member-stack { display:none; }
.team-group.automatic .group-feed { padding-top:14px; }
.team-group.automatic .group-composer-top { display:none; }
.team-group.automatic .group-compose-area { padding-top:7px; }
@media(max-width:760px) {
 .team-group .group-feed { padding-top:33px; }
 .team-group.automatic .group-feed { padding-top:14px; }
}
