/* Same hierarchy as the shared Windows/macOS LanMateReplyProcess; web theme tokens. */
.task-split { grid-template-columns:minmax(240px,300px) minmax(0,1fr); }
.task-filters { padding:10px; gap:4px; }
.task-filters button { padding-inline:8px; gap:4px; }
.task-filters button > span { white-space:nowrap; }
.task-context-header { display:flex; justify-content:space-between; gap:12px; color:var(--web-muted); font-size:13px; overflow-wrap:anywhere; }
.task-detail .task-prompt-bubble { width:fit-content; max-width:min(760px,100%); margin:20px 0 24px auto; padding:12px 16px; border:1px solid var(--web-line); border-radius:12px 12px 3px 12px; background:var(--web-panel-muted); color:var(--web-text); font-size:14px; line-height:1.75; overflow-wrap:anywhere; }
.task-prompt-bubble p { margin:0; }
.task-steering-bubble small { display:block; margin-bottom:6px; color:var(--web-muted); font-size:11px; font-weight:700; letter-spacing:.02em; }
.task-reply { --reply-danger:#b13c54; --reply-warn:#87551a; color:var(--web-text); border:1px solid var(--web-line); background:var(--web-panel); border-radius:12px; padding:16px 22px; margin-block:18px; font-size:14px; line-height:1.7; min-width:0; }
.task-reply-header { display:flex; align-items:center; gap:8px; flex-wrap:wrap; border-bottom:1px solid var(--web-line); padding-bottom:8px; min-width:0; }
.task-reply button,.reply-evidence-dialog button { font:inherit; cursor:pointer; }
.task-reply svg { display:block; width:16px; height:16px; flex:0 0 16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.task-reply .reply-summary { display:flex; gap:9px; align-items:center; text-align:left; margin-right:auto; min-height:40px; min-width:0; padding:6px 8px; border:0; border-radius:7px; background:transparent; color:var(--web-muted); font-size:13px; }
.reply-summary > span { min-width:0; }
.reply-summary b { color:var(--web-text); font-weight:500; font-variant-numeric:tabular-nums; }
.reply-activity { display:block; overflow-wrap:anywhere; color:var(--web-text); }
.reply-evidence-actions { display:flex; flex-wrap:wrap; gap:2px; }
.reply-evidence-actions button { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:6px 8px; border:0; border-radius:6px; color:var(--web-muted); background:transparent; white-space:nowrap; font-size:13px; }
.task-reply button:hover:not(:disabled),.reply-evidence-dialog button:hover { background:var(--web-panel-muted); color:var(--web-text); }
.task-reply button:active:not(:disabled),.reply-evidence-dialog button:active { background:color-mix(in srgb,var(--web-accent) 12%,var(--web-panel)); }
.task-reply button:focus-visible,.task-reply summary:focus-visible,.reply-evidence-dialog button:focus-visible { outline:2px solid var(--web-accent); outline-offset:2px; }
.task-reply button:disabled { cursor:default; opacity:.65; }
.reply-outcome { display:flex; align-items:center; gap:10px; margin-left:auto; color:var(--web-muted); font-size:12px; }
.reply-outcome > span { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:20px; background:var(--web-panel-muted); white-space:nowrap; }
.reply-outcome time { white-space:nowrap; font-variant-numeric:tabular-nums; }
.task-reply .reply-stop { display:inline-flex; align-items:center; justify-content:center; flex:none; width:36px; height:36px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--reply-danger); }
.task-reply .reply-stop svg { width:24px; height:24px; flex:none; fill:currentColor; stroke:none; }
.task-reply .reply-stop:hover:not(:disabled) { color:var(--reply-danger); background:color-mix(in srgb,var(--reply-danger) 7%,var(--web-panel)); }
.task-reply .reply-stop:active:not(:disabled) { color:var(--reply-danger); background:color-mix(in srgb,var(--reply-danger) 12%,var(--web-panel)); }
.reply-outcome[data-status=exception] > span { color:var(--reply-warn); background:color-mix(in srgb,#dba94e 14%,var(--web-panel)); }
.reply-outcome[data-status=running] > span { color:var(--web-accent); background:color-mix(in srgb,var(--web-accent) 10%,var(--web-panel)); }
.reply-outcome[data-status=completed] > span { color:var(--web-success,var(--web-accent)); background:color-mix(in srgb,#47a583 12%,var(--web-panel)); }
.reply-outcome[data-status=failed] > span { color:var(--reply-danger); background:color-mix(in srgb,var(--reply-danger) 9%,var(--web-panel)); }
.reply-chevron { display:block; width:6px; height:6px; flex:0 0 6px; border-right:1.5px solid currentColor; border-top:1.5px solid currentColor; transform:rotate(45deg); margin:0 5px 0 2px; transition:transform 120ms ease; }
.reply-summary[aria-expanded=true] > .reply-chevron,.reply-actions[open] > summary > .reply-chevron { transform:rotate(135deg); }
.reply-content { padding:6px 4px 0; }
.reply-content[hidden],.reply-new-progress[hidden] { display:none; }
.reply-blocks { max-height:min(48vh,480px); overflow:auto; scrollbar-gutter:stable; padding-right:6px; }
.reply-block { padding:7px 0; min-width:0; }
.reply-block + .reply-block { border-top:1px solid var(--web-line); }
.reply-actions > summary { display:flex; gap:8px; align-items:center; min-height:40px; padding:6px 2px; list-style:none; cursor:pointer; color:var(--web-muted); }
.reply-actions > summary::-webkit-details-marker { display:none; }
.reply-actions > summary > span:last-child { min-width:0; overflow-wrap:anywhere; }
.reply-actions > summary:hover { color:var(--web-accent); }
.reply-actions > summary:active { opacity:.8; }
.reply-icon { display:inline-flex; color:var(--web-accent); padding:0; background:none; flex:0 0 16px; }
.reply-icon.is-failed { color:var(--reply-danger); }
.reply-icon.is-waiting { color:var(--reply-warn); }
.reply-command-details { min-width:0; margin-top:10px; }
.reply-command-details > summary { cursor:pointer; padding:5px 0; font-size:13px; color:var(--web-muted); }
.reply-command-details > strong { display:block; margin:8px 0 4px; font-size:13px; font-weight:500; }
.reply-command-details > pre { max-height:280px; overflow:auto; margin:0; padding:10px; border:1px solid var(--web-line); border-radius:6px; white-space:pre-wrap; overflow-wrap:anywhere; user-select:text; font:13px/1.55 Consolas,monospace; color:var(--web-text); background:var(--web-panel-muted); }
.reply-action-list { max-height:280px; overflow:auto; scrollbar-gutter:stable; }
.reply-action { padding:4px 6px 10px 28px; color:var(--web-muted); min-width:0; }
.reply-action header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.reply-action strong { font-size:13px; font-weight:500; }
.reply-action small { font-size:12px; }
.reply-action.is-failed small { color:var(--reply-danger); }
.task-reply .markdown-content { font-size:14px; line-height:1.8; overflow-wrap:anywhere; user-select:text; }
.task-reply .markdown-content > :first-child { margin-top:0; }
.task-reply .markdown-content > :last-child { margin-bottom:0; }
.reply-answer { margin-top:22px; padding:4px 0 6px; color:var(--web-text); }
.reply-empty { color:var(--web-muted); margin-bottom:4px; }
.reply-new-progress { display:block; margin:8px 0 0 auto; padding:5px 10px; border:1px solid var(--web-line); border-radius:6px; color:var(--web-text); background:var(--web-panel); }
.reply-evidence-dialog { width:min(640px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:0; border:1px solid var(--web-line); border-radius:16px; color:var(--web-text); background:var(--web-panel); box-shadow:0 16px 60px #0003; font:inherit; }
.reply-evidence-dialog::backdrop { background:rgba(27,38,54,.45); backdrop-filter:blur(8px); }
.reply-evidence-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--web-line); }
.reply-evidence-dialog h2 { margin:0; font-size:16px; font-weight:600; }
.reply-evidence-dialog > header button { width:36px; height:36px; border:0; border-radius:6px; color:var(--web-muted); background:transparent; font-size:24px; }
.reply-evidence-body { padding:18px; max-height:calc(100dvh - 144px); overflow:auto; overflow-wrap:anywhere; font-size:14px; line-height:1.75; user-select:text; }
.reply-evidence-body > :first-child { margin-top:0; }
.reply-evidence-body .task-usage-card { display:flex; flex-direction:column; align-items:flex-start; margin:0; padding:0; background:none; border:0; gap:14px; }
.reply-evidence-body .task-usage-card > span { display:none; }
.reply-facts { margin:0; }
.reply-facts > div { display:grid; grid-template-columns:minmax(100px,1fr) minmax(0,2fr); gap:14px; padding:12px 0; border-bottom:1px solid var(--web-line); }
.reply-facts > div:last-child { border-bottom:0; }
.reply-facts dt { color:var(--web-muted); }
.reply-facts dd { margin:0; text-align:right; }
html[data-theme=dark] .task-reply { --reply-danger:#f09cad; --reply-warn:#e7bb73; }
@media(prefers-color-scheme:dark) { html[data-theme=system] .task-reply { --reply-danger:#f09cad; --reply-warn:#e7bb73; } }
@media(max-width:1100px),(orientation:portrait) {
  .task-split { grid-template-columns:minmax(0,1fr); }
  .task-split .task-detail { display:none; }
  .task-split.is-detail-open .task-list-pane { display:none; }
  .task-split.is-detail-open .task-detail { display:block; }
  .task-detail .mobile-back-button { display:inline-flex; align-items:center; gap:5px; width:fit-content; min-height:40px; margin:0 0 12px; padding:0; border:0; background:transparent; color:var(--web-accent); font:inherit; font-size:13px; cursor:pointer; }
  .task-detail .mobile-back-button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; }
}
@media(max-width:600px) {
  .task-reply { padding:12px; }
  .task-reply-header { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  .task-reply .reply-summary { grid-column:1; grid-row:1; padding-inline:0; margin:0; }
  .reply-evidence-actions { width:100%; grid-column:1 / -1; grid-row:2; }
  .reply-evidence-actions button { flex:1; justify-content:center; }
  .reply-outcome { grid-column:2; grid-row:1; gap:6px; max-width:120px; flex-wrap:wrap; justify-content:flex-end; margin:0; }
  .reply-outcome time { font-size:11px; }
  .task-reply .reply-stop { width:44px; height:44px; }
  .reply-action { padding-left:12px; }
  .reply-evidence-dialog { width:calc(100vw - 24px); }
  .reply-facts > div { grid-template-columns:1fr; gap:3px; }
  .reply-facts dd { text-align:left; }
}
@media(pointer:coarse) { .reply-actions > summary,.task-reply .reply-summary,.reply-evidence-actions button { min-height:44px; } }
@media(prefers-reduced-motion:reduce) { .reply-chevron { transition:none; } }
/* Touch hover can remain latched in Safari after tapping. Keep semantic selected
   states and keyboard focus, but no pressed/hover surface on reply tools. */
@media(hover:none) {
  .task-reply button:hover:not(:disabled),.task-reply button:active:not(:disabled),
  .reply-evidence-dialog button:hover,.reply-evidence-dialog button:active { background:transparent; }
  .task-reply .reply-stop:hover:not(:disabled),.task-reply .reply-stop:active:not(:disabled) { background:transparent; color:var(--reply-danger); }
  .reply-actions > summary:hover { color:var(--web-muted); }
  .reply-actions > summary:active { opacity:1; }
}
