/* Clayrune product UI — EXTRACTED VERBATIM from the app's static/css/app.css.
 * Do NOT hand-edit. Re-run the extractor when the app UI changes.
 * Includes @media AND @container rules — the 3-pane is driven by a
 * `convpane` container query, so dropping @container silently breaks it.
 */

:root {
    --bg:          #0c0e14;
    --surface:     #14171f;
    --surface2:    #1a1e28;
    --surface3:    #222733;
    --border:      #252a38;
    --border2:     #333a4d;
    --text:        #e8ecf4;
    --text-dim:    #8e99ae;
    --text-faint:  #556070;
    --accent:      #5b9ef5;
    --accent-dim:  #1a3a6a;
    --accent-soft: #3a6bb5;
    --green:       #34d399;
    --green-dim:   #163326;
    --green-text:  #6ee7b7;
    --amber:       #f0b429;
    --amber-dim:   #3a2e10;
    --amber-text:  #fcd34d;
    --red:         #f06060;
    --red-dim:     #3a1616;
    --red-text:    #fca5a5;
    --purple:      #a78bfa;
    --purple-dim:  #3f2e80;
    --purple-text: #c4b5fd;
    --sidebar-w:   52px;
    --sidebar-exp: 220px;
    --header-h:    48px;
  }
:root { --scrim-rgb: 12, 14, 20; }
body.tone-warm { --scrim-rgb: 246, 240, 228; }
body.tone-warm {
    --bg:          #f6f0e4;
    --surface:     #ffffff;
    --surface2:    #fbf7ee;
    --surface3:    #efe7d6;
    --border:      #e8e0cd;
    --border2:     #c9bea6;
    --text:        #201c16;
    --text-dim:    #5a5247;
    --text-faint:  #8a8172;
    --green:       #2f8a5b;
    --green-dim:   #dff2e6;
    --green-text:  #2f8a5b;
    --amber:       #c77a1a;
    --amber-dim:   #fbe6c7;
    --amber-text:  #a15e10;
    --red:         #c23a3a;
    --red-dim:     #f8dcdc;
    --red-text:    #a12a2a;
  }
body.tone-warm[data-accent="sunset"] { --accent-dim: #f5dcc5; --accent-soft: #d36a30; }
body.tone-warm[data-accent="rose"] { --accent-dim: #f3d4dc; --accent-soft: #b84e6a; }
body.tone-warm[data-accent="lilac"] { --accent-dim: #e0dcf5; --accent-soft: #6e63c0; }
body.tone-warm[data-accent="lagoon"] { --accent-dim: #d3eae6; --accent-soft: #3b8f80; }
body.tone-warm[data-accent="ink"] { --accent-dim: #dcdde3; --accent-soft: #3a4055; }
body.tone-warm:not([data-accent]) { --accent-dim: #d6e7fb; --accent-soft: #4888de; }
body.tone-warm[data-accent=""] { --accent-dim: #d6e7fb; --accent-soft: #4888de; }
body.tone-warm .project-name,
  body.tone-warm h1,
  body.tone-warm h2,
  body.tone-warm h3 {
    font-family: 'Nunito', 'Inter', sans-serif;
    letter-spacing: -0.01em;
  }
body.tone-warm .mc-seg button.active,
  body.tone-editorial .mc-seg button.active { background: var(--text); color: var(--surface); box-shadow: none; }
body.tone-warm .card,
  body.tone-warm .list-row,
  body.tone-editorial .card,
  body.tone-editorial .list-row { border: 2px solid var(--border2); }
body.tone-warm .card.status-blocked,
  body.tone-editorial .card.status-blocked,
  body.tone-warm .card.friendly-stuck,
  body.tone-editorial .card.friendly-stuck { box-shadow: 0 4px 0 var(--red); }
body.tone-warm .card.status-waiting,
  body.tone-editorial .card.status-waiting,
  body.tone-warm .card.friendly-asking,
  body.tone-editorial .card.friendly-asking { box-shadow: 0 4px 0 var(--amber); }
body.tone-warm .card:hover,
  body.tone-editorial .card:hover { box-shadow: 0 8px 0 rgba(32,28,22,0.10); }
.agent-tab-pin-mark {
    background: none; border: none; cursor: pointer; flex-shrink: 0;
    padding: 0 2px; line-height: 1; font-size: 11px;
    opacity: 0; filter: grayscale(1); transition: opacity .12s, filter .12s;
  }
.agent-tab:hover .agent-tab-pin-mark { opacity: 0.5; }
.agent-tab-pin-mark.pinned,
  .agent-tab:hover .agent-tab-pin-mark.pinned { opacity: 1; filter: none; }
.conv-pin-mark {
    background: none; border: none; cursor: pointer; flex-shrink: 0;
    padding: 2px 4px; line-height: 1; font-size: 13px; margin-left: 4px;
    opacity: 0.4; filter: grayscale(1); transition: opacity .12s, filter .12s;
  }
.conv-pin-mark.pinned { opacity: 1; filter: none; }
.agent-image-previews {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
  }
.agent-image-preview {
    position: relative; width: 64px; height: 64px; border-radius: 5px;
    overflow: hidden; border: 1px solid var(--border); background: var(--surface3);
    flex-shrink: 0;
  }
.agent-image-preview img {
    width: 100%; height: 100%; object-fit: cover;
  }
.agent-file-preview {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: var(--text-dim); text-align: center; padding: 4px;
    word-break: break-all; line-height: 1.2;
  }
.agent-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; padding: 1px 6px; border-radius: 3px;
    background: var(--accent-dim); color: var(--accent);
    font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase;
  }
.agent-badge.in-progress { background: var(--green-dim); color: var(--green-text); }
.agent-badge.in-progress::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: agent-pulse 1.6s infinite; }
.agent-activity-line { font-size: 11px; color: var(--green-text); font-style: italic; margin-top: 2px; }
.create-preview-item:hover .create-preview-remove,
  .agent-image-preview:hover .create-preview-remove { opacity: 1; }
@media (max-width: 960px) {
.agent-console { display: none !important; }
.agent-panel { padding: 6px 10px 6px 12px !important; }
.agent-panel-header { margin-bottom: 4px !important; }
.agent-panel-header .section-title { display: none !important; }
.agent-tab-bar {
      gap: 4px !important; flex-wrap: nowrap !important;
      overflow-x: auto !important; -webkit-overflow-scrolling: touch;
      margin-bottom: 6px !important; padding-bottom: 2px !important;
    }
.agent-tab-bar::-webkit-scrollbar { display: none; }
.agent-tab { padding: 4px 8px !important; font-size: 11px !important; max-width: 110px !important; flex-shrink: 0 !important; }
.agent-tab-new { padding: 4px 8px !important; font-size: 11px !important; flex-shrink: 0 !important; white-space: nowrap; }
.agent-activity { display: none !important; }
.agent-chat-separator { display: none !important; }
}
@media (max-height: 750px) {
.agent-panel { padding: 6px 12px 6px 16px !important; }
.agent-panel-header { margin-bottom: 2px !important; }
.agent-panel-header .section-title { display: none !important; }
.agent-tab { padding: 4px 8px !important; }
}
@media (max-width: 960px) {
body.tone-warm .card,
    body.tone-editorial .card {
      border-color: var(--text) !important;
      box-shadow: 0 4px 0 rgba(32, 28, 22, 0.10);
    }
body.tone-warm .card-avatar,
    body.tone-editorial .card-avatar { border-color: var(--text); }
}
.agent-panel {
    padding: 16px 18px 16px 22px;
    display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden;
  }
.agent-panel.agent-3pane { flex-direction: row; padding: 0; container-type: inline-size; container-name: convpane; }
@container convpane (min-width: 1100px) {
.agent-panel.agent-3pane .agent-rail { width: 300px; }
}
@container convpane (min-width: 1500px) {
.agent-panel.agent-3pane .agent-rail { width: 340px; }
.agent-panel.agent-3pane .agent-main .agent-chat { align-self: center; width: 100%; max-width: 900px; }
}
@container convpane (min-width: 2000px) {
.agent-panel.agent-3pane .agent-rail { width: 380px; }
.agent-panel.agent-3pane .agent-main .agent-chat { max-width: 1040px; }
}
.agent-surfaces { display: none; }
@container convpane (min-width: 1900px) {
.agent-panel.agent-3pane .agent-main .agent-chat { max-width: none; align-self: stretch; }
.agent-surfaces {
      display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
      width: 320px; min-height: 0; overflow-y: auto;
      padding: 16px 14px; background: var(--surface3);
      border-left: 1px solid var(--border);
    }
}
.agent-surfaces-title {
    font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
    color: var(--text-dim); margin-bottom: 2px; flex-shrink: 0;
  }
.surface-card {
    display: block; width: 100%; text-align: left; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 11px 13px; font-family: inherit; color: var(--text);
    transition: border-color 0.12s, box-shadow 0.12s;
  }
.surface-card:hover { border-color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
.surface-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.surface-card-head .surface-ic { font-size: 14px; }
.surface-card-head .surface-name { font-size: 13px; font-weight: 600; }
.surface-card-head .surface-sub { margin-left: auto; font-size: 11px; color: var(--text-faint); font-weight: 600; }
.surface-card-body { display: flex; flex-direction: column; gap: 3px; }
.surface-line { font-size: 11.5px; color: var(--text-dim); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.surface-line.surface-empty { color: var(--text-faint); font-style: italic; }
.agent-3pane .agent-rail {
    width: 264px; flex-shrink: 0; display: flex; flex-direction: column;
    border-right: 1px solid var(--border); overflow: hidden; min-height: 0;
    
    background: var(--surface3);
  }
.agent-3pane .agent-rail-resizer {
    flex-shrink: 0; width: 7px; margin: 0 -4px; cursor: col-resize;
    position: relative; z-index: 2; background: transparent; transition: background 0.12s;
  }
.agent-3pane .agent-rail-resizer:hover { background: var(--accent-dim); }
.agent-3pane .agent-rail-new {
    
    margin: 12px 12px 8px; width: auto; flex-shrink: 0; padding: 9px 12px;
    background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 10px;
    font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; line-height: 1.2;
  }
.agent-3pane .agent-rail-search-wrap {
    margin: 0 12px 10px; flex-shrink: 0; position: relative; display: flex; align-items: center;
  }
.agent-3pane .agent-rail-search-icon {
    position: absolute; left: 11px; display: flex; color: var(--text-faint); pointer-events: none;
  }
.agent-3pane .agent-rail-search {
    flex: 1; width: 100%; padding: 10px 11px 10px 34px; box-sizing: border-box;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); font-size: 12.5px; outline: none;
  }
.agent-3pane .agent-rail-search:focus { border-color: var(--accent); }
.agent-3pane .agent-rail-search:focus + .agent-rail-search-icon,
  .agent-3pane .agent-rail-search-wrap:focus-within .agent-rail-search-icon { color: var(--accent); }
.agent-3pane .agent-rail-search::placeholder { color: var(--text-faint); }
.agent-3pane .agent-rail-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 10px; scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }
.agent-3pane .agent-rail-list::-webkit-scrollbar { width: 8px; }
.agent-3pane .agent-rail-list::-webkit-scrollbar-track { background: transparent; }
.agent-3pane .agent-rail-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; border: 2px solid transparent; background-clip: content-box; }
.agent-3pane .agent-rail-list::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }
.agent-3pane .agent-rail-list .conv-row {
    border-bottom: none; border-radius: 10px; margin: 1px 0; padding: 9px 11px;
  }
.agent-3pane .agent-rail-list .conv-row.conv-live-waiting,
  .agent-3pane .agent-rail-list .conv-row.conv-live-working { background: transparent; }
.agent-3pane .agent-rail-list .conv-row:hover,
  .agent-3pane .agent-rail-list .conv-row.conv-live-waiting:hover,
  .agent-3pane .agent-rail-list .conv-row.conv-live-working:hover {
    background: var(--bg); box-shadow: inset 0 0 0 1px var(--border2);
  }
.agent-3pane .agent-rail-list .conv-row.active,
  .agent-3pane .agent-rail-list .conv-row.active:hover {
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    
    padding: 8px 10px;
  }
.agent-3pane .agent-rail-empty { padding: 22px 16px; color: var(--text-faint); font-size: 12px; text-align: center; }
.agent-3pane .conv-list { border: none; border-radius: 0; }
.agent-3pane .conv-list-header { padding: 2px 10px 6px; }
.agent-3pane .agent-main {
    flex: 1; min-width: 0; display: flex; flex-direction: column;
    overflow: hidden; min-height: 0; padding: 16px 18px;
    
    background: var(--bg);
  }
.agent-3pane .agent-main .agent-chat { height: auto !important; flex: 1 1 auto; min-height: 0; }
.agent-3pane .agent-main .agent-output { flex: 1 1 auto; min-height: 0; }
.agent-3pane .agent-main .agent-chat { border: none; border-radius: 0; background: transparent; }
.agent-3pane .agent-main .agent-output { background: var(--bg); padding: 16px 14px; gap: 10px; }
.agent-3pane .agent-main .agent-output .agent-line:not(.agent-line-prompt):not(.agent-line-tool):not(.agent-line-status):not(.agent-line-error):not(.agent-line-queued):not(.agent-line-followup) {
    background: var(--surface); border-color: var(--border);
  }
.agent-3pane .agent-main .agent-chat-input { background: var(--bg); border-top: none; }
.agent-3pane .agent-main .agent-chat-input-row {
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-radius: 22px; padding: 5px 6px; gap: 4px; align-items: center;
  }
.agent-3pane .agent-main .agent-chat-input-row.drag-over { border-color: var(--accent); }
.agent-3pane .agent-main .agent-chat-input-row .btn-composer-plus {
    flex-shrink: 0; width: 34px; height: 34px; border: none; border-radius: 9px;
    background: var(--accent-dim); color: var(--accent);
    font-size: 22px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: filter 0.12s;
  }
.agent-3pane .agent-main .agent-chat-input-row .btn-composer-plus:hover { filter: brightness(0.96); }
.agent-3pane .agent-main .agent-chat-input-row .agent-task-input {
    background: transparent !important; border: none !important; outline: none !important;
    padding: 8px 4px;
  }
.agent-3pane .agent-main .agent-chat-input-row .btn-attach,
  .agent-3pane .agent-main .agent-chat-input-row .btn-mic {
    background: transparent !important; border: none !important; color: var(--text-dim);
    width: 36px; height: 36px;
  }
.agent-3pane .agent-main .agent-chat-input-row .btn-attach { font-size: 22px; }
.agent-3pane .agent-main .agent-chat-input-row .btn-attach:hover,
  .agent-3pane .agent-main .agent-chat-input-row .btn-mic:hover { color: var(--text); background: transparent !important; }
.agent-3pane .agent-main .agent-chat-input-row .btn-dispatch { border-radius: 16px; }
.agent-panel-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    user-select: none; flex-shrink: 0;
  }
.agent-panel-header .section-title { margin-bottom: 0; flex: 1; }
.agent-status-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  }
.agent-status-dot.idle { background: var(--accent); box-shadow: 0 0 4px var(--accent); }
.agent-status-dot.running { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s infinite; }
.agent-status-dot.completed { background: var(--accent); }
.agent-status-dot.error { background: var(--red); }
.agent-status-dot.recovering { background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: pulse 2s infinite; }
.agent-status-dot.needs-attention { background: #f97316; box-shadow: 0 0 6px #f97316; animation: pulse 1s infinite; }
.agent-status-dot.stopped { background: var(--amber); }
.agent-status-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600;
  }
.agent-status-label.idle { color: var(--accent); }
.agent-status-label.running { color: var(--green-text); }
.agent-status-label.completed { color: var(--accent); }
.agent-status-label.error { color: var(--red-text); }
.agent-status-label.stopped { color: var(--amber-text); }
.agent-activity {
    font-size: 11px; font-family: 'JetBrains Mono', monospace;
    color: var(--amber-text); opacity: 0.85; margin-left: 6px;
    max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    animation: activity-fade 1.5s ease-in-out infinite;
  }
.agent-tab-bar {
    display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap;
    align-items: center; flex-shrink: 0;
  }
.agent-tab {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 10px; border-radius: 5px;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text-dim); font-size: 11px; font-weight: 500;
    cursor: pointer; transition: all 0.15s; max-width: 180px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
.agent-tab:hover { border-color: var(--border2); color: var(--text); }
.agent-tab.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.agent-tab .agent-status-dot { width: 6px; height: 6px; flex-shrink: 0; }
.agent-tab-label {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
.agent-tab-close {
    background: none; border: none; color: var(--text-faint);
    cursor: pointer; font-size: 11px; padding: 0 2px; line-height: 1;
    opacity: 0; transition: opacity 0.15s, color 0.15s; flex-shrink: 0;
    margin-left: 2px;
  }
.agent-tab:hover .agent-tab-close { opacity: 1; }
.agent-tab-close:hover { color: var(--red); }
.agent-tab-new {
    padding: 5px 10px; border-radius: 5px;
    background: none; border: 1px dashed var(--border);
    color: var(--text-faint); font-size: 11px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
  }
.agent-tab-new:hover { border-color: var(--accent); color: var(--accent); }
.agent-tab-incognito { font-size: 10px; line-height: 1; flex-shrink: 0; opacity: 0.85; }
.agent-tab.incognito {
    border-style: dashed;
    background: linear-gradient(180deg, var(--surface3, var(--bg)) 0%, var(--bg) 100%);
  }
.agent-tab.incognito.active {
    border-color: #9ca3af; color: var(--text);
    background: rgba(120, 120, 140, 0.12);
  }
.conv-list-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px; flex-shrink: 0;
  }
.conv-list-title {
    font-size: 12px; font-weight: 700; letter-spacing: 0.4px;
    text-transform: uppercase; color: var(--text-dim); flex: 1;
  }
.conv-list-count {
    font-size: 11px; font-weight: 600; color: var(--text-faint);
  }
.conv-new-btn, .conv-back-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: 6px;
    background: none; border: 1px dashed var(--border);
    color: var(--text-faint); font-size: 11px; font-weight: 600;
    cursor: pointer; transition: all 0.15s; flex-shrink: 0;
  }
.conv-new-btn:hover, .conv-back-btn:hover {
    border-color: var(--accent); color: var(--accent);
  }
.conv-back-bar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px; flex-shrink: 0;
  }
.conv-back-btn { border-style: solid; }
.conv-list {
    display: flex; flex-direction: column;
    border: 1px solid var(--border); border-radius: 8px;
    overflow: hidden; flex-shrink: 0;
  }
.conv-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
  }
.conv-row:last-child { border-bottom: none; }
.conv-row:hover { background: var(--surface3); }
.conv-av {
    position: relative; width: 42px; height: 42px; flex-shrink: 0;
    border-radius: 50%; display: grid; place-items: center;
    background: var(--surface3); border: 2px solid var(--border2);
    font-size: 19px; line-height: 1;
  }
.conv-av.friendly-working { border-color: #6aa66a; }
.conv-av.friendly-asking { border-color: var(--amber); }
.conv-av.friendly-stuck { border-color: var(--red); }
.conv-av.friendly-done { border-color: #6aa66a; }
.conv-ring { display: none; }
.conv-av.friendly-working .conv-ring {
    display: block; position: absolute; inset: -2px; border-radius: 50%;
    border: 2px solid #6aa66a; animation: crPulse 1.6s ease-out infinite;
  }
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.conv-name {
    flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
.conv-time { font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
.conv-live-badge {
    flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .2px;
    padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  }
.conv-live-badge.working { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.conv-live-badge.waiting { background: color-mix(in srgb, #f97316 20%, transparent); color: #f97316; }
.conv-row.conv-live-waiting { background: color-mix(in srgb, #f97316 7%, transparent); }
.conv-row.conv-live-waiting:hover { background: color-mix(in srgb, #f97316 12%, transparent); }
.conv-bot {
    display: flex; align-items: center; gap: 8px; margin-top: 2px; min-width: 0;
  }
.conv-sub {
    flex: 1; min-width: 0; font-size: 12px; color: var(--text-dim);
    line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
.conv-sub .agent-status-dot { width: 7px; height: 7px; flex-shrink: 0; }
.conv-badges { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.conv-tag {
    font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
    background: var(--surface3); color: var(--text-faint);
  }
.conv-tag.orch { background: var(--accent-dim); color: var(--accent); }
.conv-tag.inc { background: rgba(120,120,140,0.18); color: var(--text-dim); }
.conv-tag.char {
    background: rgba(139,92,246,0.16); color: #a78bfa;
    text-transform: none; letter-spacing: 0.2px; font-weight: 600;
    max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
.conv-row-close {
    background: none; border: none; color: var(--text-faint);
    cursor: pointer; font-size: 13px; padding: 2px 4px; line-height: 1;
    opacity: 0; transition: opacity 0.15s, color 0.15s; flex-shrink: 0;
  }
.conv-row:hover .conv-row-close { opacity: 1; }
.conv-row-close:hover { color: var(--red); }
.composer-controls-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
.composer-provider-row {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 4px 0 8px;
  }
.composer-provider-label {
    font-size: 11px; font-weight: 600; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: 0.04em;
  }
.composer-provider-select {
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-family: 'Inter', sans-serif; font-size: 11px;
    font-weight: 500; padding: 3px 8px; border-radius: 999px;
    cursor: pointer; outline: none; transition: border-color 0.15s;
  }
.composer-provider-select:hover { border-color: var(--text-dim); }
.agent-input-row { display: flex; gap: 8px; margin-bottom: 10px; }
.agent-task-input {
    flex: 1; background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-family: 'Inter', sans-serif; font-size: 13px;
    padding: 8px 12px; border-radius: 5px; outline: none; resize: none;
    min-height: 38px; line-height: 1.5;
    transition: border-color 0.15s;
  }
.agent-task-input:focus { border-color: var(--accent); }
.agent-drop-zone.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; border-radius: 5px; background: var(--accent-dim); }
.agent-task-input::placeholder { color: var(--text-faint); }
@media (max-width: 960px) {
.agent-input-row, .agent-chat-input-row {
      background: var(--bg); border: 1px solid var(--border2);
      border-radius: 24px; padding: 5px 6px 5px 8px; gap: 4px; align-items: center;
    }
.agent-input-row.drag-over, .agent-chat-input-row.drag-over { border-color: var(--accent); }
.agent-input-row .agent-task-input, .agent-chat-input-row .agent-task-input {
      background: transparent !important; border: none !important; outline: none !important;
      min-height: 44px; padding: 10px 4px; resize: none;
    }
.agent-input-row .btn-composer-plus {
      background: var(--surface3); border: none; border-radius: 50%;
      color: var(--accent); width: 34px; height: 34px; font-size: 22px;
    }
.agent-input-row .btn-attach, .agent-input-row .btn-mic,
    .agent-chat-input-row .btn-attach, .agent-chat-input-row .btn-mic {
      background: transparent !important; border: none !important;
      width: 34px; height: 34px; color: var(--text-dim); font-size: 18px;
    }
.btn-send-arrow {
      display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
      width: 36px; height: 36px; border-radius: 50%; border: none;
      background: var(--accent-dim); color: var(--accent);
      font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer;
    }
.btn-send-arrow:active { background: var(--accent); color: #fff; }
}
.composer-empty-state { text-align: center; padding: 22px 8px 14px; }
.composer-empty-state .ces-icon {
    font-size: 26px; width: 46px; height: 46px; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface3); border-radius: 12px;
  }
.composer-empty-state .ces-heading {
    font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px;
  }
.composer-empty-state .ces-sub {
    font-size: 12.5px; color: var(--text-dim); line-height: 1.5; margin-bottom: 16px;
  }
.composer-empty-state .ces-chips { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.composer-empty-state .ces-chip {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    padding: 12px 14px; border-radius: 12px; cursor: pointer; font-size: 13px;
    font-family: inherit; transition: border-color .15s, background .15s;
  }
.composer-empty-state .ces-chip:hover { border-color: var(--accent); }
.composer-empty-state .ces-chip-icon { font-size: 16px; flex-shrink: 0; }
.composer-empty-state .ces-chip-label { flex: 1; }
.composer-empty-state .ces-chip-chev { color: var(--text-faint); font-size: 17px; flex-shrink: 0; }
.conv-list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.mobile-conv-list-view .conv-list { background: var(--surface); }
.conv-newbtn-bar { flex-shrink: 0; background: var(--bg); padding: 8px 0 4px; }
.conv-newbtn {
    width: 100%; background: var(--accent); color: #fff; border: none;
    padding: 13px; border-radius: 12px; font-size: 14px; font-weight: 600;
    cursor: pointer; font-family: 'Inter', sans-serif;
  }
.conv-newbtn:active { filter: brightness(1.06); }
.conv-row .conv-hide {
    flex-shrink: 0; align-self: center; background: transparent; border: none;
    color: var(--text-faint); font-size: 14px; padding: 4px 8px; cursor: pointer;
  }
.conv-row .conv-hide:hover { color: var(--red-text); }
.conv-row.conv-hidden { opacity: 0.5; }
.conv-hidden-toggle {
    display: block; margin: 8px auto 4px; background: transparent; border: none;
    color: var(--accent); font-size: 12px; cursor: pointer; padding: 6px;
  }
.btn-composer-plus {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: transparent; color: var(--text-dim);
    border: 1px solid var(--border2); border-radius: 8px;
    width: 38px; height: 38px; font-size: 22px; line-height: 1; cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
  }
.btn-composer-plus:hover,
  .btn-composer-plus:active { background: var(--surface3); color: var(--text); border-color: var(--accent); }
.composer-plus-status {
    font-size: 11px; color: var(--text-dim); padding: 6px 4px 2px; cursor: pointer;
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  }
.composer-plus-status .cps-change { color: var(--accent); font-weight: 600; }
.composer-sheet-overlay {
    position: fixed; inset: 0; z-index: 9920;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
.composer-sheet-overlay.visible { opacity: 1; pointer-events: auto; }
.composer-sheet {
    width: 100%; max-width: 620px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px 16px 0 0; padding: 8px 16px 16px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
    transform: translateY(100%); transition: transform .25s ease;
    max-height: 85vh; display: flex; flex-direction: column;
  }
.composer-sheet-overlay.visible .composer-sheet { transform: translateY(0); }
.composer-sheet-grip {
    flex-shrink: 0;
    width: 36px; height: 4px; border-radius: 2px; background: var(--border2);
    margin: 6px auto 12px;
  }
.composer-sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.composer-sheet-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-dim); font-weight: 700; margin-bottom: 10px;
  }
.composer-sheet-row { margin-bottom: 12px; }
.composer-sheet-section { margin-bottom: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.composer-sheet-label { font-size: 11px; color: var(--text-dim); font-weight: 600; margin-bottom: 8px; }
.composer-sheet-footer {
    flex-shrink: 0; display: flex; gap: 8px; align-items: stretch;
    padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border);
  }
.composer-sheet-done {
    flex: 1; background: var(--surface2); color: var(--text); border: 1px solid var(--border2);
    padding: 11px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: 'Inter', sans-serif;
  }
.composer-sheet-resume {
    flex: 2; background: var(--green); color: #fff; border: none;
    padding: 11px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
    font-family: 'Inter', sans-serif;
  }
.composer-sheet-resume:hover { filter: brightness(1.06); }
.composer-sheet .conv-preview-body { max-height: 22vh; }
.conv-preview {
    margin-top: 12px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); overflow: hidden;
    display: flex; flex-direction: column;
  }
.conv-preview-head {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px 7px 12px; background: var(--surface2);
    border-bottom: 1px solid var(--border);
  }
.conv-preview-title {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-faint); flex-shrink: 0;
  }
.conv-preview-sub {
    font-size: 12px; color: var(--text); flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
.conv-preview-open {
    flex-shrink: 0; font-size: 11px; padding: 3px 9px; cursor: pointer;
    background: transparent; border: 1px solid var(--border);
    border-radius: 4px; color: var(--text-faint); transition: all 0.12s;
  }
.conv-preview-open:hover { color: var(--text); border-color: var(--accent); }
.conv-preview-body { padding: 10px 12px; max-height: 42vh; overflow-y: auto; }
.conv-preview-empty {
    padding: 22px 12px; text-align: center; color: var(--text-faint);
    font-size: 12px; font-style: italic;
  }
.agent-search-pane .conv-preview { margin-top: 0; }
.agent-chat {
    background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
    display: flex; flex-direction: column; flex: 1; min-height: 0;
    position: relative; overflow: hidden;
  }
.agent-chat-separator {
    flex-shrink: 0; height: 6px; cursor: ns-resize;
    display: flex; align-items: center; justify-content: center;
    border-top: 1px solid var(--border); user-select: none;
  }
.agent-chat-separator::after {
    content: ''; width: 32px; height: 2px; border-radius: 2px;
    background: var(--border); transition: background 0.15s;
  }
.agent-chat-separator:hover::after { background: var(--accent); }
.agent-output {
    flex: 1; min-height: 0;
    overflow-y: auto; overflow-x: hidden; padding: 12px 10px 14px;
    display: flex; flex-direction: column; gap: 6px;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: var(--mc-zoom-font, 13px); line-height: 1.45;
    color: var(--text); white-space: normal; word-break: break-word; min-width: 0;
    background: var(--bg);
  }
.agent-output:empty { display: none; }
.agent-chat-input {
    flex-shrink: 0; padding: 8px 14px 16px;
    min-width: 0; box-sizing: border-box;
  }
.agent-chat-input-row {
    display: flex; gap: 8px; align-items: flex-end;
    min-width: 0;
  }
.agent-chat-input-row .agent-task-input {
    background: transparent; border-color: var(--border2);
    
    min-width: 0;
  }
.agent-chat-input .agent-image-previews { margin-bottom: 6px; }
.agent-attach-input { display: none; }
.btn-attach {
    display: inline-flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border2);
    border-radius: 6px;
    width: 32px; height: 32px;
    font-size: 16px; line-height: 1;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
  }
.btn-attach:hover {
    background: var(--surface3);
    color: var(--text);
    border-color: var(--accent);
  }
.btn-mic {
    display: inline-flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border2);
    border-radius: 6px;
    width: 32px; height: 32px;
    font-size: 16px; line-height: 1;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.2s;
  }
.btn-mic:hover {
    background: var(--surface3);
    color: var(--text);
    border-color: var(--accent);
  }
.btn-mic.recording {
    color: #fff;
    background: #e85a4a;
    border-color: #e85a4a;
    animation: btn-mic-pulse 1.2s ease-in-out infinite;
  }
.agent-output::-webkit-scrollbar { width: 5px; }
.agent-output::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.agent-output .agent-line-tool { color: var(--amber-text); }
.agent-output .agent-line-status { color: var(--green-text); font-weight: 600; }
.agent-output .agent-line-error { color: var(--red-text); }
.agent-output .agent-line-followup { color: var(--accent); font-weight: 600; }
.agent-output .agent-line-queued { color: var(--yellow, #e5c07b); font-weight: 600; font-style: italic; }
.ac-session-output .agent-line-prompt {
    color: var(--text); font-weight: 500; background: var(--surface2);
    margin: 6px -8px; padding: 8px 10px; border-radius: 5px; border-left: 3px solid var(--accent);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    white-space: pre-wrap;
  }
.agent-output .agent-line {
    align-self: flex-start;
    background: var(--surface3);
    color: var(--text);
    border: 1px solid var(--border2);
    padding: 8px 12px;
    border-radius: 14px 14px 14px 4px;
    max-width: 84%;
    word-break: break-word;
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: var(--mc-zoom-font, 12.5px);
  }
.agent-output .agent-line:empty { display: none; }
.agent-output .agent-line-prompt {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 14px 14px 4px 14px;
    margin: 0;
    padding: 9px 13px;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: var(--mc-zoom-font, 13px);
    font-weight: 500;
    max-width: 84%;
    white-space: pre-wrap;
  }
.agent-output .agent-echo-queued { opacity: 0.7; }
.agent-output .agent-echo-queued::after {
    content: '  ⏳ queued — will send when current response completes';
    font-size: 10px; font-weight: 400; font-style: italic; color: var(--yellow, #e5c07b);
  }
.agent-output .agent-line-tool,
  .agent-output .agent-line-status,
  .agent-output .agent-line-error,
  .agent-output .agent-line-queued,
  .agent-output .agent-line-followup {
    align-self: center;
    background: transparent;
    font-size: var(--mc-zoom-font, 11px);
    padding: 2px 8px;
    text-align: center;
    max-width: 92%;
    border: none;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
  }
.agent-output .hl-table,
  .agent-output .hl-table-pre,
  .agent-output .plan-show-btn,
  .agent-output .plan-hidden-block,
  .agent-output .plan-approve-row,
  .agent-output .agent-plan-stuck-warning,
  .agent-output .plan-card,
  .agent-output .agent-question,
  .agent-output .mermaid-block {
    align-self: stretch; max-width: 100%; flex-shrink: 0;
  }
.agent-output .agent-line .hl-codeblock {
    display: block; overflow-x: auto;
  }
.typing-indicator {
    display: flex; align-items: center; align-self: flex-start; gap: 4px;
    background: var(--surface3); border: 1px solid var(--border2);
    border-radius: 14px 14px 14px 4px; padding: 10px 12px; max-width: 60px;
    height: 33px;
  }
.typing-indicator .act-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--text-dim);
    animation: typing-pulse 1.2s infinite ease-in-out;
  }
.typing-indicator .act-dot:nth-child(2) { animation-delay: .2s; }
.typing-indicator .act-dot:nth-child(3) { animation-delay: .4s; }
.typing-indicator .act-word {
    display: inline-flex; white-space: nowrap;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
    color: var(--text-dim);
  }
.typing-indicator .act-word span { animation: act-wave 1.3s ease-in-out infinite; }
.typing-indicator[data-act="tool"] .act-word { color: var(--accent, var(--text-dim)); }
.typing-indicator[data-act="thinking"],
  .typing-indicator[data-act="tool"] { max-width: none; padding: 0 13px; }
@media (prefers-reduced-motion: reduce) {
.typing-indicator .act-word span { animation-duration: 2.6s; }
}
@media (max-width: 960px) {
.btn-attach {
      width: 38px; height: 38px;
      border-radius: 8px;
      font-size: 18px;
    }
.btn-attach:active {
      background: var(--surface3);
      color: var(--text);
      border-color: var(--accent);
    }
.agent-output .agent-img {
      max-width: 180px;
      max-height: 140px;
      object-fit: cover;
      cursor: zoom-in;
    }
.agent-output .agent-img-wrap { margin: 4px 0; }
}
.agent-question {
    background: var(--surface3); border: 1px solid var(--accent); border-radius: 8px;
    padding: 14px 16px; margin: 8px 4px;
  }
.agent-question.answered { border-color: var(--border); opacity: 0.7; }
.agent-question-header {
    font-size: 10px; color: var(--accent); font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; margin-bottom: 6px;
  }
.agent-question-text { font-size: 13px; color: var(--text); margin-bottom: 10px; line-height: 1.5; }
.agent-question-options { display: flex; flex-direction: column; gap: 2px; }
.agent-question-option {
    display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px;
    border-radius: 4px; cursor: pointer; transition: background 0.1s;
  }
.agent-question-option:hover { background: var(--accent-dim); }
.agent-question-option input[type="radio"],
  .agent-question-option input[type="checkbox"] { margin-top: 2px; accent-color: var(--accent); cursor: pointer; }
.agent-question-option label { font-size: 12.5px; color: var(--text); cursor: pointer; flex: 1; }
.agent-question-option .aq-desc { display: block; font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.agent-question-other {
    width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
    padding: 6px 10px; border-radius: 4px; font-size: 12px; font-family: 'Inter', sans-serif;
    outline: none; margin-top: 6px; display: none; box-sizing: border-box;
  }
.agent-question-other.visible { display: block; }
.agent-question-other:focus { border-color: var(--accent); }
.agent-question-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.agent-question-actions button {
    background: var(--accent); color: var(--bg); border: none; padding: 7px 18px;
    border-radius: 6px; font-weight: 600; font-size: 12px; cursor: pointer; font-family: 'Inter', sans-serif;
  }
.agent-question-actions button:hover { background: #5db3ff; }
.agent-question-actions button:disabled { opacity: 0.5; cursor: default; }
.agent-question-answer { font-size: 11px; color: var(--green); margin-top: 6px; }
.agent-question-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.agent-question-chip {
    background: var(--surface2); border: 1px solid var(--border); color: var(--text);
    padding: 7px 16px; border-radius: 16px; cursor: pointer; font-size: 12.5px;
    font-family: 'Inter', sans-serif; transition: border-color 0.15s, transform 0.15s;
  }
.agent-question-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.agent-question-chip:disabled { opacity: 0.5; cursor: default; transform: none; }
.agent-question-chip-other { font-style: italic; color: var(--text-dim); }
.agent-question-other-wrap { display: none; gap: 6px; margin-top: 8px; align-items: center; }
.agent-question-other-wrap.visible { display: flex; }
.agent-question-other-wrap .agent-question-other { display: block; flex: 1; width: auto; margin-top: 0; }
.agent-question-other-send {
    background: var(--accent); color: var(--bg); border: none; padding: 7px 14px;
    border-radius: 6px; font-weight: 600; font-size: 12px; cursor: pointer;
    font-family: 'Inter', sans-serif; flex-shrink: 0;
  }
.agent-question-other-send:hover { background: #5db3ff; }
.agent-question-other-send:disabled { opacity: 0.5; cursor: default; }
.agent-output .hl-code {
    background: #1e2233; color: #93c5fd; padding: 1px 5px; border-radius: 3px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.95em;
  }
.agent-output .hl-path { color: #60a5fa; }
.agent-output .hl-bold { color: #cbd5e1; font-weight: normal; background: #171c2a; padding: 1px 5px; border-radius: 3px; }
.agent-output .hl-h { color: #93c5fd; font-size: 1.05em; }
.agent-output .hl-bullet { color: var(--accent); font-weight: 600; }
.agent-output .hl-num { color: #c4b5fd; }
.agent-output .hl-url { color: #60a5fa; text-decoration: underline; text-decoration-style: dotted; }
.agent-img-wrap { display: block; margin: 8px 0; }
.agent-img-path {
    display: none; font-size: 0.8em; opacity: 0.6;
    margin-bottom: 3px; color: #60a5fa; text-decoration: none;
  }
.agent-img-wrap.agent-img-failed .agent-img-path { display: inline-block; }
.agent-img-path:hover { text-decoration: underline; }
.agent-img {
    display: none;
    max-width: 240px; max-height: 180px;
    object-fit: cover;
    border: 1px solid var(--border, #2a3147);
    border-radius: 6px; cursor: zoom-in; background: #0d1017;
  }
.agent-img.agent-img-ok { display: block; }
.agent-output .hl-codeblock {
    display: block; background: #0d1017; border: 1px solid var(--border); border-radius: 4px;
    padding: 8px 10px; margin: 4px 0; color: #a5d6ff; overflow-x: auto;
  }
.agent-output .hl-table {
    display: block; background: #0d1117; border: 1px solid var(--border); border-radius: 4px;
    padding: 2px 0; margin: 4px 0; overflow-x: auto; max-width: 100%;
  }
.agent-output .hl-table table {
    border-collapse: collapse; font-size: inherit; line-height: 1.4;
  }
.agent-output .hl-table th {
    color: #93c5fd; text-align: left;
    padding: 4px 12px; border-bottom: 2px solid var(--border2); white-space: nowrap;
  }
.agent-output .hl-table td {
    color: #c9d1d9; padding: 3px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
  }
.agent-output .hl-table tr:last-child td { border-bottom: none; }
.agent-output .hl-table-pre {
    display: block; background: #0d1117; border: 1px solid var(--border); border-radius: 4px;
    padding: 6px 10px; margin: 4px 0; color: #c9d1d9; overflow-x: auto;
    word-break: normal; white-space: pre; line-height: 1.4; max-width: 100%;
  }
.agent-output .hl-table-pre .table-pipe { color: #3b82f6; }
.agent-output .hl-table-pre .table-border { color: #475569; }
.plan-viewer-body .agent-line { padding: 1px 0; }
.plan-viewer-body .agent-line-tool { color: var(--amber-text); }
.plan-viewer-body .agent-line-status { color: var(--green-text); font-weight: 600; }
.plan-viewer-body .agent-line-error { color: var(--red-text); }
.plan-viewer-body .agent-line-prompt { color: var(--accent); font-weight: 600; font-style: italic; border-left: 3px solid var(--accent-dim); padding-left: 10px; margin: 6px 0; }
.agent-disabled {
    color: var(--text-faint); font-size: 12px; padding: 8px 0;
    font-style: italic;
  }
.agent-log-panel { padding: 16px 18px 16px 22px; border-bottom: 1px solid var(--border); }
.agent-log-toggle {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
  }
.agent-log-toggle .section-title { margin-bottom: 0; }
.agent-log-chevron { color: var(--text-faint); font-size: 12px; transition: transform 0.2s; }
.agent-log-chevron.open { transform: rotate(90deg); }
.agent-log-body { display: none; margin-top: 12px; }
.agent-log-body.open { display: block; }
.agent-log-entries { display: flex; flex-direction: column; gap: 8px; }
.agent-log-entry {
    padding: 10px 12px; background: var(--bg); border-radius: 5px;
    border-left: 3px solid var(--border2);
  }
.agent-log-entry.status-completed { border-left-color: var(--green); }
.agent-log-entry.status-error { border-left-color: var(--red); }
.agent-log-entry.status-stopped { border-left-color: var(--amber); }
.agent-log-task {
    font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
  }
.agent-log-task .agent-status-dot { width: 6px; height: 6px; }
.agent-log-summary {
    font-size: 12px; color: var(--text-dim); line-height: 1.5;
    white-space: pre-wrap; word-break: break-word;
    max-height: 120px; overflow-y: auto;
  }
.agent-log-summary::-webkit-scrollbar { width: 4px; }
.agent-log-summary::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.agent-log-ts {
    font-size: 11px; color: var(--text-faint); margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
  }
.agent-log-session-id {
    font-size: 10px; color: var(--text-faint); margin-top: 3px;
    font-family: 'JetBrains Mono', monospace;
    display: flex; align-items: center; gap: 6px;
  }
.agent-log-session-id code {
    background: var(--bg2); padding: 1px 5px; border-radius: 3px;
    font-size: 10px; user-select: all; cursor: pointer;
  }
.agent-log-session-id .copy-sid {
    cursor: pointer; color: var(--text-faint); font-size: 11px;
    opacity: 0.6; transition: opacity 0.15s;
  }
.agent-log-session-id .copy-sid:hover { opacity: 1; color: var(--accent); }
.agent-log-empty {
    color: var(--text-faint); font-size: 12px; font-style: italic; padding: 4px 0;
  }
.agent-log-continue-btn {
    background: var(--green-dim); border: 1px solid var(--green);
    color: var(--green-text); font-family: 'Inter', sans-serif;
    font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px;
    cursor: pointer; transition: all 0.15s; margin-left: auto; white-space: nowrap;
  }
.agent-log-continue-btn:hover { background: var(--green); color: var(--bg); }
.agent-log-continue-input { display: none; margin-top: 8px; }
.agent-log-continue-input.open { display: flex; gap: 6px; align-items: flex-start; }
.agent-log-continue-input textarea {
    flex: 1; background: var(--bg2); border: 1px solid var(--border2);
    color: var(--text); font-family: 'Inter', sans-serif; font-size: 12px;
    padding: 6px 8px; border-radius: 4px; resize: vertical; min-height: 32px;
  }
.agent-log-continue-input textarea:focus { border-color: var(--accent); outline: none; }
.agent-log-continue-input .btn-send {
    background: var(--green-dim); border: 1px solid var(--green);
    color: var(--green-text); font-family: 'Inter', sans-serif;
    font-size: 11px; font-weight: 600; padding: 6px 12px; border-radius: 4px;
    cursor: pointer; transition: all 0.15s;
  }
.agent-log-continue-input .btn-send:hover { background: var(--green); color: var(--bg); }
.agent-log-usage {
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
    color: var(--text-faint); margin-top: 2px;
  }
.agent-log-usage .alu-cost { color: var(--green-text); }
.agent-console {
    position: fixed; bottom: 0; left: var(--sidebar-w); right: 0; z-index: 150;
    background: var(--surface); border-top: 1px solid var(--border);
    display: flex; flex-direction: column;
    transition: height 0.2s ease;
  }
.agent-console.collapsed { height: 36px; }
.agent-console.expanded { height: 320px; }
.agent-console.hidden { display: none; }
.agent-console-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 20px; cursor: pointer; user-select: none;
    border-bottom: 1px solid var(--border); flex-shrink: 0;
  }
.agent-console-bar:hover { background: var(--surface3); }
.agent-console-title {
    font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-dim); font-weight: 600; flex: 1;
  }
.agent-console-count {
    font-size: 10px; padding: 2px 8px; border-radius: 10px;
    font-weight: 600; background: var(--accent-dim); color: var(--accent);
  }
.agent-console-count.has-running { background: var(--green-dim); color: var(--green-text); }
.agent-console-chevron {
    color: var(--text-faint); font-size: 10px; transition: transform 0.2s;
  }
.agent-console.expanded .agent-console-chevron { transform: rotate(180deg); }
.agent-console-body {
    flex: 1; overflow-y: auto; overflow-x: hidden;
  }
.agent-console.collapsed .agent-console-body { display: none; }
.agent-console-body::-webkit-scrollbar { width: 5px; }
.agent-console-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.agent-console-empty {
    color: var(--text-faint); font-size: 12px; text-align: center;
    padding: 24px; font-style: italic;
  }
.agent-tab.hivemind-orch { border-left:2px solid var(--accent); }
body.adv-hide-tokens #global-token-counter { display: none !important; }
body.adv-hide-tool-lines .agent-line-tool { display: none !important; }
body.adv-hide-github .gh-issue-link,
  body.adv-hide-github .gh-sync-badge { display: none !important; }
body.adv-hide-agent-log .modal-tab[data-tab-name="agent-log"] { display: none !important; }
body.adv-hide-memory .modal-menu-item.mc-adv-memory { display: none !important; }

/* ── DASHBOARD / FLEET GRID — extracted verbatim from app.css (the home tile
 *    view). Added 2026-07-22 when the demo gained a real multi-project
 *    dashboard. Same do-not-hand-edit rule: re-extract when the app changes.
 *    (warm-tone + mobile `.card` overrides already live higher in this file.) */
.projects-col {
    flex: 1; min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
.card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    user-select: none;
  }
.card.status-blocked,  .card.friendly-stuck  { border-color: var(--red) !important; }
.card.status-waiting,  .card.friendly-asking { border-color: var(--amber) !important; }
.card.friendly-asking::before,
.card.friendly-stuck::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; border-radius: 14px 14px 0 0; pointer-events: none;
  }
.card.friendly-asking::before { background: var(--amber); }
.card.friendly-stuck::before  { background: var(--red); }
.card:hover { border-color: var(--border2); box-shadow: 0 8px 24px rgba(0,0,0,0.35); transform: translateY(-2px); }
.card-header {
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px 14px 8px 14px;
  }
.card-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-avatar {
    font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; flex-shrink: 0; overflow: hidden;
    background: var(--surface2); border-radius: 6px;
  }
.project-name { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: 0.1px; line-height: 1.2; }
.domain-tag {
    font-size: 10px; padding: 2px 8px; border-radius: 4px;
    letter-spacing: 0.8px; text-transform: uppercase; white-space: nowrap; font-weight: 600;
  }
.domain-trading { background: var(--accent-dim); color: var(--accent); }
.domain-infra    { background: var(--purple-dim); color: var(--purple-text); }
.domain-hobby    { background: var(--amber-dim);  color: var(--amber-text); }
.domain-general  { background: var(--surface3);   color: var(--text-dim); }
.status-pill {
    font-size: 10px; padding: 3px 10px; border-radius: 4px;
    letter-spacing: 0.8px; text-transform: uppercase; white-space: nowrap; font-weight: 700;
    align-self: flex-start;
  }
.status-pill.friendly-working { background: var(--green-dim);  color: var(--green-text); }
.status-pill.friendly-stuck   { background: var(--red-dim);    color: var(--red-text); }
.status-pill.friendly-asking  { background: var(--amber-dim);  color: var(--amber-text); }
.status-pill.friendly-idle    { background: var(--surface3);   color: var(--text-dim); }
.status-pill.friendly-done    { background: var(--green-dim);  color: var(--green-text); }
.status-pill.friendly-working,
.status-pill.friendly-asking,
.status-pill.friendly-stuck,
.status-pill.friendly-done,
.status-pill.friendly-idle { display: inline-flex; align-items: center; gap: 6px; }
.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
  }
.friendly-working .status-dot { animation: mc-pulse 2s ease-in-out infinite; }
@keyframes mc-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.3); opacity: 0.65; }
  }
.time-ago { color: var(--text-faint); font-size: 12px; white-space: nowrap; font-family: 'JetBrains Mono', monospace; }
.tile-body {
    flex: 1; padding: 0 14px;
    display: flex; flex-direction: column; gap: 4px;
    overflow: hidden;
  }
.tile-summary {
    font-size: 13px; line-height: 1.4; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
.tile-task {
    font-size: 11px; line-height: 1.4; color: var(--text-faint);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  }
.tile-task.running { color: var(--green-text); }
.tile-task.plan-approval { color: var(--accent); }
.tile-next { font-size: 10px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-footer {
    padding: 8px 14px 12px 14px;
    display: flex; align-items: center; gap: 6px;
    margin-top: auto;
  }
.backlog-badge {
    background: var(--amber-dim); color: var(--amber-text);
    font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 600;
  }

/* act-wave keyframe — referenced by the typing indicator + Claydo's thinking
 * shimmer but previously missing from this extract. From app.css verbatim. */
@keyframes act-wave {
    0%, 65%, 100% { opacity: .32; }
    30%           { opacity: 1; }
  }

/* ── ASK CLAYDO — the in-app persona/prompt assistant. Extracted verbatim from
 *    app.css (added 2026-07-22 when the demo gained Claydo). The mobile
 *    `.claydo-fab { display:none }` rule is deliberately NOT copied: the real
 *    app moves Claydo into a bottom tab bar on phones, but the demo has none,
 *    so the launcher stays visible. Same do-not-hand-edit rule. */
.claydo-fab {
    position: absolute; right: 18px; bottom: 18px; z-index: 45;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
    cursor: pointer; padding: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.18s, box-shadow 0.18s;
  }
.claydo-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 6px 18px rgba(0,0,0,0.45); }
.claydo-fab img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; border-radius: 50%; }
.claydo-fab.pulse { animation: claydo-pulse 2.4s ease-out infinite; }
@keyframes claydo-pulse {
    0%   { box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 0 0 0 var(--accent); }
    70%  { box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 0 0 14px transparent; }
    100% { box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 0 0 0 transparent; }
  }
.claydo-history {
    flex: 1; min-height: 0; overflow-y: auto;
    padding: 14px 22px 14px 28px;
    display: flex; flex-direction: column; gap: 14px;
  }
.claydo-msg { padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.55; max-width: 92%; }
.claydo-msg.user { align-self: flex-end; background: var(--accent-dim, var(--surface2)); color: var(--text); }
.claydo-msg.bot { align-self: flex-start; background: var(--surface2); color: var(--text); white-space: pre-wrap; word-break: break-word; }
.claydo-msg.bot strong { color: var(--accent); }
.claydo-msg.bot code { font-family: 'JetBrains Mono', monospace; font-size: 12px; background: var(--surface); padding: 1px 5px; border-radius: 3px; }
.claydo-thinking {
    display: inline-flex; white-space: nowrap;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 12.5px; font-weight: 600; letter-spacing: .3px; color: var(--text-dim);
  }
.claydo-thinking span { white-space: pre; animation: act-wave 1.3s ease-in-out infinite; }
.claydo-input-row {
    flex-shrink: 0; padding: 10px 22px 16px 28px;
    border-top: 1px solid var(--border);
    display: flex; gap: 8px; align-items: flex-end;
  }
.claydo-input {
    flex: 1; min-width: 0;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-family: 'Inter', sans-serif; font-size: 13px;
    padding: 8px 12px; border-radius: 5px; outline: none; resize: none;
    min-height: 38px; max-height: 120px; line-height: 1.5;
  }
.claydo-input:focus { border-color: var(--accent); }
.claydo-send {
    background: var(--accent); border: none; color: #fff;
    padding: 8px 16px; border-radius: 5px; cursor: pointer;
    font-size: 12px; font-weight: 600; flex-shrink: 0; transition: opacity 0.15s;
  }
.claydo-send:hover { opacity: 0.85; }
.claydo-send:disabled { opacity: 0.4; cursor: not-allowed; }
.claydo-chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 92%; }
.claydo-chip {
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--text); padding: 7px 14px; border-radius: 16px;
    cursor: pointer; font-size: 12px; font-family: inherit;
    transition: border-color 0.15s, transform 0.15s;
  }
.claydo-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.claydo-home-btn {
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--text); padding: 3px 10px; border-radius: 5px;
    cursor: pointer; font-size: 11px; font-family: inherit; font-weight: 600;
    margin-right: 4px; transition: border-color 0.15s;
  }
.claydo-home-btn:hover { border-color: var(--accent); }
.claydo-msg.bot .claydo-code {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.5;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 6px; padding: 10px 12px; margin: 8px 0;
    white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto;
  }
.claydo-ready-card {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
    padding-top: 10px; border-top: 1px dashed var(--border);
  }
.claydo-ready-btn {
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); padding: 6px 14px; border-radius: 5px;
    cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit;
    transition: border-color 0.15s, opacity 0.15s;
  }
.claydo-ready-btn:hover { border-color: var(--accent); }
.claydo-ready-btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.claydo-ready-btn.accent:hover { opacity: 0.85; }
.claydo-save-panel {
    position: absolute; inset: 0; z-index: 5;
    background: rgba(0, 0, 0, 0.45);
    display: flex; align-items: center; justify-content: center; border-radius: inherit;
  }
.claydo-save-inner {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 18px 20px; width: min(380px, 90%);
    display: flex; flex-direction: column; gap: 6px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  }
.claydo-save-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.claydo-save-inner label { font-size: 11px; color: var(--text-faint); font-weight: 600; margin-top: 6px; }
.claydo-save-hint { font-weight: 400; }
.claydo-save-inner input, .claydo-save-inner select {
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-family: inherit; font-size: 13px;
    padding: 7px 10px; border-radius: 5px; outline: none;
  }
.claydo-save-inner input:focus { border-color: var(--accent); }
.claydo-save-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
