.workflow-col{width:var(--workflow-w,250px);flex-shrink:0;background:var(--bg-side);border-right:1px solid var(--border);padding:20px 16px;overflow-y:auto;min-width:0}
.workflow-col[hidden]{display:none !important}
.wf-label{font-family:var(--font-mono);font-size:12px;letter-spacing:0.1em;color:var(--text-muted);text-transform:uppercase;margin-bottom:16px}
.wf-spine{width:1px;height:16px;background:var(--border-md);margin-left:17px}
.wf-node{position:relative;display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:9px;border:1px solid var(--border-md);background:var(--surface);margin-bottom:0}
.wf-node.editable{cursor:pointer}
.wf-node.editable:hover{border-color:var(--accent-dim)}
.wf-node.current{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-glow)}
.wf-node.failed{border-color:var(--blocking)}
.wf-node[data-wf-jump]{cursor:pointer}
.wf-node-head{display:flex;align-items:flex-start;gap:8px;min-width:0}
.wf-index{flex-shrink:0;font-family:var(--font-mono);font-size:11.5px;color:var(--text-muted);min-width:1.2em;text-align:right;margin-top:1px}
.wf-node-head .wf-node-title{flex:1;min-width:0;word-break:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wf-node[data-wf-jump] .wf-node-model,
.wf-node[data-wf-jump] .wf-status,
.wf-node[data-wf-jump] .wf-editor{margin-left:calc(1.2em + 8px)}
.wf-node-title{font-size:12.5px;font-weight:600;color:var(--text)}
.wf-node-model{font-family:var(--font-mono);font-size:11.5px;color:var(--text-muted)}
.wf-status{display:flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:11.5px;color:var(--text-muted);margin-top:2px}
.wf-status .dot{width:6px;height:6px;border-radius:50%;background:var(--text-muted);flex-shrink:0}
.wf-status.running .dot{background:var(--accent)}
.wf-status.done .dot{background:#5a8a6a}
.wf-status.failed .dot{background:var(--blocking)}
.wf-group{margin-left:24px;display:flex;flex-direction:column;gap:8px;position:relative}
.wf-group::before{content:'';position:absolute;left:-14px;top:0;bottom:14px;width:1px;background:var(--border-md)}
.wf-group-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:2px}
.wf-group-label span{font-size:12.5px;font-weight:600;letter-spacing:-0.02em;color:var(--text-muted)}
.wf-group-label.current span{color:var(--accent)}
.wf-count-ctrl{display:flex;align-items:center;gap:6px}
.wf-count-ctrl button{width:18px;height:18px;border-radius:5px;border:1px solid var(--border-md);background:var(--surface2);color:var(--text-muted);font-size:12px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.wf-count-ctrl button:hover{color:var(--text);border-color:var(--accent-dim)}
.wf-count-ctrl span{font-family:var(--font-mono);font-size:11.5px;color:var(--text-muted);min-width:8px;text-align:center}
.wf-editor{display:none;margin-top:8px;padding-top:8px;border-top:1px solid var(--border)}
.wf-node.open .wf-editor{display:block}
.wf-editor select{width:100%;background:var(--bg);border:1px solid var(--border-md);border-radius:6px;color:var(--text);font-family:var(--font-sans);font-size:12px;padding:6px 8px}

.task-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:14px;width:100%}
.task-card strong{font-size:16px}
.task-card label{display:block;font-weight:600;font-size:15px;margin:8px 0 4px}
.task-card textarea,.task-card input[type=number],.task-card input[type=text],.task-card input:not([type]),.task-card select{width:100%;font:inherit;font-size:15px;background:var(--bg);color:var(--text);border:1px solid var(--border-md);border-radius:8px;padding:8px}
.task-card .caption{color:var(--text-muted);font-size:14.5px;margin:4px 0 0;line-height:1.45}
.live-log{font-family:var(--font-sans);font-size:14.5px;line-height:1.45;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:8px 10px;max-height:140px;overflow:auto;color:var(--text-muted);white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
@media (max-width:1024px){
  .task-card,.task-card strong{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
}
@media (min-width:768px) and (max-width:1024px){
  #live-tasks,#live-critics{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
}
@media (max-width:767px){
  #live-tasks,#live-critics{display:flex;flex-direction:column;gap:12px}
  .task-card{padding:14px}
}
@media (max-width:1024px){
  .wf-count-ctrl button{position:relative}
  .wf-count-ctrl button::before{content:"";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%)}
  #new-run-form{max-width:100%}
  #new-run-form textarea,#new-run-form select,#new-run-form input{
    width:100%;max-width:100%;min-width:0;font-size:16px;
  }
  #new-run-form select,#new-run-form .btn,#new-run-form .team-toggle,#approve-run,
  #brief-clarify-form .btn,#brief-review-form .btn,#brief-cancel{min-height:44px}
  #new-run-form textarea#brief{min-height:9rem;line-height:1.45}
  .role-field{min-width:0}
  .gate1-list select.edit-field,.gate1-list textarea.edit-field,.gate1-list input.edit-field{font-size:16px;max-width:100%}
  .gate1-list select.edit-field{min-height:44px}
}
@media (min-width:768px) and (max-width:1024px){
  #team-panel:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;align-items:start}
  #team-panel > .muted{grid-column:1 / -1}
}
@media (max-width:767px){
  #new-run-form .btn,#new-run-form .team-toggle,#approve-run,
  #brief-clarify-form .btn,#brief-review-form .btn,#brief-cancel{
    width:100%;display:inline-flex;align-items:center;justify-content:center;
  }
}
