* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 4pt 增量间距体系 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  /* 触控目标 */
  --touch-min: 32px;
  --touch-ideal: 44px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f7f8fa; color: #1a1a1a; width: 100%; min-height: 100vh;
  padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2);
}

/* ── Focus Ring ── */
*:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 2px; }
body[data-theme] *:focus-visible { outline-color: var(--accent, #5eead4); }

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.btn-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: currentColor;
  border-radius: 50%; animation: spin 0.6s linear infinite; flex-shrink: 0;
}
.btn-dark-spinner { border-color: rgba(0,0,0,0.15); border-top-color: currentColor; }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px;
}
body[data-theme] .skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
}

/* ── 进度条（参与者 streaming 状态） ── */
.stream-progress {
  flex: 1; height: 4px; background: rgba(0,0,0,0.04); border-radius: 2px; overflow: hidden;
  margin: 0 var(--space-2);
}
body[data-theme] .stream-progress { background: rgba(255,255,255,0.06); }
.stream-progress-bar {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #f59e0b, #6366f1);
  transition: width 0.3s ease;
}

.header { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.header h1 { font-size: 20px; font-weight: 700; background: linear-gradient(135deg, #6366f1, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header .version { font-size: 10px; color: #999; background: #f0f0f0; padding: 2px 6px; border-radius: 4px; }
.header .mode-toggle { margin-left: auto; display: flex; gap: 2px; }

.mode-opt { padding: 6px 12px; font-size: 11px; font-weight: 600; border: 1.5px solid #e5e7eb; border-radius: 6px; background: #fafafa; color: #888; cursor: pointer; min-height: var(--touch-min); }
.mode-opt:hover { border-color: #6366f1; color: #6366f1; }
.mode-opt.active { background: #f5f3ff; border-color: #6366f1; color: #6366f1; }


.section { background: #fff; border-radius: 12px; padding: var(--space-3); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.section-title { font-size: 11px; color: #999; margin-bottom: var(--space-2); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; display: flex; justify-content: space-between; align-items: center; }

/* ── Buttons ── */
.btn { padding: 7px 14px; border: none; border-radius: var(--space-2); cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: #6366f1; color: #fff; width: 100%; }
.btn-secondary { background: #f3f4f6; color: #555; border: 1px solid #e5e7eb; }
.btn-debate { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; width: 100%; padding: 9px; font-size: 13px; font-weight: 600; border: none; border-radius: var(--space-2); cursor: pointer; margin-top: var(--space-2); }
.btn-debate:hover { box-shadow: 0 4px 12px rgba(99,102,241,0.25); transform: translateY(-1px); }
.btn-debate:disabled { opacity: 0.4; transform: none; box-shadow: none; cursor: not-allowed; }
.btn-summary { background: #0ea5e9; color: #fff; flex-shrink: 0; padding: 7px 16px; font-size: 13px; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; }
.btn-tiny { background: #f3f4f6; color: #666; padding: 6px 12px; font-size: 11px; border: 1px solid #e5e7eb; border-radius: 6px; cursor: pointer; white-space: nowrap; min-height: var(--touch-min); }
.btn-tiny:hover { background: #e8e9ed; }

/* ── 添加按钮 ── */
.add-group { display: flex; gap: var(--space-1); }
.btn-add { flex: 1; padding: 7px 2px; border: 1.5px dashed #d1d5db; border-radius: 8px; background: #fafafa; color: #aaa; cursor: pointer; font-size: 11px; font-weight: 600; text-align: center; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.brand-icon { width: 14px; height: 14px; flex-shrink: 0; vertical-align: middle; }
.btn-add .brand-icon { width: 16px; height: 16px; }
.participant-item .brand-icon { width: 16px; height: 16px; }
.model-row .brand-icon { width: 18px; height: 18px; }
.btn-add:hover { border-style: solid; background: #fff; transform: translateY(-1px); }
.btn-add.claude:hover  { border-color: #d4a574; color: #b8845a; }
.btn-add.gemini:hover  { border-color: #4285f4; color: #3b78e0; }
.btn-add.chatgpt:hover { border-color: #10a37f; color: #0d8c6c; }
.btn-add.deepseek:hover { border-color: #4d6bfe; color: #4060e6; }
.btn-add.doubao:hover  { border-color: #ff6a3d; color: #e55a30; }
.btn-add.qwen:hover    { border-color: #6236ff; color: #5530e0; }
.btn-add.kimi:hover    { border-color: #1a1a2e; color: #1a1a2e; }
.btn-add.yuanbao:hover { border-color: #0052d9; color: #0047b8; }
.btn-add.grok:hover    { border-color: #191919; color: #191919; }

/* ── 参与者列表 ── */
.participant-list { display: flex; flex-direction: column; gap: 3px; max-height: 180px; overflow-y: auto; margin-top: var(--space-2); }
.empty-hint { text-align: center; color: #ccc; font-size: 12px; padding: var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.empty-hint .empty-icon { font-size: 28px; opacity: 0.6; margin-bottom: var(--space-1); }
.empty-hint .empty-title { font-size: 13px; font-weight: 600; color: #888; }
.empty-hint .empty-desc { font-size: 11px; color: #bbb; line-height: 1.6; max-width: 240px; }
.empty-hint .empty-actions { display: flex; gap: var(--space-1); margin-top: var(--space-1); flex-wrap: wrap; justify-content: center; }
.empty-hint .empty-chip { padding: 4px 10px; font-size: 10px; font-weight: 600; border-radius: 6px; border: 1.5px dashed; background: transparent; cursor: pointer; transition: all 0.2s; }
.empty-hint .empty-chip:hover { background: #fff; transform: translateY(-1px); }
.empty-hint .empty-chip.claude  { color: #b8845a; border-color: #d4a574; }
.empty-hint .empty-chip.chatgpt { color: #0d8c6c; border-color: #10a37f; }
.empty-hint .empty-chip.gemini  { color: #3b78e0; border-color: #4285f4; }
.round-badge { font-size: 10px; background: #f5f3ff; color: #6366f1; padding: 2px 8px; border-radius: 10px; font-weight: 600; }

.participant-item { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: var(--space-2); background: #f9fafb; font-size: 12px; font-weight: 500; border: 1px solid #f0f0f0; transition: all 0.15s; }
.participant-item:hover { background: #f3f4f6; }
.participant-item .p-status { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.participant-item .p-status.ready { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.3); }
.participant-item .p-status.streaming { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,0.3); animation: pulse 1s infinite; }
.participant-item .p-status.offline { background: #d1d5db; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.participant-item.claude  { border-left: 3px solid #d4a574; }
.participant-item.gemini  { border-left: 3px solid #4285f4; }
.participant-item.chatgpt { border-left: 3px solid #10a37f; }
.participant-item.deepseek { border-left: 3px solid #4d6bfe; }
.participant-item.doubao  { border-left: 3px solid #ff6a3d; }
.participant-item.qwen    { border-left: 3px solid #6236ff; }
.participant-item.kimi    { border-left: 3px solid #1a1a2e; }
.participant-item.yuanbao { border-left: 3px solid #0052d9; }
.participant-item.grok    { border-left: 3px solid #191919; }

.participant-item .p-name { flex: 1; color: #333; }
.participant-item .p-ready-badge { font-size: 10px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p-ready-badge.ready { background: #d1fae5; color: #065f46; }
.p-ready-badge.not-ready { background: #fee2e2; color: #991b1b; }
.participant-item .p-chars { font-size: 10px; color: #6366f1; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.participant-item .p-status-text { font-size: 10px; color: #bbb; }
.participant-item .p-btn { background: transparent; border: none; color: #ccc; cursor: pointer; font-size: 14px; padding: var(--space-1); min-width: var(--touch-min); min-height: var(--touch-min); display: inline-flex; align-items: center; justify-content: center; }
.participant-item .p-btn:hover { color: #666; }
.participant-item .p-action-btn { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; color: #555; cursor: pointer; font-size: 10px; padding: 5px 10px; white-space: nowrap; min-height: var(--touch-min); }
.participant-item .p-action-btn:hover { background: #e8e9ed; }
.participant-item .p-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.participant-item .p-btn.p-remove:hover { color: #ef4444; }

/* ── 广播 ── */
.broadcast-editor {
  width: 100%; min-height: 60px; max-height: 150px; overflow-y: auto;
  padding: 10px 12px; border: 1.5px solid #e5e7eb; border-radius: 10px;
  background: #fafafa; color: #333; font-size: 13px; outline: none;
  font-family: inherit; margin-bottom: var(--space-2); transition: all 0.2s;
  line-height: 1.5; word-break: break-word;
}
.broadcast-editor:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.08); background: #fff; }
.broadcast-editor:empty::before {
  content: attr(data-placeholder); color: #bbb; pointer-events: none;
  white-space: pre-line;
}
.broadcast-editor img {
  max-width: 100%; max-height: 120px; border-radius: 6px;
  margin: 4px 0; display: block;
}
.image-previews { display: flex; gap: var(--space-1); flex-wrap: wrap; margin-bottom: var(--space-2); }
.image-previews:empty { display: none; }
.img-preview { position: relative; display: inline-block; }
.img-preview img {
  width: 60px; height: 60px; object-fit: cover;
  border-radius: 8px; border: 1.5px solid #e5e7eb;
}
.img-preview .img-remove {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #ef4444; color: #fff; border: none;
  font-size: 11px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; line-height: 1;
}
.file-preview {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 8px; background: #f3f4f6; border-radius: 8px;
  border: 1.5px solid #e5e7eb; min-width: 60px; height: 60px;
  flex-direction: column; justify-content: center;
}
.file-preview .file-icon { font-size: 20px; }
.file-preview .file-name { font-size: 9px; color: #666; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-actions { display: flex; gap: var(--space-2); align-items: center; }
.btn-upload { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }

/* ── 场景预设下拉 ── */
.scenario-dropdown { position: relative; }
.scenario-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 6px 0;
  z-index: 100;
  margin-bottom: 4px;
}
.scenario-menu.open { display: block; }
.scenario-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.scenario-item { position: relative; cursor: pointer; }
.scenario-item:hover { background: #f5f3ff; color: #4338ca; }
.scenario-item.selected { background: #ede9fe; color: #4338ca; font-weight: 700; }
.scenario-tip {
  display: none;
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  background: linear-gradient(135deg, #1e1b3a 0%, #312667 100%);
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.7;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(139,92,246,0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.1);
  pointer-events: none;
  z-index: 200;
  white-space: pre-line;
}
.scenario-item:hover .scenario-tip { display: block; }
.btn-scenario { white-space: nowrap; }
.btn-scenario.has-selected { color: #6366f1; border-color: #6366f1; font-weight: 700; }

/* ── 辩论 ── */
.select-input { flex: 1; padding: 7px 10px; border: 1.5px solid #e5e7eb; border-radius: 8px; background: #fafafa; color: #333; font-size: 12px; outline: none; }
.select-input:focus { border-color: #6366f1; }
.select-small { font-size: 11px; padding: 5px 8px; }

/* ── 总结 ── */
.summary-row { display: flex; gap: var(--space-1); }

/* ── 折叠面板 ── */
.custom-details { margin-top: var(--space-2); }
.custom-summary { font-size: 12px; color: #999; cursor: pointer; user-select: none; padding: 4px 0; list-style: none; }
.custom-summary::before { content: "▸ "; font-size: 10px; }
.custom-details[open] .custom-summary::before { content: "▾ "; }
.custom-summary:hover { color: #555; }
.custom-textarea { width: 100%; min-height: 45px; padding: 8px 10px; border: 1.5px solid #e5e7eb; border-radius: 8px; background: #fafafa; color: #333; font-size: 12px; resize: vertical; outline: none; font-family: inherit; margin-top: 6px; }
.custom-textarea:focus { border-color: #6366f1; background: #fff; }
.custom-textarea::placeholder { color: #ccc; }
/* ── 辩论模式切换 ── */
.debate-mode-toggle {
  display: flex; gap: var(--space-1); margin-bottom: var(--space-2);
}
.mode-btn {
  flex: 1; padding: 6px 2px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  background: #fafafa; color: #888; cursor: pointer; font-size: 12px;
  font-weight: 600; text-align: center; transition: all 0.2s;
  position: relative;
}
.mode-btn:hover { border-color: #6366f1; color: #6366f1; }
.mode-btn.active { background: #f5f3ff; border-color: #6366f1; color: #6366f1; }

/* ── 简洁模式 ── */
.concise-toggle {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: #888; cursor: pointer;
  margin-top: var(--space-2); user-select: none;
  position: relative;
}
.concise-toggle input { accent-color: #6366f1; }
.concise-toggle > span:first-of-type { font-weight: 600; color: #555; }

/* ── 通用 hover 浮窗 ── */
.hover-tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 260px;
  background: linear-gradient(135deg, #1e1b3a 0%, #312667 100%);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139,92,246,0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.1);
  pointer-events: none;
  z-index: 200;
  white-space: normal;
  text-align: left;
}
.mode-btn:hover .hover-tip,
.concise-toggle:hover .hover-tip { display: block; }

/* ── 动态预览浮窗 ── */
.dynamic-tip {
  display: none;
  position: fixed;
  width: 300px;
  max-height: 200px;
  overflow-y: auto;
  background: linear-gradient(135deg, #1e1b3a 0%, #312667 100%);
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.7;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(139,92,246,0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.1);
  z-index: 300;
  white-space: pre-line;
  word-break: break-all;
}
.dynamic-tip.visible { display: block; }


/* ── 日志 ── */
.log { max-height: 120px; overflow-y: auto; font-size: 11px; color: #bbb; line-height: 1.7; }
.log:empty::after { content: "操作日志将在此显示"; display: block; text-align: center; color: #ddd; padding: var(--space-4) 0; font-size: 11px; }
.log .entry { padding: 2px 0; border-bottom: 1px solid #f8f8f8; }
.log .entry.success { color: #16a34a; }
.log .entry.error { color: #dc2626; }
.log .entry.info { color: #2563eb; }

/* ── 统计 ── */
.stats-tabs { display: flex; gap: var(--space-1); }
.stats-tab { padding: 2px 10px; font-size: 10px; font-weight: 600; border: 1.5px solid #e5e7eb; border-radius: 6px; background: #fafafa; color: #888; cursor: pointer; }
.stats-tab:hover { border-color: #6366f1; color: #6366f1; }
.stats-tab.active { background: #f5f3ff; border-color: #6366f1; color: #6366f1; }
.stats-grid { display: flex; gap: var(--space-2); }
.stat-item { flex: 1; text-align: center; background: #f9fafb; border-radius: 8px; padding: 8px 4px; border: 1px solid #f0f0f0; }
.stat-val { display: block; font-size: 18px; font-weight: 700; color: #6366f1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 10px; color: #999; }

/* ── 分模型统计 ── */
.models-list { display: flex; flex-direction: column; gap: 4px; }
.model-row { display: flex; align-items: center; gap: var(--space-2); padding: 6px 8px; border-radius: 8px; background: #f9fafb; border: 1px solid #f0f0f0; font-size: 11px; }
.model-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.model-name { flex: 1; font-weight: 600; color: #333; min-width: 50px; }
.model-stat { text-align: right; white-space: nowrap; }
.model-stat .val { font-weight: 700; color: #6366f1; font-variant-numeric: tabular-nums; font-size: 12px; }
.model-stat .lbl { font-size: 9px; color: #999; }
.model-rank { font-size: 9px; color: #bbb; width: 16px; text-align: center; font-weight: 700; }
.rank-1 { color: #f59e0b; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #cd9b6b; }

/* 暗色主题适配 */
body[data-theme] .model-row { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
body[data-theme] .model-name { color: #e2e8f0; }
body[data-theme] .model-stat .val { color: var(--accent, #5eead4); }
body[data-theme] .model-stat .lbl { color: var(--text-muted, #8ea3c7); }
body[data-theme] .model-rank { color: var(--text-muted, #8ea3c7); }
body[data-theme] .models-list .empty-hint { color: var(--text-muted, #8ea3c7); }

/* ── Footer ── */
.shortcuts-hint { font-size: 10px; color: #ccc; margin-bottom: var(--space-1); }
.footer { font-size: 11px; color: #ddd; text-align: center; margin-top: auto; padding-top: 6px; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }


/* ── 状态卡片增强 ── */
.participant-item .p-state-badge {
  font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
.p-state-badge.streaming { background: #fef3c7; color: #92400e; }

/* 门控1 操作按钮 */
.p-gate-actions { display: flex; gap: 3px; }
.p-gate-btn { padding: 5px 10px; font-size: 10px; border-radius: 6px; border: 1px solid #d1d5db; background: #f9fafb; color: #555; cursor: pointer; min-height: var(--touch-min); }
.p-gate-btn:hover { background: #e8e9ed; }

/* ── PPT 制作 block ── */
.ppt-workshop { position: relative; }
.ppt-action-row {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  margin-bottom: var(--space-2);
}
.ppt-action-row > .btn {
  width: auto;
  min-height: var(--touch-min);
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}
.ppt-template-wrap,
.ppt-save-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}
.ppt-template-wrap .btn,
.ppt-save-wrap .btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.ppt-menu-trigger,
.ppt-save-trigger {
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ppt-template-menu,
.ppt-save-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  width: max-content;
  min-width: 250px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  padding: 6px;
  z-index: 120;
}
.ppt-template-menu.open,
.ppt-save-menu.open { display: block; }
.ppt-template-item {
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 0;
  background: transparent;
  color: #374151;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
}
.ppt-template-item:hover {
  background: #f5f3ff;
  color: #4338ca;
}
.ppt-template-name {
  flex: 0 0 auto;
  white-space: nowrap;
}
.ppt-template-desc {
  color: #9ca3af;
  font-size: 11px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.ppt-prompt-box {
  width: 100%;
  min-height: 150px;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  color: #333;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  font-family: inherit;
  overflow-x: hidden;
  margin-bottom: var(--space-2);
}
.ppt-prompt-box:focus {
  border-color: #6366f1;
  background: #fff;
}
.ppt-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #888;
}
.ppt-generate-row {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}
.ppt-start-btn {
  width: auto;
  flex: 1 1 0;
  min-height: var(--touch-min);
  padding: 9px;
  font-size: 13px;
}
.ppt-save-wrap {
  flex: 0 0 112px;
}
.ppt-save-menu {
  left: auto;
  right: 0;
  min-width: 160px;
}
body[data-theme="A"] .ppt-prompt-box,
body[data-theme="C"] .ppt-prompt-box,
body[data-theme="D"] .ppt-prompt-box,
body[data-theme="F"] .ppt-prompt-box {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.12);
  color: #f5fbff;
}
body[data-theme="A"] .ppt-prompt-box:focus,
body[data-theme="C"] .ppt-prompt-box:focus,
body[data-theme="D"] .ppt-prompt-box:focus,
body[data-theme="F"] .ppt-prompt-box:focus {
  border-color: var(--accent, #5eead4);
  background: rgba(255,255,255,0.04);
}
body[data-theme="A"] .ppt-prompt-box::placeholder,
body[data-theme="C"] .ppt-prompt-box::placeholder,
body[data-theme="D"] .ppt-prompt-box::placeholder,
body[data-theme="F"] .ppt-prompt-box::placeholder,
body[data-theme="A"] .ppt-hint,
body[data-theme="C"] .ppt-hint,
body[data-theme="D"] .ppt-hint,
body[data-theme="F"] .ppt-hint {
  color: var(--text-muted, #8ea3c7);
}
body[data-theme="A"] .ppt-template-menu,
body[data-theme="C"] .ppt-template-menu,
body[data-theme="D"] .ppt-template-menu,
body[data-theme="F"] .ppt-template-menu,
body[data-theme="A"] .ppt-save-menu,
body[data-theme="C"] .ppt-save-menu,
body[data-theme="D"] .ppt-save-menu,
body[data-theme="F"] .ppt-save-menu {
  background: #0f172a;
  border-color: rgba(255,255,255,0.12);
}
body[data-theme="A"] .ppt-template-item,
body[data-theme="C"] .ppt-template-item,
body[data-theme="D"] .ppt-template-item,
body[data-theme="F"] .ppt-template-item {
  color: #c4d3ea;
}
body[data-theme="A"] .ppt-template-desc,
body[data-theme="C"] .ppt-template-desc,
body[data-theme="D"] .ppt-template-desc,
body[data-theme="F"] .ppt-template-desc {
  color: var(--text-muted, #8ea3c7);
}
body[data-theme="A"] .ppt-template-item:hover,
body[data-theme="C"] .ppt-template-item:hover,
body[data-theme="D"] .ppt-template-item:hover,
body[data-theme="F"] .ppt-template-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--accent, #5eead4);
}

/* ── v3.0 professional console refresh ── */
body {
  gap: 10px;
}

.section {
  border: 1px solid rgba(120,147,201,0.12);
}

.task-console {
  padding: 10px;
}

.task-state {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0;
  text-transform: none;
}

.task-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 10px;
}

.task-tab {
  min-width: 0;
  border: 1.5px solid #e5e7eb;
  background: #f8fafc;
  color: #64748b;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}

.task-tab:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.task-tab.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

.task-panel {
  display: none;
}

.task-panel.active {
  display: block;
}

.task-action-row,
.summary-tools {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.task-action-row .btn-debate,
.summary-tools .btn {
  flex: 1;
}

.icon-only {
  flex: 0 0 42px;
  padding: 8px 0;
}

.danger-soft {
  color: #ef4444;
  border-color: #fca5a5;
}

.compact-title {
  margin-top: 0;
  margin-bottom: 7px;
}

.summary-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148,163,184,0.22);
}

.debate-step-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 8px;
}

.debate-step {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.debate-step span {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  margin-right: 3px;
  border-radius: 999px;
  background: #eef2ff;
  color: #6366f1;
  font-size: 10px;
}

.participant-list {
  gap: 6px;
  max-height: 210px;
}

.participant-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5eaf3;
  border-left-width: 3px;
}

.participant-item:hover {
  background: #f3f6fb;
}

.p-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.p-title-row,
.p-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.participant-item .p-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.p-meta-row {
  color: #64748b;
  font-size: 10px;
}

.p-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.participant-item .p-action-btn,
.participant-item .p-btn,
.p-gate-btn {
  min-width: 28px;
  min-height: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 12px;
}

.participant-item .p-action-btn {
  background: #fff;
}

.participant-item .p-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
}

.participant-item .p-ready-badge {
  width: auto;
  height: auto;
  padding: 1px 6px;
  border-radius: 999px;
}

.participant-item .p-chars {
  min-width: auto;
  color: #6366f1;
  font-variant-numeric: tabular-nums;
}

.stream-progress {
  grid-column: 1 / -1;
  width: 100%;
  margin: 2px 0 0;
}

.broadcast-editor {
  min-height: 86px;
  max-height: 180px;
  background: #fbfdff;
}

.broadcast-actions .btn-primary,
.ppt-start-btn,
.btn-debate {
  min-height: 34px;
}

.log {
  max-height: 78px;
  color: #94a3b8;
}

.log .entry {
  border-bottom-color: rgba(148,163,184,0.12);
}

.stats-section {
  padding: 10px;
}

.stat-item {
  padding: 6px 4px;
}

.stat-val {
  font-size: 16px;
}

body[data-theme="A"] .task-tab,
body[data-theme="C"] .task-tab,
body[data-theme="D"] .task-tab,
body[data-theme="F"] .task-tab,
body[data-theme="A"] .debate-step,
body[data-theme="C"] .debate-step,
body[data-theme="D"] .debate-step,
body[data-theme="F"] .debate-step,
body[data-theme="A"] .participant-item,
body[data-theme="C"] .participant-item,
body[data-theme="D"] .participant-item,
body[data-theme="F"] .participant-item,
body[data-theme="A"] .summary-panel,
body[data-theme="C"] .summary-panel,
body[data-theme="D"] .summary-panel,
body[data-theme="F"] .summary-panel {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

body[data-theme="A"] .task-tab.active,
body[data-theme="C"] .task-tab.active,
body[data-theme="D"] .task-tab.active,
body[data-theme="F"] .task-tab.active {
  background: var(--accent, #5eead4);
  border-color: var(--accent, #5eead4);
  color: #061018;
}

body[data-theme="A"] .p-meta-row,
body[data-theme="C"] .p-meta-row,
body[data-theme="D"] .p-meta-row,
body[data-theme="F"] .p-meta-row {
  color: var(--text-muted, #8ea3c7);
}

.btn-open-chat {
  background: var(--accent-color, #0a84ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.btn-open-chat:hover { opacity: 0.9; }
