.app-shell {
  grid-template-columns: 17rem minmax(0, 1fr);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 4.8rem minmax(0, 1fr);
}

.app-shell,
.sidebar,
.workspace {
  transition: grid-template-columns 0.22s ease, width 0.22s ease, padding 0.22s ease;
}

.sidebar-collapsed .sidebar {
  min-width: 0;
}

.sidebar-collapsed .sidebar-head {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.55rem 0.7rem;
}

.sidebar-collapsed .brand {
  grid-template-columns: 1fr;
  justify-items: center;
}

.sidebar-collapsed .brand > div:not(.brand-mark),
.sidebar-collapsed .model-tabs,
.sidebar-collapsed .search-box,
.sidebar-collapsed .model-list,
.sidebar-collapsed .user-meta,
.sidebar-collapsed .sidebar-footer-btns {
  display: none;
}

.sidebar-collapsed .brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  font-size: 1rem;
}

.sidebar-collapsed .collapse-btn {
  width: 2.15rem;
  height: 2.15rem;
  font-size: 1.35rem;
  transform: none;
}

.sidebar-collapsed .collapse-btn:hover {
  transform: none;
}

.sidebar-collapsed .user-panel {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0.72rem 0.55rem;
}

.sidebar-collapsed .avatar {
  width: 2.25rem;
  height: 2.25rem;
}

.workspace {
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  padding: 1rem 1rem 1rem;
}

.top-actions {
  inset: 1.35rem 1.35rem auto 1.2rem;
}

.history-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.075);
  color: var(--muted);
  padding: 0.62rem 1.15rem;
  cursor: pointer;
}

.tip-btn[hidden],
.history-btn[hidden],
.grid-btn[hidden],
.answer-card[hidden] {
  display: none !important;
}

.tip-btn {
  display: inline-grid;
}

.hero-panel {
  min-height: 0;
  padding: 1rem 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  overflow: hidden;
}

.multi-hero {
  width: min(56rem, 78vw);
  animation: heroIn 0.5s ease both;
}

.hero-head {
  display: flex;
  align-items: center;
  gap: 1.65rem;
  margin-bottom: 1.2rem;
}

.multi-mark {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 181, 0, 0.32);
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 0 28px rgba(247, 181, 0, 0.1);
}

.hero-head h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.1;
}

.hero-head h1 span {
  color: var(--gold);
}

.hero-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.025);
  padding: 1.35rem 1.5rem;
}

.feature-icon {
  width: 3.55rem;
  height: 3.55rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  background: rgba(0, 216, 232, 0.12);
  color: var(--cyan);
}

.feature-card:nth-child(2) .feature-icon {
  background: rgba(126, 92, 255, 0.16);
  color: #9b72ff;
}

.feature-card:nth-child(4) .feature-icon {
  background: rgba(255, 92, 150, 0.16);
  color: #ff6ea8;
}

.feature-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.feature-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.model-hero.compact {
  width: min(34rem, 70vw);
}

.work-panel {
  z-index: 4;
  width: 100%;
  padding: 0 1.4rem 1.4rem;
  flex-shrink: 1;
}

.quick-start {
  width: min(58rem, calc(100vw - 30rem));
  display: grid;
  gap: 0.72rem;
  margin-bottom: -0.15rem;
}

.quick-title {
  color: var(--muted);
  font-size: 0.9rem;
}

.quick-title::before {
  content: "✦";
  color: var(--gold);
  margin-right: 0.45rem;
}

.quick-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.quick-card {
  height: 3.85rem;
  border-radius: 1rem 1rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.028);
  color: rgba(141, 154, 166, 0.28);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.composer {
  min-height: 8rem;
  border-radius: 1.1rem;
  background: rgba(24, 28, 37, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
}

.asset-strip {
  padding: 1.28rem 1.25rem 0;
}

.upload-chip {
  display: inline-flex;
  align-items: center;
  height: 2.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(247, 181, 0, 0.35);
  background: rgba(247, 181, 0, 0.08);
  color: #ffd84a;
  padding: 0 1rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.asset-pill {
  width: 2.35rem;
  height: 2.35rem;
}

.composer textarea {
  min-height: 5.8rem;
  padding: 1rem 1.3rem;
  font-size: 0.98rem;
}

.composer-footer {
  padding: 0.75rem 1.25rem 1rem;
  position: relative;
}

.send-btn {
  position: absolute;
  right: 1.1rem;
  bottom: 0.92rem;
  width: 2.35rem;
  height: 2.35rem;
}

.select-chip {
  min-width: 7.4rem;
  height: 2.25rem;
  font-size: 0.82rem;
}

.answer-card {
  position: absolute;
  right: 1.05rem;
  bottom: 1.75rem;
  width: 18.6rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(21, 25, 34, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem 0.95rem;
  z-index: 6;
}

.answer-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 2rem;
  color: #dce9f3;
  font-size: 0.88rem;
}

.answer-icons {
  display: flex;
  justify-content: flex-end;
}

.answer-icons i {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--c);
  margin-left: -0.35rem;
  border: 2px solid rgba(21, 25, 34, 0.96);
}

.answer-row b,
.answer-row strong {
  border-radius: 0.38rem;
  background: rgba(0, 216, 232, 0.12);
  color: var(--cyan);
  padding: 0.25rem 0.5rem;
  font-size: 0.74rem;
}

.answer-row strong {
  background: rgba(247, 181, 0, 0.16);
  color: #ffd52e;
}

.floating-actions {
  display: none;
}

.score {
  color: #00f6ff;
  background: rgba(0, 216, 232, 0.13);
  border: 1px solid rgba(0, 216, 232, 0.36);
}

.score.warn {
  color: #ffb34d;
  background: rgba(255, 130, 28, 0.12);
  border-color: rgba(255, 130, 28, 0.45);
}

.score.bad {
  color: #c888ff;
  background: rgba(154, 78, 255, 0.14);
  border-color: rgba(154, 78, 255, 0.42);
}

.audio-panel {
  width: min(42rem, 72vw);
  border: 1px solid var(--line-strong);
  background: rgba(18, 21, 28, 0.82);
  border-radius: 0.75rem;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar-collapsed .sidebar-head {
    grid-template-columns: 1fr;
    justify-items: stretch;
    padding: 0.95rem 1rem 0.7rem;
  }

  .sidebar-collapsed .brand {
    grid-template-columns: 2.5rem 1fr;
    justify-items: stretch;
  }

  .sidebar-collapsed .brand > div:not(.brand-mark) {
    display: block;
  }

  .sidebar-collapsed .model-tabs {
    display: flex;
  }

  .sidebar-collapsed .search-box,
  .sidebar-collapsed .model-list,
  .sidebar-collapsed .user-meta,
  .sidebar-collapsed .sidebar-footer-btns {
    display: grid;
  }

  .workspace {
    display: block;
    overflow: visible;
    padding: 0.9rem 0.75rem 1.2rem;
  }

  .top-actions {
    position: static;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
  }

  .hero-panel {
    padding: 0.65rem 0 0.9rem;
  }

  .multi-hero,
  .model-hero.compact {
    width: 100%;
  }

  .hero-head {
    gap: 1rem;
    margin-bottom: 0.9rem;
  }

  .multi-mark {
    width: 3.7rem;
    height: 3.7rem;
    font-size: 1.5rem;
  }

  .hero-head h1 {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .feature-card {
    grid-template-columns: 2.7rem 1fr;
    min-height: 4.6rem;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .feature-icon {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.1rem;
  }

  .feature-card strong {
    font-size: 0.95rem;
    margin-bottom: 0.16rem;
  }

  .feature-card span {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .work-panel {
    display: grid;
    gap: 0.8rem;
    align-self: start;
    justify-items: stretch;
  }

  .quick-start {
    width: 100%;
    margin-bottom: -0.1rem;
    gap: 0.55rem;
  }

  .quick-title {
    font-size: 0.82rem;
  }

  .quick-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .quick-card {
    height: 3.6rem;
    font-size: 0.86rem;
  }

  .composer {
    width: 100%;
    min-height: 11.4rem;
  }

  .composer textarea {
    min-height: 4.75rem;
    padding: 0.9rem 1rem;
  }

  .composer-footer {
    display: flex;
    flex-wrap: wrap;
    padding-right: 4.2rem;
  }

  .select-chip {
    min-width: auto;
    height: 2.15rem;
    padding: 0 0.75rem;
  }

  .answer-card {
    position: static;
    width: 100%;
    margin-top: 0.85rem;
  }

  .audio-panel {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .top-actions {
    margin-bottom: 0.65rem;
  }

  .hero-panel {
    padding-top: 0.35rem;
  }

  .hero-head {
    align-items: flex-start;
  }

  .multi-mark {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
  }

  .hero-head h1 {
    font-size: clamp(1.35rem, 7vw, 1.8rem);
  }

  .hero-head p {
    font-size: 0.82rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 4.2rem;
  }

  .quick-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-card {
    height: 3.1rem;
  }

  .asset-strip {
    padding: 1rem 0.9rem 0;
  }

  .upload-chip {
    height: 2.1rem;
    padding: 0 0.8rem;
  }

  .asset-pill {
    width: 2.1rem;
    height: 2.1rem;
  }

  .composer {
    min-height: 10.8rem;
  }

  .composer textarea {
    min-height: 4.2rem;
  }

  .composer-footer {
    gap: 0.4rem;
    padding: 0.65rem 3.7rem 0.85rem 0.9rem;
  }

  .select-chip {
    height: 2rem;
    font-size: 0.76rem;
  }

  .send-btn {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}

/* Minimal enterprise workspace theme */
.workspace {
  background: transparent;
}

.history-btn,
.tip-btn,
.grid-btn {
  background: rgba(255, 255, 255, 0.82);
  color: #4f4664;
  border-color: rgba(98, 43, 226, 0.12);
  box-shadow: 0 10px 28px rgba(45, 28, 90, 0.06);
}

.multi-mark {
  border-color: rgba(109, 40, 242, 0.22);
  color: #6d28f2;
  background: #fff;
  box-shadow: 0 14px 36px rgba(109, 40, 242, 0.12);
}

.hero-head h1,
.feature-card strong,
.quick-card {
  color: #171422;
}

.hero-head h1 span {
  color: #6d28f2;
}

.feature-card {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(98, 43, 226, 0.12);
  box-shadow: 0 16px 46px rgba(45, 28, 90, 0.07);
}

.feature-icon,
.feature-card:nth-child(2) .feature-icon,
.feature-card:nth-child(4) .feature-icon {
  color: #6d28f2;
  background: rgba(109, 40, 242, 0.09);
}

.quick-title {
  color: #6d28f2;
}

.quick-title::before {
  color: #6d28f2;
}

.quick-card {
  color: rgba(23, 20, 34, 0.38);
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(98, 43, 226, 0.1);
}

.composer {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(98, 43, 226, 0.13);
  box-shadow: 0 24px 70px rgba(45, 28, 90, 0.12);
}

.composer::before {
  background: linear-gradient(90deg, transparent, rgba(109, 40, 242, 0.1), transparent);
}

.composer textarea {
  color: #171422;
}

.upload-chip {
  color: #6d28f2;
  background: rgba(109, 40, 242, 0.08);
  border-color: rgba(109, 40, 242, 0.2);
}

.asset-pill {
  color: #6d28f2;
  background: rgba(109, 40, 242, 0.08);
  border-color: rgba(109, 40, 242, 0.16);
}

.select-chip {
  color: #4f4664;
  background: #f6f2ff;
  border: 1px solid rgba(98, 43, 226, 0.1);
}

.answer-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(98, 43, 226, 0.12);
}

.answer-row {
  color: #171422;
}

.answer-row b,
.answer-row strong {
  background: rgba(109, 40, 242, 0.09);
  color: #6d28f2;
}

.score,
.score.warn,
.score.bad {
  color: #6d28f2;
  background: rgba(109, 40, 242, 0.08);
  border-color: rgba(109, 40, 242, 0.16);
}

.audio-panel {
  background: rgba(255, 255, 255, 0.82);
  color: #6f6a7c;
  border-color: rgba(98, 43, 226, 0.12);
}

.simple-chat-box {
  width: min(96rem, 100%);
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 26px;
  border: 1px solid rgba(98, 43, 226, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 54px rgba(45, 28, 90, 0.1);
}

#openWorks {
  display: none !important;
}

.simple-chat-box input {
  min-width: 0;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #171422;
  font-size: 18px;
}

.simple-chat-box input::placeholder {
  color: #8a8398;
}

.simple-send-btn {
  min-width: 112px;
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(109, 40, 242, 0.22);
}

@media (max-width: 900px) {
  .work-panel {
    padding: 0 0 1rem;
  }

  .simple-chat-box {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .simple-chat-box {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .simple-send-btn {
    width: 100%;
  }
}

/* ============================================================
   智能体聊天（chatbot）
   ============================================================ */
body[data-section="agents"] .top-actions,
body[data-section="agents"] #heroPanel,
body[data-section="agents"] #answerCard,
body[data-section="agents"] .model-tabs,
body[data-section="agents"] .search-box,
body[data-section="agents"] #modelList,
body[data-section="inspire"] .top-actions,
body[data-section="inspire"] #heroPanel,
body[data-section="inspire"] #answerCard,
body[data-section="inspire"] .model-tabs,
body[data-section="inspire"] .search-box,
body[data-section="inspire"] #modelList {
  display: none !important;
}

.cb-shell {
  display: grid;
  grid-template-columns: 288px 1fr;
  gap: 16px;
  height: 100%;
  min-height: 560px;
  color: var(--text);
}

.cb-side {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.cb-side-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.cb-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 82px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}
.cb-new-btn:hover {
  border-color: rgba(0, 216, 232, 0.45);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 216, 232, 0.2) inset;
}

.cb-agents {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.cb-agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.cb-agent-chip.active {
  border-color: var(--cyan);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 216, 232, 0.35) inset;
}

.cb-sessions {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.cb-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid transparent;
}
.cb-session:hover {
  background: var(--panel-2);
}
.cb-session.active {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}
.cb-session-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.cb-session-del {
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 13px;
  opacity: 0;
}
.cb-session:hover .cb-session-del {
  opacity: 1;
}
.cb-session-del:hover {
  color: var(--red);
}

.cb-side-foot {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--dim);
}

.cb-main {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.cb-main-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.cb-main-title {
  font-weight: 800;
  font-size: 15px;
}
.cb-main-sub {
  color: var(--muted);
  font-size: 12px;
}

.cb-main-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cb-empty,
.cb-notice {
  margin: auto;
  text-align: center;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.8;
}
.cb-empty h3 {
  color: var(--text);
  margin: 0 0 8px;
}
.cb-link {
  color: var(--cyan);
  cursor: pointer;
  text-decoration: underline;
}

.cb-msg {
  display: flex;
  gap: 10px;
  max-width: 82%;
}
.cb-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--panel-3);
}
.cb-msg-body {
  padding: 11px 14px;
  border-radius: 12px;
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.cb-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.cb-msg.user .cb-msg-body {
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
}
.cb-msg.user .cb-msg-avatar {
  background: #6d28f2;
}
.cb-msg.ai .cb-msg-body {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}
.cb-msg.ai .cb-msg-avatar {
  background: rgba(0, 216, 232, 0.16);
}
.cb-cursor::after {
  content: "▋";
  color: var(--cyan);
  animation: cb-blink 1s steps(2) infinite;
}
@keyframes cb-blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

.cb-composer {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
}
.cb-composer-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cb-model-select {
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  max-width: 260px;
}
.cb-composer-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.cb-input {
  flex: 1;
  resize: none;
  min-height: 46px;
  max-height: 160px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
}
.cb-input:focus {
  outline: none;
  border-color: var(--cyan);
}
.cb-send {
  min-width: 84px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #6d28f2, #8b5cf6);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.cb-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 上传图片：加号按钮 */
.cb-plus {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cb-plus:hover {
  border-style: solid;
  border-color: var(--cyan);
  color: var(--cyan);
}

/* 上传图片：待发送预览 */
.cb-attachments {
  display: none;
}
.cb-attachments.has-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 0;
}
.cb-attach {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.cb-attach img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cb-attach-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cb-attach-del:hover {
  background: var(--red, #ff4d6a);
}

/* 消息内容容器（文本 + 图片） */
.cb-msg-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.cb-msg.user .cb-msg-content {
  align-items: flex-end;
}
.cb-msg-time {
  font-size: 11px;
  color: var(--muted, #8a99a8);
  opacity: 0.7;
  margin-top: 2px;
  padding: 0 4px;
  user-select: none;
}
.cb-msg.user .cb-msg-time {
  text-align: right;
}
.cb-msg-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cb-msg-imgs img {
  max-width: 230px;
  max-height: 240px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

/* 智能体对话：占满整个工作区，布局更大气 */
body[data-section="agents"] .workspace {
  grid-template-rows: 1fr;
  padding: 1rem 1.25rem 1.1rem;
}
body[data-section="agents"] .work-panel {
  align-self: stretch;
  justify-items: stretch;
  padding: 0;
  min-height: 0;
  height: 100%;
  width: 100%;
}

/* 大模型页：选中模型后进入对话，主区占满 */
body[data-section="models"][data-chat="1"] #heroPanel,
body[data-section="models"][data-chat="1"] #answerCard {
  display: none !important;
}
body[data-section="models"][data-chat="1"] .workspace {
  grid-template-rows: 1fr;
  padding: 1rem 1.25rem 1.1rem;
}
body[data-section="models"][data-chat="1"] .work-panel {
  align-self: stretch;
  justify-items: stretch;
  padding: 0;
  min-height: 0;
  height: 100%;
  width: 100%;
}
.cb-model-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.cb-model-chat .cb-main-head {
  flex-shrink: 0;
}
.cb-model-chat .cb-messages {
  flex: 1;
  min-height: 0;
}

/* 工作区历史弹窗 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2, #12182b);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.15s;
}
.history-item:hover {
  border-color: var(--cyan, #22d3ee);
  transform: translateY(-1px);
}
.history-item-title {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-item-go {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.history-empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 0;
}

@media (max-width: 820px) {
  .cb-shell {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cb-side {
    height: auto;
    max-height: 220px;
  }
  .cb-main {
    height: 70vh;
  }
  body[data-section="agents"] .workspace {
    grid-template-rows: auto 1fr;
  }
  body[data-section="agents"] .work-panel {
    height: auto;
  }
  body[data-section="agents"] .cb-shell {
    height: auto;
  }
  body[data-section="models"][data-chat="1"] .workspace {
    grid-template-rows: 1fr;
  }
  body[data-section="models"][data-chat="1"] .work-panel {
    height: 72vh;
  }
}
