  :root {
    --bg: #0c0d14;
    --bg-card: #12131a;
    --bg-elevated: #1a1c25;
    --bg-hover: #22242e;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-dim: #52525b;
    --accent: #818cf8;
    --accent-dim: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.08);
    --green: #34d399;
    --green-glow: rgba(52, 211, 153, 0.12);
    --red: #f87171;
    --yellow: #fbbf24;
    --orange: #fb923c;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --nav-w: 220px;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --transition: 0.15s ease;
    --transition-slow: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.24);
    --shadow-avatar: 0 1px 4px rgba(0, 0, 0, 0.3);
    --scrollbar-thumb: rgba(255, 255, 255, 0.06);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.12);
    --divider-dash: rgba(255, 255, 255, 0.06);
    --btn-primary-text: #ffffff;
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-shadow: none;
    --input-border: rgba(255, 255, 255, 0.08);
  }

  @media (prefers-color-scheme: light) {
    :root {
      --bg: #f8f8fa;
      --bg-card: #ffffff;
      --bg-elevated: #f0f0f3;
      --bg-hover: #e6e6eb;
      --border: rgba(0, 0, 0, 0.06);
      --border-strong: rgba(0, 0, 0, 0.1);
      --text: #18181b;
      --text-secondary: #52525b;
      --text-dim: #a1a1aa;
      --accent: #4f46e5;
      --accent-dim: #4338ca;
      --accent-glow: rgba(79, 70, 229, 0.07);
      --green: #16a34a;
      --green-glow: rgba(22, 163, 74, 0.1);
      --red: #dc2626;
      --yellow: #ca8a04;
      --orange: #ea580c;
      --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05);
      --shadow-avatar: 0 1px 3px rgba(0, 0, 0, 0.08);
      --scrollbar-thumb: rgba(0, 0, 0, 0.1);
      --scrollbar-thumb-hover: rgba(0, 0, 0, 0.18);
      --divider-dash: rgba(0, 0, 0, 0.06);
      --btn-primary-text: #ffffff;
      --input-bg: #ffffff;
      --input-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
      --input-border: rgba(0, 0, 0, 0.12);
    }
    select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    }
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { background: #ffffff; }
  @media (prefers-color-scheme: light) { html { background: #ffffff; } }

  body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100%;
    margin: 0 auto;
  }

  /* === Nav Sidebar === */
  .nav-rail {
    width: var(--nav-w);
    min-width: var(--nav-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-rail.collapsed { width: 60px; min-width: 60px; }
  .nav-rail.collapsed .nav-brand-text,
  .nav-rail.collapsed .nav-label { display: none; }
  .nav-rail.collapsed .nav-header { padding: 2px 0 0; justify-content: center; }
  .nav-rail.collapsed .nav-item { justify-content: center; padding: 9px 0; }
  .nav-rail.collapsed .nav-toggle { justify-content: center; padding: 8px 0; }

  .nav-header {
    display: flex; align-items: center; gap: 10px;
    padding: 2px 16px 0; margin-bottom: 24px;
  }
  .nav-brand {
    width: 28px; height: 28px;
    background: var(--accent-dim);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: white;
    flex-shrink: 0; letter-spacing: -0.02em;
  }
  .nav-brand-text {
    font-size: 13px; font-weight: 700; color: var(--text);
    letter-spacing: -0.01em; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .nav-items {
    display: flex; flex-direction: column; gap: 1px; width: 100%; flex: 1;
  }
  .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 16px;
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-family: inherit; font-size: 13px;
    transition: color var(--transition), background var(--transition);
    position: relative;
  }
  .nav-icon { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; }
  .nav-icon svg { width: 16px; height: 16px; }
  .nav-label { font-weight: 500; white-space: nowrap; overflow: hidden; }
  .nav-item:hover { color: var(--text-secondary); background: var(--bg-hover); }
  .nav-item.active { color: var(--accent); background: var(--accent-glow); }
  .nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
    width: 2px; background: var(--accent); border-radius: 0 2px 2px 0;
  }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    padding: 8px 0; margin-top: auto; width: 100%;
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; transition: color var(--transition);
  }
  .nav-toggle:hover { color: var(--text-secondary); }
  .nav-toggle svg { width: 14px; height: 14px; flex-shrink: 0; }

  /* === Shared Form Elements === */
  label {
    font-size: 11px; font-weight: 600; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; display: block;
  }
  textarea, input[type="text"], input[type="number"], input[type="password"] {
    width: 100%; background: var(--input-bg); border: 1px solid var(--input-border);
    border-radius: var(--radius-sm); color: var(--text); padding: 9px 12px;
    font-size: 13px; font-family: inherit; resize: vertical; outline: none;
    box-shadow: var(--input-shadow);
    transition: border-color var(--transition), box-shadow var(--transition);
  }
  textarea:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus {
    border-color: var(--accent-dim); box-shadow: 0 0 0 2px var(--accent-glow);
  }
  input[type="password"] { resize: none; font-family: var(--font-mono); letter-spacing: 0.05em; }
  textarea { min-height: 80px; }
  input[type="number"] { width: 80px; }
  select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
    padding-right: 32px !important;
    width: 100%; background-color: var(--input-bg); border: 1px solid var(--input-border);
    border-radius: var(--radius-sm); color: var(--text); padding: 8px 12px;
    font-size: 13px; font-family: inherit; outline: none; box-shadow: var(--input-shadow);
    transition: border-color var(--transition), box-shadow var(--transition);
  }
  select:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 2px var(--accent-glow); }
  input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 15px; height: 15px; border: 1.5px solid var(--input-border); border-radius: 4px;
    background: var(--input-bg); cursor: pointer; position: relative; flex-shrink: 0;
    transition: all var(--transition);
  }
  input[type="checkbox"]:hover { border-color: var(--accent-dim); }
  input[type="checkbox"]:checked { background: var(--accent-dim); border-color: var(--accent-dim); }
  input[type="checkbox"]:checked::before {
    content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
    border: solid white; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
  }
  .field { display: flex; flex-direction: column; }
  .btn {
    padding: 10px; border: none; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all var(--transition); font-family: inherit;
  }
  .btn-primary { background: var(--accent-dim); color: var(--btn-primary-text); }
  .btn-primary:hover { background: var(--accent); }
  .btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }
  .btn-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); }
  .btn-secondary:hover { background: var(--bg-hover); color: var(--text); }
  .btn-danger {
    background: transparent; border: 1px solid rgba(248, 113, 113, 0.3); color: var(--red);
    padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 12px; font-family: inherit; transition: all var(--transition);
  }
  .btn-danger:hover { background: rgba(248, 113, 113, 0.06); border-color: var(--red); }
  .small-btn {
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-dim); padding: 4px 10px; cursor: pointer; font-size: 11px;
    font-family: inherit; transition: all var(--transition); white-space: nowrap;
  }
  .small-btn:hover { border-color: var(--accent-dim); color: var(--accent); }

  /* === Main Layout === */
  .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
  .tab-panel { display: none; flex: 1; overflow: hidden; flex-direction: column; }
  .tab-panel.active { display: flex; }

  /* === Home Panel === */
  .home-panel { overflow-y: auto; padding: 32px 40px; }
  .home-content { max-width: 100%; width: 100%; }
  .home-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
  .home-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 4px; margin-bottom: 28px; }
  .section-label {
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
  }
  .task-type-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px;
  }
  .task-type-card {
    padding: 14px 16px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1.5px solid var(--border);
    cursor: pointer; transition: all var(--transition-slow);
  }
  .task-type-card:hover { border-color: var(--border-strong); background: var(--bg-elevated); }
  .task-type-card.selected { border-color: var(--accent-dim); background: var(--accent-glow); }
  .task-type-card .tt-icon { font-size: 22px; margin-bottom: 6px; }
  .task-type-card .tt-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
  .task-type-card .tt-desc { font-size: 11px; color: var(--text-dim); line-height: 1.5; }

  .home-divider { height: 1px; background: var(--border); margin: 24px 0; }


  .dynamic-fields { display: flex; flex-direction: column; gap: 12px; }

  .agent-select-section {}
  .agent-select-section h3 {
    font-size: 11px; font-weight: 600; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
  }
  .agent-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .agent-chip {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
    color: var(--text); transition: background var(--transition); border: 1px solid var(--border);
  }
  .agent-chip:hover { background: var(--bg-hover); }
  .agent-chip-header { display: flex; align-items: center; gap: 6px; }
  .chip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .chip-skills { display: flex; gap: 3px; flex-wrap: wrap; padding-left: 22px; }
  .chip-skills:empty { display: none; }
  .skill-badge {
    font-size: 9px; padding: 1px 5px; border-radius: 3px;
    background: var(--bg-elevated); color: var(--text-dim); border: 1px solid var(--border);
    max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block;
  }


  .start-actions { display: flex; gap: 10px; }
  .start-actions .btn { flex: 1; }

  /* === Active Panel === */
  .active-panel { flex-direction: row !important; }
  .active-main {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; min-width: 0;
  }
  .active-sidebar {
    width: 200px; min-width: 200px; flex-shrink: 0;
    border-left: 1px solid var(--border);
    padding: 14px 16px;
    overflow-y: auto;
    background: var(--bg-card);
  }
  .sidebar-label {
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 14px;
  }

  .active-header {
    padding: 12px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px; min-height: 48px; flex-shrink: 0;
  }
  .active-header .topic-text {
    font-size: 13px; font-weight: 600; flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .phase-badge {
    font-size: 10px; font-weight: 600; padding: 4px 12px; border-radius: 100px;
    background: var(--accent-dim); color: var(--btn-primary-text); white-space: nowrap;
    transition: all 0.3s; letter-spacing: 0.02em;
  }

  /* === Vertical Phase Progress (in sidebar) === */
  .phase-progress {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0; padding: 0; border-bottom: none;
    overflow: visible; flex-shrink: 0;
  }
  .phase-step {
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
    font-size: 11px; font-weight: 500; color: var(--text-dim); transition: color 0.3s;
    padding: 2px 0;
  }
  .phase-step .step-icon {
    width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 10px; border: 1.5px solid var(--border-strong);
    background: var(--bg); transition: all 0.3s; flex-shrink: 0; font-weight: 600;
  }
  .phase-step.completed .step-icon { background: var(--green); border-color: var(--green); color: white; }
  .phase-step.in_progress .step-icon {
    border-color: var(--accent); color: var(--accent);
    animation: stepPulse 2s infinite;
  }
  .phase-step.in_progress { color: var(--accent); }
  .phase-step.completed { color: var(--green); }
  .phase-connector {
    width: 1.5px; height: 14px;
    background: var(--border-strong);
    margin: 0 0 0 9px;
    flex-shrink: 0;
    transition: background 0.3s;
  }
  .phase-connector.done { background: var(--green); }
  @keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { box-shadow: 0 0 0 5px var(--accent-glow); }
  }

  /* === Message Stream === */
  .messages {
    flex: 1; overflow-y: auto; padding: 16px 20px;
    display: flex; flex-direction: column; gap: 14px;
  }
  .messages > * { max-width: 100%; width: 100%; }
  .messages-empty {
    flex: 1; display: flex; align-items: center; justify-content: center;
  }
  .message { display: flex; gap: 12px; animation: fadeIn 0.3s ease; }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .avatar {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: white; flex-shrink: 0;
    margin-top: 2px;
  }
  .msg-body { flex: 1; min-width: 0; overflow: hidden; }
  .msg-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-width: 0; }
  .msg-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
  .msg-model { font-size: 10px; color: var(--text-dim); white-space: nowrap; }
  .msg-tools {
    display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px;
    padding: 6px 10px; background: var(--bg-elevated); border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
  }
  .tool-tag {
    font-size: 11px; padding: 3px 8px; border-radius: 4px;
    background: var(--bg); color: var(--accent); border: 1px solid var(--border);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
    font-family: var(--font-mono);
  }
  .thinking-tool {
    font-size: 11px; color: var(--accent); font-family: var(--font-mono);
    padding: 4px 10px; background: var(--bg-elevated); border-radius: 4px;
    border: 1px solid var(--border);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 450px;
  }
  .thinking-preview {
    font-size: 12px; color: var(--text-secondary); line-height: 1.5;
    padding: 10px 14px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
    max-width: 600px; white-space: pre-wrap; word-break: break-word;
    max-height: 100px; overflow: hidden;
    border-left: 3px solid var(--accent-dim);
  }
  .msg-phase {
    font-size: 10px; color: var(--text-dim); background: var(--bg-elevated);
    padding: 1px 6px; border-radius: 3px; font-weight: 500;
  }
  .msg-content {
    font-size: 13px; line-height: 1.7; color: var(--text-secondary);
    background: var(--bg-card); border: none; border-left: 3px solid var(--border-strong);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 14px 18px; box-shadow: var(--shadow-card);
  }
  .msg-content h1, .msg-content h2, .msg-content h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 10px 0 3px; }
  .msg-content h1:first-child, .msg-content h2:first-child, .msg-content h3:first-child { margin-top: 0; }
  .msg-content p { margin: 5px 0; }
  .msg-content ul, .msg-content ol { padding-left: 18px; margin: 5px 0; }
  .msg-content li { margin: 2px 0; }
  .msg-content strong { color: var(--text); }
  .msg-content code { background: var(--bg-elevated); padding: 1px 5px; border-radius: 3px; font-size: 12px; font-family: var(--font-mono); }
  .msg-content pre { background: var(--bg-elevated); padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; margin: 8px 0; position: relative; }
  .msg-content pre code { background: none; padding: 0; font-size: 12px; line-height: 1.5; }
  .msg-content pre .copy-btn {
    position: absolute; top: 6px; right: 6px;
    background: var(--bg-hover); border: 1px solid var(--border); border-radius: 4px;
    color: var(--text-dim); font-size: 10px; padding: 2px 8px; cursor: pointer;
    font-family: inherit; opacity: 0; transition: opacity 0.15s;
  }
  .msg-content pre:hover .copy-btn { opacity: 1; }
  .msg-content pre .copy-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
  .msg-content .table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 8px 0; }
  .msg-content table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .msg-content th, .msg-content td { border-bottom: 1px solid var(--border); padding: 6px 10px; text-align: left; }
  .msg-content th { background: var(--bg-elevated); color: var(--text); font-weight: 600; }
  .msg-content tr:last-child td { border-bottom: none; }
  .msg-content blockquote { border-left: 3px solid var(--accent-dim); padding-left: 12px; margin: 8px 0; color: var(--text-dim); }

  .thinking {
    display: flex; gap: 12px; padding: 10px 0; animation: fadeIn 0.3s ease;
    align-items: flex-start;
  }
  .thinking-body {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px;
  }
  .thinking-header {
    display: flex; align-items: center; gap: 8px;
  }
  .thinking-dots { display: flex; gap: 4px; align-items: center; }
  .thinking-dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite ease-in-out both; }
  .thinking-dots span:nth-child(1) { animation-delay: 0s; }
  .thinking-dots span:nth-child(2) { animation-delay: 0.16s; }
  .thinking-dots span:nth-child(3) { animation-delay: 0.32s; }
  @keyframes pulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
  }

  .phase-divider {
    display: flex; align-items: center; gap: 12px; padding: 4px 0;
    color: var(--accent); font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .phase-divider::before, .phase-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

  .final-banner {
    border-top: 1px solid var(--border); padding: 20px 24px;
    background: linear-gradient(to top, var(--accent-glow), transparent);
    max-height: 40vh; overflow-y: auto; display: none;
  }
  .final-banner > * { max-width: 100%; }
  .final-banner.show { display: block; animation: slideUp 0.35s ease; }
  @keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
  .final-banner h3 { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
  .final-content { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
  .final-content strong { color: var(--text); }
  .final-content h1, .final-content h2, .final-content h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 10px 0 3px; }
  .final-content ul, .final-content ol { padding-left: 18px; }

  .user-ask {
    padding: 16px; margin: 6px 0; background: var(--bg-card);
    border: 1px solid rgba(251, 191, 36, 0.25); border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease;
  }
  .user-ask .ask-question { font-size: 13px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 10px; }
  .user-ask textarea { min-height: 56px; margin-bottom: 8px; }
  .user-ask .ask-actions { display: flex; gap: 6px; }
  .user-ask .ask-actions button {
    padding: 7px 16px; border: none; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all var(--transition);
  }
  .btn-send { background: var(--yellow); color: var(--btn-primary-text); }
  .btn-send:hover { filter: brightness(0.9); }
  .btn-skip { background: transparent; color: var(--text-dim); border: 1px solid var(--border-strong) !important; }
  .btn-skip:hover { background: var(--bg-hover); color: var(--text-secondary); }

  .status-bar {
    padding: 8px 24px; border-top: 1px solid var(--border); font-size: 11px;
    color: var(--text-dim); display: flex; justify-content: space-between; background: var(--bg-card);
    flex-shrink: 0;
  }
  .status-bar span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* === Two-Column Split Panels === */
  .split-panel { flex-direction: row !important; }
  .split-list {
    width: 280px; min-width: 280px; background: var(--bg-card);
    border-right: 1px solid var(--border); overflow-y: auto;
    display: flex; flex-direction: column;
  }
  .split-list-header {
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.08em;
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  }
  .split-list-body { flex: 1; overflow-y: auto; }
  .split-editor { flex: 1; overflow-y: auto; padding: 28px 32px; display: flex; flex-direction: column; }
  .report-viewer-header {
    flex-shrink: 0; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px;
    overflow: hidden;
  }
  .report-viewer-body { flex: 1; overflow-y: auto; }
  .split-editor-empty { color: var(--text-dim); font-size: 13px; text-align: center; margin-top: 30vh; }

  .report-viewer-toolbar,
  .report-meta,
  .report-discussion-view,
  .report-raw-view { max-width: 100%; }

  .list-card {
    padding: 10px 18px; cursor: pointer; border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent; transition: all var(--transition);
    display: flex; align-items: center; gap: 10px;
  }
  .list-card:hover { background: var(--bg-hover); }
  .list-card.active { background: var(--bg-hover); border-left-color: var(--accent); }
  .list-card-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .list-card-info { flex: 1; min-width: 0; overflow: hidden; }
  .list-card-name {
    font-size: 13px; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .list-card-meta {
    font-size: 11px; color: var(--text-dim); display: flex; gap: 5px;
    align-items: center; margin-top: 2px; flex-wrap: nowrap;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .role-tag {
    font-size: 9px; padding: 1px 6px; border-radius: 3px;
    background: var(--bg-hover); color: var(--text-dim); border: 1px solid var(--border);
  }
  .role-tag.mod { border-color: var(--accent-dim); color: var(--accent); background: var(--accent-glow); }
  .cat-badge {
    font-size: 9px; padding: 1px 6px; border-radius: 3px;
    background: var(--bg-hover); color: var(--text-dim); border: 1px solid var(--border);
  }

  .editor-form { max-width: 100%; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-row .field { margin-bottom: 0; }
  .editor-form .field { margin-bottom: 14px; }
  .editor-form textarea.edit-prompt { min-height: 140px; resize: vertical; }
  .editor-actions {
    display: flex; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
  }
  .editor-actions .btn { min-width: 72px; }

  .color-picker { display: flex; gap: 6px; flex-wrap: wrap; }
  .color-dot {
    width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
    border: 2px solid transparent; transition: border-color var(--transition), transform 0.12s;
  }
  .color-dot:hover { transform: scale(1.12); }
  .color-dot.active { border-color: var(--text); }

  .role-checkboxes { display: flex; gap: 14px; }
  .role-checkboxes label {
    font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px;
    cursor: pointer; text-transform: none; letter-spacing: 0;
  }

  .skills-multi-select { display: flex; flex-wrap: wrap; gap: 5px; }
  .skill-chip-option {
    display: flex; align-items: center; gap: 5px; padding: 4px 10px;
    border-radius: var(--radius-sm); cursor: pointer; font-size: 12px;
    color: var(--text-secondary); background: var(--bg); border: 1px solid var(--border);
    transition: all var(--transition);
  }
  .skill-chip-option:hover { border-color: var(--border-strong); }
  .skill-chip-option.selected { border-color: var(--accent-dim); color: var(--accent); background: var(--accent-glow); }
  .skill-chip-option input[type="checkbox"] { display: none; }

  /* === History Panel === */
  .report-card {
    padding: 12px 18px; cursor: pointer; border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent; transition: all var(--transition);
  }
  .report-card:hover { background: var(--bg-hover); }
  .report-card.active { background: var(--bg-elevated); border-left-color: var(--accent); }
  .report-card-topic {
    font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 3px;
    display: flex; align-items: center; gap: 6px;
    min-width: 0; overflow: hidden;
  }
  .report-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
  .report-type-tag {
    font-size: 9px; padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
    background: var(--bg-elevated); color: var(--text-dim); border: 1px solid var(--border);
  }
  .report-type-tag:empty { display: none; }
  .report-card-meta { font-size: 10px; color: var(--text-dim); display: flex; justify-content: space-between; align-items: center; }
  .report-card-delete {
    background: none; border: none; color: var(--text-dim); font-size: 11px;
    cursor: pointer; padding: 2px; opacity: 0; transition: opacity 0.12s;
  }
  .report-card:hover .report-card-delete { opacity: 1; }
  .report-card-delete:hover { color: var(--red); }

  .report-viewer-toolbar {
    display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px;
  }
  .view-toggle-group { display: flex; gap: 1px; background: var(--bg); border-radius: var(--radius-sm); padding: 2px; border: 1px solid var(--border); }
  .view-toggle {
    background: none; border: none; color: var(--text-dim);
    font-size: 11px; padding: 4px 14px; border-radius: 4px; cursor: pointer;
    font-family: inherit; transition: all var(--transition); font-weight: 500;
  }
  .view-toggle:hover { color: var(--text); }
  .view-toggle.active { background: var(--bg-elevated); color: var(--text); }

  .report-meta { }
  .report-meta-topic {
    font-size: 15px; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.01em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .report-meta-info {
    font-size: 11px; color: var(--text-dim);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  .report-rendered {
    font-size: 14px; line-height: 1.8; color: var(--text-secondary); max-width: 100%;
    background: #fff; padding: 32px 40px; border-radius: var(--radius-md); border: 1px solid var(--border);
  }
  .report-rendered h1 {
    font-size: 22px; font-weight: 700; color: var(--text); margin: 32px 0 12px;
    letter-spacing: -0.02em; padding-bottom: 8px; border-bottom: 2px solid var(--accent-dim);
  }
  .report-rendered h1:first-child { margin-top: 0; }
  .report-rendered h2 {
    font-size: 17px; font-weight: 600; color: var(--text); margin: 28px 0 10px;
    padding-bottom: 6px; border-bottom: 1px solid var(--border);
  }
  .report-rendered h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 20px 0 6px; }
  .report-rendered h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 16px 0 4px; }
  .report-rendered p { margin: 8px 0; }
  .report-rendered ul, .report-rendered ol { padding-left: 22px; margin: 8px 0; }
  .report-rendered li { margin: 4px 0; line-height: 1.7; }
  .report-rendered li > ul, .report-rendered li > ol { margin: 2px 0; }
  .report-rendered strong { color: var(--text); font-weight: 600; }
  .report-rendered em { color: var(--text-secondary); font-style: italic; }
  .report-rendered code {
    background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px;
    font-size: 12px; font-family: var(--font-mono); color: var(--accent);
  }
  .report-rendered pre {
    background: var(--bg-elevated); padding: 16px 18px; border-radius: var(--radius-md);
    overflow-x: auto; margin: 12px 0; position: relative; border: 1px solid var(--border);
  }
  .report-rendered pre code { background: none; padding: 0; font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
  .report-rendered hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
  .report-rendered table {
    width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px;
    border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border);
  }
  .report-rendered th {
    background: var(--bg-elevated); color: var(--text); font-weight: 600;
    padding: 10px 14px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em;
  }
  .report-rendered td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
  .report-rendered tr:last-child td { border-bottom: none; }
  .report-rendered tr:nth-child(even) td { background: rgba(0, 0, 0, 0.015); }
  .report-rendered blockquote {
    border-left: 3px solid var(--accent-dim); padding: 8px 16px; margin: 12px 0;
    color: var(--text-dim); background: var(--bg-elevated); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .report-rendered blockquote p { margin: 4px 0; }
  .report-rendered img { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; }
  .report-rendered a { color: var(--accent); text-decoration: none; }
  .report-rendered a:hover { text-decoration: underline; }

  .report-toc-layout { display: flex; gap: 24px; align-items: flex-start; }
  .report-toc-layout > .report-rendered { flex: 1; min-width: 0; }

  .report-toc {
    position: sticky; top: 0;
    width: 200px; min-width: 200px; flex-shrink: 0;
    max-height: calc(100vh - 140px); overflow-y: auto;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 14px 16px; font-size: 12px;
  }
  .toc-title {
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px;
  }
  .report-toc ul { list-style: none; padding: 0; margin: 0; }
  .report-toc li { line-height: 1.4; margin: 2px 0; }
  .report-toc li a {
    color: var(--text-dim); text-decoration: none;
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 2px 0; transition: color var(--transition);
  }
  .report-toc li a:hover { color: var(--accent); }
  .report-toc .toc-l2 { padding-left: 12px; }
  .report-toc .toc-l3 { padding-left: 24px; font-size: 11px; }

  /* === About Panel === */
  .about-panel { overflow-y: auto; padding: 32px 40px; }
  .about-content { max-width: 100%; }
  .about-content h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
  .about-content .about-subtitle { font-size: 13px; color: var(--text-dim); margin-bottom: 32px; }
  .about-content h2 { font-size: 14px; font-weight: 700; color: var(--text); margin: 28px 0 12px; text-transform: uppercase; letter-spacing: 0.04em; }
  .about-content h2:first-of-type { margin-top: 0; }
  .about-content p, .about-content li { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
  .about-content p { margin: 6px 0; }
  .about-content ul, .about-content ol { padding-left: 20px; margin: 8px 0; }
  .about-content li { margin: 4px 0; }
  .about-content code {
    background: var(--bg-elevated); padding: 2px 6px; border-radius: 3px;
    font-size: 12px; font-family: var(--font-mono); color: var(--accent);
  }
  .about-content pre {
    background: var(--bg-elevated); padding: 14px 18px; border-radius: var(--radius-sm);
    overflow-x: auto; margin: 10px 0; font-size: 12px; line-height: 1.6;
    font-family: var(--font-mono); color: var(--text-secondary); border: 1px solid var(--border);
  }
  .about-content pre code { background: none; padding: 0; color: inherit; }
  .about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
  .about-card {
    padding: 14px 16px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border);
  }
  .about-card .ac-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
  .about-card .ac-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
  .about-divider { height: 1px; background: var(--border); margin: 28px 0; }
  .about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

  /* === Empty States === */
  .empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 24px; color: var(--text-dim); text-align: center; gap: 12px;
  }
  .empty-state svg { width: 40px; height: 40px; stroke: var(--border-strong); margin-bottom: 4px; }
  .empty-state .empty-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
  .empty-state .empty-desc { font-size: 12px; line-height: 1.5; max-width: 240px; }
  .empty-state .btn { margin-top: 4px; padding: 7px 20px; font-size: 12px; }

  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

