/* Vici shared mini - the modal's compact task card and toolbar dress.
   Rules moved verbatim and in source order from panel.css, then the mini
   rules from vicit-surface.css. Host overlay placement, global visibility,
   geometry and animation stay local. The modal remains the master copy;
   an edit is a dock landing that also deploys the web. */
.vi-using {
  display:none; flex-wrap:wrap; justify-content:flex-start; align-content:flex-start;
  gap:6px; max-height:80px; overflow-y:auto; margin-bottom:8px; padding:3px 8px 3px 2px; box-sizing:border-box;
}
.vi-using.has-context { display:flex; }
.vi-card .armed-mark-body { appearance:none; display:flex; align-items:center; flex:1 1 auto; min-width:0; gap:6px; height:100%; padding:3px 6px; border:0; border-radius:7px; background:transparent; color:var(--text); font-size:12px; line-height:18px; text-align:left; cursor:pointer; }
.vi-card .armed-mark-x { position:static; flex:0 0 24px; width:24px; height:24px; border:0; border-radius:5px; background:transparent; color:var(--muted); font:inherit; font-size:16px; line-height:20px; padding:0; cursor:pointer; }
.vi-runner { flex-basis:32px; width:32px; height:32px; }
.vi-card { position:relative; pointer-events:auto; display:flex; flex-direction:column; box-sizing:border-box; width:380px; min-width:0; overflow:hidden; background:var(--bg); border:1px solid var(--border); border-radius:16px; color:var(--text); text-align:left; font-size:13.5px; line-height:20px; }
.vi-handle { height:28px; flex:0 0 28px; position:relative; cursor:grab; }
.vi-grip { position:absolute; top:10px; left:calc(50% - 14px); width:28px; height:3px; border-radius:2px; background:var(--control-border); }
.vi-header { display:flex; flex:0 0 auto; align-items:center; gap:8px; padding:0 20px 12px; min-height:24px; }
.vi-brand { font-size:16px; font-weight:600; color:var(--accent-mark); }
.vi-status { color:var(--muted); font-size:11.5px; line-height:16px; padding:2px 7px; background:var(--surface-2); border-radius:5px; white-space:nowrap; }
.vi-more { margin-left:auto; font-size:20px!important; width:28px; padding:0!important; }
.vi-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 20px 16px; }
.vi-task { font-size:16px; line-height:22px; font-weight:600; margin-bottom:8px; white-space:pre-wrap; overflow-wrap:anywhere; }
.vi-line { color:var(--muted); white-space:pre-wrap; overflow-wrap:anywhere; }
.vi-report-preview { margin-top:8px; font-size:12px; line-height:18px; white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; overflow:hidden; }
.vi-recent { margin-top:10px; color:var(--muted); font-size:11.5px; line-height:17px; }
.vi-recent-label { font-size:10.5px; margin-bottom:2px; }
.vi-recent-steps { margin:0; padding-left:14px; }
.vi-recent-step { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vi-report-preview[hidden],.vi-recent[hidden] { display:none; }
.vicit-indicator[data-state="finished"] .vi-status { color:var(--accent-link); background:var(--accent-soft); white-space:nowrap; padding:2px 6px; }
.vi-result-action { display:flex; flex:0 0 auto; padding:0 20px 16px; }
.vi-result-action[hidden],.vi-footer[hidden] { display:none; }
.vi-result-action .vi-open { margin:0; min-height:36px; }
.vi-question-slot:empty, .vi-receipt:empty { display:none; }
.vi-question { margin-top:0!important; }
.vi-ask { margin-top:14px; }
.vi-row { display:flex; align-items:flex-end; gap:8px; }
.vi-input { flex:1; min-width:0; height:36px; min-height:36px; max-height:100px; resize:none; padding:8px 10px; border:1px solid var(--control-border); border-radius:8px; background:var(--surface); color:var(--text); font:inherit; font-size:13px; line-height:18px; box-sizing:border-box; }
.vi-input::placeholder { color:var(--muted); }
.vi-card button { appearance:none; cursor:pointer; font:inherit; font-size:13px; line-height:18px; color:var(--text); }
.vi-submit { height:36px; padding:0 12px; border:1px solid var(--control-border); border-radius:7px; background:var(--surface); }
.vi-footer { display:flex; align-items:center; gap:6px; flex:0 0 auto; min-height:44px; padding:0 20px; border-top:1px solid var(--border); font-size:11.5px; color:var(--muted); }
.vi-pause,.vi-open,.vi-more { border:0; background:transparent; padding:4px 0; }
.vi-open { margin-left:auto; }
.vi-esc { border:1px solid var(--border); border-radius:4px; font:inherit; padding:0 4px; line-height:16px; }
.vi-menu { position:absolute; top:56px; right:16px; z-index:2; padding:4px; min-width:130px; border:1px solid var(--control-border); border-radius:8px; background:var(--surface); }
.vi-menu-action { border:0; background:transparent; padding:8px 12px; width:100%; text-align:left; border-radius:4px; }
.vi-menu-action:hover { background:var(--surface-2); }
.vi-receipt { color:var(--muted); font-size:11.5px; line-height:16px; margin-top:8px; }
.vi-retry { margin-left:8px; border:0; padding:0; background:transparent; color:var(--link)!important; }
.vi-card [hidden] { display:none!important; }
.vi-card button:disabled { cursor:default; opacity:.55; }
.vi-card :focus-visible { outline:2px solid var(--accent-mark); outline-offset:2px; }
.vi-retry { color:var(--accent-link)!important; }
.vi-grip { background:var(--grabber); }
.vi-card { min-height:230px; }
.vi-body { flex:1 1 auto; }
.vi-status::before { content:""; display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:var(--accent-mark); }
.vi-card button:disabled { opacity:1; color:var(--muted); background:var(--surface-2); }
.vi-brand svg { display:block; height:24px; width:auto; }
.vi-brand { color:var(--text); }
.vi-handle { height:27px; flex-basis:27px; }
.vi-question .vicit-preview-text { font-size:13px; line-height:19px; }
.vi-input::placeholder { color:var(--muted); opacity:1; }
.vi-meta,.vi-feedback { color:var(--muted); font-size:11.5px; line-height:16px; margin-top:12px; }
.vi-feedback:empty { display:none; }
.vi-feedback { max-height:32px; overflow:hidden; }
.vi-submit.primary { color:#fff; background:var(--accent); border-color:var(--accent); }
.vi-submit.primary:disabled { color:#fff; background:var(--accent); }
.vi-pause,.vi-open,.vi-more { display:inline-flex; align-items:center; justify-content:center; gap:5px; }
.vi-ask { flex:0 0 auto; margin:0; padding:10px 12px; border-top:1px solid var(--border); position:relative; }
.vi-row { align-items:center; gap:4px; }
.vi-input { height:34px; min-height:34px; max-height:34px; padding:7px 8px; font-size:12px; line-height:18px; }
.vi-submit,.vi-mic,.vi-pull-in { flex:none; height:32px; min-width:28px; padding:4px; display:inline-flex; align-items:center; justify-content:center; }
.vi-submit { width:30px; border-radius:7px; }
.vi-mic,.vi-pull-in { border:0; background:transparent; border-radius:5px; }
.vi-pull-in { font-size:11px!important; white-space:nowrap; }
.vi-mic svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }
.vi-mic .microphone-cancel-glyph,.vi-mic .microphone-loading-glyph { display:none; }
.vi-mic[data-status="recording"] .microphone-glyph,.vi-mic[data-status="starting"] .microphone-glyph,.vi-mic[data-status="transcribing"] .microphone-glyph,.vi-mic[data-status="stopping"] .microphone-glyph { display:none; }
.vi-mic[data-status="recording"] .microphone-stop-glyph,.vi-mic[data-status="starting"] .microphone-stop-glyph { display:block; }
.vi-mic[data-status="stopping"] .microphone-loading-glyph,.vi-mic[data-status="transcribing"] .microphone-loading-glyph { display:block; }
.vi-using { max-height:80px; margin-bottom:8px; }
.vi-using:empty { display:none; }
.vi-mic-waveform { width:100%; height:28px; display:block; color:var(--text); background:var(--bg); pointer-events:none; }
.vi-mic-waveform[hidden] { display:none; }
.vi-mic-transcribing,.vi-mic-error { color:var(--muted); font-size:11px; line-height:16px; }
.vi-mic-transcribing { display:inline-block; color:transparent; -webkit-text-fill-color:transparent; background-image:linear-gradient(90deg,var(--muted) 0%,var(--muted) 38%,var(--text) 50%,var(--muted) 62%,var(--muted) 100%); background-size:250% 100%; background-position:100% 0; background-clip:text; -webkit-background-clip:text; }
.vi-mic-transcribing[hidden] { display:none; }
.vi-mic-error button { border:0; background:transparent; color:var(--accent-link); margin-left:8px; }
.vi-card .vicit-task-toggle:focus-visible { outline-offset:3px; }
.vi-card > .add-context-overlay { top:28px; padding:8px; }
.vi-card .add-context-dialog { min-height:0; width:100%; height:100%; }
.vi-editor { position:relative; flex:1; min-width:0; }
.vi-editor .vi-input { display:block; width:100%; caret-color:var(--text); }
.vi-editor .composer-mirror,.vi-editor .composer-selection-clone { white-space:pre; overflow-wrap:normal; }
.vi-task.conversation-message-body { font-size:16px; line-height:22px; padding:0; }
.vi-line.conversation-message-body { padding:0; }
.vi-card span.armed-mark-body { cursor:default; box-sizing:border-box; }
.vi-steering-list { max-height:140px; overflow-y:auto; margin:0 0 8px; scrollbar-width:thin; }
.vi-steering-list[hidden] { display:none; }
.vi-steering-receipt { border-left:2px solid var(--accent-link); background:var(--surface); border-radius:0 6px 6px 0; padding:6px 8px; margin:0 0 5px; }
.vi-steering-receipt:last-child { margin-bottom:0; }
.vi-steering-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 8px; color:var(--muted); font-size:11px; line-height:15px; }
.vi-steering-label { color:var(--accent-link); font-style:italic; }
.vi-steering-status { margin-left:auto; }
.vi-steering-text { color:var(--text); font-size:12px; line-height:17px; margin-top:3px; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.vi-steering-receipt[data-phase="received"] .vi-steering-status { color:var(--ok); }
.vi-steering-receipt[data-phase="failed"] { border-left-color:var(--danger, #b94a48); }
.vi-steering-retry { margin-top:4px; border:0; background:transparent; padding:0; color:var(--accent-link); font:inherit; font-size:11px; cursor:pointer; text-decoration:underline; }
.vi-runtime { font-size: 12px; line-height: 1.5; color: var(--muted); }
.vi-summary { display:none; }
.vi-details { display:none; }
.vi-card .vi-close { display:inline-flex; align-items:center; justify-content:center; flex:none; width:28px; height:28px; padding:0; border:0; border-radius:6px; background:var(--surface-2); color:var(--muted); }
.vi-card .vi-close:hover { color:var(--text); background:var(--border); }
.vi-card .vi-close:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.vi-mini-narrow .vi-header { flex-wrap:wrap; }
.vi-mini-narrow .vi-status { order:1; flex-basis:100%; }
.vi-footer { gap:8px; flex-wrap:wrap; padding:10px 12px; }
.vi-card .vi-pause,.vi-card .vi-resume,.vi-card .vi-stop,.vi-card .vi-open {
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  min-height:36px; padding:7px 11px; border:1px solid var(--control-border);
  border-radius:8px; background:var(--surface); font-size:12px; line-height:20px;
  white-space:nowrap; box-sizing:border-box;
}
.vi-card .vi-resume.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-contrast,#fff); font-weight:600; }
.vi-card .vi-stop { color:var(--danger); background:transparent; border-color:transparent; }
.vi-card .vi-open { background:transparent; border-color:transparent; }
.vi-card .vi-open .vi-icon { display:none; }
.vi-card .vi-owner { flex:1 0 100%; order:2; font-size:11px; }
.vi-card .vi-esc { display:none; }
.vi-card .vi-pull-in { min-width:28px; font-size:19px!important; }
.vi-card .vi-pause:hover,.vi-card .vi-open:hover,.vi-card .vi-stop:hover,
.vi-card .vi-details:hover { background:var(--surface-2); }
.vi-card .vi-resume:hover { background:var(--accent-hover); }

/* The instruction and its delivery state travel as one receipt. */
.vi-ask-label { display:block; margin:0 0 6px; color:var(--muted); font-size:11.5px; line-height:16px; font-weight:600; }
.vi-card .vi-steering-list { position:relative; height:56px; max-height:56px; overflow:hidden; margin:0 0 10px; border-radius:8px; }
.vi-card .vi-steering-receipt { display:flex; flex-direction:column; gap:2px; box-sizing:border-box; height:56px; margin:0; padding:7px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
.vi-card .vi-steering-head { display:flex; flex-wrap:nowrap; justify-content:flex-start; align-items:center; gap:8px; min-width:0; height:18px; flex:none; }
.vi-card .vi-steering-label { display:block; flex:0 0 auto; color:var(--muted); font-size:11px; font-style:normal; font-weight:600; white-space:nowrap; }
.vi-card .vi-steering-status { display:inline-flex; align-items:center; margin-left:0; font-size:10.5px; line-height:16px; padding:0 5px; border-radius:4px; color:var(--accent-link); background:var(--accent-soft); white-space:nowrap; }
.vi-card .vi-steering-text { display:block; margin:0; min-width:0; font-size:12px; line-height:19px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vi-card .vi-steering-receipt[data-phase="received"] .vi-steering-status { color:var(--ok); background:transparent; }
.vi-card .vi-steering-receipt[data-phase="failed"] .vi-steering-status { color:var(--danger); background:transparent; }
.vi-card .vi-steering-receipt[data-phase="unconfirmed"] .vi-steering-status { color:var(--muted); background:transparent; }
.vi-card .vi-steering-retry { flex:none; margin:0 0 0 auto; border:0; padding:0; color:var(--accent-link); background:transparent; font-size:11px; line-height:18px; }
.vi-card .vi-steering-outgoing { position:absolute; inset:0; pointer-events:none; }

.vi-outcome-copy { min-width:0; }
.vi-outcome-label { margin-bottom:4px; font-size:12px; line-height:18px; font-weight:600; color:var(--text); }
.vi-outcome-labeled { padding:12px; border:1px solid var(--border); border-radius:9px; background:var(--surface-2); }
.vi-outcome-labeled .vi-line { font-size:14px; line-height:21px; padding:0; color:var(--text); }
.vi-outcome .vi-result-action { padding:10px 0 0; }

/* One header, a labeled outcome when needed, then one input/control row. */
.vi-bar .vi-card { display:flex; flex-direction:column; gap:12px; padding:24px 16px 14px; border-radius:12px; min-height:64px; }
.vi-bar .vi-handle { position:absolute; top:0; left:0; right:0; height:16px; }
.vi-bar .vi-grip { top:6px; width:32px; left:calc(50% - 16px); }
.vi-bar .vi-header { display:flex; align-items:center; gap:8px; min-height:24px; padding:0; width:100%; }
.vi-bar .vi-runner { display:inline-block; flex-basis:24px; width:24px; height:24px; }
.vi-bar .vi-brand { display:inline-flex; flex:none; }
.vi-bar .vi-brand svg { width:55px; height:20px; }
.vi-bar .vi-status { flex:none; padding:2px 7px; font-size:11px; line-height:18px; white-space:nowrap; }
.vi-bar .vi-status::before { width:5px; height:5px; margin-right:4px; }
.vi-bar[data-state="finished"] .vi-status { color:var(--ok); background:var(--surface-2); }
.vi-bar .vi-summary { display:block; flex:1; min-width:0; color:var(--muted); font-size:12px; line-height:20px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vi-bar .vi-more { flex:none; width:28px; height:28px; margin-left:0; }
.vi-bar .vi-details { flex:none; display:inline-flex; border:0; border-radius:5px; background:transparent; color:var(--muted); padding:4px 6px; font-size:11px; line-height:20px; }
.vi-bar .vi-body { padding:0; margin:0; width:100%; max-height:400px; }
.vi-bar .vi-body[hidden] { display:none; }
.vi-bar.vi-details-closed .vi-task,.vi-bar.vi-details-closed .vi-meta,.vi-bar.vi-details-closed .vi-runtime,
.vi-bar.vi-details-closed .vi-recent,.vi-bar.vi-details-closed .vi-report-preview { display:none; }
.vi-bar .vi-outcome-labeled { display:flex; align-items:center; gap:20px; }
.vi-bar .vi-outcome-copy { flex:1; }
.vi-bar .vi-outcome .vi-result-action { flex:none; padding:0; align-self:center; }
.vi-bar .vi-ask { padding:0; border:0; width:100%; min-width:0; }
.vi-bar .vi-row { gap:5px; align-items:center; }
.vi-bar .vi-input { height:36px; min-height:36px; max-height:36px; font-size:12px; padding:8px 10px; }
.vi-bar .vi-mic,.vi-bar .vi-pull-in { min-width:28px; width:28px; height:36px; padding:3px; }
.vi-bar .vi-submit { height:36px; width:32px; }
.vi-bar .vi-footer { flex:none; min-height:36px; gap:4px; padding:0; margin:0; border:0; flex-wrap:nowrap; }
.vi-bar .vi-row > .vi-footer { padding-left:6px; border-left:1px solid var(--border); }
.vi-bar .vi-card > .vi-footer { justify-content:flex-end; width:100%; }
.vi-bar .vi-footer .vi-owner { display:none; }
.vi-bar .vi-pause,.vi-bar .vi-resume,.vi-bar .vi-stop,.vi-bar .vi-open { height:36px; padding:7px 10px; }
.vi-bar .vi-pause .vi-icon { display:none; }
.vi-bar .vi-open { margin-left:0; }
.vi-bar .vi-menu { position:static; align-self:flex-end; display:flex; flex-wrap:wrap; gap:4px; margin:0; min-width:0; max-width:100%; }
.vi-bar .vi-menu .vi-menu-action { width:auto; white-space:nowrap; }
.vi-bar .vi-using { max-height:72px; }
.vi-bar .vi-question-text { font-size:15px; }
.vi-bar .vi-question-preview { max-width:640px; }
.vi-bar .vi-receipt { margin-top:6px; }
.vi-bar .vi-card > .add-context-overlay { top:16px; }
.vi-bar-narrow .vi-header { flex-wrap:wrap; gap:6px; }
.vi-bar-narrow .vi-summary { flex-basis:100%; order:5; }
.vi-bar-narrow .vi-details { margin-left:auto; }
.vi-bar-narrow .vi-more { margin-left:auto; }
.vi-bar-narrow .vi-details:not([hidden]) + .vi-more { margin-left:0; }
.vi-bar-compact .vi-card { padding-left:12px; padding-right:12px; }
.vi-bar-compact .vi-outcome-labeled { flex-direction:column; align-items:stretch; gap:12px; }
.vi-bar-compact .vi-outcome .vi-result-action { align-self:flex-end; }

