  *{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
  :root{
    --gold:#C9A84C;--navy:#1A1A2E;
    --bg:#0D0D0D;--surface:#171717;--surface2:#1E1E1E;
    --border:rgba(255,255,255,0.08);--text:#ECECEC;
    --text-muted:rgba(255,255,255,0.45);
    --green:#10A37F;--blue:#4285F4;--red:#E74C3C;
    --safe-top:env(safe-area-inset-top,44px);
    --safe-bottom:env(safe-area-inset-bottom,20px);
  }
  body.light-mode{
    --bg:#FFFFFF;--surface:#F5F5F5;--surface2:#EBEBEB;
    --border:rgba(0,0,0,0.1);--text:#1A1A1A;
    --text-muted:rgba(0,0,0,0.5);
    --gold:#B8941F;--navy:#E8E8F0;
  }
  body.light-mode .lock-screen{background:var(--bg)}
  body.light-mode .send-btn{background:var(--text)}
  body.light-mode .send-icon{stroke:#fff}
  body.light-mode .stop-btn{background:var(--text)}
  body.light-mode .stop-icon{fill:#fff}
  body.light-mode .sidebar{background:var(--surface);border-right:1px solid var(--border)}
  body.light-mode .sidebar-convo{color:var(--text)}
  body.light-mode .sidebar-convo:hover{background:var(--surface2)}
  body.light-mode .sidebar-convo.active{background:var(--surface2)}
  body.light-mode .modal-sheet{background:var(--surface)}
  body.light-mode .modal{background:rgba(0,0,0,.25)}
  body.light-mode .msg.ai .bubble{background:var(--surface);color:var(--text)}
  body.light-mode .msg.user .bubble{background:#E8E4D9;color:var(--text)}
  body.light-mode .bubble pre{background:var(--surface2);color:var(--text)}
  body.light-mode .bubble code{background:rgba(0,0,0,0.06)}
  body.light-mode #msgInput{background:var(--surface);color:var(--text);border-color:var(--border)}
  body.light-mode .input-row{background:var(--bg);border-top:1px solid var(--border)}
  body.light-mode .team-bar{background:var(--surface);border-bottom:1px solid var(--border)}
  body.light-mode .team-member{color:var(--text-muted)}
  body.light-mode .slash-menu{background:var(--surface);border:1px solid var(--border)}
  body.light-mode .slash-item:hover,.light-mode .slash-item.selected{background:var(--surface2)}
  body.light-mode .suggest-chip{background:var(--surface);color:var(--text);border:1px solid var(--border)}
  body.light-mode .header{background:var(--bg);border-bottom:1px solid var(--border)}
  body.light-mode .model-selector{background:var(--surface);color:var(--text)}
  body.light-mode .msg-action{color:var(--text-muted)}
  body.light-mode .msg-action:hover{color:var(--text)}
  body.light-mode .input-wrap{border-color:rgba(0,0,0,0.15)}
  body.light-mode .input-wrap:focus-within{border-color:rgba(0,0,0,0.3)}
  body.light-mode .thinking-block{border-color:rgba(0,0,0,0.08);background:var(--surface)}
  body.light-mode .thinking-content{border-top-color:rgba(0,0,0,0.06);background:rgba(0,0,0,0.03);color:var(--text-muted)}
  body.light-mode .sidebar-search input:focus{box-shadow:0 0 0 1px rgba(0,0,0,.15)}
  body.light-mode .section-badge{background:rgba(0,0,0,.08)}
  body.light-mode .sidebar-add-btn{border-color:rgba(0,0,0,.12)}
  body.light-mode .sidebar-add-btn:active{border-color:rgba(0,0,0,.25)}
  body.light-mode .example-card{border-color:rgba(0,0,0,.1)}
  body.light-mode .example-card:active{border-color:rgba(0,0,0,.2)}
  html,body{height:100%;overflow:hidden;background:var(--bg);color:var(--text);font-family:-apple-system,'PingFang SC',sans-serif}

  #chat{display:flex;flex-direction:column;height:100%;background:var(--bg)}

  /* Header — ultra-minimal like Claude */
  .chat-header{background:var(--bg);border-bottom:1px solid var(--border);padding:calc(var(--safe-top) + 8px) 16px 10px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
  .header-name{font-size:16px;font-weight:500}
  .header-status{font-size:11px;color:var(--text-muted);margin-top:1px;letter-spacing:.02em}
  .header-right{display:flex;align-items:center;gap:8px}
  .icon-btn{background:none;border:none;color:var(--text-muted);cursor:pointer;padding:8px;display:flex;align-items:center;border-radius:10px}
  .icon-btn:active{background:var(--surface2)}
  .icon-btn svg{stroke:var(--text-muted);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .header-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--gold),#A07830);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--navy);flex-shrink:0}

  /* Team bar — hidden by default, shown when active */
  .team-bar{display:none;background:var(--bg);border-bottom:1px solid var(--border);padding:7px 16px;gap:8px;flex-shrink:0;flex-wrap:wrap}
  .team-bar.visible{display:flex}
  .team-member{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--text-muted);letter-spacing:.01em}
  .team-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
  .team-member.active .team-dot{animation:pulse 1.5s infinite}
  .team-member.active{color:var(--text);font-weight:600}
  @keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}

  /* Quick actions — horizontal scrollable pills */
  .quick-actions{display:flex;gap:8px;padding:8px 16px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;flex-shrink:0}
  .quick-actions::-webkit-scrollbar{display:none}
  .qa-btn{white-space:nowrap;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:7px 14px;font-size:13px;color:var(--text-muted);cursor:pointer;flex-shrink:0;transition:all .15s}
  .qa-btn:active{background:var(--surface2);color:var(--text)}

  /* Messages — Claude-style: flat AI with avatar, user bubble right-aligned */
  .messages{flex:1;overflow-y:auto;padding:20px 16px;display:flex;flex-direction:column;gap:24px;-webkit-overflow-scrolling:touch}
  .messages::-webkit-scrollbar{display:none}
  .msg{display:flex;flex-direction:column;max-width:85%;position:relative}
  .msg.user{align-self:flex-end;align-items:flex-end}
  .msg.ai{align-self:flex-start;align-items:flex-start;max-width:100%;padding-left:0}
  .msg.system{align-self:center;max-width:95%}
  .msg-info{font-size:12px;color:var(--text-muted);margin-bottom:6px;display:flex;align-items:center;gap:6px;font-weight:500}
  .bubble{padding:12px 16px;border-radius:20px;font-size:16px;line-height:1.7;word-break:break-word;letter-spacing:0.01em}
  .msg.user .bubble{background:var(--surface2);color:var(--text);border-bottom-right-radius:6px}
  .msg.ai .bubble{background:transparent;color:var(--text);border-radius:0;padding:0;font-size:16px;line-height:1.75}
  .msg.ai .bubble strong{color:var(--text);font-weight:600}
  .msg.ai .bubble ul{padding-left:20px;margin:8px 0}
  .msg.ai .bubble li{margin-bottom:6px;line-height:1.7}
  .msg.ai .bubble hr{border:none;border-top:1px solid var(--border);margin:14px 0}
  .msg.ai .bubble pre{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:16px;margin:12px 0;overflow-x:auto;font-size:13.5px;line-height:1.55}
  .msg.ai .bubble pre code{background:none;padding:0;font-size:13.5px;color:var(--text)}
  .msg.ai .bubble code{background:var(--surface);padding:2px 6px;border-radius:5px;font-size:13.5px;font-family:'SF Mono',Monaco,Consolas,monospace;color:#E8C97A}
  .msg table{display:block;overflow-x:auto;max-width:100%}
  .msg.ai .bubble table{border-collapse:collapse;width:100%;margin:10px 0;font-size:14px}
  .msg.ai .bubble th,.msg.ai .bubble td{border:1px solid var(--border);padding:8px 12px;text-align:left}
  .msg.ai .bubble th{background:var(--surface);color:var(--text);font-weight:600}
  .msg.ai .bubble ol{padding-left:20px;margin:8px 0}
  .msg.ai .bubble ol li{margin-bottom:6px;line-height:1.7}
  .msg.ai .bubble h1,.msg.ai .bubble h2,.msg.ai .bubble h3{color:var(--text);margin:16px 0 8px;font-weight:600}
  .msg.ai .bubble h1{font-size:20px}
  .msg.ai .bubble h2{font-size:18px}
  .msg.ai .bubble h3{font-size:16px}
  .msg.ai .bubble p{margin:6px 0}
  .msg.ai .bubble blockquote{border-left:3px solid var(--border);padding-left:14px;margin:8px 0;color:var(--text-muted)}

  /* Message actions — visible on AI messages, subtle */
  .msg-actions{display:flex;gap:2px;margin-top:8px;opacity:0;transition:opacity .2s;align-items:center;flex-wrap:wrap}
  .msg:hover .msg-actions,.msg.actions-visible .msg-actions,.msg.ai .msg-actions{opacity:1}
  .msg-action{background:none;border:1px solid transparent;color:var(--text-muted);cursor:pointer;padding:8px 10px;border-radius:8px;display:inline-flex;align-items:center;font-size:12px;gap:4px;white-space:nowrap;line-height:1;min-height:44px}
  .msg-action:hover,.msg-action:active{color:var(--text);border-color:var(--border);background:var(--surface)}
  .msg-action svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .msg-action.copied{color:var(--gold)}
  .model-picker{position:absolute;bottom:100%;left:auto;right:0;background:var(--surface);border:.5px solid var(--border);border-radius:10px;padding:4px;z-index:50;min-width:150px;box-shadow:0 -4px 12px rgba(0,0,0,.4)}
  .msg.user .model-picker{right:0;left:auto}
  .msg.ai .model-picker{left:0;right:auto}
  .model-picker-item{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;cursor:pointer;font-size:13px;color:var(--text)}
  .model-picker-item:active,.model-picker-item:hover{background:var(--surface2)}
  .model-picker-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
  .edit-area{width:100%;background:var(--surface);border:.5px solid var(--gold);border-radius:12px;padding:10px;font-size:15px;color:var(--text);font-family:inherit;resize:vertical;min-height:60px;outline:none}
  .edit-btns{display:flex;gap:8px;margin-top:6px}
  .edit-btns button{padding:6px 14px;border-radius:8px;border:none;font-size:13px;cursor:pointer}
  .edit-btns .edit-save{background:var(--gold);color:var(--navy);font-weight:600}
  .edit-btns .edit-cancel{background:var(--surface2);color:var(--text)}

  /* Dispatch panel */
  .dispatch-panel{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px;margin:6px 0;width:100%}
  .dispatch-title{font-size:13px;color:var(--gold);font-weight:600;margin-bottom:10px;letter-spacing:.04em}
  .task-card{background:var(--surface2);border-radius:10px;padding:12px 14px;margin-bottom:8px;border-left:3px solid var(--text-muted);display:flex;flex-direction:column;gap:4px}
  .task-card:last-child{margin-bottom:0}
  .task-card.loading{border-left-color:var(--gold)}
  .task-card.done{border-left-color:var(--green)}
  .task-card.error{border-left-color:var(--red)}
  .task-card-head{display:flex;align-items:center;justify-content:space-between}
  .task-card-model{font-size:13px;font-weight:700;letter-spacing:.04em}
  .task-card-status{font-size:12px;color:var(--text-muted)}
  .task-card-label{font-size:14px;color:var(--text)}
  .task-card-result{font-size:14px;color:var(--text-muted);margin-top:4px;max-height:80px;overflow:hidden;cursor:pointer;line-height:1.5}
  .task-card-result.expanded{max-height:none}
  .spinner{display:inline-block;width:12px;height:12px;border:2px solid var(--text-muted);border-top-color:var(--gold);border-radius:50%;animation:spin .8s linear infinite}
  @keyframes spin{to{transform:rotate(360deg)}}

  /* Typing — softer animation */
  .typing{display:flex;align-items:center;gap:4px;padding:10px 4px}
  .typing span{width:7px;height:7px;background:var(--text-muted);border-radius:50%;animation:bounce 1.4s infinite;opacity:.5}
  .typing span:nth-child(2){animation-delay:.2s}
  .typing span:nth-child(3){animation-delay:.4s}
  @keyframes bounce{0%,80%,100%{transform:translateY(0);opacity:.3}40%{transform:translateY(-5px);opacity:.8}}

  /* Input — Claude-style: big rounded box with everything inside */
  .input-area{background:var(--bg);padding:8px 12px calc(8px + var(--safe-bottom));flex-shrink:0;display:flex;flex-direction:column;gap:6px}
  #filePreview{padding:2px 0;overflow-x:auto;}
  .input-wrap{flex:1;background:var(--surface);border:1px solid rgba(255,255,255,0.1);border-radius:24px;display:flex;align-items:flex-end;padding:6px 8px 6px 6px;min-height:48px;max-height:160px;transition:border-color .2s}
  .input-wrap:focus-within{border-color:rgba(255,255,255,.2)}
  .input-wrap.drag-over{border-color:var(--gold,#C9A84C);background:rgba(201,168,76,0.06)}
  textarea{flex:1;background:transparent;border:none;outline:none;color:var(--text);font-size:16px;line-height:1.5;resize:none;font-family:-apple-system,'PingFang SC',sans-serif;max-height:120px;overflow-y:auto;padding:8px 4px 8px 8px}
  textarea::placeholder{color:var(--text-muted);font-size:15px}
  .send-btn,.stop-btn{width:44px;height:44px;border:none;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:transform .1s,opacity .15s;margin-bottom:2px}
  .send-btn{background:var(--text)}
  .send-btn:active,.stop-btn:active{transform:scale(.92)}
  .send-btn:disabled{opacity:.15}
  .stop-btn{background:var(--text);display:none}
  @keyframes pulse-red{0%,100%{background:#e74c3c;transform:scale(1)}50%{background:#c0392b;transform:scale(1.15)}}
  .stop-icon{width:14px;height:14px;fill:var(--bg)}
  .send-icon{width:16px;height:16px;fill:none;stroke:var(--bg);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

  /* Empty state — Claude-style, centered greeting */
  .empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 24px;text-align:center}
  .empty-logo{font-size:11px;letter-spacing:.2em;color:var(--text-muted);text-transform:uppercase;margin-bottom:12px;font-weight:500}
  .empty-title{font-size:28px;font-weight:400;margin-bottom:10px;letter-spacing:-0.02em}
  .empty-sub{font-size:15px;color:var(--text-muted);line-height:1.6;margin-bottom:32px}
  .empty-examples{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;max-width:400px}
  .example-card{background:transparent;border:1px solid var(--border);border-radius:16px;padding:14px 16px;text-align:left;cursor:pointer;transition:all .2s}
  .example-card:active{border-color:rgba(255,255,255,0.2);background:var(--surface)}
  .example-tag{font-size:11px;color:var(--text-muted);letter-spacing:.04em;margin-bottom:4px;font-weight:500}
  .example-text{font-size:14px;color:var(--text);line-height:1.5}

  /* Modals — iOS-style sheet */
  .modal{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:160;display:none;align-items:flex-end;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
  .modal.active{display:flex}
  .modal-sheet{background:var(--surface);border-radius:16px 16px 0 0;width:100%;max-height:72vh;display:flex;flex-direction:column;padding-bottom:var(--safe-bottom)}
  .modal-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 14px;border-bottom:1px solid var(--border);font-size:17px;font-weight:600;flex-shrink:0}
  .modal-close{background:none;border:none;color:var(--text-muted);font-size:18px;cursor:pointer;padding:4px 8px}
  .modal-body{overflow-y:auto;flex:1;-webkit-overflow-scrolling:touch}

  /* History */
  .history-item{padding:14px 20px;cursor:pointer;border-bottom:1px solid var(--border);display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:3px 10px}
  .history-item:active{background:var(--surface2)}
  .history-model{font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;grid-column:1;color:var(--text-muted)}
  .history-title{font-size:15px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;grid-column:1}
  .history-time{font-size:12px;color:var(--text-muted);grid-column:2;grid-row:1/3;align-self:center;white-space:nowrap}
  .history-empty{padding:40px;text-align:center;color:var(--text-muted);font-size:15px}

  /* Coordinator picker */
  .coord-badge{font-size:9px;background:var(--gold);color:#000;padding:1px 5px;border-radius:6px;cursor:pointer;margin-left:3px;font-weight:600;vertical-align:middle}
  .coord-picker{position:absolute;top:calc(100% + 4px);left:50%;transform:translateX(-50%);background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:6px;z-index:200;box-shadow:0 4px 16px rgba(0,0,0,.4);display:none;min-width:160px}
  .coord-picker.show{display:flex;flex-direction:column;gap:2px}
  .coord-pick-item{padding:8px 12px;border-radius:8px;font-size:13px;cursor:pointer;white-space:nowrap;display:flex;align-items:center;gap:8px}
  .coord-pick-item:active,.coord-pick-item:hover{background:var(--surface2)}
  .coord-pick-item .cpk-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
  .coord-pick-item.current{color:var(--gold);font-weight:600}

  /* Memory items */
  .mem-item{padding:12px 20px;border-bottom:.5px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:10px}
  .mem-fact{font-size:15px;flex:1}
  .mem-date{font-size:12px;color:var(--text-muted);white-space:nowrap}
  .mem-del{background:none;border:none;color:var(--red);font-size:16px;cursor:pointer;padding:4px 8px;opacity:.6}
  .mem-del:active{opacity:1}

  /* Report */
  .report-section{padding:16px 20px;border-bottom:.5px solid var(--border)}
  .report-title{font-size:14px;color:var(--gold);font-weight:600;margin-bottom:8px;letter-spacing:.04em}
  .report-row{display:flex;justify-content:space-between;font-size:15px;padding:3px 0}
  .report-row.total{font-weight:600;color:var(--gold);border-top:.5px solid var(--border);margin-top:6px;padding-top:8px}
  .report-value{font-variant-numeric:tabular-nums}

  /* Model selector — subtle pills below input like Claude */
  .model-selector{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:4px 4px 0;position:relative}
  .model-selector::-webkit-scrollbar{display:none}
  .model-selector::after{content:'';position:absolute;right:0;top:0;bottom:0;width:24px;background:linear-gradient(to right,transparent,var(--bg));pointer-events:none;opacity:0;transition:opacity .2s}
  .model-selector.scrollable::after{opacity:1}
  .model-chip{white-space:nowrap;background:transparent;border:none;border-radius:12px;padding:4px 10px;font-size:12px;color:var(--text-muted);cursor:pointer;flex-shrink:0;transition:all .15s;display:flex;align-items:center;gap:4px}
  .model-chip:active{transform:scale(.96)}
  .model-chip.active{background:var(--surface2);color:var(--text);font-weight:600}
  .model-chip .chip-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}

  /* File upload — inside input box like Claude */
  .attach-btn{background:none;border:none;color:var(--text-muted);cursor:pointer;padding:8px;display:flex;align-items:center;flex-shrink:0;border-radius:50%;margin-bottom:2px}
  .attach-btn:active{color:var(--text);background:var(--surface2)}
  .attach-btn svg{stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .file-preview-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px;padding:4px 0}
  .file-preview{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--surface);border:1.5px solid var(--border);border-radius:12px;min-width:160px;max-width:260px;transition:border-color .2s}
  .file-preview img{width:40px;height:40px;object-fit:cover;border-radius:6px;flex-shrink:0}
  .file-preview-name{font-size:13px;color:var(--text);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:120px;font-weight:500}
  .file-preview-size{font-size:11px;color:var(--text-muted)}
  .file-preview-remove{background:none;border:none;color:var(--text-muted);font-size:14px;cursor:pointer;padding:2px 4px;flex-shrink:0}
  .file-preview-remove:hover{color:var(--red,#e74c3c)}
  .file-upload-status{font-size:13px;margin-left:auto;white-space:nowrap;font-weight:600;flex-shrink:0}
  .file-uploading{font-size:13px;color:var(--gold);display:flex;align-items:center;gap:6px}
  .msg-image{max-width:200px;max-height:200px;border-radius:10px;margin-top:6px;cursor:pointer}
  .msg-file-badge{display:inline-flex;align-items:center;gap:4px;font-size:13px;background:var(--surface2);border:.5px solid var(--border);border-radius:8px;padding:4px 10px;margin-top:4px}
  .msg-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
  .msg-file-card{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--surface);border:1px solid var(--border);border-radius:10px;max-width:220px;min-width:140px}
  .msg-file-card .mfc-thumb{width:48px;height:48px;border-radius:6px;overflow:hidden;flex-shrink:0;background:var(--surface2)}
  .msg-file-card .mfc-thumb img{width:100%;height:100%;object-fit:cover}
  .msg-file-card .mfc-icon{font-size:28px;flex-shrink:0;width:36px;text-align:center}
  .msg-file-card .mfc-info{display:flex;flex-direction:column;overflow:hidden}
  .msg-file-card .mfc-name{font-size:13px;font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}
  .msg-file-card .mfc-size{font-size:11px;color:var(--text-muted)}
  .msg-file-card .mfc-status{font-size:11px;color:var(--gold,#C9A84C);margin-top:2px}
  .mfc-uploading{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--surface2);border-radius:6px}
  .mfc-uploading::after{content:'';width:20px;height:20px;border:2px solid var(--border);border-top-color:var(--gold,#C9A84C);border-radius:50%;animation:spin .8s linear infinite}
  .msg-file-card.mfc-uploading-active{border-color:var(--gold,#C9A84C);opacity:0.75}

  /* Thinking block */
  .thinking-block{margin-top:10px;border:1px solid rgba(255,255,255,0.06);border-radius:12px;overflow:hidden;background:var(--surface)}
  .thinking-block summary{font-size:13px;color:var(--text-muted);padding:8px 12px;cursor:pointer;user-select:none;list-style:none;display:flex;align-items:center;gap:4px}
  .thinking-block summary::-webkit-details-marker{display:none}
  .thinking-block summary::after{content:'▸';margin-left:auto;font-size:10px;transition:transform .2s}
  .thinking-block[open] summary::after{transform:rotate(90deg)}
  .thinking-content{font-size:14px;color:var(--text-muted);line-height:1.6;padding:10px 12px 12px;border-top:1px solid rgba(255,255,255,0.05);background:rgba(0,0,0,0.15)}

  /* Lock Screen */
  .lock-screen{position:fixed;inset:0;background:var(--bg);z-index:300;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px}
  .lock-screen.hidden{display:none}
  .lock-logo-text{font-size:12px;letter-spacing:.2em;color:var(--gold);text-transform:uppercase;margin-bottom:6px;font-weight:500}
  .lock-title{font-size:24px;font-weight:300;margin-bottom:8px}
  .lock-icon{font-size:40px;margin-bottom:24px;opacity:.8}
  .lock-sub{font-size:14px;color:var(--text-muted);margin-bottom:28px;text-align:center;line-height:1.5}
  .lock-btn{background:var(--gold);color:var(--navy);border:none;border-radius:25px;padding:14px 36px;font-size:16px;font-weight:600;cursor:pointer;margin-bottom:12px;min-width:200px}
  .lock-btn:active{transform:scale(.97)}
  .lock-btn.secondary{background:var(--surface2);color:var(--text);border:.5px solid var(--border)}
  .pin-dots{display:flex;gap:12px;margin-bottom:20px}
  .pin-dot{width:14px;height:14px;border-radius:50%;border:2px solid var(--border);transition:all .15s}
  .pin-dot.filled{background:var(--gold);border-color:var(--gold)}
  .pin-dot.error{border-color:var(--red);background:var(--red)}
  .pin-pad{display:grid;grid-template-columns:repeat(3,64px);gap:8px;justify-content:center}
  .pin-key{width:64px;height:46px;border-radius:10px;background:var(--surface2);border:.5px solid var(--border);color:var(--text);font-size:20px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center}
  .pin-key:active{background:var(--gold);color:var(--navy)}
  .pin-key.fn{font-size:14px;color:var(--text-muted)}
  .lock-setup-link{font-size:12px;color:var(--gold);cursor:pointer;margin-top:16px;text-decoration:underline}
  .lock-msg{font-size:12px;color:var(--green);margin-top:8px;min-height:18px}
  .lock-msg.error{color:var(--red)}
  @keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-8px)}50%{transform:translateX(8px)}75%{transform:translateX(-4px)}}

  /* Sidebar Drawer — Claude-style clean */
  .sidebar-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);z-index:150;opacity:0;pointer-events:none;transition:opacity .25s}
  .sidebar-overlay.open{opacity:1;pointer-events:auto}
  .sidebar{position:fixed;left:0;top:0;bottom:0;width:80vw;max-width:300px;background:var(--bg);z-index:151;transform:translateX(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;padding-top:var(--safe-top);border-right:1px solid var(--border)}
  .sidebar.open{transform:translateX(0)}
  .sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:20px 16px 16px;flex-shrink:0}
  .sidebar-user{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600;letter-spacing:-0.01em}
  .sidebar-user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--gold),#A07830);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--navy);flex-shrink:0}
  .sidebar-new-btn{background:transparent;border:1px solid var(--border);border-radius:10px;padding:8px 14px;font-size:13px;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;gap:5px}
  .sidebar-new-btn:active{color:var(--text);background:var(--surface)}
  .sidebar-search{padding:0 16px 12px;flex-shrink:0}
  .sidebar-search input{width:100%;background:var(--surface);border:none;border-radius:10px;padding:10px 14px;font-size:14px;color:var(--text);outline:none;font-family:inherit}
  .sidebar-search input:focus{box-shadow:0 0 0 1px rgba(255,255,255,.15)}
  .sidebar-search input::placeholder{color:var(--text-muted)}
  .sidebar-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .sidebar-scroll::-webkit-scrollbar{display:none}
  .sidebar-section{border-bottom:none}
  .sidebar-section-title{display:flex;align-items:center;gap:6px;padding:14px 16px 8px;font-size:12px;font-weight:600;color:var(--text-muted);letter-spacing:.05em;text-transform:uppercase;cursor:pointer;user-select:none}
  .sidebar-section-title:active{background:transparent}
  .section-badge{background:rgba(255,255,255,.1);color:var(--text-muted);font-size:11px;font-weight:600;border-radius:6px;padding:1px 6px;min-width:18px;text-align:center}
  .section-arrow{margin-left:auto;font-size:10px;transition:transform .2s;color:var(--text-muted)}
  .sidebar-section.expanded .section-arrow{transform:rotate(90deg)}
  .sidebar-section-body{display:none;padding-bottom:4px}
  .sidebar-section.expanded .sidebar-section-body{display:block}
  .sidebar-add-btn{display:none;width:calc(100% - 32px);margin:4px 16px 8px;padding:8px 0;background:transparent;border:1px dashed rgba(255,255,255,.1);border-radius:10px;font-size:13px;color:var(--text-muted);cursor:pointer;text-align:center}
  .sidebar-section.expanded .sidebar-add-btn{display:block}
  .sidebar-add-btn:active{border-color:rgba(255,255,255,.25);color:var(--text)}

  /* Sidebar items — Claude-style: clean, no icons, just text */
  .sidebar-project{padding:10px 16px 10px 16px;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:15px;color:var(--text);border-radius:8px;margin:1px 8px}
  .sidebar-project:active{background:var(--surface)}
  .sidebar-project-icon{font-size:16px;flex-shrink:0}
  .sidebar-project-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sidebar-project-count{font-size:11px;color:var(--text-muted)}
  .sidebar-convo{padding:11px 16px;cursor:pointer;display:flex;flex-direction:column;gap:2px;position:relative;border-radius:8px;margin:1px 8px}
  .sidebar-convo:active{background:var(--surface)}
  .sidebar-convo.active{background:var(--surface)}
  .sidebar-convo .convo-del{display:none;position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--text-muted);padding:4px 6px;border-radius:4px;background:var(--surface2)}
  .sidebar-convo:hover .convo-del{display:block}
  .sidebar-convo .convo-del:hover{color:#ff6b6b;background:rgba(255,107,107,0.1)}
  .sidebar-convo.show-del .convo-del{display:block}
  .sidebar-convo-title{font-size:15px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sidebar-convo-time{font-size:11px;color:var(--text-muted)}
  .sidebar-sched{padding:10px 16px;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:15px;color:var(--text);border-radius:8px;margin:1px 8px}
  .sidebar-sched:active{background:var(--surface)}
  .sidebar-sched-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
  .sidebar-sched-dot.pending{background:var(--gold)}
  .sidebar-sched-dot.completed{background:var(--green)}
  .sidebar-sched-dot.failed{background:var(--red)}
  .sidebar-sched-dot.cancelled{background:var(--text-muted)}
  .sidebar-sched-dot.running{background:var(--blue)}
  .sidebar-sched-prompt{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sidebar-sched-time{font-size:11px;color:var(--text-muted);white-space:nowrap}
  .sidebar-footer{padding:12px 12px;border-top:1px solid var(--border);display:flex;gap:6px;flex-shrink:0;flex-wrap:wrap;padding-bottom:calc(12px + var(--safe-bottom))}
  .sidebar-footer-btn{background:var(--surface);border:none;border-radius:10px;padding:10px 0;font-size:13px;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;gap:5px;flex:1;justify-content:center}
  .sidebar-footer-btn:active{color:var(--text);background:var(--surface2)}
  .sidebar-footer-group{display:flex;flex-wrap:wrap;gap:2px;padding:4px 0;border-bottom:1px solid var(--border)}
  .sidebar-footer-group:last-child{border-bottom:none}
  .sidebar-footer-label{width:100%;font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.5px;padding:2px 4px;font-weight:600}

  /* Header center title */
  .header-center{flex:1;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:600;padding:0 12px}

  /* Schedule form inside modal */
  .sched-form{display:flex;flex-direction:column;gap:12px}
  .sched-form label{font-size:13px;color:var(--text-muted);margin-bottom:2px}
  .sched-form textarea,.sched-form input,.sched-form select{width:100%;background:var(--surface2);border:.5px solid var(--border);border-radius:10px;padding:10px 12px;font-size:15px;color:var(--text);font-family:inherit;outline:none}
  .sched-form textarea:focus,.sched-form input:focus,.sched-form select:focus{border-color:rgba(201,168,76,.5)}
  .sched-form select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
  .sched-form select option{background:var(--surface);color:var(--text)}
  .sched-submit{background:var(--gold);color:var(--navy);border:none;border-radius:10px;padding:12px;font-size:16px;font-weight:600;cursor:pointer}
  .sched-submit:active{transform:scale(.98)}
  .skill-list-item{display:flex;align-items:center;gap:10px;padding:12px;background:var(--surface2);border-radius:10px;margin-bottom:8px;cursor:pointer;border:.5px solid var(--border)}
  .skill-list-item:active{background:var(--surface)}
  .skill-list-item .sk-icon{font-size:22px;flex-shrink:0;width:36px;text-align:center}
  .skill-list-item .sk-info{flex:1;min-width:0}
  .skill-list-item .sk-name{font-size:14px;font-weight:500;color:var(--text)}
  .skill-list-item .sk-cmd{font-size:12px;color:var(--text-muted)}
  .skill-list-item .sk-tag{font-size:11px;color:var(--gold);background:rgba(201,168,76,.15);padding:2px 8px;border-radius:6px;flex-shrink:0}
  .skill-list-item.builtin{opacity:.6}
  .skill-list-item.builtin::after{content:'内置';font-size:10px;color:var(--text-muted);margin-left:4px}

  /* Project form */
  .proj-form{display:flex;flex-direction:column;gap:12px}
  .proj-form input{width:100%;background:var(--surface2);border:.5px solid var(--border);border-radius:10px;padding:10px 12px;font-size:15px;color:var(--text);font-family:inherit;outline:none}
  .proj-form input:focus{border-color:rgba(201,168,76,.5)}
  .emoji-grid{display:flex;flex-wrap:wrap;gap:6px}
  .emoji-pick{width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:20px;border-radius:8px;cursor:pointer;border:.5px solid transparent}
  .emoji-pick:active,.emoji-pick.selected{border-color:var(--gold);background:var(--surface2)}
  .proj-submit{background:var(--gold);color:var(--navy);border:none;border-radius:10px;padding:12px;font-size:15px;font-weight:600;cursor:pointer;margin-top:4px}
  .proj-submit:active{transform:scale(.98)}
  .proj-delete{background:transparent;border:.5px solid var(--red);border-radius:10px;padding:10px;font-size:13px;color:var(--red);cursor:pointer;text-align:center}
  .proj-delete:active{background:rgba(231,76,60,.1)}

  /* Slash Command Menu */
  .slash-menu{position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--border);border-radius:14px 14px 0 0;max-height:55vh;overflow-y:auto;display:none;z-index:200;box-shadow:0 -4px 20px rgba(0,0,0,.4);-webkit-overflow-scrolling:touch;padding-bottom:env(safe-area-inset-bottom,20px);max-width:600px;margin:0 auto}
  .slash-menu.visible{display:block}
  .slash-menu-header{padding:10px 16px 6px;font-size:12px;color:var(--text-muted);letter-spacing:.04em;font-weight:600}
  .slash-item{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;border-bottom:1px solid var(--border)}
  .slash-item:last-child{border-bottom:none}
  .slash-item:active,.slash-item.selected{background:var(--surface2)}
  .slash-item-icon{font-size:20px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--surface2);border-radius:10px;flex-shrink:0}
  .slash-item-info{flex:1;min-width:0}
  .slash-item-name{font-size:14px;font-weight:600;color:var(--text)}
  .slash-item-name span{color:var(--gold);font-weight:400}
  .slash-item-desc{font-size:12px;color:var(--text-muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .slash-item-tag{font-size:10px;color:var(--navy);background:var(--gold);border-radius:4px;padding:1px 6px;font-weight:600;flex-shrink:0}

  /* Responsive — small screens */
  @media(max-width:420px){
    .bubble{font-size:15.5px;padding:10px 14px}
    .msg.ai .bubble{font-size:15.5px}
    .msg.ai .bubble pre,.msg.ai .bubble pre code{font-size:12.5px}
    .msg.ai .bubble table{font-size:13px}
    .msg.ai .bubble th,.msg.ai .bubble td{padding:6px 8px}
    .empty-examples{grid-template-columns:1fr;gap:8px}
    .example-card{padding:12px 14px}
    .example-text{font-size:13.5px;line-height:1.45}
    .example-tag{font-size:11px}
    .team-bar{padding:6px 12px;gap:6px}
    .team-member{font-size:11px}
    .input-area{padding:6px 8px calc(6px + var(--safe-bottom))}
    .send-btn,.stop-btn{width:32px;height:32px}
    .model-chip{padding:3px 8px;font-size:11px}
    .empty-title{font-size:24px}
    .messages{padding:16px 14px;gap:20px}
  }
  /* Tablet — mid-size screens */
  @media (min-width:421px) and (max-width:768px) {
    .sidebar { width: 280px; }
    .chat-input-row { padding: 8px 12px; }
    #chatInput { font-size: 15px; }
    .msg { max-width: 90%; padding: 12px 16px; }
    .model-bar { flex-wrap: wrap; gap: 4px; }
    .model-btn { font-size: 12px; padding: 4px 10px; }
    .coord-label { font-size: 11px; }
  }
  /* Desktop — wider layout */
  @media(min-width:769px){
    .empty-examples{grid-template-columns:1fr 1fr}
  }
  /* Screen-reader only */
  .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .sr-only:focus{position:static;width:auto;height:auto;padding:4px 8px;margin:0;overflow:visible;clip:auto;white-space:normal;background:var(--gold);color:var(--navy);z-index:9999;font-size:14px}
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  /* Disable double-tap zoom on interactive elements */
  button,.model-chip,.model-btn,.sidebar-convo,.msg-action,.slash-item,.team-member{touch-action:manipulation}
  /* Route task info line */
  .route-task-info{font-size:12px;color:var(--text-muted);padding:4px 12px;margin:2px 0;border-left:2px solid var(--gold);opacity:.8}
  .msg-cost{position:absolute;bottom:2px;right:8px;font-size:10px;color:var(--text-muted);opacity:0.5}
  .retry-btn{background:var(--accent,#C9A84C);color:white;border:none;border-radius:8px;padding:4px 12px;cursor:pointer;font-size:12px;margin-left:8px}
  .error-msg{border-left:3px solid #ff4444}
  /* U60 - New message indicator */
  .new-msg-btn{position:fixed;bottom:80px;left:50%;transform:translateX(-50%);background:var(--accent,#C9A84C);color:white;border:none;border-radius:20px;padding:6px 16px;font-size:13px;cursor:pointer;z-index:50;box-shadow:0 2px 8px rgba(0,0,0,.3)}
  /* U42 - Message timestamps */
  .msg-time{font-size:10px;color:var(--text-muted);opacity:0.5;margin-top:4px;text-align:right}
  /* U51 - Code block copy button */
  .code-block-wrap{position:relative}
  .code-copy-btn{position:absolute;top:4px;right:4px;background:var(--surface2);border:1px solid var(--border);border-radius:4px;padding:2px 6px;cursor:pointer;font-size:12px;opacity:0.6;z-index:1}
  .code-copy-btn:hover{opacity:1}
  /* U52 - Long message collapse */
  .msg-collapsed{max-height:400px;overflow:hidden;mask-image:linear-gradient(to bottom, black 80%, transparent);-webkit-mask-image:linear-gradient(to bottom, black 80%, transparent)}
  .msg-expand-btn{display:block;width:100%;text-align:center;background:none;border:1px dashed var(--border);border-radius:8px;padding:6px;color:var(--text-muted);cursor:pointer;font-size:13px;margin:4px 0}
  /* U70 - Continue generation button */
  .continue-btn{display:block;margin:8px auto;background:var(--surface2);border:1px solid var(--accent,#C9A84C);color:var(--accent,#C9A84C);border-radius:20px;padding:8px 20px;cursor:pointer;font-size:13px}
  /* U77 - Memory save notification */
  .memory-toast{position:fixed;top:calc(env(safe-area-inset-top,20px) + 8px);right:20px;background:var(--surface2);border:1px solid var(--accent,#C9A84C);border-radius:12px;padding:10px 16px;font-size:13px;color:var(--text);z-index:999;transform:translateX(120%);transition:transform 0.3s}
  .memory-toast.show{transform:translateX(0)}

  /* U48: Coordinator message styling */
  .msg.coordinator-msg { border-left: 2px solid var(--gold); opacity: 0.85; font-size: 14px; }
  .coord-label { font-size:10px; color:var(--gold); margin-bottom:4px; display:block; }

  /* U54: Pinned conversation indicator */
  .sidebar-convo .pin-icon{display:none;position:absolute;right:32px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--text-muted);padding:4px 6px;border-radius:4px;cursor:pointer}
  .sidebar-convo:hover .pin-icon{display:block}
  .sidebar-convo .pin-icon:hover{color:var(--gold);background:var(--surface2)}
  .sidebar-convo.pinned .pin-icon{display:block;color:var(--gold)}
  .sidebar-convo .pin-badge{color:var(--gold);margin-right:4px;font-size:12px}

  /* U67: Success celebration card */
  .success-card { display:flex; align-items:center; gap:12px; background:linear-gradient(135deg, var(--surface2), var(--surface)); border:1px solid var(--gold); border-radius:16px; padding:16px; margin:8px 0; opacity:0; transform:scale(0.95); transition:all 0.3s; }
  .success-card.show { opacity:1; transform:scale(1); }

  /* U79: Onboarding overlay */
  .onboarding-overlay { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:9998; }
  .onboarding-card { background:var(--surface); border-radius:20px; padding:28px; max-width:360px; text-align:left; }
  .onboarding-card h3 { color:var(--gold); margin-bottom:16px; }
  .onboarding-card ul { list-style:none; padding:0; }
  .onboarding-card li { padding:8px 0; border-bottom:1px solid var(--border); font-size:14px; }
  .onboarding-card code { background:var(--surface2); padding:2px 6px; border-radius:4px; }
  .onboarding-card button { width:100%; margin-top:20px; padding:12px; background:var(--gold); color:white; border:none; border-radius:12px; font-size:15px; cursor:pointer; }
  /* U85: Suggest chips */
  .suggest-chips { display:flex; gap:8px; flex-wrap:wrap; padding:4px 0; }
  .suggest-chip { background:var(--surface2); border:1px solid var(--border); border-radius:20px; padding:6px 14px; font-size:13px; color:var(--text); cursor:pointer; transition:all 0.2s; }
  .suggest-chip:hover { border-color:var(--accent,#C9A84C); color:var(--accent,#C9A84C); }
  /* Print styles (#U177) */
  @media print {
    .sidebar,.header,.input-row,.team-bar,.msg-actions,.suggest-chips,.slash-menu,
    .modal,#offlineBanner,#loginPage,.lock-screen,.onboarding-overlay{display:none!important}
    #chat{height:auto!important;overflow:visible!important}
    #messages{height:auto!important;overflow:visible!important}
    .msg{break-inside:avoid;page-break-inside:avoid}
    body{background:#fff!important;color:#000!important}
    .bubble{background:transparent!important;color:#000!important;border:1px solid #ddd!important}
  }
  /* U130: Emergency mode */
  #emergencyBtn.active { background:var(--accent,#C9A84C)!important; border-color:var(--accent,#C9A84C)!important; }
  /* U125: Deadline widget */
  .deadline-item { display:flex; justify-content:space-between; align-items:center; padding:6px 12px; font-size:12px; border-bottom:1px solid var(--border); }
  .deadline-item small { color:var(--text-muted); white-space:nowrap; }

  /* ═══ UX Improvements ═══ */

  /* Focus-visible for all interactive elements */
  button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
  [role="button"]:focus-visible,.sidebar-convo:focus-visible,.slash-item:focus-visible{
    outline:2px solid var(--gold);outline-offset:2px;
  }

  /* Hover states for icon buttons and actions */
  .icon-btn:hover{background:var(--surface2)}
  .attach-btn:hover{color:var(--text);background:var(--surface2)}
  .sidebar-new-btn:hover{color:var(--text);background:var(--surface)}
  .sidebar-convo:hover{background:var(--surface2)}
  .qa-btn:hover{color:var(--text);background:var(--surface2)}
  .pin-key:hover{background:var(--surface)}
  .pin-key{transition:all .1s}

  /* Missing hover states for interactive elements */
  .example-card:hover{border-color:rgba(255,255,255,0.2);background:var(--surface)}
  .sidebar-add-btn:hover{color:var(--text);border-color:rgba(255,255,255,0.2)}
  .sidebar-section-title:hover{color:var(--text)}
  .sidebar-project:hover,.sidebar-sched:hover{background:var(--surface2)}
  .sidebar-footer-btn:hover{background:var(--surface)}
  .sched-submit:hover{opacity:0.9}
  .skill-list-item:hover{background:var(--surface2)}
  .lock-btn:hover{opacity:0.92}
  .msg-expand-btn,.continue-btn{cursor:pointer;transition:all .15s}
  .msg-expand-btn:hover,.continue-btn:hover{background:var(--surface2);border-color:var(--text-muted)}
  .mem-del{transition:opacity .15s}
  .file-preview-remove:hover{opacity:1;color:var(--red)}
  body.light-mode .example-card:hover{border-color:rgba(0,0,0,0.2);background:var(--surface2)}
  body.light-mode .sidebar-add-btn:hover{border-color:rgba(0,0,0,0.25);color:var(--text)}
  body.light-mode .sidebar-project:hover,.light-mode .sidebar-sched:hover{background:var(--surface2)}

  /* Touch target minimum sizes */
  .mem-del{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
  .modal-close{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
  .convo-del{min-width:36px;min-height:36px;display:flex;align-items:center;justify-content:center}
  .code-copy-btn{min-width:36px;min-height:32px;padding:4px 10px}
  .file-preview-remove{min-width:36px;min-height:36px;display:flex;align-items:center;justify-content:center}

  /* Modal transitions — smooth fade */
  .modal{opacity:0;transition:opacity .2s ease}
  .modal.active{opacity:1;display:flex}
  .modal-sheet{transform:translateY(20px);transition:transform .25s cubic-bezier(.4,0,.2,1)}
  .modal.active .modal-sheet{transform:translateY(0)}

  /* Fix hardcoded rgba for light mode */
  body.light-mode .input-wrap{border-color:rgba(0,0,0,0.12)}
  body.light-mode .input-wrap:focus-within{border-color:rgba(0,0,0,0.25)}
  body.light-mode .thinking-block{border-color:rgba(0,0,0,0.08)}
  body.light-mode .thinking-content{background:rgba(0,0,0,0.03);border-top-color:rgba(0,0,0,0.06)}
  body.light-mode .section-badge{background:rgba(0,0,0,0.07)}
  body.light-mode .sidebar-add-btn{border-color:rgba(0,0,0,0.12)}
  body.light-mode .pin-key{background:var(--surface);border-color:rgba(0,0,0,0.1)}
  body.light-mode .pin-key:active{background:var(--gold);color:var(--navy)}
  body.light-mode .coord-picker{background:var(--surface);border-color:rgba(0,0,0,0.1)}
  body.light-mode .model-picker{background:var(--surface);border-color:rgba(0,0,0,0.1)}
  body.light-mode .dispatch-panel{background:var(--surface);border-color:rgba(0,0,0,0.08)}
  body.light-mode .task-card{background:var(--surface2)}
  body.light-mode .code-copy-btn{background:rgba(0,0,0,0.06);color:var(--text-muted)}
  body.light-mode .bubble code{color:#7B5800}

  /* Code overflow on narrow screens */
  .msg.ai .bubble pre{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:calc(100vw - 48px)}
  .msg.ai .bubble code{word-break:break-word}

  /* Offline banner */
  #offlineBanner{display:none;position:fixed;top:var(--safe-top);left:0;right:0;z-index:250;background:var(--red);color:#fff;text-align:center;padding:6px 16px;font-size:13px;font-weight:600;transition:transform .3s}
  #offlineBanner.show{display:block}

  /* Success card animation */
  .success-card{position:fixed;top:calc(var(--safe-top) + 12px);right:16px;background:var(--surface);border:1px solid var(--green);border-radius:14px;padding:14px 18px;display:flex;align-items:center;gap:12px;z-index:200;box-shadow:0 8px 24px rgba(0,0,0,.3);transform:translateX(120%);transition:transform .35s cubic-bezier(.4,0,.2,1);max-width:320px}
  .success-card.show{transform:translateX(0)}
  body.light-mode .success-card{background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.1)}

  /* Memory toast safe area fix */
  .memory-toast{top:calc(var(--safe-top) + 8px)!important}

  /* Backdrop filter fallback */
  @supports not (backdrop-filter:blur(1px)){
    .modal{background:rgba(0,0,0,.8)}
    .sidebar-overlay{background:rgba(0,0,0,.7)}
  }

  /* ── Agent Goal Panel ── */
  .goal-panel{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:16px;margin:8px 0;width:100%;max-width:100%}
  .goal-header{display:flex;align-items:center;gap:8px;margin-bottom:12px}
  .goal-header .goal-icon{font-size:20px}
  .goal-header .goal-title{font-size:15px;font-weight:600;color:var(--text);flex:1}
  .goal-header .goal-cost{font-size:12px;color:var(--gold);font-weight:500}
  .goal-header .goal-cancel{background:none;border:none;color:var(--text-muted);cursor:pointer;font-size:12px;padding:4px 8px;border-radius:6px}
  .goal-header .goal-cancel:hover{background:var(--surface2);color:var(--error,#e74c3c)}
  .goal-steps{display:flex;flex-direction:column;gap:6px;max-height:400px;overflow-y:auto}
  .goal-step{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:10px;background:var(--surface2);transition:all .3s ease}
  .goal-step.completed{opacity:.8}
  .goal-step.running{border-left:3px solid var(--gold);background:rgba(201,168,76,.08)}
  .goal-step.paused{border-left:3px solid #e67e22;background:rgba(230,126,34,.08)}
  .goal-step.failed{border-left:3px solid var(--error,#e74c3c);opacity:.7}
  .goal-step-icon{font-size:16px;width:22px;text-align:center;flex-shrink:0;padding-top:1px}
  .goal-step-info{flex:1;min-width:0}
  .goal-step-action{font-size:13px;font-weight:500;color:var(--text);line-height:1.4}
  .goal-step-result{font-size:12px;color:var(--text-muted);margin-top:3px;line-height:1.35;overflow:hidden;max-height:60px;text-overflow:ellipsis;cursor:pointer;transition:max-height .3s ease}
  .goal-step-result.expanded{max-height:500px;overflow-y:auto}
  .goal-step .step-cost{font-size:11px;color:var(--gold);margin-top:2px}
  .goal-complete-banner{margin-top:10px;padding:10px 14px;background:rgba(46,204,113,.1);border:1px solid rgba(46,204,113,.25);border-radius:10px;display:flex;align-items:center;gap:8px;font-size:13px;color:#2ecc71}

  /* ── Confirmation Card ── */
  .goal-confirm-card{margin-top:10px;padding:14px;background:var(--surface);border:1px solid #e67e22;border-radius:12px}
  .goal-confirm-card .confirm-title{font-size:14px;font-weight:600;color:#e67e22;margin-bottom:10px;display:flex;align-items:center;gap:6px}
  .goal-confirm-card .confirm-preview{font-size:13px;color:var(--text);background:var(--surface2);padding:10px 12px;border-radius:8px;margin-bottom:12px;line-height:1.5;max-height:200px;overflow-y:auto}
  .goal-confirm-card .confirm-field{margin-bottom:6px}
  .goal-confirm-card .confirm-field label{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}
  .goal-confirm-card .confirm-field .val{font-size:13px;color:var(--text)}
  .goal-confirm-btns{display:flex;gap:8px}
  .goal-confirm-btns button{flex:1;padding:10px;border-radius:10px;border:none;font-size:14px;font-weight:600;cursor:pointer;transition:transform .1s}
  .goal-confirm-btns button:active{transform:scale(.97)}
  .goal-confirm-btns .btn-confirm{background:var(--gold);color:#000}
  .goal-confirm-btns .btn-skip{background:var(--surface2);color:var(--text-muted)}
  .goal-confirm-btns .btn-cancel{background:var(--surface2);color:var(--error,#e74c3c)}

  /* ── Goal Dashboard (sidebar) ── */
  .goal-dash-item{padding:12px 16px;border-bottom:1px solid var(--border);cursor:pointer}
  .goal-dash-item:active{background:var(--surface2)}
  .goal-dash-item .gd-status{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px}
  .goal-dash-item .gd-status.running{background:#2ecc71;box-shadow:0 0 6px rgba(46,204,113,.5)}
  .goal-dash-item .gd-status.paused{background:#e67e22}
  .goal-dash-item .gd-status.completed{background:var(--text-muted)}
  .goal-dash-item .gd-status.failed{background:var(--error,#e74c3c)}
  .goal-dash-item .gd-status.cancelled{background:var(--text-muted);opacity:.5}
  .goal-dash-item .gd-title{font-size:13px;font-weight:500;color:var(--text)}
  .goal-dash-item .gd-meta{font-size:11px;color:var(--text-muted);margin-top:3px}
  body.light-mode .goal-panel{background:#fff;border-color:rgba(0,0,0,.1)}
  body.light-mode .goal-step{background:rgba(0,0,0,.03)}
  body.light-mode .goal-step.running{background:rgba(201,168,76,.06)}
  @keyframes goalPulse{0%,100%{opacity:1}50%{opacity:.5}}
  .goal-step.running .goal-step-icon{animation:goalPulse 1.5s ease-in-out infinite}

  /* ═══════════════════════════════════════════════════════════
     DESKTOP LAYOUT — Claude Code style (wide + breathing room)
     Only activates on screens ≥ 1024px. Mobile stays untouched.
     ═══════════════════════════════════════════════════════════ */
  @media (min-width: 1024px) {
    /* Flex container: sidebar always visible + main area */
    body{display:flex;overflow:hidden}
    #chat{flex:1;min-width:0;overflow:hidden}

    /* Sidebar — always visible, narrower, flat */
    .sidebar-overlay{display:none !important}
    .sidebar{
      position:static !important;
      transform:none !important;
      width:260px;
      min-width:260px;
      max-width:260px;
      padding-top:16px;
      background:var(--surface);
      border-right:1px solid var(--border);
      flex-shrink:0;
    }
    body.light-mode .sidebar{background:#F7F7F5;border-right:1px solid rgba(0,0,0,0.06)}
    .sidebar-header{padding:8px 14px 16px}
    .sidebar-search{padding:0 14px 12px}
    .sidebar-user{font-size:15px;font-weight:600}
    .sidebar-section-title{padding:12px 14px 6px;font-size:11px;letter-spacing:.06em}
    .sidebar-item{font-size:13px;padding:7px 14px;line-height:1.4;color:var(--text);cursor:pointer;border-radius:0}
    .sidebar-item:hover{background:rgba(255,255,255,0.04)}
    body.light-mode .sidebar-item:hover{background:rgba(0,0,0,0.04)}

    /* Hide hamburger menu on desktop */
    .icon-btn.menu-btn,.icon-btn[onclick*="openSidebar"],.sidebar-toggle{display:none !important}

    /* Chat header — minimal, centered title */
    .chat-header{
      padding:14px 32px;
      border-bottom:1px solid var(--border);
      background:var(--bg);
    }
    .header-name{font-size:14px;font-weight:500;color:var(--text-muted)}
    .header-status{display:none}

    /* Team bar + quick actions — full-width, just padding */
    .team-bar,.quick-actions{
      padding-left:32px;
      padding-right:32px;
    }

    /* Messages — fill available space, only padding for breathing */
    .messages{
      padding:40px 48px 32px;
      gap:40px;
    }
    .msg{max-width:100% !important}
    .msg.user{align-self:flex-end;max-width:75% !important}
    .msg.ai{max-width:100% !important;padding-left:0}
    .msg.ai .bubble{font-size:15.5px;line-height:1.8}
    .msg.user .bubble{padding:12px 18px;border-radius:18px;font-size:15px}

    /* Input area — full width, just padding */
    .input-area{
      padding:16px 48px 24px;
      background:var(--bg);
      border-top:1px solid transparent;
    }
    .input-wrap{
      border-radius:20px;
      padding:8px 10px;
      min-height:56px;
      background:var(--surface);
      border:1px solid var(--border);
      box-shadow:0 1px 3px rgba(0,0,0,0.04);
    }
    body.light-mode .input-wrap{
      background:#fff;
      border-color:rgba(0,0,0,0.12);
      box-shadow:0 1px 4px rgba(0,0,0,0.04);
    }
    textarea{font-size:15px;padding:10px 8px}
    .model-selector{
      padding:4px 48px 0;
      margin:0;
    }

    /* File preview — full width */
    #filePreview{padding:0 48px}

    /* Empty state — more elegant spacing */
    .empty-state{padding:80px 32px;max-width:720px;margin:0 auto}
    .empty-title{font-size:32px;font-weight:400;letter-spacing:-0.02em}
    .empty-sub{font-size:16px;margin-bottom:48px}
    .empty-examples{grid-template-columns:1fr 1fr;gap:12px;max-width:600px}
    .example-card{padding:18px 20px;border-radius:14px}
    .example-card:hover{border-color:var(--border);background:var(--surface);transform:translateY(-1px)}

    /* Modals — wider on desktop */
    .modal{align-items:center;padding:40px}
    .modal-sheet{
      max-width:720px;
      margin:0 auto;
      border-radius:16px;
      max-height:82vh;
    }

    /* Message actions — subtler, only on hover */
    .msg .msg-actions{opacity:0}
    .msg:hover .msg-actions{opacity:1}
    .msg-action{padding:6px 10px;font-size:12px;min-height:32px}

    /* Code blocks — slightly wider in messages */
    .msg.ai .bubble pre{
      margin:16px 0;
      padding:16px 18px;
      border-radius:10px;
      font-size:13px;
      line-height:1.6;
    }

    /* Scrollbar — visible but thin on desktop */
    .messages::-webkit-scrollbar{display:block;width:8px}
    .messages::-webkit-scrollbar-thumb{background:rgba(255,255,255,.08);border-radius:4px}
    .messages::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.15)}
    body.light-mode .messages::-webkit-scrollbar-thumb{background:rgba(0,0,0,.08)}
    body.light-mode .messages::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.18)}
    .sidebar-scroll::-webkit-scrollbar{display:block;width:6px}
    .sidebar-scroll::-webkit-scrollbar-thumb{background:rgba(255,255,255,.05);border-radius:3px}

    /* Section items in sidebar — more Claude-like */
    .sidebar-section.expanded{background:transparent}
    .section-badge{background:rgba(255,255,255,.06);font-size:10px}
    .sidebar-new-btn{
      width:100%;
      justify-content:center;
      padding:10px;
      background:var(--surface2);
      border:1px solid var(--border);
      font-size:13px;
      color:var(--text);
      margin-top:4px;
    }
    .sidebar-new-btn:hover{background:var(--surface);border-color:rgba(255,255,255,0.15)}
    body.light-mode .sidebar-new-btn{background:#fff;border-color:rgba(0,0,0,0.1)}

    /* v5.12.1 — centering + sidebar wrap fix */
    .chat-header{align-self:stretch;width:100%}
    .team-bar,.quick-actions{align-self:stretch;width:100%}
    .messages{scrollbar-gutter:stable;width:100%}
    .input-area{align-self:stretch;width:100%}

    .sidebar-header{
      flex-direction:column;
      align-items:flex-start;
      justify-content:flex-start;
      gap:10px;
    }
    .sidebar-user{
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
      min-width:0;
      width:100%;
    }

    /* Typography polish */
    .msg.ai .bubble p{margin:10px 0}
    .msg.ai .bubble h3{font-weight:700}
  }

  /* Extra wide desktops — bigger padding, no width cap */
  @media (min-width: 1440px) {
    .messages{padding:48px 64px 32px;gap:44px}
    .team-bar,.quick-actions{padding-left:64px;padding-right:64px}
    .input-area{padding:20px 64px 32px}
    .model-selector{padding:4px 64px 0}
    #filePreview{padding:0 64px}
    .sidebar{width:280px;min-width:280px;max-width:280px}
  }

  /* Ultra-wide screens (≥1920px) — more padding, still full-width content */
  @media (min-width: 1920px) {
    .messages{padding:56px 96px 40px;gap:48px}
    .team-bar,.quick-actions{padding-left:96px;padding-right:96px}
    .input-area{padding:24px 96px 36px}
    .model-selector{padding:4px 96px 0}
    #filePreview{padding:0 96px}
    .sidebar{width:300px;min-width:300px;max-width:300px}
    .msg.ai .bubble{font-size:16px;line-height:1.82}
  }

  /* 4K / mega-wide (≥2400px) — Jay's screen */
  @media (min-width: 2400px) {
    .messages{padding:64px 140px 48px;gap:52px}
    .team-bar,.quick-actions{padding-left:140px;padding-right:140px}
    .input-area{padding:28px 140px 40px}
    .model-selector{padding:4px 140px 0}
    #filePreview{padding:0 140px}
    .sidebar{width:320px;min-width:320px;max-width:320px}
    .msg.ai .bubble{font-size:16.5px;line-height:1.85}
    .msg.user .bubble{font-size:15.5px}
  }

  /* ═══════════════════════════════════════════════════════════
     MOBILE LAYOUT — Claude app style (breathing room + softness)
     Only activates on screens < 1024px (i.e. phones + tablets).
     ═══════════════════════════════════════════════════════════ */
  @media (max-width: 1023px) {
    /* Header — more minimal, less cluttered */
    .chat-header{
      padding:calc(var(--safe-top) + 6px) 16px 10px;
      border-bottom:.5px solid var(--border);
    }
    .header-name{font-size:15px;font-weight:500}
    .header-status{font-size:10.5px;margin-top:2px;opacity:.7}

    /* Quick actions — more airy */
    .quick-actions{
      gap:8px;
      padding:10px 16px 12px;
    }
    .qa-btn{
      border-radius:100px;
      padding:8px 16px;
      font-size:13px;
      background:transparent;
      border:1px solid var(--border);
      color:var(--text);
      font-weight:400;
    }
    .qa-btn:active{background:var(--surface);transform:scale(.97)}

    /* Messages — more breathing room */
    .messages{
      padding:24px 18px 20px;
      gap:32px;
    }
    .msg{max-width:92%}
    .msg.user{max-width:82%}
    .msg.ai{max-width:100%}

    /* AI bubble — flat, no padding (Claude-style) */
    .msg.ai .bubble{
      font-size:15.5px;
      line-height:1.78;
      letter-spacing:0.005em;
    }
    .msg.ai .bubble p{margin:10px 0}
    .msg.ai .bubble p:first-child{margin-top:0}
    .msg.ai .bubble p:last-child{margin-bottom:0}
    .msg.ai .bubble ul,.msg.ai .bubble ol{margin:12px 0;padding-left:22px}
    .msg.ai .bubble li{margin-bottom:8px;line-height:1.75}
    .msg.ai .bubble h1{font-size:22px;margin:20px 0 10px;font-weight:600;letter-spacing:-0.01em}
    .msg.ai .bubble h2{font-size:18px;margin:18px 0 8px;font-weight:600}
    .msg.ai .bubble h3{font-size:16px;margin:14px 0 6px;font-weight:600}
    .msg.ai .bubble strong{font-weight:600}
    .msg.ai .bubble pre{
      margin:14px -2px;
      padding:14px 16px;
      border-radius:12px;
      font-size:13px;
      line-height:1.65;
    }
    .msg.ai .bubble code{
      font-size:13.5px;
      padding:2px 6px;
      border-radius:5px;
    }
    .msg.ai .bubble hr{margin:18px 0}

    /* User bubble — softer, rounder */
    .msg.user .bubble{
      padding:11px 16px;
      border-radius:20px;
      border-bottom-right-radius:8px;
      font-size:15px;
      line-height:1.5;
      background:var(--surface2);
    }

    /* Message actions — always visible but subtle */
    .msg.ai .msg-actions{opacity:.55;margin-top:10px;gap:2px}
    .msg.ai .msg-actions:active,.msg.ai:active .msg-actions{opacity:1}
    .msg-action{
      padding:6px 10px;
      font-size:12px;
      min-height:36px;
      border-radius:8px;
      gap:5px;
    }
    .msg-action svg{width:13px;height:13px}

    /* Input area — wider, softer, more Claude-like */
    .input-area{
      padding:10px 14px calc(10px + var(--safe-bottom));
      gap:8px;
    }
    .input-wrap{
      border-radius:26px;
      padding:7px 8px 7px 6px;
      min-height:52px;
      background:var(--surface);
      border:1px solid var(--border);
      box-shadow:0 1px 3px rgba(0,0,0,0.06);
    }
    body.light-mode .input-wrap{
      background:#fff;
      border-color:rgba(0,0,0,0.1);
      box-shadow:0 1px 6px rgba(0,0,0,0.04);
    }
    textarea{font-size:16px;line-height:1.5;padding:10px 6px 10px 10px}
    textarea::placeholder{font-size:15px;color:var(--text-muted);opacity:.7}
    .send-btn{width:40px;height:40px}
    .attach-btn{padding:9px}
    .attach-btn svg{width:20px;height:20px}

    /* Model selector — pills below input, more airy */
    .model-selector{padding:6px 12px 0;gap:5px}
    .model-chip{
      padding:5px 12px;
      font-size:12px;
      border-radius:100px;
      background:transparent;
    }
    .model-chip.active{background:var(--surface2);color:var(--text)}

    /* Empty state — elegant, centered */
    .empty-state{
      padding:48px 24px;
      justify-content:center;
    }
    .empty-logo{
      font-size:10px;
      letter-spacing:.25em;
      margin-bottom:16px;
      opacity:.6;
    }
    .empty-title{
      font-size:26px;
      font-weight:400;
      letter-spacing:-0.02em;
      margin-bottom:12px;
      line-height:1.2;
    }
    .empty-sub{
      font-size:14.5px;
      color:var(--text-muted);
      line-height:1.6;
      margin-bottom:36px;
      max-width:320px;
    }
    .empty-examples{gap:10px}
    .example-card{
      padding:16px 16px;
      border-radius:14px;
      border:1px solid var(--border);
      background:transparent;
    }
    .example-card:active{background:var(--surface);border-color:rgba(255,255,255,.12)}
    .example-tag{font-size:10.5px;margin-bottom:6px;letter-spacing:.05em;opacity:.7}
    .example-text{font-size:13.5px;line-height:1.45}

    /* Sidebar drawer — more Claude-like when opened */
    .sidebar{
      width:82vw;
      max-width:320px;
      background:var(--surface);
    }
    body.light-mode .sidebar{background:#F7F7F5}
    .sidebar-header{padding:18px 16px 14px}
    .sidebar-user{font-size:17px;font-weight:600}
    .sidebar-search input{
      background:var(--surface2);
      border-radius:12px;
      padding:11px 14px;
      font-size:14px;
    }
    body.light-mode .sidebar-search input{background:rgba(0,0,0,0.04)}
    .sidebar-item{
      font-size:14px;
      padding:9px 16px;
      line-height:1.4;
      color:var(--text);
      border-radius:0;
    }
    .sidebar-item:active{background:var(--surface2)}
    .sidebar-section-title{
      padding:14px 16px 6px;
      font-size:11px;
      letter-spacing:.06em;
      opacity:.75;
    }
    .sidebar-new-btn{
      background:var(--surface2);
      border:1px solid var(--border);
      border-radius:12px;
      padding:9px 14px;
      font-size:13px;
      color:var(--text);
    }
    body.light-mode .sidebar-new-btn{background:#fff;border-color:rgba(0,0,0,0.08)}

    /* Modals — softer, rounder bottom sheets */
    .modal-sheet{
      border-radius:20px 20px 0 0;
      max-height:78vh;
      padding-top:8px;
    }
    .modal-header{
      padding:16px 20px 12px;
      font-size:16px;
      font-weight:600;
      border-bottom:.5px solid var(--border);
    }
    .modal-sheet::before{
      content:'';
      position:absolute;
      top:8px;
      left:50%;
      transform:translateX(-50%);
      width:36px;
      height:4px;
      background:var(--text-muted);
      border-radius:2px;
      opacity:.25;
    }

    /* Team bar — cleaner on mobile */
    .team-bar{padding:8px 16px;gap:10px}
    .team-member{font-size:11.5px;letter-spacing:.02em}

    /* Typing indicator — more subtle */
    .typing{padding:8px 2px}
    .typing span{width:6px;height:6px}

    /* Thinking block — softer */
    .thinking-block{
      border-radius:14px;
      border:1px solid var(--border);
      background:var(--surface);
      margin:12px 0;
    }
    .thinking-block summary{
      padding:10px 14px;
      font-size:13px;
      color:var(--text-muted);
    }
    .thinking-content{
      padding:12px 14px 14px;
      font-size:13.5px;
      line-height:1.65;
    }

    /* Tables — horizontal scroll card style */
    .msg.ai .bubble table{
      margin:14px -2px;
      font-size:13.5px;
      border:1px solid var(--border);
      border-radius:10px;
      overflow:hidden;
    }
    .msg.ai .bubble th,.msg.ai .bubble td{
      padding:9px 12px;
      border:none;
      border-bottom:.5px solid var(--border);
    }
    .msg.ai .bubble tr:last-child td{border-bottom:none}
    .msg.ai .bubble th{background:var(--surface2);font-weight:600;font-size:13px}
  }

  /* ═══════════════════════════════════════════════════════════
     TOOL CALL COLLAPSIBLE — Claude-app style
     "Ran N commands, searched code" link-style collapse
     ═══════════════════════════════════════════════════════════ */
  .tool-call-collapsed{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 12px;
    margin:8px 0;
    background:transparent;
    border:1px solid var(--border);
    border-radius:10px;
    font-size:13px;
    color:var(--text-muted);
    cursor:pointer;
    transition:all .15s;
  }
  .tool-call-collapsed:hover,.tool-call-collapsed:active{
    background:var(--surface);
    color:var(--text);
    border-color:rgba(255,255,255,0.15);
  }
  .tool-call-collapsed::before{
    content:'›';
    font-size:14px;
    opacity:.6;
    transition:transform .2s;
  }
  .tool-call-collapsed.expanded::before{transform:rotate(90deg)}
  .tool-call-body{
    display:none;
    margin:6px 0 10px;
    padding:12px 14px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:12px;
    font-size:13px;
    line-height:1.6;
    color:var(--text-muted);
    font-family:'SF Mono',Monaco,Consolas,monospace;
  }
  .tool-call-body.expanded{display:block}
