:root {
  --bg: #09111f;
  --panel: rgba(13, 20, 35, 0.88);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(177, 193, 227, 0.12);
  --line-strong: rgba(231, 182, 112, 0.24);
  --text: #eef3ff;
  --muted: #99a6c6;
  --warm: #d88b44;
  --warm-soft: #f4c899;
  --cool: #5ec7d4;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --avatar-sky-a: #4f88c8;
  --avatar-sky-b: #76d6e6;
  --avatar-gold-a: #af7b31;
  --avatar-gold-b: #f3c869;
  --avatar-amber-a: #bb6d41;
  --avatar-amber-b: #f0b77b;
  --avatar-rose-a: #a76171;
  --avatar-rose-b: #f1b8c7;
  --avatar-teal-a: #2f7b7d;
  --avatar-teal-b: #74d2be;
  --avatar-violet-a: #685d93;
  --avatar-violet-b: #b5a8db;
  --avatar-emerald-a: #1f8e63;
  --avatar-emerald-b: #7fe0a8;
  --avatar-coral-a: #bc6a54;
  --avatar-coral-b: #f2a08d;
  --avatar-slate-a: #53667f;
  --avatar-slate-b: #9cb0c8;
}

body.theme-light {
  --bg: #ede4d7;
  --panel: rgba(255, 251, 244, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(94, 71, 39, 0.12);
  --line-strong: rgba(184, 126, 62, 0.24);
  --text: #1f160f;
  --muted: #6f5f4f;
  --warm: #a95b1f;
  --warm-soft: #925321;
  --cool: #0a7f8e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: 16px;
  background:
    radial-gradient(circle at top center, rgba(216, 139, 68, 0.12), transparent 26%),
    linear-gradient(180deg, #08101d 0%, #0a1321 38%, #09111f 100%);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Noto Sans SC", "PingFang SC", sans-serif;
}

body.app-initializing {
  visibility: hidden;
}

body.theme-light {
  background:
    radial-gradient(circle at top center, rgba(216, 139, 68, 0.1), transparent 26%),
    linear-gradient(180deg, #f6f0e7 0%, #efe6d8 42%, #e8dece 100%);
}

.backdrop-orbit {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.55;
}

.orbit-a {
  top: -120px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: rgba(216, 139, 68, 0.2);
}

.orbit-b {
  top: 120px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: rgba(94, 199, 212, 0.12);
}

.panel {
  backdrop-filter: blur(24px);
  background: linear-gradient(180deg, rgba(14, 23, 41, 0.9), rgba(10, 17, 31, 0.94));
  border: 1px solid var(--line);
  position: relative;
  overflow: visible;
  box-shadow: var(--shadow);
}

body.theme-light .panel {
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(244, 235, 220, 0.94));
  border-color: rgba(169, 121, 65, 0.14);
  box-shadow: 0 28px 72px rgba(121, 95, 58, 0.14);
}

body.theme-light .brand-block,
body.theme-light .stage-header,
body.theme-light .side-title-row {
  border-color: rgba(169, 121, 65, 0.12);
}

body.theme-light .button-badge,
body.theme-light .ghost-link,
body.theme-light .ghost-action,
body.theme-light .compact-switch,
body.theme-light .settings-row,
body.theme-light .topic-card,
body.theme-light .people-config-card,
body.theme-light .memory-card,
body.theme-light .library-card,
body.theme-light .picker-card,
body.theme-light .seat-card,
body.theme-light .profile-card,
body.theme-light .speaker-spotlight,
body.theme-light .chat-bubble,
body.theme-light .attachment-pill {
  border-color: rgba(169, 121, 65, 0.12);
  background: rgba(255, 252, 247, 0.72);
  color: var(--text);
}

body.theme-light .chat-item.system .chat-bubble {
  background: linear-gradient(180deg, rgba(10, 127, 142, 0.07), rgba(255, 252, 247, 0.9));
  border-color: rgba(10, 127, 142, 0.16);
}

body.theme-light .chat-item.user .chat-bubble {
  background: linear-gradient(180deg, rgba(169, 121, 65, 0.09), rgba(255, 252, 247, 0.88));
  border-color: rgba(169, 121, 65, 0.16);
}

body.theme-light .roundtable-filter-field select,
body.theme-light select.round-input,
body.theme-light .seat-assignment-select,
body.theme-light .seat-order-select,
body.theme-light .seat-model-select,
body.theme-light .seat-readaloud-voice-select,
body.theme-light .seat-assignment-static {
  border-color: rgba(169, 121, 65, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.96), rgba(245, 237, 226, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23925321' d='M3.1 5.1 7 9l3.9-3.9.9.9L7 10.9 2.2 6z'/%3E%3C/svg%3E") no-repeat right 10px center,
    #fbf6ef;
  color: #2f2418;
}

body.theme-light .roundtable-filter-field select option,
body.theme-light select.round-input option,
body.theme-light .seat-assignment-select option,
body.theme-light .seat-order-select option,
body.theme-light .seat-model-select option,
body.theme-light .seat-readaloud-voice-select option {
  background: #fbf6ef;
  color: #2f2418;
}

body.theme-light .memory-card-head,
body.theme-light .memory-card-body,
body.theme-light .evidence-detail-surface,
body.theme-light .evidence-detail-panel img,
body.theme-light .evidence-detail-video {
  border-color: rgba(169, 121, 65, 0.12);
  background: rgba(255, 252, 247, 0.74);
}

h1,
h2,
h3,
p,
strong {
  margin: 0;
}

h1,
h2,
h3,
strong {
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.speaker-avatar.is-speaking::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 14px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(244, 200, 153, 0.95), rgba(244, 200, 153, 0.25)) 0 100% / 2px 40% no-repeat,
    linear-gradient(180deg, rgba(244, 200, 153, 0.95), rgba(244, 200, 153, 0.25)) 4px 100% / 2px 75% no-repeat,
    linear-gradient(180deg, rgba(244, 200, 153, 0.95), rgba(244, 200, 153, 0.25)) 8px 100% / 2px 55% no-repeat,
    linear-gradient(180deg, rgba(244, 200, 153, 0.95), rgba(244, 200, 153, 0.25)) 12px 100% / 2px 90% no-repeat;
  animation: speaker-wave-bars 820ms ease-in-out infinite;
}

.speaking-wave {
  display: inline-flex;
  visibility: hidden;
  align-items: end;
  gap: 3px;
  margin-left: 4px;
  height: 16px;
}

.speaking-wave i {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4c899, rgba(244, 200, 153, 0.28));
  transform-origin: center bottom;
  animation: speaking-wave-bars 900ms ease-in-out infinite;
}

.speaking-wave i:nth-child(2) {
  animation-delay: 90ms;
}

.speaking-wave i:nth-child(3) {
  animation-delay: 180ms;
}

.speaking-wave i:nth-child(4) {
  animation-delay: 270ms;
}

.chat-item.chat-item-reading .speaking-wave {
  visibility: visible;
}

@keyframes speaking-wave-bars {
  0%, 100% {
    transform: scaleY(0.35);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes speaker-wave-bars {
  0%, 100% {
    opacity: 0.45;
    transform: translateY(-50%) scaleY(0.78);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scaleY(1.08);
  }
}

.section-label,
.topic-tag,
.seat-role,
.settings-label,
.field-note,
.modal-subtext,
.profile-meta,
.source-tag {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-soft);
}

.app-frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 18px;
  width: min(1600px, 100%);
  margin: 0 auto;
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.sidebar-left,
.sidebar-right,
.center-stage {
  border-radius: var(--radius-xl);
}

.sidebar-left,
.sidebar-right {
  padding: 22px;
  overflow: auto;
  min-height: 0;
}

.center-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
  min-height: 0;
  overflow: hidden;
}

.brand-block {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.brand-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.brand-topline {
  flex-wrap: nowrap;
  align-items: center;
}

.brand-topline .icon-button {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: flex-start;
}

.brand-topline,
.side-title-row,
.stage-header,
.header-pills,
.composer-actions,
.inline-actions,
.drawer-header,
.modal-header,
.header-actions,
.seat-chip-row,
.role-card-head,
.role-card-footer,
.stats-strip,
.tab-row,
.settings-row,
.preset-chips,
.profile-actions,
.message-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.brand-topline {
  position: relative;
  display: block;
  min-height: 34px;
  padding-right: 48px;
}
.brand-topline .icon-button {
  position: absolute;
  top: 0;
  right: 0;
  margin-left: 0;
}

.brand-topline,
.side-title-row,
.stage-header,
.drawer-header,
.modal-header,
.settings-row,
.role-card-head,
.profile-actions,
.seat-chip-row {
  justify-content: space-between;
  align-items: flex-start;
}

.brand-cn {
  margin: 0;
  color: var(--warm-soft);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.08;
}

.brand-en {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.1;
  text-transform: uppercase;
}

body.app-lang-zh .brand-en {
  display: none;
}

body.app-lang-en .brand-cn {
  display: none;
}

body.app-lang-en .brand-copy {
  gap: 0;
}

body.app-lang-en .brand-en {
  color: var(--warm-soft);
  font-size: 19px;
  letter-spacing: 0.1em;
  line-height: 1.02;
}

body.app-lang-en .brand-block {
  padding-bottom: 10px;
}

body.app-lang-en .icon-button {
  margin-top: 0;
}

.icon-button,
.tab-pill,
.chip-button,
.settings-row,
.ghost-link,
.ghost-action,
.action-primary,
.compact-switch,
.seat-delete,
.card-action,
.profile-action,
.button-badge {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 16px;
}

.ghost-link,
.ghost-action,
.card-action,
.profile-action {
  color: var(--cool);
}

.action-primary {
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d48343, #f0b06b);
  color: #16110c;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(216, 139, 68, 0.22);
}

.action-secondary {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
}

.action-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compact-primary {
  padding: 9px 14px;
  font-size: 13px;
}

.full-width {
  width: 100%;
  margin-top: 18px;
}

.side-section {
  margin-top: 22px;
}

.sticky-top {
  margin-top: 0;
}

.stage-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.stage-header h2 {
  margin-top: 8px;
  font-size: clamp(28px, 3vw, 40px);
  max-width: 15em;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tiny-badge,
.tab-pill,
.chip-button,
.card-source,
.card-favorite,
.seat-star,
.profile-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.tiny-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tiny-badge.warm {
  background: rgba(216, 139, 68, 0.12);
  border-color: rgba(216, 139, 68, 0.2);
  color: var(--warm-soft);
}

.button-badge {
  background: rgba(255, 255, 255, 0.05);
}

.topic-card,
.people-config-card,
.composer-box,
.speaker-spotlight,
.compact-switch,
.seat-card,
.library-card,
.picker-card,
.profile-card,
.role-editor,
.settings-form,
.settings-subsection {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: var(--radius-lg);
}

.topic-card,
.people-config-card,
.compact-switch,
.seat-card,
.library-card,
.picker-card,
.profile-card,
.role-editor,
.settings-subsection {
  padding: 14px;
}

.library-card,
.picker-card {
  padding: 10px;
}

.topic-list,
.seat-stack,
.profile-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.topic-card.active {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(216, 139, 68, 0.12), rgba(255, 255, 255, 0.04));
}

.topic-card {
  cursor: pointer;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  max-height: min(420px, 58vh);
  min-height: 0;
  overflow: hidden;
}

.topic-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-card p {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.topic-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.danger-link {
  color: #f29b9b;
}

.hidden-topic {
  display: none;
}

.topic-list.expanded .hidden-topic {
  display: block;
}

.compact-link {
  font-size: 12px;
}

.seat-inline-toggle,
.seat-voice-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
}

.seat-secondary-actions {
  align-items: center;
}

.seat-secondary-actions .seat-voice-toggle {
  margin-left: auto;
}

.seat-ai-row {
  align-items: center;
  margin-top: 10px;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.seat-ai-row .seat-inline-toggle {
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}

.seat-library-row,
.seat-control-row {
  flex-wrap: nowrap;
  gap: 20px;
  margin-top: 10px;
  font-size: 13px;
}

.seat-control-row .action-primary,
.seat-control-row .action-secondary {
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 8px;
  box-shadow: none;
}

.seat-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: 999px;
}

.seat-toggle-label {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.seat-ai-row .seat-toggle-label {
  font-size: 12px;
}

.seat-toggle-track {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 160ms ease;
}

.seat-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f6f8ff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease;
}

.seat-inline-toggle.is-on {
  border-color: rgba(94, 199, 212, 0.28);
}

.seat-inline-toggle.is-on .seat-toggle-track {
  background: linear-gradient(135deg, #46a8d9, #79d6e4);
}

.seat-inline-toggle.is-on .seat-toggle-track::after {
  transform: translateX(12px);
}

.seat-voice-toggle {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0;
  position: relative;
  margin-left: 10px;
}

.seat-library-row .seat-voice-toggle {
  margin-left: auto;
}

.seat-voice-toggle svg {
  width: 19px;
  height: 19px;
}

.seat-voice-toggle::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 148, 148, 0.92);
  transform: rotate(-45deg);
  opacity: 0.95;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.24);
}

.seat-voice-toggle.is-on {
  color: var(--cool);
  border-color: rgba(94, 199, 212, 0.28);
  background: rgba(94, 199, 212, 0.1);
  box-shadow: 0 0 0 1px rgba(94, 199, 212, 0.1) inset;
}

.seat-voice-toggle.is-on::after {
  opacity: 0;
}

.seat-voice-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.seat-voice-line strong {
  color: var(--text);
  font-weight: 600;
}

.people-config-card h3 {
  margin-top: 6px;
  font-size: 18px;
}

.sidebar-shortcut-stack {
  display: grid;
  gap: 10px;
}

.sidebar-shortcut-button {
  width: 100%;
  justify-content: center;
}

.people-config-card p:last-child,
.topic-card p,
.library-card p,
.picker-card p,
.seat-card p,
.profile-card p,
.speaker-copy p,
.drawer-feedback,
.seat-feedback,
.field-note,
.modal-subtext {
  color: var(--muted);
  line-height: 1.5;
}

.chat-shell {
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.live-status-banner {
  display: none;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(231, 182, 112, 0.28);
  background: rgba(216, 139, 68, 0.08);
  color: var(--warm-soft);
  font-size: 14px;
  line-height: 1.45;
}

.live-status-banner.pending {
  border-color: rgba(94, 199, 212, 0.28);
  background: rgba(94, 199, 212, 0.08);
  color: var(--cool);
}

.live-status-banner.loading-dots::after,
#speaker-name.loading-dots::after {
  content: "......";
  display: inline-block;
  width: 3em;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
  animation: loading-dots 1.2s steps(7, end) infinite;
}

.live-status-banner.success {
  border-color: rgba(127, 224, 168, 0.28);
  background: rgba(127, 224, 168, 0.08);
  color: #98e8b6;
}

.discussion-status-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(94, 199, 212, 0.18);
  background:
    linear-gradient(180deg, rgba(94, 199, 212, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(8, 15, 29, 0.92);
}

.discussion-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.discussion-status-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.discussion-status-toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}

.discussion-status-toggle:hover {
  border-color: rgba(94, 199, 212, 0.35);
  color: var(--text);
}

.discussion-status-phase {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 200, 153, 0.18);
  background: rgba(216, 139, 68, 0.1);
  color: var(--warm-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discussion-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.discussion-status-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.discussion-status-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discussion-status-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.discussion-status-card p,
.discussion-status-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.discussion-status-summary {
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.discussion-status-detail {
  display: grid;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.discussion-status-detail-section {
  display: grid;
  gap: 6px;
}

.discussion-status-detail-title {
  color: var(--warm-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discussion-status-detail-copy,
.discussion-status-detail-list {
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
}

.discussion-status-detail-list {
  display: grid;
  gap: 6px;
}

body.theme-light .discussion-status-panel {
  border-color: rgba(10, 127, 142, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 127, 142, 0.05), rgba(255, 255, 255, 0.72)),
    rgba(255, 252, 247, 0.92);
}

body.theme-light .discussion-status-card,
body.theme-light .discussion-status-summary,
body.theme-light .discussion-status-detail {
  border-color: rgba(169, 121, 65, 0.12);
  background: rgba(255, 252, 247, 0.72);
}

body.theme-light .knowledge-summary-strip,
body.theme-light .knowledge-selection-panel,
body.theme-light .knowledge-editor-panel {
  border-color: rgba(169, 121, 65, 0.12);
  background: rgba(255, 252, 247, 0.7);
}

body.theme-light .discussion-status-phase {
  border-color: rgba(169, 121, 65, 0.18);
  background: rgba(169, 121, 65, 0.08);
  color: var(--warm-soft);
}

@keyframes loading-dots {
  0% {
    width: 0;
  }

  100% {
    width: 1.5em;
  }
}

.discussion-stream {
  grid-row: 2;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  padding-bottom: 16px;
  scroll-padding-top: 12px;
  display: grid;
  gap: 14px;
}

.discussion-stream.voice-reading-active {
  padding-bottom: 65vh;
}

.no-task-hint {
  color: var(--text-muted, #888);
  font-size: 0.85rem;
  text-align: center;
  padding: 48px 16px;
  opacity: 0.6;
}

.chat-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  scroll-margin-block: 12px;
}

.chat-item.chat-item-reading {
  position: relative;
}

.chat-item.chat-item-reading .chat-bubble {
  border-color: rgba(244, 200, 153, 0.62);
  box-shadow: 0 0 0 1px rgba(244, 200, 153, 0.2), 0 18px 36px rgba(0, 0, 0, 0.22);
  background: linear-gradient(180deg, rgba(244, 200, 153, 0.12), rgba(255, 255, 255, 0.03));
}

.avatar-badge,
.speaker-avatar,
.seat-avatar,
.library-avatar,
.picker-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-weight: 700;
  color: #fff7ed;
  background: linear-gradient(135deg, var(--avatar-a, var(--avatar-sky-a)), var(--avatar-b, var(--avatar-sky-b)));
}

.avatar-user {
  --avatar-a: #5d4a86;
  --avatar-b: #9d7bf0;
}

.avatar-system,
.speaker-avatar {
  --avatar-a: #365169;
  --avatar-b: #5ec7d4;
}

.chat-content {
  min-width: 0;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.chat-meta strong {
  font-size: 15px;
}

.chat-meta span {
  font-size: 12px;
  color: var(--muted);
}

.chat-assignment-badge {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

/* ── 每条讨论消息的朗读控制按钮（标题行右侧） ── */
.chat-msg-voice-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.chat-msg-voice-btns {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.chat-msg-voice-btns button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.chat-msg-voice-btns button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

/* 默认：播放键显示播放图标；暂停图标隐藏；停止键淡化不可点 */
.chat-msg-playpause .icon-pause { display: none; }
.chat-msg-stop { opacity: 0.3; pointer-events: none; }

/* 播放中：显示暂停图标（温暖色）；停止键可用 */
.chat-item-reading .chat-msg-playpause .icon-play  { display: none; }
.chat-item-reading .chat-msg-playpause .icon-pause { display: block; color: var(--warm-soft, #f5a623); }
.chat-item-reading .chat-msg-stop { opacity: 1; pointer-events: auto; }

/* 暂停中：显示播放图标（冷色）；停止键可用 */
.chat-item-voice-paused .chat-msg-playpause .icon-play  { display: block; color: var(--cool, #5ec7d4); }
.chat-item-voice-paused .chat-msg-playpause .icon-pause { display: none; }
.chat-item-voice-paused .chat-msg-stop { opacity: 1; pointer-events: auto; }

.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.chat-item.system .chat-bubble {
  background: linear-gradient(180deg, rgba(94, 199, 212, 0.06), rgba(255, 255, 255, 0.025));
  border-color: rgba(94, 199, 212, 0.2);
}

.chat-item.user .chat-bubble {
  background: linear-gradient(180deg, rgba(157, 123, 240, 0.12), rgba(255, 255, 255, 0.025));
  border-color: rgba(157, 123, 240, 0.22);
}

.chat-bubble p {
  margin: 0 0 0.75em 0;
  line-height: 1.82;
  text-indent: 2em;
}

.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--muted);
}

.compact-composer {
  grid-row: 3;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(9, 17, 31, 0), rgba(9, 17, 31, 0.9) 26%, rgba(9, 17, 31, 0.98) 100%);
  backdrop-filter: blur(12px);
}

.composer-box {
  padding: 10px 12px;
}

#user-input {
  min-height: 36px;
}

.attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.memory-agent-stack {
  display: grid;
  gap: 12px;
}

.roundtable-workbench-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 0.54fr) minmax(520px, 1.46fr);
  gap: 10px;
}

.knowledge-workspace-grid {
  min-height: 0;
  height: 100%;
}

.roundtable-workbench-column {
  min-height: 0;
  height: 100%;
  display: grid;
  gap: 0;
  align-content: stretch;
  overflow: hidden;
}

.roundtable-workbench-column .memory-card {
  height: 100%;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.roundtable-workbench-column .memory-card.knowledge-list-card {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.roundtable-workbench-column .memory-card.knowledge-detail-card {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.knowledge-selection-panel,
.knowledge-editor-panel {
  flex: 0 0 auto;
  height: auto;
  overflow: hidden;
}

.knowledge-detail {
  min-height: 0;
  overflow: hidden;
}

.roundtable-workbench-column .memory-card-head {
  margin-bottom: 0;
  padding: 10px 12px 6px;
}

.roundtable-workbench-column .memory-card-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  align-content: start;
  min-height: 0;
  overflow: hidden;
  gap: 0;
}

.knowledge-summary-strip,
.knowledge-selection-panel,
.knowledge-editor-panel {
  overflow: hidden;
  flex: 0 0 auto;
}

.knowledge-summary-strip {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  max-height: 112px;
  overflow: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.knowledge-selection-panel,
.knowledge-editor-panel {
  padding: 10px 12px;
}

.knowledge-selection-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.knowledge-editor-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.knowledge-summary-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.knowledge-list {
  overflow: auto;
}

.evidence-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  overflow: auto;
  gap: 0;
}

.roundtable-list-head {
  align-items: center;
}

.roundtable-filter-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.roundtable-filter-field span {
  white-space: nowrap;
}

.knowledge-toolbar {
  display: grid;
  gap: 12px;
}

.knowledge-toolbar-fields {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(120px, 0.78fr)) auto;
  gap: 12px;
  align-items: end;
  padding-left: 26px;
}

.knowledge-toolbar-fields .roundtable-filter-field {
  margin-left: 0;
  min-width: 0;
}

.knowledge-toolbar-fields .search-input,
.knowledge-toolbar-fields select {
  min-width: 0;
}

.knowledge-toolbar-fields #knowledge-category-filter,
.knowledge-toolbar-fields #knowledge-upload-category {
  width: 220px;
  max-width: 100%;
}

.knowledge-category-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.knowledge-category-actions .ghost-link {
  padding: 0;
  white-space: nowrap;
}

.roundtable-filter-field select {
  width: auto;
  min-width: 88px;
  padding: 6px 28px 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23f4c899' d='M3.1 5.1 7 9l3.9-3.9.9.9L7 10.9 2.2 6z'/%3E%3C/svg%3E") no-repeat right 10px center,
    #101827;
  color: var(--text);
  color-scheme: normal;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roundtable-filter-field select option {
  background: #111a2a;
  color: #eef3ff;
}

.evidence-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  text-align: left;
  align-items: center;
  padding: 6px 6px 6px 8px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text);
}

.evidence-list-item.active {
  background: rgba(94, 199, 212, 0.08);
}

.evidence-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.evidence-list-index {
  color: var(--warm-soft);
  font-size: 11px;
  min-width: 18px;
}

.evidence-list-label {
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evidence-list-kind {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.evidence-card strong {
  font-size: 14px;
}

.evidence-card p,
.evidence-meta,
.evidence-detail-copy,
.evidence-detail-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.evidence-detail-empty {
  display: grid;
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-detail {
  display: block;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 6px 10px 10px;
}

.evidence-detail-panel {
  display: grid;
  gap: 6px;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.evidence-detail-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.evidence-detail-meta {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.knowledge-hit-snippet {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  padding-bottom: 2px;
}

.knowledge-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-action-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
}

.knowledge-action-button:hover {
  border-color: rgba(94, 199, 212, 0.4);
  background: rgba(94, 199, 212, 0.08);
}

.knowledge-action-button.danger {
  border-color: rgba(255, 120, 120, 0.22);
  color: #ffb2b2;
}

.knowledge-action-button.danger:hover {
  border-color: rgba(255, 120, 120, 0.38);
  background: rgba(255, 120, 120, 0.1);
}

.knowledge-file-note-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 10px;
  margin-bottom: 4px;
}

.knowledge-file-note {
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1.55;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  resize: vertical;
}

.knowledge-file-note:focus {
  outline: none;
  border-color: rgba(94, 199, 212, 0.35);
}

.knowledge-ingestion-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.knowledge-ingestion-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.knowledge-ingestion-list {
  display: grid;
  gap: 8px;
}

.knowledge-ingestion-item {
  display: grid;
  gap: 3px;
}

.knowledge-ingestion-meta {
  font-size: 10px;
  color: var(--warm-soft);
}

.knowledge-ingestion-copy {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text);
}

.knowledge-preview-copy {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.knowledge-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.knowledge-preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-preview-tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
}

.knowledge-preview-tab.active {
  color: var(--text);
  border-color: rgba(94, 199, 212, 0.35);
  background: rgba(94, 199, 212, 0.12);
}

.knowledge-preview-viewport {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.knowledge-preview-scroll {
  height: 100%;
  min-height: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}

.knowledge-preview-empty {
  display: grid;
  align-content: start;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.knowledge-preview-empty-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.knowledge-preview-empty-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.knowledge-chunk-list {
  display: grid;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.knowledge-chunk-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.knowledge-chunk-meta {
  font-size: 10px;
  color: var(--warm-soft);
}

.knowledge-source-frame,
.knowledge-source-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.knowledge-source-image {
  object-fit: contain;
}

.knowledge-ingestion-copy.is-muted {
  color: var(--muted);
}

.chat-evidence-strip {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-evidence-strip-title {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--warm-soft);
}

.chat-evidence-chip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.chat-evidence-chip {
  appearance: none;
  border: 1px solid rgba(94, 199, 212, 0.18);
  background: rgba(94, 199, 212, 0.07);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 10px;
  line-height: 1.45;
  cursor: pointer;
  display: grid;
  gap: 3px;
  text-align: left;
}

.chat-evidence-chip:hover {
  border-color: rgba(94, 199, 212, 0.35);
  background: rgba(94, 199, 212, 0.14);
}

.chat-evidence-chip-title {
  font-size: 10px;
  color: var(--text);
  font-weight: 600;
}

.chat-evidence-chip-meta {
  font-size: 9px;
  color: var(--muted);
}
.evidence-detail-surface {
  display: grid;
  grid-auto-rows: max-content;
  gap: 12px;
  align-content: start;
  height: 100%;
  min-height: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  overflow: auto;
}

.evidence-detail-panel img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.evidence-detail-video {
  width: 100%;
  max-height: 420px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.evidence-detail-copy {
  white-space: pre-wrap;
  word-break: break-word;
}

.evidence-detail-placeholder {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(94, 199, 212, 0.08);
  border: 1px solid rgba(94, 199, 212, 0.16);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.evidence-analyzing-indicator {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(94, 199, 212, 0.06);
  border: 1px solid rgba(94, 199, 212, 0.20);
  font-size: 12px;
  line-height: 1.7;
}

.evidence-analyzing-text {
  color: var(--text);
}

.evidence-analyzing-dots {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  width: 0;
  animation: evidence-ellipsis 1.4s steps(4, end) infinite;
}

.evidence-analyzing-dots::before {
  content: '...';
}

@keyframes evidence-ellipsis {
  0%   { width: 0; }
  100% { width: 1.4em; }
}

.evidence-analyzing-model {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
}

.evidence-web-frame {
  width: 100%;
  min-height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.evidence-source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(94, 199, 212, 0.25);
  background: rgba(94, 199, 212, 0.07);
  color: var(--cool);
  font-size: 12px;
  word-break: break-all;
  text-decoration: none;
  transition: background 0.15s;
}

.evidence-source-link:hover {
  background: rgba(94, 199, 212, 0.14);
  text-decoration: underline;
}

.roundtable-toolbar-actions {
  align-items: center;
}

.roundtable-command-panel {
  gap: 10px;
}

.roundtable-command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roundtable-status {
  min-height: 0;
}

.memory-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.memory-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.memory-card-body {
  display: grid;
  gap: 8px;
}

.memory-summary-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.memory-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text);
}

.agent-workbench-body {
  gap: 10px;
}

.agent-field {
  display: grid;
  gap: 6px;
}

.agent-field span {
  font-size: 12px;
  color: var(--muted);
}

.agent-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agent-actions-grid .ghost-action {
  justify-content: center;
  min-height: 36px;
  border-radius: 14px;
}

.agent-status {
  margin: 0;
  min-height: 20px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.agent-status.pending {
  color: var(--warm);
}

.agent-status.success {
  color: #8ce2ab;
}

.agent-status.error {
  color: #ff9f9f;
}

textarea,
.search-input,
.role-editor input,
.role-editor textarea,
.role-editor select,
.settings-inline-field select,
.settings-form input,
.settings-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.settings-form select,
.role-editor select,
.settings-inline-field select {
  color-scheme: dark;
}

.settings-inline-field select {
  min-height: 42px;
  padding: 10px 38px 10px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23f4c899' d='M3.1 5.1 7 9l3.9-3.9.9.9L7 10.9 2.2 6z'/%3E%3C/svg%3E") no-repeat right 12px center,
    #101827;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.settings-form select option,
.role-editor select option,
.settings-inline-field select option {
  background: #111a2a;
  color: #eef3ff;
}

textarea {
  padding: 8px 12px;
  min-height: 38px;
  resize: none;
  line-height: 1.5;
  overflow-y: auto;
}

.search-input,
.role-editor input,
.role-editor textarea,
.role-editor select,
.settings-inline-field select,
.settings-form input,
.settings-form select {
  padding: 10px 12px;
}

.role-editor textarea {
  min-height: 68px;
}

.color-dot-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 0 2px;
}

.color-dot-option {
  position: relative;
  width: 20px;
  height: 20px;
}

.color-dot-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.color-dot-option span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.24) inset;
}

.color-dot-option input:checked + span {
  border-color: #f4c899;
  box-shadow: 0 0 0 2px rgba(244, 200, 153, 0.24);
}

.color-dot-option.sky span { background: linear-gradient(135deg, var(--avatar-sky-a), var(--avatar-sky-b)); }
.color-dot-option.gold span { background: linear-gradient(135deg, var(--avatar-gold-a), var(--avatar-gold-b)); }
.color-dot-option.amber span { background: linear-gradient(135deg, var(--avatar-amber-a), var(--avatar-amber-b)); }
.color-dot-option.rose span { background: linear-gradient(135deg, var(--avatar-rose-a), var(--avatar-rose-b)); }
.color-dot-option.teal span { background: linear-gradient(135deg, var(--avatar-teal-a), var(--avatar-teal-b)); }
.color-dot-option.violet span { background: linear-gradient(135deg, var(--avatar-violet-a), var(--avatar-violet-b)); }
.color-dot-option.emerald span { background: linear-gradient(135deg, var(--avatar-emerald-a), var(--avatar-emerald-b)); }
.color-dot-option.coral span { background: linear-gradient(135deg, var(--avatar-coral-a), var(--avatar-coral-b)); }
.color-dot-option.slate span { background: linear-gradient(135deg, var(--avatar-slate-a), var(--avatar-slate-b)); }

#provider-template-select {
  min-height: 42px;
}

.composer-actions {
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.composer-actions .action-primary {
  padding: 8px 14px;
  font-size: 14px;
}

.composer-actions .ghost-action {
  font-size: 12px;
}

.speaker-spotlight {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
  padding: 12px;
  min-height: 156px;
}

.speaker-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  position: relative;
  overflow: visible;
}

.speaker-copy {
  min-height: 132px;
}

.speaker-copy h3 {
  font-size: 17px;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  min-height: 1.5em;
  margin-bottom: 2px;
}

.speaker-copy p {
  margin: 0;
}

#speaker-role {
  min-height: 0;
}

#speaker-role:empty {
  display: none;
}

#speaker-description {
  min-height: 4.5em;
  max-height: 4.5em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-config-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.compact-switch {
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: visible;
}

.compact-switch:disabled,
.round-input:disabled,
.settings-inline-field select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compact-switch strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.mode-hover-tooltip {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  width: auto;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 30;
}

body.theme-light .mode-hover-tooltip {
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(244, 235, 220, 0.96));
  border-color: rgba(169, 121, 65, 0.18);
  box-shadow: 0 16px 32px rgba(121, 95, 58, 0.16);
}

.compact-switch.show-tooltip .mode-hover-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.round-config {
  cursor: default;
}

.round-input {
  width: 78px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: center;
  font-size: 14px;
}

select.round-input {
  padding: 8px 34px 8px 10px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23f4c899' d='M3.1 5.1 7 9l3.9-3.9.9.9L7 10.9 2.2 6z'/%3E%3C/svg%3E") no-repeat right 10px center,
    #101827;
  color: var(--text);
  color-scheme: normal;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select.round-input option {
  background: #111a2a;
  color: #eef3ff;
}

.seat-feedback,
.drawer-feedback {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.seat-feedback.success,
.drawer-feedback.success {
  border-color: rgba(94, 199, 212, 0.24);
  color: var(--cool);
}

.seat-feedback.pending,
.drawer-feedback.pending {
  border-color: rgba(231, 182, 112, 0.24);
  color: var(--warm-soft);
}

.seat-feedback.seat-feedback-hidden {
  display: none !important;
}

.seat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
}

.seat-card.selected {
  border-color: rgba(240, 176, 107, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(216, 139, 68, 0.08));
}

.seat-avatar,
.library-avatar,
.picker-avatar {
  width: 40px;
  height: 40px;
}

.seat-card-main,
.library-card-main,
.picker-card-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.seat-traits,
.mini-tags,
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.seat-traits span,
.mini-tags span,
.profile-tags span,
.role-state,
.card-source,
.card-favorite,
.seat-star,
.profile-tag {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.seat-traits,
.mini-tags {
  display: grid;
  gap: 4px;
  margin-top: 0;
}

.seat-traits span,
.mini-tags span {
  display: block;
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  font-size: 11px;
  line-height: 1.45;
}

.seat-card p {
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.seat-card .seat-traits {
  grid-template-columns: 1fr;
  gap: 3px;
}

.seat-card .seat-traits span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.seat-traits span strong,
.mini-tags span strong {
  color: var(--text);
  font-weight: 600;
}

.role-state.selected,
.card-source.favorite,
.seat-star.saved,
.profile-tag.active {
  border-color: rgba(94, 199, 212, 0.24);
  background: rgba(94, 199, 212, 0.1);
  color: var(--cool);
}

.card-favorite,
.seat-star {
  border-color: rgba(240, 176, 107, 0.2);
  background: rgba(216, 139, 68, 0.08);
  color: var(--warm-soft);
}

.card-favorite {
  border: 0;
  background: none;
  padding: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 20px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
}

.card-favorite.saved {
  color: var(--warm-soft);
}

.card-favorite:hover {
  color: rgba(244, 200, 153, 0.8);
}

.seat-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  align-self: end;
}

.seat-assignment {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  width: 100%;
}

.seat-assignment span {
  font-size: 11px;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.seat-assignment-select,
.seat-order-select,
.seat-model-select,
.seat-readaloud-voice-select {
  width: min(172px, 100%);
  justify-self: end;
  padding: 7px 34px 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23f4c899' d='M3.1 5.1 7 9l3.9-3.9.9.9L7 10.9 2.2 6z'/%3E%3C/svg%3E") no-repeat right 10px center,
    #101827;
  color: var(--text);
  font-size: 12px;
  color-scheme: normal;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.seat-assignment-select option,
.seat-order-select option,
.seat-model-select option,
.seat-readaloud-voice-select option {
  background: #111a2a;
  color: #eef3ff;
}

.seat-assignment-static {
  width: min(172px, 100%);
  justify-self: end;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--warm-soft);
  font-size: 12px;
  text-align: center;
}

body.theme-light .round-input,
body.theme-light select.round-input,
body.theme-light .seat-assignment-select,
body.theme-light .seat-order-select,
body.theme-light .seat-model-select,
body.theme-light .seat-readaloud-voice-select,
body.theme-light .seat-assignment-static {
  border-color: rgba(169, 121, 65, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.96), rgba(245, 237, 226, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23925321' d='M3.1 5.1 7 9l3.9-3.9.9.9L7 10.9 2.2 6z'/%3E%3C/svg%3E") no-repeat right 10px center,
    #fbf6ef;
  color: #2f2418;
}

body.theme-light .round-input,
body.theme-light .seat-assignment-static {
  background: rgba(255, 252, 247, 0.92);
}

body.theme-light .settings-form select,
body.theme-light .role-editor select,
body.theme-light .settings-inline-field select {
  color-scheme: light;
}

body.theme-light .settings-form select option,
body.theme-light .role-editor select option,
body.theme-light .settings-inline-field select option {
  background: #fbf6ef;
  color: #2f2418;
}

body.theme-light .roundtable-filter-field select option,
body.theme-light select.round-input option,
body.theme-light .seat-assignment-select option,
body.theme-light .seat-order-select option,
body.theme-light .seat-model-select option,
body.theme-light .seat-readaloud-voice-select option {
  background: #fbf6ef;
  color: #2f2418;
}

body.theme-light .knowledge-toolbar-fields .roundtable-filter-field {
  color: #7a654d;
}

.seat-empty,
.empty-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  color: var(--muted);
  line-height: 1.7;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 20;
}

.workspace-modal {
  position: fixed;
  inset: 16px;
  z-index: 21;
  padding: 22px;
  border-radius: 30px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  transition: transform 220ms ease, opacity 220ms ease;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
}

#roundtable-workbench-modal {
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

#roundtable-workbench-modal .roundtable-workbench-grid {
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

#knowledge-base-modal {
  overflow: hidden;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

#knowledge-base-modal .roundtable-workbench-grid {
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.workspace-modal.open,
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 22;
  width: min(440px, calc(100vw - 32px));
  padding: 20px;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 16px));
  transition: transform 180ms ease, opacity 180ms ease;
  display: grid;
  gap: 16px;
}

.confirm-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.compact-modal-header {
  align-items: flex-start;
}

.confirm-message {
  color: var(--text);
  line-height: 1.7;
}

.confirm-actions {
  justify-content: flex-end;
}

.workspace-modal.open {
  transform: translateY(0) scale(1);
}

.modal-toolbar {
  display: grid;
  gap: 12px;
}

.stats-strip {
  justify-content: flex-start;
}

.tab-row {
  align-items: center;
}

.tab-pill {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.tab-pill.active {
  border-color: rgba(240, 176, 107, 0.24);
  color: var(--warm-soft);
  background: rgba(216, 139, 68, 0.1);
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.mapping-field {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.mapping-field span {
  font-size: 12px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: max-content;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-items: start;
  align-content: start;
  justify-items: stretch;
}

.library-card {
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr) auto auto;
  gap: 10px;
  min-height: 356px;
  height: auto;
  align-self: start;
  align-content: stretch;
  overflow: hidden;
}

.picker-card {
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr) auto auto;
  gap: 10px;
  min-height: 356px;
  height: auto;
  align-self: start;
  align-content: stretch;
  overflow: hidden;
}

.library-card.selected,
.picker-card.selected {
  border-color: rgba(240, 176, 107, 0.78);
  box-shadow: 0 0 0 1px rgba(240, 176, 107, 0.45) inset, 0 18px 34px rgba(216, 139, 68, 0.16);
  background: linear-gradient(180deg, rgba(216, 139, 68, 0.12), rgba(255, 255, 255, 0.03));
}

.library-card h3 {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.26;
}

.picker-card h3 {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.26;
}

.library-card h3,
.picker-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: calc(1.26em * 2);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.seat-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: calc(1.28em * 2);
}

.seat-card .role-title-stack {
  min-height: calc(1.28em * 2);
}

.role-title-stack {
  min-width: 0;
  display: grid;
  align-content: start;
  flex: 1 1 auto;
}

.library-card .role-title-stack {
  min-height: calc(1.26em * 2);
}

.picker-card .role-title-stack {
  min-height: calc(1.26em * 2);
}

.library-card .seat-role,
.picker-card .seat-role {
  font-size: 11px;
}

.library-card p {
  font-size: 12px;
  line-height: 1.55;
}

.picker-card p {
  font-size: 12px;
  line-height: 1.55;
}

.library-card > p,
.library-card .card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  min-height: calc(1.55em * 4);
}

.picker-card > p,
.picker-card .card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  min-height: calc(1.55em * 3);
}

.seat-chip-row,
.role-card-head,
.role-card-footer {
  flex-wrap: wrap;
}

.seat-chip-row {
  align-items: flex-start;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
}

.seat-chip-row > div {
  min-width: 0;
  flex: 1 1 auto;
}

.seat-chip-row > .seat-avatar,
.seat-chip-row > .library-avatar,
.seat-chip-row > .picker-avatar {
  flex: 0 0 40px;
}

.role-card-head {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.role-card-head .card-source,
.role-card-footer > * {
  flex: 0 0 auto;
}

.card-source {
  white-space: nowrap;
}

.role-card-footer {
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
}

.seat-actions {
  display: flex;
  justify-content: flex-end;
}

.library-card .mini-tags {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: auto;
  align-content: start;
  min-height: calc(1.45em * 3 + 4px);
  padding-top: 8px;
}

.picker-card .mini-tags {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: auto;
  align-content: start;
  min-height: calc(1.45em * 3);
  padding-top: 8px;
}

.library-card .mini-tags span {
  display: block;
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-card .mini-tags span {
  display: block;
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.role-lock-note {
  font-size: 11px;
  color: var(--muted);
  margin-right: auto;
}

.card-action[disabled] {
  color: rgba(255, 255, 255, 0.24);
  cursor: not-allowed;
}

.seat-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.seat-action-row.with-audio {
  width: 100%;
  justify-content: flex-start;
  gap: 12px;
}

.seat-action-spacer {
  flex: 1 1 auto;
}

.seat-edit-icon,
.seat-delete {
  width: 34px;
  height: 34px;
}

.seat-edit-icon {
  color: var(--cool);
}

.settings-inline-field-block {
  display: grid;
  gap: 8px;
  width: 100%;
}

@media (max-width: 1200px) {
  .knowledge-toolbar-fields {
    grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(110px, 0.9fr));
    padding-left: 18px;
  }

  .knowledge-toolbar-fields > :last-child {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 920px) {
  .knowledge-toolbar-fields {
    grid-template-columns: 1fr;
    padding-left: 0;
  }
}

.connected-model-host {
  margin-top: 6px;
}

.role-editor,
.settings-form,
.settings-subsection {
  display: grid;
  gap: 10px;
}

.role-editor {
  position: absolute;
  inset: 112px 22px 22px;
  z-index: 8;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(11, 18, 33, 0.98), rgba(13, 22, 39, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.role-ai-assist-block {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(94, 199, 212, 0.16);
  background: rgba(94, 199, 212, 0.06);
}

.role-ai-actions {
  align-items: center;
}

.compact-feedback {
  margin: 0;
  flex: 1 1 260px;
}

.connected-model-list {
  display: grid;
  gap: 10px;
}

.connected-model-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.connected-model-main {
  min-width: 0;
  flex: 1 1 auto;
}

.connected-model-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  min-width: 0;
  flex-wrap: wrap;
}

.connected-model-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-latency-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.connected-model-card.active {
  border-color: rgba(94, 199, 212, 0.22);
  background: rgba(94, 199, 212, 0.08);
}

.connected-model-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.connected-model-actions .model-latency-pill {
  margin-right: 2px;
  white-space: nowrap;
}

.connected-model-actions .ghost-link {
  font-size: 12px;
}

.icon-button.compact {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.icon-button svg {
  width: 14px;
  height: 14px;
}

.icon-button.danger {
  color: #f29b9b;
}

.icon-button:hover {
  border-color: rgba(94, 199, 212, 0.24);
  color: var(--cool);
}

.icon-button.danger:hover {
  border-color: rgba(240, 109, 109, 0.26);
  color: #f7b0b0;
}

.model-health-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.22);
}

.model-health-dot.success { background: #4bd37b; }
.model-health-dot.error { background: #f06d6d; }
.model-health-dot.warning { background: #e0a655; }
.model-health-dot.inactive { background: rgba(255, 255, 255, 0.22); }

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.single-col {
  grid-template-columns: minmax(0, 1fr);
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-editor label,
.settings-form label {
  display: grid;
  gap: 6px;
}

.role-editor span,
.settings-form span {
  font-size: 12px;
  color: var(--muted);
}

.role-editor input#role-editor-age {
  letter-spacing: 0.01em;
}

.settings-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 22;
}

.settings-modal-backdrop {
  z-index: 24;
}

.settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 25;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 22px;
  border-radius: 28px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 18px));
  transition: transform 220ms ease, opacity 220ms ease;
  overflow: auto;
  display: grid;
  gap: 14px;
}

.settings-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.settings-drawer {
  position: fixed;
  top: 14px;
  left: 14px;
  bottom: 14px;
  width: min(540px, calc(100vw - 28px));
  padding: 16px;
  border-radius: 28px;
  transform: translateX(calc(-100% - 24px));
  transition: transform 220ms ease;
  z-index: 23;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.settings-drawer.open {
  transform: translateX(0);
}

.settings-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.settings-group {
  display: grid;
  gap: 8px;
}

.settings-group.grow {
  min-height: 0;
  align-content: start;
  overflow: auto;
}

.settings-row,
.role-editor input,
.role-editor textarea,
.role-editor select,
.settings-form input,
.settings-form select {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.preset-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.chip-button {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 999px;
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
}

.chip-button:hover,
.chip-button.active {
  border-color: rgba(240, 176, 107, 0.24);
  color: var(--warm-soft);
}

.settings-status {
  font-size: 12px;
  color: var(--muted);
}

.settings-status.success {
  color: var(--cool);
}

.settings-status.error {
  color: #f0a8a8;
}

.settings-inline-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.settings-inline-field {
  display: grid;
  gap: 6px;
}

.settings-inline-field span {
  font-size: 12px;
  color: var(--muted);
}

.settings-form {
  display: grid;
  gap: 8px;
}

.settings-form label {
  display: grid;
  gap: 4px;
}

.settings-form span {
  font-size: 11px;
  line-height: 1.2;
}

.settings-form input,
.settings-form select {
  min-height: 40px;
  padding: 8px 12px;
}

.settings-subsection h3 {
  font-size: 16px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.header-actions .settings-status {
  flex: 1 1 100%;
}

.settings-drawer h2 {
  font-size: 18px;
  line-height: 1.15;
}

.settings-drawer .ghost-link {
  white-space: nowrap;
}

.settings-modal .header-actions .settings-status {
  flex: 1 1 100%;
}

body.theme-light textarea,
body.theme-light .search-input,
body.theme-light .role-editor,
body.theme-light .role-editor input,
body.theme-light .role-editor textarea,
body.theme-light .role-editor select,
body.theme-light .role-ai-assist-block,
body.theme-light .connected-model-card,
body.theme-light .model-latency-pill,
body.theme-light .settings-form input,
body.theme-light .settings-form select,
body.theme-light .chip-button,
body.theme-light .tab-pill,
body.theme-light .icon-button,
body.theme-light .settings-row {
  background: rgba(255, 255, 255, 0.64);
}

body.theme-light .role-editor {
  border-color: rgba(169, 121, 65, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(244, 235, 220, 0.98));
  box-shadow: 0 24px 60px rgba(110, 85, 44, 0.14);
}

body.theme-light .role-ai-assist-block {
  border-color: rgba(10, 127, 142, 0.16);
  background: linear-gradient(180deg, rgba(245, 250, 250, 0.96), rgba(236, 246, 245, 0.92));
}

body.theme-light .connected-model-card {
  border-color: rgba(169, 121, 65, 0.12);
  background: rgba(255, 252, 247, 0.86);
}

body.theme-light .model-latency-pill {
  border-color: rgba(169, 121, 65, 0.12);
  background: rgba(248, 241, 231, 0.92);
  color: #7a654d;
}

body.theme-light .role-editor span,
body.theme-light .compact-feedback,
body.theme-light .settings-status {
  color: #705f4e;
}

body.theme-light .compact-composer {
  background: linear-gradient(180deg, rgba(246, 240, 231, 0), rgba(246, 240, 231, 0.9) 28%, rgba(242, 234, 223, 0.98) 100%);
}

.discussion-stream::-webkit-scrollbar,
.card-grid::-webkit-scrollbar,
.profile-list::-webkit-scrollbar,
.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar {
  width: 10px;
}

.discussion-stream::-webkit-scrollbar-thumb,
.card-grid::-webkit-scrollbar-thumb,
.profile-list::-webkit-scrollbar-thumb,
.sidebar-left::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

@media (max-width: 1380px) {
  .app-frame {
    grid-template-columns: 250px minmax(0, 1fr) 320px;
  }
}

@media (max-width: 960px) {
  .app-frame {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .center-stage {
    height: calc(100dvh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .sidebar-left,
  .sidebar-right {
    order: 2;
  }
}

@media (max-width: 760px) {
  body {
    padding: 12px;
  }

  .workspace-modal,
  .settings-modal,
  .settings-drawer,
  .sidebar-left,
  .sidebar-right,
  .center-stage {
    padding: 16px;
    border-radius: 22px;
  }

  .form-grid.two-col,
  .form-grid.three-col {
    grid-template-columns: 1fr;
  }

  .preset-chips,
  .settings-inline-tools {
    grid-template-columns: 1fr;
  }

  .agent-actions-grid {
    grid-template-columns: 1fr;
  }

  .roundtable-workbench-grid {
    grid-template-columns: 1fr;
  }

  .evidence-list,
  .evidence-detail {
    min-height: auto;
    max-height: none;
  }

  .evidence-list-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .evidence-list-arrow {
    display: none;
  }

  .roundtable-command-grid {
    grid-template-columns: 1fr;
  }

  .settings-modal {
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: none;
    transform: translateY(18px) scale(0.985);
  }

  .settings-modal.open {
    transform: translateY(0) scale(1);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .workspace-modal {
    inset: 12px;
  }
}

@media (max-height: 720px) {
  body {
    padding: 12px;
  }

  .app-frame {
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    gap: 12px;
  }

  .sidebar-left,
  .sidebar-right,
  .center-stage {
    padding: 16px;
    border-radius: 22px;
  }

  .stage-header h2 {
    font-size: clamp(22px, 2.6vw, 32px);
  }

  .chat-shell {
    gap: 10px;
  }

  .discussion-stream {
    padding-bottom: 14px;
  }

  .composer-box {
    padding: 8px 10px;
  }
}

@media (max-height: 560px) {
  body {
    padding: 8px;
  }

  .app-frame {
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    gap: 8px;
  }

  .sidebar-left,
  .sidebar-right,
  .center-stage {
    padding: 10px;
    border-radius: 16px;
  }

  .center-stage {
    gap: 8px;
  }

  .stage-header {
    padding-bottom: 6px;
  }

  .stage-header .section-label {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .stage-header h2 {
    margin-top: 2px;
    font-size: clamp(16px, 1.7vw, 20px);
    line-height: 1.08;
  }

  .header-pills {
    gap: 6px;
  }

  .tiny-badge,
  .tab-pill,
  .chip-button,
  .card-source,
  .card-favorite,
  .seat-star,
  .profile-tag {
    padding: 5px 8px;
    font-size: 11px;
  }

  .chat-shell {
    gap: 6px;
  }

  .live-status-banner {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px;
  }

  .discussion-status-panel {
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
  }

  .discussion-status-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .discussion-status-card {
    padding: 10px;
    border-radius: 12px;
  }

  .discussion-status-card strong {
    font-size: 13px;
  }

  .discussion-status-card p,
  .discussion-status-summary,
  .discussion-status-phase {
    font-size: 11px;
  }

  .discussion-stream {
    gap: 8px;
    padding-bottom: 12px;
  }

  .compact-composer {
    padding-top: 8px;
  }

  .composer-box {
    padding: 6px 7px;
  }

  #user-input {
    min-height: 30px;
    padding: 6px 9px;
    line-height: 1.3;
  }

  .composer-actions {
    margin-top: 4px;
  }

  .composer-actions .action-primary {
    padding: 6px 10px;
    font-size: 12px;
  }

  .composer-actions .ghost-action {
    font-size: 11px;
  }
}

/* ── 背景补充文本框 ── */
.role-background-textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-sizing: border-box;
  margin-top: 6px;
  font-family: inherit;
}

.role-background-textarea::placeholder {
  color: var(--text-dim, rgba(255, 255, 255, 0.3));
}

/* ── 续轮决策按钮行 ── */
.continuation-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}
